datamaestro 1.5.1__tar.gz → 1.6.0__tar.gz

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.
Files changed (88) hide show
  1. datamaestro-1.6.0/.flake8 +7 -0
  2. {datamaestro-1.5.1 → datamaestro-1.6.0}/.github/workflows/pytest.yml +1 -1
  3. datamaestro-1.6.0/.github/workflows/python-publish.yml +45 -0
  4. {datamaestro-1.5.1 → datamaestro-1.6.0}/.pre-commit-config.yaml +3 -3
  5. datamaestro-1.6.0/.python-version +1 -0
  6. {datamaestro-1.5.1 → datamaestro-1.6.0}/.readthedocs.yml +1 -1
  7. {datamaestro-1.5.1 → datamaestro-1.6.0}/PKG-INFO +18 -48
  8. datamaestro-1.6.0/pyproject.toml +62 -0
  9. datamaestro-1.6.0/release-notes.md +5 -0
  10. {datamaestro-1.5.1 → datamaestro-1.6.0}/src/datamaestro/__init__.py +1 -2
  11. {datamaestro-1.5.1 → datamaestro-1.6.0}/src/datamaestro/__main__.py +2 -1
  12. {datamaestro-1.5.1 → datamaestro-1.6.0}/src/datamaestro/context.py +32 -16
  13. {datamaestro-1.5.1 → datamaestro-1.6.0}/src/datamaestro/definitions.py +3 -1
  14. datamaestro-1.6.0/src/datamaestro/version.py +4 -0
  15. datamaestro-1.6.0/uv.lock +1793 -0
  16. datamaestro-1.5.1/.github/workflows/python-publish.yml +0 -30
  17. datamaestro-1.5.1/pyproject.toml +0 -13
  18. datamaestro-1.5.1/setup.cfg +0 -63
  19. datamaestro-1.5.1/setup.py +0 -6
  20. datamaestro-1.5.1/src/datamaestro/version.py +0 -21
  21. datamaestro-1.5.1/src/datamaestro.egg-info/PKG-INFO +0 -213
  22. datamaestro-1.5.1/src/datamaestro.egg-info/SOURCES.txt +0 -80
  23. datamaestro-1.5.1/src/datamaestro.egg-info/dependency_links.txt +0 -1
  24. datamaestro-1.5.1/src/datamaestro.egg-info/entry_points.txt +0 -5
  25. datamaestro-1.5.1/src/datamaestro.egg-info/not-zip-safe +0 -1
  26. datamaestro-1.5.1/src/datamaestro.egg-info/requires.txt +0 -16
  27. datamaestro-1.5.1/src/datamaestro.egg-info/top_level.txt +0 -1
  28. {datamaestro-1.5.1 → datamaestro-1.6.0}/.coverage +0 -0
  29. {datamaestro-1.5.1 → datamaestro-1.6.0}/.gitignore +0 -0
  30. {datamaestro-1.5.1 → datamaestro-1.6.0}/CHANGELOG.md +0 -0
  31. {datamaestro-1.5.1 → datamaestro-1.6.0}/LICENSE +0 -0
  32. {datamaestro-1.5.1 → datamaestro-1.6.0}/MANIFEST.in +0 -0
  33. {datamaestro-1.5.1 → datamaestro-1.6.0}/README.md +0 -0
  34. {datamaestro-1.5.1 → datamaestro-1.6.0}/TODO.md +0 -0
  35. {datamaestro-1.5.1 → datamaestro-1.6.0}/docs/Makefile +0 -0
  36. {datamaestro-1.5.1 → datamaestro-1.6.0}/docs/make.bat +0 -0
  37. {datamaestro-1.5.1 → datamaestro-1.6.0}/docs/requirements.txt +0 -0
  38. {datamaestro-1.5.1 → datamaestro-1.6.0}/docs/source/api/data.md +0 -0
  39. {datamaestro-1.5.1 → datamaestro-1.6.0}/docs/source/api/download.rst +0 -0
  40. {datamaestro-1.5.1 → datamaestro-1.6.0}/docs/source/api/index.md +0 -0
  41. {datamaestro-1.5.1 → datamaestro-1.6.0}/docs/source/api/records.rst +0 -0
  42. {datamaestro-1.5.1 → datamaestro-1.6.0}/docs/source/conf.py +0 -0
  43. {datamaestro-1.5.1 → datamaestro-1.6.0}/docs/source/datasets.rst +0 -0
  44. {datamaestro-1.5.1 → datamaestro-1.6.0}/docs/source/developping.md +0 -0
  45. {datamaestro-1.5.1 → datamaestro-1.6.0}/docs/source/index.md +0 -0
  46. {datamaestro-1.5.1 → datamaestro-1.6.0}/docs/source/style.css +0 -0
  47. {datamaestro-1.5.1 → datamaestro-1.6.0}/pytest.ini +0 -0
  48. {datamaestro-1.5.1 → datamaestro-1.6.0}/requirements-dev.txt +0 -0
  49. {datamaestro-1.5.1 → datamaestro-1.6.0}/requirements.txt +0 -0
  50. {datamaestro-1.5.1 → datamaestro-1.6.0}/schema.yaml +0 -0
  51. {datamaestro-1.5.1 → datamaestro-1.6.0}/src/datamaestro/annotations/__init__.py +0 -0
  52. {datamaestro-1.5.1 → datamaestro-1.6.0}/src/datamaestro/annotations/agreement.py +0 -0
  53. {datamaestro-1.5.1 → datamaestro-1.6.0}/src/datamaestro/commands/__init__.py +0 -0
  54. {datamaestro-1.5.1 → datamaestro-1.6.0}/src/datamaestro/commands/mainstyle.css +0 -0
  55. {datamaestro-1.5.1 → datamaestro-1.6.0}/src/datamaestro/commands/site.py +0 -0
  56. {datamaestro-1.5.1 → datamaestro-1.6.0}/src/datamaestro/data/__init__.py +0 -0
  57. {datamaestro-1.5.1 → datamaestro-1.6.0}/src/datamaestro/data/csv.py +0 -0
  58. {datamaestro-1.5.1 → datamaestro-1.6.0}/src/datamaestro/data/huggingface.py +0 -0
  59. {datamaestro-1.5.1 → datamaestro-1.6.0}/src/datamaestro/data/ml.py +0 -0
  60. {datamaestro-1.5.1 → datamaestro-1.6.0}/src/datamaestro/data/tensor.py +0 -0
  61. {datamaestro-1.5.1 → datamaestro-1.6.0}/src/datamaestro/download/__init__.py +0 -0
  62. {datamaestro-1.5.1 → datamaestro-1.6.0}/src/datamaestro/download/archive.py +0 -0
  63. {datamaestro-1.5.1 → datamaestro-1.6.0}/src/datamaestro/download/custom.py +0 -0
  64. {datamaestro-1.5.1 → datamaestro-1.6.0}/src/datamaestro/download/huggingface.py +0 -0
  65. {datamaestro-1.5.1 → datamaestro-1.6.0}/src/datamaestro/download/links.py +0 -0
  66. {datamaestro-1.5.1 → datamaestro-1.6.0}/src/datamaestro/download/manual.py +0 -0
  67. {datamaestro-1.5.1 → datamaestro-1.6.0}/src/datamaestro/download/multiple.py +0 -0
  68. {datamaestro-1.5.1 → datamaestro-1.6.0}/src/datamaestro/download/single.py +0 -0
  69. {datamaestro-1.5.1 → datamaestro-1.6.0}/src/datamaestro/download/sync.py +0 -0
  70. {datamaestro-1.5.1 → datamaestro-1.6.0}/src/datamaestro/download/todo.py +0 -0
  71. {datamaestro-1.5.1 → datamaestro-1.6.0}/src/datamaestro/download/wayback.py +0 -0
  72. {datamaestro-1.5.1 → datamaestro-1.6.0}/src/datamaestro/record.py +0 -0
  73. {datamaestro-1.5.1 → datamaestro-1.6.0}/src/datamaestro/registry.py +0 -0
  74. {datamaestro-1.5.1 → datamaestro-1.6.0}/src/datamaestro/search.py +0 -0
  75. {datamaestro-1.5.1 → datamaestro-1.6.0}/src/datamaestro/settings.py +0 -0
  76. {datamaestro-1.5.1 → datamaestro-1.6.0}/src/datamaestro/sphinx.py +0 -0
  77. {datamaestro-1.5.1 → datamaestro-1.6.0}/src/datamaestro/stream/__init__.py +0 -0
  78. {datamaestro-1.5.1 → datamaestro-1.6.0}/src/datamaestro/stream/compress.py +0 -0
  79. {datamaestro-1.5.1 → datamaestro-1.6.0}/src/datamaestro/stream/lines.py +0 -0
  80. {datamaestro-1.5.1 → datamaestro-1.6.0}/src/datamaestro/templates/dataset.py +0 -0
  81. {datamaestro-1.5.1 → datamaestro-1.6.0}/src/datamaestro/test/__init__.py +0 -0
  82. {datamaestro-1.5.1 → datamaestro-1.6.0}/src/datamaestro/test/checks.py +0 -0
  83. {datamaestro-1.5.1 → datamaestro-1.6.0}/src/datamaestro/test/conftest.py +0 -0
  84. {datamaestro-1.5.1 → datamaestro-1.6.0}/src/datamaestro/test/test_annotations.py +0 -0
  85. {datamaestro-1.5.1 → datamaestro-1.6.0}/src/datamaestro/test/test_download_handlers.py +0 -0
  86. {datamaestro-1.5.1 → datamaestro-1.6.0}/src/datamaestro/test/test_record.py +0 -0
  87. {datamaestro-1.5.1 → datamaestro-1.6.0}/src/datamaestro/utils.py +0 -0
  88. {datamaestro-1.5.1 → datamaestro-1.6.0}/tox.ini +0 -0
