sxs 2025.0.13__tar.gz → 2025.0.15__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.
- {sxs-2025.0.13 → sxs-2025.0.15}/CITATION.cff +2 -2
- {sxs-2025.0.13 → sxs-2025.0.15}/PKG-INFO +34 -7
- {sxs-2025.0.13 → sxs-2025.0.15}/README.md +33 -6
- sxs-2025.0.15/docs/api/cite.md +10 -0
- {sxs-2025.0.13 → sxs-2025.0.15}/docs/api/simulation.md +4 -1
- {sxs-2025.0.13 → sxs-2025.0.15}/mkdocs.yml +1 -0
- sxs-2025.0.15/sxs/__version__.py +1 -0
- {sxs-2025.0.13 → sxs-2025.0.15}/sxs/citation.py +4 -1
- {sxs-2025.0.13 → sxs-2025.0.15}/sxs/handlers.py +24 -14
- {sxs-2025.0.13 → sxs-2025.0.15}/tests/test_simulation.py +2 -1
- {sxs-2025.0.13 → sxs-2025.0.15}/tests/test_utilities.py +25 -20
- sxs-2025.0.13/sxs/__version__.py +0 -1
- {sxs-2025.0.13 → sxs-2025.0.15}/.codecov.yml +0 -0
- {sxs-2025.0.13 → sxs-2025.0.15}/.github/ISSUE_TEMPLATE/catalog-data-issue-template.md +0 -0
- {sxs-2025.0.13 → sxs-2025.0.15}/.github/dependabot.yml +0 -0
- {sxs-2025.0.13 → sxs-2025.0.15}/.github/scripts/parse_bump_rule.py +0 -0
- {sxs-2025.0.13 → sxs-2025.0.15}/.github/workflows/build.yml +0 -0
- {sxs-2025.0.13 → sxs-2025.0.15}/.github/workflows/pr_rtd_link.yml +0 -0
- {sxs-2025.0.13 → sxs-2025.0.15}/.gitignore +0 -0
- {sxs-2025.0.13 → sxs-2025.0.15}/.readthedocs.yaml +0 -0
- {sxs-2025.0.13 → sxs-2025.0.15}/LICENSE +0 -0
- {sxs-2025.0.13 → sxs-2025.0.15}/docs/api/catalog.md +0 -0
- {sxs-2025.0.13 → sxs-2025.0.15}/docs/api/horizons.md +0 -0
- {sxs-2025.0.13 → sxs-2025.0.15}/docs/api/load.md +0 -0
- {sxs-2025.0.13 → sxs-2025.0.15}/docs/api/metadata.md +0 -0
- {sxs-2025.0.13 → sxs-2025.0.15}/docs/api/simulations.md +0 -0
- {sxs-2025.0.13 → sxs-2025.0.15}/docs/api/time_series.md +0 -0
- {sxs-2025.0.13 → sxs-2025.0.15}/docs/api/waveforms.md +0 -0
- {sxs-2025.0.13 → sxs-2025.0.15}/docs/html/main.html +0 -0
- {sxs-2025.0.13 → sxs-2025.0.15}/docs/images/favicon.ico +0 -0
- {sxs-2025.0.13 → sxs-2025.0.15}/docs/index.md +0 -0
- {sxs-2025.0.13 → sxs-2025.0.15}/docs/javascript/mathjax.js +0 -0
- {sxs-2025.0.13 → sxs-2025.0.15}/docs/julia.md +0 -0
- {sxs-2025.0.13 → sxs-2025.0.15}/docs/mathematica.md +0 -0
- {sxs-2025.0.13 → sxs-2025.0.15}/docs/stylesheets/extra.css +0 -0
- {sxs-2025.0.13 → sxs-2025.0.15}/docs/tutorials/00-Introduction.ipynb +0 -0
- {sxs-2025.0.13 → sxs-2025.0.15}/docs/tutorials/01-Catalog_Dataframe.ipynb +0 -0
- {sxs-2025.0.13 → sxs-2025.0.15}/docs/tutorials/02-Simulation.ipynb +0 -0
- {sxs-2025.0.13 → sxs-2025.0.15}/docs/tutorials/03-Horizons.ipynb +0 -0
- {sxs-2025.0.13 → sxs-2025.0.15}/docs/tutorials/04-Waveforms.ipynb +0 -0
- {sxs-2025.0.13 → sxs-2025.0.15}/docs/tutorials/05-PreprocessingForFFTs.ipynb +0 -0
- {sxs-2025.0.13 → sxs-2025.0.15}/pyproject.toml +0 -0
- {sxs-2025.0.13 → sxs-2025.0.15}/sxs/__init__.py +0 -0
- {sxs-2025.0.13 → sxs-2025.0.15}/sxs/catalog/__init__.py +0 -0
- {sxs-2025.0.13 → sxs-2025.0.15}/sxs/catalog/catalog.py +0 -0
- {sxs-2025.0.13 → sxs-2025.0.15}/sxs/catalog/create.py +0 -0
- {sxs-2025.0.13 → sxs-2025.0.15}/sxs/catalog/description.py +0 -0
- {sxs-2025.0.13 → sxs-2025.0.15}/sxs/horizons/__init__.py +0 -0
- {sxs-2025.0.13 → sxs-2025.0.15}/sxs/horizons/spec_horizons_h5.py +0 -0
- {sxs-2025.0.13 → sxs-2025.0.15}/sxs/horizons/xor_multishuffle_bzip2.py +0 -0
- {sxs-2025.0.13 → sxs-2025.0.15}/sxs/julia/GWFrames.py +0 -0
- {sxs-2025.0.13 → sxs-2025.0.15}/sxs/julia/__init__.py +0 -0
- {sxs-2025.0.13 → sxs-2025.0.15}/sxs/juliapkg.json +0 -0
- {sxs-2025.0.13 → sxs-2025.0.15}/sxs/metadata/__init__.py +0 -0
- {sxs-2025.0.13 → sxs-2025.0.15}/sxs/metadata/metadata.py +0 -0
- {sxs-2025.0.13 → sxs-2025.0.15}/sxs/metadata/metric.py +0 -0
- {sxs-2025.0.13 → sxs-2025.0.15}/sxs/simulations/__init__.py +0 -0
- {sxs-2025.0.13 → sxs-2025.0.15}/sxs/simulations/analyze.py +0 -0
- {sxs-2025.0.13 → sxs-2025.0.15}/sxs/simulations/local.py +0 -0
- {sxs-2025.0.13 → sxs-2025.0.15}/sxs/simulations/simulation.py +0 -0
- {sxs-2025.0.13 → sxs-2025.0.15}/sxs/simulations/simulations.py +0 -0
- {sxs-2025.0.13 → sxs-2025.0.15}/sxs/time_series.py +0 -0
- {sxs-2025.0.13 → sxs-2025.0.15}/sxs/utilities/__init__.py +0 -0
- {sxs-2025.0.13 → sxs-2025.0.15}/sxs/utilities/bitwise.py +0 -0
- {sxs-2025.0.13 → sxs-2025.0.15}/sxs/utilities/decimation/__init__.py +0 -0
- {sxs-2025.0.13 → sxs-2025.0.15}/sxs/utilities/decimation/greedy_spline.py +0 -0
- {sxs-2025.0.13 → sxs-2025.0.15}/sxs/utilities/decimation/linear_bisection.py +0 -0
- {sxs-2025.0.13 → sxs-2025.0.15}/sxs/utilities/decimation/peak_greed.py +0 -0
- {sxs-2025.0.13 → sxs-2025.0.15}/sxs/utilities/decimation/suppression.py +0 -0
- {sxs-2025.0.13 → sxs-2025.0.15}/sxs/utilities/dicts.py +0 -0
- {sxs-2025.0.13 → sxs-2025.0.15}/sxs/utilities/downloads.py +0 -0
- {sxs-2025.0.13 → sxs-2025.0.15}/sxs/utilities/files.py +0 -0
- {sxs-2025.0.13 → sxs-2025.0.15}/sxs/utilities/formats.py +0 -0
- {sxs-2025.0.13 → sxs-2025.0.15}/sxs/utilities/inspire.py +0 -0
- {sxs-2025.0.13 → sxs-2025.0.15}/sxs/utilities/lvcnr/__init__.py +0 -0
- {sxs-2025.0.13 → sxs-2025.0.15}/sxs/utilities/lvcnr/comparisons.py +0 -0
- {sxs-2025.0.13 → sxs-2025.0.15}/sxs/utilities/lvcnr/conversion.py +0 -0
- {sxs-2025.0.13 → sxs-2025.0.15}/sxs/utilities/lvcnr/dataset.py +0 -0
- {sxs-2025.0.13 → sxs-2025.0.15}/sxs/utilities/lvcnr/horizons.py +0 -0
- {sxs-2025.0.13 → sxs-2025.0.15}/sxs/utilities/lvcnr/metadata.py +0 -0
- {sxs-2025.0.13 → sxs-2025.0.15}/sxs/utilities/lvcnr/waveform_amp_phase.py +0 -0
- {sxs-2025.0.13 → sxs-2025.0.15}/sxs/utilities/lvcnr/waveforms.py +0 -0
- {sxs-2025.0.13 → sxs-2025.0.15}/sxs/utilities/monotonicity.py +0 -0
- {sxs-2025.0.13 → sxs-2025.0.15}/sxs/utilities/pretty_print.py +0 -0
- {sxs-2025.0.13 → sxs-2025.0.15}/sxs/utilities/references/__init__.py +0 -0
- {sxs-2025.0.13 → sxs-2025.0.15}/sxs/utilities/references/ads.py +0 -0
- {sxs-2025.0.13 → sxs-2025.0.15}/sxs/utilities/references/arxiv.py +0 -0
- {sxs-2025.0.13 → sxs-2025.0.15}/sxs/utilities/references/fairchild_report.py +0 -0
- {sxs-2025.0.13 → sxs-2025.0.15}/sxs/utilities/references/inspire.py +0 -0
- {sxs-2025.0.13 → sxs-2025.0.15}/sxs/utilities/references/journal_abbreviations.py +0 -0
- {sxs-2025.0.13 → sxs-2025.0.15}/sxs/utilities/references/references.py +0 -0
- {sxs-2025.0.13 → sxs-2025.0.15}/sxs/utilities/select.py +0 -0
- {sxs-2025.0.13 → sxs-2025.0.15}/sxs/utilities/smooth_functions.py +0 -0
- {sxs-2025.0.13 → sxs-2025.0.15}/sxs/utilities/string_converters.py +0 -0
- {sxs-2025.0.13 → sxs-2025.0.15}/sxs/utilities/sxs_directories.py +0 -0
- {sxs-2025.0.13 → sxs-2025.0.15}/sxs/utilities/sxs_identifiers.py +0 -0
- {sxs-2025.0.13 → sxs-2025.0.15}/sxs/utilities/url.py +0 -0
- {sxs-2025.0.13 → sxs-2025.0.15}/sxs/waveforms/__init__.py +0 -0
- {sxs-2025.0.13 → sxs-2025.0.15}/sxs/waveforms/alignment.py +0 -0
- {sxs-2025.0.13 → sxs-2025.0.15}/sxs/waveforms/format_handlers/__init__.py +0 -0
- {sxs-2025.0.13 → sxs-2025.0.15}/sxs/waveforms/format_handlers/grathena.py +0 -0
- {sxs-2025.0.13 → sxs-2025.0.15}/sxs/waveforms/format_handlers/lvc.py +0 -0
- {sxs-2025.0.13 → sxs-2025.0.15}/sxs/waveforms/format_handlers/nrar.py +0 -0
- {sxs-2025.0.13 → sxs-2025.0.15}/sxs/waveforms/format_handlers/rotating_paired_diff_multishuffle_bzip2.py +0 -0
- {sxs-2025.0.13 → sxs-2025.0.15}/sxs/waveforms/format_handlers/rotating_paired_xor_multishuffle_bzip2.py +0 -0
- {sxs-2025.0.13 → sxs-2025.0.15}/sxs/waveforms/format_handlers/spectre_cce_v1.py +0 -0
- {sxs-2025.0.13 → sxs-2025.0.15}/sxs/waveforms/memory.py +0 -0
- {sxs-2025.0.13 → sxs-2025.0.15}/sxs/waveforms/mode_utilities.py +0 -0
- {sxs-2025.0.13 → sxs-2025.0.15}/sxs/waveforms/norms.py +0 -0
- {sxs-2025.0.13 → sxs-2025.0.15}/sxs/waveforms/transformations.py +0 -0
- {sxs-2025.0.13 → sxs-2025.0.15}/sxs/waveforms/waveform_grid.py +0 -0
- {sxs-2025.0.13 → sxs-2025.0.15}/sxs/waveforms/waveform_mixin.py +0 -0
- {sxs-2025.0.13 → sxs-2025.0.15}/sxs/waveforms/waveform_modes.py +0 -0
- {sxs-2025.0.13 → sxs-2025.0.15}/sxs/waveforms/waveform_mts.py +0 -0
- {sxs-2025.0.13 → sxs-2025.0.15}/sxs/waveforms/waveform_signal.py +0 -0
- {sxs-2025.0.13 → sxs-2025.0.15}/sxs/zenodo/__init__.py +0 -0
- {sxs-2025.0.13 → sxs-2025.0.15}/sxs/zenodo/api/__init__.py +0 -0
- {sxs-2025.0.13 → sxs-2025.0.15}/sxs/zenodo/api/deposit.py +0 -0
- {sxs-2025.0.13 → sxs-2025.0.15}/sxs/zenodo/api/login.py +0 -0
- {sxs-2025.0.13 → sxs-2025.0.15}/sxs/zenodo/api/records.py +0 -0
- {sxs-2025.0.13 → sxs-2025.0.15}/sxs/zenodo/catalog.py +0 -0
- {sxs-2025.0.13 → sxs-2025.0.15}/sxs/zenodo/creators.py +0 -0
- {sxs-2025.0.13 → sxs-2025.0.15}/sxs/zenodo/simannex.py +0 -0
- {sxs-2025.0.13 → sxs-2025.0.15}/sxs/zenodo/surrogatemodeling.py +0 -0
- {sxs-2025.0.13 → sxs-2025.0.15}/tests/__init__.py +0 -0
- {sxs-2025.0.13 → sxs-2025.0.15}/tests/conftest.py +0 -0
- {sxs-2025.0.13 → sxs-2025.0.15}/tests/test_alignment.py +0 -0
- {sxs-2025.0.13 → sxs-2025.0.15}/tests/test_catalog.py +0 -0
- {sxs-2025.0.13 → sxs-2025.0.15}/tests/test_horizons.py +0 -0
- {sxs-2025.0.13 → sxs-2025.0.15}/tests/test_julia.py +0 -0
- {sxs-2025.0.13 → sxs-2025.0.15}/tests/test_loader.py +0 -0
- {sxs-2025.0.13 → sxs-2025.0.15}/tests/test_metadata.py +0 -0
- {sxs-2025.0.13 → sxs-2025.0.15}/tests/test_time_series.py +0 -0
- {sxs-2025.0.13 → sxs-2025.0.15}/tests/test_transformations.py +0 -0
- {sxs-2025.0.13 → sxs-2025.0.15}/tests/test_waveform_rotations.py +0 -0
- {sxs-2025.0.13 → sxs-2025.0.15}/tests/test_waveforms.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: sxs
|
|
3
|
-
Version: 2025.0.
|
|
3
|
+
Version: 2025.0.15
|
|
4
4
|
Summary: Interface to data produced by the Simulating eXtreme Spacetimes collaboration
|
|
5
5
|
Project-URL: Homepage, https://github.com/sxs-collaboration/sxs
|
|
6
6
|
Project-URL: Documentation, https://sxs.readthedocs.io/
|
|
@@ -78,7 +78,7 @@ Description-Content-Type: text/markdown
|
|
|
78
78
|
[](https://pypi.org/project/sxs/)
|
|
79
79
|
[](https://anaconda.org/conda-forge/sxs)
|
|
80
80
|
[](https://github.com/sxs-collaboration/sxs/blob/main/LICENSE)
|
|
81
|
-
[](https://data.black-holes.org/)
|
|
82
82
|
|
|
83
83
|
|
|
84
84
|
# Simulating eXtreme Spacetimes package
|
|
@@ -142,11 +142,11 @@ for details.
|
|
|
142
142
|
If you use this package and/or the data it provides in your research,
|
|
143
143
|
please cite them, including the *specific version of the data* that
|
|
144
144
|
you use (see below). To help with this, we provide the function
|
|
145
|
-
`sxs.cite
|
|
146
|
-
|
|
147
|
-
catalog, the catalog data itself,
|
|
148
|
-
|
|
149
|
-
|
|
145
|
+
`sxs.cite`. Use `print(sxs.cite())` to see BibTeX citations for the
|
|
146
|
+
version of this package you are using, the most recent paper
|
|
147
|
+
describing the catalog, and the catalog data itself. Use, e.g.,
|
|
148
|
+
`print(sxs.cite("SXS:BBH:0001", "SXS:BBH:4001"))` to include citations
|
|
149
|
+
for those specific simulations *and* the papers that introduced them.
|
|
150
150
|
|
|
151
151
|
## Usage
|
|
152
152
|
|
|
@@ -255,3 +255,30 @@ different methods; `h` and `psi4` are not just computed one from the
|
|
|
255
255
|
other by a double integral or differentiation. As a result, we
|
|
256
256
|
generally recommend using `h` instead of `psi4` unless you have very
|
|
257
257
|
specific requirements.
|
|
258
|
+
|
|
259
|
+
## Contributing
|
|
260
|
+
|
|
261
|
+
Contributions are welcome! There are at least two ways to contribute
|
|
262
|
+
to this codebase:
|
|
263
|
+
|
|
264
|
+
1. If you find a bug or want to suggest an enhancement, use the [issue
|
|
265
|
+
tracker](https://github.com/sxs-collaboration/sxs/issues) on
|
|
266
|
+
GitHub. It's a good idea to look through past issues, too, to see
|
|
267
|
+
if anybody has run into the same problem or made the same
|
|
268
|
+
suggestion before.
|
|
269
|
+
2. If you will write or edit the python code, we use the [fork and
|
|
270
|
+
pull
|
|
271
|
+
request](https://help.github.com/articles/creating-a-pull-request-from-a-fork/)
|
|
272
|
+
model.
|
|
273
|
+
|
|
274
|
+
You are also allowed to make use of this code for other purposes, as
|
|
275
|
+
detailed in the [MIT license](LICENSE). For any type of contribution,
|
|
276
|
+
please follow the [code of
|
|
277
|
+
conduct](https://github.com/sxs-collaboration/.github/blob/master/CODE_OF_CONDUCT.md).
|
|
278
|
+
|
|
279
|
+
## Reporting catalog data issues
|
|
280
|
+
|
|
281
|
+
If you find an issue with our data or metadata, please let us know!
|
|
282
|
+
[Fill out an issue with the catalog data
|
|
283
|
+
template](https://github.com/sxs-collaboration/sxs/issues/new?template=catalog-data-issue-template.md)
|
|
284
|
+
and we will take a look as soon as possible.
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
[](https://pypi.org/project/sxs/)
|
|
4
4
|
[](https://anaconda.org/conda-forge/sxs)
|
|
5
5
|
[](https://github.com/sxs-collaboration/sxs/blob/main/LICENSE)
|
|
6
|
-
[](https://data.black-holes.org/)
|
|
7
7
|
|
|
8
8
|
|
|
9
9
|
# Simulating eXtreme Spacetimes package
|
|
@@ -67,11 +67,11 @@ for details.
|
|
|
67
67
|
If you use this package and/or the data it provides in your research,
|
|
68
68
|
please cite them, including the *specific version of the data* that
|
|
69
69
|
you use (see below). To help with this, we provide the function
|
|
70
|
-
`sxs.cite
|
|
71
|
-
|
|
72
|
-
catalog, the catalog data itself,
|
|
73
|
-
|
|
74
|
-
|
|
70
|
+
`sxs.cite`. Use `print(sxs.cite())` to see BibTeX citations for the
|
|
71
|
+
version of this package you are using, the most recent paper
|
|
72
|
+
describing the catalog, and the catalog data itself. Use, e.g.,
|
|
73
|
+
`print(sxs.cite("SXS:BBH:0001", "SXS:BBH:4001"))` to include citations
|
|
74
|
+
for those specific simulations *and* the papers that introduced them.
|
|
75
75
|
|
|
76
76
|
## Usage
|
|
77
77
|
|
|
@@ -180,3 +180,30 @@ different methods; `h` and `psi4` are not just computed one from the
|
|
|
180
180
|
other by a double integral or differentiation. As a result, we
|
|
181
181
|
generally recommend using `h` instead of `psi4` unless you have very
|
|
182
182
|
specific requirements.
|
|
183
|
+
|
|
184
|
+
## Contributing
|
|
185
|
+
|
|
186
|
+
Contributions are welcome! There are at least two ways to contribute
|
|
187
|
+
to this codebase:
|
|
188
|
+
|
|
189
|
+
1. If you find a bug or want to suggest an enhancement, use the [issue
|
|
190
|
+
tracker](https://github.com/sxs-collaboration/sxs/issues) on
|
|
191
|
+
GitHub. It's a good idea to look through past issues, too, to see
|
|
192
|
+
if anybody has run into the same problem or made the same
|
|
193
|
+
suggestion before.
|
|
194
|
+
2. If you will write or edit the python code, we use the [fork and
|
|
195
|
+
pull
|
|
196
|
+
request](https://help.github.com/articles/creating-a-pull-request-from-a-fork/)
|
|
197
|
+
model.
|
|
198
|
+
|
|
199
|
+
You are also allowed to make use of this code for other purposes, as
|
|
200
|
+
detailed in the [MIT license](LICENSE). For any type of contribution,
|
|
201
|
+
please follow the [code of
|
|
202
|
+
conduct](https://github.com/sxs-collaboration/.github/blob/master/CODE_OF_CONDUCT.md).
|
|
203
|
+
|
|
204
|
+
## Reporting catalog data issues
|
|
205
|
+
|
|
206
|
+
If you find an issue with our data or metadata, please let us know!
|
|
207
|
+
[Fill out an issue with the catalog data
|
|
208
|
+
template](https://github.com/sxs-collaboration/sxs/issues/new?template=catalog-data-issue-template.md)
|
|
209
|
+
and we will take a look as soon as possible.
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
# `sxs.cite`
|
|
2
|
+
|
|
3
|
+
For reasons of reproducibility — and for general academic integrity —
|
|
4
|
+
it is important to cite the specific packages and data you use in your
|
|
5
|
+
research. In particular, it is absolutely vital to cite the specific
|
|
6
|
+
version of the catalog of SXS simulations you use, as well as the
|
|
7
|
+
version of this `sxs` package that you use. The `sxs.cite` function
|
|
8
|
+
provides those specific citations.
|
|
9
|
+
|
|
10
|
+
::: sxs.cite
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# `Simulation` classes
|
|
2
2
|
|
|
3
|
-
The `Simulation` classes
|
|
3
|
+
The `Simulation` classes form the primary interface for accessing
|
|
4
4
|
simulation data. They are the top-level objects that contain all the
|
|
5
5
|
data for a single simulation. These classes are designed to be
|
|
6
6
|
lightweight and to load data only when needed.
|
|
@@ -21,3 +21,6 @@ return the appropriate object.
|
|
|
21
21
|
|
|
22
22
|
## `Simulation_v2` class
|
|
23
23
|
::: sxs.simulations.simulation.Simulation_v2
|
|
24
|
+
|
|
25
|
+
## `Simulation_v3` class
|
|
26
|
+
::: sxs.simulations.simulation.Simulation_v3
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
__version__ = "2025.0.15"
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
def cite(*sxs_ids, bibtex=True):
|
|
2
2
|
"""Cite this package and/or data
|
|
3
3
|
|
|
4
|
-
Prints out a citation for
|
|
4
|
+
Prints out a citation for this package, the most recent paper
|
|
5
5
|
describing the catalog, the catalog data itself, and optionally
|
|
6
6
|
individual simulations.
|
|
7
7
|
|
|
@@ -30,6 +30,9 @@ def cite(*sxs_ids, bibtex=True):
|
|
|
30
30
|
from . import doi_prefix, load, __version__
|
|
31
31
|
from . import sxs_id as sxs_identifier
|
|
32
32
|
|
|
33
|
+
if len(sxs_ids) == 1 and isinstance(sxs_ids[0], (list, tuple)):
|
|
34
|
+
sxs_ids = tuple(sxs_ids[0])
|
|
35
|
+
|
|
33
36
|
simulations = load("simulations")
|
|
34
37
|
|
|
35
38
|
# Get the DOI for this version of this package
|
|
@@ -199,29 +199,36 @@ def load(location, download=None, cache=None, progress=None, truepath=None, **kw
|
|
|
199
199
|
-----
|
|
200
200
|
This function can load data in various ways.
|
|
201
201
|
|
|
202
|
-
1)
|
|
203
|
-
loads the data directly.
|
|
204
|
-
|
|
205
|
-
2) If `truepath` is set, and points to a file that exists —
|
|
202
|
+
1) If `truepath` is set, and points to a file that exists —
|
|
206
203
|
whether absolute, relative to the current working directory,
|
|
207
204
|
or relative to the cache directory — that file will be
|
|
208
205
|
loaded.
|
|
209
206
|
|
|
210
|
-
|
|
207
|
+
2) Given an absolute or relative path to a local file, it just
|
|
208
|
+
loads the data directly.
|
|
209
|
+
|
|
210
|
+
3) If `location` is one of "simulations" or "dataframe" (or the
|
|
211
|
+
deprecated "catalog"), the corresponding catalog data is
|
|
212
|
+
loaded. The "simulations" option returns a dictionary mapping
|
|
213
|
+
SXS IDs to raw metadata, while "dataframe" returns a pandas
|
|
214
|
+
DataFrame indexed by SXS ID, but the metadata is processed
|
|
215
|
+
into more consistent form.
|
|
216
|
+
|
|
217
|
+
4) If `location` is a valid URL including the scheme (https://,
|
|
211
218
|
or http://), it will be downloaded regardless of the
|
|
212
219
|
`download` parameter and optionally cached.
|
|
213
220
|
|
|
214
|
-
|
|
221
|
+
5) Given an SXS simulation specification — like "SXS:BBH:1234",
|
|
215
222
|
"SXS:BBH:1234v2.0", "SXS:BBH:1234/Lev5", or
|
|
216
223
|
"SXS:BBH:1234v2.0/Lev5" — the simulation is loaded as an
|
|
217
224
|
`sxs.Simulation` object.
|
|
218
225
|
|
|
219
|
-
|
|
226
|
+
6) Given an SXS path — like
|
|
220
227
|
"SXS:BBH:1234/Lev5/h_Extrapolated_N2.h5" — the file is
|
|
221
228
|
located in the catalog for details. This function then looks
|
|
222
229
|
in the local cache directory and loads it if present.
|
|
223
230
|
|
|
224
|
-
|
|
231
|
+
7) If the SXS path is not found in the cache directory and
|
|
225
232
|
`download` is set to `True` (when this function is called, or
|
|
226
233
|
in the sxs config file) this function attempts to download
|
|
227
234
|
the data. Note that `download` must be explicitly set in
|
|
@@ -263,6 +270,15 @@ def load(location, download=None, cache=None, progress=None, truepath=None, **kw
|
|
|
263
270
|
elif truepath and (testpath := cache_path / sxs_path_to_system_path(truepath)).exists():
|
|
264
271
|
path = testpath
|
|
265
272
|
|
|
273
|
+
elif _safe_resolve_exists(path):
|
|
274
|
+
pass # We already have the correct path
|
|
275
|
+
|
|
276
|
+
elif location == "catalog":
|
|
277
|
+
return Catalog.load(download=download)
|
|
278
|
+
|
|
279
|
+
elif location in ["simulations", "dataframe"]:
|
|
280
|
+
return sxscatalog.load(location, download=download, **kwargs)
|
|
281
|
+
|
|
266
282
|
elif _safe_resolve_exists(h5_path):
|
|
267
283
|
path = h5_path
|
|
268
284
|
|
|
@@ -278,12 +294,6 @@ def load(location, download=None, cache=None, progress=None, truepath=None, **kw
|
|
|
278
294
|
raise ValueError(f"File '{truepath}' not found in cache, but downloading turned off")
|
|
279
295
|
download_file(location, path, progress=progress)
|
|
280
296
|
|
|
281
|
-
elif location == "catalog":
|
|
282
|
-
return Catalog.load(download=download)
|
|
283
|
-
|
|
284
|
-
elif location in ["simulations", "dataframe"]:
|
|
285
|
-
return sxscatalog.load(location, download=download, **kwargs)
|
|
286
|
-
|
|
287
297
|
elif sxs_id_version_lev_exact_re.match(location):
|
|
288
298
|
return Simulation(location, download=download, cache=cache, progress=progress, **kwargs)
|
|
289
299
|
|
|
@@ -2,7 +2,8 @@ import pytest
|
|
|
2
2
|
import sxs
|
|
3
3
|
from .conftest import skip_macOS_GH_actions_downloads
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
|
|
6
|
+
@skip_macOS_GH_actions_downloads
|
|
6
7
|
def test_catalog_file_sizes():
|
|
7
8
|
simulations = sxs.load("simulations")
|
|
8
9
|
success = True
|
|
@@ -98,28 +98,33 @@ def test_sxs_directory_unwritable(directory_type, tmp_path, monkeypatch):
|
|
|
98
98
|
import os
|
|
99
99
|
import stat
|
|
100
100
|
from pathlib import Path
|
|
101
|
+
import shutil
|
|
101
102
|
|
|
102
103
|
d = tmp_path / "unwritable"
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
104
|
+
try:
|
|
105
|
+
d.mkdir(mode=0o000)
|
|
106
|
+
assert d.exists()
|
|
107
|
+
assert d.is_dir()
|
|
108
|
+
assert stat.filemode(d.stat().st_mode) == "d---------"
|
|
109
|
+
assert not os.access(str(d), os.W_OK)
|
|
110
|
+
|
|
111
|
+
with monkeypatch.context() as mp:
|
|
112
|
+
mp.setattr(Path, "home", lambda: d)
|
|
113
|
+
mp.setenv(f"SXS{directory_type.upper()}DIR", str(d))
|
|
114
|
+
for dir_type in ["config", "cache"]:
|
|
115
|
+
mp.delenv(f'XDG_{dir_type.upper()}_HOME', raising=False)
|
|
116
|
+
sxs.utilities.sxs_directory.cache_clear()
|
|
117
|
+
with pytest.warns(UserWarning):
|
|
118
|
+
sxs_dir = sxs.utilities.sxs_directory(directory_type, persistent=True)
|
|
119
|
+
assert ".sxs" not in str(sxs_dir), (str(sxs_dir), str(d))
|
|
120
|
+
sxs_config_dir = sxs.utilities.sxs_directory("config", persistent=True)
|
|
121
|
+
assert str(sxs_config_dir) in str(sxs_dir)
|
|
122
|
+
|
|
123
|
+
d.chmod(0o777)
|
|
124
|
+
time.sleep(0.1)
|
|
125
|
+
finally:
|
|
126
|
+
# Remove the subdirectory manually, because forking scares the file system
|
|
127
|
+
shutil.rmtree(str(d))
|
|
123
128
|
|
|
124
129
|
|
|
125
130
|
def test_read_write_config(tmp_path, monkeypatch):
|
sxs-2025.0.13/sxs/__version__.py
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
__version__ = "2025.0.13"
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|