datamaestro 1.4.0__py3-none-any.whl → 1.4.1__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.
@@ -102,7 +102,7 @@ class DataDefinition(AbstractData):
102
102
  if components[0] == "datamaestro":
103
103
  longest_ix = 0
104
104
 
105
- return repository, components[(longest_ix + 1) :]
105
+ return repository, [s.lower() for s in components[(longest_ix + 1) :]]
106
106
 
107
107
  def ancestors(self):
108
108
  ancestors = []
@@ -293,7 +293,11 @@ class DatasetWrapper(AbstractDataset):
293
293
 
294
294
  # Builds the ID:
295
295
  # Removes module_name.config prefix
296
- if annotation.id is None or annotation.id == "":
296
+ if (
297
+ (annotation.id is None)
298
+ or (annotation.id == "")
299
+ or ("." not in annotation.id)
300
+ ):
297
301
  # Computes an ID
298
302
  assert (
299
303
  # id is empty string = use the module id
@@ -303,7 +307,15 @@ class DatasetWrapper(AbstractDataset):
303
307
  "A @dataset without `id` should be in the "
304
308
  f".config module (not {t.__module__})"
305
309
  )
306
- path = ".".join(components[1:-1])
310
+
311
+ if annotation.id is None:
312
+ # There is nothing, use the full path
313
+ path = ".".join(components[1:])
314
+ else:
315
+ # Replace
316
+ path = ".".join(components[1:-1])
317
+ if annotation.id != "":
318
+ path = f"{path}.{annotation.id}"
307
319
 
308
320
  self.id = path
309
321
  else:
@@ -557,13 +569,15 @@ class dataset:
557
569
  timestamp {bool} -- If the dataset evolves, specify its timestamp
558
570
  (default: None)
559
571
 
560
- id {[type]} -- [description] (default: {None})
572
+ id {[type]} -- [description] (default: {None}) Gives the full ID of
573
+ the dataset if it contains a ., or just the last component otherwise
561
574
 
562
575
  url {[type]} -- [description] (default: {None})
563
576
 
564
577
  size {str} -- The size (should be a parsable format)
565
578
 
566
579
  doi {str} -- The DOI of the corresponding paper