@@ -0,0 +1,7 @@
1
+ [flake8]
2
+ extend-ignore = E203, E266, E501, W503, E704
3
+ # line length is intentionally set to 80 here because black uses Bugbear
4
+ # See https://github.com/psf/black/blob/master/docs/the_black_code_style.md#line-length for more details
5
+ max-line-length = 80
6
+ max-complexity = 18
7
+ select = B,C,E,F,W,T4,B9
@@ -15,7 +15,7 @@ jobs:
15
15
  runs-on: ubuntu-latest
16
16
  strategy:
17
17
  matrix:
18
- python-version: ["3.9", "3.10", "3.11"]
18
+ python-version: ["3.10", "3.11", "3.12"]
19
19
 
20
20
  steps:
21
21
  - uses: actions/checkout@v2
@@ -0,0 +1,45 @@
1
+ # This workflow will upload a Python Package using Twine when a release is created
2
+ # For more information see: https://help.github.com/en/actions/language-and-framework-guides/using-python-with-github-actions#publishing-to-package-registries
3
+
4
+ name: Upload Python Package
5
+
6
+ on:
7
+ release:
8
+ types: [created]
9
+
10
+ jobs:
11
+ deploy:
12
+ runs-on: ubuntu-latest
13
+
14
+ permissions:
15
+ contents: write # Required to update release notes
16
+ id-token: write # Required for PyPI trusted publishing
17
+
18
+ steps:
19
+ - uses: actions/checkout@v2
20
+ - name: Set up Python
21
+ uses: actions/setup-python@v2
22
+ with:
23
+ python-version: "3.x"
24
+
25
+ - name: Generate changelog for this release
26
+ uses: orhun/git-cliff-action@v4
27
+ with:
28
+ config: cliff.toml
29
+ args: --latest --strip header
30
+ env:
31
+ OUTPUT: release-notes.md
32
+
33
+ - name: Update release notes
34
+ uses: softprops/action-gh-release@v2
35
+ with:
36
+ body_path: release-notes.md
37
+
38
+ - name: Install dependencies
39
+ run: python -m pip install --upgrade uv
40
+
41
+ - name: Build
42
+ run: uv build
43
+
44
+ - name: Publish package to PyPI
45
+ uses: pypa/gh-action-pypi-publish@release/v1
@@ -1,16 +1,16 @@
1
1
  repos:
2
2
  - repo: https://github.com/pre-commit/pre-commit-hooks
3
- rev: v4.4.0
3
+ rev: v6.0.0
4
4
  hooks:
5
5
  - id: check-yaml
6
6
  - id: end-of-file-fixer
7
7
  - id: trailing-whitespace
8
8
  - repo: https://github.com/psf/black
9
- rev: 23.3.0
9
+ rev: 25.12.0
10
10
  hooks:
11
11
  - id: black
12
12
  - repo: https://github.com/pycqa/flake8
13
- rev: 6.0.0
13
+ rev: 7.3.0
14
14
  hooks:
15
15
  - id: flake8
16
16
  additional_dependencies:
@@ -0,0 +1 @@
1
+ 3.10
@@ -11,7 +11,7 @@ sphinx:
11
11
  build:
12
12
  os: "ubuntu-20.04"
13
13
  tools:
14
- python: "3.9"
14
+ python: "3.10"
15
15
 
16
16
  # Install the package
17
17
  python:
@@ -1,42 +1,31 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: datamaestro
3
- Version: 1.5.1
4
- Summary: "Dataset management command line and API"
5
- Home-page: https://github.com/experimaestro/datamaestro
6
- Author: Benjamin Piwowarski
7
- Author-email: benjamin@piwowarski.fr
8
- License: GPL-3
9
- Keywords: dataset manager
10
- Platform: any
3
+ Version: 1.6.0
4
+ Summary: Add your description here
5
+ Author-email: Benjamin Piwowarski <benjamin@piwowarski.fr>
6
+ License-File: LICENSE
11
7
  Classifier: Development Status :: 4 - Beta
