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

ci: read python versions from files #1919

Merged
merged 7 commits into from
Mar 20, 2025

Conversation

egparedes
Copy link
Contributor

@egparedes egparedes commented Mar 18, 2025

Encode in files the python versions used for testing, linting and other CI and development tasks.

  • .default-python-version contains the python version used by default for development tasks (previously .python-version was used, but it conflicted with other tools like pyenv).
  • .python-versions contains all supported python versions. This file is read by uv to set up the development environment. To avoid conflicts, the first version in the file should match the content of default-python-version. This file is also used by a new github action which is used by all CI jobs where the python version is a factor of the strategy matrix.

Additionally, the nox task running the example notebooks is not longer executed in parallel. This change is unrelated to this PR, but it seems necessary to have stable results on CI.

@egparedes egparedes force-pushed the explicit-python-versions branch from e38f4fb to 477ddef Compare March 19, 2025 08:58
@egparedes
Copy link
Contributor Author

cscs-ci run

@egparedes egparedes marked this pull request as ready for review March 19, 2025 12:01
@@ -120,7 +119,7 @@ def test_examples(session: nox.Session) -> None:
("examples", (None)),
]:
session.run(
*f"pytest --nbmake {notebook} -sv -n {num_processes}".split(),
*f"pytest --nbmake {notebook} -sv -n 1 --benchmark-disable".split(),
Copy link
Contributor

Choose a reason for hiding this comment

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

Is this change related to your comment about disabling the notebook tests?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, although my comment is about disabling the parallel execution of the notebook tests, not about disabling the tests.

@edopao
Copy link
Contributor

edopao commented Mar 19, 2025

LGTM

@@ -9,18 +9,31 @@ on:
- functional

jobs:
# First job to read Python versions from .python-versions file
Copy link
Contributor

Choose a reason for hiding this comment

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

This is probably the only hint that it is AI generated...

@egparedes egparedes merged commit 40ea571 into GridTools:main Mar 20, 2025
34 checks passed
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.

4 participants