catan-toolbox 0.1.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.
- catan_toolbox-0.1.0/.github/workflows/release.yml +86 -0
- catan_toolbox-0.1.0/.github/workflows/tests.yml +347 -0
- catan_toolbox-0.1.0/.gitignore +45 -0
- catan_toolbox-0.1.0/.pre-commit-config.yaml +5 -0
- catan_toolbox-0.1.0/LICENSE +21 -0
- catan_toolbox-0.1.0/PKG-INFO +148 -0
- catan_toolbox-0.1.0/README.md +102 -0
- catan_toolbox-0.1.0/demos/alignment.ipynb +20 -0
- catan_toolbox-0.1.0/demos/neuron_registration.ipynb +1511 -0
- catan_toolbox-0.1.0/demos/statistics.ipynb +20 -0
- catan_toolbox-0.1.0/pyproject.toml +114 -0
- catan_toolbox-0.1.0/setup.cfg +4 -0
- catan_toolbox-0.1.0/src/catan/__init__.py +18 -0
- catan_toolbox-0.1.0/src/catan/__main__.py +3 -0
- catan_toolbox-0.1.0/src/catan/_version.py +24 -0
- catan_toolbox-0.1.0/src/catan/cli/__init__.py +3 -0
- catan_toolbox-0.1.0/src/catan/cli/__main__.py +4 -0
- catan_toolbox-0.1.0/src/catan/cli/main.py +50 -0
- catan_toolbox-0.1.0/src/catan/cli/match.py +246 -0
- catan_toolbox-0.1.0/src/catan/cli/pipeline.py +360 -0
- catan_toolbox-0.1.0/src/catan/core/__init__.py +1 -0
- catan_toolbox-0.1.0/src/catan/core/alignment.py +233 -0
- catan_toolbox-0.1.0/src/catan/core/analysis.py +248 -0
- catan_toolbox-0.1.0/src/catan/core/data.py +263 -0
- catan_toolbox-0.1.0/src/catan/core/image_correlation.py +231 -0
- catan_toolbox-0.1.0/src/catan/core/io.py +386 -0
- catan_toolbox-0.1.0/src/catan/core/plot_utils.py +12 -0
- catan_toolbox-0.1.0/src/catan/core/structures/__init__.py +2 -0
- catan_toolbox-0.1.0/src/catan/core/structures/remap.py +369 -0
- catan_toolbox-0.1.0/src/catan/core/structures/session.py +704 -0
- catan_toolbox-0.1.0/src/catan/core/utils.py +105 -0
- catan_toolbox-0.1.0/src/catan/gui/GUI_elements/__init__.py +9 -0
- catan_toolbox-0.1.0/src/catan/gui/GUI_elements/dialog_load_field.py +146 -0
- catan_toolbox-0.1.0/src/catan/gui/GUI_elements/display_area.py +245 -0
- catan_toolbox-0.1.0/src/catan/gui/GUI_elements/display_section.py +378 -0
- catan_toolbox-0.1.0/src/catan/gui/GUI_elements/fragments/IconButton.py +60 -0
- catan_toolbox-0.1.0/src/catan/gui/GUI_elements/fragments/RotatedToolButton.py +48 -0
- catan_toolbox-0.1.0/src/catan/gui/GUI_elements/main_app.py +38 -0
- catan_toolbox-0.1.0/src/catan/gui/GUI_elements/main_menu.py +703 -0
- catan_toolbox-0.1.0/src/catan/gui/GUI_elements/main_window.py +150 -0
- catan_toolbox-0.1.0/src/catan/gui/GUI_elements/resource_monitor.py +121 -0
- catan_toolbox-0.1.0/src/catan/gui/GUI_elements/session_overview.py +530 -0
- catan_toolbox-0.1.0/src/catan/gui/GUI_elements/utils/menu_creation.py +45 -0
- catan_toolbox-0.1.0/src/catan/gui/__init__.py +2 -0
- catan_toolbox-0.1.0/src/catan/gui/app.py +47 -0
- catan_toolbox-0.1.0/src/catan/gui/background_tasks/TaskManager.py +70 -0
- catan_toolbox-0.1.0/src/catan/gui/background_tasks/Worker.py +67 -0
- catan_toolbox-0.1.0/src/catan/gui/background_tasks/__init__.py +2 -0
- catan_toolbox-0.1.0/src/catan/gui/data/__init__.py +0 -0
- catan_toolbox-0.1.0/src/catan/gui/data/analysis.py +340 -0
- catan_toolbox-0.1.0/src/catan/gui/data/loading.py +123 -0
- catan_toolbox-0.1.0/src/catan/gui/data/statistics/__init__.py +13 -0
- catan_toolbox-0.1.0/src/catan/gui/data/statistics/dimensions.py +64 -0
- catan_toolbox-0.1.0/src/catan/gui/data/statistics/plotdata_histogram.py +152 -0
- catan_toolbox-0.1.0/src/catan/gui/data/statistics/plotdata_scatter.py +171 -0
- catan_toolbox-0.1.0/src/catan/gui/data/statistics/plotdata_series.py +438 -0
- catan_toolbox-0.1.0/src/catan/gui/data/statistics/prepared_data.py +606 -0
- catan_toolbox-0.1.0/src/catan/gui/data/statistics/queries.py +179 -0
- catan_toolbox-0.1.0/src/catan/gui/data/statistics/statistics.py +630 -0
- catan_toolbox-0.1.0/src/catan/gui/data/utils.py +8 -0
- catan_toolbox-0.1.0/src/catan/gui/interaction/__init__.py +2 -0
- catan_toolbox-0.1.0/src/catan/gui/interaction/busy_screen.py +42 -0
- catan_toolbox-0.1.0/src/catan/gui/interaction/click_events.py +90 -0
- catan_toolbox-0.1.0/src/catan/gui/plots/BasePlot.py +308 -0
- catan_toolbox-0.1.0/src/catan/gui/plots/Footprints.py +1101 -0
- catan_toolbox-0.1.0/src/catan/gui/plots/Overview.py +471 -0
- catan_toolbox-0.1.0/src/catan/gui/plots/Raster.py +5 -0
- catan_toolbox-0.1.0/src/catan/gui/plots/SelectionDisplay.py +93 -0
- catan_toolbox-0.1.0/src/catan/gui/plots/Statistics.py +1400 -0
- catan_toolbox-0.1.0/src/catan/gui/plots/StatisticsData.py +868 -0
- catan_toolbox-0.1.0/src/catan/gui/plots/Traces.py +452 -0
- catan_toolbox-0.1.0/src/catan/gui/plots/__init__.py +0 -0
- catan_toolbox-0.1.0/src/catan/gui/plots/colors.py +28 -0
- catan_toolbox-0.1.0/src/catan/gui/plots/helper/FootprintSlider.py +159 -0
- catan_toolbox-0.1.0/src/catan/gui/plots/helper/HistogramMesh.py +205 -0
- catan_toolbox-0.1.0/src/catan/gui/plots/helper/Threshold.py +416 -0
- catan_toolbox-0.1.0/src/catan/gui/plots/helper/cameras.py +90 -0
- catan_toolbox-0.1.0/src/catan/gui/plots/helper/series_with_confidence.py +153 -0
- catan_toolbox-0.1.0/src/catan/gui/plots/styles.py +210 -0
- catan_toolbox-0.1.0/src/catan/gui/resources/__init__.py +25 -0
- catan_toolbox-0.1.0/src/catan/gui/resources/loader.py +141 -0
- catan_toolbox-0.1.0/src/catan/gui/resources/qt.py +27 -0
- catan_toolbox-0.1.0/src/catan/gui/resources/styles/main.qss +57 -0
- catan_toolbox-0.1.0/src/catan/gui/structures/__init__.py +2 -0
- catan_toolbox-0.1.0/src/catan/gui/structures/data.py +196 -0
- catan_toolbox-0.1.0/src/catan/gui/structures/state.py +313 -0
- catan_toolbox-0.1.0/src/catan/gui/utils/__init__.py +4 -0
- catan_toolbox-0.1.0/src/catan/gui/utils/utils_analysis.py +72 -0
- catan_toolbox-0.1.0/src/catan/tracking/__init__.py +5 -0
- catan_toolbox-0.1.0/src/catan/tracking/analytics/correlation_model.py +81 -0
- catan_toolbox-0.1.0/src/catan/tracking/analytics/distance_model.py +228 -0
- catan_toolbox-0.1.0/src/catan/tracking/analytics/fit_model_theoretical.py +670 -0
- catan_toolbox-0.1.0/src/catan/tracking/analytics/pairwise_distance.py +332 -0
- catan_toolbox-0.1.0/src/catan/tracking/analytics/pairwise_distance_blurred.py +294 -0
- catan_toolbox-0.1.0/src/catan/tracking/neuron_tracking.py +1599 -0
- catan_toolbox-0.1.0/src/catan/tracking/neuron_tracking_analysis.py +2208 -0
- catan_toolbox-0.1.0/src/catan/tracking/plots/display_footprints.py +136 -0
- catan_toolbox-0.1.0/src/catan/tracking/utils_new/__init__.py +26 -0
- catan_toolbox-0.1.0/src/catan/tracking/utils_new/footprint_correlation.py +184 -0
- catan_toolbox-0.1.0/src/catan/tracking/utils_new/plots.py +12 -0
- catan_toolbox-0.1.0/src/catan_toolbox.egg-info/PKG-INFO +148 -0
- catan_toolbox-0.1.0/src/catan_toolbox.egg-info/SOURCES.txt +113 -0
- catan_toolbox-0.1.0/src/catan_toolbox.egg-info/dependency_links.txt +1 -0
- catan_toolbox-0.1.0/src/catan_toolbox.egg-info/entry_points.txt +5 -0
- catan_toolbox-0.1.0/src/catan_toolbox.egg-info/requires.txt +24 -0
- catan_toolbox-0.1.0/src/catan_toolbox.egg-info/scm_file_list.json +108 -0
- catan_toolbox-0.1.0/src/catan_toolbox.egg-info/scm_version.json +8 -0
- catan_toolbox-0.1.0/src/catan_toolbox.egg-info/top_level.txt +1 -0
- catan_toolbox-0.1.0/tests/cli/test_cli.py +92 -0
- catan_toolbox-0.1.0/tests/test_core_smoke.py +20 -0
- catan_toolbox-0.1.0/tests/test_entrypoints.py +19 -0
- catan_toolbox-0.1.0/tests/test_gui_smoke.py +54 -0
- catan_toolbox-0.1.0/tests/test_imports.py +28 -0
- catan_toolbox-0.1.0/tests/test_resources.py +15 -0
- catan_toolbox-0.1.0/tests/test_version.py +7 -0
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
name: Release
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
tags:
|
|
6
|
+
- "v*"
|
|
7
|
+
|
|
8
|
+
jobs:
|
|
9
|
+
build:
|
|
10
|
+
name: Build distributions
|
|
11
|
+
runs-on: ubuntu-latest
|
|
12
|
+
|
|
13
|
+
permissions:
|
|
14
|
+
contents: read
|
|
15
|
+
|
|
16
|
+
steps:
|
|
17
|
+
- name: Check out repository
|
|
18
|
+
uses: actions/checkout@v4
|
|
19
|
+
with:
|
|
20
|
+
fetch-depth: 0
|
|
21
|
+
|
|
22
|
+
- name: Set up Python
|
|
23
|
+
uses: actions/setup-python@v6
|
|
24
|
+
with:
|
|
25
|
+
python-version: "3.12"
|
|
26
|
+
|
|
27
|
+
- name: Install build tools
|
|
28
|
+
run: |
|
|
29
|
+
python -m pip install --upgrade pip
|
|
30
|
+
python -m pip install build twine
|
|
31
|
+
|
|
32
|
+
- name: Build distributions
|
|
33
|
+
run: python -m build
|
|
34
|
+
|
|
35
|
+
- name: Check distributions
|
|
36
|
+
run: python -m twine check --strict dist/*
|
|
37
|
+
|
|
38
|
+
- name: Store distributions
|
|
39
|
+
uses: actions/upload-artifact@v4
|
|
40
|
+
with:
|
|
41
|
+
name: python-package-distributions
|
|
42
|
+
path: dist/
|
|
43
|
+
if-no-files-found: error
|
|
44
|
+
|
|
45
|
+
|
|
46
|
+
github-release:
|
|
47
|
+
name: Create GitHub Release
|
|
48
|
+
needs: build
|
|
49
|
+
runs-on: ubuntu-latest
|
|
50
|
+
|
|
51
|
+
permissions:
|
|
52
|
+
contents: write
|
|
53
|
+
|
|
54
|
+
steps:
|
|
55
|
+
- name: Download distributions
|
|
56
|
+
uses: actions/download-artifact@v4
|
|
57
|
+
with:
|
|
58
|
+
name: python-package-distributions
|
|
59
|
+
path: dist/
|
|
60
|
+
|
|
61
|
+
- name: Create GitHub Release
|
|
62
|
+
uses: softprops/action-gh-release@v2
|
|
63
|
+
with:
|
|
64
|
+
files: dist/*
|
|
65
|
+
generate_release_notes: true
|
|
66
|
+
|
|
67
|
+
pypi-publish:
|
|
68
|
+
name: Publish to PyPI
|
|
69
|
+
needs:
|
|
70
|
+
- build
|
|
71
|
+
- github-release
|
|
72
|
+
|
|
73
|
+
runs-on: ubuntu-latest
|
|
74
|
+
|
|
75
|
+
permissions:
|
|
76
|
+
id-token: write
|
|
77
|
+
|
|
78
|
+
steps:
|
|
79
|
+
- name: Download distributions
|
|
80
|
+
uses: actions/download-artifact@v4
|
|
81
|
+
with:
|
|
82
|
+
name: python-package-distributions
|
|
83
|
+
path: dist/
|
|
84
|
+
|
|
85
|
+
- name: Publish distributions to PyPI
|
|
86
|
+
uses: pypa/gh-action-pypi-publish@release/v1
|
|
@@ -0,0 +1,347 @@
|
|
|
1
|
+
name: Tests
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches: [main]
|
|
6
|
+
pull_request:
|
|
7
|
+
|
|
8
|
+
permissions:
|
|
9
|
+
contents: read
|
|
10
|
+
|
|
11
|
+
jobs:
|
|
12
|
+
|
|
13
|
+
core:
|
|
14
|
+
name: Core (${{ matrix.os }}, py${{ matrix.python }})
|
|
15
|
+
runs-on: ${{ matrix.os }}
|
|
16
|
+
|
|
17
|
+
strategy:
|
|
18
|
+
fail-fast: false
|
|
19
|
+
matrix:
|
|
20
|
+
os:
|
|
21
|
+
- ubuntu-latest
|
|
22
|
+
- windows-latest
|
|
23
|
+
- macos-latest
|
|
24
|
+
python:
|
|
25
|
+
- "3.11"
|
|
26
|
+
- "3.12"
|
|
27
|
+
- "3.13"
|
|
28
|
+
|
|
29
|
+
steps:
|
|
30
|
+
- name: Check out repository
|
|
31
|
+
uses: actions/checkout@v4
|
|
32
|
+
with:
|
|
33
|
+
fetch-depth: 0
|
|
34
|
+
|
|
35
|
+
- name: Set up Python
|
|
36
|
+
uses: actions/setup-python@v6
|
|
37
|
+
with:
|
|
38
|
+
python-version: ${{ matrix.python }}
|
|
39
|
+
cache: pip
|
|
40
|
+
|
|
41
|
+
- name: Install CATAN
|
|
42
|
+
run: |
|
|
43
|
+
python -m pip install --upgrade pip
|
|
44
|
+
python -m pip install -e ".[dev]"
|
|
45
|
+
|
|
46
|
+
- name: Run headless tests
|
|
47
|
+
run: python -m pytest -m "not gui"
|
|
48
|
+
|
|
49
|
+
|
|
50
|
+
gui:
|
|
51
|
+
name: GUI (${{ matrix.os }}, py${{ matrix.python }})
|
|
52
|
+
runs-on: ${{ matrix.os }}
|
|
53
|
+
|
|
54
|
+
strategy:
|
|
55
|
+
fail-fast: false
|
|
56
|
+
matrix:
|
|
57
|
+
os:
|
|
58
|
+
- ubuntu-latest
|
|
59
|
+
- windows-latest
|
|
60
|
+
- macos-latest
|
|
61
|
+
python:
|
|
62
|
+
- "3.12"
|
|
63
|
+
|
|
64
|
+
steps:
|
|
65
|
+
|
|
66
|
+
- name: Check out repository
|
|
67
|
+
uses: actions/checkout@v4
|
|
68
|
+
with:
|
|
69
|
+
fetch-depth: 0
|
|
70
|
+
|
|
71
|
+
- name: Set up Python
|
|
72
|
+
uses: actions/setup-python@v6
|
|
73
|
+
with:
|
|
74
|
+
python-version: ${{ matrix.python }}
|
|
75
|
+
cache: pip
|
|
76
|
+
|
|
77
|
+
# Linux only
|
|
78
|
+
- if: runner.os == 'Linux'
|
|
79
|
+
name: Install Linux GUI dependencies
|
|
80
|
+
run: |
|
|
81
|
+
sudo apt-get update
|
|
82
|
+
sudo apt-get install -y \
|
|
83
|
+
xvfb \
|
|
84
|
+
libegl1 \
|
|
85
|
+
libgl1 \
|
|
86
|
+
libopengl0 \
|
|
87
|
+
libx11-xcb1 \
|
|
88
|
+
libxkbcommon-x11-0 \
|
|
89
|
+
libxcb-cursor0 \
|
|
90
|
+
libxcb-icccm4 \
|
|
91
|
+
libxcb-image0 \
|
|
92
|
+
libxcb-keysyms1 \
|
|
93
|
+
libxcb-randr0 \
|
|
94
|
+
libxcb-render-util0 \
|
|
95
|
+
libxcb-shape0 \
|
|
96
|
+
libxcb-shm0 \
|
|
97
|
+
libxcb-sync1 \
|
|
98
|
+
libxcb-xfixes0 \
|
|
99
|
+
libxcb-xinerama0 \
|
|
100
|
+
libxcb-xinput0
|
|
101
|
+
|
|
102
|
+
- name: Install CATAN
|
|
103
|
+
run: |
|
|
104
|
+
python -m pip install --upgrade pip
|
|
105
|
+
python -m pip install -e ".[gui,dev]"
|
|
106
|
+
|
|
107
|
+
- name: Run GUI tests
|
|
108
|
+
env:
|
|
109
|
+
QT_QPA_PLATFORM: minimal
|
|
110
|
+
run: pytest -m gui -vv -s
|
|
111
|
+
timeout-minutes: 5
|
|
112
|
+
|
|
113
|
+
|
|
114
|
+
build:
|
|
115
|
+
name: Build and test distributions
|
|
116
|
+
runs-on: ubuntu-latest
|
|
117
|
+
|
|
118
|
+
needs:
|
|
119
|
+
- core
|
|
120
|
+
|
|
121
|
+
steps:
|
|
122
|
+
- name: Check out repository
|
|
123
|
+
uses: actions/checkout@v4
|
|
124
|
+
with:
|
|
125
|
+
fetch-depth: 0
|
|
126
|
+
|
|
127
|
+
- name: Set up Python
|
|
128
|
+
uses: actions/setup-python@v6
|
|
129
|
+
with:
|
|
130
|
+
python-version: "3.12"
|
|
131
|
+
cache: pip
|
|
132
|
+
|
|
133
|
+
- name: Install build tools
|
|
134
|
+
run: |
|
|
135
|
+
python -m pip install --upgrade pip
|
|
136
|
+
python -m pip install build twine
|
|
137
|
+
|
|
138
|
+
- name: Build distributions
|
|
139
|
+
run: python -m build
|
|
140
|
+
|
|
141
|
+
- name: Check distribution metadata
|
|
142
|
+
run: python -m twine check dist/*
|
|
143
|
+
|
|
144
|
+
build-wheel:
|
|
145
|
+
name: Wheel (${{ matrix.os }})
|
|
146
|
+
runs-on: ${{ matrix.os }}
|
|
147
|
+
|
|
148
|
+
strategy:
|
|
149
|
+
fail-fast: false
|
|
150
|
+
matrix:
|
|
151
|
+
os:
|
|
152
|
+
- ubuntu-latest
|
|
153
|
+
- windows-latest
|
|
154
|
+
- macos-latest
|
|
155
|
+
|
|
156
|
+
steps:
|
|
157
|
+
- name: Check out repository
|
|
158
|
+
uses: actions/checkout@v4
|
|
159
|
+
with:
|
|
160
|
+
fetch-depth: 0
|
|
161
|
+
|
|
162
|
+
- name: Set up Python
|
|
163
|
+
uses: actions/setup-python@v6
|
|
164
|
+
with:
|
|
165
|
+
python-version: "3.12"
|
|
166
|
+
cache: pip
|
|
167
|
+
|
|
168
|
+
- name: Install build tools
|
|
169
|
+
run: |
|
|
170
|
+
python -m pip install --upgrade pip
|
|
171
|
+
python -m pip install build twine
|
|
172
|
+
|
|
173
|
+
- name: Build source distribution and wheel
|
|
174
|
+
run: python -m build
|
|
175
|
+
|
|
176
|
+
- name: Check distribution metadata
|
|
177
|
+
run: python -m twine check --strict dist/*
|
|
178
|
+
|
|
179
|
+
- name: Create clean test environment
|
|
180
|
+
run: python -m venv wheel-test-env
|
|
181
|
+
|
|
182
|
+
- name: Install wheel in clean environment
|
|
183
|
+
run: |
|
|
184
|
+
python -c "
|
|
185
|
+
import os
|
|
186
|
+
import subprocess
|
|
187
|
+
from pathlib import Path
|
|
188
|
+
|
|
189
|
+
venv_python = (
|
|
190
|
+
Path('wheel-test-env/Scripts/python.exe')
|
|
191
|
+
if os.name == 'nt'
|
|
192
|
+
else Path('wheel-test-env/bin/python')
|
|
193
|
+
)
|
|
194
|
+
|
|
195
|
+
wheels = list(Path('dist').glob('*.whl'))
|
|
196
|
+
|
|
197
|
+
if len(wheels) != 1:
|
|
198
|
+
raise RuntimeError(
|
|
199
|
+
f'Expected exactly one wheel, found {len(wheels)}: {wheels}'
|
|
200
|
+
)
|
|
201
|
+
|
|
202
|
+
subprocess.check_call([
|
|
203
|
+
str(venv_python),
|
|
204
|
+
'-m',
|
|
205
|
+
'pip',
|
|
206
|
+
'install',
|
|
207
|
+
'--upgrade',
|
|
208
|
+
'pip',
|
|
209
|
+
])
|
|
210
|
+
|
|
211
|
+
subprocess.check_call([
|
|
212
|
+
str(venv_python),
|
|
213
|
+
'-m',
|
|
214
|
+
'pip',
|
|
215
|
+
'install',
|
|
216
|
+
str(wheels[0]),
|
|
217
|
+
])
|
|
218
|
+
"
|
|
219
|
+
|
|
220
|
+
- name: Verify installed package on Linux and macOS
|
|
221
|
+
if: runner.os != 'Windows'
|
|
222
|
+
shell: bash
|
|
223
|
+
run: |
|
|
224
|
+
wheel-test-env/bin/python -c "
|
|
225
|
+
import catan
|
|
226
|
+
|
|
227
|
+
assert hasattr(catan, '__version__')
|
|
228
|
+
assert catan.__version__
|
|
229
|
+
|
|
230
|
+
print(f'Installed CATAN version: {catan.__version__}')
|
|
231
|
+
"
|
|
232
|
+
|
|
233
|
+
- name: Verify installed package on Windows
|
|
234
|
+
if: runner.os == 'Windows'
|
|
235
|
+
shell: pwsh
|
|
236
|
+
run: |
|
|
237
|
+
& .\wheel-test-env\Scripts\python.exe -c @"
|
|
238
|
+
import catan
|
|
239
|
+
|
|
240
|
+
assert hasattr(catan, '__version__')
|
|
241
|
+
assert catan.__version__
|
|
242
|
+
|
|
243
|
+
print(f'Installed CATAN version: {catan.__version__}')
|
|
244
|
+
"@
|
|
245
|
+
|
|
246
|
+
- name: Verify entry-point metadata on Linux and macOS
|
|
247
|
+
if: runner.os != 'Windows'
|
|
248
|
+
shell: bash
|
|
249
|
+
run: |
|
|
250
|
+
wheel-test-env/bin/python -c "
|
|
251
|
+
from importlib.metadata import entry_points
|
|
252
|
+
|
|
253
|
+
cli_matches = list(
|
|
254
|
+
entry_points(
|
|
255
|
+
group='console_scripts',
|
|
256
|
+
name='catan',
|
|
257
|
+
)
|
|
258
|
+
)
|
|
259
|
+
|
|
260
|
+
gui_matches = list(
|
|
261
|
+
entry_points(
|
|
262
|
+
group='gui_scripts',
|
|
263
|
+
name='catan-gui',
|
|
264
|
+
)
|
|
265
|
+
)
|
|
266
|
+
|
|
267
|
+
assert len(cli_matches) == 1, cli_matches
|
|
268
|
+
assert len(gui_matches) == 1, gui_matches
|
|
269
|
+
|
|
270
|
+
cli = cli_matches[0]
|
|
271
|
+
gui = gui_matches[0]
|
|
272
|
+
|
|
273
|
+
assert cli.value == 'catan.cli:main'
|
|
274
|
+
assert gui.value == 'catan.gui.app:main'
|
|
275
|
+
|
|
276
|
+
print(f'CLI entry point: {cli.name} -> {cli.value}')
|
|
277
|
+
print(f'GUI entry point: {gui.name} -> {gui.value}')
|
|
278
|
+
"
|
|
279
|
+
|
|
280
|
+
- name: Verify entry-point metadata on Windows
|
|
281
|
+
if: runner.os == 'Windows'
|
|
282
|
+
shell: pwsh
|
|
283
|
+
run: |
|
|
284
|
+
& .\wheel-test-env\Scripts\python.exe -c @"
|
|
285
|
+
from importlib.metadata import entry_points
|
|
286
|
+
|
|
287
|
+
cli_matches = list(
|
|
288
|
+
entry_points(
|
|
289
|
+
group='console_scripts',
|
|
290
|
+
name='catan',
|
|
291
|
+
)
|
|
292
|
+
)
|
|
293
|
+
|
|
294
|
+
gui_matches = list(
|
|
295
|
+
entry_points(
|
|
296
|
+
group='gui_scripts',
|
|
297
|
+
name='catan-gui',
|
|
298
|
+
)
|
|
299
|
+
)
|
|
300
|
+
|
|
301
|
+
assert len(cli_matches) == 1, cli_matches
|
|
302
|
+
assert len(gui_matches) == 1, gui_matches
|
|
303
|
+
|
|
304
|
+
cli = cli_matches[0]
|
|
305
|
+
gui = gui_matches[0]
|
|
306
|
+
|
|
307
|
+
assert cli.value == 'catan.cli:main'
|
|
308
|
+
assert gui.value == 'catan.gui.app:main'
|
|
309
|
+
|
|
310
|
+
print(f'CLI entry point: {cli.name} -> {cli.value}')
|
|
311
|
+
print(f'GUI entry point: {gui.name} -> {gui.value}')
|
|
312
|
+
"@
|
|
313
|
+
|
|
314
|
+
- name: Verify CLI commands on Linux and macOS
|
|
315
|
+
if: runner.os != 'Windows'
|
|
316
|
+
shell: bash
|
|
317
|
+
run: |
|
|
318
|
+
wheel-test-env/bin/catan --help
|
|
319
|
+
wheel-test-env/bin/catan --version
|
|
320
|
+
wheel-test-env/bin/catan match --help
|
|
321
|
+
|
|
322
|
+
- name: Verify CLI commands on Windows
|
|
323
|
+
if: runner.os == 'Windows'
|
|
324
|
+
shell: pwsh
|
|
325
|
+
run: |
|
|
326
|
+
& .\wheel-test-env\Scripts\catan.exe --help
|
|
327
|
+
& .\wheel-test-env\Scripts\catan.exe --version
|
|
328
|
+
& .\wheel-test-env\Scripts\catan.exe match --help
|
|
329
|
+
|
|
330
|
+
- name: Verify GUI launcher exists on Linux and macOS
|
|
331
|
+
if: runner.os != 'Windows'
|
|
332
|
+
shell: bash
|
|
333
|
+
run: |
|
|
334
|
+
test -x wheel-test-env/bin/catan-gui
|
|
335
|
+
echo "GUI launcher exists: wheel-test-env/bin/catan-gui"
|
|
336
|
+
|
|
337
|
+
- name: Verify GUI launcher exists on Windows
|
|
338
|
+
if: runner.os == 'Windows'
|
|
339
|
+
shell: pwsh
|
|
340
|
+
run: |
|
|
341
|
+
$launcher = ".\wheel-test-env\Scripts\catan-gui.exe"
|
|
342
|
+
|
|
343
|
+
if (-not (Test-Path $launcher)) {
|
|
344
|
+
throw "GUI launcher was not created: $launcher"
|
|
345
|
+
}
|
|
346
|
+
|
|
347
|
+
Write-Output "GUI launcher exists: $launcher"
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
# Python
|
|
2
|
+
__pycache__/
|
|
3
|
+
*.py[cod]
|
|
4
|
+
*.so
|
|
5
|
+
|
|
6
|
+
# Virtual environments
|
|
7
|
+
.venv/
|
|
8
|
+
venv/
|
|
9
|
+
env/
|
|
10
|
+
|
|
11
|
+
# Conda
|
|
12
|
+
.conda/
|
|
13
|
+
conda-meta/
|
|
14
|
+
|
|
15
|
+
# IDE
|
|
16
|
+
.vscode/
|
|
17
|
+
.idea/
|
|
18
|
+
|
|
19
|
+
# Qt
|
|
20
|
+
*.qrc.depends
|
|
21
|
+
|
|
22
|
+
# Testing
|
|
23
|
+
.pytest_cache/
|
|
24
|
+
.coverage
|
|
25
|
+
htmlcov/
|
|
26
|
+
|
|
27
|
+
# Build
|
|
28
|
+
build/
|
|
29
|
+
dist/
|
|
30
|
+
*.egg-info/
|
|
31
|
+
src/catan/_version.py
|
|
32
|
+
|
|
33
|
+
# Jupyter
|
|
34
|
+
.ipynb_checkpoints/
|
|
35
|
+
|
|
36
|
+
# macOS/Linux
|
|
37
|
+
.DS_Store
|
|
38
|
+
Thumbs.db
|
|
39
|
+
|
|
40
|
+
# Project-specific
|
|
41
|
+
# data/
|
|
42
|
+
results/
|
|
43
|
+
tmp/
|
|
44
|
+
|
|
45
|
+
notebooks/
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 woxxel
|
|
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.
|
|
@@ -0,0 +1,148 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: catan-toolbox
|
|
3
|
+
Version: 0.1.0
|
|
4
|
+
Summary: Interactive and algorithmic tools for matching and curating neurons across calcium imaging sessions
|
|
5
|
+
Author: Alexander Schmidt
|
|
6
|
+
License-Expression: MIT
|
|
7
|
+
Project-URL: Homepage, https://github.com/woxxel/CATAN_toolbox
|
|
8
|
+
Project-URL: Documentation, https://github.com/woxxel/CATAN_toolbox/wiki
|
|
9
|
+
Project-URL: Issues, https://github.com/woxxel/CATAN_toolbox/issues
|
|
10
|
+
Keywords: calcium imaging,two-photon microscopy,CaImAn,neuroscience,ROI tracking,cell tracking,longitudinal imaging,microscopy
|
|
11
|
+
Classifier: Development Status :: 3 - Alpha
|
|
12
|
+
Classifier: Intended Audience :: Science/Research
|
|
13
|
+
Classifier: Programming Language :: Python :: 3
|
|
14
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
15
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
16
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
17
|
+
Classifier: Operating System :: OS Independent
|
|
18
|
+
Classifier: Topic :: Scientific/Engineering
|
|
19
|
+
Classifier: Topic :: Scientific/Engineering :: Image Processing
|
|
20
|
+
Requires-Python: >=3.11
|
|
21
|
+
Description-Content-Type: text/markdown
|
|
22
|
+
License-File: LICENSE
|
|
23
|
+
Requires-Dist: numpy>=1.24
|
|
24
|
+
Requires-Dist: scipy>=1.10
|
|
25
|
+
Requires-Dist: h5py>=3.8
|
|
26
|
+
Requires-Dist: opencv-python-headless<5,>=4.13
|
|
27
|
+
Requires-Dist: tqdm
|
|
28
|
+
Requires-Dist: matplotlib
|
|
29
|
+
Requires-Dist: scikit-image
|
|
30
|
+
Provides-Extra: gui
|
|
31
|
+
Requires-Dist: PySide6; extra == "gui"
|
|
32
|
+
Requires-Dist: vispy; extra == "gui"
|
|
33
|
+
Requires-Dist: qtawesome; extra == "gui"
|
|
34
|
+
Requires-Dist: psutil; extra == "gui"
|
|
35
|
+
Requires-Dist: pyqtdarktheme-fork>=2.3.6; extra == "gui"
|
|
36
|
+
Requires-Dist: shiboken6; extra == "gui"
|
|
37
|
+
Provides-Extra: dev
|
|
38
|
+
Requires-Dist: build; extra == "dev"
|
|
39
|
+
Requires-Dist: pytest; extra == "dev"
|
|
40
|
+
Requires-Dist: pytest-cov; extra == "dev"
|
|
41
|
+
Requires-Dist: ruff; extra == "dev"
|
|
42
|
+
Requires-Dist: pre-commit; extra == "dev"
|
|
43
|
+
Requires-Dist: nbstripout; extra == "dev"
|
|
44
|
+
Requires-Dist: setuptools-scm>=10; extra == "dev"
|
|
45
|
+
Dynamic: license-file
|
|
46
|
+
|
|
47
|
+
# CATAN
|
|
48
|
+
|
|
49
|
+
**CATAN** (**C**uration and **A**nalysis of **T**racked **A**cross-sessions **N**eurons)
|
|
50
|
+
is an open-source, cross-platform toolbox for the analysis, tracking and curation of neuronal populations
|
|
51
|
+
in longitudinal calcium imaging experiments.
|
|
52
|
+
|
|
53
|
+
It provides an interactive GUI together with a Python API for
|
|
54
|
+
|
|
55
|
+
- visualization of calcium imaging sessions
|
|
56
|
+
- ROI inspection
|
|
57
|
+
- registration and remapping between sessions
|
|
58
|
+
- probabilistic neuron matching
|
|
59
|
+
- quality assessment
|
|
60
|
+
- export/import of tracking results
|
|
61
|
+
|
|
62
|
+
CATAN is primarily designed for CaImAn output but aims to remain extensible.
|
|
63
|
+
|
|
64
|
+
---
|
|
65
|
+
|
|
66
|
+
## Features
|
|
67
|
+
|
|
68
|
+
- Interactive Qt/VisPy GUI
|
|
69
|
+
- Fast visualization of thousands of ROIs
|
|
70
|
+
- Across-session neuron tracking
|
|
71
|
+
- Rigid and non-rigid remapping
|
|
72
|
+
- Sparse matrix support
|
|
73
|
+
- HDF5-based project format
|
|
74
|
+
- Scriptable Python API
|
|
75
|
+
|
|
76
|
+
---
|
|
77
|
+
|
|
78
|
+
## Installation
|
|
79
|
+
|
|
80
|
+
```bash
|
|
81
|
+
pip install catan-toolbox[gui]
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
or
|
|
85
|
+
|
|
86
|
+
```bash
|
|
87
|
+
git clone https://github.com/goecidbn/CATAN_toolbox.git
|
|
88
|
+
cd CATAN
|
|
89
|
+
pip install -e ".[gui]"
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
|
|
93
|
+
CATAN allows for a GUI-less setup, not requiring graphic libraries such as PySide6 and vispy. For most users, the installation including the GUI will be of interest and can be set up via the commands above. For a graphic-less setup, use
|
|
94
|
+
|
|
95
|
+
```bash
|
|
96
|
+
pip install catan-toolbox
|
|
97
|
+
```
|
|
98
|
+
---
|
|
99
|
+
|
|
100
|
+
## Running CATAN
|
|
101
|
+
|
|
102
|
+
```bash
|
|
103
|
+
catan
|
|
104
|
+
```
|
|
105
|
+
|
|
106
|
+
or
|
|
107
|
+
|
|
108
|
+
```python
|
|
109
|
+
from catan.gui.app import main
|
|
110
|
+
|
|
111
|
+
main()
|
|
112
|
+
```
|
|
113
|
+
|
|
114
|
+
---
|
|
115
|
+
|
|
116
|
+
## Development
|
|
117
|
+
|
|
118
|
+
```bash
|
|
119
|
+
git clone https://github.com/goecidbn/CATAN_toolbox.git
|
|
120
|
+
pip install -e ".[gui,dev]"
|
|
121
|
+
```
|
|
122
|
+
|
|
123
|
+
Run the tests
|
|
124
|
+
|
|
125
|
+
```bash
|
|
126
|
+
pytest
|
|
127
|
+
```
|
|
128
|
+
|
|
129
|
+
---
|
|
130
|
+
|
|
131
|
+
## Project status
|
|
132
|
+
|
|
133
|
+
CATAN is currently under active development.
|
|
134
|
+
The file format and Python API may change until the first stable release.
|
|
135
|
+
|
|
136
|
+
---
|
|
137
|
+
|
|
138
|
+
## Citation
|
|
139
|
+
|
|
140
|
+
If you use CATAN in scientific work, please cite
|
|
141
|
+
|
|
142
|
+
> (paper / DOI once available)
|
|
143
|
+
|
|
144
|
+
---
|
|
145
|
+
|
|
146
|
+
## License
|
|
147
|
+
|
|
148
|
+
MIT License
|