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

Pin matplotlib in oldestdeps job #1015

Merged
merged 2 commits into from
Feb 21, 2023
Merged

Pin matplotlib in oldestdeps job #1015

merged 2 commits into from
Feb 21, 2023

Conversation

pllim
Copy link
Member

@pllim pllim commented Feb 21, 2023

matplotlib 3.7 bumped minversion of numpy.

Fix #1014

@pllim pllim added this to the v2.0 milestone Feb 21, 2023
@codecov
Copy link

codecov bot commented Feb 21, 2023

Codecov Report

Merging #1015 (d4b3d2f) into main (d2de13e) will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff           @@
##             main    #1015   +/-   ##
=======================================
  Coverage   70.03%   70.03%           
=======================================
  Files          64       64           
  Lines        4339     4339           
=======================================
  Hits         3039     3039           
  Misses       1300     1300           

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@pllim pllim marked this pull request as ready for review February 21, 2023 19:44
@pllim
Copy link
Member Author

pllim commented Feb 21, 2023

Failure is unrelated. I am just going to merge this now.

@pllim pllim merged commit 25cb121 into astropy:main Feb 21, 2023
@pllim pllim deleted the fix-oldestdeps branch February 21, 2023 19:45
@@ -46,6 +46,7 @@ deps =
oldestdeps: asdf-astropy==0.3.*
oldestdeps: asdf==2.10.*
oldestdeps: ndcube==2.0.*
oldestdeps: matplotlib==3.6.*
Copy link
Contributor

Choose a reason for hiding this comment

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

If this is really the oldest supported version (and is it?), should that be reflected in the requirements in setup.cfg?
Asking since mamba wanted matplotlib 3.5.* for numpy 1.19, and tests are still passing with 3.5.3.

Copy link
Member Author

Choose a reason for hiding this comment

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

No, that is not the oldest supported version. It is actually the maxversion we can allow for matplotlib for the oldest supported version. According to setup.cfg , matplotlib is only a test dependency.

Copy link
Contributor

Choose a reason for hiding this comment

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

Yes, but if installed as test dependency (and not necessarily though tox), should not that also ensure a supported version is installed? And now that a version is specified in oldestdeps, I would expect, well, the actual oldest supported version to be tested (may be 3.1.0, which is the oldest I could reliably install and test with Python 3.8, or even older); just as it is done for numpy etc.

Copy link
Contributor

Choose a reason for hiding this comment

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

Well, actually the tests are running (with the same 435 passing w/o remote_data) without any matplotlib installed, as it is only ever imported in the docs. So maybe the question rather is whether it belongs into test deps at all (especially with no doctests configured).

Copy link
Member Author

Choose a reason for hiding this comment

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

Pretty sure specutils runs doctest because I just fixed those.

Copy link
Contributor

@dhomeier dhomeier Mar 3, 2023

Choose a reason for hiding this comment

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

(there existed a build_docs job at the time when #849 was open, but I cannot see any obvious replacement for that) – ok, seeing that they are pulled in with cov, but I cannot reproduce why oldestdeps is including cov. It obviously is, so perhaps a comment would be helpful indeed.

Copy link
Member Author

Choose a reason for hiding this comment

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

I think this setting pulls in test dependencies for all the jobs:

specutils/tox.ini

Lines 62 to 63 in 6eb7f96

extras =
test

Copy link
Contributor

Choose a reason for hiding this comment

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

Yes, that is clear; was just wondering if anything running doctests would also pull in extras = docs as linkcheck does. Answer is 'no'; turns out I misread the
!cov: pytest --pyargs specutils {toxinidir}/docs {posargs}
command for a commented line! (Maybe one should go Spanish and use ¡ for not ;-)

Copy link
Member Author

Choose a reason for hiding this comment

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

So, do you still need a comment in tox.ini?

Copy link
Contributor

Choose a reason for hiding this comment

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

I have reconstructed now how it is a documentation dependency that is required for all tests; no strong opinion either way if no one else has stumbled over it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

TST: oldest dep job fail because numpy upgraded when not supposed to
2 participants