dtoolcore 3.18.3__tar.gz → 3.20.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 (83) hide show
  1. {dtoolcore-3.18.3 → dtoolcore-3.20.0}/.gitignore +3 -0
  2. {dtoolcore-3.18.3 → dtoolcore-3.20.0}/CHANGELOG.rst +131 -0
  3. {dtoolcore-3.18.3 → dtoolcore-3.20.0}/PKG-INFO +20 -17
  4. {dtoolcore-3.18.3 → dtoolcore-3.20.0}/README.rst +5 -5
  5. {dtoolcore-3.18.3 → dtoolcore-3.20.0}/dtoolcore/__init__.py +295 -43
  6. {dtoolcore-3.18.3 → dtoolcore-3.20.0}/dtoolcore/filehasher.py +1 -1
  7. {dtoolcore-3.18.3 → dtoolcore-3.20.0}/dtoolcore/storagebroker.py +90 -51
  8. {dtoolcore-3.18.3 → dtoolcore-3.20.0}/dtoolcore/utils.py +32 -14
  9. dtoolcore-3.20.0/dtoolcore/version.py +24 -0
  10. dtoolcore-3.20.0/pyproject.toml +59 -0
  11. {dtoolcore-3.18.3 → dtoolcore-3.20.0}/tests/__init__.py +24 -5
  12. {dtoolcore-3.18.3 → dtoolcore-3.20.0}/tests/test_DiskStorageBroker.py +36 -7
  13. {dtoolcore-3.18.3 → dtoolcore-3.20.0}/tests/test_abspath_uri.py +5 -3
  14. {dtoolcore-3.18.3 → dtoolcore-3.20.0}/tests/test_annotation_functional.py +27 -6
  15. dtoolcore-3.20.0/tests/test_audit_fixes.py +109 -0
  16. {dtoolcore-3.18.3 → dtoolcore-3.20.0}/tests/test_compare_module.py +7 -5
  17. {dtoolcore-3.18.3 → dtoolcore-3.20.0}/tests/test_copy_dataset.py +13 -10
  18. {dtoolcore-3.18.3 → dtoolcore-3.20.0}/tests/test_create_dataset_helpers_functional.py +49 -29
  19. {dtoolcore-3.18.3 → dtoolcore-3.20.0}/tests/test_creation_and_reading_functional.py +27 -13
  20. {dtoolcore-3.18.3 → dtoolcore-3.20.0}/tests/test_dtool_list_overlays_when_dir_missing.py +5 -4
  21. {dtoolcore-3.18.3 → dtoolcore-3.20.0}/tests/test_filehasher_api.py +2 -1
  22. dtoolcore-3.20.0/tests/test_freeze_with_manifest.py +775 -0
  23. {dtoolcore-3.18.3 → dtoolcore-3.20.0}/tests/test_frozen_at_when_copying_dataset.py +4 -3
  24. dtoolcore-3.20.0/tests/test_frozen_proto_dataset.py +187 -0
  25. {dtoolcore-3.18.3 → dtoolcore-3.20.0}/tests/test_generate_admin_metadata.py +2 -3
  26. dtoolcore-3.20.0/tests/test_names_and_metadata_keys.py +114 -0
  27. {dtoolcore-3.18.3 → dtoolcore-3.20.0}/tests/test_overlays_functional.py +8 -7
  28. dtoolcore-3.20.0/tests/test_partial_item_metadata.py +117 -0
  29. {dtoolcore-3.18.3 → dtoolcore-3.20.0}/tests/test_self_description.py +5 -3
  30. {dtoolcore-3.18.3 → dtoolcore-3.20.0}/tests/test_tags_functional.py +1 -1
  31. dtoolcore-3.20.0/tests/test_text_encoding_and_windows_paths.py +167 -0
  32. {dtoolcore-3.18.3 → dtoolcore-3.20.0}/tests/test_timestamp.py +2 -2
  33. {dtoolcore-3.18.3 → dtoolcore-3.20.0}/tests/test_update_dataset_name.py +1 -1
  34. {dtoolcore-3.18.3 → dtoolcore-3.20.0}/tests/test_uri_property_when_using_relpath.py +6 -9
  35. {dtoolcore-3.18.3 → dtoolcore-3.20.0}/tests/test_uri_sanitisation.py +1 -1
  36. {dtoolcore-3.18.3 → dtoolcore-3.20.0}/tests/test_utils_module.py +17 -14
  37. dtoolcore-3.20.0/tests/test_windows_drive_letter_uris.py +79 -0
  38. dtoolcore-3.20.0/tox.ini +10 -0
  39. dtoolcore-3.18.3/.github/dependabot.yml +0 -17
  40. dtoolcore-3.18.3/.github/workflows/publish.yml +0 -52
  41. dtoolcore-3.18.3/.github/workflows/test.yml +0 -47
  42. dtoolcore-3.18.3/.travis.yml +0 -10
  43. dtoolcore-3.18.3/appveyor.yml +0 -14
  44. dtoolcore-3.18.3/dtoolcore/version.py +0 -16
  45. dtoolcore-3.18.3/dtoolcore.egg-info/PKG-INFO +0 -80
  46. dtoolcore-3.18.3/dtoolcore.egg-info/SOURCES.txt +0 -72
  47. dtoolcore-3.18.3/dtoolcore.egg-info/dependency_links.txt +0 -1
  48. dtoolcore-3.18.3/dtoolcore.egg-info/entry_points.txt +0 -2
  49. dtoolcore-3.18.3/dtoolcore.egg-info/requires.txt +0 -10
  50. dtoolcore-3.18.3/dtoolcore.egg-info/top_level.txt +0 -1
  51. dtoolcore-3.18.3/pyproject.toml +0 -41
  52. dtoolcore-3.18.3/requirements.txt +0 -1
  53. dtoolcore-3.18.3/setup.cfg +0 -14
  54. dtoolcore-3.18.3/tox.ini +0 -16
  55. {dtoolcore-3.18.3 → dtoolcore-3.20.0}/LICENSE.rst +0 -0
  56. {dtoolcore-3.18.3 → dtoolcore-3.20.0}/MANIFEST.in +0 -0
  57. {dtoolcore-3.18.3 → dtoolcore-3.20.0}/docs/.gitignore +0 -0
  58. {dtoolcore-3.18.3 → dtoolcore-3.20.0}/docs/Makefile +0 -0
  59. {dtoolcore-3.18.3 → dtoolcore-3.20.0}/docs/make.bat +0 -0
  60. {dtoolcore-3.18.3 → dtoolcore-3.20.0}/docs/source/CHANGELOG.rst +0 -0
  61. {dtoolcore-3.18.3 → dtoolcore-3.20.0}/docs/source/LICENSE.rst +0 -0
  62. {dtoolcore-3.18.3 → dtoolcore-3.20.0}/docs/source/README.rst +0 -0
  63. {dtoolcore-3.18.3 → dtoolcore-3.20.0}/docs/source/api/compare.rst +0 -0
  64. {dtoolcore-3.18.3 → dtoolcore-3.20.0}/docs/source/api/dtoolcore.rst +0 -0
  65. {dtoolcore-3.18.3 → dtoolcore-3.20.0}/docs/source/api/filehasher.rst +0 -0
  66. {dtoolcore-3.18.3 → dtoolcore-3.20.0}/docs/source/api/storagebroker.rst +0 -0
  67. {dtoolcore-3.18.3 → dtoolcore-3.20.0}/docs/source/api/utils.rst +0 -0
  68. {dtoolcore-3.18.3 → dtoolcore-3.20.0}/docs/source/api.rst +0 -0
  69. {dtoolcore-3.18.3 → dtoolcore-3.20.0}/docs/source/conf.py +0 -0
  70. {dtoolcore-3.18.3 → dtoolcore-3.20.0}/docs/source/descriptive.rst +0 -0
  71. {dtoolcore-3.18.3 → dtoolcore-3.20.0}/docs/source/index.rst +0 -0
  72. {dtoolcore-3.18.3 → dtoolcore-3.20.0}/dtoolcore/compare.py +0 -0
  73. {dtoolcore-3.18.3 → dtoolcore-3.20.0}/icons/22x22/dtool_logo.png +0 -0
  74. {dtoolcore-3.18.3 → dtoolcore-3.20.0}/tests/data/actually_a_png.txt +0 -0
  75. {dtoolcore-3.18.3 → dtoolcore-3.20.0}/tests/data/actually_a_text_file.jpg +0 -0
  76. {dtoolcore-3.18.3 → dtoolcore-3.20.0}/tests/data/another_file.txt +0 -0
  77. {dtoolcore-3.18.3 → dtoolcore-3.20.0}/tests/data/empty_file +0 -0
  78. {dtoolcore-3.18.3 → dtoolcore-3.20.0}/tests/data/random_bytes +0 -0
  79. {dtoolcore-3.18.3 → dtoolcore-3.20.0}/tests/data/real_text_file.txt +0 -0
  80. {dtoolcore-3.18.3 → dtoolcore-3.20.0}/tests/data/tiny.png +0 -0
  81. {dtoolcore-3.18.3 → dtoolcore-3.20.0}/tests/test_BaseDataSet_uri_property.py +0 -0
  82. {dtoolcore-3.18.3 → dtoolcore-3.20.0}/tests/test_dtoolcore_package.py +0 -0
  83. {dtoolcore-3.18.3 → dtoolcore-3.20.0}/tests/test_iter_datasets_in_base_uri.py +1 -1
