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

Update versions of Python used in continuous integration workflows #2879

Merged
merged 9 commits into from
Oct 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,24 57,24 @@ jobs:
python: '3.12'
nox_session: docs

- name: Static type checking with mypy, Python 3.12, Ubuntu
- name: Static type checking with mypy, Python 3.13, Ubuntu
os: ubuntu-latest
python: '3.12'
python: '3.13'
nox_session: mypy

- name: Packaging, Python 3.12, Ubuntu
- name: Packaging, Python 3.13, Ubuntu
os: ubuntu-latest
python: '3.12'
python: '3.13'
nox_session: build

- name: Validate CITATION.cff
os: ubuntu-latest
python: '3.12'
python: '3.13'
nox_session: cff

- name: Check consistency of pinned & project requirements
os: ubuntu-latest
python: '3.12'
python: '3.13'
nox_session: validate_requirements

steps:
Expand Down
52 changes: 26 additions & 26 deletions .github/workflows/weekly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,29 54,29 @@ jobs:
python: '3.10'
nox_session: tests-3.10(lowest-direct)

- name: Tests, Python 3.12, astropy-dev, Ubuntu
- name: Tests, Python 3.13, astropy-dev, Ubuntu
os: ubuntu-latest
python: '3.12'
python: '3.13'
nox_session: run_tests_with_dev_version_of(astropy)

- name: Tests, Python 3.12, numpy-dev, Ubuntu
- name: Tests, Python 3.13, numpy-dev, Ubuntu
os: ubuntu-latest
python: '3.12'
python: '3.13'
nox_session: run_tests_with_dev_version_of(numpy)

- name: Tests, Python 3.12, xarray-dev, Ubuntu
- name: Tests, Python 3.13, xarray-dev, Ubuntu
os: ubuntu-latest
python: '3.12'
python: '3.13'
nox_session: run_tests_with_dev_version_of(xarray)

- name: Tests, Python 3.12, pandas-dev, Ubuntu
- name: Tests, Python 3.13, pandas-dev, Ubuntu
os: ubuntu-latest
python: '3.12'
python: '3.13'
nox_session: run_tests_with_dev_version_of(pandas)

- name: Tests, Python 3.12, lmfit-dev, Ubuntu
- name: Tests, Python 3.13, lmfit-dev, Ubuntu
os: ubuntu-latest
python: '3.12'
python: '3.13'
nox_session: run_tests_with_dev_version_of(lmfit)

- name: Documentation, Python 3.12, Ubuntu
Expand All @@ -99,49 99,49 @@ jobs:
python: '3.12'
nox_session: build_docs_with_dev_version_of(nbsphinx)

- name: Static type checking with mypy, Python 3.12, Windows
- name: Static type checking with mypy, Python 3.13, Windows
os: windows-latest
python: '3.12'
python: '3.13'
nox_session: mypy

- name: Packaging, Python 3.12, Windows
- name: Packaging, Python 3.13, Windows
os: windows-latest
python: '3.12'
python: '3.13'
nox_session: build

- name: Packaging, Python 3.11, Ubuntu
- name: Packaging, Python 3.12, Ubuntu
os: ubuntu-latest
python: '3.11'
python: '3.12'
nox_session: build

- name: Packaging, Python 3.10, macOS
- name: Packaging, Python 3.11, macOS
os: macos-latest
python: '3.10'
python: '3.11'
nox_session: build

- name: Import PlasmaPy, Python 3.12, macOS
- name: Import PlasmaPy, Python 3.13, macOS
os: macos-latest
python: '3.12'
python: '3.13'
nox_session: import

- name: Import PlasmaPy, Python 3.11, Ubuntu
- name: Import PlasmaPy, Python 3.12, Ubuntu
os: ubuntu-latest
python: '3.11'
python: '3.12'
nox_session: import

- name: Import PlasmaPy, Python 3.10, Windows
- name: Import PlasmaPy, Python 3.11, Windows
os: windows-latest
python: '3.10'
python: '3.11'
nox_session: import

- name: Check MANIFEST.in
os: ubuntu-latest
python: '3.12'
python: '3.13'
nox_session: manifest

- name: Lint
os: ubuntu-latest
python: '3.12'
python: '3.13'
nox_session: lint

