np_codeocean 0.3.5__tar.gz → 0.3.6__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 (30) hide show
  1. {np_codeocean-0.3.5 → np_codeocean-0.3.6}/PKG-INFO +13 -6
  2. {np_codeocean-0.3.5 → np_codeocean-0.3.6}/README.md +28 -28
  3. {np_codeocean-0.3.5 → np_codeocean-0.3.6}/pyproject.toml +74 -60
  4. np_codeocean-0.3.6/setup.cfg +4 -0
  5. np_codeocean-0.3.6/src/np_codeocean/__init__.py +2 -0
  6. {np_codeocean-0.3.5 → np_codeocean-0.3.6}/src/np_codeocean/metadata/__init__.py +1 -1
  7. {np_codeocean-0.3.5 → np_codeocean-0.3.6}/src/np_codeocean/metadata/common.py +1 -3
  8. {np_codeocean-0.3.5 → np_codeocean-0.3.6}/src/np_codeocean/metadata/core.py +333 -331
  9. {np_codeocean-0.3.5 → np_codeocean-0.3.6}/src/np_codeocean/metadata/dynamic_routing_task_etl.py +1 -1
  10. {np_codeocean-0.3.5 → np_codeocean-0.3.6}/src/np_codeocean/metadata/model_templates/behavior_box.py +115 -115
  11. {np_codeocean-0.3.5 → np_codeocean-0.3.6}/src/np_codeocean/metadata/model_templates/neuropixels_rig.py +544 -544
  12. {np_codeocean-0.3.5 → np_codeocean-0.3.6}/src/np_codeocean/metadata/np.py +1 -1
  13. {np_codeocean-0.3.5 → np_codeocean-0.3.6}/src/np_codeocean/metadata/rigs.py +1 -1
  14. {np_codeocean-0.3.5 → np_codeocean-0.3.6}/src/np_codeocean/metadata/storage.py +78 -78
  15. {np_codeocean-0.3.5 → np_codeocean-0.3.6}/src/np_codeocean/metadata/utils.py +1 -1
  16. {np_codeocean-0.3.5 → np_codeocean-0.3.6}/src/np_codeocean/np_session_utils.py +462 -385
  17. {np_codeocean-0.3.5 → np_codeocean-0.3.6}/src/np_codeocean/scripts/upload_dynamic_routing_behavior.py +483 -413
  18. {np_codeocean-0.3.5 → np_codeocean-0.3.6}/src/np_codeocean/scripts/upload_dynamic_routing_ecephys.py +279 -217
  19. {np_codeocean-0.3.5 → np_codeocean-0.3.6}/src/np_codeocean/scripts/upload_split_recordings_example.py +39 -33
  20. {np_codeocean-0.3.5 → np_codeocean-0.3.6}/src/np_codeocean/utils.py +671 -563
  21. np_codeocean-0.3.6/src/np_codeocean.egg-info/PKG-INFO +66 -0
  22. np_codeocean-0.3.6/src/np_codeocean.egg-info/SOURCES.txt +27 -0
  23. np_codeocean-0.3.6/src/np_codeocean.egg-info/dependency_links.txt +1 -0
  24. np_codeocean-0.3.6/src/np_codeocean.egg-info/entry_points.txt +4 -0
  25. np_codeocean-0.3.6/src/np_codeocean.egg-info/requires.txt +22 -0
  26. np_codeocean-0.3.6/src/np_codeocean.egg-info/top_level.txt +1 -0
  27. {np_codeocean-0.3.5 → np_codeocean-0.3.6}/tests/test_metadata.py +99 -99
  28. np_codeocean-0.3.5/src/np_codeocean/__init__.py +0 -2
  29. {np_codeocean-0.3.5 → np_codeocean-0.3.6}/src/np_codeocean/metadata/model_templates/__init__.py +0 -0
  30. {np_codeocean-0.3.5 → np_codeocean-0.3.6}/src/np_codeocean/metadata/update.py +1 -2
@@ -1,9 +1,11 @@
1
- Metadata-Version: 2.1
1
+ Metadata-Version: 2.4
2
2
  Name: np_codeocean
