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

Add CI tests with minimum supported versions, update dependencies to fix failing test, fix pip install -e . #402

Merged
merged 13 commits into from
Dec 6, 2023

Conversation

jrbourbeau
Copy link
Collaborator

@jrbourbeau jrbourbeau commented Dec 5, 2023

xref #386 (comment)

Closes #386

pyproject.toml Outdated Show resolved Hide resolved
@jrbourbeau
Copy link
Collaborator Author

Note we're now getting

FAILED tests/unit/test_results.py::test_data_links - AttributeError: 'DataGranules' object has no attribute 'headers'

Like reported in #386

@MattF-NSIDC
Copy link

Love it 😍

Thoughts about keeping the mindeps file up-to-date? Maybe we should add a pull request template which mentions this concern as a checklist item?

It would be cool if there was tooling around this practice and our CI could check that it is up-to-date, and even update it!

This was referenced Dec 5, 2023
MattF-NSIDC
MattF-NSIDC previously approved these changes Dec 5, 2023
Copy link

@MattF-NSIDC MattF-NSIDC left a comment

Choose a reason for hiding this comment

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

I think this looks awesome. I'd really like some documentation about how this file should be maintained before merging it in. A comment block at the top, or a mention in CONTRIBUTING.md, or a PR template with a checklist, or ...?

@jhkennedy
Copy link
Collaborator

jhkennedy commented Dec 6, 2023

Thoughts about keeping the mindeps file up-to-date?

To at least have a single-source of dependencies, if we were using setuptools, we could do something like this:

  • pyproject.toml
    [tool.setuptools.dynamic]
    dependencies = { file = ["ci/requirements-min.txt"] }
  • test env using conda or pip:
    conda create --name earthaccess --file  ci/requirements-min.txt
    
    python -m pip install ci/requirements-min.txt
    

I don't know if you can do the same with Poetry.

Edit: You cannot.

@MattF-NSIDC MattF-NSIDC changed the title Add CI build with minimum supported versions Add CI tests with minimum supported versions Dec 6, 2023
@jrbourbeau
Copy link
Collaborator Author

Thoughts about keeping the mindeps file up-to-date? Maybe we should add a pull request template which mentions this concern as a checklist item?
It would be cool if there was tooling around this practice and our CI could check that it is up-to-date, and even update it!

For us I think just manually updating is fine. Almost all of the dependencies haven't been touched in over a year. Given that, I'm inclined to not add additional infrastructure that itself requires maintenance. I think a small, lightweight test to make sure things are consistent would be good (though I'd like to handle that as a follow-up).

We can always add more automation in the future if we find it useful. For now, I think we should start with the simple thing first.

I'd really like some documentation about how this file should be maintained before merging it in. A comment block at the top, or a mention in CONTRIBUTING.md, or a PR template with a checklist, or ...?

Yeah, totally agree. I'll add docs somewhere now.

@jhkennedy
Copy link
Collaborator

For us I think just manually updating is fine.

I agree with this as well. I like the comments in both files, and I don't think it's a burden since we should rarely be updating those.

@jrbourbeau
Copy link
Collaborator Author

Thanks all for the reviews!

@jrbourbeau jrbourbeau merged commit c0eb49b into nsidc:main Dec 6, 2023
7 checks passed
@jrbourbeau jrbourbeau deleted the mindeps branch December 6, 2023 18:05
@MattF-NSIDC MattF-NSIDC changed the title Add CI tests with minimum supported versions Add CI tests with minimum supported versions, fix pip install -e . Dec 6, 2023
@MattF-NSIDC MattF-NSIDC changed the title Add CI tests with minimum supported versions, fix pip install -e . Add CI tests with minimum supported versions, update dependencies to fix failing test, fix pip install -e . Dec 6, 2023
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.

AttributeError: 'DataGranules' object has no attribute 'headers' with python-cmr==0.7.0
4 participants