-
Notifications
You must be signed in to change notification settings - Fork 44
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
Make requirements granular and optional #34
Conversation
We should at least add these installation options to the README. IMHO these options should be a little different:
|
pip does not support this |
We use correios library at several services at Olist but only one of them use PDF generation. And the API client is used only in 2 services. So, the "full installation" profile (model + pdf + api) is never used. But obviously this change breaks with their dependencies and that is why I bumped the major version. |
result = client.request_tracking_codes(user, Service.get(SERVICE_SEDEX), quantity=10) | ||
assert len(result) == 10 | ||
assert len(result[0].code) == 13 | ||
|
||
|
||
@pytest.mark.skipif(not correios, reason="API Client support disabled") |
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.
se esta usando o cassette por que o skip ? Tem risco de no 1 teste quando esta gravando o cassette a API esta fora ?
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.
quebra no import porque o módulo client não vai encontrar o suds, por exemplo...
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.
👍
@adlermedrado and @lamenezes it would be awesome if you review it asap. This change and the other planned to be merged after this one are important for what we're developing. |
Make requirements granular and optional
We can declare requirements like:
correios>=1.0.0
- only model classes and validatorscorreios[pdf]>=1.0.0
- base installation + label/posting-list pdf generationcorreios[client]>=1.0.0
- base installation + sigep/websro api clientcorreios[client,pdf]>=1.0.0
- full installation