12
8
  Classifier: Intended Audience :: Science/Research
13
9
  Classifier: License :: OSI Approved :: GNU General Public License v3 (GPLv3)
14
10
  Classifier: Operating System :: OS Independent
15
11
  Classifier: Programming Language :: Python
16
- Classifier: Programming Language :: Python :: 3.9
17
- Classifier: Programming Language :: Python :: 3.10
18
- Classifier: Programming Language :: Python :: 3.11
12
+ Classifier: Programming Language :: Python :: 3
19
13
  Classifier: Topic :: Software Development :: Libraries :: Python Modules
20
- Requires-Python: >=3.8
21
- Description-Content-Type: text/markdown
22
- License-File: LICENSE
23
- Requires-Dist: click
24
- Requires-Dist: tqdm
25
- Requires-Dist: urllib3
26
- Requires-Dist: marshmallow
27
- Requires-Dist: cached_property
28
- Requires-Dist: requests
29
- Requires-Dist: bitmath
14
+ Requires-Python: >=3.10
15
+ Requires-Dist: bitmath>=1.3.3.1
16
+ Requires-Dist: cached-property>=2.0.1
17
+ Requires-Dist: click>=8.2.1
18
+ Requires-Dist: docstring-parser>=0.16
30
19
  Requires-Dist: experimaestro>=1.8.9
31
- Requires-Dist: mkdocs
32
- Requires-Dist: pymdown-extensions
33
- Requires-Dist: mkdocs-material
34
- Requires-Dist: docstring_parser
20
+ Requires-Dist: marshmallow>=3.26.1
21
+ Requires-Dist: mkdocs-material>=9.6.15
22
+ Requires-Dist: mkdocs>=1.6.1
35
23
  Requires-Dist: numpy
36
- Provides-Extra: test
37
- Requires-Dist: tox; extra == "test"
38
- Dynamic: license-file
39
- Dynamic: requires-dist
24
+ Requires-Dist: pymdown-extensions>=10.16
25
+ Requires-Dist: requests>=2.32.4
26
+ Requires-Dist: tqdm>=4.67.1
27
+ Requires-Dist: urllib3>=2.5.0
28
+ Description-Content-Type: text/markdown
40
29
 
