sxs 2024.0.17__py3-none-any.whl → 2024.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 CHANGED
@@ -1 +1 @@
1
- __version__ = "2024.0.17"
1
+ __version__ = "2024.0.18"
sxs/handlers.py CHANGED
@@ -236,7 +236,7 @@ def load(location, download=None, cache=None, progress=None, truepath=None, **kw
236
236
  import pathlib
237
237
  import urllib.request
238
238
  from . import Simulations, Simulation, read_config, sxs_directory, Catalog
239
- from .utilities import url, download_file, sxs_path_to_system_path, sxs_id_version_lev_exact_re
239
+ from .utilities import url, download_file, sxs_path_to_system_path, sxs_id_version_lev_exact_re, lev_path_re
240
240
 
241
241
  # Note: `download` and/or `cache` may still be `None` after this
242
242
  if download is None:
@@ -298,6 +298,17 @@ def load(location, download=None, cache=None, progress=None, truepath=None, **kw
298
298
  return Simulation(location, download=download, cache=cache, progress=progress, **kwargs)
299
299
 
300
300
  else:
301
+ # Try to find an appropriate SXS file in the simulations
302
+ simulations = Simulations.load(
303
+ download=download,
304
+ local=kwargs.get("local", False),
305
+ annex_dir=kwargs.get("annex_dir", None)
306
+ )
307
+ if lev_path_re.sub("", location) in simulations:
308
+ return Simulation(
309
+ location, download=download, cache=cache, progress=progress, **kwargs
310
+ )
311
+
301
312
  # Try to find an appropriate SXS file in the catalog
302
313
  catalog = Catalog.load(download=download)
303
314
  selections = catalog.select_files(location)
@@ -119,6 +119,8 @@ def Simulation(location, *args, **kwargs):
119
119
  series = simulations.dataframe.loc[simulation_id]
120
120
 
121
121
  # Check if the specified version exists in the simulation catalog
122
+ if not hasattr(metadata, "DOI_versions"):
123
+ input_version = "v0.0"
122
124
  if input_version != "v0.0" and input_version not in metadata.DOI_versions:
123
125
  raise ValueError(f"Version '{input_version}' not found in simulation catalog for '{simulation_id}'")
124
126
 
sxs/utilities/__init__.py CHANGED
@@ -16,7 +16,7 @@ from .downloads import download_file
16
16
  from .bitwise import diff, xor, multishuffle
17
17
  from .sxs_identifiers import (
18
18
  sxs_identifier_regex, sxs_identifier_re,
19
- lev_regex, lev_re,
19
+ lev_regex, lev_re, lev_path_re,
20
20
  sxs_id_version_lev_regex, sxs_id_version_lev_re,
21
21
  sxs_id_version_lev_exact_regex, sxs_id_version_lev_exact_re,
22
22
  sxs_path_regex, sxs_path_re,
@@ -18,6 +18,7 @@ sxs_path_regex = sxs_id_version_lev_regex + rf"(?:{sep_regex}{file_regex})?"
18
18
 
19
19
  sxs_identifier_re = re.compile(sxs_identifier_regex)
20
20
  lev_re = re.compile(lev_regex)
21
+ lev_path_re = re.compile(f"{sep_regex}{lev_regex}")
21
22
  sxs_id_version_lev_re = re.compile(sxs_id_version_lev_regex)
22
23
  sxs_id_version_lev_exact_re = re.compile(sxs_id_version_lev_exact_regex)
23
24
  sxs_path_re = re.compile(sxs_path_regex)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: sxs
3
- Version: 2024.0.17
3
+ Version: 2024.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,6 +1,6 @@
1
1
  sxs/__init__.py,sha256=hbydsXWR88sFiKExPJ1NHWGEvWRbbJBjSc1irSMYKgY,2623
2
- sxs/__version__.py,sha256=ILsjB_7PioQZM3Oce4nnCGkzOQaSL5GLwuZYaQfT8zk,26
3
- sxs/handlers.py,sha256=7x6LeBR7nYwq83ObL9KS9UsZ1qxd7yvOsjmQarhUHro,17045
2
+ sxs/__version__.py,sha256=azdCDT3ktM4BaKnUzpwFNRXrkMHbYmM9S-ljaxcAThw,26
3
+ sxs/handlers.py,sha256=Nc1_aDKm_wDHg2cITI_ljbqU4VRWpwQ7fdgy3c1XcE8,17531
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
@@ -19,9 +19,9 @@ sxs/metadata/__init__.py,sha256=KCvJ9Cf1WhIZp-z28UzarKcmUAzV2BOv2gqKiorILjo,149
19
19
  sxs/metadata/metadata.py,sha256=y6X7LcsJKiZFjBPTwRHGtsT2uHf2s0r0OG_EGjD27pE,27663
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
- sxs/simulations/simulation.py,sha256=YQmHdi48nrSK8iKtqIxAZptLCHvq1oMJ8EOQetukn9o,34127
22
+ sxs/simulations/simulation.py,sha256=R2Nf3z3XEu92-oiHLeynGMpjqQu5iYV25L8K9lFrOcY,34204
23
23
  sxs/simulations/simulations.py,sha256=8R3EVfq0OLT2wAE5vjLbx4gCte79M7depb-SB6PLSRU,21971
24
- sxs/utilities/__init__.py,sha256=KTtsBKblP02t20anSzV_7tucRUw_bFObY5my5ZuJEBU,4793
24
+ sxs/utilities/__init__.py,sha256=WSStlqljfgQheMxHGfuofSc5LdmASGvO3FNO3f_zaT0,4806
25
25
  sxs/utilities/bitwise.py,sha256=G9ZNYgwDQRhq5wbDf-p2HcUqkEP_IRDiQoXW4KyU17k,13205
26
26
  sxs/utilities/dicts.py,sha256=CCpm3upG_9SRj9gjawukSUfaJ5asF-XRG2ausEXhYyg,695
27
27
  sxs/utilities/downloads.py,sha256=iBceWfahHKxslUuI3p2-jRDoqGhP7q2A-La9g6XtMGg,4488
@@ -33,7 +33,7 @@ sxs/utilities/pretty_print.py,sha256=ZDHR3uvkzQ3Whk_eIp3BB7Abh796nqyrVsQRa68zgGc
33
33
  sxs/utilities/select.py,sha256=UgoEQIvkm8NBe6sD5O2gK0g9Pep-xvWoYQ3b7RxI-Ww,6727
34
34
  sxs/utilities/smooth_functions.py,sha256=apoz3cDay10ozYiBAkj0Z6Bmksz7htKI9cr_Wa1Idp0,9077
35
35
  sxs/utilities/sxs_directories.py,sha256=g6QoYSiqiP-qp97qSYbB9d25lQZRdyhzFHwF8fhvlak,9736
36
- sxs/utilities/sxs_identifiers.py,sha256=9zRAztSNXHmCc-UpynfMCW0HKz-2sgKT45dvpruezhM,4040
36
+ sxs/utilities/sxs_identifiers.py,sha256=rgm65LZ8HQRWSoJJMoV6kkH7NbuA4ZJIhTcpvB7fdwg,4092
37
37
  sxs/utilities/url.py,sha256=dH73Vrtjy4AKqazoeP2EZNdknzhkXQLzMaFZCr9ocjY,1904
38
38
  sxs/utilities/decimation/__init__.py,sha256=aE1p-NLwfd5nI4i6POT7Tttk0kZ2RUFuZf0Wjm-4W10,1336
39
39
  sxs/utilities/decimation/greedy_spline.py,sha256=NVnwoEFIFkcqrNIoV3sssOyB-BrM8G7I4ldKhWqwQQw,4335
@@ -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.17.dist-info/METADATA,sha256=D5GufSNO7lyGK88rkOP1lN3Z6w-3I3vh5_ZljgD8Yn4,9245
83
- sxs-2024.0.17.dist-info/WHEEL,sha256=1yFddiXMmvYK7QYTqtRNtX66WJ0Mz8PYEiEUoOUUxRY,87
84
- sxs-2024.0.17.dist-info/licenses/LICENSE,sha256=ptVOd5m7LDM5ZF0x32cxb8c2Nd5NDmAhy6DX7xt_7VA,1080
85
- sxs-2024.0.17.dist-info/RECORD,,
82
+ sxs-2024.0.18.dist-info/METADATA,sha256=bV11FyEjtxKa73tyv_uYgPYs7vTxc6GkDmzBKU-EpWU,9245
83
+ sxs-2024.0.18.dist-info/WHEEL,sha256=1yFddiXMmvYK7QYTqtRNtX66WJ0Mz8PYEiEUoOUUxRY,87
84
+ sxs-2024.0.18.dist-info/licenses/LICENSE,sha256=ptVOd5m7LDM5ZF0x32cxb8c2Nd5NDmAhy6DX7xt_7VA,1080
85
+ sxs-2024.0.18.dist-info/RECORD,,