-
Notifications
You must be signed in to change notification settings - Fork 379
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
Consolidate files listing dependencies #140
Comments
Poetry might be a good solution for this. Advantages:
Disadvantages (maybe?):
Personally, I've switched from using conda to poetry in my projects and have found it much better but YMMV. If there is interest I can draft a PR. Edit: Btw, I'm not endorsing Some references:
I think python-poetry/poetry-core#192 might have fixed my (3rd) issue. |
Yes, I've been keeping an eye on alternative build tools like poetry and flit. So far I haven't seen a significant advantage compared to setuptools and
Setuptools has always had support for this, so I don't see this as an advantage.
How does |
Perhaps better is too strong a word. Convenient would be more appropriate. Poetry doesn't replace conda. conda manages environments and resolves dependencies whereas poetry only does the latter. The key here is how a project uses conda. Is it used for environment management? Installing specific non-python libraries? Both? I mainly used conda for environment management and I preferred poetry because:
Misc issues:
Poetry and pyenv together gives me enough environment management without the overhead of maintaining an additional file of dependencies and tracking a separate package registry ( That being said, for projects that utilise non-python libraries (like |
Gotcha. I think a lot of developers (especially @calebrob6) prefer conda. Personally I use Spack. And a lot of people just want to use pip. I think supporting more package managers than that would add more headaches. |
As far as I can tell, there's no way to have a rolling development version in conda-forge or have optional dependencies like there is with pip or spack, so we may have to keep |
Currently, the following files all list torchgeo's dependencies:
setup.cfg
requirements.txt
docs/requirements.txt
spack.yaml
environment.yml
.github/workflows/{docs/release/style/tests}.yaml
.pre-commit-config.yaml
Whenever someone needs to add a new dependency to torchgeo, they need to add it to most of these files, making it easy to forget and difficult to keep track of. We should try to consolidate these. Here are some suggestions:
setup.cfg
We may be able to use
requirements.txt
instead ofsetup.cfg
by using something like pbr or setuptools-scm. But see below for another option.requirements.txt
I don't think this file is necessary.
pip install .[all]
in the root directory should read the dependencies fromsetup.cfg
and provide much of the same support aspip install -r requirements.txt
. I thinkpip install git+https://github.com/microsoft/torchgeo
may also work.docs/requirements.txt
This can be removed pending pytorch/pytorch_sphinx_theme#143
spack.yaml
This can be removed by adding a
py-torchgeo
package to Spack. It can install both stable releases (once we release) as well as development versions.environment.yml
I'm not sure how to remove this one. Can conda-forge be used to install development versions?
.github/workflows/{docs/release/style/tests}.yaml
If we
pip install
all of our dependencies fromrequirements.txt
, it will be slower than only installing the deps for a specific tests, but we won't have to duplicate info as much..pre-commit-config.yaml
No ideas, the developers don't seem interested in sharing configuration files with any other tool: pre-commit/pre-commit#1165
The text was updated successfully, but these errors were encountered: