mapflpy 1.1.1__tar.gz → 1.1.2__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (97) hide show
  1. mapflpy-1.1.2/.github/workflows/docs.yml +94 -0
  2. mapflpy-1.1.2/.github/workflows/publish.yml +199 -0
  3. mapflpy-1.1.2/.python-version +1 -0
  4. mapflpy-1.1.2/PKG-INFO +85 -0
  5. mapflpy-1.1.2/README.rst +22 -0
  6. {mapflpy-1.1.1 → mapflpy-1.1.2}/docs/source/conf.py +11 -17
  7. mapflpy-1.1.2/docs/source/guide/installation.rst +28 -0
  8. mapflpy-1.1.2/environment.yml +53 -0
  9. {mapflpy-1.1.1 → mapflpy-1.1.2}/mapflpy/__init__.py +16 -4
  10. {mapflpy-1.1.1 → mapflpy-1.1.2}/mapflpy/utils.py +2 -3
  11. {mapflpy-1.1.1 → mapflpy-1.1.2}/meson.build +18 -7
  12. {mapflpy-1.1.1 → mapflpy-1.1.2}/noxfile.py +82 -31
  13. {mapflpy-1.1.1 → mapflpy-1.1.2}/pyproject.toml +20 -7
  14. {mapflpy-1.1.1 → mapflpy-1.1.2}/tests/test_module.py +6 -5
  15. mapflpy-1.1.2/tools/make_build.py +132 -0
  16. mapflpy-1.1.2/tools/make_docs.py +60 -0
  17. mapflpy-1.1.2/tools/make_intersphinx.py +91 -0
  18. mapflpy-1.1.2/tools/pyproject_version.py +33 -0
  19. mapflpy-1.1.2/tools/python_version.py +21 -0
  20. mapflpy-1.1.2/tools/python_versions.py +85 -0
  21. mapflpy-1.1.1/.github/workflows/wheels.yml +0 -72
  22. mapflpy-1.1.1/PKG-INFO +0 -462
  23. mapflpy-1.1.1/README.md +0 -412
  24. mapflpy-1.1.1/docs/fetch.sh +0 -15
  25. mapflpy-1.1.1/docs/source/guide/installation.rst +0 -69
  26. mapflpy-1.1.1/environment.yml +0 -50
  27. mapflpy-1.1.1/tools/makedist.sh +0 -30
  28. mapflpy-1.1.1/tools/makedocs.sh +0 -27
  29. {mapflpy-1.1.1 → mapflpy-1.1.2}/.f2py_f2cmap +0 -0
  30. {mapflpy-1.1.1 → mapflpy-1.1.2}/.gitattributes +0 -0
  31. {mapflpy-1.1.1 → mapflpy-1.1.2}/.gitignore +0 -0
  32. {mapflpy-1.1.1 → mapflpy-1.1.2}/LICENSE.txt +0 -0
  33. {mapflpy-1.1.1 → mapflpy-1.1.2}/docs/Makefile +0 -0
  34. {mapflpy-1.1.1 → mapflpy-1.1.2}/docs/make.bat +0 -0
  35. {mapflpy-1.1.1 → mapflpy-1.1.2}/docs/source/_static/.gitkeep +0 -0
  36. {mapflpy-1.1.1 → mapflpy-1.1.2}/docs/source/_static/assets/.gitkeep +0 -0
  37. {mapflpy-1.1.1 → mapflpy-1.1.2}/docs/source/_templates/autosummary/attribute.rst +0 -0
  38. {mapflpy-1.1.1 → mapflpy-1.1.2}/docs/source/_templates/autosummary/class.rst +0 -0
  39. {mapflpy-1.1.1 → mapflpy-1.1.2}/docs/source/_templates/autosummary/class_method.rst +0 -0
  40. {mapflpy-1.1.1 → mapflpy-1.1.2}/docs/source/_templates/autosummary/data.rst +0 -0
  41. {mapflpy-1.1.1 → mapflpy-1.1.2}/docs/source/_templates/autosummary/exception.rst +0 -0
  42. {mapflpy-1.1.1 → mapflpy-1.1.2}/docs/source/_templates/autosummary/function.rst +0 -0
  43. {mapflpy-1.1.1 → mapflpy-1.1.2}/docs/source/_templates/autosummary/method.rst +0 -0
  44. {mapflpy-1.1.1 → mapflpy-1.1.2}/docs/source/_templates/autosummary/module.rst +0 -0
  45. {mapflpy-1.1.1 → mapflpy-1.1.2}/docs/source/_templates/autosummary/package.rst +0 -0
  46. {mapflpy-1.1.1 → mapflpy-1.1.2}/docs/source/_templates/autosummary/property.rst +0 -0
  47. {mapflpy-1.1.1 → mapflpy-1.1.2}/docs/source/_templates/autosummary/static_method.rst +0 -0
  48. {mapflpy-1.1.1 → mapflpy-1.1.2}/docs/source/api/index.rst +0 -0
  49. {mapflpy-1.1.1 → mapflpy-1.1.2}/docs/source/guide/development.rst +0 -0
  50. {mapflpy-1.1.1 → mapflpy-1.1.2}/docs/source/guide/index.rst +0 -0
  51. {mapflpy-1.1.1 → mapflpy-1.1.2}/docs/source/guide/overview.rst +0 -0
  52. {mapflpy-1.1.1 → mapflpy-1.1.2}/docs/source/index.rst +0 -0
  53. {mapflpy-1.1.1 → mapflpy-1.1.2}/examples/01_getting_started/GALLERY_HEADER.rst +0 -0
  54. {mapflpy-1.1.1 → mapflpy-1.1.2}/examples/01_getting_started/p01_tracing_forward.py +0 -0
  55. {mapflpy-1.1.1 → mapflpy-1.1.2}/examples/01_getting_started/p02_tracing_backward.py +0 -0
  56. {mapflpy-1.1.1 → mapflpy-1.1.2}/examples/01_getting_started/p03_tracing_forward_backward.py +0 -0
  57. {mapflpy-1.1.1 → mapflpy-1.1.2}/examples/01_getting_started/p04_adding_a_magnetogram.py +0 -0
  58. {mapflpy-1.1.1 → mapflpy-1.1.2}/examples/02_using_tracer_class/GALLERY_HEADER.rst +0 -0
  59. {mapflpy-1.1.1 → mapflpy-1.1.2}/examples/02_using_tracer_class/p01_using_defaults.py +0 -0
  60. {mapflpy-1.1.1 → mapflpy-1.1.2}/examples/02_using_tracer_class/p02_setting_tracing_direction.py +0 -0
  61. {mapflpy-1.1.1 → mapflpy-1.1.2}/examples/02_using_tracer_class/p03_adjusting_mapfl_params.py +0 -0
  62. {mapflpy-1.1.1 → mapflpy-1.1.2}/examples/02_using_tracer_class/p04_manipulating_field_data.py +0 -0
  63. {mapflpy-1.1.1 → mapflpy-1.1.2}/examples/03_using_tracermp_class/GALLERY_HEADER.rst +0 -0
  64. {mapflpy-1.1.1 → mapflpy-1.1.2}/examples/03_using_tracermp_class/p01_using_defaults.py +0 -0
  65. {mapflpy-1.1.1 → mapflpy-1.1.2}/examples/03_using_tracermp_class/p02_creating_multiple_tracermp.py +0 -0
  66. {mapflpy-1.1.1 → mapflpy-1.1.2}/examples/03_using_tracermp_class/p03_magnetic_field.py +0 -0
  67. {mapflpy-1.1.1 → mapflpy-1.1.2}/examples/04_advanced_examples/GALLERY_HEADER.rst +0 -0
  68. {mapflpy-1.1.1 → mapflpy-1.1.2}/examples/04_advanced_examples/p01_interdomain_tracing.py +0 -0
  69. {mapflpy-1.1.1 → mapflpy-1.1.2}/examples/04_advanced_examples/p02_coloring_by_polarity.py +0 -0
  70. {mapflpy-1.1.1 → mapflpy-1.1.2}/examples/04_advanced_examples/p03_filtering_fieldlines.py +0 -0
  71. {mapflpy-1.1.1 → mapflpy-1.1.2}/examples/GALLERY_HEADER.rst +0 -0
  72. {mapflpy-1.1.1 → mapflpy-1.1.2}/mapflpy/_version.py.in +0 -0
  73. {mapflpy-1.1.1 → mapflpy-1.1.2}/mapflpy/data.py +0 -0
  74. {mapflpy-1.1.1 → mapflpy-1.1.2}/mapflpy/fortran/__init__.py +0 -0
  75. {mapflpy-1.1.1 → mapflpy-1.1.2}/mapflpy/globals.py +0 -0
  76. {mapflpy-1.1.1 → mapflpy-1.1.2}/mapflpy/py.typed +0 -0
  77. {mapflpy-1.1.1 → mapflpy-1.1.2}/mapflpy/scripts.py +0 -0
  78. {mapflpy-1.1.1 → mapflpy-1.1.2}/mapflpy/tracer.py +0 -0
  79. {mapflpy-1.1.1 → mapflpy-1.1.2}/src/f2py_f2cmap_mapflpy +0 -0
  80. {mapflpy-1.1.1 → mapflpy-1.1.2}/src/mapfl/mapfl.f +0 -0
  81. {mapflpy-1.1.1 → mapflpy-1.1.2}/src/mapfl/psi_io.f90 +0 -0
  82. {mapflpy-1.1.1 → mapflpy-1.1.2}/src/mapflpy_fortran.f90 +0 -0
  83. {mapflpy-1.1.1 → mapflpy-1.1.2}/tests/__init__.py +0 -0
  84. {mapflpy-1.1.1 → mapflpy-1.1.2}/tests/conftest.py +0 -0
  85. {mapflpy-1.1.1 → mapflpy-1.1.2}/tests/data/defaults.json +0 -0
  86. {mapflpy-1.1.1 → mapflpy-1.1.2}/tests/data/reference_traces.npz +0 -0
  87. {mapflpy-1.1.1 → mapflpy-1.1.2}/tests/test_tracer/__init__.py +0 -0
  88. {mapflpy-1.1.1 → mapflpy-1.1.2}/tests/test_tracer/test_class_primitives.py +0 -0
  89. {mapflpy-1.1.1 → mapflpy-1.1.2}/tests/test_tracer/test_fortran_calls.py +0 -0
  90. {mapflpy-1.1.1 → mapflpy-1.1.2}/tests/test_tracer/test_param_editing.py +0 -0
  91. {mapflpy-1.1.1 → mapflpy-1.1.2}/tests/test_tracer/test_trace_routines.py +0 -0
  92. {mapflpy-1.1.1 → mapflpy-1.1.2}/tests/test_tracermp/__init__.py +0 -0
  93. {mapflpy-1.1.1 → mapflpy-1.1.2}/tests/test_tracermp/test_class_primitives_.py +0 -0
  94. {mapflpy-1.1.1 → mapflpy-1.1.2}/tests/test_tracermp/test_fortran_calls_.py +0 -0
  95. {mapflpy-1.1.1 → mapflpy-1.1.2}/tests/test_tracermp/test_param_editing_.py +0 -0
  96. {mapflpy-1.1.1 → mapflpy-1.1.2}/tests/test_tracermp/test_trace_routines_.py +0 -0
  97. {mapflpy-1.1.1 → mapflpy-1.1.2}/tests/utils.py +0 -0
@@ -0,0 +1,94 @@
1
+ name: Publish Docs
2
+
3
+ on:
4
+ workflow_dispatch:
5
+ pull_request:
6
+ push:
7
+ branches:
8
+ - master
9
+ tags:
10
+ - '*'
11
+
12
+ permissions:
13
+ contents: read
14
+
15
+ jobs:
16
+ build_docs:
17
+ name: Build docs
18
+ runs-on: ubuntu-latest
19
+
20
+ steps:
21
+ # - uses: mamba-org/setup-micromamba@v2
22
+ # with:
23
+ # init-shell: bash
24
+ # cache-downloads: true
25
+ #
26
+ # - name: Checkout mapflpy
27
+ # uses: actions/checkout@v4
28
+ #
29
+ # - name: Setup Python
30
+ # uses: actions/setup-python@v5
31
+ # with:
32
+ # python-version: 3.13
33
+ #
34
+ # - name: Install build dependencies
35
+ # run: |
36
+ # python -m pip install --upgrade pip
37
+ # pip install nox[pbs]
38
+ #
39
+ # - name: Set nox conda backend
40
+ # run: echo "CONDA_EXE=micromamba" >> "$GITHUB_ENV"
41
+ #
42
+ # - name: Build docs
43
+ # run: |
44
+ # nox -s build_docs
45
+ #
46
+ # - name: Upload docs artifact
47
+ # if: always()
48
+ # uses: actions/upload-artifact@v4
49
+ # with:
50
+ # name: docs
51
+ # path: .nox/_artifacts/docs/html*/
52
+ # retention-days: 7
53
+
54
+ - name: Checkout repo
55
+ uses: actions/checkout@v4
56
+
57
+ - name: Create dummy docs
58
+ run: |
59
+ mkdir -p .nox/_artifacts/docs/html-test
60
+ date > .nox/_artifacts/docs/html-test/build-info.txt
61
+ echo '<html><body><h1>RSYNC TEST OK</h1></body></html>' \
62
+ > .nox/_artifacts/docs/html-test/index.html
63
+ ls -alR .nox/_artifacts/docs
64
+
65
+ - name: Upload dummy docs artifact
66
+ uses: actions/upload-artifact@v4
67
+ with:
68
+ name: dummy-docs
69
+ path: .nox/_artifacts/docs/html-test/
70
+ retention-days: 7
71
+
72
+ - name: Prepare SSH
73
+ env:
74
+ SSH_HOST: ${{ secrets.DOCS_SSH_HOST }}
75
+ SSH_PORT: ${{ secrets.DOCS_SSH_PORT }}
76
+ run: |
77
+ install -m 700 -d ~/.ssh
78
+ install -m 600 /dev/null ~/.ssh/id_rsync
79
+ printf '%s\n' "${{ secrets.DOCS_SSH_KEY }}" > ~/.ssh/id_rsync
80
+ ssh-keyscan -p "${SSH_PORT:-22}" "${SSH_HOST}" >> ~/.ssh/known_hosts
81
+
82
+ - name: Rsync to server
83
+ env:
84
+ SSH_HOST: ${{ secrets.DOCS_SSH_HOST }}
85
+ SSH_USER: ${{ secrets.DOCS_SSH_USER }}
86
+ SSH_PORT: ${{ secrets.DOCS_SSH_PORT }}
87
+ REMOTE_DIR: ${{ secrets.DOCS_SSH_PATH }}
88
+ run: |
89
+ # ensure target dir exists
90
+ ssh -i ~/.ssh/id_rsync -p "${SSH_PORT:-22}" -o StrictHostKeyChecking=yes \
91
+ "${SSH_USER}@${SSH_HOST}" "mkdir -p '${REMOTE_DIR}'"
92
+ rsync -az \
93
+ -e "ssh -i ~/.ssh/id_rsync -p ${SSH_PORT:-22} -o StrictHostKeyChecking=yes" \
94
+ .nox/_artifacts/docs/html*/ "${SSH_USER}@${SSH_HOST}:${REMOTE_DIR}/"
@@ -0,0 +1,199 @@
1
+ name: Publish Build
2
+
3
+ on:
4
+ workflow_dispatch:
5
+ pull_request:
6
+ push:
7
+ branches:
8
+ - master
9
+ tags:
10
+ - '*'
11
+
12
+ permissions:
13
+ actions: read
14
+
15
+ jobs:
16
+ build_sdist:
17
+ name: Build sdist
18
+ runs-on: ubuntu-latest
19
+ steps:
20
+ - uses: mamba-org/setup-micromamba@v2
21
+ with:
22
+ init-shell: bash
23
+ cache-downloads: true
24
+
25
+ - name: Checkout repository
26
+ uses: actions/checkout@v4
27
+
28
+ - name: Setup python
29
+ uses: actions/setup-python@v5
30
+ with:
31
+ python-version-file: .python-version
32
+
33
+ - name: Install nox
34
+ run: |
35
+ python -m pip install --upgrade pip
36
+ pip install nox[pbs]
37
+
38
+ - name: Set nox conda backend
39
+ run: echo "CONDA_EXE=micromamba" >> "$GITHUB_ENV"
40
+
41
+ - name: Build sdist
42
+ run: |
43
+ nox -s sdist
44
+
45
+ - name: Upload sdist artifact
46
+ if: always()
47
+ uses: actions/upload-artifact@v4
48
+ with:
49
+ name: sdist
50
+ path: .nox/_artifacts/sdist/*.tar.gz
51
+ retention-days: 7
52
+
53
+
54
+ build_wheels:
55
+ name: Build wheels (${{ matrix.os }})
56
+ runs-on: ${{ matrix.os }}
57
+ needs:
58
+ - build_sdist
59
+ strategy:
60
+ fail-fast: false
61
+ matrix:
62
+ os:
63
+ - ubuntu-24.04
64
+ - ubuntu-22.04-arm
65
+ - macos-15-intel
66
+ - macos-15
67
+ steps:
68
+ - uses: mamba-org/setup-micromamba@v2
69
+ with:
70
+ init-shell: bash
71
+ cache-downloads: true
72
+
73
+ - name: Checkout mapflpy
74
+ uses: actions/checkout@v4
75
+
76
+ - name: Setup Python
77
+ uses: actions/setup-python@v5
78
+ with:
79
+ python-version-file: .python-version
80
+
81
+ - name: Install build dependencies
82
+ run: |
83
+ python -m pip install --upgrade pip
84
+ pip install nox[pbs]
85
+
86
+ - name: Set nox conda backend
87
+ run: echo "CONDA_EXE=micromamba" >> "$GITHUB_ENV"
88
+
89
+ - name: macOS SDK + nox conda backend
90
+ if: startsWith(matrix.os, 'macos-')
91
+ run: |
92
+ echo "MACOSX_DEPLOYMENT_TARGET=11.0" >> "$GITHUB_ENV"
93
+ echo "SDKROOT=$(xcrun --sdk macosx --show-sdk-path)" >> "$GITHUB_ENV"
94
+ echo "CFLAGS=-isysroot $SDKROOT -mmacosx-version-min=$MACOSX_DEPLOYMENT_TARGET" >> "$GITHUB_ENV"
95
+ echo "CXXFLAGS=-isysroot $SDKROOT -mmacosx-version-min=$MACOSX_DEPLOYMENT_TARGET" >> "$GITHUB_ENV"
96
+ echo "FCFLAGS=-isysroot $SDKROOT -mmacosx-version-min=$MACOSX_DEPLOYMENT_TARGET" >> "$GITHUB_ENV"
97
+ echo "LDFLAGS=-Wl,-syslibroot,$SDKROOT -mmacosx-version-min=$MACOSX_DEPLOYMENT_TARGET" >> "$GITHUB_ENV"
98
+
99
+ - name: Build wheels
100
+ run: |
101
+ nox -s build
102
+
103
+ - name: Repair wheels
104
+ run: |
105
+ nox -s repair
106
+
107
+ - name: Upload wheel artifacts
108
+ if: always()
109
+ uses: actions/upload-artifact@v4
110
+ with:
111
+ name: wheels-${{ matrix.os }}
112
+ path: .nox/_artifacts/wheelhouse/*.whl
113
+ retention-days: 7
114
+
115
+
116
+ test_builds:
117
+ name: Test wheels for ${{ matrix.os }}
118
+ runs-on: ${{ matrix.os }}
119
+ needs:
120
+ - build_wheels
121
+ strategy:
122
+ fail-fast: false
123
+ matrix:
124
+ os:
125
+ - ubuntu-24.04
126
+ - ubuntu-22.04-arm
127
+ - macos-15-intel
128
+ - macos-15
129
+ steps:
130
+ - uses: mamba-org/setup-micromamba@v2
131
+ with:
132
+ init-shell: bash
133
+ cache-downloads: true
134
+
135
+ - name: Checkout mapflpy
136
+ uses: actions/checkout@v4
137
+
138
+ - name: Setup Python
139
+ uses: actions/setup-python@v5
140
+ with:
141
+ python-version-file: .python-version
142
+
143
+ - name: Install build dependencies
144
+ run: |
145
+ python -m pip install --upgrade pip
146
+ pip install nox[pbs]
147
+
148
+ - name: Set nox conda backend
149
+ run: echo "CONDA_EXE=micromamba" >> "$GITHUB_ENV"
150
+
151
+ - name: Download prebuilt wheels
152
+ uses: actions/download-artifact@v6
153
+ with:
154
+ name: wheels-${{ matrix.os }}
155
+ path: .nox/_artifacts/wheelhouse
156
+
157
+ - name: Run tests
158
+ run: |
159
+ nox -s test
160
+
161
+
162
+ publish:
163
+ name: Publish distributions
164
+ permissions:
165
+ contents: write
166
+ id-token: write
167
+ needs:
168
+ - test_builds
169
+ runs-on: ubuntu-latest
170
+ defaults:
171
+ run:
172
+ shell: bash -el {0}
173
+ steps:
174
+ - name: Download sdist
175
+ uses: actions/download-artifact@v6
176
+ with:
177
+ name: sdist
178
+ path: dist
179
+
180
+ - name: Download wheels
181
+ uses: actions/download-artifact@v6
182
+ with:
183
+ pattern: wheels-*
184
+ merge-multiple: true
185
+ path: dist
186
+ - run: pwd && ls -alt . && ls -alt dist/
187
+
188
+ - name: Upload to GitHub releases
189
+ uses: softprops/action-gh-release@v2.4.1
190
+ with:
191
+ draft: false
192
+ generate_release_notes: false
193
+ files: |
194
+ dist/*
195
+
196
+ - name: Publish package distributions to PyPI
197
+ uses: pypa/gh-action-pypi-publish@v1.12.4
198
+ with:
199
+ packages-dir: dist
@@ -0,0 +1 @@
1
+ 3.13.9
mapflpy-1.1.2/PKG-INFO ADDED
@@ -0,0 +1,85 @@
1
+ Metadata-Version: 2.4
2
+ Name: mapflpy
3
+ Version: 1.1.2
4
+ Summary: Python extension for tracing field lines using the Fortran tracer from MapFL
5
+ Keywords: solar physics,space physics,heliophysics,magnetohydrodynamic,science,mas,predsci,psi,modeling,fortran
6
+ Author: Ryder Davidson, Cooper Downs, Andres Reyes, Asher Pembroke
7
+ Author-Email: "Predictive Science Inc." <webmaster@predsci.com>
8
+ License-Expression: Apache-2.0
9
+ License-File: LICENSE.txt
10
+ Classifier: Development Status :: 4 - Beta
11
+ Classifier: Intended Audience :: Science/Research
12
+ Classifier: Natural Language :: English
13
+ Classifier: Programming Language :: Fortran
14
+ Classifier: Programming Language :: Python
15
+ Classifier: Programming Language :: Python :: 3
16
+ Classifier: Programming Language :: Python :: 3.10
17
+ Classifier: Programming Language :: Python :: 3.11
18
+ Classifier: Programming Language :: Python :: 3.12
19
+ Classifier: Programming Language :: Python :: 3.13
20
+ Classifier: Programming Language :: Python :: 3 :: Only
21
+ Classifier: Operating System :: Unix
22
+ Classifier: Operating System :: POSIX :: Linux
23
+ Classifier: Operating System :: MacOS :: MacOS X
24
+ Classifier: Typing :: Typed
25
+ Classifier: Topic :: Scientific/Engineering :: Astronomy
26
+ Classifier: Topic :: Scientific/Engineering :: Physics
27
+ Project-URL: homepage, https://predsci.com/
28
+ Project-URL: documentation, https://predsci.com/doc/mapflpy
29
+ Project-URL: repository, https://github.com/predsci/mapflpy
30
+ Requires-Python: >=3.10
31
+ Requires-Dist: numpy>=2.1.0
32
+ Requires-Dist: psi-io>=1.0.0
33
+ Provides-Extra: hdf4
34
+ Requires-Dist: pyhdf>=0.11.6; extra == "hdf4"
35
+ Provides-Extra: data
36
+ Requires-Dist: pooch==1.8.2; extra == "data"
37
+ Requires-Dist: matplotlib==3.10.7; extra == "data"
38
+ Requires-Dist: scipy; extra == "data"
39
+ Provides-Extra: build
40
+ Requires-Dist: python-build; extra == "build"
41
+ Requires-Dist: packaging; extra == "build"
42
+ Provides-Extra: test
43
+ Requires-Dist: pytest>=8.4.0; extra == "test"
44
+ Requires-Dist: pytest-cov; extra == "test"
45
+ Provides-Extra: types
46
+ Requires-Dist: mypy>=1.15; extra == "types"
47
+ Provides-Extra: lint
48
+ Requires-Dist: ruff>=0.11.7; extra == "lint"
49
+ Provides-Extra: docs
50
+ Requires-Dist: sphinx==8.2.3; extra == "docs"
51
+ Requires-Dist: sphinx-book-theme==1.1.4; extra == "docs"
52
+ Requires-Dist: sphinx-gallery==0.19.0; extra == "docs"
53
+ Requires-Dist: sphinx-copybutton==0.5.2; extra == "docs"
54
+ Requires-Dist: pooch==1.8.2; extra == "docs"
55
+ Requires-Dist: matplotlib==3.10.7; extra == "docs"
56
+ Requires-Dist: scipy; extra == "docs"
57
+ Requires-Dist: pthree==1.0.1; extra == "docs"
58
+ Provides-Extra: dev
59
+ Requires-Dist: nox>=2025.11.12; extra == "dev"
60
+ Provides-Extra: all
61
+ Requires-Dist: mapflpy[build,data,dev,docs,hdf4,lint,test,types]; extra == "all"
62
+ Description-Content-Type: text/x-rst
63
+
64
+ mapflpy
65
+ =======
66
+
67
+ Python extension for tracing field lines using the
68
+ `MapFL <https://github.com/predsci/MapFL>`_ Fortran tracer.
69
+
70
+ The goal of **mapflpy** is to provide fast and accurate tracing capabilities for
71
+ spherical vector fields inside a convenient Python interface. **mapflpy** is
72
+ designed to work natively with the staggered meshes produced by
73
+ Predictive Science Inc.'s codes for simulating the solar corona, and
74
+ inner heliosphere (*e.g.* `MAS <https://www.predsci.com/mas>`_ or
75
+ `POT3D <https://github.com/predsci/POT3D>`_), but it should be generally compatible
76
+ with any global vector field that can be described on a rectilinear grid in
77
+ spherical coordinates.
78
+
79
+ Resources
80
+ ---------
81
+
82
+ - **Predictive Science Inc.:** https://predsci.com
83
+ - **Source Code:** https://github.com/predsci/mapflpy
84
+ - **Documentation:** https://predsci.com/doc/mapflpy
85
+ - **Distribution:** https://pypi.org/project/mapflpy
@@ -0,0 +1,22 @@
1
+ mapflpy
2
+ =======
3
+
4
+ Python extension for tracing field lines using the
5
+ `MapFL <https://github.com/predsci/MapFL>`_ Fortran tracer.
6
+
7
+ The goal of **mapflpy** is to provide fast and accurate tracing capabilities for
8
+ spherical vector fields inside a convenient Python interface. **mapflpy** is
9
+ designed to work natively with the staggered meshes produced by
10
+ Predictive Science Inc.'s codes for simulating the solar corona, and
11
+ inner heliosphere (*e.g.* `MAS <https://www.predsci.com/mas>`_ or
12
+ `POT3D <https://github.com/predsci/POT3D>`_), but it should be generally compatible
13
+ with any global vector field that can be described on a rectilinear grid in
14
+ spherical coordinates.
15
+
16
+ Resources
17
+ ---------
18
+
19
+ - **Predictive Science Inc.:** https://predsci.com
20
+ - **Source Code:** https://github.com/predsci/mapflpy
21
+ - **Documentation:** https://predsci.com/doc/mapflpy
22
+ - **Distribution:** https://pypi.org/project/mapflpy
@@ -1,18 +1,10 @@
1
1
  from __future__ import annotations
2
2
 
3
- import builtins
4
3
  import os
5
4
  import sys
6
- import importlib
7
- import pkgutil
8
- import re
9
- import ast
10
- import inspect
11
5
  from dataclasses import dataclass, field, asdict
12
6
  from datetime import datetime
13
7
  from pathlib import Path
14
- from types import ModuleType
15
- from typing import Iterable
16
8
 
17
9
  try:
18
10
  # First try to run sphinx_build against installed dist
@@ -25,11 +17,11 @@ except ImportError:
25
17
  import mapflpy
26
18
 
27
19
  try:
28
- from project_parser import build_node_tree
20
+ from pthree import build_node_tree, node_tree_to_dict
29
21
  except ImportError:
30
22
  raise ImportError(
31
- "The 'project_parser' package is required to build the documentation. "
32
- "Please install it via 'pip install project_parser' and try again."
23
+ "The 'pthree' package is required to build the documentation. "
24
+ "Please install it via 'pip install pthree' and try again."
33
25
  )
34
26
 
35
27
  # ------------------------------------------------------------------------------
@@ -70,15 +62,17 @@ html_theme_options = {
70
62
  "type": "fontawesome",
71
63
  },
72
64
  {
73
- 'name': 'Github',
74
- 'url': 'https://github.com/predsci/',
65
+ 'name': 'Source Code',
66
+ 'url': 'https://github.com/predsci/mapflpy',
67
+ # 'url': 'https://bitbucket.org/predsci/mapflpy',
68
+ # "icon": "fa-brands fa-bitbucket fa-fw",
75
69
  "icon": "fa-brands fa-github fa-fw",
76
70
  "type": "fontawesome",
77
71
  },
78
72
  {
79
- 'name': 'Bitbucket',
80
- 'url': 'https://bitbucket.org/predsci/',
81
- "icon": "fa-brands fa-bitbucket fa-fw",
73
+ 'name': 'Documentation',
74
+ 'url': 'https://predsci.com/doc/mapflpy',
75
+ "icon": "fa fa-file fa-fw",
82
76
  "type": "fontawesome",
83
77
  },
84
78
  {
@@ -128,7 +122,7 @@ node_tree = build_node_tree(root_package,
128
122
  exclude_dunder,
129
123
  exclusions)
130
124
 
131
- autosummary_context = dict(pkgtree=asdict(node_tree))
125
+ autosummary_context = dict(pkgtree=node_tree_to_dict(node_tree))
132
126
 
133
127
  # ------------------------------------------------------------------------------
134
128
  # Autodoc Configuration
@@ -0,0 +1,28 @@
1
+ .. _installation:
2
+
3
+ Installation
4
+ ============
5
+
6
+ .. attention::
7
+
8
+ We highly recommend using a virtual environment to manage your Python packages and avoid conflicts with other
9
+ projects. For the best results, we recommend using ``conda`` – *via* Miniforge (preferred), Miniconda, or Anaconda
10
+ – to create and manage your virtual environments.
11
+
12
+ To get started with **mapflpy**, you can install it directly from PyPI:
13
+
14
+ .. code-block:: bash
15
+
16
+ pip install mapflpy
17
+
18
+
19
+ Required Dependencies
20
+ ----------------------
21
+ - `Python >= 3.10 <https://www.python.org/>`_
22
+ - `numpy <https://numpy.org/>`_
23
+ - `psi-io <https://pypi.org/project/psi-io/>`_
24
+
25
+ Optional Dependencies
26
+ ----------------------
27
+ - `matplotlib <https://matplotlib.org/>`_
28
+ - `pooch <https://www.fatiando.org/pooch/>`_
@@ -0,0 +1,53 @@
1
+ channels:
2
+ - conda-forge
3
+ dependencies:
4
+ # -------- Core Python --------
5
+ - python=3.13
6
+
7
+ # -------- Build toolchain --------
8
+ - meson>=1.4
9
+ - meson-python>=0.15
10
+ - ninja>=1.11
11
+
12
+ # -------- Compilers --------
13
+ - pkg-config
14
+ - c-compiler
15
+ - cxx-compiler
16
+ - fortran-compiler
17
+ - python-build
18
+ - zlib
19
+ - hdf5
20
+
21
+ # -------- Python Runtime --------
22
+ - numpy # package dependency
23
+ - h5py # psi-io dependency
24
+ - pyhdf # hdf4 support
25
+
26
+ # -------- Testing / QA --------
27
+ - pytest
28
+ - pytest-cov
29
+ - mypy
30
+ - ruff
31
+ - coverage
32
+ - nox
33
+
34
+ # -------- Docs --------
35
+ - sphinx
36
+ - sphinx-book-theme
37
+ - sphinx-gallery
38
+ - sphinx-copybutton
39
+ - matplotlib
40
+ - pooch
41
+ - scipy
42
+
43
+ # -------- Scripts --------
44
+ - packaging
45
+
46
+ # -------- Publish --------
47
+ - twine
48
+
49
+ # -------- Pip installs --------
50
+ - pip
51
+ - pip:
52
+ - psi-io # Python runtime package
53
+ - pthree # Documentation building
@@ -7,15 +7,27 @@ allow users a high-level interface to the underlying Fortran routines, as well a
7
7
  visualizing and analyzing the traced fieldlines.
8
8
  """
9
9
 
10
+
10
11
  # mapflpy/__init__.py
11
12
  try:
12
13
  # If Meson generated this file:
13
14
  from ._version import __version__ # type: ignore[attr-defined]
14
- except Exception:
15
+ except ModuleNotFoundError as e:
15
16
  try:
16
- # Fallback to installed metadata (wheel/sdist)
17
17
  from importlib.metadata import version as _pkg_version
18
+ from importlib.metadata import PackageNotFoundError
19
+ from pathlib import Path
20
+ # Fallback to installed metadata (wheel/sdist)
18
21
  __version__ = _pkg_version("mapflpy") # type: ignore[assignment]
19
- except Exception: # dev/editable without metadata
20
- __version__ = "0+unknown" # type: ignore[assignment]
22
+ except PackageNotFoundError as e: # dev/editable without metadata
23
+ try:
24
+ import tomllib # Python 3.11+
25
+ except ModuleNotFoundError: # pragma: no cover
26
+ import tomli as tomllib # pip install tomli
27
+
28
+ pyproject = Path(__file__).parents[1].resolve() / 'pyproject.toml'
29
+ data = tomllib.loads(pyproject.read_text())
21
30
 
31
+ project_version = data.get("project", {}).get("version", "0+unknown")
32
+ project_version = project_version.replace('"', '').replace("'", '')
33
+ __version__ = project_version
@@ -2,12 +2,11 @@
2
2
  Utility functions for processing fieldline traces.
3
3
  """
4
4
  from __future__ import annotations
5
+
5
6
  import math
6
- import os
7
7
  import random
8
- from collections import namedtuple
9
8
  from pathlib import Path
10
- from typing import Tuple, List, Any, Literal
9
+ from typing import Tuple, List, Any
11
10
 
12
11
  import numpy as np
13
12
  from numpy._typing import NDArray
@@ -1,11 +1,14 @@
1
1
 
2
2
  project(
3
3
  'mapflpy',
4
- ['c', 'fortran'],
5
- version : '1.1.1',
4
+ 'c', 'cpp', 'fortran',
5
+ version: run_command(['tools/pyproject_version.py'], check: true).stdout().strip(),
6
6
  license : 'Apache-2.0',
7
7
  meson_version : '>=1.1.0',
8
- default_options : ['warning_level=1', 'buildtype=release'],
8
+ default_options : [
9
+ 'warning_level=1',
10
+ 'buildtype=release'
11
+ ],
9
12
  )
10
13
 
11
14
  # ---- Compilers / platform niceties
@@ -92,10 +95,7 @@ py.extension_module(
92
95
  install : true,
93
96
  )
94
97
 
95
- # ---- Install the pure-Python package tree (future-proof)
96
- install_subdir('mapflpy', install_dir : py.get_install_dir())
97
-
98
- # ---- Generate mapflpy/_version.py with Meson project version
98
+ # ---- Generate mapflpy/_version.py
99
99
  conf = configuration_data()
100
100
  conf.set('VERSION', meson.project_version())
101
101
  configure_file(
@@ -105,3 +105,14 @@ configure_file(
105
105
  install : true,
106
106
  install_dir : py.get_install_dir() / 'mapflpy',
107
107
  )
108
+
109
+ # ---- Install the pure-Python package tree
110
+ install_subdir(
111
+ 'mapflpy',
112
+ install_dir : py.get_install_dir(),
113
+ exclude_files: [
114
+ '_version.py.in',
115
+ '__pycache__',
116
+ '*.pyc',
117
+ ]
118
+ )