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

Support Python 3.12 #280

Merged
merged 7 commits into from
Sep 30, 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
2 changes: 1 addition & 1 deletion .github/workflows/pytest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ jobs:
runs-on: ubuntu-20.04
strategy:
matrix:
python-version: ["3.6", "3.7", "3.8", "3.9", "3.10", "3.11"]
python-version: ["3.6", "3.7", "3.8", "3.9", "3.10", "3.11", "3.12"]
steps:
- name: Checkout repository and submodules
uses: actions/checkout@v4
Expand Down
19 changes: 11 additions & 8 deletions .readthedocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,23 +5,26 @@
# Required
version: 2

# Set the OS, Python version and other tools you might need
build:
os: ubuntu-22.04
tools:
python: "3.11"

# Build documentation in the docs/ directory with Sphinx
sphinx:
configuration: docs/conf.py

# Build documentation with MkDocs
#mkdocs:
# configuration: mkdocs.yml

# Optionally build your docs in additional formats such as PDF
# Optionally build your docs in additional formats such as PDF and ePub
formats:
- pdf

# Optionally set the version of Python and requirements required to build your docs
# Optional but recommended, declare the Python requirements required
# to build your documentation
# See https://docs.readthedocs.io/en/stable/guides/reproducible-builds.html
python:
version: 3.7
install:
- method: pip
path: .
extra_requirements:
- docs
- docs
16 changes: 16 additions & 0 deletions RELEASE.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,19 @@
# Release 0.10.5
- Added support for Python 3.12.
- Updated dependency versions:
- decorator>=4.4.2, <6
- importlib-metadata>=1.7, <8
- lxml>=4.6.5, <6
- MarkupSafe>=1.1.1, <3
- mpmath>=1.1.0, <2
- networkx>=2.4, <4
- packaging>=20.4, <24
- Pint>=0.9, <0.30
- pyparsing>=2.4.7, <4
- rdflib>=5.0.0, <8
- zipp>=1.2.0, <4
- Jinja2>=3.0.0, <4

# Release 0.10.4
- Improved the developer documentation with regards to updating python packages, the ontology and releasing new versions of chaste_codegen.

Expand Down
5 changes: 2 additions & 3 deletions chaste_codegen/_command_line_script.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
######################################################################
import argparse
import os
from collections import OrderedDict

import chaste_codegen as cg
from chaste_codegen import LOGGER, CodegenError, load_model_with_conversions
Expand All @@ -17,7 +16,7 @@

# pass --<command_line_tag> to select this model type

TRANSLATORS = OrderedDict(
TRANSLATORS = dict(
[('normal', (cg.NormalChasteModel, 'FromCellML', '', True, '')),
('cvode', (cg.CvodeChasteModel, 'FromCellMLCvode', 'Cvode', True, '')),
('cvode-data-clamp', (cg.CvodeChasteModel, 'FromCellMLCvodeDataClamp', 'CvodeDataClamp', True, '')),
Expand All @@ -29,7 +28,7 @@
' in mastrcriptRT with added injection current(i_inj)')),
('rush-larsen-c', (cg.RushLarsenC, '', '', False, ' in C with added injection current(i_inj)'))])

TRANSLATORS_OPT = OrderedDict(
TRANSLATORS_OPT = dict(
[('normal', (cg.OptChasteModel, 'FromCellMLOpt', 'Opt', True, '')),
('cvode', (cg.OptCvodeChasteModel, 'FromCellMLCvodeOpt', 'CvodeOpt', True, '')),
('cvode-data-clamp', (cg.OptCvodeChasteModel, 'FromCellMLCvodeDataClampOpt', 'CvodeDataClampOpt', True, '')),
Expand Down
4 changes: 1 addition & 3 deletions chaste_codegen/_lookup_tables.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
import collections

from cellmlmanip.model import Quantity, Variable
from sympy import (
Piecewise,
Expand Down Expand Up @@ -71,7 +69,7 @@ def __init__(self, model, lookup_params=DEFAULT_LOOKUP_PARAMETERS):
'lookup_epxrs': []} for param in lookup_params)
self._model = model
self._lookup_variables = set()
self._lookup_table_expr = collections.OrderedDict()
self._lookup_table_expr = dict()
self._lookup_params_processed, self._lookup_params_printed = False, False

self._method_printed = None
Expand Down
2 changes: 1 addition & 1 deletion chaste_codegen/data/tests/test_jacobian_equations_2.txt

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion chaste_codegen/data/tests/test_jacobian_matrix_2.txt

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 2 additions & 3 deletions chaste_codegen/tests/test_jacobian.py

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion chaste_codegen/version.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.10.3
0.10.5
3 changes: 3 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[build-system]
requires = ["setuptools"]
build-backend = "setuptools.build_meta"
23 changes: 11 additions & 12 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,23 +47,22 @@
# List of dependencies
install_requires=[
'py>=1.10.0',
'decorator>=4.4.2, <5',
'importlib-metadata>=1.7, <5',
'decorator>=4.4.2, <6',
'importlib-metadata>=1.7, <8',
'isodate>=0.6.0, <1',
'lxml>=4.6.5, <5',
'MarkupSafe>=1.1.1, <2',
'lxml>=4.6.5, <6',
'MarkupSafe>=1.1.1, <3',
'mpmath>=1.1.0, <2',
'networkx>=2.4, <3',
'packaging>=20.4, <21',
'Pint>=0.9, <0.20',
'pyparsing>=2.4.7, <3',
'rdflib>=5.0.0, <7',
'networkx>=2.4, <4',
'packaging>=20.4, <24',
'Pint>=0.9, <0.30',
'pyparsing>=2.4.7, <4',
'rdflib>=5.0.0, <8',
'six>=1.15.0, <2',
'sympy>=1.9, <1.11',
'zipp>=1.2.0, <2',
'Jinja2>=2.11.3, <4',
'zipp>=1.2.0, <4',
'Jinja2>=3.0.0, <4',
'cellmlmanip>=0.3.6, <0.4',
'Jinja2>=2.11.3, <4',
],
extras_require={
'docs': [
Expand Down