Skip to content

Commit ac18ec1

Browse files
committed
merge master
2 parents e562652 + f4b943e commit ac18ec1

File tree

168 files changed

+43934
-2357
lines changed

Some content is hidden

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

168 files changed

+43934
-2357
lines changed

.coveragerc

+6-3
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,12 @@
11
[run]
22
parallel = true
33
source = simsopt
4+
relative_files = true
45

56
[paths]
67
sources =
7-
/opt/hostedtoolcache/Python/3.8.17/x64/lib/python3.8/site-packages
8-
/opt/hostedtoolcache/Python/3.9.17/x64/lib/python3.9/site-packages
9-
/opt/hostedtoolcache/Python/3.10.12/x64/lib/python3.10/site-packages
8+
src/
9+
/**/lib/python3.8/site-packages
10+
/**/lib/python3.9/site-packages
11+
/**/lib/python3.10/site-packages
12+
/**/lib/python3.11/site-packages

.github/workflows/conda.yml

+5-5
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@ jobs:
1515
strategy:
1616
fail-fast: false
1717
matrix:
18-
platform: [ubuntu-latest, macos-11]
19-
python-version: ["3.8"]
18+
platform: [ubuntu-latest, macos-12]
19+
python-version: ["3.9"]
2020

2121
runs-on: ${{ matrix.platform }}
2222

@@ -26,22 +26,22 @@ jobs:
2626
shell: "bash -l {0}"
2727

2828
steps:
29-
- uses: actions/checkout@v3
29+
- uses: actions/checkout@v4
3030
with:
3131
submodules: true
3232

3333
- name: Fetch all history for setuptools_scm to work
3434
run: git fetch --prune --unshallow
3535

3636
- name: Get conda
37-
uses: conda-incubator/setup-miniconda@v2
37+
uses: conda-incubator/setup-miniconda@v3
3838
with:
3939
python-version: ${{ matrix.python-version }}
4040
channels: conda-forge
4141
channel-priority: strict
4242

4343
- name: Prepare
44-
run: conda install -y conda-build conda-verify setuptools_scm anaconda-client
44+
run: conda install -y conda-build conda-verify setuptools_scm anaconda-client scikit-build-core
4545

4646
- name: Build and upload
4747
if: github.event_name == 'release' && github.event.action == 'published'

.github/workflows/docker.yml

+3-3
Original file line numberDiff line numberDiff line change
@@ -17,16 +17,16 @@ jobs:
1717
runs-on: ubuntu-latest
1818
steps:
1919
- name: Checkout
20-
uses: actions/checkout@v3
20+
uses: actions/checkout@v4
2121

2222
- name: Fetch all history for all tags and branches
2323
run: git fetch --prune --unshallow
2424

2525
- name: Setup docker Buildx
26-
uses: docker/setup-buildx-action@v2
26+
uses: docker/setup-buildx-action@v3
2727

2828
- name: Login to DockerHub
29-
uses: docker/login-action@v2
29+
uses: docker/login-action@v3
3030
with:
3131
username: medbha
3232
password: ${{ secrets.DOCKER_TOKEN }}

.github/workflows/docs_test.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,10 @@ jobs:
1212
python-version: [3.9]
1313

1414
steps:
15-
- uses: actions/checkout@v3
15+
- uses: actions/checkout@v4
1616

1717
- name: Set up Python ${{ matrix.python-version }}
18-
uses: actions/setup-python@v4
18+
uses: actions/setup-python@v5
1919
with:
2020
python-version: ${{ matrix.python-version }}
2121

.github/workflows/extensive_ci.yml .github/workflows/extensive_test.yml

+17-13
Original file line numberDiff line numberDiff line change
@@ -29,12 +29,12 @@ jobs:
2929
matrix:
3030
test-type: [unit, integrated]
3131
packages: [all, vmec, spec, none]
32-
python-version: [3.8.17, 3.9.17, 3.10.12] # To sync with coveragerc use 3 levels with python version
32+
python-version: [3.8, 3.9, "3.10"]
3333
include:
34-
- python-version: 3.9.17
34+
- python-version: 3.9
3535
test-type: unit
3636
packages: none
37-
- python-version: 3.9.17
37+
- python-version: 3.9
3838
test-type: integrated
3939
packages: none
4040

