Skip to content

Commit 4b9944d

Browse files
authored
Drop 3.8 support; add 3.13 testing; drop support for old versions of Pint (#225)
1 parent b0a0b97 commit 4b9944d

File tree

6 files changed

+19
-11
lines changed

6 files changed

+19
-11
lines changed

.github/workflows/pr-tests.yml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
name: PR Tests
22

3+
permissions:
4+
contents: read
5+
pull-requests: write
6+
37
on:
48
pull_request:
59
branches:
@@ -8,6 +12,8 @@ on:
812

913
jobs:
1014
pr-tests:
11-
uses: CitrineInformatics/common-gh-actions/.github/workflows/run-tests.yml@v1
15+
uses: CitrineInformatics/common-gh-actions/.github/workflows/run-tests.yml@v1.1
1216
with:
1317
src: gemd
18+
skip_38: true
19+
include_313: true

gemd/__version__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
__version__ = "2.1.11"
1+
__version__ = "2.2.0"

gemd/units/impl.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -307,7 +307,7 @@ def _format_clean(unit, registry, **options):
307307
"""
308308
try: # Informal route changed in 0.22
309309
from pint.formatting import _FORMATTERS
310-
formatter = _FORMATTERS["D"]
310+
formatter = _FORMATTERS["D"] # pragma: no cover
311311
except ImportError: # pragma: no cover
312312
from pint import Unit
313313
formatter_obj = registry.formatter._formatters["D"]
@@ -317,7 +317,6 @@ def _surrogate_formatter(unit, registry, **options):
317317
parsed = Unit(unit)
318318
return formatter_obj.format_unit(parsed)
319319
except ValueError:
320-
parsed = Unit(unit)
321320
return formatter_obj.format_quantity(unit)
322321

323322
formatter = _surrogate_formatter

requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
pint==0.21
1+
pint==0.24.4
22
deprecation==2.1.0
33
typing-extensions==4.8.0
44
importlib-resources==5.3.0

setup.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
setup(name='gemd',
1616
# Update this in gemd/__version__.py
1717
version=version,
18-
python_requires='>=3.8',
18+
python_requires='>=3.9',
1919
url='http://github.com/CitrineInformatics/gemd-python',
2020
description="Python binding for Citrine's GEMD data model",
2121
author='Citrine Informatics',
@@ -33,14 +33,14 @@
3333
'tests.units': ['test_units.txt']
3434
},
3535
install_requires=[
36-
"pint>=0.21,<0.25,!=0.22,!=0.23", # pint 0.22,0.23 have a bad interaction w/ numpy >= 2
36+
"pint>=0.24.4,<0.25",
3737
"deprecation>=2.1.0,<3",
3838
"typing_extensions>=4.8,<5",
3939
"importlib-resources>=5.3,<7"
4040
],
4141
extras_require={
4242
"scripts": [
43-
"packaging"
43+
"packaging",
4444
"sphinx==5.0.0",
4545
"sphinx-rtd-theme==1.0.0",
4646
"sphinxcontrib-apidoc==0.3.0",
@@ -52,16 +52,16 @@
5252
"pandas>=2.0.3,<3"
5353
],
5454
"tests.entity.bounds": [
55-
"numpy>=1.24.4,<3",
55+
"numpy>=1.24.4,<2; python_version<='3.10'",
5656
"pandas>=2.0.3,<3"
5757
]
5858
},
5959
classifiers=[
6060
'Programming Language :: Python :: 3',
61-
'Programming Language :: Python :: 3.8',
6261
'Programming Language :: Python :: 3.9',
6362
'Programming Language :: Python :: 3.10',
6463
'Programming Language :: Python :: 3.11',
6564
'Programming Language :: Python :: 3.12',
65+
'Programming Language :: Python :: 3.13',
6666
],
6767
)

test_requirements.txt

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
flake8==7.0.0
22
flake8-docstrings==1.7.0
3+
numpy==1.24.4; python_version<'3.10'
4+
pandas==2.0.3; python_version<'3.10'
5+
numpy>=2.0.2,<=2.1.0; python_version>='3.10'
6+
pandas==2.3.0; python_version>='3.10'
37
pytest==8.0.0
48
pytest-cov==4.1.0
5-
pandas>=2.0.3,<2.2.0 # includes a compatible version of numpy
69
derp==0.1.1

0 commit comments

Comments
 (0)