@@ -9,8 +9,11 @@
9
9
  .tox
10
10
  .cache
11
11
  .pytest_cache
12
+ .ruff_cache
12
13
  .vscode
13
14
 
14
15
  env/
16
+ venv*/
17
+ build/
15
18
  dist/
16
19
  dtoolcore/version.py
@@ -33,6 +33,137 @@ Security
33
33
  ^^^^^^^^
34
34
 
35
35
 
36
+ [3.20.0] - 2026-11-23
37
+ ---------------------
38
+
39
+
40
+ Added
41
+ ^^^^^
42
+
43
+ - ``freeze_with_manifest`` method on ``ProtoDataSet`` class for converting a
44
+ proto-dataset to a frozen dataset using a pre-computed manifest with
45
+ client-provided hashes. Validates that README and all manifest items exist
46
+ in storage before freezing. Useful for server applications that trust
47
+ client-computed hashes.
48
+ - ``ProtoDataSet.freeze`` and ``freeze_with_manifest`` return the frozen
49
+ ``DataSet`` (previously ``None``)
50
+ - ``DtoolCoreFrozenDataSetError`` (a ``DtoolCoreTypeError``)
51
+ - ``ruff`` linting (replacing ``flake8``), configured in ``pyproject.toml``,
52
+ with a ``.pre-commit-config.yaml`` and a ``lint`` optional-dependency group
53
+ - Windows CI job (``windows-latest``, Python 3.14)
54
+ - Test with Python 3.14 in CI workflow
55
+
56
+ Changed
57
+ ^^^^^^^
58
+
59
+ - Build system changed from ``setuptools`` to ``hatchling`` with
60
+ ``hatch-vcs``; the version is still derived from git tags
61
+ - Migrated deprecated ``datetime.utcnow()`` / ``datetime.utcfromtimestamp()``
62
+ to timezone-aware equivalents; ``utils.timestamp()`` now treats naive
63
+ datetimes as UTC and accepts timezone-aware datetimes
64
+ - ``utils.write_config_value_to_file`` now sets config-file permissions to
65
+ ``0o600`` as documented (previously ``0o700``)
66
+
67
+ Deprecated
68
+ ^^^^^^^^^^
69
+
70
+
71
+ Removed
72
+ ^^^^^^^
73
+
74
+ - Python 2 import shims (``urlparse`` and ``importlib_metadata`` fallbacks)
75
+ - Redundant ``requirements.txt``; ``tox.ini`` no longer references it
76
+ - Support for Python 3.9 (end of life); ``requires-python`` is now ``>=3.10``
77
+ - Stale ``.travis.yml`` and ``appveyor.yml`` CI configurations
78
+ - Dropped support for Python 3.7 and 3.8 in CI workflow. ``importlib.metadata``
79
+ (used for storage broker entry-point discovery) is only available in the
80
+ standard library from Python 3.8 onwards, and ``actions/setup-python`` no
81
+ longer provides 3.7/3.8 builds on ``ubuntu-latest``
82
+
83
+ Fixed
84
+ ^^^^^
85
+
86
+ - A ``ProtoDataSet`` object could still add items, overwrite the README,
87
+ add item metadata and be frozen again after it had been frozen, which
88
+ rewrote the manifest of a frozen dataset (#38). These now raise
89
+ ``DtoolCoreFrozenDataSetError``; ``freeze`` and ``freeze_with_manifest``
90
+ also check the admin metadata in storage, which catches a dataset frozen
91
+ by another object or process. Annotations and tags remain mutable
92
+ - ``ProtoDataSet.freeze_with_manifest`` now rejects manifests that are
93
+ inconsistent with the proto dataset: a ``hash_function`` that is missing or
94
+ differs from the storage broker's, items without ``relpath`` or whose
95
+ identifier is not derived from their ``relpath``, and items present in
96
+ storage but absent from the manifest (previously not checked at all for an
97
+ empty manifest). Item content is still never read.
98
+ - ``ProtoDataSet.freeze`` and ``freeze_with_manifest`` failed with "Overlay
99
+ keys must be dataset identifiers" when item metadata was added to only
100
+ some items, after the manifest had already been written. Items without
101
+ metadata for an overlay now get ``None``, and overlays are generated and
102
+ validated before anything is written, so a failing freeze leaves the
103
+ proto dataset untouched
104
+ - ``update_readme`` named README backups using local time interpreted as UTC,
105
+ offsetting the backup timestamp by the local UTC offset
106
+ - Item metadata keys containing dots (e.g. ``my.key``) were read back by
107
+ ``DiskStorageBroker.get_item_metadata`` with only the part after the last
108
+ dot, silently renaming the resulting overlay
109
+ - ``ProtoDataSet.add_item_metadata`` now validates the key with
110
+ ``name_is_valid`` and raises ``DtoolCoreInvalidNameError`` immediately;
111
+ previously invalid keys failed during ``freeze`` after the manifest had
112
+ been written
113
+ - ``utils.name_is_valid`` now rejects names consisting only of dots (``.``,
114
+ ``..``), which referred to the current or parent directory for datasets,
115
+ tags, annotations and overlays on disk
116
+ - ``raise(Error())`` rewritten to ``raise Error()`` throughout (statement, not
117
+ call), resolving the corresponding lint warnings
118
+ - On Windows, ``file://C:/path`` URIs (drive letter parsed as the network
119
+ location) silently resolved to ``/path`` on the drive of the current
120
+ working directory; they are now normalised to ``file:///C:/path``
121
+ - ``DiskStorageBroker`` now reads and writes text (README, metadata) as UTF-8
122
+ instead of the locale encoding, which broke non-ASCII READMEs on Windows.
123
+ Files that are not valid UTF-8 are read using the locale encoding, so
124
+ datasets written by older versions on Windows remain readable
125
+ - ``DiskStorageBroker`` now writes text with ``\n`` line endings on all
126
+ platforms (previously ``\r\n`` on Windows), and converts ``\r\n`` in the
127
+ content to ``\n``, so datasets are byte-identical across platforms
128
+ - ``utils.windows_to_unix_path`` and ``utils.unix_to_windows_path`` raised
129
+ ``IndexError`` on Windows for two-character paths starting with ``/``
130
+
131
+ Security
132
+ ^^^^^^^^
133
+
134
+
135
+ [3.19.0] - 2024-12-16
136
+ ---------------------
137
+
138
+
139
+ Added
140
+ ^^^^^
141
+
142
+ - ``delete_annotation`` method on ``Dataset`` class
143
+ - Test with Python 3.13 in CI workflow
144
+
145
+ Changed
146
+ ^^^^^^^
147
+
148
+ - public ``admin_metadata`` property exposes private ``_admin_metadata`` attribute of ``Dataset``
149
+ - ``pkg_resources`` has been deprecated with Python 3.12. Replaced use of ``pkg_resources.iter_entry_points`` with ``importlib.metadata.entry_points`` for >= Python 3.8
150
+
151
+ Deprecated
152
+ ^^^^^^^^^^
153
+
154
+
155
+ Removed
156
+ ^^^^^^^
157
+
158
+
159
+ Fixed
160
+ ^^^^^
161
+
162
+
163
+ Security
164
+ ^^^^^^^^
165
+
166
+
36
167
  [3.18.3] - 2024-06-24
