datajoint 2.0.0__tar.gz → 2.0.1__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 (42) hide show
  1. {datajoint-2.0.0 → datajoint-2.0.1}/PKG-INFO +7 -6
  2. {datajoint-2.0.0 → datajoint-2.0.1}/pyproject.toml +7 -5
  3. {datajoint-2.0.0 → datajoint-2.0.1}/src/datajoint/migrate.py +18 -0
  4. {datajoint-2.0.0 → datajoint-2.0.1}/src/datajoint/table.py +13 -4
  5. {datajoint-2.0.0 → datajoint-2.0.1}/src/datajoint/user_tables.py +1 -0
  6. {datajoint-2.0.0 → datajoint-2.0.1}/src/datajoint/utils.py +9 -0
  7. {datajoint-2.0.0 → datajoint-2.0.1}/src/datajoint/version.py +1 -1
  8. {datajoint-2.0.0 → datajoint-2.0.1}/src/datajoint.egg-info/PKG-INFO +7 -6
  9. {datajoint-2.0.0 → datajoint-2.0.1}/src/datajoint.egg-info/requires.txt +7 -5
  10. {datajoint-2.0.0 → datajoint-2.0.1}/LICENSE +0 -0
  11. {datajoint-2.0.0 → datajoint-2.0.1}/README.md +0 -0
  12. {datajoint-2.0.0 → datajoint-2.0.1}/setup.cfg +0 -0
  13. {datajoint-2.0.0 → datajoint-2.0.1}/src/datajoint/__init__.py +0 -0
  14. {datajoint-2.0.0 → datajoint-2.0.1}/src/datajoint/autopopulate.py +0 -0
  15. {datajoint-2.0.0 → datajoint-2.0.1}/src/datajoint/blob.py +0 -0
  16. {datajoint-2.0.0 → datajoint-2.0.1}/src/datajoint/builtin_codecs.py +0 -0
  17. {datajoint-2.0.0 → datajoint-2.0.1}/src/datajoint/cli.py +0 -0
  18. {datajoint-2.0.0 → datajoint-2.0.1}/src/datajoint/codecs.py +0 -0
  19. {datajoint-2.0.0 → datajoint-2.0.1}/src/datajoint/condition.py +0 -0
  20. {datajoint-2.0.0 → datajoint-2.0.1}/src/datajoint/connection.py +0 -0
  21. {datajoint-2.0.0 → datajoint-2.0.1}/src/datajoint/declare.py +0 -0
  22. {datajoint-2.0.0 → datajoint-2.0.1}/src/datajoint/dependencies.py +0 -0
  23. {datajoint-2.0.0 → datajoint-2.0.1}/src/datajoint/diagram.py +0 -0
  24. {datajoint-2.0.0 → datajoint-2.0.1}/src/datajoint/errors.py +0 -0
  25. {datajoint-2.0.0 → datajoint-2.0.1}/src/datajoint/expression.py +0 -0
  26. {datajoint-2.0.0 → datajoint-2.0.1}/src/datajoint/gc.py +0 -0
  27. {datajoint-2.0.0 → datajoint-2.0.1}/src/datajoint/hash_registry.py +0 -0
  28. {datajoint-2.0.0 → datajoint-2.0.1}/src/datajoint/heading.py +0 -0
  29. {datajoint-2.0.0 → datajoint-2.0.1}/src/datajoint/jobs.py +0 -0
  30. {datajoint-2.0.0 → datajoint-2.0.1}/src/datajoint/lineage.py +0 -0
  31. {datajoint-2.0.0 → datajoint-2.0.1}/src/datajoint/logging.py +0 -0
  32. {datajoint-2.0.0 → datajoint-2.0.1}/src/datajoint/objectref.py +0 -0
  33. {datajoint-2.0.0 → datajoint-2.0.1}/src/datajoint/preview.py +0 -0
  34. {datajoint-2.0.0 → datajoint-2.0.1}/src/datajoint/schemas.py +0 -0
  35. {datajoint-2.0.0 → datajoint-2.0.1}/src/datajoint/settings.py +0 -0
  36. {datajoint-2.0.0 → datajoint-2.0.1}/src/datajoint/staged_insert.py +0 -0
  37. {datajoint-2.0.0 → datajoint-2.0.1}/src/datajoint/storage.py +0 -0
  38. {datajoint-2.0.0 → datajoint-2.0.1}/src/datajoint/types.py +0 -0
  39. {datajoint-2.0.0 → datajoint-2.0.1}/src/datajoint.egg-info/SOURCES.txt +0 -0
  40. {datajoint-2.0.0 → datajoint-2.0.1}/src/datajoint.egg-info/dependency_links.txt +0 -0
  41. {datajoint-2.0.0 → datajoint-2.0.1}/src/datajoint.egg-info/entry_points.txt +0 -0
  42. {datajoint-2.0.0 → datajoint-2.0.1}/src/datajoint.egg-info/top_level.txt +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: datajoint
