sxs 2025.0.14__tar.gz → 2025.0.16__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.14 → sxs-2025.0.16}/CITATION.cff +2 -2
- {sxs-2025.0.14 → sxs-2025.0.16}/PKG-INFO +1 -1
- {sxs-2025.0.14 → sxs-2025.0.16}/docs/tutorials/00-Introduction.ipynb +5 -5
- {sxs-2025.0.14 → sxs-2025.0.16}/docs/tutorials/01-Catalog_Dataframe.ipynb +1 -1
- {sxs-2025.0.14 → sxs-2025.0.16}/docs/tutorials/02-Simulation.ipynb +2 -2
- {sxs-2025.0.14 → sxs-2025.0.16}/docs/tutorials/03-Horizons.ipynb +1 -1
- sxs-2025.0.16/sxs/__version__.py +1 -0
- {sxs-2025.0.14 → sxs-2025.0.16}/sxs/citation.py +3 -0
- {sxs-2025.0.14 → sxs-2025.0.16}/sxs/handlers.py +24 -14
- {sxs-2025.0.14 → sxs-2025.0.16}/tests/test_simulation.py +2 -1
- {sxs-2025.0.14 → sxs-2025.0.16}/tests/test_utilities.py +25 -20
- sxs-2025.0.14/sxs/__version__.py +0 -1
- {sxs-2025.0.14 → sxs-2025.0.16}/.codecov.yml +0 -0
- {sxs-2025.0.14 → sxs-2025.0.16}/.github/ISSUE_TEMPLATE/catalog-data-issue-template.md +0 -0
- {sxs-2025.0.14 → sxs-2025.0.16}/.github/dependabot.yml +0 -0
- {sxs-2025.0.14 → sxs-2025.0.16}/.github/scripts/parse_bump_rule.py +0 -0
- {sxs-2025.0.14 → sxs-2025.0.16}/.github/workflows/build.yml +0 -0
- {sxs-2025.0.14 → sxs-2025.0.16}/.github/workflows/pr_rtd_link.yml +0 -0
- {sxs-2025.0.14 → sxs-2025.0.16}/.gitignore +0 -0
- {sxs-2025.0.14 → sxs-2025.0.16}/.readthedocs.yaml +0 -0
- {sxs-2025.0.14 → sxs-2025.0.16}/LICENSE +0 -0
- {sxs-2025.0.14 → sxs-2025.0.16}/README.md +0 -0
- {sxs-2025.0.14 → sxs-2025.0.16}/docs/api/catalog.md +0 -0
- {sxs-2025.0.14 → sxs-2025.0.16}/docs/api/cite.md +0 -0
- {sxs-2025.0.14 → sxs-2025.0.16}/docs/api/horizons.md +0 -0
- {sxs-2025.0.14 → sxs-2025.0.16}/docs/api/load.md +0 -0
- {sxs-2025.0.14 → sxs-2025.0.16}/docs/api/metadata.md +0 -0
- {sxs-2025.0.14 → sxs-2025.0.16}/docs/api/simulation.md +0 -0
- {sxs-2025.0.14 → sxs-2025.0.16}/docs/api/simulations.md +0 -0
- {sxs-2025.0.14 → sxs-2025.0.16}/docs/api/time_series.md +0 -0
- {sxs-2025.0.14 → sxs-2025.0.16}/docs/api/waveforms.md +0 -0
- {sxs-2025.0.14 → sxs-2025.0.16}/docs/html/main.html +0 -0
- {sxs-2025.0.14 → sxs-2025.0.16}/docs/images/favicon.ico +0 -0
- {sxs-2025.0.14 → sxs-2025.0.16}/docs/index.md +0 -0
- {sxs-2025.0.14 → sxs-2025.0.16}/docs/javascript/mathjax.js +0 -0
- {sxs-2025.0.14 → sxs-2025.0.16}/docs/julia.md +0 -0
- {sxs-2025.0.14 → sxs-2025.0.16}/docs/mathematica.md +0 -0
- {sxs-2025.0.14 → sxs-2025.0.16}/docs/stylesheets/extra.css +0 -0
- {sxs-2025.0.14 → sxs-2025.0.16}/docs/tutorials/04-Waveforms.ipynb +0 -0
- {sxs-2025.0.14 → sxs-2025.0.16}/docs/tutorials/05-PreprocessingForFFTs.ipynb +0 -0
- {sxs-2025.0.14 → sxs-2025.0.16}/mkdocs.yml +0 -0
- {sxs-2025.0.14 → sxs-2025.0.16}/pyproject.toml +0 -0
- {sxs-2025.0.14 → sxs-2025.0.16}/sxs/__init__.py +0 -0
- {sxs-2025.0.14 → sxs-2025.0.16}/sxs/catalog/__init__.py +0 -0
- {sxs-2025.0.14 → sxs-2025.0.16}/sxs/catalog/catalog.py +0 -0
- {sxs-2025.0.14 → sxs-2025.0.16}/sxs/catalog/create.py +0 -0
- {sxs-2025.0.14 → sxs-2025.0.16}/sxs/catalog/description.py +0 -0
- {sxs-2025.0.14 → sxs-2025.0.16}/sxs/horizons/__init__.py +0 -0
- {sxs-2025.0.14 → sxs-2025.0.16}/sxs/horizons/spec_horizons_h5.py +0 -0
- {sxs-2025.0.14 → sxs-2025.0.16}/sxs/horizons/xor_multishuffle_bzip2.py +0 -0
- {sxs-2025.0.14 → sxs-2025.0.16}/sxs/julia/GWFrames.py +0 -0
- {sxs-2025.0.14 → sxs-2025.0.16}/sxs/julia/__init__.py +0 -0
- {sxs-2025.0.14 → sxs-2025.0.16}/sxs/juliapkg.json +0 -0
- {sxs-2025.0.14 → sxs-2025.0.16}/sxs/metadata/__init__.py +0 -0
- {sxs-2025.0.14 → sxs-2025.0.16}/sxs/metadata/metadata.py +0 -0
- {sxs-2025.0.14 → sxs-2025.0.16}/sxs/metadata/metric.py +0 -0
- {sxs-2025.0.14 → sxs-2025.0.16}/sxs/simulations/__init__.py +0 -0
- {sxs-2025.0.14 → sxs-2025.0.16}/sxs/simulations/analyze.py +0 -0
- {sxs-2025.0.14 → sxs-2025.0.16}/sxs/simulations/local.py +0 -0
- {sxs-2025.0.14 → sxs-2025.0.16}/sxs/simulations/simulation.py +0 -0
- {sxs-2025.0.14 → sxs-2025.0.16}/sxs/simulations/simulations.py +0 -0
- {sxs-2025.0.14 → sxs-2025.0.16}/sxs/time_series.py +0 -0
- {sxs-2025.0.14 → sxs-2025.0.16}/sxs/utilities/__init__.py +0 -0
- {sxs-2025.0.14 → sxs-2025.0.16}/sxs/utilities/bitwise.py +0 -0
- {sxs-2025.0.14 → sxs-2025.0.16}/sxs/utilities/decimation/__init__.py +0 -0
- {sxs-2025.0.14 → sxs-2025.0.16}/sxs/utilities/decimation/greedy_spline.py +0 -0
- {sxs-2025.0.14 → sxs-2025.0.16}/sxs/utilities/decimation/linear_bisection.py +0 -0
- {sxs-2025.0.14 → sxs-2025.0.16}/sxs/utilities/decimation/peak_greed.py +0 -0
- {sxs-2025.0.14 → sxs-2025.0.16}/sxs/utilities/decimation/suppression.py +0 -0
- {sxs-2025.0.14 → sxs-2025.0.16}/sxs/utilities/dicts.py +0 -0
- {sxs-2025.0.14 → sxs-2025.0.16}/sxs/utilities/downloads.py +0 -0
- {sxs-2025.0.14 → sxs-2025.0.16}/sxs/utilities/files.py +0 -0
- {sxs-2025.0.14 → sxs-2025.0.16}/sxs/utilities/formats.py +0 -0
- {sxs-2025.0.14 → sxs-2025.0.16}/sxs/utilities/inspire.py +0 -0
- {sxs-2025.0.14 → sxs-2025.0.16}/sxs/utilities/lvcnr/__init__.py +0 -0
- {sxs-2025.0.14 → sxs-2025.0.16}/sxs/utilities/lvcnr/comparisons.py +0 -0
- {sxs-2025.0.14 → sxs-2025.0.16}/sxs/utilities/lvcnr/conversion.py +0 -0
- {sxs-2025.0.14 → sxs-2025.0.16}/sxs/utilities/lvcnr/dataset.py +0 -0
- {sxs-2025.0.14 → sxs-2025.0.16}/sxs/utilities/lvcnr/horizons.py +0 -0
- {sxs-2025.0.14 → sxs-2025.0.16}/sxs/utilities/lvcnr/metadata.py +0 -0
- {sxs-2025.0.14 → sxs-2025.0.16}/sxs/utilities/lvcnr/waveform_amp_phase.py +0 -0
- {sxs-2025.0.14 → sxs-2025.0.16}/sxs/utilities/lvcnr/waveforms.py +0 -0
- {sxs-2025.0.14 → sxs-2025.0.16}/sxs/utilities/monotonicity.py +0 -0
- {sxs-2025.0.14 → sxs-2025.0.16}/sxs/utilities/pretty_print.py +0 -0
- {sxs-2025.0.14 → sxs-2025.0.16}/sxs/utilities/references/__init__.py +0 -0
- {sxs-2025.0.14 → sxs-2025.0.16}/sxs/utilities/references/ads.py +0 -0
- {sxs-2025.0.14 → sxs-2025.0.16}/sxs/utilities/references/arxiv.py +0 -0
- {sxs-2025.0.14 → sxs-2025.0.16}/sxs/utilities/references/fairchild_report.py +0 -0
- {sxs-2025.0.14 → sxs-2025.0.16}/sxs/utilities/references/inspire.py +0 -0
- {sxs-2025.0.14 → sxs-2025.0.16}/sxs/utilities/references/journal_abbreviations.py +0 -0
- {sxs-2025.0.14 → sxs-2025.0.16}/sxs/utilities/references/references.py +0 -0
- {sxs-2025.0.14 → sxs-2025.0.16}/sxs/utilities/select.py +0 -0
- {sxs-2025.0.14 → sxs-2025.0.16}/sxs/utilities/smooth_functions.py +0 -0
- {sxs-2025.0.14 → sxs-2025.0.16}/sxs/utilities/string_converters.py +0 -0
- {sxs-2025.0.14 → sxs-2025.0.16}/sxs/utilities/sxs_directories.py +0 -0
- {sxs-2025.0.14 → sxs-2025.0.16}/sxs/utilities/sxs_identifiers.py +0 -0
- {sxs-2025.0.14 → sxs-2025.0.16}/sxs/utilities/url.py +0 -0
- {sxs-2025.0.14 → sxs-2025.0.16}/sxs/waveforms/__init__.py +0 -0
- {sxs-2025.0.14 → sxs-2025.0.16}/sxs/waveforms/alignment.py +0 -0
- {sxs-2025.0.14 → sxs-2025.0.16}/sxs/waveforms/format_handlers/__init__.py +0 -0
- {sxs-2025.0.14 → sxs-2025.0.16}/sxs/waveforms/format_handlers/grathena.py +0 -0
- {sxs-2025.0.14 → sxs-2025.0.16}/sxs/waveforms/format_handlers/lvc.py +0 -0
- {sxs-2025.0.14 → sxs-2025.0.16}/sxs/waveforms/format_handlers/nrar.py +0 -0
- {sxs-2025.0.14 → sxs-2025.0.16}/sxs/waveforms/format_handlers/rotating_paired_diff_multishuffle_bzip2.py +0 -0
- {sxs-2025.0.14 → sxs-2025.0.16}/sxs/waveforms/format_handlers/rotating_paired_xor_multishuffle_bzip2.py +0 -0
- {sxs-2025.0.14 → sxs-2025.0.16}/sxs/waveforms/format_handlers/spectre_cce_v1.py +0 -0
- {sxs-2025.0.14 → sxs-2025.0.16}/sxs/waveforms/memory.py +0 -0
- {sxs-2025.0.14 → sxs-2025.0.16}/sxs/waveforms/mode_utilities.py +0 -0
- {sxs-2025.0.14 → sxs-2025.0.16}/sxs/waveforms/norms.py +0 -0
- {sxs-2025.0.14 → sxs-2025.0.16}/sxs/waveforms/transformations.py +0 -0
- {sxs-2025.0.14 → sxs-2025.0.16}/sxs/waveforms/waveform_grid.py +0 -0
- {sxs-2025.0.14 → sxs-2025.0.16}/sxs/waveforms/waveform_mixin.py +0 -0
- {sxs-2025.0.14 → sxs-2025.0.16}/sxs/waveforms/waveform_modes.py +0 -0
- {sxs-2025.0.14 → sxs-2025.0.16}/sxs/waveforms/waveform_mts.py +0 -0
- {sxs-2025.0.14 → sxs-2025.0.16}/sxs/waveforms/waveform_signal.py +0 -0
- {sxs-2025.0.14 → sxs-2025.0.16}/sxs/zenodo/__init__.py +0 -0
- {sxs-2025.0.14 → sxs-2025.0.16}/sxs/zenodo/api/__init__.py +0 -0
- {sxs-2025.0.14 → sxs-2025.0.16}/sxs/zenodo/api/deposit.py +0 -0
- {sxs-2025.0.14 → sxs-2025.0.16}/sxs/zenodo/api/login.py +0 -0
- {sxs-2025.0.14 → sxs-2025.0.16}/sxs/zenodo/api/records.py +0 -0
- {sxs-2025.0.14 → sxs-2025.0.16}/sxs/zenodo/catalog.py +0 -0
- {sxs-2025.0.14 → sxs-2025.0.16}/sxs/zenodo/creators.py +0 -0
- {sxs-2025.0.14 → sxs-2025.0.16}/sxs/zenodo/simannex.py +0 -0
- {sxs-2025.0.14 → sxs-2025.0.16}/sxs/zenodo/surrogatemodeling.py +0 -0
- {sxs-2025.0.14 → sxs-2025.0.16}/tests/__init__.py +0 -0
- {sxs-2025.0.14 → sxs-2025.0.16}/tests/conftest.py +0 -0
- {sxs-2025.0.14 → sxs-2025.0.16}/tests/test_alignment.py +0 -0
- {sxs-2025.0.14 → sxs-2025.0.16}/tests/test_catalog.py +0 -0
- {sxs-2025.0.14 → sxs-2025.0.16}/tests/test_horizons.py +0 -0
- {sxs-2025.0.14 → sxs-2025.0.16}/tests/test_julia.py +0 -0
- {sxs-2025.0.14 → sxs-2025.0.16}/tests/test_loader.py +0 -0
- {sxs-2025.0.14 → sxs-2025.0.16}/tests/test_metadata.py +0 -0
- {sxs-2025.0.14 → sxs-2025.0.16}/tests/test_time_series.py +0 -0
- {sxs-2025.0.14 → sxs-2025.0.16}/tests/test_transformations.py +0 -0
- {sxs-2025.0.14 → sxs-2025.0.16}/tests/test_waveform_rotations.py +0 -0
- {sxs-2025.0.14 → sxs-2025.0.16}/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.16
|
|
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/
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
"source": [
|
|
7
7
|
"# Introduction\n",
|
|
8
8
|
"\n",
|
|
9
|
-
"This series of notebooks describes the `sxs` python package, which provides an interface to the data produced by the Simulating eXtreme Spacetimes collaboration. All that data is hosted on [Zenodo](https://zenodo.org/communities/sxs) and [CaltechDATA](https://data.caltech.edu/). Each simulation gets its own DOI and its own web page — like [
|
|
9
|
+
"This series of notebooks describes the `sxs` python package, which provides an interface to the data produced by the Simulating eXtreme Spacetimes collaboration. All that data is hosted on [Zenodo](https://zenodo.org/communities/sxs) and [CaltechDATA](https://data.caltech.edu/). Each simulation gets its own DOI and its own web page — like [DOI 10.26138/SXS:BBH:4001](https://doi.org/10.26138/SXS:BBH:4001), for example, which redirects to its CaltechDATA page. But you want an easier way to get the data than clicking on links. This package will do that for you.\n",
|
|
10
10
|
"\n",
|
|
11
11
|
"The documentation is [here](https://sxs.readthedocs.io/en/main/). The github page is [here](https://github.com/sxs-collaboration/sxs/). Please feel free to open issues to report problems, or pull requests to fix them."
|
|
12
12
|
]
|
|
@@ -251,10 +251,10 @@
|
|
|
251
251
|
"\n",
|
|
252
252
|
"It is probably best to go through these notebooks in order:\n",
|
|
253
253
|
"\n",
|
|
254
|
-
" 1. [The catalog `DataFrame` interface](
|
|
255
|
-
" 2. [The `Simulation` interface](
|
|
256
|
-
" 3. [Data describing `Horizons`](
|
|
257
|
-
" 4. [Introduction to `WaveformModes` objects](
|
|
254
|
+
" 1. [The catalog `DataFrame` interface](../01-Catalog_Dataframe)\n",
|
|
255
|
+
" 2. [The `Simulation` interface](../02-Simulation)\n",
|
|
256
|
+
" 3. [Data describing `Horizons`](../03-Horizons)\n",
|
|
257
|
+
" 4. [Introduction to `WaveformModes` objects](../04-Waveforms)"
|
|
258
258
|
]
|
|
259
259
|
}
|
|
260
260
|
],
|
|
@@ -3345,7 +3345,7 @@
|
|
|
3345
3345
|
"source": [
|
|
3346
3346
|
"The `simulations` object, especially when agumented with the `dataframe`, provides powerful methods for selecting the particular simulations we are interested in. Once we have done so, we need to load and interact with the simulations.\n",
|
|
3347
3347
|
"\n",
|
|
3348
|
-
"Continue with the [introduction to the `Simulation` objects](
|
|
3348
|
+
"Continue with the [introduction to the `Simulation` objects](../02-Simulation)."
|
|
3349
3349
|
]
|
|
3350
3350
|
}
|
|
3351
3351
|
],
|
|
@@ -664,8 +664,8 @@
|
|
|
664
664
|
"source": [
|
|
665
665
|
"The objects returned will be the subject of the next two notebooks in this series:\n",
|
|
666
666
|
"\n",
|
|
667
|
-
"- [`Horizons`](
|
|
668
|
-
"- [`WaveformModes`](
|
|
667
|
+
"- [`Horizons`](../03-Horizons)\n",
|
|
668
|
+
"- [`WaveformModes`](../04-Waveforms)"
|
|
669
669
|
]
|
|
670
670
|
}
|
|
671
671
|
],
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
__version__ = "2025.0.16"
|
|
@@ -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.14/sxs/__version__.py
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
__version__ = "2025.0.14"
|
|
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
|