37
168
  ---------------------
38
169
 
@@ -1,26 +1,29 @@
1
- Metadata-Version: 2.1
1
+ Metadata-Version: 2.5
2
2
  Name: dtoolcore
3
- Version: 3.18.3
3
+ Version: 3.20.0
4
4
  Summary: Core API for managing (scientific) data
5
- Author-email: Tjelvar Olsson <tjelvar.olsson@gmail.com>
6
5
  Project-URL: Documentation, https://dtoolcore.readthedocs.io
7
6
  Project-URL: Repository, https://github.com/jic-dtool/dtoolcore
8
- Project-URL: Changelog, https://github.com/jic-dtool/dtoolcore/blob/master/CHANGELOG.rst
9
- Description-Content-Type: text/x-rst
7
+ Project-URL: Changelog, https://github.com/jic-dtool/dtoolcore/blob/main/CHANGELOG.rst
8
+ Author-email: Tjelvar Olsson <tjelvar.olsson@gmail.com>
9
+ License: MIT
10
10
  License-File: LICENSE.rst
11
- Requires-Dist: setuptools
12
- Provides-Extra: test
13
- Requires-Dist: pytest; extra == "test"
14
- Requires-Dist: pytest-cov; extra == "test"
15
- Requires-Dist: pytz; extra == "test"
11
+ Requires-Python: >=3.10
16
12
  Provides-Extra: docs