3
- Version: 2.0.0
3
+ Version: 2.0.1
4
4
  Summary: DataJoint for Python is a framework for scientific workflow management based on relational principles. DataJoint is built on the foundation of the relational data model and prescribes a consistent method for organizing, populating, computing, and querying data.
5
5
  Author: Raphael Guzman, Edgar Walker
6
6
  Author-email: Dimitri Yatsenko <dimitri@datajoint.com>, Thinh Nguyen <thinh@datajoint.com>, DataJoint Contributors <support@datajoint.com>
@@ -218,16 +218,11 @@ Requires-Dist: numpy
218
218
  Requires-Dist: pymysql>=0.7.2
219
219
  Requires-Dist: deepdiff
220
220
  Requires-Dist: pyparsing
221
- Requires-Dist: ipython
222
221
  Requires-Dist: pandas
223
222
  Requires-Dist: tqdm
224
223
  Requires-Dist: networkx
225
224
  Requires-Dist: pydot
226
225
  Requires-Dist: fsspec>=2023.1.0
227
- Requires-Dist: matplotlib
228
- Requires-Dist: faker
229
- Requires-Dist: urllib3
230
- Requires-Dist: setuptools
231
226
  Requires-Dist: pydantic-settings>=2.0.0
232
227
  Provides-Extra: s3
233
228
  Requires-Dist: s3fs>=2023.1.0; extra == "s3"
@@ -239,10 +234,16 @@ Provides-Extra: polars
239
234
  Requires-Dist: polars>=0.20.0; extra == "polars"
240
235
  Provides-Extra: arrow
241
236
  Requires-Dist: pyarrow>=14.0.0; extra == "arrow"
237
+ Provides-Extra: viz
238
+ Requires-Dist: matplotlib; extra == "viz"
239
+ Requires-Dist: ipython; extra == "viz"
242
240
  Provides-Extra: test
243
241
  Requires-Dist: pytest; extra == "test"
244
242
  Requires-Dist: pytest-cov; extra == "test"
245
243
  Requires-Dist: requests; extra == "test"
244
+ Requires-Dist: faker; extra == "test"
245
+ Requires-Dist: matplotlib; extra == "test"
246
+ Requires-Dist: ipython; extra == "test"
246
247
  Requires-Dist: s3fs>=2023.1.0; extra == "test"
247
248
  Requires-Dist: testcontainers[minio,mysql]>=4.0; extra == "test"
248
249
  Requires-Dist: polars>=0.20.0; extra == "test"
@@ -11,16 +11,11 @@ dependencies = [
11
11
  "pymysql>=0.7.2",
12
12
  "deepdiff",
13
13
  "pyparsing",
14
- "ipython",
15
14
  "pandas",
16
15
  "tqdm",
17
16
  "networkx",
18
17
  "pydot",
19
18
  "fsspec>=2023.1.0",
20
- "matplotlib",
21
- "faker",
22
- "urllib3",
23
- "setuptools",
24
19
  "pydantic-settings>=2.0.0",
25
20
  ]
26
21
 
