Skip to content

Commit 837645d

Browse files
committed
Merge branch 'main' into fix/support_slice_elements
2 parents 8ce3ddc + 9d7a4c3 commit 837645d

32 files changed

+863
-555
lines changed

.github/workflows/dependencies.yaml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,12 @@ concurrency:
2020
group: ${{ github.workflow }}
2121

2222
env:
23+
# Note: the last version in this list is used to for sphinx-docs and pypi-releases
2324
PYTHON_VERSIONS: |
2425
3.9
2526
3.10
2627
3.11
28+
3.13
2729
3.12
2830
2931
jobs:
@@ -43,12 +45,17 @@ jobs:
4345
cd requirements
4446
for VER in $PYTHON_VERSIONS
4547
do
48+
echo "::group::Updating dependencies for python $VER..."
4649
python$VER -m pip install pip-tools==7.4.1
4750
python$VER -m piptools compile --upgrade --no-annotate -o examples-requirements-py$VER.txt --all-extras ../pyproject.toml examples.in
4851
python$VER -m piptools compile --upgrade --no-annotate -o tests-requirements-py$VER.txt examples-requirements-py$VER.txt tests.in
52+
echo "::endgroup::"
4953
done
50-
# use last version for docs
54+
# use last version for docs and releases
55+
echo "::group::Updating dependencies for docs and release using python $VER..."
56+
echo "$VER" > .python-version
5157
python$VER -m piptools compile --upgrade --no-annotate -o docs-requirements.txt examples-requirements-py$VER.txt docs.in
58+
echo "::endgroup::"
5259
5360
- name: Open PR
5461
uses: peter-evans/[email protected]

.github/workflows/release.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ jobs:
1212
- uses: actions/checkout@v4
1313
- uses: actions/setup-python@v5
1414
with:
15-
python-version: '3.12'
15+
python-version-file: 'requirements/.python-version'
1616
- run: |
1717
# Assert git and python versions match
1818
pip install -e .
@@ -32,7 +32,7 @@ jobs:
3232
- uses: actions/checkout@v4
3333
- uses: actions/setup-python@v5
3434
with:
35-
python-version: '3.12'
35+
python-version-file: 'requirements/.python-version'
3636
- run: |
3737
pip install build
3838
- name: Build
@@ -70,7 +70,7 @@ jobs:
7070
fetch-depth: 0
7171
- uses: actions/setup-python@v5
7272
with:
73-
python-version: '3.12'
73+
python-version-file: 'requirements/.python-version'
7474
- name: Install dependencies
7575
run: |
7676
pip install -r requirements/docs-requirements.txt
@@ -108,7 +108,7 @@ jobs:
108108
- uses: actions/checkout@v4
109109
- uses: actions/setup-python@v5
110110
with:
111-
python-version: '3.12'
111+
python-version-file: 'requirements/.python-version'
112112
- run: |
113113
pip install build
114114
- name: Build

.github/workflows/release_trigger.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ jobs:
2222
ssh-key: ${{ secrets.RELEASE_TRIGGER_WORKFLOW_KEY }}
2323
- uses: actions/setup-python@v5
2424
with:
25-
python-version: '3.12'
25+
python-version-file: 'requirements/.python-version'
2626
- run: |
2727
# Determine version
2828
pip install -e .

