-
Notifications
You must be signed in to change notification settings - Fork 15
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Features/testing dry hack #11
Conversation
(I might not have time to finish this, but at least my goal was to give you some ideas about that, and open a discussion) |
I'm intrigued, but could you rebase this onto master? It contains some changes (namely 6ae13ca) that are already on master. |
d7da703
to
26a2d6a
Compare
ok, rebased and actually finished it. |
I also updated the travis test to use pytest with a proper coverage report. Hope you'll like it! |
|
647f9ef
to
3c2cddc
Compare
sorry for the build flood, but I had to make a bunch of minor adjustments to have it all work 👌 on travis 😉 |
@@ -585,7 +585,7 @@ def check_for_basic_auth(self, request): | |||
self.assertEqual(request.headers["Authorization"], "Basic {}".format(b64)) | |||
|
|||
def assert_repos_equal(self, repo, expected): | |||
self.assertEqual(repo.repo_id, expected.repo_id) | |||
self.assertEqual(repo.id, expected.id) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could we add a repo_id
property to GogsRepo
? I'm fine with having an id
property, but I'd like to keep repo_id
to maintain backwards compatibility. (similarly for everything else renamed from XYZ_id
to id
)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done 👌
.travis.yml
Outdated
@@ -5,11 +5,13 @@ python: | |||
- '3.4' | |||
- '3.5' | |||
install: | |||
- pip install -r requirements.txt |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changes to .travis.yml
should be a separate PR; from what I can tell this isn't related to the DRY refactor in any way.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done 👌
Signed-off-by: Guyzmo <[email protected]>
3c2cddc
to
e955663
Compare
otherwise, how do you feel about this change? |
@guyzmo Unfornuately, the refactor messed up the docs (we autogenerate Sphinx documentation from docstrings). Essentially, we should be using comment of the form
instead of docstrings for class attributes. Also, we need to update
instead of
I've started making these changes at 57f51cd. If you can finish it off, that would be great; otherwise I can finish sometime later this week. |
Signed-off-by: Guyzmo <[email protected]>
so, I have took another path: keeping There's also an issue for attrs to generate As my current commit is, the only remaining issue is the repetition of the subclasses like |
+1 for the changes to |
I've manually merged e955663 and some extra changes I made into |
👍 happy you liked the idea! |
just a simple illustration of #10.
it's not perfect: the
name_id
properties had to be changed toid
and thehook_type
had to be renamedtype
. That's not great regarding shadowing of globals, but it's ok because in usage they'll always be namespaced.