3
- Version: 0.3.5
3
+ Version: 0.3.6
4
4
  Summary: Tools for uploading and interacting with Mindscope Neuropixels experiments on Code Ocean
5
- Author-Email: Ben Hardcastle <ben.hardcastle@alleninstitute.org>, Chris Mochizuki <chrism@alleninstitute.org>, Arjun Sridhar <arjun.sridhar@alleninstitute.org>
5
+ Author-email: Ben Hardcastle <ben.hardcastle@alleninstitute.org>, Chris Mochizuki <chrism@alleninstitute.org>, Arjun Sridhar <arjun.sridhar@alleninstitute.org>
6
6
  License: MIT
7
+ Project-URL: Source, https://github.com/AllenInstitute/np_codeocean
8
+ Project-URL: Issues, https://github.com/AllenInstitute/np_codeocean/issues
7
9
  Classifier: Programming Language :: Python :: 3
8
10
  Classifier: Programming Language :: Python :: 3.9
9
11
  Classifier: Programming Language :: Python :: 3.10
@@ -11,9 +13,8 @@ Classifier: Programming Language :: Python :: 3.11
11
13
  Classifier: License :: OSI Approved :: MIT License
12
14
  Classifier: Operating System :: Microsoft :: Windows
13
15
  Classifier: Operating System :: POSIX :: Linux
14
- Project-URL: Source, https://github.com/AllenInstitute/np_codeocean
15
- Project-URL: Issues, https://github.com/AllenInstitute/np_codeocean/issues
16
16
  Requires-Python: >=3.10
17
+ Description-Content-Type: text/markdown
17
18
  Requires-Dist: np_session>=0.6.44
18
19
  Requires-Dist: np-tools>=0.1.23
19
20
  Requires-Dist: np-config>=0.4.33
@@ -27,7 +28,13 @@ Requires-Dist: cryptography<43.0
27
28
  Requires-Dist: aind-data-transfer-service>=1.15.0
28
29
  Requires-Dist: aind-slurm-rest-v2==0.0.3
29
30
  Requires-Dist: aind-codeocean-pipeline-monitor>=0.5.2
30
- Description-Content-Type: text/markdown
31
+ Provides-Extra: dev
32
+ Requires-Dist: bump>=1.3.2; extra == "dev"
33
+ Provides-Extra: dynamicrouting
34
+ Requires-Dist: npc-lims>=0.1.154; extra == "dynamicrouting"
35
+ Requires-Dist: npc-sessions>=0.0.253; extra == "dynamicrouting"
36
+ Requires-Dist: aind-codeocean-pipeline-monitor[full]>=0.5.0; extra == "dynamicrouting"
37
+ Requires-Dist: aind-metadata-mapper==0.18.2; extra == "dynamicrouting"
31
38
 
32
39
  # np_codeocean
33
40
  Tools for uploading Mindscope Neuropixels experiments to S3 (for Code Ocean).