580
+
567
581
  """
568
582
  if hasattr(base, "__datamaestro__") and isinstance(
569
583
  base.__datamaestro__, metadataset
datamaestro/version.py CHANGED
@@ -17,5 +17,5 @@ __version__: str
17
17
  __version_tuple__: VERSION_TUPLE
18
18
  version_tuple: VERSION_TUPLE
19
19
 
20
- __version__ = version = '1.4.0'
21
- __version_tuple__ = version_tuple = (1, 4, 0)
20
+ __version__ = version = '1.4.1'
21
+ __version_tuple__ = version_tuple = (1, 4, 1)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: datamaestro
3
- Version: 1.4.0
3
+ Version: 1.4.1
4
4
  Summary: "Dataset management command line and API"
5
5
  Home-page: https://github.com/experimaestro/datamaestro
6
6
  Author: Benjamin Piwowarski
@@ -1,14 +1,14 @@
1
1
  datamaestro/__init__.py,sha256=LR8nx7H3Fo97O0gJXV2PxQezsmSTDLAg_nQEXB5QAjc,322
2
2
  datamaestro/__main__.py,sha256=2p36ZcJcZAL9NZBUkMaYRUhKyqhheVPXMGw6K1KNwhk,9196
3
3
  datamaestro/context.py,sha256=KsXYNTt4xX4zEVrnd2hciP7PVCh1StRzjU1Ih6VeCtU,13532
4
- datamaestro/definitions.py,sha256=HsldRC6QJMyxKp4yKa5_c0zUn5MlYW7S-CrWHmij7t0,18337
4
+ datamaestro/definitions.py,sha256=EyrN24HcQmW_pS2K5hGRF07eJ36mQDFduIGvHmMSzsk,18825
5
5
  datamaestro/record.py,sha256=m3WGsPcZ1LouQXNJOBUK3QusAIRiuy6T_oqhq09-Ckg,5504
6
6
  datamaestro/registry.py,sha256=M7QJkcWJP_cxAoqIioLQ01ou2Zg9RqGQvW0XGVspYFE,1421
7
7
  datamaestro/search.py,sha256=bRT-91-2VJJ2JSfNaS1mzaVfqq_HMVBVs-RBj0w-ypM,2906
8
8
  datamaestro/settings.py,sha256=HYSElTUYZ6DZocBb9o3ifm6WW9knRO64XJUwxGIpvwQ,1304
9
9
  datamaestro/sphinx.py,sha256=bp7x_2BFoTSwTqcVZDM8R8cWa7G2pz0Zb8GS054lLYM,6996
10
10
  datamaestro/utils.py,sha256=9m-AVVww6InAZfGFiGy6XJzfExpYNqH1fhWQEezjafA,6536
11
- datamaestro/version.py,sha256=rcWNYDlh913lujUvTfOu9iOIPdrTXg64R9wl7ENLjFU,511
11
+ datamaestro/version.py,sha256=2wP77AlenYjrtKg1nXf5noV1SfpanFafZAGSe7wvBys,511
12
12
  datamaestro/annotations/__init__.py,sha256=jLprrxSBa5QIqc--vqycEcxU4CR9WjVNRaqR5lH0EuE,39
13
13
  datamaestro/annotations/agreement.py,sha256=xEH0ddZxdJ_oG_150PoOa-WjY_OaeQja3FzMzY5IB6k,955
14
14
  datamaestro/commands/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
@@ -40,9 +40,9 @@ datamaestro/test/conftest.py,sha256=it4S5Qq1CA_U8qM0pr4m7v-1dhLj5Y49WjVg5Ee3mpM,
40
40
  datamaestro/test/test_annotations.py,sha256=XUjDWb3FJimSD91wcItJ0lLwTBmvN4wVu_EgTKSvV2c,278
41
41
  datamaestro/test/test_download_handlers.py,sha256=-Gofr89zqIyeI8C4rZqfYR3JfiZVImdcSz9s6q361zQ,641
42
42
  datamaestro/test/test_record.py,sha256=hNZ3uo2i5FZ0VsOHRwvLO1Z6Zce92PdipAF65UptPB8,1156
43
- datamaestro-1.4.0.dist-info/licenses/LICENSE,sha256=WJ7YI-moTFb-uVrFjnzzhGJrnL9P2iqQe8NuED3hutI,35141
44
- datamaestro-1.4.0.dist-info/METADATA,sha256=0q8MT6YvMD4WD3j79fpkGGFvHbLey-WgZnAV5VoRzdg,8189
45
- datamaestro-1.4.0.dist-info/WHEEL,sha256=CmyFI0kx5cdEMTLiONQRbGQwjIoR1aIYB7eCAQ4KPJ0,91
46
- datamaestro-1.4.0.dist-info/entry_points.txt,sha256=8qMhwSRvFG2iBqtJYVD22Zd4s4c3YkODtcp0Ajw1knw,133
47
- datamaestro-1.4.0.dist-info/top_level.txt,sha256=XSznaMNAA8jELV7-TOqaAgDsjLzUf9G9MxL7C4helT0,12
48
- datamaestro-1.4.0.dist-info/RECORD,,
43
+ datamaestro-1.4.1.dist-info/licenses/LICENSE,sha256=WJ7YI-moTFb-uVrFjnzzhGJrnL9P2iqQe8NuED3hutI,35141
44
+ datamaestro-1.4.1.dist-info/METADATA,sha256=jGy6z11AvalmLQuwby5XSEViOS55DtMfq21fhs_rW14,8189
45
+ datamaestro-1.4.1.dist-info/WHEEL,sha256=CmyFI0kx5cdEMTLiONQRbGQwjIoR1aIYB7eCAQ4KPJ0,91
46
+ datamaestro-1.4.1.dist-info/entry_points.txt,sha256=8qMhwSRvFG2iBqtJYVD22Zd4s4c3YkODtcp0Ajw1knw,133
47
+ datamaestro-1.4.1.dist-info/top_level.txt,sha256=XSznaMNAA8jELV7-TOqaAgDsjLzUf9G9MxL7C4helT0,12
48
+ datamaestro-1.4.1.dist-info/RECORD,,