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

DO NOT MERGE: Debug pytest 8 compatibility (rc_testing) #2654

Closed
wants to merge 5 commits into from

Conversation

pllim
Copy link
Contributor

@pllim pllim commented Jan 6, 2024

Description

This pull request is to address pytest-dev/pytest#9765 (comment)

Fixes #2643

Change log entry

  • Is a change log needed? If yes, is it added to CHANGES.rst? If you want to avoid merge conflicts,
    list the proposed change log here for review and add to CHANGES.rst before merge. If no, maintainer
    should add a no-changelog-entry-needed label.

Checklist for package maintainer(s)

This checklist is meant to remind the package maintainer(s) who will review this pull request of some common things to look for. This list is not exhaustive.

  • Are two approvals required? Branch protection rule does not check for the second approval. If a second approval is not necessary, please apply the trivial label.
  • Do the proposed changes actually accomplish desired goals? Also manually run the affected example notebooks, if necessary.
  • Do the proposed changes follow the STScI Style Guides?
  • Are tests added/updated as required? If so, do they follow the STScI Style Guides?
  • Are docs added/updated as required? If so, do they follow the STScI Style Guides?
  • Did the CI pass? If not, are the failures related?
  • Is a milestone set? Set this to bugfix milestone if this is a bug fix and needs to be released ASAP; otherwise, set this to the next major release milestone.
  • After merge, any internal documentations need updating (e.g., JIRA, Innerspace)?

@pllim pllim added the no-changelog-entry-needed changelog bot directive label Jan 6, 2024
@pllim pllim added this to the 3.9 milestone Jan 6, 2024
Copy link

codecov bot commented Jan 6, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (d91877a) 91.53% compared to head (f68cd4f) 91.52%.

❗ Current head f68cd4f differs from pull request most recent head 2a215c9. Consider uploading reports for the commit 2a215c9 to get more accurate results

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2654      +/-   ##
==========================================
- Coverage   91.53%   91.52%   -0.01%     
==========================================
  Files         161      161              
  Lines       20062    19995      -67     
==========================================
- Hits        18363    18301      -62     
+ Misses       1699     1694       -5     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Disable --pre

Force pytest to install from debug branch

Stick to 8.0,  not 8.1
@pllim pllim force-pushed the debug-rc-pytest8 branch 2 times, most recently from b0d31ca to 8b6d6d3 Compare January 9, 2024 19:29
@lesteve
Copy link

lesteve commented Jan 9, 2024

Naively, it looks like your root conftest.py is not loaded somehow on Windows? That would explain why the fixtures don't exist. You could try pytest --trace-config that would give some information.

@pllim
Copy link
Contributor Author

pllim commented Jan 9, 2024

@lesteve , I added a pytest --trace-config but I am not sure what I should be looking for.

https://github.com/spacetelescope/jdaviz/actions/runs/7466468232/job/20317888491?pr=2654

@lesteve
Copy link

lesteve commented Jan 9, 2024

Sorry you should add --trace-config to the pytest command that runs your test, not run pytest --trace-config on its own.

This in principle gives you information about which conftest.py are loaded, so grep conftest.py in it and double-check whether your conftest.py defining the fixtures is indeed loaded.

@pllim
Copy link
Contributor Author

pllim commented Jan 9, 2024

Hmm it says

PLUGIN registered: <module 'jdaviz.conftest' from 'D:\\a\\jdaviz\\jdaviz\\.tox\\py310-test-predeps\\lib\\site-packages\\jdaviz\\conftest.py'>

Is it not supposed to be this file? https://github.com/spacetelescope/jdaviz/blob/main/jdaviz/conftest.py

@pllim
Copy link
Contributor Author

pllim commented Jan 9, 2024

Huh, @lesteve , the error goes away when I upgrade from Python 3.10 to Python 3.11 for the Windows job. Does this make sense to you?

@pllim
Copy link
Contributor Author

pllim commented Jan 9, 2024

Anyways, I switch to Python 3.11 on main. Moving on. Thanks for your help!

@pllim pllim closed this Jan 9, 2024
@pllim pllim deleted the debug-rc-pytest8 branch January 9, 2024 22:40
@lesteve
Copy link

lesteve commented Jan 10, 2024

Huh, @lesteve , the error goes away when I upgrade from Python 3.10 to Python 3.11 for the Windows job. Does this make sense to you?

It does not, but yeah Scipy reported that the issue for them only happens with Python 3.9 and Python 3.10 indeed.

@lesteve
Copy link

lesteve commented Jan 10, 2024

Just to make sure the Pytest PR pytest-dev/pytest#11708 does not break something unexpectedly, would you mind trying with Python 3.11 and your debug branch?

@pllim
Copy link
Contributor Author

pllim commented Jan 10, 2024

would you mind trying with Python 3.11 and your debug branch?

I think I did in the last run of this PR. See https://github.com/spacetelescope/jdaviz/actions/runs/7467463759/job/20321031619?pr=2654

@lesteve
Copy link

lesteve commented Jan 10, 2024

OK great, I missed that indeed. This is good to know that the Pytest PR did not break something unexpectedly.

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

Successfully merging this pull request may close these issues.

Test suite will fail when pytest 8.0 is released
2 participants