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

Determine minimum supported dependency versions #32

Closed
adamjstewart opened this issue Jul 4, 2021 · 6 comments · Fixed by #80 or #574
Closed

Determine minimum supported dependency versions #32

adamjstewart opened this issue Jul 4, 2021 · 6 comments · Fixed by #80 or #574
Labels
testing Continuous integration testing
Milestone

Comments

@adamjstewart
Copy link
Collaborator

Before releasing, we should determine the minimum supported version of each dependency. We should also consider a test with this version just to make sure it doesn't change.

@adamjstewart adamjstewart added the testing Continuous integration testing label Jul 4, 2021
@adamjstewart
Copy link
Collaborator Author

For testing, I think we can add a matrix field like:

matrix:
    dep-version: [oldest, latest]

Then, during action setup, if: ${{ matrix.dep-version == 'oldest' }}, we can run sed on requirements.txt to replace >= with ==.

We could also use an include: so that we don't have to run every test twice. Still haven't decided if we need to test this just for pytest or for all actions. Also not sure how to detect the minimum version without trying everything and seeing what breaks.

@adamjstewart
Copy link
Collaborator Author

pypa/pip#8085 would greatly help with this if it ever gets implemented.

@calebrob6
Copy link
Member

calebrob6 commented Jul 22, 2021

We depend on the latest release candidate of pytorch-lightning (1.4.0) to fix an issue with mypy (the problem where mypy doesn't think a LightningModule's hparams property is indexable)

@adamjstewart
Copy link
Collaborator Author

I would like to differentiate between dependency versions required for torchgeo to function and versions required for things like mypy to pass. We have hundreds of comments across torchgeo that ignore mypy warnings due to missing typing. These will likely change frequently. So the actual version required by torchgeo should be the minimum where the pytest tests pass. For things like mypy/Sphinx, we will always use the latest release.

@adamjstewart
Copy link
Collaborator Author

Now that we're using requirements.txt and dependabot, I think it wouldn't be unreasonable to add a CI test that uses a separate requirements-min.txt with the minimum known working versions of our deps. We can then make sure the full range works as expected.

@adamjstewart adamjstewart reopened this Jun 9, 2022
@adamjstewart adamjstewart modified the milestones: 0.1.0, 0.2.2 Jun 9, 2022
@adamjstewart
Copy link
Collaborator Author

Just discovered that matplotlib does the same thing: https://github.com/matplotlib/matplotlib/blob/main/requirements/testing/minver.txt

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
testing Continuous integration testing
Projects
None yet
2 participants