.github/workflows/test.yaml

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,9 @@ jobs:
66
pytest:
77
runs-on: ubuntu-24.04
88
strategy:
9+
fail-fast: false
910
matrix:
10-
python-version: [ '3.9', '3.10', '3.11', '3.12' ]
11+
python-version: [ '3.9', '3.10', '3.11', '3.12' ] # , '3.13'
1112
dep-versions: [ '' ] # 'numpy1'
1213
exclude:
1314
- python-version: '3.12'
@@ -35,7 +36,7 @@ jobs:
3536
- uses: actions/checkout@v4
3637
- uses: actions/setup-python@v5
3738
with:
38-
python-version: '3.12'
39+
python-version-file: 'requirements/.python-version'
3940
- name: Install dependencies
4041
run: |
4142
pip install -r requirements/docs-requirements.txt
@@ -50,7 +51,7 @@ jobs:
5051
- uses: actions/checkout@v4
5152
- uses: actions/setup-python@v5
5253
with:
53-
python-version: '3.12'
54+
python-version-file: 'requirements/.python-version'
5455
- uses: pre-commit/[email protected]
5556
with:
5657
extra_args: --all-files --hook-stage=manual
@@ -64,7 +65,7 @@ jobs:
6465
# fetch-depth: 0
6566
# - uses: actions/setup-python@v5
6667
# with:
67-
# python-version: '3.12'
68+
# python-version-file: 'requirements/.python-version'
6869
# - run: |
6970
# # Determine version
7071
# pip install -e .

.pre-commit-config.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
repos:
22
- repo: https://github.com/psf/black
3-
rev: 24.10.0
3+
rev: 25.1.0
44
hooks:
55
- id: black
66
- id: black-jupyter
77
types: [jupyter]
88
args: [--line-length=85] # notebooks (for sphinx docs)
99

1010
- repo: https://github.com/pycqa/pylint
11-
rev: v3.3.3
11+
rev: v3.3.7
1212
hooks:
1313
- id: pylint
1414

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ A plotting library for [Xsuite](https://github.com/xsuite) and simmilar accelera
1212
## Usage
1313

1414
```bash
15-
pip install xplt[full]
15+
pip install xplt[recommended]
1616
```
1717

1818
Read the docs at https://xsuite.github.io/xplt

docs/quickstart.md

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,15 @@
44
## Installation
55

66
```bash
7-
pip install xplt[full]
7+
pip install xplt[recommended]
88
```
99

10-
It is recommended to install the library with all optional dependencies, to make use its full functionality.
11-
For a minimal installation without `[full]`, certain features like automatic unit conversion and resolving or support for pandas dataframes are disabled.
10+
The following extras are available:
11+
- `xplt[minimal]` Minimal installation, certain features like unit conversion and unit resolving are disabled
12+
- `xplt[recommended]` Recommended default
13+
- `xplt[full]` Includes optional dependencies, adds support for pandas data frames
14+
15+
Currently, `pip install xplt` defaults to `xplt[minimal]`. Once [PEP 771](https://peps.python.org/pep-0771/) is established, this will change to `xplt[recommended]` instead.
1216

1317

1418
## Gallery

pyproject.toml

Lines changed: 16 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -20,27 +20,37 @@ classifiers = [
2020
"Framework :: Matplotlib",
2121
"Programming Language :: Python :: 3",
2222
]
23+
dynamic = ["version"]
2324

2425
requires-python = ">=3.9"
2526
dependencies = [
2627
"matplotlib>=3.6",
2728
"numpy>=1.17.0",
2829
"scipy>=1.2.0",
2930
]
30-
dynamic = ["version"]
3131

32-
[project.urls]
33-
homepage = "https://github.com/eltos/xplt"
34-
documentation = "https://xsuite.github.io/xplt"
35-
repository = "https://github.com/xsuite/xplt"
32+
# PEP 771
33+
#default-optional-dependency-keys = [
34+
# "recommended",
35+
#]
3636

3737
[project.optional-dependencies]
38+
minimal= []
39+
recommended = [
40+
"pint>=0.24.1",
41+
]
3842
full = [
39-
"pandas",
4043
"pint>=0.24.1",
44+
"pandas",
4145
]
4246

4347

48+
[project.urls]
49+
homepage = "https://github.com/eltos/xplt"
50+
documentation = "https://xsuite.github.io/xplt"
51+
repository = "https://github.com/xsuite/xplt"
52+
53+
4454
# Build tools
4555

4656
[build-system]

requirements/.python-version

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
3.12

0 commit comments

Comments
 (0)