@@ -1,28 +1,28 @@
1
- # np_codeocean
2
- Tools for uploading Mindscope Neuropixels experiments to S3 (for Code Ocean).
3
-
4
- Requires running as admin on Windows in order to create remote-to-remote symlinks
5
- on the Isilon.
6
-
7
- - `upload` CLI tool is provided, which uses the
8
- [`np_session`](https://github.com/AllenInstitute/np_session) interface to find
9
- and upload
10
- raw data for one ecephys session:
11
-
12
- ```
13
- pip install np_codeocean
14
- upload <session-id>
15
- ```
16
-
17
- where session-id is any valid input to `np_session.Session()`, e.g.:
18
- - a lims ID (`1333741475`)
19
- - a workgroups foldername (`DRPilot_366122_20230101`)
20
- - a path to a session folder ( `\\allen\programs\mindscope\workgroups\np-exp\1333741475_719667_20240227`)
21
-
22
- - a folder of symlinks pointing to the raw data is created, with a new structure suitable for the KS2.5 sorting pipeline on Code Ocean
23
- - the symlink folder, plus metadata, are entered into a csv file, which is
24
- submitted to [`http://aind-data-transfer-service`](http://aind-data-transfer-service), which in turn runs the
25
- [`aind-data-transfer`](https://github.com/AllenNeuralDynamics/aind-data-transfer)
26
- tool on the HPC, which follows the symlinks to the original data,
27
- median-subtracts/scales/compresses ephys data, then uploads with the AWS CLI tool
28
- - all compression/zipping acts on copies in temporary folders: the original raw data is not altered in anyway
1
+ # np_codeocean
2
+ Tools for uploading Mindscope Neuropixels experiments to S3 (for Code Ocean).
3
+
4
+ Requires running as admin on Windows in order to create remote-to-remote symlinks
5
+ on the Isilon.
6
+
7
+ - `upload` CLI tool is provided, which uses the
8
+ [`np_session`](https://github.com/AllenInstitute/np_session) interface to find
9
+ and upload
10
+ raw data for one ecephys session:
11
+
12
+ ```
13
+ pip install np_codeocean
14
+ upload <session-id>
15
+ ```
16
+
17
+ where session-id is any valid input to `np_session.Session()`, e.g.:
18
+ - a lims ID (`1333741475`)
19
+ - a workgroups foldername (`DRPilot_366122_20230101`)
20
+ - a path to a session folder ( `\\allen\programs\mindscope\workgroups\np-exp\1333741475_719667_20240227`)
21
+
22
+ - a folder of symlinks pointing to the raw data is created, with a new structure suitable for the KS2.5 sorting pipeline on Code Ocean
23
+ - the symlink folder, plus metadata, are entered into a csv file, which is
24
+ submitted to [`http://aind-data-transfer-service`](http://aind-data-transfer-service), which in turn runs the
25
+ [`aind-data-transfer`](https://github.com/AllenNeuralDynamics/aind-data-transfer)
26
+ tool on the HPC, which follows the symlinks to the original data,
27
+ median-subtracts/scales/compresses ephys data, then uploads with the AWS CLI tool
28
+ - all compression/zipping acts on copies in temporary folders: the original raw data is not altered in anyway
@@ -1,53 +1,7 @@
1
- [tool.pdm.scripts]
2
- ruff = "ruff --fix src"
3
- blue = "blue src"
4
- pytest = "pytest --cov"
5
- bump = "bump -p pyproject.toml"
6
-
7
- [tool.pdm.scripts.prebuild]
8
- composite = [
9
- "blue",
10
- "ruff",
11
- "pytest",
12
- ]
13
-
14
- [tool.pdm.scripts.build]
15
- composite = [
16
- "prebuild",
17
- "pdm build",
18
- ]
19
-
20
- [tool.pdm.scripts.dry-run]
21
- composite = [
22
- "prebuild",
23
- "pdm build",
24
- "pdm publish --no-build --repository https://test.pypi.org/simple",
25
- ]
26
-
27
- [tool.pdm.scripts.publish]
28
- composite = [
29
- "prebuild",
30
- "bump",
31
- "pdm build",
32
- "pdm publish --no-build",
33
- ]
34
-
35
- [tool.pdm.scripts.pub]
36
- composite = [
37
- "bump",
38
- "pdm publish",
39
- ]
40
-
41
- [tool.uv]
42
- package = true
43
- default-groups = [
44
- "dev",
45
- "dynamicrouting",
46
- ]
47
1
 
48
2
  [project]
49
3
  name = "np_codeocean"
50
- version = "0.3.5"
4
+ version = "0.3.6"
51
5
  description = "Tools for uploading and interacting with Mindscope Neuropixels experiments on Code Ocean"
52
6
  authors = [
53
7
  { name = "Ben Hardcastle", email = "ben.hardcastle@alleninstitute.org" },
@@ -93,24 +47,84 @@ upload_dr_behavior = "np_codeocean.scripts.upload_dynamic_routing_behavior:main"
93
47
  upload_dr_ecephys = "np_codeocean.scripts.upload_dynamic_routing_ecephys:main"
94
48
  upload_sessions = "np_codeocean.scripts.upload_sessions:main"
95
49
 
96
- [dependency-groups]
97
- dev = [
98
- "bump>=1.3.2",
99
- "pdm>=2.4.9",
100
- ]
50
+ [project.optional-dependencies]
51
+ dev = ["bump>=1.3.2"]
101
52
  dynamicrouting = [
102
53
  "npc-lims>=0.1.154",
103
- "npc-sessions>=0.0.273",
54
+ "npc-sessions>=0.0.253",
104
55
  "aind-codeocean-pipeline-monitor[full]>=0.5.0",
105
56
  "aind-metadata-mapper==0.18.2",
106
- "npc-mvr>=0.1.14",
107
- "npc-stim>=0.1.14",
108
- "npc-samstim>=0.1.13",
109
- "npc-sync>=0.1.25",
110
57
  ]
111
58
 
112
59
  [build-system]
113
- requires = [
114
- "pdm-backend",
60
+ requires = ["setuptools>=61", "wheel"]
61
+ build-backend = "setuptools.build_meta"
62
+
63
+ [dependency-groups]
64
+ task_runner = ["poethepoet>=0.33.1"]
65
+ linting = ["black>=25.1.0", "isort>=6.0.1", "ruff>=0.11.2"]
66
+ testing = ["mypy>=1.4.1"]
67
+ bump = ["bump-my-version>=1.1.1", "git-changelog>=2.5.3"]
68
+
69
+ [tool.uv]
70
+ package = true
71
+ default-groups = "all"
72
+
73
+
74
+ [tool.poe.tasks]
75
+ mypy = "mypy src --install-types --non-interactive"
76
+ test = ["mypy"]
77
+ ruff = "ruff check src --fix-only"
78
+ black = "black src"
79
+ format = ["ruff", "black"]
80
+ bump_pub_tag = "bump-my-version bump patch"
81
+ release = ["format", "bump_pub_tag"]
82
+
83
+ [tool.bumpversion]
84
+ tag = true
85
+ allow_dirty = true
86
+ commit = true
87
+ commit_args = "-a"
88
+ message = "Bump version: {current_version} → {new_version} [skip actions]"
89
+ pre_commit_hooks = [
90
+ "uv lock --upgrade-package np_workflows",
91
+ "git-changelog -o CHANGELOG.md",
92
+ "uv build",
93
+ "uv publish",
94
+ ]
95
+ post_commit_hooks = [
96
+ "git push origin main",
97
+ "git push --tags",
98
+ ]
99
+
100
+ [tool.ruff]
101
+ line-length = 100
102
+ select = [
103
+ "B", # flake8-bugbear
104
+ "C4", # flake8-comprehensions
105
+ "E", # pycodestyle
106
+ "F", # pyflakes
107
+ "PGH", # pygrep-hooks
108
+ "RUF", # ruff
109
+ "W", # pycodestyle
110
+ "YTT", # flake8-2020
111
+ "ANN",
112
+ "C",
113
+ "I",
114
+ "RUF100",
115
+ "N",
116
+ "UP",
115
117
  ]
116
- build-backend = "pdm.backend"
118
+ # extend-ignore = ["B018", "B019"]
119
+ src = ["src"]
120
+ extend-exclude = ["tests/fixtures"]
121
+ target-version = "py39"
122
+
123
+ [tool.ruff.flake8-tidy-imports]
124
+ ban-relative-imports = "all"
125
+
126
+ [tool.ruff.mccabe]
127
+ max-complexity = 10
128
+
129
+ [tool.ruff.isort]
130
+ known-first-party = ["np_workflows"]
@@ -0,0 +1,4 @@
1
+ [egg_info]
2
+ tag_build =
3
+ tag_date = 0
4
+
@@ -0,0 +1,2 @@
1
+ from np_codeocean.np_session_utils import *
2
+ from np_codeocean.utils import *
@@ -1,3 +1,3 @@
1
1
  """
2
2
  Migrated from https://github.com/AllenInstitute/np-aind-metadata
3
- """
3
+ """
@@ -1,6 +1,4 @@
1
-
2
- """Models and controlled language for aind-data-schema devices names.
3
- """
1
+ """Models and controlled language for aind-data-schema devices names."""
4
2
 
5
3
  import typing
6
4