Skip to content

Ensure pytest configuration in pyproject.toml is picked up#7670

Closed
lagru wants to merge 1 commit intoscikit-image:mainfrom
lagru:fix-no-pytest-config
Closed

Ensure pytest configuration in pyproject.toml is picked up#7670
lagru wants to merge 1 commit intoscikit-image:mainfrom
lagru:fix-no-pytest-config

Conversation

@lagru
Copy link
Member

@lagru lagru commented Jan 24, 2025

Description

Supersedes #7555. Closes #7554.

Edit: #7555 might actually be the better short-term fix after all.

Stepping out of the directory during tests might have been for the purpose of ensuring that the installed version is tested? Not sure if that is still necessary with the way we build and test. There's only one compiled version so if pytest tries to do the wrong thing, then it should fail and we should notice...

Though I would feel more secure about this if we were using the SRC-layout.

Checklist

Release note

For maintainers and optionally contributors, please refer to the instructions on how to document this PR for the release notes.

...

Stepping out of the directory during tests might have been for the
purpose of ensuring that the installed version is tested? Not sure if
that is still necessary with the way we build and test. There's only
one compiled version so if pytest tries to do the wrong thing, then
it should fail and we should notice...

Though I would feel more secure about this if we were using the
SRC-layout.
@lagru lagru added the 🤖 type: Infrastructure CI, packaging, tools and automation label Jan 24, 2025
@mkcor
Copy link
Member

mkcor commented Jan 25, 2025

Stepping out of the directory during tests might have been for the purpose of ensuring that the installed version is tested?

Ah, apparently it was for the purpose of picking up the Cython modules...

@agriyakhetarpal
Copy link
Contributor

FWIW, the Pyodide/WASM CI job also suffers from the same hiccup, and micropip in the Pyodide virtual environment is unable to perform an editable installation, anyway. I do recall that moving scikit-image to ansrc/ layout was suggested earlier as well somewhere back, but I can't find where that was...

One way to fix this and not move to a different folder when testing is to move to a import skimage; skimage.test() testing layout. This was previously removed, and later discussed in #3569 and brought back in #5909, but appears to not be used in CI at the moment. We use the same functionality in PyWavelets: https://github.com/PyWavelets/pywt/blob/ba9cf07157a926e0220ff43367674ccce08e429e/.github/workflows/emscripten.yml#L44, and it works well. :)

(Apologies for the unsolicited suggestion, if it is one!)

@lagru
Copy link
Member Author

lagru commented Jan 26, 2025

Not at all @agriyakhetarpal, thanks for the insight and digging up past mentions! I have a personal preference for the src-layout but I'm not sure what other core devs think. I'll add it as a discussion point to the next community meeting

We currently do have an unadvertised skimage.test() but it seems that it doesn't support docstests currently.

In light of that, I'm suggesting pivot back to #7555 for a short-term fix. Long-term we hopefully get the time to clean up the basic structure of our CI somewhat (e.g. scratch the scripts in tools/github/).

@lagru lagru marked this pull request as draft January 26, 2025 12:52
@stefanv stefanv closed this Jan 30, 2025
@stefanv
Copy link
Member

stefanv commented Jan 30, 2025

See #7555

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

Labels

🤖 type: Infrastructure CI, packaging, tools and automation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Pytest config in pyproject.toml isn't used in CI

4 participants