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 to Python 3.12 #49

Merged
merged 14 commits into from
Nov 29, 2023
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
5 changes: 4 additions & 1 deletion .github/workflows/pytest-with-coverage.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@ name: pytest-with-coverage
on:
push:
branches: [ '*' ]
# Enable workflow to be triggered from GitHub CLI, browser, or via API
# primarily for testing conda env solution for new Python versions
workflow_dispatch:

jobs:
pytest-with-coverage:
Expand All @@ -12,7 +15,7 @@ jobs:
strategy:
fail-fast: false
matrix:
python-version: [ '3.10', '3.11' ]
python-version: [ '3.11', '3.12' ]
uses: UBC-MOAD/gha-workflows/.github/workflows/pytest-with-coverage.yaml@main
with:
python-version: ${{ matrix.python-version }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/sphinx-linkcheck.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
matrix:
# Need to specify Python version here because we use test env which gets its
# Python version via matrix
python-version: [ '3.11' ]
python-version: [ '3.12' ]
uses: UBC-MOAD/gha-workflows/.github/workflows/sphinx-linkcheck.yaml@main
with:
python-version: ${{ matrix.python-version }}
Expand Down
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,6 @@ repos:
- id: check-added-large-files
# Code formatting with black
- repo: https://github.com/psf/black
rev: 23.10.1
rev: 23.11.0
hooks:
- id: black
4 changes: 2 additions & 2 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ SalishSeaCast NEMO Command Processor
.. image:: https://img.shields.io/badge/license-Apache%202-cb2533.svg
:target: https://www.apache.org/licenses/LICENSE-2.0
:alt: Licensed under the Apache License, Version 2.0
.. image:: https://img.shields.io/badge/Python-3.10%20%7C%203.11-blue?logo=python&label=Python&logoColor=gold
:target: https://docs.python.org/3.11/
.. image:: https://img.shields.io/badge/Python-3.11%20%7C%203.12-blue?logo=python&label=Python&logoColor=gold
:target: https://docs.python.org/3.12/
:alt: Python Version
.. image:: https://img.shields.io/badge/version%20control-git-blue.svg?logo=github
:target: https://github.com/SalishSeaCast/SalishSeaCmd
Expand Down
12 changes: 12 additions & 0 deletions docs/breaking_changes.rst
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,18 @@
``SalishSeaCmd`` Changes That Break Backward Compatibility
*************************************************************

.. _BreakingChangesVersion23.1:

Version 23.1
============

The following change that was introduced in version 23.1 of the ``SalishSeaCmd``
package is incompatible with earlier versions:

* Drop support for Python 3.10.
Minimum supported Python version is now 3.11.


.. _BreakingChangesVersion22.3:

Version 22.3
Expand Down
16 changes: 8 additions & 8 deletions docs/development.rst
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@
.. image:: https://img.shields.io/badge/license-Apache%202-cb2533.svg
:target: https://www.apache.org/licenses/LICENSE-2.0
:alt: Licensed under the Apache License, Version 2.0
.. image:: https://img.shields.io/badge/Python-3.10%20%7C%203.11-blue?logo=python&label=Python&logoColor=gold
:target: https://docs.python.org/3.11/
.. image:: https://img.shields.io/badge/Python-3.11%20%7C%203.12-blue?logo=python&label=Python&logoColor=gold
:target: https://docs.python.org/3.12/
:alt: Python Version
.. image:: https://img.shields.io/badge/version%20control-git-blue.svg?logo=github
:target: https://github.com/SalishSeaCast/SalishSeaCmd
Expand Down Expand Up @@ -65,14 +65,14 @@
Python Versions
===============

.. image:: https://img.shields.io/badge/Python-3.10%20%7C%203.11-blue?logo=python&label=Python&logoColor=gold
:target: https://docs.python.org/3.11/
.. image:: https://img.shields.io/badge/Python-3.11%20%7C%203.12-blue?logo=python&label=Python&logoColor=gold
:target: https://docs.python.org/3.12/
:alt: Python Version

The :kbd:`SalishSeaCmd` package is developed using `Python`_ 3.11.
The minimum supported Python version is 3.10.
The :kbd:`SalishSeaCmd` package is developed using `Python`_ 3.12.
The minimum supported Python version is 3.11.
The :ref:`SalishSeaCmdContinuousIntegration` workflow on GitHub ensures that the package
is tested for all versions of Python>=3.10.
is tested for all versions of Python>=3.11.
An old version of the package running under Python 3.5 is depoloyed on the
Westgrid :kbd:`orcinus` HPC platform.
That version is tagged in the repository as ``orcinus-python-3.5``.
Expand Down Expand Up @@ -349,7 +349,7 @@ The output looks something like::
(line 497) ok https://github.com/SalishSeaCast/SalishSeaCmd/issues
(line 491) ok https://github.com/SalishSeaCast/SalishSeaCmd/issues
(line 21) ok https://img.shields.io/badge/license-Apache%202-cb2533.svg
(line 21) ok https://img.shields.io/badge/Python-3.10%20%7C%203.11-blue?logo=python&label=Python&logoColor=gold
(line 21) ok https://img.shields.io/badge/Python-3.11%20%7C%203.12-blue?logo=python&label=Python&logoColor=gold
(line 21) ok https://img.shields.io/badge/version%20control-git-blue.svg?logo=github
(line 21) ok https://img.shields.io/badge/code%20style-black-000000.svg
(line 21) ok https://codecov.io/gh/SalishSeaCast/SalishSeaCmd/branch/main/graph/badge.svg
Expand Down
6 changes: 3 additions & 3 deletions envs/environment-dev.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
#
# $ conda env create -f SalishSeaCmd/envs/environment-dev.yaml
# $ conda activate salishsea-cmd
# (salishsea-cmd)$ python3 -m pip install --editable NEMO-Cmd/
# (salishsea-cmd)$ python3 -m pip install --editable SalishSeaCmd/
# (salishsea-cmd)$ python -m pip install --editable NEMO-Cmd/
# (salishsea-cmd)$ python -m pip install --editable SalishSeaCmd/
#
# The environment includes all the tools used to develop,
# test, and document the SalishSeaCmd package.
Expand All @@ -27,7 +27,7 @@ dependencies:
- f90nml
- gitpython
- pip
- python=3.11
- python=3.12
- pyyaml

# For coding style, repo QA, and pkg management
Expand Down
6 changes: 3 additions & 3 deletions envs/environment-hpc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
#
# $ conda env create -f SalishSeaCmd/envs/environment-hpc.yaml
# $ conda activate salishsea-cmd
# (salishsea-cmd)$ python3 -m pip install --user --editable NEMO-Cmd/
# (salishsea-cmd)$ python3 -m pip install --user --editable SalishSeaCmd/
# (salishsea-cmd)$ python -m pip install --user --editable NEMO-Cmd/
# (salishsea-cmd)$ python -m pip install --user --editable SalishSeaCmd/

name: salishsea-cmd

Expand All @@ -19,7 +19,7 @@ dependencies:
- f90nml
- gitpython
- pip
- python=3.11
- python=3.12
- pyyaml

- pip:
Expand Down
2 changes: 1 addition & 1 deletion envs/environment-rtd.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ channels:

dependencies:
- pip
- python=3.11
- python=3.12

# readthedocs packages
- mock
Expand Down
53 changes: 26 additions & 27 deletions envs/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,53 +5,52 @@
# to create an isolated development environment.
#
# Create/update this file with:
# (salishsea-cmd)$ python3 -m pip list --format=freeze >> envs/requirements.txt
# (salishsea-cmd)$ python -m pip list --format=freeze >> envs/requirements.txt

alabaster==0.7.13
anyio==4.0.0
anyio==4.1.0
arrow==1.3.0
attrs==23.1.0
autopage==0.5.2
Babel==2.13.1
backports.functools-lru-cache==1.6.5
black==23.10.1
Brotli==1.1.0
certifi==2023.7.22
certifi==2023.11.17
cffi==1.16.0
cfgv==3.3.1
charset-normalizer==3.3.1
charset-normalizer==3.3.2
click==8.1.7
cliff==4.2.0
cliff==4.4.0
cmd2==2.4.3
colorama==0.4.6
coverage==7.3.2
cryptography==41.0.6
cryptography==41.0.7
distlib==0.3.7
docutils==0.17.1
docutils==0.20.1
editables==0.3
exceptiongroup==1.1.3
exceptiongroup==1.2.0
f90nml==1.4.4
filelock==3.12.4
filelock==3.13.1
gitdb==4.0.11
GitPython==3.1.40
h11==0.14.0
h2==4.1.0
hatch==1.7.0
hatchling==1.18.0
hpack==4.0.0
httpcore==0.18.0
httpx==0.25.0
httpcore==1.0.2
httpx==0.25.2
hyperframe==6.0.1
hyperlink==21.0.0
identify==2.5.30
idna==3.4
identify==2.5.32
idna==3.6
imagesize==1.4.1
importlib-metadata==6.8.0
iniconfig==2.0.0
jaraco.classes==3.3.0
jeepney==0.8.0
Jinja2==3.1.2
keyring==24.2.0
keyring==24.3.0
markdown-it-py==3.0.0
MarkupSafe==2.1.3
mdurl==0.1.0
Expand All @@ -60,16 +59,16 @@ mypy-extensions==1.0.0
nodeenv==1.8.0
packaging==23.2
pathspec==0.11.2
pbr==5.11.1
pbr==6.0.0
pexpect==4.8.0
pip==23.3.1
platformdirs==3.11.0
platformdirs==4.0.0
pluggy==1.3.0
pre-commit==3.5.0
prettytable==3.9.0
ptyprocess==0.7.0
pycparser==2.21
Pygments==2.16.1
Pygments==2.17.2
pyperclip==1.8.2
PySocks==1.7.1
pytest==7.4.3
Expand All @@ -80,17 +79,17 @@ python-hglib==2.6.2
pytz==2023.3.post1
PyYAML==6.0.1
requests==2.31.0
rich==13.6.0
rich==13.7.0
SecretStorage==3.3.3
setuptools==68.2.2
shellingham==1.5.4
six==1.16.0
smmap==5.0.0
sniffio==1.3.0
snowballstemmer==2.2.0
Sphinx==5.3.0
Sphinx==7.2.6
sphinx-notfound-page==1.0.0
sphinx-rtd-theme==1.3.0
sphinx-rtd-theme==2.0.0
sphinxcontrib-applehelp==1.0.7
sphinxcontrib-devhelp==1.0.5
sphinxcontrib-htmlhelp==2.0.4
Expand All @@ -102,14 +101,14 @@ stevedore==5.1.0
toml==0.10.2
tomli==2.0.1
tomli_w==1.0.0
tomlkit==0.12.1
trove-classifiers==2023.10.18
tomlkit==0.12.3
trove-classifiers==2023.11.29
types-python-dateutil==2.8.19.14
typing_extensions==4.8.0
ukkonen==1.0.1
urllib3==2.0.7
urllib3==2.1.0
userpath==1.7.0
virtualenv==20.24.6
wcwidth==0.2.8
wheel==0.41.2
virtualenv==20.24.7
wcwidth==0.2.12
wheel==0.42.0
zipp==3.17.0
16 changes: 1 addition & 15 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ name = "SalishSeaCmd"
dynamic = [ "version" ]
description = "SalishSeaCast NEMO Command Processor"
readme = "README.rst"
requires-python = ">=3.10"
requires-python = ">=3.11"
license = { file = "LICENSE" }
authors = [
{ name = "Doug Latornell", email = "[email protected]" },
Expand All @@ -37,20 +37,6 @@ keywords = [
"automation", "oceanography", "ocean modelling",
"UBC-MOAD", "Salish Sea", "SalishSeaCast",
]
classifiers = [
"Development Status :: 5 - Production/Stable",
"License :: OSI Approved :: Apache Software License",
"Programming Language :: Python :: Implementation :: CPython",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Operating System :: POSIX :: Linux",
"Operating System :: Unix",
"Environment :: Console",
"Intended Audience :: Science/Research",
"Intended Audience :: Education",
"Intended Audience :: Developers",
]
dependencies = [
# see envs/environment-dev.yaml for conda environment dev installation
# see envs/requirements.txt for versions most recently used in development
Expand Down