17
- Requires-Dist: sphinx; extra == "docs"
18
- Requires-Dist: sphinx_rtd_theme; extra == "docs"
13
+ Requires-Dist: sphinx; extra == 'docs'
14
+ Requires-Dist: sphinx-rtd-theme; extra == 'docs'
15
+ Provides-Extra: lint
16
+ Requires-Dist: ruff; extra == 'lint'
17
+ Provides-Extra: test
18
+ Requires-Dist: pytest; extra == 'test'
19
+ Requires-Dist: pytest-cov; extra == 'test'
20
+ Requires-Dist: pytz; extra == 'test'
21
+ Description-Content-Type: text/x-rst
19
22
 
20
23
  Manage scientific data sets
21
24
  ===========================
22
25
 
23
- .. |dtool| image:: https://github.com/jic-dtool/dtoolcore/blob/master/icons/22x22/dtool_logo.png?raw=True
26
+ .. |dtool| image:: https://github.com/jic-dtool/dtoolcore/blob/main/icons/22x22/dtool_logo.png?raw=True
24
27
  :height: 20px
25
28
  :target: https://github.com/jic-dtool/dtoolcore
26
29
 
@@ -32,11 +35,11 @@ Manage scientific data sets
32
35
  :target: https://ci.appveyor.com/project/tjelvar-olsson/dtoolcore