@@ -63,12 +63,12 @@ jobs:
6363
sudo apt-get update
6464
sudo apt-get install -y build-essential gfortran openmpi-bin libopenmpi-dev libnetcdf-dev libnetcdff-dev liblapack-dev libscalapack-mpi-dev libhdf5-dev libhdf5-serial-dev git m4 libfftw3-dev libopenblas-dev libboost-all-dev
6565
66-
- uses: actions/checkout@v3
66+
- uses: actions/checkout@v4
6767
# If we want submodules downloaded, uncomment the next 2 lines:
6868
#with:
6969
# submodules: true
7070

71-
# We must run actions/checkout@v3 before downloading and building VMEC, since checkout deletes the contents of the directory.
71+
# We must run actions/checkout before downloading and building VMEC, since checkout deletes the contents of the directory.
7272
- name: Download the VMEC2000 standalone repository
7373
if: contains(matrix.packages, 'vmec') || contains(matrix.packages, 'all')
7474
run: git clone https://github.com/hiddensymmetries/VMEC2000.git
@@ -80,7 +80,7 @@ jobs:
8080
pwd
8181
8282
- name: Set up Python ${{ matrix.python-version }}
83-
uses: actions/setup-python@v4
83+
uses: actions/setup-python@v5
8484
with:
8585
python-version: ${{ matrix.python-version }}
8686

@@ -98,7 +98,7 @@ jobs:
9898
- name: Install python dependencies
9999
run: |
100100
sudo apt-get install graphviz graphviz-dev
101-
pip install wheel numpy scipy f90nml h5py scikit-build cmake qsc sympy pyevtk matplotlib ninja plotly networkx pygraphviz
101+
pip install wheel "numpy<2.0.0" scipy f90nml h5py scikit-build cmake qsc sympy pyevtk matplotlib ninja plotly networkx pygraphviz ground bentley_ottmann
102102
103103
- name: Install booz_xform
104104
if: contains(matrix.packages, 'vmec') || contains(matrix.packages, 'all')
@@ -112,7 +112,7 @@ jobs:
112112
# https://docs.github.com/en/free-pro-team@latest/github/authenticating-to-github/creating-a-personal-access-token
113113
- name: Check out SPEC
114114
if: contains(matrix.packages, 'spec') || contains(matrix.packages, 'all')
115-
uses: actions/checkout@v3
115+
uses: actions/checkout@v4
116116
with:
117117
repository: PrincetonUniversity/SPEC
118118
path: SPEC
@@ -165,15 +165,19 @@ jobs:
165165

166166
- name: Install simsopt package
167167
if: contains(matrix.packages, 'spec') || contains(matrix.packages, 'all')
168-
run: pip install -v .[MPI,SPEC]
168+
run: |
169+
pip install -v .
170+
pip install mpi4py py_spec pyoculus h5py
169171
170172
- name: Install simsopt package
171173
if: contains(matrix.packages, 'none')
172174
run: pip install -v .
173175

174176
- name: Install simsopt package
175177
if: contains(matrix.packages, 'vmec')
176-
run: pip install -v .[MPI]
178+
run: |
179+
pip install -v .
180+
pip install mpi4py
177181
178182
- name: Run serial examples as part of integrated tests
179183
if: contains(matrix.test-type, 'integrated') && (contains(matrix.packages, 'none') || contains(matrix.packages, 'all'))
@@ -245,15 +249,15 @@ jobs:
245249
steps:
246250

247251
- name: Set up Python
248-
uses: actions/setup-python@v4
252+
uses: actions/setup-python@v5
249253
with:
250-
python-version: 3.8.17
254+
python-version: 3.9
251255

252256
- name: Install coverage
253257
run: pip install coverage
254258

255259
- name: Checkout simsopt
256-
uses: actions/checkout@v3
260+
uses: actions/checkout@v4
257261

258262
- name: Install simsopt before running coverage
259263
run: pip install .

.github/workflows/linting.yml

+5-12
Original file line numberDiff line numberDiff line change
@@ -9,23 +9,16 @@ jobs:
99
strategy:
1010
fail-fast: false
1111
matrix:
12-
python-version: [3.8]
12+
python-version: [3.9]
1313

1414
steps:
15-
- uses: actions/checkout@v3
15+
- uses: actions/checkout@v4
1616

1717
- name: Set up Python ${{ matrix.python-version }}
18-
uses: actions/setup-python@v4
18+
uses: actions/setup-python@v5
1919
with:
2020
python-version: ${{ matrix.python-version }}
2121