steps:
Expand Down
4 changes: 2 additions & 2 deletions .readthedocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 7,14 @@ formats:
- htmlzip

build:
os: ubuntu-22.04
os: ubuntu-24.04
tools:
python: '3.12'
apt_packages:
- graphviz
jobs:
post_build:
- echo $'\n'For help deciphering documentation build error messages, see:$'\n\n'\ \ https://docs.plasmapy.org/en/latest/contributing/doc_guide.html#troubleshooting
- echo $'\n'⚠️ For help deciphering documentation build error messages, see:$'\n\n'\ \ https://docs.plasmapy.org/en/latest/contributing/doc_guide.html#troubleshooting

python:
install:
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -86,14 86,14 @@ python -m pip install plasmapy

> [!NOTE]
> On some systems, it might be necessary to specify the Python version
> number, for example by using `python3` or `python3.12` instead of
> number, for example by using `python3` or `python3.13` instead of
> `python`.

To install PlasmaPy on Windows, open a terminal and run
```Shell
py -3.12 -m pip install plasmapy
py -3.13 -m pip install plasmapy
```
The `3.12` may be replaced by any version of Python that is installed
The `3.13` may be replaced by any version of Python that is installed
and supported by PlasmaPy.

## Citing PlasmaPy
Expand Down
1 change: 1 addition & 0 deletions changelog/2879.internal.rst
Original file line number Diff line number Diff line change
@@ -0,0 1 @@
Updated the versions of Python used in continuous integration workflows.
2 changes: 1 addition & 1 deletion docs/_global_substitutions.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 90,7 @@
"lite-function": r":term:`lite-function`\ ",
"lite-functions": r":term:`lite-functions`\ ",
"many ways to contribute": r":ref:`many ways`\ ",
"maxpython": "3.12",
"maxpython": "3.13",
"minpython": "3.10",
"open a terminal": r":ref:`open a terminal <opening-a-terminal>`\ ",
"Open a terminal": r":ref:`Open a terminal <opening-a-terminal>`\ ",
Expand Down
13 changes: 10 additions & 3 deletions noxfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 40,13 @@

current_python = f"{sys.version_info.major}.{sys.version_info.minor}"

# The documentation should be build always using the same version of
# Python, which should be the latest version of Python supported by Read
# the Docs. Because Read the Docs takes some time to support new
# releases of Python, we should not link docpython to maxpython.

docpython = "3.12"

nox.options.sessions: list[str] = [f"tests-{current_python}(skipslow)"]
nox.options.default_venv_backend = "uv|virtualenv"

Expand Down Expand Up @@ -274,7 281,7 @@ def run_tests_with_dev_version_of(session: nox.Session, repository: str) -> None
"""


@nox.session(python="3.12")
@nox.session(python=docpython)
def docs(session: nox.Session) -> None:
"""
Build documentation with Sphinx.
Expand All @@ -295,7 302,7 @@ def docs(session: nox.Session) -> None:
session.debug(f"Documentation preview landing page not found: {landing_page}")


@nox.session(python=maxpython)
@nox.session(python=docpython)
@nox.parametrize(
["site", "repository"],
[
Expand Down Expand Up @@ -332,7 339,7 @@ def build_docs_with_dev_version_of(
"""


@nox.session(python=maxpython)
@nox.session(python=docpython)
def linkcheck(session: nox.Session) -> None:
"""Check hyperlinks in documentation."""
if running_on_ci:
Expand Down
8 changes: 4 additions & 4 deletions src/plasmapy/formulary/relativity.py
Original file line number Diff line number Diff line change
Expand Up @@ -254,10 254,10 @@ class RelativisticBody:
Particle("p ")
>>> relativistic_proton.velocity
<Quantity 1.03697...e 08 m / s>
>>> relativistic_proton.v_over_c
np.longdouble('0.34589808987468...')
>>> relativistic_proton.lorentz_factor
np.longdouble('1.06578892478889...')
>>> print(relativistic_proton.v_over_c)
0.34589808987468...
>>> print(relativistic_proton.lorentz_factor)
1.06578892478889...
>>> relativistic_proton.mass_energy.to("GeV")
<Quantity 0.93827... GeV>
>>> relativistic_proton.total_energy.to("GeV")
Expand Down