sxs 2024.0.15__py3-none-any.whl → 2024.0.16__py3-none-any.whl
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/__version__.py +1 -1
- sxs/handlers.py +10 -5
- sxs/simulations/simulations.py +28 -19
- {sxs-2024.0.15.dist-info → sxs-2024.0.16.dist-info}/METADATA +1 -1
- {sxs-2024.0.15.dist-info → sxs-2024.0.16.dist-info}/RECORD +7 -7
- {sxs-2024.0.15.dist-info → sxs-2024.0.16.dist-info}/WHEEL +0 -0
- {sxs-2024.0.15.dist-info → sxs-2024.0.16.dist-info}/licenses/LICENSE +0 -0
sxs/__version__.py
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
__version__ = "2024.0.
|
|
1
|
+
__version__ = "2024.0.16"
|
sxs/handlers.py
CHANGED
|
@@ -281,13 +281,18 @@ def load(location, download=None, cache=None, progress=None, truepath=None, **kw
|
|
|
281
281
|
return Catalog.load(download=download)
|
|
282
282
|
|
|
283
283
|
elif location == "simulations":
|
|
284
|
-
return Simulations.load(
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
284
|
+
return Simulations.load(
|
|
285
|
+
download=download,
|
|
286
|
+
local=kwargs.get("local", False),
|
|
287
|
+
annex_dir=kwargs.get("annex_dir", None)
|
|
288
|
+
)
|
|
288
289
|
|
|
289
290
|
elif location == "dataframe":
|
|
290
|
-
return Simulations.load(
|
|
291
|
+
return Simulations.load(
|
|
292
|
+
download=download,
|
|
293
|
+
local=kwargs.get("local", False),
|
|
294
|
+
annex_dir=kwargs.get("annex_dir", None)
|
|
295
|
+
).dataframe
|
|
291
296
|
|
|
292
297
|
elif sxs_id_version_lev_exact_re.match(location):
|
|
293
298
|
return Simulation(location, download=download, cache=cache, progress=progress, **kwargs)
|
sxs/simulations/simulations.py
CHANGED
|
@@ -174,36 +174,45 @@ class Simulations(collections.OrderedDict):
|
|
|
174
174
|
return simulations
|
|
175
175
|
|
|
176
176
|
@classmethod
|
|
177
|
-
def load(cls, download=None, *, local=False):
|
|
177
|
+
def load(cls, download=None, *, local=False, annex_dir=None):
|
|
178
178
|
"""Load the catalog of SXS simulations
|
|
179
179
|
|
|
180
|
-
Note that — unlike most SXS data files — the simulations file
|
|
181
|
-
frequently. As a result, this function — unlike
|
|
182
|
-
SXS data files — will download
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
180
|
+
Note that — unlike most SXS data files — the simulations file
|
|
181
|
+
is updated frequently. As a result, this function — unlike
|
|
182
|
+
the loading functions for most SXS data files — will download
|
|
183
|
+
the simulations by default each time it is called. However,
|
|
184
|
+
also note that this function is itself cached, meaning that
|
|
185
|
+
the same dict will be returned on each call in a given python
|
|
186
|
+
session. If you want to avoid that behavior, use
|
|
187
|
+
`Simulations.reload`.
|
|
186
188
|
|
|
187
189
|
Parameters
|
|
188
190
|
----------
|
|
189
191
|
download : {None, bool}, optional
|
|
190
|
-
If False, this function will look for the simulations in
|
|
191
|
-
raise an error if it is not found. If
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
cache
|
|
192
|
+
If False, this function will look for the simulations in
|
|
193
|
+
the sxs cache and raise an error if it is not found. If
|
|
194
|
+
True, this function will download the simulations and
|
|
195
|
+
raise an error if the download fails. If None (the
|
|
196
|
+
default), it will try to download the file, warn but fall
|
|
197
|
+
back to the cache if that fails, and only raise an error
|
|
198
|
+
if the simulations is not found in the cache. Note that
|
|
199
|
+
this ignores the sxs configuration file entirely.
|
|
196
200
|
|
|
197
201
|
Keyword-only Parameters
|
|
198
202
|
-----------------------
|
|
199
203
|
local : {None, bool}, optional
|
|
200
|
-
If True, this function will load local simulations from
|
|
201
|
-
prepare the cache, you may wish to call
|
|
204
|
+
If True, this function will load local simulations from
|
|
205
|
+
the sxs cache. To prepare the cache, you may wish to call
|
|
206
|
+
`sxs.write_local_simulations`.
|
|
207
|
+
annex_dir : {None, str, Path}, optional
|
|
208
|
+
If provided and `local=True`, this function will load
|
|
209
|
+
local simulations from the given directory. This is
|
|
210
|
+
equivalent to calling `Simulations.local(directory)`.
|
|
202
211
|
|
|
203
212
|
See Also
|
|
204
213
|
--------
|
|
205
|
-
sxs.sxs_directory : Locate cache directory
|
|
206
|
-
|
|
214
|
+
sxs.sxs_directory : Locate cache directory Simulations.reload
|
|
215
|
+
: Avoid caching the result of this function
|
|
207
216
|
|
|
208
217
|
"""
|
|
209
218
|
from datetime import datetime, timezone
|
|
@@ -215,8 +224,8 @@ class Simulations(collections.OrderedDict):
|
|
|
215
224
|
if hasattr(cls, "_simulations"):
|
|
216
225
|
return cls._simulations
|
|
217
226
|
|
|
218
|
-
if local:
|
|
219
|
-
cls._simulations = cls.local(download=download)
|
|
227
|
+
if local or annex_dir is not None:
|
|
228
|
+
cls._simulations = cls.local(annex_dir, download=download)
|
|
220
229
|
return cls._simulations
|
|
221
230
|
|
|
222
231
|
progress = read_config("download_progress", True)
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.3
|
|
2
2
|
Name: sxs
|
|
3
|
-
Version: 2024.0.
|
|
3
|
+
Version: 2024.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/
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
sxs/__init__.py,sha256=hbydsXWR88sFiKExPJ1NHWGEvWRbbJBjSc1irSMYKgY,2623
|
|
2
|
-
sxs/__version__.py,sha256=
|
|
3
|
-
sxs/handlers.py,sha256=
|
|
2
|
+
sxs/__version__.py,sha256=Y9aaAFW7eTBLUBcBXdQZd1KNgLbPAplcEe8kdPULxS4,26
|
|
3
|
+
sxs/handlers.py,sha256=7x6LeBR7nYwq83ObL9KS9UsZ1qxd7yvOsjmQarhUHro,17045
|
|
4
4
|
sxs/juliapkg.json,sha256=higH1UDu30K_PN6-o7lAz0j1xjgYEiCCYBAc-Iaw1Iw,178
|
|
5
5
|
sxs/time_series.py,sha256=OKaLg8tFyrtKcef7900ri-a0C6A8wKxA68KovZXvH6I,41081
|
|
6
6
|
sxs/caltechdata/__init__.py,sha256=s-RXyBiImKsQenqJIU6NAjlsjOX7f1MkIIW9rPtWYyg,14761
|
|
@@ -20,7 +20,7 @@ sxs/metadata/metadata.py,sha256=y6X7LcsJKiZFjBPTwRHGtsT2uHf2s0r0OG_EGjD27pE,2766
|
|
|
20
20
|
sxs/simulations/__init__.py,sha256=GrZym0PHTULDg_hyFmISNzDfqVLz_hQo-djbgecZs54,134
|
|
21
21
|
sxs/simulations/local.py,sha256=CEu8PzumNB1-JA05M4tYSW_UZVrldKzOB5T_I3pFWls,5789
|
|
22
22
|
sxs/simulations/simulation.py,sha256=UN7cQ8y1Ccr3TPI8TyMAr9hvzQuM8NcitqXJJ0IXNPs,34110
|
|
23
|
-
sxs/simulations/simulations.py,sha256=
|
|
23
|
+
sxs/simulations/simulations.py,sha256=8R3EVfq0OLT2wAE5vjLbx4gCte79M7depb-SB6PLSRU,21971
|
|
24
24
|
sxs/utilities/__init__.py,sha256=KTtsBKblP02t20anSzV_7tucRUw_bFObY5my5ZuJEBU,4793
|
|
25
25
|
sxs/utilities/bitwise.py,sha256=G9ZNYgwDQRhq5wbDf-p2HcUqkEP_IRDiQoXW4KyU17k,13205
|
|
26
26
|
sxs/utilities/dicts.py,sha256=CCpm3upG_9SRj9gjawukSUfaJ5asF-XRG2ausEXhYyg,695
|
|
@@ -79,7 +79,7 @@ sxs/zenodo/api/__init__.py,sha256=EM_eh4Q8R5E0vIfMhyIR1IYFfOBu6vA0UTasgX9gHys,21
|
|
|
79
79
|
sxs/zenodo/api/deposit.py,sha256=J4RGvGjh0cEOrN4bBZWEDcPAhNscqB2fzLlvRZ5HTHM,36948
|
|
80
80
|
sxs/zenodo/api/login.py,sha256=Yz0ytgi81_5BpDzhrS0WPMXlvU2qUaCK8yn8zxfEbko,18007
|
|
81
81
|
sxs/zenodo/api/records.py,sha256=nKkhoHZ95CTztHF9Zzaug5p7IiUCJG4Em1i-l-WqH6U,3689
|
|
82
|
-
sxs-2024.0.
|
|
83
|
-
sxs-2024.0.
|
|
84
|
-
sxs-2024.0.
|
|
85
|
-
sxs-2024.0.
|
|
82
|
+
sxs-2024.0.16.dist-info/METADATA,sha256=rIJB0m7egc53y17106x0JYCZlwo1PmDcT-UVwRf3TDI,9245
|
|
83
|
+
sxs-2024.0.16.dist-info/WHEEL,sha256=1yFddiXMmvYK7QYTqtRNtX66WJ0Mz8PYEiEUoOUUxRY,87
|
|
84
|
+
sxs-2024.0.16.dist-info/licenses/LICENSE,sha256=ptVOd5m7LDM5ZF0x32cxb8c2Nd5NDmAhy6DX7xt_7VA,1080
|
|
85
|
+
sxs-2024.0.16.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|