-
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
Break requirements down on per backend basis #64
Conversation
Codecov Report
@@ Coverage Diff @@
## master #64 +/- ##
==========================================
- Coverage 78.3% 78.17% -0.13%
==========================================
Files 21 21
Lines 719 724 +5
==========================================
+ Hits 563 566 +3
- Misses 156 158 +2
Continue to review full report at Codecov.
|
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.
Thanks @ml-evs !
I thought the idea was to have in the setup.py
more "lax" requirements (>=
or even without version specification), while the requirements.txt
files contain fixed dependencies that are used for testing and are guaranteed to work.
This change would remove the two types of requirements - and in that case, I no longer see a reason to have the .txt files; we could just write everything inside the setup.py.
I have to say that I was anyhow not fully convinced by this approach - if one of the newer dependencies does break optimade-python-tools, then users have to know that there are also the more strict requirements.txt files.
How about an intermediate solution, where we don't totally hardcode the version of every dependency but rather hope that they do semantic versioning correctly, i.e. something like
lark-parser>=0.5.6,<0.6
mongomock>=3.16.0,<4
(and only keep this in the setup.py)?
Hey @ltalirz, I'm happy to revert the changes to setup.py and hardcode the split requirements, I guess I normally work with fixed version reqs but can see the reasons others might not want to. I think requirements files are still useful so the user can use their package manager of choice (e.g. |
travis fails - let me know when you want me to review; |
Ah, thought pip could figure out [all] on its own, but guess not. Should be fixed now. |
We could consider switching to Pipfile only for our reqs, as FastAPI have done. |
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.
thanks @ml-evs , looks good to me
just to understand: what would be needed to be able to remove mongogrant from the default dependencies (which is currently duplicated in the mongo
dependency)?
also, would vote to move to pipenv
Nothing! :) I'm not sure we're using it explicitly in the code, but its a useful tool either way if you're setting up a mongo to use with optimade. +1 for pipenv, perhaps that's the next (boring) step after we get #63 merged. |
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.
thanks!
Closes #62 |
This PR splits the requirements file further for each backend (e.g. mongo, django and hopefully elasticsearch soon). This should make it easier for people to add more backends in the future, and relates to #63 which introduces additional backend-dependent code (like separate grammars).
setup.py
based on the contents of therequirements/*.txt
files.mongomock
as the only dep for this, or try to generalise the server for all backends).