41
30
  [![PyPI version](https://badge.fury.io/py/datamaestro.svg)](https://badge.fury.io/py/datamaestro) [![pre-commit](https://img.shields.io/badge/pre--commit-enabled-brightgreen?logo=pre-commit&logoColor=white)](https://github.com/pre-commit/pre-commit) [![DOI](https://zenodo.org/badge/4573876.svg)](https://zenodo.org/badge/latestdoi/4573876)
42
31
 
@@ -192,22 +181,3 @@ This will allow to
192
181
 
193
182
  1. Document the dataset
194
183
  2. Allow to use the command line interface to manipulate it (download resources, etc.)
195
-
196
- # 0.8.0
197
-
198
- - Integration with other repositories: abstracting away the notion of dataset
199
- - Repository prefix
200
- - Set sub-datasets IDs automatically
201
-
202
- # 0.7.3
203
-
204
- - Updates for new experimaestro (0.8.5)
205
- - Search types with "type:..."
206
-
207
- # 0.6.17
208
-
209
- - Allow remote access through rpyc
210
-
211
- # 0.6.9
212
-
213
- `version` command
@@ -0,0 +1,62 @@
1
+ [project]
2
+ name = "datamaestro"
3
+ description = "Add your description here"
4
+ readme = "README.md"
5
+ requires-python = ">=3.10"
6
+ authors = [
7
+ { name = "Benjamin Piwowarski", email = "benjamin@piwowarski.fr"}
8
+ ]
9
+ dynamic = ["version"]
10
+ dependencies = [
11
+ "bitmath>=1.3.3.1",
12
+ "cached-property>=2.0.1",
13
+ "click>=8.2.1",
14
+ "docstring-parser>=0.16",
15
+ "experimaestro>=1.8.9",
16
+ "marshmallow>=3.26.1",
17
+ "mkdocs>=1.6.1",
18
+ "mkdocs-material>=9.6.15",
19
+ "numpy",
20
+ "pymdown-extensions>=10.16",
21
+ "requests>=2.32.4",
22
+ "tqdm>=4.67.1",
23
+ "urllib3>=2.5.0",
24
+ ]
25
+ classifiers = [
26
+ "Development Status :: 4 - Beta",
27
+ "Intended Audience :: Science/Research",
28
+ "License :: OSI Approved :: GNU General Public License v3 (GPLv3)",
29
+ "Operating System :: OS Independent",
30
+ "Programming Language :: Python",
31
+ "Programming Language :: Python :: 3",
32
+ "Topic :: Software Development :: Libraries :: Python Modules",
33
+ ]
34
+ [dependency-groups]
35
+ dev = [
36
+ "pre-commit>=4.2.0",
37
+ "pytest>=8.4.1",
38
+ "twine>=6.1.0",
39
+ ]
40
+
41
+ [project.scripts]
42
+ datamaestro = "datamaestro.__main__:main"
43
+
44
+ [project.entry-points."mkdocs.plugins"]
45
+ datamaestro = "datamaestro.commands.site:DatasetGenerator"
46
+
47
+ [build-system]
48
+ requires = ["hatchling", "uv-dynamic-versioning"]
49
+ build-backend = "hatchling.build"
50
+
51
+ [tool.hatch.version]
52
+ source = "uv-dynamic-versioning"
53
+
54
+ [tool.uv-dynamic-versioning]
55
+ fallback-version = "0.0.0"
56
+
57
+ [tool.hatch.build.hooks.version]
58
+ path = "src/datamaestro/version.py"
59
+
60
+ [tool.mypy]
61
+ python_version = 3.10
62
+ warn_unused_ignores = "True"
@@ -0,0 +1,5 @@
1
+ ## [1.6.0] - 2025-12-21
2
+
3
+ ### ⚙️ Miscellaneous Tasks
4
+
5
+ - Use git cliff for release notes
@@ -7,7 +7,6 @@ from .context import (
7
7
  prepare_dataset,
8
8
  )
9
9
 
10
- from pkg_resources import get_distribution, DistributionNotFound
11
10
  from .definitions import dataset, metadata
12
11
  from .data import Base
13
- from .version import version, version_tuple
12
+ from .version import __version__
@@ -1,6 +1,7 @@
1
1
  #!/usr/bin/env python3
2
2
  # flake8: noqa: T201
3
3
 
4
+ from importlib.metadata import entry_points
4
5
  import sys
5
6
  import logging
6
7
  from functools import update_wrapper
@@ -38,7 +39,7 @@ def pass_cfg(f):
38
39
  # Get all the available repositories
39
40
 
40
41
  REPOSITORIES = {}
41
- for entry_point in pkg_resources.iter_entry_points("datamaestro.repositories"):
42
+ for entry_point in entry_points(group="datamaestro.repositories"):
42
43
  REPOSITORIES[entry_point.name] = entry_point
43
44
 
44
45
 
@@ -1,5 +1,5 @@
1
1
  from pathlib import Path
2
- from typing import Iterable, Iterator, Dict, Union
2
+ from typing import Iterable, Iterator, Dict, Optional, Union
3
3
  import importlib
4
4
  import os
5
5
  import hashlib
@@ -8,8 +8,7 @@ import inspect
8
8
  import json
9
9
  from abc import ABC, abstractmethod
10
10
  from experimaestro import Config
11
- import pkg_resources
12
- from experimaestro.compat import cached_property
11
+ from functools import cached_property
13
12
  from experimaestro.mkdocs.metaloader import Module
14
13
  from .utils import CachedFile, downloadURL
15
14
  from .settings import UserSettings, Settings
@@ -18,6 +17,22 @@ from typing import TYPE_CHECKING
18
17
  if TYPE_CHECKING:
19
18
  from datamaestro.definitions import AbstractDataset, DatasetWrapper
20
19
 
20
+ from importlib.metadata import (
21
+ entry_points as _entry_points,
22
+ version as _version,
23
+ PackageNotFoundError as _PackageNotFoundError,
24
+ )
25
+
26
+
27
+ def iter_entry_points(group, name=None):
28
+ """Yield entry points for a given group (and optional name) using importlib.metadata."""
29
+ eps = _entry_points()
30
+ selected = eps.select(group=group)
31
+ if name:
32
+ selected = [ep for ep in selected if ep.name == name]
33
+ for ep in selected:
34
+ yield ep
35
+
21
36
 
22
37
  class Compression:
23
38
  @staticmethod
@@ -106,7 +121,7 @@ class Context:
106
121
 
107
122
  def repositories(self) -> Iterable["Repository"]:
108
123
  """Returns an iterator over repositories"""
109
- for entry_point in pkg_resources.iter_entry_points("datamaestro.repositories"):
124
+ for entry_point in iter_entry_points("datamaestro.repositories"):
110
125
  yield entry_point.load().instance()
111
126
 
112
127
  def repository(self, repositoryid):
@@ -114,10 +129,7 @@ class Context:
114
129
  return None
115
130
 
116
131
  entry_points = [
117
- x
118
- for x in pkg_resources.iter_entry_points(
119
- "datamaestro.repositories", repositoryid
120
- )
132
+ x for x in iter_entry_points("datamaestro.repositories", repositoryid)
121
133
  ]
122
134
  if not entry_points:
123
135
  raise Exception("No datasets repository named %s", repositoryid)
@@ -299,8 +311,7 @@ class BaseRepository(ABC):
299
311
  self.basedir = Path(p).parent
300
312
 
301
313
  @abstractmethod
302
- def __iter__(self) -> Iterator["AbstractDataset"]:
303
- ...
314
+ def __iter__(self) -> Iterator["AbstractDataset"]: ...
304
315
 
305
316
  def search(self, name: str):
306
317
  """Search for a dataset in the definitions"""
@@ -353,11 +364,9 @@ class Repository(BaseRepository):
353
364
 
354
365
  @classmethod
355
366
  def version(cls):
356
- from pkg_resources import get_distribution, DistributionNotFound
357
-
358
367
  try:
359
- return get_distribution(cls.__module__).version
360
- except DistributionNotFound:
368
+ return _version(cls.__module__)
369
+ except _PackageNotFoundError:
361
370
  return None
362
371
 
363
372
  def __repr__(self):
@@ -423,16 +432,23 @@ def find_dataset(dataset_id: str):
423
432
  return AbstractDataset.find(dataset_id)
424
433
 
425
434
 
426
- def prepare_dataset(dataset_id: Union[str, "DatasetWrapper", Config]):
435
+ def prepare_dataset(
436
+ dataset_id: Union[str, "DatasetWrapper", Config],
437
+ context: Optional[Union[Context, Path]] = None,
438
+ ):
427
439
  """Find a dataset given its id and download the resources"""
428
440
  from .definitions import AbstractDataset, DatasetWrapper
429
441
 
442
+ match context:
443
+ case Path() | str():
444
+ context = Context(Path(context))
445
+
430
446
  if isinstance(dataset_id, DatasetWrapper):
431
447
  ds = dataset_id
432
448
  elif isinstance(dataset_id, Config):
433
449
  ds = dataset_id.__datamaestro_dataset__
434
450
  else:
435
- ds = AbstractDataset.find(dataset_id)
451
+ ds = AbstractDataset.find(dataset_id, context=context)
436
452
 
437
453
  return ds.prepare(download=True)
438
454
 
@@ -236,10 +236,12 @@ class AbstractDataset(AbstractData):
236
236
  return success
237
237
 
238
238
  @staticmethod
239
- def find(name: str) -> "DataDefinition":
239
+ def find(name: str, context: Optional["Context"] = None) -> "DataDefinition":
240
240
  """Find a dataset given its name"""
241
241
  from datamaestro.context import Context # noqa: F811
242
242
 
243
+ context = Context.instance() if context is None else context
244
+
243
245
  logging.debug("Searching dataset %s", name)
244
246
  for repository in Context.instance().repositories():
245
247
  logging.debug("Searching dataset %s in %s", name, repository)
@@ -0,0 +1,4 @@
1
+ # This file is auto-generated by Hatchling. As such, do not:
2
+ # - modify
3
+ # - track in version control e.g. be sure to add to .gitignore
4
+ __version__ = VERSION = '1.6.0'