22-
- name: Install python dependencies
23-
run: |
24-
pip install flake8
22+
- name: Run ruff
23+
uses: chartboost/ruff-action@v1
2524

26-
- name: Run linting tests
27-
run: |
28-
export EXCLUDE="E226,E265,E266,E4,E5,E7,W,F"
29-
flake8 --ignore $EXCLUDE src/
30-
flake8 --ignore $EXCLUDE tests/
31-
flake8 --ignore $EXCLUDE examples/

.github/workflows/non_simd_tests.yml

+4-4
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ jobs:
2727
strategy:
2828
fail-fast: false
2929
matrix:
30-
python-version: [3.8.15] # To sync with coveragerc use 3 level
30+
python-version: [3.9]
3131

3232
steps:
3333
# First print out lots of information. We do this in separate
@@ -54,7 +54,7 @@ jobs:
5454
sudo apt-get update
5555
sudo apt-get install -y build-essential gfortran openmpi-bin libopenmpi-dev libnetcdf-dev libnetcdff-dev liblapack-dev libscalapack-mpi-dev libhdf5-dev libhdf5-serial-dev git m4 libfftw3-dev libboost-all-dev libopenblas-dev
5656
57-
- uses: actions/checkout@v3
57+
- uses: actions/checkout@v4
5858

5959
- name: Fetch all history for all tags
6060
run: git fetch --all --tags --prune --unshallow
@@ -66,7 +66,7 @@ jobs:
6666
pwd
6767
6868
- name: Set up Python ${{ matrix.python-version }}
69-
uses: actions/setup-python@v4
69+
uses: actions/setup-python@v5
7070
with:
7171
python-version: ${{ matrix.python-version }}
7272

@@ -84,7 +84,7 @@ jobs:
8484
- name: Install python dependencies
8585
run: |
8686
sudo apt-get install graphviz graphviz-dev
87-
pip install wheel numpy scipy f90nml h5py scikit-build cmake qsc sympy pyevtk matplotlib ninja plotly networkx pygraphviz
87+
pip install wheel "numpy<2.0.0" scipy f90nml h5py scikit-build cmake qsc sympy pyevtk matplotlib ninja plotly networkx pygraphviz ground bentley_ottmann
8888
8989
- name: Install booz_xform
9090
run: pip install -v git+https://github.com/hiddenSymmetries/booz_xform

.github/workflows/singularity.yml

+2-1
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ on:
1212

1313
# Do the builds on all pull requests (to test them)
1414
pull_request: []
15+
workflow_dispatch:
1516

1617
jobs:
1718
build-containers:
@@ -26,7 +27,7 @@ jobs:
2627
steps:
2728

2829
- name: Check out code for the container build
29-
uses: actions/checkout@v3
30+
uses: actions/checkout@v4
3031
- uses: eWaterCycle/setup-singularity@v7
3132
with:
3233
singularity-version: 3.8.3

.github/workflows/ci.yml .github/workflows/tests.yml

+15-11
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
# This appears to be a known harmless annoyance:
77
# https://gitlab.alpinelinux.org/alpine/aports/-/issues/11122
88

9-
name: Simple CI
9+
name: Tests
1010

1111
on:
1212
push:
@@ -26,7 +26,7 @@ jobs:
2626
strategy:
2727
fail-fast: false
2828
matrix:
29-
python-version: [3.8.17] # To sync with coveragerc use 3 level
29+
python-version: [3.9]
3030
test-type: [unit, integrated]
3131

3232
steps:
@@ -49,17 +49,22 @@ jobs:
4949
set -ex
5050
ls -l
5151
52+
- name: Print python location
53+
run: |
54+
set -ex
55+
which python
56+
5257
- name: apt-get stuff needed for libstell and vmec
5358
run: |
5459
sudo apt-get update
5560
sudo apt-get install -y build-essential gfortran openmpi-bin libopenmpi-dev libnetcdf-dev libnetcdff-dev liblapack-dev libscalapack-mpi-dev libhdf5-dev libhdf5-serial-dev git m4 libfftw3-dev libboost-all-dev libopenblas-dev
5661
57-
- uses: actions/checkout@v3
62+
- uses: actions/checkout@v4
5863

5964
- name: Fetch all history for all tags
6065
run: git fetch --all --tags --prune --unshallow
6166

