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.
Files changed (136) hide show
  1. {sxs-2025.0.13 → sxs-2025.0.15}/CITATION.cff +2 -2
  2. {sxs-2025.0.13 → sxs-2025.0.15}/PKG-INFO +34 -7
  3. {sxs-2025.0.13 → sxs-2025.0.15}/README.md +33 -6
  4. sxs-2025.0.15/docs/api/cite.md +10 -0
  5. {sxs-2025.0.13 → sxs-2025.0.15}/docs/api/simulation.md +4 -1
  6. {sxs-2025.0.13 → sxs-2025.0.15}/mkdocs.yml +1 -0
  7. sxs-2025.0.15/sxs/__version__.py +1 -0
  8. {sxs-2025.0.13 → sxs-2025.0.15}/sxs/citation.py +4 -1
  9. {sxs-2025.0.13 → sxs-2025.0.15}/sxs/handlers.py +24 -14
  10. {sxs-2025.0.13 → sxs-2025.0.15}/tests/test_simulation.py +2 -1
  11. {sxs-2025.0.13 → sxs-2025.0.15}/tests/test_utilities.py +25 -20
  12. sxs-2025.0.13/sxs/__version__.py +0 -1
  13. {sxs-2025.0.13 → sxs-2025.0.15}/.codecov.yml +0 -0
  14. {sxs-2025.0.13 → sxs-2025.0.15}/.github/ISSUE_TEMPLATE/catalog-data-issue-template.md +0 -0
  15. {sxs-2025.0.13 → sxs-2025.0.15}/.github/dependabot.yml +0 -0
  16. {sxs-2025.0.13 → sxs-2025.0.15}/.github/scripts/parse_bump_rule.py +0 -0
  17. {sxs-2025.0.13 → sxs-2025.0.15}/.github/workflows/build.yml +0 -0
  18. {sxs-2025.0.13 → sxs-2025.0.15}/.github/workflows/pr_rtd_link.yml +0 -0
  19. {sxs-2025.0.13 → sxs-2025.0.15}/.gitignore +0 -0
  20. {sxs-2025.0.13 → sxs-2025.0.15}/.readthedocs.yaml +0 -0
  21. {sxs-2025.0.13 → sxs-2025.0.15}/LICENSE +0 -0
  22. {sxs-2025.0.13 → sxs-2025.0.15}/docs/api/catalog.md +0 -0
  23. {sxs-2025.0.13 → sxs-2025.0.15}/docs/api/horizons.md +0 -0
  24. {sxs-2025.0.13 → sxs-2025.0.15}/docs/api/load.md +0 -0
  25. {sxs-2025.0.13 → sxs-2025.0.15}/docs/api/metadata.md +0 -0
  26. {sxs-2025.0.13 → sxs-2025.0.15}/docs/api/simulations.md +0 -0
  27. {sxs-2025.0.13 → sxs-2025.0.15}/docs/api/time_series.md +0 -0
  28. {sxs-2025.0.13 → sxs-2025.0.15}/docs/api/waveforms.md +0 -0
  29. {sxs-2025.0.13 → sxs-2025.0.15}/docs/html/main.html +0 -0
  30. {sxs-2025.0.13 → sxs-2025.0.15}/docs/images/favicon.ico +0 -0
  31. {sxs-2025.0.13 → sxs-2025.0.15}/docs/index.md +0 -0
  32. {sxs-2025.0.13 → sxs-2025.0.15}/docs/javascript/mathjax.js +0 -0
  33. {sxs-2025.0.13 → sxs-2025.0.15}/docs/julia.md +0 -0
  34. {sxs-2025.0.13 → sxs-2025.0.15}/docs/mathematica.md +0 -0
  35. {sxs-2025.0.13 → sxs-2025.0.15}/docs/stylesheets/extra.css +0 -0
  36. {sxs-2025.0.13 → sxs-2025.0.15}/docs/tutorials/00-Introduction.ipynb +0 -0
  37. {sxs-2025.0.13 → sxs-2025.0.15}/docs/tutorials/01-Catalog_Dataframe.ipynb +0 -0
  38. {sxs-2025.0.13 → sxs-2025.0.15}/docs/tutorials/02-Simulation.ipynb +0 -0
  39. {sxs-2025.0.13 → sxs-2025.0.15}/docs/tutorials/03-Horizons.ipynb +0 -0
  40. {sxs-2025.0.13 → sxs-2025.0.15}/docs/tutorials/04-Waveforms.ipynb +0 -0
  41. {sxs-2025.0.13 → sxs-2025.0.15}/docs/tutorials/05-PreprocessingForFFTs.ipynb +0 -0
  42. {sxs-2025.0.13 → sxs-2025.0.15}/pyproject.toml +0 -0
  43. {sxs-2025.0.13 → sxs-2025.0.15}/sxs/__init__.py +0 -0
  44. {sxs-2025.0.13 → sxs-2025.0.15}/sxs/catalog/__init__.py +0 -0
  45. {sxs-2025.0.13 → sxs-2025.0.15}/sxs/catalog/catalog.py +0 -0
  46. {sxs-2025.0.13 → sxs-2025.0.15}/sxs/catalog/create.py +0 -0
  47. {sxs-2025.0.13 → sxs-2025.0.15}/sxs/catalog/description.py +0 -0
  48. {sxs-2025.0.13 → sxs-2025.0.15}/sxs/horizons/__init__.py +0 -0
  49. {sxs-2025.0.13 → sxs-2025.0.15}/sxs/horizons/spec_horizons_h5.py +0 -0
  50. {sxs-2025.0.13 → sxs-2025.0.15}/sxs/horizons/xor_multishuffle_bzip2.py +0 -0
  51. {sxs-2025.0.13 → sxs-2025.0.15}/sxs/julia/GWFrames.py +0 -0
  52. {sxs-2025.0.13 → sxs-2025.0.15}/sxs/julia/__init__.py +0 -0
  53. {sxs-2025.0.13 → sxs-2025.0.15}/sxs/juliapkg.json +0 -0
  54. {sxs-2025.0.13 → sxs-2025.0.15}/sxs/metadata/__init__.py +0 -0
  55. {sxs-2025.0.13 → sxs-2025.0.15}/sxs/metadata/metadata.py +0 -0
  56. {sxs-2025.0.13 → sxs-2025.0.15}/sxs/metadata/metric.py +0 -0
  57. {sxs-2025.0.13 → sxs-2025.0.15}/sxs/simulations/__init__.py +0 -0
  58. {sxs-2025.0.13 → sxs-2025.0.15}/sxs/simulations/analyze.py +0 -0
  59. {sxs-2025.0.13 → sxs-2025.0.15}/sxs/simulations/local.py +0 -0
  60. {sxs-2025.0.13 → sxs-2025.0.15}/sxs/simulations/simulation.py +0 -0
  61. {sxs-2025.0.13 → sxs-2025.0.15}/sxs/simulations/simulations.py +0 -0
  62. {sxs-2025.0.13 → sxs-2025.0.15}/sxs/time_series.py +0 -0
  63. {sxs-2025.0.13 → sxs-2025.0.15}/sxs/utilities/__init__.py +0 -0
  64. {sxs-2025.0.13 → sxs-2025.0.15}/sxs/utilities/bitwise.py +0 -0
  65. {sxs-2025.0.13 → sxs-2025.0.15}/sxs/utilities/decimation/__init__.py +0 -0
  66. {sxs-2025.0.13 → sxs-2025.0.15}/sxs/utilities/decimation/greedy_spline.py +0 -0
  67. {sxs-2025.0.13 → sxs-2025.0.15}/sxs/utilities/decimation/linear_bisection.py +0 -0
  68. {sxs-2025.0.13 → sxs-2025.0.15}/sxs/utilities/decimation/peak_greed.py +0 -0
  69. {sxs-2025.0.13 → sxs-2025.0.15}/sxs/utilities/decimation/suppression.py +0 -0
  70. {sxs-2025.0.13 → sxs-2025.0.15}/sxs/utilities/dicts.py +0 -0
  71. {sxs-2025.0.13 → sxs-2025.0.15}/sxs/utilities/downloads.py +0 -0
  72. {sxs-2025.0.13 → sxs-2025.0.15}/sxs/utilities/files.py +0 -0
  73. {sxs-2025.0.13 → sxs-2025.0.15}/sxs/utilities/formats.py +0 -0
  74. {sxs-2025.0.13 → sxs-2025.0.15}/sxs/utilities/inspire.py +0 -0
  75. {sxs-2025.0.13 → sxs-2025.0.15}/sxs/utilities/lvcnr/__init__.py +0 -0
  76. {sxs-2025.0.13 → sxs-2025.0.15}/sxs/utilities/lvcnr/comparisons.py +0 -0
  77. {sxs-2025.0.13 → sxs-2025.0.15}/sxs/utilities/lvcnr/conversion.py +0 -0
  78. {sxs-2025.0.13 → sxs-2025.0.15}/sxs/utilities/lvcnr/dataset.py +0 -0
  79. {sxs-2025.0.13 → sxs-2025.0.15}/sxs/utilities/lvcnr/horizons.py +0 -0
  80. {sxs-2025.0.13 → sxs-2025.0.15}/sxs/utilities/lvcnr/metadata.py +0 -0
  81. {sxs-2025.0.13 → sxs-2025.0.15}/sxs/utilities/lvcnr/waveform_amp_phase.py +0 -0
  82. {sxs-2025.0.13 → sxs-2025.0.15}/sxs/utilities/lvcnr/waveforms.py +0 -0
  83. {sxs-2025.0.13 → sxs-2025.0.15}/sxs/utilities/monotonicity.py +0 -0
  84. {sxs-2025.0.13 → sxs-2025.0.15}/sxs/utilities/pretty_print.py +0 -0
  85. {sxs-2025.0.13 → sxs-2025.0.15}/sxs/utilities/references/__init__.py +0 -0
  86. {sxs-2025.0.13 → sxs-2025.0.15}/sxs/utilities/references/ads.py +0 -0
  87. {sxs-2025.0.13 → sxs-2025.0.15}/sxs/utilities/references/arxiv.py +0 -0
  88. {sxs-2025.0.13 → sxs-2025.0.15}/sxs/utilities/references/fairchild_report.py +0 -0
  89. {sxs-2025.0.13 → sxs-2025.0.15}/sxs/utilities/references/inspire.py +0 -0
  90. {sxs-2025.0.13 → sxs-2025.0.15}/sxs/utilities/references/journal_abbreviations.py +0 -0
  91. {sxs-2025.0.13 → sxs-2025.0.15}/sxs/utilities/references/references.py +0 -0
  92. {sxs-2025.0.13 → sxs-2025.0.15}/sxs/utilities/select.py +0 -0
  93. {sxs-2025.0.13 → sxs-2025.0.15}/sxs/utilities/smooth_functions.py +0 -0
  94. {sxs-2025.0.13 → sxs-2025.0.15}/sxs/utilities/string_converters.py +0 -0
  95. {sxs-2025.0.13 → sxs-2025.0.15}/sxs/utilities/sxs_directories.py +0 -0
  96. {sxs-2025.0.13 → sxs-2025.0.15}/sxs/utilities/sxs_identifiers.py +0 -0
  97. {sxs-2025.0.13 → sxs-2025.0.15}/sxs/utilities/url.py +0 -0
  98. {sxs-2025.0.13 → sxs-2025.0.15}/sxs/waveforms/__init__.py +0 -0
  99. {sxs-2025.0.13 → sxs-2025.0.15}/sxs/waveforms/alignment.py +0 -0
  100. {sxs-2025.0.13 → sxs-2025.0.15}/sxs/waveforms/format_handlers/__init__.py +0 -0
  101. {sxs-2025.0.13 → sxs-2025.0.15}/sxs/waveforms/format_handlers/grathena.py +0 -0
  102. {sxs-2025.0.13 → sxs-2025.0.15}/sxs/waveforms/format_handlers/lvc.py +0 -0
  103. {sxs-2025.0.13 → sxs-2025.0.15}/sxs/waveforms/format_handlers/nrar.py +0 -0
  104. {sxs-2025.0.13 → sxs-2025.0.15}/sxs/waveforms/format_handlers/rotating_paired_diff_multishuffle_bzip2.py +0 -0
  105. {sxs-2025.0.13 → sxs-2025.0.15}/sxs/waveforms/format_handlers/rotating_paired_xor_multishuffle_bzip2.py +0 -0
  106. {sxs-2025.0.13 → sxs-2025.0.15}/sxs/waveforms/format_handlers/spectre_cce_v1.py +0 -0
  107. {sxs-2025.0.13 → sxs-2025.0.15}/sxs/waveforms/memory.py +0 -0
  108. {sxs-2025.0.13 → sxs-2025.0.15}/sxs/waveforms/mode_utilities.py +0 -0
  109. {sxs-2025.0.13 → sxs-2025.0.15}/sxs/waveforms/norms.py +0 -0
  110. {sxs-2025.0.13 → sxs-2025.0.15}/sxs/waveforms/transformations.py +0 -0
  111. {sxs-2025.0.13 → sxs-2025.0.15}/sxs/waveforms/waveform_grid.py +0 -0
  112. {sxs-2025.0.13 → sxs-2025.0.15}/sxs/waveforms/waveform_mixin.py +0 -0
  113. {sxs-2025.0.13 → sxs-2025.0.15}/sxs/waveforms/waveform_modes.py +0 -0
  114. {sxs-2025.0.13 → sxs-2025.0.15}/sxs/waveforms/waveform_mts.py +0 -0
  115. {sxs-2025.0.13 → sxs-2025.0.15}/sxs/waveforms/waveform_signal.py +0 -0
  116. {sxs-2025.0.13 → sxs-2025.0.15}/sxs/zenodo/__init__.py +0 -0
  117. {sxs-2025.0.13 → sxs-2025.0.15}/sxs/zenodo/api/__init__.py +0 -0
  118. {sxs-2025.0.13 → sxs-2025.0.15}/sxs/zenodo/api/deposit.py +0 -0
  119. {sxs-2025.0.13 → sxs-2025.0.15}/sxs/zenodo/api/login.py +0 -0
  120. {sxs-2025.0.13 → sxs-2025.0.15}/sxs/zenodo/api/records.py +0 -0
  121. {sxs-2025.0.13 → sxs-2025.0.15}/sxs/zenodo/catalog.py +0 -0
  122. {sxs-2025.0.13 → sxs-2025.0.15}/sxs/zenodo/creators.py +0 -0
  123. {sxs-2025.0.13 → sxs-2025.0.15}/sxs/zenodo/simannex.py +0 -0
  124. {sxs-2025.0.13 → sxs-2025.0.15}/sxs/zenodo/surrogatemodeling.py +0 -0
  125. {sxs-2025.0.13 → sxs-2025.0.15}/tests/__init__.py +0 -0
  126. {sxs-2025.0.13 → sxs-2025.0.15}/tests/conftest.py +0 -0
  127. {sxs-2025.0.13 → sxs-2025.0.15}/tests/test_alignment.py +0 -0
  128. {sxs-2025.0.13 → sxs-2025.0.15}/tests/test_catalog.py +0 -0
  129. {sxs-2025.0.13 → sxs-2025.0.15}/tests/test_horizons.py +0 -0
  130. {sxs-2025.0.13 → sxs-2025.0.15}/tests/test_julia.py +0 -0
  131. {sxs-2025.0.13 → sxs-2025.0.15}/tests/test_loader.py +0 -0
  132. {sxs-2025.0.13 → sxs-2025.0.15}/tests/test_metadata.py +0 -0
  133. {sxs-2025.0.13 → sxs-2025.0.15}/tests/test_time_series.py +0 -0
  134. {sxs-2025.0.13 → sxs-2025.0.15}/tests/test_transformations.py +0 -0
  135. {sxs-2025.0.13 → sxs-2025.0.15}/tests/test_waveform_rotations.py +0 -0
  136. {sxs-2025.0.13 → sxs-2025.0.15}/tests/test_waveforms.py +0 -0
