npc-shields 0.1.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.
@@ -0,0 +1,50 @@
1
+ Metadata-Version: 2.1
2
+ Name: npc_shields
3
+ Version: 0.1.1
4
+ Summary: Tools for Neuropixels probe insertion: providing suggested targets, recording actual insertions, storing notes.
5
+ Author-email: bjhardcastle <ben.hardcastle@alleninstitute.org>
6
+ License: MIT
7
+ Project-URL: Repository, https://github.com/AllenInstitute/npc_shields
8
+ Project-URL: Issues, https://github.com/AllenInstitute/npc_shields/issues
9
+ Classifier: Programming Language :: Python :: 3
10
+ Classifier: Programming Language :: Python :: 3.9
11
+ Classifier: Programming Language :: Python :: 3.10
12
+ Classifier: Programming Language :: Python :: 3.11
13
+ Classifier: License :: OSI Approved :: MIT License
14
+ Classifier: Operating System :: Microsoft :: Windows
15
+ Classifier: Operating System :: POSIX :: Linux
16
+ Requires-Python: >=3.9
17
+ Description-Content-Type: text/markdown
18
+ Requires-Dist: ipywidgets>=7
19
+ Requires-Dist: npc-session>=0.1.30
20
+
21
+ # npc_shields
22
+
23
+ [![PyPI](https://img.shields.io/pypi/v/npc-shields.svg?label=PyPI&color=blue)](https://pypi.org/project/npc-shields/)
24
+ [![Python version](https://img.shields.io/pypi/pyversions/npc-shields)](https://pypi.org/project/npc-shields/)
25
+
26
+ [![Coverage](https://img.shields.io/codecov/c/github/alleninstitute/npc_shields?logo=codecov)](https://app.codecov.io/github/AllenInstitute/npc_shields)
27
+ [![CI/CD](https://img.shields.io/github/actions/workflow/status/alleninstitute/npc_shields/publish.yml?label=CI/CD&logo=github)](https://github.com/alleninstitute/npc_shields/actions/workflows/publish.yml)
28
+ [![GitHub issues](https://img.shields.io/github/issues/alleninstitute/npc_shields?logo=github)](https://github.com/alleninstitute/npc_shields/issues)
29
+
30
+ Tools for Neuropixels probe insertion into SHIELD implants: providing suggested targets, recording actual insertions, storing notes.
31
+
32
+ ## creating new implant drawings
33
+ ### export 2D view of 3D model
34
+ - get a .sldpart CAD model from MPE
35
+ - open in Solidworks
36
+ - rotate the view to face the top of the implant, matching the view from the rig scope
37
+ - Save As -> .dxf
38
+ - check "current" view only
39
+
40
+ ### edit 2D drawing for widget
41
+ - open a copy of one of the existing .svg drawings in Inkscape/Illustrator, to use the same page size and colors
42
+ - add the new .dxf file
43
+ - if the lines are too thick to see any detail, change them to 1pt for now
44
+ - resize the new drawing to fill the page, like the existing drawing
45
+ - with the two drawings side by side, update the new drawing to match:
46
+ - the outline is fragmented and needs to be joined together so a white fill can be applied
47
+ - holes that have straight edges will need joining to be fill-able
48
+ - circular holes should already be fill-able
49
+ - check the CAD model for probe-letter designations (A1, A2, B1, ...)
50
+ - when finished, export as .svg
@@ -0,0 +1,30 @@
1
+ # npc_shields
2
+
3
+ [![PyPI](https://img.shields.io/pypi/v/npc-shields.svg?label=PyPI&color=blue)](https://pypi.org/project/npc-shields/)
4
+ [![Python version](https://img.shields.io/pypi/pyversions/npc-shields)](https://pypi.org/project/npc-shields/)
5
+
6
+ [![Coverage](https://img.shields.io/codecov/c/github/alleninstitute/npc_shields?logo=codecov)](https://app.codecov.io/github/AllenInstitute/npc_shields)
7
+ [![CI/CD](https://img.shields.io/github/actions/workflow/status/alleninstitute/npc_shields/publish.yml?label=CI/CD&logo=github)](https://github.com/alleninstitute/npc_shields/actions/workflows/publish.yml)
8
+ [![GitHub issues](https://img.shields.io/github/issues/alleninstitute/npc_shields?logo=github)](https://github.com/alleninstitute/npc_shields/issues)
9
+
10
+ Tools for Neuropixels probe insertion into SHIELD implants: providing suggested targets, recording actual insertions, storing notes.
11
+
12
+ ## creating new implant drawings
13
+ ### export 2D view of 3D model
14
+ - get a .sldpart CAD model from MPE
15
+ - open in Solidworks
16
+ - rotate the view to face the top of the implant, matching the view from the rig scope
17
+ - Save As -> .dxf
18
+ - check "current" view only
19
+
20
+ ### edit 2D drawing for widget
21
+ - open a copy of one of the existing .svg drawings in Inkscape/Illustrator, to use the same page size and colors
22
+ - add the new .dxf file
23
+ - if the lines are too thick to see any detail, change them to 1pt for now
24
+ - resize the new drawing to fill the page, like the existing drawing
25
+ - with the two drawings side by side, update the new drawing to match:
26
+ - the outline is fragmented and needs to be joined together so a white fill can be applied
27
+ - holes that have straight edges will need joining to be fill-able
28
+ - circular holes should already be fill-able
29
+ - check the CAD model for probe-letter designations (A1, A2, B1, ...)
30
+ - when finished, export as .svg
@@ -0,0 +1,191 @@
1
+ [project]
2
+ name = "npc_shields"
3
+ version = "0.1.1"
4
+ description = "Tools for Neuropixels probe insertion: providing suggested targets, recording actual insertions, storing notes."
5
+ authors = [
6
+ { name = "bjhardcastle", email = "ben.hardcastle@alleninstitute.org" },
7
+ ]
8
+ dependencies = [
9
+ "ipywidgets>=7",
10
+ "npc-session>=0.1.30",
11
+ ]
12
+ requires-python = ">=3.9"
13
+ readme = "README.md"
14
+ classifiers = [
15
+ "Programming Language :: Python :: 3",
16
+ "Programming Language :: Python :: 3.9",
17
+ "Programming Language :: Python :: 3.10",
18
+ "Programming Language :: Python :: 3.11",
19
+ "License :: OSI Approved :: MIT License",
20
+ "Operating System :: Microsoft :: Windows",
21
+ "Operating System :: POSIX :: Linux",
22
+ ]
23
+
24
+ [project.license]
25
+ text = "MIT"
26
+
27
+ [project.urls]
28
+ Repository = "https://github.com/AllenInstitute/npc_shields"
29
+ Issues = "https://github.com/AllenInstitute/npc_shields/issues"
30
+
31
+ [tool.pdm]
32
+ plugins = [
33
+ "pdm-bump",
34
+ ]
35
+
36
+ [tool.pdm.build]
37
+ includes = [
38
+ "src/npc_shields",
39
+ ]
40
+
41
+ [tool.pdm.dev-dependencies]
42
+ dev = [
43
+ "pytest>=7.4.0",
44
+ "ruff>=0.0.282",
45
+ "mypy>=1.4.1",
46
+ "pytest-cov>=4.1.0",
47
+ "black>=23.7.0",
48
+ ]
49
+
50
+ [tool.pdm.scripts]
51
+ ruff = "ruff check src --fix-only"
52
+ black = "black src"
53
+ test = "pytest --cov --cov-report=xml"
54
+ mypy = "mypy src --install-types --non-interactive"
55
+
56
+ [tool.pdm.scripts.bumpver]
57
+ composite = [
58
+ "pdm self add pdm-bump",
59
+ "pdm bump micro",
60
+ ]
61
+
62
+ [tool.pdm.scripts.tag]
63
+ composite = [
64
+ "pdm self add pdm-bump",
65
+ "pdm bump tag",
66
+ ]
67
+
68
+ [tool.pdm.scripts.prebuild]
69
+ composite = [
70
+ "mypy",
71
+ "test",
72
+ "black",
73
+ "ruff",
74
+ ]
75
+
76
+ [tool.pdm.scripts.dryrun]
77
+ composite = [
78
+ "prebuild",
79
+ "pdm publish --repository testpypi",
80
+ ]
81
+
82
+ [tool.pdm.scripts.pub]
83
+ composite = [
84
+ "prebuild",
85
+ "bumpver",
86
+ "pdm publish",
87
+ ]
88
+
89
+ [tool.setuptools.packages.find]
90
+ where = [
91
+ "src",
92
+ ]
93
+
94
+ [tool.setuptools.package-data]
95
+ "*" = [
96
+ "py.typed",
97
+ "*.svg",
98
+ ]
99
+
100
+ [tool.ruff]
101
+ fix = true
102
+ ignore-init-module-imports = true
103
+ select = [
104
+ "ANN",
105
+ "B",
106
+ "C",
107
+ "E",
108
+ "F",
109
+ "I",
110
+ "RUF100",
111
+ "N",
112
+ "UP",
113
+ "W",
114
+ "YTT",
115
+ ]
116
+ extend-exclude = [
117
+ "tests",
118
+ ]
119
+ src = [
120
+ "src",
121
+ "tests",
122
+ ]
123
+ target-version = "py39"
124
+
125
+ [tool.ruff.flake8-tidy-imports]
126
+ ban-relative-imports = "all"
127
+
128
+ [tool.black]
129
+ target-version = [
130
+ "py39",
131
+ ]
132
+
133
+ [tool.coverage.paths]
134
+ source = [
135
+ "src",
136
+ ]
137
+
138
+ [tool.coverage.run]
139
+ branch = true
140
+ source = [
141
+ "src",
142
+ ]
143
+
144
+ [tool.coverage.report]
145
+ skip_covered = true
146
+ show_missing = true
147
+ skip_empty = true
148
+ exclude_also = [
149
+ "raise AssertionError",
150
+ "raise NotImplementedError",
151
+ "if __name__ == .__main__.:",
152
+ "@(abc.)?abstractmethod",
153
+ "@typing.runtime_checkable",
154
+ ]
155
+
156
+ [tool.pytest.ini_options]
157
+ addopts = [
158
+ "--import-mode=importlib",
159
+ "--doctest-modules",
160
+ "--ignore-glob=*scripts*,*examples*",
161
+ "--doctest-glob=*README.md",
162
+ ]
163
+ doctest_optionflags = [
164
+ "NORMALIZE_WHITESPACE",
165
+ "IGNORE_EXCEPTION_DETAIL",
166
+ "ELLIPSIS",
167
+ ]
168
+ testpaths = [
169
+ ".",
170
+ "src",
171
+ "tests",
172
+ ]
173
+
174
+ [tool.mypy]
175
+ check_untyped_defs = false
176
+ disallow_untyped_defs = false
177
+ disallow_incomplete_defs = false
178
+ disallow_untyped_decorators = false
179
+ disallow_any_unimported = false
180
+ warn_return_any = false
181
+ warn_unused_ignores = true
182
+ no_implicit_optional = true
183
+ show_error_codes = true
184
+ ignore_missing_imports = true
185
+
186
+ [build-system]
187
+ requires = [
188
+ "setuptools>=61",
189
+ "wheel",
190
+ ]
191
+ build-backend = "setuptools.build_meta"
@@ -0,0 +1,4 @@
1
+ [egg_info]
2
+ tag_build =
3
+ tag_date = 0
4
+
@@ -0,0 +1,3 @@
1
+ from npc_shields.insertions import *
2
+ from npc_shields.shields import *
3
+ from npc_shields.widgets import *