Skip to content

Commit 47b979b

Browse files
authored
Merge pull request #437 from OpenCOMPES/v1_feature_branch
Upgrade to V1
2 parents 9a35cab + cf9f594 commit 47b979b

120 files changed

Lines changed: 6484 additions & 9232 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.cspell/custom-dictionary.txt

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ caldir
3838
calib
3939
calibdict
4040
caplog
41+
capsys
4142
cdeform
4243
cdeformfield
4344
cdisp
@@ -77,6 +78,8 @@ datastreams
7778
datestring
7879
ddir
7980
delaxes
81+
delayeds
82+
delenv
8083
Desy
8184
Deutsches
8285
dfield
@@ -85,12 +88,14 @@ dfpart
8588
dfpid
8689
dictionarized
8790
dictmerge
91+
DLDAUX
8892
DOOCS
8993
dpkg
9094
dropna
9195
dset
9296
dsets
9397
dtype
98+
dtypes
9499
easimon
95100
ecalibdict
96101
electronanalyser
@@ -125,6 +130,7 @@ ftype
125130
fwhm
126131
genindex
127132
getgid
133+
getgrgid
128134
getmtime
129135
gpfs
130136
griddata
@@ -290,6 +296,7 @@ ptargs
290296
pullrequest
291297
pval
292298
pyarrow
299+
pydantic
293300
pydata
294301
pyenv
295302
pygments
@@ -330,6 +337,7 @@ scipy
330337
SDIAG
331338
sdir
332339
segs
340+
setp
333341
sfile
334342
shutil
335343
Sixten
@@ -340,6 +348,8 @@ splinewarp
340348
stackax
341349
stackaxis
342350
stepsize
351+
subchannel
352+
subchannels
343353
subdir
344354
subdirs
345355
subfolders
@@ -401,6 +411,8 @@ xpos
401411
xratio
402412
xrng
403413
xscale
414+
xticklabels
415+
xticks
404416
xtrans
405417
Xuser
406418
xval
@@ -411,6 +423,8 @@ ylabel
411423
ypos
412424
yratio
413425
yscale
426+
yticklabels
427+
yticks
414428
ytrans
415429
zain
416430
Zenodo

.github/workflows/benchmark.yml

Lines changed: 20 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,12 @@ name: benchmark
44
on:
55
workflow_dispatch:
66
push:
7-
branches: [ main, create-pull-request/patch ]
8-
paths-ignore:
9-
pyproject.toml
7+
branches: [ main]
8+
pull_request:
9+
branches: [ main ]
10+
11+
env:
12+
UV_SYSTEM_PYTHON: true
1013

1114
jobs:
1215
benchmark:
@@ -16,28 +19,32 @@ jobs:
1619
- name: Check out the repository
1720
uses: actions/checkout@v4
1821
with:
19-
lfs: true
22+
fetch-depth: 0
2023

2124
- uses: tibdex/github-app-token@v1
2225
id: generate-token
2326
with:
2427
app_id: ${{ secrets.APP_ID }}
2528
private_key: ${{ secrets.APP_PRIVATE_KEY }}
2629

27-
# Use cached python and dependencies, install poetry
28-
- name: "Setup Python, Poetry and Dependencies"
29-
uses: packetcoders/action-setup-cache-python-poetry@main
30+
# Setup python
31+
- name: Set up Python 3.10
32+
uses: actions/setup-python@v5
3033
with:
31-
python-version: 3.8
32-
poetry-version: 1.2.2
34+
python-version: "3.10"
35+
36+
- name: Install dependencies
37+
run: |
38+
curl -LsSf https://astral.sh/uv/install.sh | sh
3339
34-
- name: Install project dependencies
35-
run: poetry install
40+
- name: Install package
41+
run: |
42+
uv pip install ".[dev]"
3643
3744
# Run benchmarks
38-
- name: Run benchmarks on python 3.8
45+
- name: Run benchmarks on python 3.10
3946
run: |
40-
poetry run pytest --full-trace --show-capture=no -sv benchmarks/benchmark_*.py
47+
pytest --full-trace --show-capture=no -sv benchmarks/benchmark_*.py
4148
4249
- name: Obtain git status
4350
id: status

.github/workflows/documentation.yml

