sxs 2025.0.17__py3-none-any.whl → 2025.0.18__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/catalog/catalog.py +9 -30
- {sxs-2025.0.17.dist-info → sxs-2025.0.18.dist-info}/METADATA +1 -1
- {sxs-2025.0.17.dist-info → sxs-2025.0.18.dist-info}/RECORD +7 -7
- {sxs-2025.0.17.dist-info → sxs-2025.0.18.dist-info}/WHEEL +0 -0
- {sxs-2025.0.17.dist-info → sxs-2025.0.18.dist-info}/entry_points.txt +0 -0
- {sxs-2025.0.17.dist-info → sxs-2025.0.18.dist-info}/licenses/LICENSE +0 -0
sxs/__version__.py
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
__version__ = "2025.0.
|
|
1
|
+
__version__ = "2025.0.18"
|
sxs/catalog/catalog.py
CHANGED
|
@@ -6,7 +6,7 @@ import functools
|
|
|
6
6
|
# noinspection SpellCheckingInspection
|
|
7
7
|
class Catalog(object):
|
|
8
8
|
"""Container interface to the SXS catalog"""
|
|
9
|
-
url = "https://data.black-holes.org/catalog.
|
|
9
|
+
url = "https://data.black-holes.org/catalog.zip"
|
|
10
10
|
|
|
11
11
|
def __init__(self, catalog=None, **kwargs):
|
|
12
12
|
from .. import Metadata
|
|
@@ -60,6 +60,9 @@ class Catalog(object):
|
|
|
60
60
|
which, as of `sxs` version 2024.0.0, has been deprecated in
|
|
61
61
|
favor of the `Simulations` interface. See the documentation
|
|
62
62
|
for more information.
|
|
63
|
+
|
|
64
|
+
THIS CAN ONLY PROVIDE OLD DATA!
|
|
65
|
+
|
|
63
66
|
"""
|
|
64
67
|
warn(deprecation_notice)
|
|
65
68
|
|
|
@@ -73,36 +76,12 @@ class Catalog(object):
|
|
|
73
76
|
if_newer = False
|
|
74
77
|
|
|
75
78
|
if download or download is None:
|
|
76
|
-
# 1. Download the full json file (zipped in flight, but auto-decompressed on arrival)
|
|
77
|
-
# 2. Zip to a temporary file (using bzip2, which is better than the in-flight compression)
|
|
78
|
-
# 3. Replace the original catalog.zip with the temporary zip file
|
|
79
|
-
# 4. Remove the full json file
|
|
80
|
-
# 5. Make sure the temporary zip file is gone too
|
|
81
|
-
temp_json = cache_path.with_suffix(".temp.json")
|
|
82
|
-
temp_zip = cache_path.with_suffix(".temp.zip")
|
|
83
79
|
try:
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
download_failed = e # We'll try the cache
|
|
90
|
-
else:
|
|
91
|
-
download_failed = False
|
|
92
|
-
if temp_json.exists():
|
|
93
|
-
with zipfile.ZipFile(temp_zip, "w", compression=zipfile.ZIP_BZIP2) as catalog_zip:
|
|
94
|
-
catalog_zip.write(temp_json, arcname="catalog.json")
|
|
95
|
-
temp_zip.replace(cache_path)
|
|
96
|
-
finally:
|
|
97
|
-
# The `missing_ok` argument to `unlink` would be much nicer, but was added in python 3.8
|
|
98
|
-
try:
|
|
99
|
-
temp_json.unlink()
|
|
100
|
-
except FileNotFoundError as e:
|
|
101
|
-
pass
|
|
102
|
-
try:
|
|
103
|
-
temp_zip.unlink()
|
|
104
|
-
except FileNotFoundError as e:
|
|
105
|
-
pass
|
|
80
|
+
download_file(cls.url, cache_path, progress=progress, if_newer=if_newer)
|
|
81
|
+
except Exception as e:
|
|
82
|
+
if download:
|
|
83
|
+
raise RuntimeError(f"Failed to download '{cls.url}'; try setting `download=False`") from e
|
|
84
|
+
download_failed = e # We'll try the cache
|
|
106
85
|
|
|
107
86
|
if not cache_path.exists():
|
|
108
87
|
if download is False: # Test if it literally *is* False, rather than just casts to False
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: sxs
|
|
3
|
-
Version: 2025.0.
|
|
3
|
+
Version: 2025.0.18
|
|
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,11 +1,11 @@
|
|
|
1
1
|
sxs/__init__.py,sha256=C8VhmrUPAa70Y-C2KfZv9BhS6ef-eB7uaNtwm18IRhk,2637
|
|
2
|
-
sxs/__version__.py,sha256
|
|
2
|
+
sxs/__version__.py,sha256=Zp8-5A0uO7ej2Pvo61c5zj8bbXO39g6v_i7hfxUerOA,26
|
|
3
3
|
sxs/citation.py,sha256=QAiRnasTXpufZCaoxTKR5ESSJQ2ww7FgWyxoaaAQifw,7167
|
|
4
4
|
sxs/handlers.py,sha256=rUS0TmbewpllnZHkS5TXCx6nxGA-E8xrBGLlejBPEAg,18820
|
|
5
5
|
sxs/juliapkg.json,sha256=-baaa3Za_KBmmiGjlh2YYLWmvUvZl6GaKKXwNI4S7qU,178
|
|
6
6
|
sxs/time_series.py,sha256=OKaLg8tFyrtKcef7900ri-a0C6A8wKxA68KovZXvH6I,41081
|
|
7
7
|
sxs/catalog/__init__.py,sha256=9-WTMTPDmqqkFyIHOtEbPA6etXm3_RSRrLWvHtLrjLg,205
|
|
8
|
-
sxs/catalog/catalog.py,sha256=
|
|
8
|
+
sxs/catalog/catalog.py,sha256=R2tO7kpIqBgobvk9tDsvHTYNTH432dlWDrMiBL5g8Nk,25562
|
|
9
9
|
sxs/catalog/create.py,sha256=KL3zHljdLADeLfTDMTSkcVjIFim92Ylc-ziEvpiflEU,4734
|
|
10
10
|
sxs/catalog/description.py,sha256=4eHMde4oGNp69jRmXCsfrIYJ4WK5HYgYFgXyF5htLDM,10830
|
|
11
11
|
sxs/horizons/__init__.py,sha256=f7Zfkj9-r-4IOa-LFuqvChxLDMz6nNiAjsjXCG_uWw0,19194
|
|
@@ -83,8 +83,8 @@ sxs/zenodo/api/__init__.py,sha256=EM_eh4Q8R5E0vIfMhyIR1IYFfOBu6vA0UTasgX9gHys,21
|
|
|
83
83
|
sxs/zenodo/api/deposit.py,sha256=J4RGvGjh0cEOrN4bBZWEDcPAhNscqB2fzLlvRZ5HTHM,36948
|
|
84
84
|
sxs/zenodo/api/login.py,sha256=hXyxLrx1PALaEEH76XrBvlO5Wwz-qa-MCjkI8UyB3t0,18005
|
|
85
85
|
sxs/zenodo/api/records.py,sha256=nKkhoHZ95CTztHF9Zzaug5p7IiUCJG4Em1i-l-WqH6U,3689
|
|
86
|
-
sxs-2025.0.
|
|
87
|
-
sxs-2025.0.
|
|
88
|
-
sxs-2025.0.
|
|
89
|
-
sxs-2025.0.
|
|
90
|
-
sxs-2025.0.
|
|
86
|
+
sxs-2025.0.18.dist-info/METADATA,sha256=BpOnDzYH5t6ge6s_RpYnTVUq8qBjOmMWEZ4KPPIlYH4,13214
|
|
87
|
+
sxs-2025.0.18.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
|
88
|
+
sxs-2025.0.18.dist-info/entry_points.txt,sha256=51VqSnJT5UOMI4RilR9giG9DNrIDgnsSkuNuYldEnTs,89
|
|
89
|
+
sxs-2025.0.18.dist-info/licenses/LICENSE,sha256=ptVOd5m7LDM5ZF0x32cxb8c2Nd5NDmAhy6DX7xt_7VA,1080
|
|
90
|
+
sxs-2025.0.18.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|