@@ -16,5 +16,5 @@ authors:
16
16
  title: "The sxs package"
17
17
  license: MIT
18
18
  doi: 10.5281/zenodo.4034006
19
- version: 2025.0.13
20
- date-released: 2025-05-12
19
+ version: 2025.0.15
20
+ date-released: 2025-05-14
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: sxs
3
- Version: 2025.0.13
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
  [![PyPI Version](https://img.shields.io/pypi/v/sxs?color=)](https://pypi.org/project/sxs/)
79
79
  [![Conda Version](https://img.shields.io/conda/vn/conda-forge/sxs.svg?color=)](https://anaconda.org/conda-forge/sxs)
80
80
  [![MIT License](https://img.shields.io/badge/license-MIT-blue.svg)](https://github.com/sxs-collaboration/sxs/blob/main/LICENSE)
81
- [![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/moble/sxs_notebooks/main)
81
+ [![Open with marimo](https://marimo.io/shield.svg)](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`, which will print out a citation — in BibTeX format or just
146
- the DOIs for the package, the most recent paper describing the
147
- catalog, the catalog data itself, and optionally individual
148
- simulations.
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
  [![PyPI Version](https://img.shields.io/pypi/v/sxs?color=)](https://pypi.org/project/sxs/)
4
4
  [![Conda Version](https://img.shields.io/conda/vn/conda-forge/sxs.svg?color=)](https://anaconda.org/conda-forge/sxs)
5
5
  [![MIT License](https://img.shields.io/badge/license-MIT-blue.svg)](https://github.com/sxs-collaboration/sxs/blob/main/LICENSE)
6
- [![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/moble/sxs_notebooks/main)
6
+ [![Open with marimo](https://marimo.io/shield.svg)](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`, which will print out a citation — in BibTeX format or just
71
- the DOIs for the package, the most recent paper describing the
72
- catalog, the catalog data itself, and optionally individual
73
- simulations.
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 are the primary interface for accessing
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
@@ -30,6 +30,7 @@ nav:
30
30
  - "Time Series": "api/time_series.md"
31
31
  - "Horizons": "api/horizons.md"
32
32
  - "Waveforms": "api/waveforms.md"
33
+ - "Cite": "api/cite.md"
33
34
  - "Calling from Mathematica": "mathematica.md"
34
35
  - "Calling from Julia": "julia.md"
35
36
 
@@ -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 the package, the most recent paper
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) Given an absolute or relative path to a local file, it just
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
- 3) If `location` is a valid URL including the scheme (https://,
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
- 4) Given an SXS simulation specification — like "SXS:BBH:1234",
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
- 5) Given an SXS path — like
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
- 6) If the SXS path is not found in the cache directory and
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
- @pytest.mark.xfail(reason="Missing files in the catalog should be updated soon")
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
- d.mkdir(mode=0o000)
104
- assert d.exists()
105
- assert d.is_dir()
106
- assert stat.filemode(d.stat().st_mode) == "d---------"
107
- assert not os.access(str(d), os.W_OK)
108
-
109
- with monkeypatch.context() as mp:
110
- mp.setattr(Path, "home", lambda: d)
111
- mp.setenv(f"SXS{directory_type.upper()}DIR", str(d))
112
- for dir_type in ["config", "cache"]:
113
- mp.delenv(f'XDG_{dir_type.upper()}_HOME', raising=False)
114
- sxs.utilities.sxs_directory.cache_clear()
115
- with pytest.warns(UserWarning):
116
- sxs_dir = sxs.utilities.sxs_directory(directory_type, persistent=True)
117
- assert ".sxs" not in str(sxs_dir), (str(sxs_dir), str(d))
118
- sxs_config_dir = sxs.utilities.sxs_directory("config", persistent=True)
119
- assert str(sxs_config_dir) in str(sxs_dir)
120
-
121
- d.chmod(0o777)
122
- time.sleep(0.1)
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):
@@ -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