Skip to content
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

Added abstract backend base with Gitlab implementation #102

Merged
merged 11 commits into from
Jan 9, 2019
Merged

Conversation

brhoades
Copy link
Member

@brhoades brhoades commented Jan 24, 2018

See description in #95 (fixes #95). I've added and separated backends as described there. I want to add a mock backend so I can test this locally next.

@brhoades brhoades added this to the Quality Code milestone Jan 24, 2018
@brhoades
Copy link
Member Author

I'll probably need ideas on how to handle Access. I have a feeling it should be moved to the backend.

raise NotImplementedError

@classmethod
def from_url(cls, url: str, token: str):
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I looked into returning a self type from a class method in type annotations.

I think this is the recommended way:
python/mypy#1212 (comment)

Though I also saw this:
python/mypy#1212 (comment)

Thoughts? I really like these type annotations; I'll keep adding them where I can.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think python/peps@ada7d35 is what you want?

I also am a big fan of the type annotations; eventually I want to be able to integrate mypy here but there's a bit of footwork involved in writing annotations for some of the libraries we depend on.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, I think that's what I want. I tried reading this at 7 last night and I couldn't comprehend it.

@brhoades brhoades changed the title WIP: Added abstract backend base with Gitlab implementation Added abstract backend base with Gitlab implementation Jan 25, 2018
Copy link
Member

@LinuxMercedes LinuxMercedes left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I forgot to make all my comments part of a review but you can see 'em just the same.

@LinuxMercedes LinuxMercedes changed the title Added abstract backend base with Gitlab implementation [WIP] Added abstract backend base with Gitlab implementation Feb 2, 2018
@brhoades
Copy link
Member Author

brhoades commented Feb 7, 2018

@LinuxMercedes I rebased off master and squashed some commits. Please look with your wizard eyes.

@brhoades brhoades changed the title [WIP] Added abstract backend base with Gitlab implementation Added abstract backend base with Gitlab implementation Feb 7, 2018
@LinuxMercedes
Copy link
Member

Let me get #111 into shape and then we can put the last bit of polish on this!

Thank you so much for being patient and humoring my nitpicking ❤️

@LinuxMercedes LinuxMercedes modified the milestones: Quality Code, v2.0 Dec 22, 2018
@LinuxMercedes LinuxMercedes force-pushed the fb-backends branch 2 times, most recently from 1281c63 to a8fb4a3 Compare December 28, 2018 17:55
@LinuxMercedes LinuxMercedes force-pushed the fb-backends branch 2 times, most recently from 29408f9 to 763f3eb Compare January 5, 2019 23:57
brhoades and others added 8 commits January 6, 2019 14:04
Fixed pyflakes error about imports in __init__.py

Converted to @require_backend calling @config_context. Added basic mock backend.

Updated double decorator calls.

Removed changelog message about backend.
Added hook for MockBackend in config.

Mock backend now works but doesn't do much.

Updated doc / references to base repo to now reference template repo.

Added linting error exception.
Moved Access into backend, fixed unit tests and remaining TODOs.

Renamed requires_backend to requires_backend_and_config

renamed config_context to requires_config.
Added changelog messages.

Added note about base repo -> template repo.

Send integer Access level rather than enum name
Updated tests.

Rembed unneeded pyflakes override.

Ran sed on files to appease nitpicks.

Moved changelog to the correct spot.

Fixed linting error with asigner_test test case.
Removed artifact config.py

Fixed get integration test errors.
@LinuxMercedes
Copy link
Member

@brhoades The only thing I think I have left to do for this is to finish up the last commit -- adding more return type signatures. Care to give it a once-over and an LGTM? ❤️

@LinuxMercedes LinuxMercedes mentioned this pull request Jan 8, 2019
Also add a couple git ones that got missed.
@brhoades
Copy link
Member Author

brhoades commented Jan 9, 2019

LGTM 👍

@brhoades brhoades merged commit ace2561 into master Jan 9, 2019
@brhoades brhoades deleted the fb-backends branch January 9, 2019 23:54
@LinuxMercedes
Copy link
Member

🎉 🎉 🎉 🎉 🎉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Create a proper BaseRepo backend which is API agnostic. Make Gitlab an implementation.
2 participants