33
36
  :alt: AppVeyor CI build status (Windows)
34
37
 
35
- .. |test| image:: https://img.shields.io/github/actions/workflow/status/jic-dtool/dtoolcore/test.yml?branch=master&label=tests
38
+ .. |test| image:: https://img.shields.io/github/actions/workflow/status/jic-dtool/dtoolcore/test.yml?branch=main&label=tests
36
39
  :target: https://github.com/jic-dtool/dtoolcore/actions/workflows/test.yml
37
40
 
38
- .. |codecov| image:: https://codecov.io/github/jic-dtool/dtoolcore/coverage.svg?branch=master
39
- :target: https://codecov.io/github/jic-dtool/dtoolcore?branch=master
41
+ .. |codecov| image:: https://codecov.io/github/jic-dtool/dtoolcore/coverage.svg?branch=main
42
+ :target: https://codecov.io/github/jic-dtool/dtoolcore?branch=main
40
43
  :alt: Code Coverage
41
44
 
42
45
  .. |docs| image:: https://readthedocs.org/projects/dtoolcore/badge/?version=latest
@@ -64,7 +67,7 @@ Features
64
67
  - Ability to create plugins for custom storage solutions
65
68
  - Plugins for iRODS and Microsoft Azure storage backends available
66
69
  - Cross-platform: Linux, Mac and Windows are all supported