Lines changed: 34 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,14 @@ on:
55
branches: [ main ]
66
tags: [ v* ]
77
paths:
8-
- sed/**/*
8+
- src/sed/**/*
99
- tutorial/**
1010
- .github/workflows/documentation.yml
1111
# Allows you to run this workflow manually from the Actions tab
1212
workflow_dispatch:
1313

14+
env:
15+
UV_SYSTEM_PYTHON: true
1416

1517
jobs:
1618
build:
@@ -26,69 +28,50 @@ jobs:
2628
remove-android: 'true'
2729
remove-docker-images: 'true'
2830

29-
# Check out repo and set up Python
30-
- name: Check out the repository
31-
uses: actions/checkout@v4
31+
# Check out repo and set up Python
32+
- uses: actions/checkout@v4
3233
with:
33-
lfs: true
34+
fetch-depth: 0
3435

35-
# Use cached python and dependencies, install poetry
36-
- name: "Setup Python, Poetry and Dependencies"
37-
uses: packetcoders/action-setup-cache-python-poetry@main
36+
# Setup python
37+
- name: Set up Python 3.10
38+
uses: actions/setup-python@v5
3839
with:
39-
python-version: 3.9
40-
poetry-version: 1.8.3
40+
python-version: "3.10"
41+
42+
- name: Install dependencies
43+
run: |
44+
curl -LsSf https://astral.sh/uv/install.sh | sh
4145
42-
- name: Install notebook dependencies
43-
run: poetry install -E notebook --with docs
46+
- name: Install package
47+
run: |
48+
uv pip install ".[docs,notebook]"
4449
4550
- name: Install pandoc
4651
run: |
4752
sudo wget https://github.com/jgm/pandoc/releases/download/3.1.8/pandoc-3.1.8-1-amd64.deb
4853
sudo dpkg -i pandoc-3.1.8-1-amd64.deb
4954
50-
# rm because hextof_workflow notebook can not run outside maxwell
5155
- name: copy tutorial files to docs
5256
run: |
5357
cp -r $GITHUB_WORKSPACE/tutorial $GITHUB_WORKSPACE/docs/
54-
cp -r $GITHUB_WORKSPACE/sed/config $GITHUB_WORKSPACE/docs/sed
55-
58+
mkdir -p $GITHUB_WORKSPACE/docs/src/sed
59+
cp -r $GITHUB_WORKSPACE/src/sed/config $GITHUB_WORKSPACE/docs/src/sed/
5660
5761
- name: download RAW data
5862
# if: steps.cache-primes.outputs.cache-hit != 'true'
5963
run: |
6064
cd $GITHUB_WORKSPACE/docs
61-
poetry run python scripts/download_data.py
65+
python scripts/download_data.py
6266
6367
- name: build parquet files
6468
run: |
6569
cd $GITHUB_WORKSPACE/docs
66-
poetry run python scripts/build_flash_parquets.py
67-
poetry run python scripts/build_sxp_parquets.py
68-
69-
# to be removed later. This theme doesn't support <3.9 python and our lock file contains 3.8
70-
- name: install pydata-sphinx-theme
71-
run: |
72-
poetry run pip install pydata-sphinx-theme
73-
74-
- name: Change version for develop build
75-
if: startsWith(github.ref, 'refs/heads/') && github.ref != 'refs/heads/main'
76-
run: |
77-
VERSION=`sed -n 's/^version = "\(.*\)".*/\1/p' $GITHUB_WORKSPACE/pyproject.toml`
78-
MOD_VERSION=$VERSION".dev0"
79-
echo $MOD_VERSION
80-
sed -i "s/^version = \"$VERSION\"/version = \"$MOD_VERSION\"/" $GITHUB_WORKSPACE/pyproject.toml
81-
82-
- name: Change version for release build
83-
if: startsWith(github.ref, 'refs/tags/')
84-
run: |
85-
OLD_VERSION=`sed -n 's/^version = "\(.*\)".*/\1/p' $GITHUB_WORKSPACE/pyproject.toml`
86-
NEW_VERSION=`echo ${GITHUB_REF#refs/tags/} | sed -n 's/^v\(.*\)/\1/p'`
87-
echo $NEW_VERSION
88-
sed -i "s/^version = \"$OLD_VERSION\"/version = \"$NEW_VERSION\"/" $GITHUB_WORKSPACE/pyproject.toml
70+
python scripts/build_flash_parquets.py
71+
python scripts/build_sxp_parquets.py
8972
9073
- name: build Sphinx docs
91-
run: poetry run sphinx-build -b html $GITHUB_WORKSPACE/docs $GITHUB_WORKSPACE/_build
74+
run: sphinx-build -b html $GITHUB_WORKSPACE/docs $GITHUB_WORKSPACE/_build
9275

