Skip to content

VALI-9484 Update pint to latest version #20

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

Merged
merged 486 commits into from
Apr 16, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
486 commits
Select commit Hold shift + click to select a range
2bd6677
fix: support pytest on python 3.12 wrt Fraction formatting change
mtasaka Jul 17, 2023
6c2dda9
Merge pull request #1821 from mtasaka/py312-pytest-fix
hgrecco Jul 17, 2023
10e07ea
Merge remote-tracking branch 'origin/master' into parse-uncertainties
MichaelTiemannOSC Jul 23, 2023
65d0fac
Fix Transformation typing
kadykov Aug 4, 2023
c47e595
Add PR to changelog
kadykov Aug 7, 2023
2852f36
Merge pull request #1832 from kadykov/transformation-typing
hgrecco Aug 17, 2023
8d81f55
Merge remote-tracking branch 'upstream/master' into feature/np-linalg…
arjavtrivedi Sep 14, 2023
e86aee6
fix: add np.linalg.norm implementation after merging upstream
arjavtrivedi Sep 14, 2023
89be94c
test: rm test as per feedback
arjavtrivedi Sep 14, 2023
cc56b12
docs: cleanup spurious edits from merge
arjavtrivedi Sep 14, 2023
4e20d99
Make `babel` a dependency for testbase
MichaelTiemannOSC Sep 15, 2023
f55b8de
Update .readthedocs.yaml
MichaelTiemannOSC Sep 15, 2023
00f08f3
Fix failing tests
MichaelTiemannOSC Sep 15, 2023
07646d0
Merge pull request #1615 from MichaelTiemannOSC/parse-uncertainties
hgrecco Sep 15, 2023
ff9fed5
add `pint-xarray` to the downstream status page
keewis Sep 16, 2023
50e8051
fix the nightly badge
keewis Sep 16, 2023
09a2142
try formatting as a markdown table
keewis Sep 16, 2023
cf8cced
Merge pull request #1847 from keewis/downstream-status-pint-xarray
hgrecco Sep 17, 2023
247512b
Merge pull request #1251 from arjavtrivedi/feature/np-linalg-norm
hgrecco Sep 18, 2023
82ac76f
typo in documentation
alkrSTATGL Oct 9, 2023
fe5ed59
Fix typo
lodagro Oct 10, 2023
2bdb258
Merge pull request #1856 from lodagro/patch-1
hgrecco Oct 15, 2023
a01a0bf
Merge pull request #1855 from AlexanderKrabbe/documentation
jules-ch Oct 23, 2023
f9e139e
Wraps benchmark (#1862)
Saelyos Oct 24, 2023
894f4f0
Add extra typing annotations
hgrecco Nov 3, 2023
389361e
Pull flexparser.py from https://github.com/hgrecco/flexparser
hgrecco Nov 26, 2023
6a16bf7
Updated PintParser to new flexparser
hgrecco Nov 27, 2023
201a2e4
Pull flexparser.py from https://github.com/hgrecco/flexparser
hgrecco Nov 27, 2023
fc1aeba
Renamed internal method
hgrecco Nov 29, 2023
b597184
Remove optional argument from _yield_unit_triplets
hgrecco Nov 29, 2023
1a81b92
Minor typing improvements
hgrecco Nov 30, 2023
df655ba
Migrate test_infer_base_unit to use sess_registry, not LazyRegistry
hgrecco Dec 2, 2023
d8dd22d
Migrate test_infer_base_unit to use sess_registry, not LazyRegistry
hgrecco Dec 2, 2023
98fbda4
Improved testsuite
hgrecco Dec 2, 2023
7aa995c
Add a conversion factor cache
hgrecco Dec 3, 2023
321ea75
Avoid numpy scalar warnings (#1880)
dopplershift Dec 3, 2023
37127e1
Replace pkg_resources in test_load (#1870)
musicinmybrain Dec 3, 2023
04cc929
Fix tests for default preferred units (#1868)
dcnadler Dec 3, 2023
5d533d6
Improve wraps performances (#1866)
Saelyos Dec 3, 2023
b449b72
rename the first positional arg in _trapz to match numpy (#1796)
varchasgopalaswamy Dec 3, 2023
cf86f71
docs: add changes to docs (#1838)
MuellerSeb Dec 3, 2023
2138376
Add parse_units_as_container to homogeneize input/ouput in registry f…
hgrecco Dec 3, 2023
236b00c
Updated CHANGES
hgrecco Dec 3, 2023
57764be
Merge branch 'master' of github.com:hgrecco/pint
hgrecco Dec 3, 2023
52ac9f5
Preparing for release 0.23
hgrecco Dec 8, 2023
83bffe1
Back to development: 0.24
hgrecco Dec 8, 2023
29a139f
Fix UnitStrippedWarning for non arrays (#1909)
andrewgsavage Dec 27, 2023
6c3716f
Add formatter delegate
hgrecco Dec 31, 2023
0f24b6f
to_compact: support uncertainties' Magnitudes , keeping warning
andrewgsavage Jan 3, 2024
17c2143
Remove FormattingRegistry/Quantity/Unit in favor of the Formatter del…
hgrecco Jan 4, 2024
9e0789c
Moved Locale import to TYPE_CHECKING section
hgrecco Jan 4, 2024
a1381b6
Work on the formatter delegate
hgrecco Jan 18, 2024
fe684cd
Re added imports removed by ruff
hgrecco Jan 18, 2024
0127e3c
Fixed issues with array sring formatting
hgrecco Jan 18, 2024
efea263
Fixed lack of multiplier in raw format
hgrecco Jan 18, 2024
fbdfaa2
Moved babel.Locale to TYPE_CHECKING part
hgrecco Jan 18, 2024
16baf5a
Changed default format to .16n, equivalent to str or repr for floats
hgrecco Jan 19, 2024
3c16a30
Change test to use es_ES locale instead of the less common es_AR
hgrecco Jan 19, 2024
5c990f4
If sorted not selected, make a tuple and only then compare for emptin…
hgrecco Jan 19, 2024
3cffd59
Make value used in test more clear and direct
hgrecco Jan 19, 2024
ad0cd73
Better reporting in subtest
hgrecco Jan 19, 2024
a1eee0a
Make D the default formatter if spec is empty
hgrecco Jan 19, 2024
aba62bb
Create function to join magnitude and units that deal with 3 1 / s
hgrecco Jan 19, 2024
c1667aa
Create and use function to format scalar, use function to join magnit…
hgrecco Jan 19, 2024
37b735f
Removed unused babel part from formatter
hgrecco Jan 19, 2024
d562040
Migrated test_measurement from subtests to parametrize
hgrecco Jan 20, 2024
96d8eb3
Remove redundant test for measurement
hgrecco Jan 20, 2024
1976cc3
Improve number formatting
hgrecco Jan 20, 2024
9951f38
More comprehensive number formatting
hgrecco Jan 20, 2024
9dff7c8
Removed old formatting code from pint/formatting.py but keeping backw…
hgrecco Jan 20, 2024
5187d1d
Fixed babel test to show that now numbers are localized
hgrecco Jan 20, 2024
cd0fce4
Changed tests to compare localized versions
hgrecco Jan 20, 2024
ed0bb70
Changed some tests to point from ureg.default_format to ureg.formatte…
hgrecco Jan 20, 2024
f18bd6e
Changed formatter code to point from ureg.default_format to ureg.form…
hgrecco Jan 20, 2024
ad42b41
Added class to enable dynamic registration (backwards compatiblity)
hgrecco Jan 20, 2024
ce996ad
Marked some tests as xfail until behavior is defined
hgrecco Jan 20, 2024
decd154
CI: Install locals when babel is available
hgrecco Jan 20, 2024
10242d7
CI: add sudo to install locales
hgrecco Jan 20, 2024
88ff676
CI: fixed error in locale name
hgrecco Jan 20, 2024
2a25945
CI: generate localedef to avoid utf-8 in locale name
hgrecco Jan 20, 2024
666517d
DOC: Require a more recent version of `sphinx` (#1923)
keewis Jan 20, 2024
b50ddc5
feat: explicitly implement the `dtype` on `numpy` quantities (#1922)
keewis Jan 20, 2024
3421f24
refactor: reorganized formatter and added docs
hgrecco Jan 20, 2024
bc32ac1
refactor: simplify register_unit_format to avoid in function imports …
hgrecco Jan 20, 2024
d85a1cb
perf: use _get_symbol instead of get_symbol when short formatting (~)
hgrecco Jan 20, 2024
3cc7176
fix: typing annnotation, V typevar was not defined properly
hgrecco Jan 20, 2024
ae8d01c
doc: updated string formatting documentation
hgrecco Jan 21, 2024
1965782
fix: indentation in CHANGES
hgrecco Jan 22, 2024
cef8e96
doc: migrated the formatting guide from ipython to doctest
hgrecco Jan 22, 2024
9f06a3a
doc: fixed doctest for missing output
hgrecco Jan 22, 2024
a04a6b5
ci: install fr_FR locale to build docs
hgrecco Jan 22, 2024
36e3964
doc: fix docs related to localization
hgrecco Jan 22, 2024
c1d55c0
doc: fix docs related to localization
hgrecco Jan 22, 2024
a9ad7e8
feat: add flexible sorting capabilities to _format_helpers.formatting
hgrecco Jan 22, 2024
3cc2d36
Temporary fix for pluralization of units
hgrecco Jan 22, 2024
e3f24ab
feat: sort by dimension in formatting
MichaelTiemannOSC Mar 8, 2024
749d77c
chore!: drop support for Python 3.9 and NumPy < 1.23 due to NEP29
hgrecco Mar 8, 2024
1e61c6c
build: move dependencies to file, adding also appdirs, flexcache, fle…
hgrecco Mar 8, 2024
e48b76e
chore: devendorize appdirs, flexcache, flexparser
hgrecco Mar 8, 2024
1a87ce4
fix: typing improvements for defparser
hgrecco Mar 8, 2024
bdf7d7b
refactor: run 'pyupgrade --py310-plus **/*.py'
hgrecco Mar 9, 2024
ed46b6e
chore: configure ruff
hgrecco Mar 9, 2024
3b1170c
style: run 'pre-commit run --all-files'
hgrecco Mar 9, 2024
2c2a5a0
ci: update minimal version in github ci. Python >= 3.10 NumPy>=1.23
hgrecco Mar 9, 2024
d0114fc
ci: add Python 3.12 to tests
hgrecco Mar 9, 2024
0594295
ci: fix 3.10 requires quote strings
hgrecco Mar 9, 2024
b89ad28
build: change minimum version of flexcache and flexparser
hgrecco Mar 9, 2024
3d23442
fix: wrong use of formatting code
hgrecco Mar 9, 2024
37e43f7
fix: subformatters are within a formatr object
hgrecco Mar 9, 2024
8819917
fix: cache of decimal and float
hgrecco Mar 9, 2024
ca0f2ad
doc: explain angle and angular frequency
andrewgsavage Mar 9, 2024
f0185f2
chore: enable isort in ruff
hgrecco Mar 9, 2024
cf26a01
style: run 'pre-commit run --all-files'
hgrecco Mar 9, 2024
60a507d
Merge branch 'master' of github.com:hgrecco/pint
hgrecco Mar 9, 2024
cbe8077
refactor: improve dim_sort readability
hgrecco Mar 9, 2024
a023056
feat: correct pluralization of localized units
hgrecco Mar 10, 2024
9e702bc
perf: speed up formatter
hgrecco Mar 11, 2024
ba5fb65
fix: warning should be derived from UserWarning
hgrecco Mar 11, 2024
4324553
chore: Update `ruff` config
mattwthompson Mar 13, 2024
f2e4081
fix: remove all mentions of `cumproduct` (#1954)
keewis Mar 15, 2024
6be06c6
Skip failing benchmark test (#1981)
andrewgsavage May 12, 2024
d28efac
avoid calling str on array (#1959)
andrewgsavage May 12, 2024
e5b04b4
Document defaults of pint.UnitRegistry (#1919)
dalito May 12, 2024
be4e15b
Fix doctests (#1982)
andrewgsavage May 12, 2024
449697e
Fix siunitx format of integer powers with non_int_type=decimal.Decima…
tovrstra May 12, 2024
2b4a8b7
Implement numpy roll (#1968)
bpatel2107 May 12, 2024
feaa945
MNT: Handle trapz for numpy>=2 (#1971)
dopplershift May 12, 2024
cbdd79e
Fix converting to offset units of higher dimension e.g. gauge pressur…
dalito May 12, 2024
cb0ec94
numpy2 support (#1985)
andrewgsavage May 12, 2024
754a7ff
Add RIU to default_en.txt (#1816)
PeterKraus May 12, 2024
7262388
Array ufunc multiplication (#1677)
andrewgsavage May 12, 2024
c0501ff
Fix TypeError when combining auto_reduce_dimensions=True and non_int_…
jonemo May 12, 2024
24dd237
Detailed Error Message for `get_dimensionality()` (#1874)
tristannew May 12, 2024
ea3a5d1
move a change to 0.24 (#1986)
andrewgsavage May 12, 2024
5206fac
Add dBW, decibel watts (#1292)
MattEttus May 12, 2024
9a93a68
Add check for delta unit to convert (#1905)
dalito May 12, 2024
ad11d3a
Avoid looping on large numpy arrays (#1987)
andrewgsavage May 12, 2024
21ad66c
add packages using pint to ecosystem.rst (#1960)
andrewgsavage May 13, 2024
8eb3e31
use pytest skip for numpy2 test trapezoid (#1988)
andrewgsavage May 15, 2024
9972e60
add support for numpy.correlate and unit test (#1990)
ikondov May 21, 2024
09acae1
depreciate ureg.__getitem__
andrewgsavage May 26, 2024
1f78c5e
changes (#2002)
andrewgsavage May 31, 2024
858f59c
fix readme duplicate target (#2004)
andrewgsavage Jun 1, 2024
7b47d6b
Preparing for release 0.24
andrewgsavage Jun 7, 2024
a472c26
Back to development: 0.25
andrewgsavage Jun 7, 2024
5f67733
docs/ecosystem.rst: Add NEMO. (#2010)
bje- Jun 11, 2024
32ccd20
Fix custom formatters needing registry (#2011)
aulemahal Jun 13, 2024
4c25f32
support 3.9 (#2019)
andrewgsavage Jun 21, 2024
2493241
fix default format dimensionless (#2012)
andrewgsavage Jun 21, 2024
5f75bdc
fix Custom formatters not working with modifiers (#2021)
andrewgsavage Jun 21, 2024
88e2e80
fix babel tests issue (#2020)
andrewgsavage Jun 21, 2024
9014d14
skip babel tests if locales aren't installed (#2022)
andrewgsavage Jun 21, 2024
62046f0
add note on symbols to currency docs (#2023)
andrewgsavage Jun 22, 2024
4c2cacc
Preparing for release 0.24.1
andrewgsavage Jun 24, 2024
3c9a4da
set changes to 0.25
andrewgsavage Jun 27, 2024
ad02b87
Merge branch 'master' of https://github.com/hgrecco/pint
andrewgsavage Jun 27, 2024
7035daf
🎨 Fix styling of docs headings in dark mode (#2026)
mermop Jun 30, 2024
74e2e6a
Add permille units with ‰ symbol (#2033)
Musaefendic Jul 8, 2024
6483353
ensure uncertainties does not depend on numpy (#2001)
tgbugs Jul 8, 2024
bffbbc2
Add ℓ as alternative for liter (#2014)
SPKorhonen Jul 8, 2024
f9c381c
Added "mu" and "mc" prefixes. (#2013)
SPKorhonen Jul 8, 2024
b2fc74a
Fix cli uncertainty package import (#2032)
daspk04 Jul 8, 2024
1e46b2e
2035 pandas3 (#2036)
mutricyl Jul 12, 2024
5f2a76a
[DOC] Update changelog (#2034)
daspk04 Jul 13, 2024
0faac07
add error for prefixed non multi units (#1998)
andrewgsavage Jul 28, 2024
67303b8
build: typing_extensions version
andrewgsavage Jul 28, 2024
0b0ae61
build: switch from appdirs to platformdirs
s-t-e-v-e-n-k Jul 28, 2024
8f12bb9
fix GenericPlainRegistry getattr type (#2045)
theodotk Aug 19, 2024
2839f6e
Replace references to the deprecated `UnitRegistry.default_format` (#…
mgab Oct 4, 2024
d592aff
fix: upgrade to flexparser>=0.4, exceptions are no longer dataclasses
hgrecco Nov 7, 2024
a8bcb6e
ci: add Python 3.13 to github ci
hgrecco Nov 7, 2024
82801b3
Preparing for release 0.24.3
hgrecco Nov 7, 2024
b6a6f68
Preparing for release 0.24.4
hgrecco Nov 7, 2024
861953e
Back to development: 0.25
hgrecco Nov 7, 2024
c70c076
Add docs for testing module (#2070)
znichollscr Dec 3, 2024
b436902
fix: Fix round function returning `float` instead of `int` (#2089)
jules-ch Dec 10, 2024
2bdf58c
bump typing_ext (#2091)
tlambert03 Dec 13, 2024
fadbf70
CODATA 2022 update (#2049)
Jellby Dec 15, 2024
d886c20
qto.py: Make nan/inf magnitude checks accept uncertainties (#2093)
andrewgsavage Dec 15, 2024
3cbf3dd
Typing: Fix return type of PlainQuantity.to (#2090)
denialhaag Dec 15, 2024
415fcef
Fix code style (#2095)
denialhaag Dec 18, 2024
0ba0b53
Fix syntax highlighting in overview doc (#2098)
wjandrea Dec 26, 2024
74b7086
updated uncertainties package documentation url (#2099)
michaelweinold Dec 27, 2024
6082bdc
Add conductivity dimension (#2113)
nneskildsf Jan 6, 2025
18f1191
Add absorbance unit and dimension (#2115)
nneskildsf Jan 15, 2025
4fababf
pin benchmark ubuntu
andrewgsavage Jan 15, 2025
4012c26
Merge branch 'master' of https://github.com/hgrecco/pint
andrewgsavage Jan 15, 2025
c350f02
Add membrane filtration flux and permeability dimensionality, and sho…
nneskildsf Jan 18, 2025
eb5575e
fix(docs): add graphviz package to render graphviz graphs
jules-ch Feb 13, 2025
811c5ed
Merge pull request #1997 from andrewgsavage/getitem
jules-ch Feb 13, 2025
1e5f0c7
refactor: pyupgrade --py310-plus **/*.py
hgrecco Feb 14, 2025
46f8c91
refactor: pyupgrade --py311-plus **/*.py
hgrecco Feb 14, 2025
282941f
build: start to move build and ci infrastructure to pixi
hgrecco Nov 10, 2024
43adf97
build: create full and bench environments
hgrecco Nov 10, 2024
b1ad8eb
build: create numpy and full pixi environments
hgrecco Nov 12, 2024
8bc6369
build: update .gitignore
hgrecco Nov 10, 2024
a01033a
build: add pyright environment and task
hgrecco Feb 14, 2025
dc5473d
build: bump minimum Python version for 3.11
hgrecco Feb 14, 2025
da0e9d6
refactor: split try/except from if HAS_*/else in compat
hgrecco Feb 14, 2025
c9aaee1
refactor: delete unused file
hgrecco Nov 8, 2024
1b5689d
refactor: use TypeAlias
hgrecco Nov 8, 2024
be61d6f
test: refactor test_pint_eval as functions and incorporated uncertainty
hgrecco Nov 8, 2024
a9631e5
perf: benchmarks for pint_eval
hgrecco Nov 8, 2024
1958fab
docs: update CHANGES
hgrecco Feb 14, 2025
74b8a08
fix: plain_tokenizer is currently named _plain_tokenizer
hgrecco Feb 14, 2025
fcb0196
build: remove python 3.9 and 3.10 from github workflows
hgrecco Feb 14, 2025
85303e5
build: renamed full environment to all
hgrecco Feb 14, 2025
629d38f
build: remove requirements.txt as it is now in pyproject.toml
hgrecco Feb 14, 2025
e946bf9
ci: remove unnecessary pip install
hgrecco Feb 14, 2025
57a55b9
build: specify package folder for hatch
hgrecco Feb 14, 2025
c28eab5
fix: remove -j auto because it is failing with current setup
hgrecco Feb 14, 2025
1297186
build: upgrade packages to make this sphinx work
hgrecco Feb 14, 2025
b494c56
build: move doc building and testing to pixi
hgrecco Feb 15, 2025
80b390f
build: install french locales for doctest
hgrecco Feb 15, 2025
2e04c4c
Merge pull request #2132 from hgrecco/develop
hgrecco Feb 15, 2025
b326660
refactor: reorganize and add typing to pint/pint_eval.py
hgrecco Nov 8, 2024
f05be7d
fix: now _plain_tokenizer is plain_tokenizer
hgrecco Feb 15, 2025
7f9473a
test: remove test_issue39 as np.matrix is deprecated
hgrecco Nov 10, 2024
607bdee
test: missing number multiplying permille in test_issue1963
hgrecco Nov 10, 2024
1e45a60
test: numpy.trapz is deprectated in favour of numpy.trapezoid
hgrecco Nov 10, 2024
6fc74c6
test: TestQuantityToCompact::test_nonnumeric_magnitudes should call t…
hgrecco Nov 10, 2024
d020e55
test: upgrade to new formatter delegate
hgrecco Nov 10, 2024
5585dd8
test: UnitStrippedWarning is expected when copyto a non-quantity
hgrecco Nov 10, 2024
1b718d0
test: test should fail when xfail/xpassed is not working as expected
hgrecco Nov 10, 2024
7f41d75
test: remove print from test
hgrecco Nov 14, 2024
6a72c20
test: remove print from test
hgrecco Nov 14, 2024
bdbd502
test: xfail is incorrect here
hgrecco Nov 10, 2024
c9f7e91
fix: split split_format to keep lru_cache but use warning every time
hgrecco Nov 10, 2024
4d354c9
Merge pull request #2134 from hgrecco/develop
hgrecco Feb 15, 2025
9b33203
test: trapezoid should be used for Numpy >= 2 and trapz otherwise
hgrecco Feb 15, 2025
48106e2
test: trapz should be used for Numpy < 2
hgrecco Feb 15, 2025
d7c69f7
test: trapezoid should be used for Numpy >= 2 and trapz otherwise
hgrecco Feb 15, 2025
6e91d5c
Merge pull request #2129 from jules-ch/fix-docs-graphviz
jules-ch Feb 15, 2025
645158a
Merge pull request #2135 from hgrecco/_testing_improve
hgrecco Feb 15, 2025
541e9c4
refactor: improve pint-convert (#2136)
hgrecco Feb 15, 2025
6d77d93
ci: update setup-pixi to v0.8.2
maurosilber Feb 18, 2025
384b346
Merge pull request #2140 from maurosilber/master
hgrecco Feb 18, 2025
b77263f
build: upper bound for sphinx (#2143)
maurosilber Feb 22, 2025
030fcaf
Pin sphinx version to allow docs to build (#2144)
andrewgsavage Feb 23, 2025
b39b62f
chore(bench): update CodSpeed/action to v2 (#1972)
adriencaccia Feb 23, 2025
79f8be0
test: added slow/failing test for #2146
deanmalmgren Feb 26, 2025
bff497d
fix: using bfs algorithm for util.find_shortest_path
deanmalmgren Feb 26, 2025
607dcd8
chore: no longer need path argument to find_shortest_path, which is n…
deanmalmgren Feb 26, 2025
edeb847
doc: added to CHANGES
deanmalmgren Feb 26, 2025
dc94eab
Merge pull request #2147 from deanmalmgren/fix-2146-shortest-path
hgrecco Mar 17, 2025
50e70f8
fix bench ci (#2160)
andrewgsavage Mar 23, 2025
41e19db
improve custom formatter docs (#2159)
andrewgsavage Mar 23, 2025
db02470
chore: fix type error in pyproject.toml file (#2163)
Igoreduardobraga Apr 14, 2025
bed424a
Add pyproject update
antonio-perez-altium Apr 14, 2025
c35cb56
Merge branch 'master' of https://github.com/hgrecco/pint into VALI-9484
antonio-perez-altium Apr 14, 2025
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/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
- [ ] Closes # (insert issue number)
- [ ] Executed ``pre-commit run --all-files`` with no errors
- [ ] Executed `pre-commit run --all-files` with no errors
- [ ] The change is fully covered by automated unit tests
- [ ] Documented in docs/ as appropriate
- [ ] Added an entry to the CHANGES file
9 changes: 5 additions & 4 deletions .github/workflows/bench.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,16 @@ name: codspeed-benchmarks
on:
push:
branches:
- "main"
- "master"
- "develop"
pull_request:
# `workflow_dispatch` allows CodSpeed to trigger backtest
# performance analysis in order to generate initial data.
workflow_dispatch:

jobs:
benchmarks:
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v3
Expand All @@ -22,10 +23,10 @@ jobs:
run: pip install "numpy>=1.23,<2.0.0"

- name: Install bench dependencies
run: pip install .[bench]
run: pip install .[codspeed]

- name: Run benchmarks
uses: CodSpeedHQ/action@v1
uses: CodSpeedHQ/action@v2
with:
token: ${{ secrets.CODSPEED_TOKEN }}
run: pytest . --codspeed
129 changes: 79 additions & 50 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,58 +1,45 @@
name: CI
name: Test and release when tagged

on: [push, pull_request]
on: [push]

jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: prefix-dev/[email protected]
with:
environments: lint
- run: pixi run --environment lint lint

test-linux:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: ["3.9", "3.10", "3.11", "3.12"]
environment:
- test-py311
- test-py312
- test-py313
numpy: [null, "numpy>=1.23,<2.0.0", "numpy>=2.0.0rc1"]
uncertainties: [null, "uncertainties==3.1.6", "uncertainties>=3.1.6,<4.0.0"]
extras: [null]
include:
- python-version: "3.10" # Minimal versions
- environment: "test-py311" # Minimal versions
numpy: "numpy>=1.23,<2.0.0"
extras: matplotlib==3.5.3
- python-version: "3.10"
- environment: "test-py311"
numpy: "numpy"
uncertainties: "uncertainties"
extras: "sparse xarray netCDF4 dask[complete]==2024.5.1 graphviz babel==2.8 mip>=1.13"
- python-version: "3.10"
- environment: "test-py311"
numpy: "numpy==1.26.1"
uncertainties: null
extras: "babel==2.15 matplotlib==3.9.0"
runs-on: ubuntu-latest

env:
TEST_OPTS: "-rfsxEX -s --cov=pint --cov-config=.coveragerc --benchmark-skip"

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- uses: prefix-dev/[email protected]
with:
fetch-depth: 100

- name: Get tags
run: git fetch --depth=1 origin +refs/tags/*:refs/tags/*

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}

- name: Get pip cache dir
id: pip-cache
run: echo "::set-output name=dir::$(pip cache dir)"

- name: Setup caching
uses: actions/cache@v2
with:
path: ${{ steps.pip-cache.outputs.dir }}
key: pip-${{ matrix.python-version }}
restore-keys: |
pip-${{ matrix.python-version }}

environments: ${{ matrix.environment }}
- name: Install numpy
if: ${{ matrix.numpy != null }}
run: pip install "${{matrix.numpy}}"
Expand All @@ -77,25 +64,67 @@ jobs:
run: |
sudo apt install -y graphviz
pip install packaging
pip install .[testbase]

- name: Install pytest-mpl
if: contains(matrix.extras, 'matplotlib')
run: pip install pytest-mpl
- run: pixi run --environment ${{ matrix.environment }} test

- name: Run Tests
run: |
pytest $TEST_OPTS
test-windows:
runs-on: windows-latest
strategy:
matrix:
environment:
- test-py311
- test-py312
- test-py313
numpy: [null, "numpy>=1.23,<2.0.0", "numpy>=2.0.0rc1"]
steps:
- uses: actions/checkout@v4
- uses: prefix-dev/[email protected]
with:
environments: ${{ matrix.environment }}
- name: Install numpy
if: ${{ matrix.numpy != null }}
run: pip install "${{matrix.numpy}}"
- run: pixi run --environment ${{ matrix.environment }} test

test-macos:
runs-on: macos-latest
strategy:
matrix:
environment:
- test-py311
- test-py312
- test-py313
numpy: [null, "numpy>=1.23,<2.0.0", "numpy>=2.0.0rc1"]
steps:
- uses: actions/checkout@v4
- uses: prefix-dev/[email protected]
with:
environments: ${{ matrix.environment }}
- name: Install numpy
if: ${{ matrix.numpy != null }}
run: pip install "${{matrix.numpy}}"
- run: pixi run --environment ${{ matrix.environment }} test

# - name: Coverage report
# run: coverage report -m
publish:
if: github.ref_type == 'tag'
needs: [test-linux, test-windows, test-macos, lint]

# - name: Coveralls Parallel
# env:
# COVERALLS_FLAG_NAME: ${{ matrix.test-number }}
# COVERALLS_PARALLEL: true
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# COVERALLS_SERVICE_NAME: github
# run: |
# pip install coveralls "requests<2.29"
# coveralls
runs-on: ubuntu-latest
environment:
name: pypi
url: https://pypi.org/p/pint
permissions:
id-token: write # for trusted publising to PyPI

steps:
- uses: actions/checkout@v4
- uses: prefix-dev/[email protected]
with:
environments: build
- name: Build the package
run: pixi run --environment build build
- name: Publish to PyPI
run: pixi run --environment build publish
47 changes: 11 additions & 36 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,46 +5,21 @@ on: [push, pull_request]
jobs:
docbuild:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
with:
fetch-depth: 100

- name: Get tags
run: git fetch --depth=1 origin +refs/tags/*:refs/tags/*

- name: Set up minimal Python version
uses: actions/setup-python@v2
- uses: actions/checkout@v4
- uses: prefix-dev/[email protected]
with:
python-version: "3.10"

- name: Get pip cache dir
id: pip-cache
run: echo "::set-output name=dir::$(pip cache dir)"

- name: Setup pip cache
uses: actions/cache@v2
environments: docs
- run: pixi run --environment docs docbuild
doctest:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: prefix-dev/[email protected]
with:
path: ${{ steps.pip-cache.outputs.dir }}
key: pip-docs
restore-keys: pip-docs

environments: docs
- name: Install locales
run: |
sudo apt-get install language-pack-fr
sudo localedef -i fr_FR -f UTF-8 fr_FR

- name: Install dependencies
run: |
sudo apt install -y pandoc
pip install --upgrade pip setuptools wheel
pip install -r "requirements_docs.txt"
pip install docutils==0.14 commonmark==0.8.1 recommonmark==0.5.0 babel==2.8
pip install .

- name: Build documentation
run: sphinx-build -n -j auto -b html -d build/doctrees docs build/html

- name: Doc Tests
run: sphinx-build -a -j auto -b doctest -d build/doctrees docs build/doctest
- run: pixi run --environment docs doctest
46 changes: 0 additions & 46 deletions .github/workflows/lint-autoupdate.yml

This file was deleted.

17 changes: 0 additions & 17 deletions .github/workflows/lint.yml

This file was deleted.

24 changes: 15 additions & 9 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,19 +1,27 @@
# ignore all hidden files
.*
# except
!.gitignore
!.gitattributes
!.github/
!.pre-commit-config.yaml
!.copier-answers.yml

# Python
__pycache__
*.py[cod]
*$py.class

*~
__pycache__
*egg-info*
*.pyc
.DS_Store
docs/_build/
.idea
.vscode
build/
dist/
MANIFEST
*pytest_cache*
.eggs
.mypy_cache
pip-wheel-metadata
pint/testsuite/dask-worker-space
venv

# WebDAV file system cache files
.DAV/
Expand All @@ -22,7 +30,6 @@ pint/testsuite/dask-worker-space
tags

test/
.coverage*

# notebook stuff
*.ipynb_checkpoints*
Expand All @@ -34,7 +41,6 @@ notebooks/pandas_test.csv
dask-worker-space

# airspeed velocity bechmark
.asv/
benchmarks/hashes.txt

# local python environment
Expand Down
Loading
Loading