sxs 2024.0.44__py3-none-any.whl → 2024.0.45__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 CHANGED
@@ -1 +1 @@
1
- __version__ = "2024.0.44"
1
+ __version__ = "2024.0.45"
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.json"
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
- try:
85
- download_file(cls.url, temp_json, progress=progress, if_newer=if_newer)
86
- except Exception as e:
87
- if download:
88
- raise RuntimeError(f"Failed to download '{cls.url}'; try setting `download=False`") from e
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: 2024.0.44
3
+ Version: 2024.0.45
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,5 +1,5 @@
1
1
  sxs/__init__.py,sha256=hbydsXWR88sFiKExPJ1NHWGEvWRbbJBjSc1irSMYKgY,2623
2
- sxs/__version__.py,sha256=VkT9SDxmqx5TY0atB540yqsbLb0xRC7qK2gKY9KwH-8,26
2
+ sxs/__version__.py,sha256=_9lez8F-P5_DyC5BnNYRR80QCTJTvii8eLWtZFGFjkg,26
3
3
  sxs/handlers.py,sha256=Lu3rY7jHn3jEwnUDHVZgZIv1-3AAPAXD61baZAO49a8,17909
4
4
  sxs/juliapkg.json,sha256=-baaa3Za_KBmmiGjlh2YYLWmvUvZl6GaKKXwNI4S7qU,178
5
5
  sxs/time_series.py,sha256=OKaLg8tFyrtKcef7900ri-a0C6A8wKxA68KovZXvH6I,41081
@@ -7,7 +7,7 @@ sxs/caltechdata/__init__.py,sha256=pvyc2Djch4DA6t06op-0NSTegrMSywzNi7Z3W_91-Cg,1
7
7
  sxs/caltechdata/catalog.py,sha256=E2nystCaMZLKxTlLgfbfpGkckfkLyIzhn3YeEI3nQYc,4914
8
8
  sxs/caltechdata/login.py,sha256=JaNyawXLSq37R1qbGM0fuTbfXmbHHnixEzU7nhwAGeE,21546
9
9
  sxs/catalog/__init__.py,sha256=9-WTMTPDmqqkFyIHOtEbPA6etXm3_RSRrLWvHtLrjLg,205
10
- sxs/catalog/catalog.py,sha256=3sUNREH-eyNwtjBVW9MKih_B6hHooPj_I1OYxP_adao,26804
10
+ sxs/catalog/catalog.py,sha256=R2tO7kpIqBgobvk9tDsvHTYNTH432dlWDrMiBL5g8Nk,25562
11
11
  sxs/catalog/create.py,sha256=KL3zHljdLADeLfTDMTSkcVjIFim92Ylc-ziEvpiflEU,4734
12
12
  sxs/catalog/description.py,sha256=4eHMde4oGNp69jRmXCsfrIYJ4WK5HYgYFgXyF5htLDM,10830
13
13
  sxs/horizons/__init__.py,sha256=f7Zfkj9-r-4IOa-LFuqvChxLDMz6nNiAjsjXCG_uWw0,19194
@@ -82,7 +82,7 @@ sxs/zenodo/api/__init__.py,sha256=EM_eh4Q8R5E0vIfMhyIR1IYFfOBu6vA0UTasgX9gHys,21
82
82
  sxs/zenodo/api/deposit.py,sha256=J4RGvGjh0cEOrN4bBZWEDcPAhNscqB2fzLlvRZ5HTHM,36948
83
83
  sxs/zenodo/api/login.py,sha256=Yz0ytgi81_5BpDzhrS0WPMXlvU2qUaCK8yn8zxfEbko,18007
84
84
  sxs/zenodo/api/records.py,sha256=nKkhoHZ95CTztHF9Zzaug5p7IiUCJG4Em1i-l-WqH6U,3689
85
- sxs-2024.0.44.dist-info/METADATA,sha256=T73d-Ee58PLzfKUG8mM4fBxZ_r3C3mFQAB-oP-fS8rk,9253
86
- sxs-2024.0.44.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
87
- sxs-2024.0.44.dist-info/licenses/LICENSE,sha256=ptVOd5m7LDM5ZF0x32cxb8c2Nd5NDmAhy6DX7xt_7VA,1080
88
- sxs-2024.0.44.dist-info/RECORD,,
85
+ sxs-2024.0.45.dist-info/METADATA,sha256=KQfQa6TWChYuOobDSKiswEO9JoxG6W1_PGKL-pvXmis,9253
86
+ sxs-2024.0.45.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
87
+ sxs-2024.0.45.dist-info/licenses/LICENSE,sha256=ptVOd5m7LDM5ZF0x32cxb8c2Nd5NDmAhy6DX7xt_7VA,1080
88
+ sxs-2024.0.45.dist-info/RECORD,,