9376
- name: Upload artifact
9477
uses: actions/upload-artifact@v4
@@ -102,17 +85,12 @@ jobs:
10285
needs: build
10386
steps:
10487
- name: Checkout docs repo
105-
uses: actions/checkout@v2
88+
uses: actions/checkout@v4
10689
with:
10790
repository: ${{ github.repository_owner }}/docs
10891
token: ${{ secrets.GITHUB_TOKEN }}
10992
path: 'docs-repo'
11093

111-
- name: Set up Python 3.9
112-
uses: actions/setup-python@v4
113-
with:
114-
python-version: 3.9
115-
11694
- name: Setup SSH
11795
uses: webfactory/ssh-agent@v0.9.0
11896
with:
@@ -129,11 +107,16 @@ jobs:
129107
run: |
130108
if [[ $GITHUB_REF == refs/tags/* ]]; then
131109
VERSION=${GITHUB_REF#refs/tags/}
132-
echo "folder=sed/$VERSION" >> $GITHUB_OUTPUT
133-
rm docs-repo/sed/stable
134-
rm -rf docs-repo/sed/latest
135-
ln -s -r docs-repo/sed/$VERSION docs-repo/sed/stable
136-
ln -s -r docs-repo/sed/$VERSION docs-repo/sed/latest
110+
echo "folder=sed/$VERSION" >> $GITHUB_OUTPUT
111+
if [[ $VERSION == *a* ]]; then
112+
rm -rf docs-repo/sed/latest
113+
ln -s -r docs-repo/sed/$VERSION docs-repo/sed/latest
114+
else
115+
rm -rf docs-repo/sed/stable
116+
rm -rf docs-repo/sed/latest
117+
ln -s -r docs-repo/sed/$VERSION docs-repo/sed/stable
118+
ln -s -r docs-repo/sed/$VERSION docs-repo/sed/latest
119+
fi
137120
elif [[ $GITHUB_REF == refs/heads/main ]]; then
138121
rm -rf docs-repo/sed/latest
139122
echo "folder=sed/latest" >> $GITHUB_OUTPUT

.github/workflows/linting.yml

Lines changed: 19 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,9 @@ name: linting
33
# Triggers the workflow on push for all branches
44
on:
55
push:
6-
paths-ignore:
7-
pyproject.toml
6+
7+
env:
8+
UV_SYSTEM_PYTHON: true
89

910
jobs:
1011
lint:
@@ -13,27 +14,34 @@ jobs:
1314
# Check out repo and set up Python
1415
- uses: actions/checkout@v4
1516
with:
16-
lfs: true
17+
fetch-depth: 0
1718

18-
# Use cached python and dependencies, install poetry
19-
- name: "Setup Python, Poetry and Dependencies"
20-
uses: packetcoders/action-setup-cache-python-poetry@main
19+
# Setup python
20+
- name: Set up Python 3.10
21+
uses: actions/setup-python@v5
2122
with:
22-
python-version: 3.8
23-
poetry-version: 1.2.2
23+
python-version: "3.10"
24+
25+
- name: Install dependencies
26+
run: |
27+
curl -LsSf https://astral.sh/uv/install.sh | sh
28+
29+
- name: Install package
30+
run: |
31+
uv pip install ".[dev]"
2432
2533
# Linting steps, execute all linters even if one fails
2634
- name: ruff
2735
run:
28-
poetry run ruff sed tests
36+
ruff src/sed tests
2937
- name: ruff formatting
3038
if: ${{ always() }}
3139
run:
32-
poetry run ruff format --check sed tests
40+
ruff format --check src/sed tests
3341
- name: mypy
3442
if: ${{ always() }}
3543
run:
36-
poetry run mypy sed tests
44+
mypy src/sed tests
3745
- name: spellcheck
3846
if: ${{ always() }}
3947
uses: streetsidesoftware/cspell-action@v6

0 commit comments

Comments
 (0)