62-
# We must run actions/checkout@v3 before downloading and building VMEC, since checkout deletes the contents of the directory.
67+
# We must run actions/checkout before downloading and building VMEC, since checkout deletes the contents of the directory.
6368
- name: Download the VMEC2000 standalone repository
6469
run: git clone --depth=1 https://github.com/hiddensymmetries/VMEC2000.git
6570

@@ -70,7 +75,7 @@ jobs:
7075
pwd
7176
7277
- name: Set up Python ${{ matrix.python-version }}
73-
uses: actions/setup-python@v4
78+
uses: actions/setup-python@v5
7479
with:
7580
python-version: ${{ matrix.python-version }}
7681

@@ -88,7 +93,7 @@ jobs:
8893
- name: Install python dependencies
8994
run: |
9095
sudo apt-get install graphviz graphviz-dev
91-
pip install wheel numpy scipy f90nml h5py scikit-build cmake qsc sympy pyevtk matplotlib ninja plotly networkx pygraphviz
96+
pip install "numpy<2.0.0" cmake scikit-build f90nml ninja wheel setuptools sympy qsc pyevtk matplotlib plotly networkx pygraphviz mpi4py py_spec pyoculus h5py ground bentley_ottmann
9297
9398
- name: Install booz_xform
9499
run: pip install -v git+https://github.com/hiddenSymmetries/booz_xform
@@ -100,7 +105,7 @@ jobs:
100105
# https://stackoverflow.com/questions/57612428/cloning-private-github-repository-within-organisation-in-actions
101106
# https://docs.github.com/en/free-pro-team@latest/github/authenticating-to-github/creating-a-personal-access-token
102107
- name: Check out SPEC
103-
uses: actions/checkout@v3
108+
uses: actions/checkout@v4
104109
with:
105110
repository: PrincetonUniversity/SPEC
106111
path: SPEC
@@ -130,8 +135,6 @@ jobs:
130135
run: |
131136
cd SPEC
132137
pip install .
133-
# python setup.py bdist_wheel
134-
# pip install dist/*.whl
135138
136139
- name: Try import spec
137140
run: python -c "import spec.spec_f90wrapped as spec; print(spec.constants.version)"
@@ -159,7 +162,8 @@ jobs:
159162
run: python -c "print(dir()); import vmec; print(dir()); print(dir(vmec)); print('package:', vmec.__package__); print('spec:', vmec.__spec__); print('doc:', vmec.__doc__); print('file:', vmec.__file__); print('path:', vmec.__path__)"
160163

161164
- name: Install simsopt package
162-
run: env CMAKE_BUILD_TYPE=Debug pip install -v .[MPI,SPEC]
165+
# run: env CMAKE_BUILD_TYPE=Debug pip install -v .[MPI,SPEC]
166+
run: pip install -v ".[MPI,SPEC,VIS]"
163167

164168
- name: Verify that importing simsopt does not automatically initialize MPI
165169
run: ./tests/verify_MPI_not_initialized.py
@@ -214,7 +218,7 @@ jobs:
214218
- name: Upload coverage to Codecov
215219
# The last conditional on the next line prevents github from trying to upload to Codecov on forks of the repository, avoiding a permissions error
216220
if: contains(matrix.test-type, 'unit') && github.repository_owner == 'hiddenSymmetries'
217-
uses: codecov/codecov-action@v3
221+
uses: codecov/codecov-action@v4
218222
with:
219223
token: ${{ secrets.CODECOV_TOKEN }}
220224
file: ./coverage.xml

.github/workflows/wheel.yml

+5-5
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,10 @@ jobs:
88
runs-on: ${{ matrix.os }}
99
strategy:
1010
matrix:
11-
os: [macos-11, ubuntu-20.04]
11+
os: [macos-12, ubuntu-20.04]
1212

1313
steps:
14-
- uses: actions/checkout@v3
14+
- uses: actions/checkout@v4
1515

1616
- name: Fetch all history for all tags
1717
run: git fetch --prune --unshallow
@@ -37,15 +37,15 @@ jobs:
3737
runs-on: ubuntu-latest
3838

3939
steps:
40-
- uses: actions/checkout@v3
40+
- uses: actions/checkout@v4
4141

4242
- name: Fetch all history for all tags
4343
run: git fetch --prune --unshallow
4444

45-
- uses: actions/setup-python@v4
45+
- uses: actions/setup-python@v5
4646
name: Install Python
4747
with:
48-
python-version: '3.8'
48+
python-version: '3.9'
4949

5050
- name: Download all submodules
5151
run: git submodule update --init

0 commit comments

Comments
 (0)