Auto-Organotypic 0.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.
- auto_organotypic-0.6.0/AGENTS.md +88 -0
- auto_organotypic-0.6.0/LICENSE +21 -0
- auto_organotypic-0.6.0/MANIFEST.in +7 -0
- auto_organotypic-0.6.0/PKG-INFO +1222 -0
- auto_organotypic-0.6.0/README.md +1169 -0
- auto_organotypic-0.6.0/pyproject.toml +153 -0
- auto_organotypic-0.6.0/setup.cfg +4 -0
- auto_organotypic-0.6.0/src/Auto_Organotypic.egg-info/PKG-INFO +1222 -0
- auto_organotypic-0.6.0/src/Auto_Organotypic.egg-info/SOURCES.txt +149 -0
- auto_organotypic-0.6.0/src/Auto_Organotypic.egg-info/dependency_links.txt +1 -0
- auto_organotypic-0.6.0/src/Auto_Organotypic.egg-info/entry_points.txt +5 -0
- auto_organotypic-0.6.0/src/Auto_Organotypic.egg-info/requires.txt +44 -0
- auto_organotypic-0.6.0/src/Auto_Organotypic.egg-info/top_level.txt +1 -0
- auto_organotypic-0.6.0/src/auto_organotypic/__init__.py +214 -0
- auto_organotypic-0.6.0/src/auto_organotypic/__main__.py +3105 -0
- auto_organotypic-0.6.0/src/auto_organotypic/baselines.py +205 -0
- auto_organotypic-0.6.0/src/auto_organotypic/batch.py +674 -0
- auto_organotypic-0.6.0/src/auto_organotypic/broad_crop.py +1727 -0
- auto_organotypic-0.6.0/src/auto_organotypic/cellgrid.py +573 -0
- auto_organotypic-0.6.0/src/auto_organotypic/chain.py +1486 -0
- auto_organotypic-0.6.0/src/auto_organotypic/config.py +315 -0
- auto_organotypic-0.6.0/src/auto_organotypic/corrections.py +392 -0
- auto_organotypic-0.6.0/src/auto_organotypic/cosmic/__init__.py +107 -0
- auto_organotypic-0.6.0/src/auto_organotypic/cosmic/clean.py +565 -0
- auto_organotypic-0.6.0/src/auto_organotypic/cosmic/output.py +118 -0
- auto_organotypic-0.6.0/src/auto_organotypic/cosmic/rule.py +696 -0
- auto_organotypic-0.6.0/src/auto_organotypic/cosmic/stack.py +223 -0
- auto_organotypic-0.6.0/src/auto_organotypic/desktop.py +218 -0
- auto_organotypic-0.6.0/src/auto_organotypic/display.py +990 -0
- auto_organotypic-0.6.0/src/auto_organotypic/fiji.py +592 -0
- auto_organotypic-0.6.0/src/auto_organotypic/filtering.py +162 -0
- auto_organotypic-0.6.0/src/auto_organotypic/follow.py +494 -0
- auto_organotypic-0.6.0/src/auto_organotypic/grid.py +1681 -0
- auto_organotypic-0.6.0/src/auto_organotypic/guards.py +105 -0
- auto_organotypic-0.6.0/src/auto_organotypic/hand_drawn.py +1126 -0
- auto_organotypic-0.6.0/src/auto_organotypic/image.py +373 -0
- auto_organotypic-0.6.0/src/auto_organotypic/instrumental.py +253 -0
- auto_organotypic-0.6.0/src/auto_organotypic/io.py +410 -0
- auto_organotypic-0.6.0/src/auto_organotypic/launcher.py +146 -0
- auto_organotypic-0.6.0/src/auto_organotypic/layout.py +208 -0
- auto_organotypic-0.6.0/src/auto_organotypic/macros/1_rotate_expand_stack.ijm +140 -0
- auto_organotypic-0.6.0/src/auto_organotypic/macros/2_extract_hemislices.ijm +216 -0
- auto_organotypic-0.6.0/src/auto_organotypic/macros/3_define_roi.ijm +190 -0
- auto_organotypic-0.6.0/src/auto_organotypic/macros/4_extract_cellgrid.ijm +255 -0
- auto_organotypic-0.6.0/src/auto_organotypic/metadata.py +719 -0
- auto_organotypic-0.6.0/src/auto_organotypic/orientation.py +634 -0
- auto_organotypic-0.6.0/src/auto_organotypic/outline/__init__.py +62 -0
- auto_organotypic-0.6.0/src/auto_organotypic/outline/carve.py +448 -0
- auto_organotypic-0.6.0/src/auto_organotypic/outline/crop.py +193 -0
- auto_organotypic-0.6.0/src/auto_organotypic/outline/draw.py +541 -0
- auto_organotypic-0.6.0/src/auto_organotypic/outline/metrics.py +95 -0
- auto_organotypic-0.6.0/src/auto_organotypic/outline/midline.py +1102 -0
- auto_organotypic-0.6.0/src/auto_organotypic/outline/planes.py +419 -0
- auto_organotypic-0.6.0/src/auto_organotypic/outline/region.py +235 -0
- auto_organotypic-0.6.0/src/auto_organotypic/outline/report.py +151 -0
- auto_organotypic-0.6.0/src/auto_organotypic/outline/run.py +789 -0
- auto_organotypic-0.6.0/src/auto_organotypic/outline/smoothing.py +1294 -0
- auto_organotypic-0.6.0/src/auto_organotypic/pipeline.py +2631 -0
- auto_organotypic-0.6.0/src/auto_organotypic/qc.py +114 -0
- auto_organotypic-0.6.0/src/auto_organotypic/region_trace.py +895 -0
- auto_organotypic-0.6.0/src/auto_organotypic/registration.py +1229 -0
- auto_organotypic-0.6.0/src/auto_organotypic/render/__init__.py +61 -0
- auto_organotypic-0.6.0/src/auto_organotypic/render/annotate.py +630 -0
- auto_organotypic-0.6.0/src/auto_organotypic/render/channels.py +223 -0
- auto_organotypic-0.6.0/src/auto_organotypic/render/frames.py +299 -0
- auto_organotypic-0.6.0/src/auto_organotypic/render/looks.py +205 -0
- auto_organotypic-0.6.0/src/auto_organotypic/render/luts.py +164 -0
- auto_organotypic-0.6.0/src/auto_organotypic/render/outlines.py +424 -0
- auto_organotypic-0.6.0/src/auto_organotypic/render/plan.py +650 -0
- auto_organotypic-0.6.0/src/auto_organotypic/render/record.py +75 -0
- auto_organotypic-0.6.0/src/auto_organotypic/render/screen.py +619 -0
- auto_organotypic-0.6.0/src/auto_organotypic/render/tiles.py +59 -0
- auto_organotypic-0.6.0/src/auto_organotypic/review.py +2132 -0
- auto_organotypic-0.6.0/src/auto_organotypic/rhythm.py +835 -0
- auto_organotypic-0.6.0/src/auto_organotypic/roi.py +160 -0
- auto_organotypic-0.6.0/src/auto_organotypic/schedule.py +203 -0
- auto_organotypic-0.6.0/src/auto_organotypic/series.py +355 -0
- auto_organotypic-0.6.0/src/auto_organotypic/server.py +564 -0
- auto_organotypic-0.6.0/src/auto_organotypic/sources.py +1019 -0
- auto_organotypic-0.6.0/src/auto_organotypic/split.py +563 -0
- auto_organotypic-0.6.0/src/auto_organotypic/staleness.py +592 -0
- auto_organotypic-0.6.0/src/auto_organotypic/static/app.js +391 -0
- auto_organotypic-0.6.0/src/auto_organotypic/static/index.html +187 -0
- auto_organotypic-0.6.0/src/auto_organotypic/static/styles.css +228 -0
- auto_organotypic-0.6.0/src/auto_organotypic/store/__init__.py +429 -0
- auto_organotypic-0.6.0/src/auto_organotypic/store/budget.py +106 -0
- auto_organotypic-0.6.0/src/auto_organotypic/store/keys.py +432 -0
- auto_organotypic-0.6.0/src/auto_organotypic/store/manifest.py +317 -0
- auto_organotypic-0.6.0/src/auto_organotypic/store/tier_a.py +299 -0
- auto_organotypic-0.6.0/src/auto_organotypic/store/tier_b.py +372 -0
- auto_organotypic-0.6.0/src/auto_organotypic/superseded/__init__.py +23 -0
- auto_organotypic-0.6.0/src/auto_organotypic/superseded/matched_line.py +720 -0
- auto_organotypic-0.6.0/src/auto_organotypic/timebase.py +1262 -0
- auto_organotypic-0.6.0/src/auto_organotypic/tissue.py +375 -0
- auto_organotypic-0.6.0/src/auto_organotypic/trace_plot.py +1317 -0
- auto_organotypic-0.6.0/src/auto_organotypic/trim.py +565 -0
- auto_organotypic-0.6.0/src/auto_organotypic/video/__init__.py +75 -0
- auto_organotypic-0.6.0/src/auto_organotypic/video/encode.py +280 -0
- auto_organotypic-0.6.0/src/auto_organotypic/video/exports.py +639 -0
- auto_organotypic-0.6.0/src/auto_organotypic/video_grid.py +1227 -0
- auto_organotypic-0.6.0/src/auto_organotypic/windows.py +458 -0
- auto_organotypic-0.6.0/tests/conftest.py +63 -0
- auto_organotypic-0.6.0/tests/evidence/parity-evidence.zip +0 -0
- auto_organotypic-0.6.0/tests/test_artefact_looks.py +412 -0
- auto_organotypic-0.6.0/tests/test_automatic_scn_outline_parity.py +643 -0
- auto_organotypic-0.6.0/tests/test_batch_scn_outline.py +637 -0
- auto_organotypic-0.6.0/tests/test_broad_crop.py +869 -0
- auto_organotypic-0.6.0/tests/test_cellgrid.py +257 -0
- auto_organotypic-0.6.0/tests/test_cellgrid_parity.py +285 -0
- auto_organotypic-0.6.0/tests/test_command_line.py +915 -0
- auto_organotypic-0.6.0/tests/test_corrections.py +306 -0
- auto_organotypic-0.6.0/tests/test_cosmic_rule.py +200 -0
- auto_organotypic-0.6.0/tests/test_day_sheet.py +450 -0
- auto_organotypic-0.6.0/tests/test_desktop.py +217 -0
- auto_organotypic-0.6.0/tests/test_display_gamma.py +207 -0
- auto_organotypic-0.6.0/tests/test_drift_free_video.py +201 -0
- auto_organotypic-0.6.0/tests/test_follow.py +751 -0
- auto_organotypic-0.6.0/tests/test_given_geometry.py +673 -0
- auto_organotypic-0.6.0/tests/test_grid_export.py +985 -0
- auto_organotypic-0.6.0/tests/test_hand_drawn.py +510 -0
- auto_organotypic-0.6.0/tests/test_image_export.py +281 -0
- auto_organotypic-0.6.0/tests/test_layout.py +291 -0
- auto_organotypic-0.6.0/tests/test_outline_overlay.py +190 -0
- auto_organotypic-0.6.0/tests/test_package.py +159 -0
- auto_organotypic-0.6.0/tests/test_picture_cli.py +271 -0
- auto_organotypic-0.6.0/tests/test_pipeline.py +1398 -0
- auto_organotypic-0.6.0/tests/test_pipeline_pictures.py +390 -0
- auto_organotypic-0.6.0/tests/test_region_population.py +349 -0
- auto_organotypic-0.6.0/tests/test_region_trace.py +396 -0
- auto_organotypic-0.6.0/tests/test_register_methods.py +355 -0
- auto_organotypic-0.6.0/tests/test_review.py +729 -0
- auto_organotypic-0.6.0/tests/test_rhythm_phase.py +516 -0
- auto_organotypic-0.6.0/tests/test_rhythm_public_api.py +62 -0
- auto_organotypic-0.6.0/tests/test_schedule.py +281 -0
- auto_organotypic-0.6.0/tests/test_self_contained.py +368 -0
- auto_organotypic-0.6.0/tests/test_server.py +485 -0
- auto_organotypic-0.6.0/tests/test_sources.py +778 -0
- auto_organotypic-0.6.0/tests/test_split.py +600 -0
- auto_organotypic-0.6.0/tests/test_staleness.py +391 -0
- auto_organotypic-0.6.0/tests/test_store_index.py +71 -0
- auto_organotypic-0.6.0/tests/test_store_location.py +172 -0
- auto_organotypic-0.6.0/tests/test_timebase.py +485 -0
- auto_organotypic-0.6.0/tests/test_trace_plot.py +466 -0
- auto_organotypic-0.6.0/tests/test_trim.py +451 -0
- auto_organotypic-0.6.0/tests/test_video_cli.py +333 -0
- auto_organotypic-0.6.0/tests/test_video_export.py +526 -0
- auto_organotypic-0.6.0/tests/test_video_filters.py +362 -0
- auto_organotypic-0.6.0/tests/test_video_geometry.py +531 -0
- auto_organotypic-0.6.0/tests/test_video_grid.py +635 -0
- auto_organotypic-0.6.0/tests/test_video_grid_cli.py +120 -0
- auto_organotypic-0.6.0/tests/test_windows.py +346 -0
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
# Working in Auto-Organotypic
|
|
2
|
+
|
|
3
|
+
## The analysis ships inside the package. Always.
|
|
4
|
+
|
|
5
|
+
This package is downloaded by people who do not have this lab's Dropbox, its
|
|
6
|
+
sibling projects, or its tuning folders. Anything the code does has to be *in
|
|
7
|
+
the wheel*.
|
|
8
|
+
|
|
9
|
+
That means, when you are asked to put an analysis into the pipeline:
|
|
10
|
+
|
|
11
|
+
- **Write the code into a module of `src/auto_organotypic/`.** Do not import it from a
|
|
12
|
+
sibling project, do not read it off a path, do not load it from a file at run
|
|
13
|
+
time, and do not leave a comment saying where the real implementation lives.
|
|
14
|
+
- **Declare every third-party import.** If it is reached on a default path, it
|
|
15
|
+
belongs in `[project] dependencies` — not in an extra. An extra is for a
|
|
16
|
+
capability a plain install does not need at all.
|
|
17
|
+
- **Put constants, thresholds and accepted settings in the source**, not in a
|
|
18
|
+
JSON or CSV beside it. If data genuinely has to be a file, it goes inside the
|
|
19
|
+
package *and* into `[tool.setuptools.package-data]`, or it will be missing
|
|
20
|
+
from the wheel while working perfectly in your checkout.
|
|
21
|
+
- A provenance comment naming where code came from is good. A provenance
|
|
22
|
+
comment standing *in place of* the code is the thing this rule exists for.
|
|
23
|
+
|
|
24
|
+
`tests/test_self_contained.py` enforces all of the above, including by running
|
|
25
|
+
the accepted outline in a subprocess with every undeclared module blocked. It
|
|
26
|
+
was written after two real cases: an `import red_io` reaching for the tuning
|
|
27
|
+
project, and scikit-image declared under an extra while the accepted outline
|
|
28
|
+
needed it to draw a single slice. Both worked on the machine they were written
|
|
29
|
+
on and on no other.
|
|
30
|
+
|
|
31
|
+
## The outline is frozen
|
|
32
|
+
|
|
33
|
+
`src/auto_organotypic/outline/` is accepted Round 6 attempt 7 of the Cry1-DIO-dLuc
|
|
34
|
+
red-channel tuning project. Its numbers are not yours to tidy.
|
|
35
|
+
|
|
36
|
+
Before and after **any** change under `outline/` or to `orientation.py`, run:
|
|
37
|
+
|
|
38
|
+
python -m pytest tests/test_automatic_scn_outline_parity.py
|
|
39
|
+
|
|
40
|
+
Sixty tests, about three minutes, comparing generated labels against the frozen
|
|
41
|
+
hand-checked evidence byte for byte. It needs that evidence: it is found at a
|
|
42
|
+
sibling path automatically, or set `AUTO_ORGANOTYPIC_TUNING_ROOT`. **If it skips,
|
|
43
|
+
you have no safety net — say so rather than proceeding quietly.**
|
|
44
|
+
|
|
45
|
+
If you change a module under `outline/`, its recorded SHA256 in
|
|
46
|
+
`outline/report.py` must be updated in the same commit, or `test_package.py`
|
|
47
|
+
fails. That is deliberate: every report carries those hashes as the provenance
|
|
48
|
+
of the mask it wrote.
|
|
49
|
+
|
|
50
|
+
## Naming
|
|
51
|
+
|
|
52
|
+
Modules are named for what they do, not for the project the code came from, and
|
|
53
|
+
not with an `scn_` prefix — the package is already about the SCN. If a file does
|
|
54
|
+
two jobs, it is two modules. This is why `_accepted_scn/scn_roi.py` and
|
|
55
|
+
`_accepted_scn/red_measure.py` no longer exist.
|
|
56
|
+
|
|
57
|
+
## Filenames written to disk are frozen even when code names change
|
|
58
|
+
|
|
59
|
+
`batch_scn_outline_manifest.json` and `_automatic_scn_outline_report.json` keep
|
|
60
|
+
their names through renames. Results already sitting in Dropbox are found by
|
|
61
|
+
those names, and a resume is keyed on them.
|
|
62
|
+
|
|
63
|
+
## A folder name distinguishes things that exist at the same time
|
|
64
|
+
|
|
65
|
+
A stage key distinguishes things that replace each other. So a **trim** does not
|
|
66
|
+
change any folder name — the window is a setting, like the channel, and the
|
|
67
|
+
untrimmed result is the thing it replaces — and a **split** does, because both
|
|
68
|
+
segments exist at once and would otherwise write to one folder. Segment folders
|
|
69
|
+
are siblings, `outline/A1_baseline/`, never nested under the parent: split and
|
|
70
|
+
unsplit recordings must sit at the same depth or every `traces/*/` glob breaks.
|
|
71
|
+
|
|
72
|
+
The one exception to the rule above, and only because it is not a rename: a
|
|
73
|
+
segment is a *new* file, and it is named for its folder —
|
|
74
|
+
`segments/A1_baseline/A1_baseline.tif`, not the parent's stem with a suffix
|
|
75
|
+
appended. Measured against a real output, the parent's stem is around 149
|
|
76
|
+
characters and the path it leads to is already 17 characters past the 260
|
|
77
|
+
Windows allows; appending reaches 33 over and naming the file for its folder
|
|
78
|
+
comes in 65 under. This package survives being over the limit through
|
|
79
|
+
`io.extended`; Fiji, Explorer, Excel and the sync client do not.
|
|
80
|
+
|
|
81
|
+
## graphify
|
|
82
|
+
|
|
83
|
+
This project has a graphify knowledge graph at graphify-out/.
|
|
84
|
+
|
|
85
|
+
Rules:
|
|
86
|
+
- Before answering architecture or codebase questions, read graphify-out/GRAPH_REPORT.md for god nodes and community structure
|
|
87
|
+
- If graphify-out/wiki/index.md exists, navigate it instead of reading raw files
|
|
88
|
+
- After modifying code files in this session, run `python3 -c "from graphify.watch import _rebuild_code; from pathlib import Path; _rebuild_code(Path('.'))"` to keep the graph current
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Jamie Malcolm, Brancaccio Lab, UK Dementia Research Institute
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|