67
- - Works with Python 2.7, 3.5 and 3.6
70
+ - Works with Python 3.10 and above
68
71
  - No external dependencies
69
72
 
70
73
  Overview
@@ -1,7 +1,7 @@
1
1
  Manage scientific data sets
2
2
  ===========================
3
3
 
4
- .. |dtool| image:: https://github.com/jic-dtool/dtoolcore/blob/master/icons/22x22/dtool_logo.png?raw=True
4
+ .. |dtool| image:: https://github.com/jic-dtool/dtoolcore/blob/main/icons/22x22/dtool_logo.png?raw=True
5
5
  :height: 20px
6
6
  :target: https://github.com/jic-dtool/dtoolcore
7
7
 
@@ -13,11 +13,11 @@ Manage scientific data sets
13
13
  :target: https://ci.appveyor.com/project/tjelvar-olsson/dtoolcore
14
14
  :alt: AppVeyor CI build status (Windows)
15
15
 
16
- .. |test| image:: https://img.shields.io/github/actions/workflow/status/jic-dtool/dtoolcore/test.yml?branch=master&label=tests
16
+ .. |test| image:: https://img.shields.io/github/actions/workflow/status/jic-dtool/dtoolcore/test.yml?branch=main&label=tests
17
17
  :target: https://github.com/jic-dtool/dtoolcore/actions/workflows/test.yml
18
18
 
19
- .. |codecov| image:: https://codecov.io/github/jic-dtool/dtoolcore/coverage.svg?branch=master
20
- :target: https://codecov.io/github/jic-dtool/dtoolcore?branch=master
19
+ .. |codecov| image:: https://codecov.io/github/jic-dtool/dtoolcore/coverage.svg?branch=main
20
+ :target: https://codecov.io/github/jic-dtool/dtoolcore?branch=main
21
21
  :alt: Code Coverage
22
22
 
23
23
  .. |docs| image:: https://readthedocs.org/projects/dtoolcore/badge/?version=latest
@@ -45,7 +45,7 @@ Features
45
45
  - Ability to create plugins for custom storage solutions
46
46
  - Plugins for iRODS and Microsoft Azure storage backends available
47
47
  - Cross-platform: Linux, Mac and Windows are all supported
48
- - Works with Python 2.7, 3.5 and 3.6
48
+ - Works with Python 3.10 and above
49
49
  - No external dependencies
50
50
 
51
51
  Overview