@@ -88,6 +83,9 @@ test = [
88
83
  "pytest",
89
84
  "pytest-cov",
90
85
  "requests",
86
+ "faker",
87
+ "matplotlib",
88
+ "ipython",
91
89
  "graphviz",
92
90
  "testcontainers[mysql,minio]>=4.0",
93
91
  "polars>=0.20.0",
@@ -100,10 +98,14 @@ gcs = ["gcsfs>=2023.1.0"]
100
98
  azure = ["adlfs>=2023.1.0"]
101
99
  polars = ["polars>=0.20.0"]
102
100
  arrow = ["pyarrow>=14.0.0"]
101
+ viz = ["matplotlib", "ipython"]
103
102
  test = [
104
103
  "pytest",
105
104
  "pytest-cov",
106
105
  "requests",
106
+ "faker",
107
+ "matplotlib",
108
+ "ipython",
107
109
  "s3fs>=2023.1.0",
108
110
  "testcontainers[mysql,minio]>=4.0",
109
111
  "polars>=0.20.0",
@@ -5,6 +5,11 @@ This module provides tools for migrating existing schemas to use the new
5
5
  Codec system, particularly for upgrading blob columns to use
6
6
  explicit `<blob>` type declarations.
7
7
 
8
+ .. note::
9
+ This module is provided temporarily to assist with migration from pre-2.0.
10
+ It will be deprecated in DataJoint 2.1 and removed in 2.2.
11
+ Complete your migrations while on DataJoint 2.0.
12
+
8
13
  Note on Terminology
9
14
  -------------------
10
15
  This module uses "external storage" because that was the term in DataJoint 0.14.6.
@@ -16,9 +21,22 @@ from __future__ import annotations
16
21
 
17
22
  import logging
18
23
  import re
24
+ import warnings
19
25
  from typing import TYPE_CHECKING
20
26
 
27
+ from packaging.version import Version
28
+
21
29
  from .errors import DataJointError
30
+ from .version import __version__
31
+
32
+ # Show deprecation warning starting in 2.1
33
+ if Version(__version__) >= Version("2.1"):
34
+ warnings.warn(
35
+ "datajoint.migrate is deprecated and will be removed in DataJoint 2.2. "
36
+ "Complete your schema migrations before upgrading.",
37
+ DeprecationWarning,
38
+ stacklevel=2,
39
+ )
22
40
 
23
41
  if TYPE_CHECKING:
24
42
  from .schemas import Schema
@@ -151,11 +151,20 @@ class Table(QueryExpression):
151
151
  """
152
152
  if self.connection.in_transaction:
153
153
  raise DataJointError("Cannot declare new tables inside a transaction, e.g. from inside a populate/make call")
154
- # Enforce strict CamelCase #1150
155
- if not is_camel_case(self.class_name):
154
+ # Validate class name #1150
155
+ class_name = self.class_name
156
+ if "_" in class_name:
157
+ warnings.warn(
158
+ f"Table class name `{class_name}` contains underscores. "
159
+ "CamelCase names without underscores are recommended.",
160
+ UserWarning,
161
+ stacklevel=2,
162
+ )
163
+ class_name = class_name.replace("_", "")
164
+ if not is_camel_case(class_name):
156
165
  raise DataJointError(
157
- "Table class name `{name}` is invalid. Please use CamelCase. ".format(name=self.class_name)
158
- + "Classes defining tables should be formatted in strict CamelCase."
166
+ f"Table class name `{self.class_name}` is invalid. "
167
+ "Class names must be in CamelCase, starting with a capital letter."
159
168
  )
160
169
  sql, _external_stores, primary_key, fk_attribute_map = declare(self.full_table_name, self.definition, context)
161
170
 
@@ -32,6 +32,7 @@ supported_class_attrs = {
32
32
  "to_arrow",
33
33
  "to_arrays",
34
34
  "keys",
35
+ "fetch",
35
36
  "fetch1",
36
37
  "head",
37
38
  "tail",
@@ -2,6 +2,7 @@
2
2
 
3
3
  import re
4
4
  import shutil
5
+ import warnings
5
6
  from pathlib import Path
6
7
 
7
8
  from .errors import DataJointError
@@ -86,6 +87,14 @@ def from_camel_case(s):
86
87
  def convert(match):
87
88
  return ("_" if match.groups()[0] else "") + match.group(0).lower()
88
89
 
90
+ # Handle underscores: warn and remove them
91
+ if "_" in s:
92
+ warnings.warn(
93
+ f"Table class name `{s}` contains underscores. " "CamelCase names without underscores are recommended.",
94
+ UserWarning,
95
+ stacklevel=3,
96
+ )
97
+ s = s.replace("_", "")
89
98
  if not is_camel_case(s):
90
99
  raise DataJointError("ClassName must be alphanumeric in CamelCase, begin with a capital letter")
91
100
  return re.sub(r"(\B[A-Z])|(\b[A-Z])", convert, s)
@@ -1,4 +1,4 @@
1
1
  # version bump auto managed by Github Actions:
2
2
  # label_prs.yaml(prep), release.yaml(bump), post_release.yaml(edit)
3
3
  # manually set this version will be eventually overwritten by the above actions
4
- __version__ = "2.0.0"
4
+ __version__ = "2.0.1"
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: datajoint
3
- Version: 2.0.0
3
+ Version: 2.0.1
4
4
  Summary: DataJoint for Python is a framework for scientific workflow management based on relational principles. DataJoint is built on the foundation of the relational data model and prescribes a consistent method for organizing, populating, computing, and querying data.
5
5
  Author: Raphael Guzman, Edgar Walker
6
6
  Author-email: Dimitri Yatsenko <dimitri@datajoint.com>, Thinh Nguyen <thinh@datajoint.com>, DataJoint Contributors <support@datajoint.com>
@@ -218,16 +218,11 @@ Requires-Dist: numpy
218
218
  Requires-Dist: pymysql>=0.7.2
219
219
  Requires-Dist: deepdiff
220
220
  Requires-Dist: pyparsing
221
- Requires-Dist: ipython
222
221
  Requires-Dist: pandas
223
222
  Requires-Dist: tqdm
224
223
  Requires-Dist: networkx
225
224
  Requires-Dist: pydot
226
225
  Requires-Dist: fsspec>=2023.1.0
227
- Requires-Dist: matplotlib
228
- Requires-Dist: faker
229
- Requires-Dist: urllib3
230
- Requires-Dist: setuptools
231
226
  Requires-Dist: pydantic-settings>=2.0.0
232
227
  Provides-Extra: s3
233
228
  Requires-Dist: s3fs>=2023.1.0; extra == "s3"
@@ -239,10 +234,16 @@ Provides-Extra: polars
239
234
  Requires-Dist: polars>=0.20.0; extra == "polars"
240
235
  Provides-Extra: arrow
241
236
  Requires-Dist: pyarrow>=14.0.0; extra == "arrow"
237
+ Provides-Extra: viz
238
+ Requires-Dist: matplotlib; extra == "viz"
239
+ Requires-Dist: ipython; extra == "viz"
242
240
  Provides-Extra: test
243
241
  Requires-Dist: pytest; extra == "test"
244
242
  Requires-Dist: pytest-cov; extra == "test"
245
243
  Requires-Dist: requests; extra == "test"
244
+ Requires-Dist: faker; extra == "test"
245
+ Requires-Dist: matplotlib; extra == "test"
246
+ Requires-Dist: ipython; extra == "test"
246
247
  Requires-Dist: s3fs>=2023.1.0; extra == "test"
247
248
  Requires-Dist: testcontainers[minio,mysql]>=4.0; extra == "test"
248
249
  Requires-Dist: polars>=0.20.0; extra == "test"
@@ -2,16 +2,11 @@ numpy
2
2
  pymysql>=0.7.2
3
3
  deepdiff
4
4
  pyparsing
5
- ipython
6
5
  pandas
7
6
  tqdm
8
7
  networkx
9
8
  pydot
10
9
  fsspec>=2023.1.0
11
- matplotlib
12
- faker
13
- urllib3
14
- setuptools
15
10
  pydantic-settings>=2.0.0
16
11
 
17
12
  [arrow]
@@ -42,7 +37,14 @@ s3fs>=2023.1.0
42
37
  pytest
43
38
  pytest-cov
44
39
  requests
40
+ faker
41
+ matplotlib
42
+ ipython
45
43
  s3fs>=2023.1.0
46
44
  testcontainers[minio,mysql]>=4.0
47
45
  polars>=0.20.0
48
46
  pyarrow>=14.0.0
47
+
48
+ [viz]
49
+ matplotlib
50
+ ipython
File without changes
File without changes
File without changes
File without changes