tracksdata 0.1.0rc0__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.
- tracksdata-0.1.0rc0/.github/workflows/benchmarks.yml +52 -0
- tracksdata-0.1.0rc0/.github/workflows/ci.yml +77 -0
- tracksdata-0.1.0rc0/.github/workflows/docs.yml +95 -0
- tracksdata-0.1.0rc0/.github/workflows/release.yml +120 -0
- tracksdata-0.1.0rc0/.gitignore +197 -0
- tracksdata-0.1.0rc0/.pre-commit-config.yaml +47 -0
- tracksdata-0.1.0rc0/LICENSE +13 -0
- tracksdata-0.1.0rc0/Makefile +45 -0
- tracksdata-0.1.0rc0/PKG-INFO +114 -0
- tracksdata-0.1.0rc0/README.md +54 -0
- tracksdata-0.1.0rc0/benchmarks/graph_backends.py +196 -0
- tracksdata-0.1.0rc0/benchmarks/outputs/.gitkeep +0 -0
- tracksdata-0.1.0rc0/benchmarks/requirements.txt +1 -0
- tracksdata-0.1.0rc0/docs/concepts.md +78 -0
- tracksdata-0.1.0rc0/docs/contributing.md +54 -0
- tracksdata-0.1.0rc0/docs/examples/basic.py +160 -0
- tracksdata-0.1.0rc0/docs/examples.md +25 -0
- tracksdata-0.1.0rc0/docs/faq.md +79 -0
- tracksdata-0.1.0rc0/docs/getting_started.md +71 -0
- tracksdata-0.1.0rc0/docs/index.md +1 -0
- tracksdata-0.1.0rc0/docs/installation.md +46 -0
- tracksdata-0.1.0rc0/mkdocs.yml +106 -0
- tracksdata-0.1.0rc0/pyproject.toml +148 -0
- tracksdata-0.1.0rc0/src/tracksdata/__about__.py +34 -0
- tracksdata-0.1.0rc0/src/tracksdata/__init__.py +41 -0
- tracksdata-0.1.0rc0/src/tracksdata/_test/test_attrs.py +628 -0
- tracksdata-0.1.0rc0/src/tracksdata/_test/test_options.py +149 -0
- tracksdata-0.1.0rc0/src/tracksdata/array/__init__.py +9 -0
- tracksdata-0.1.0rc0/src/tracksdata/array/_base_array.py +55 -0
- tracksdata-0.1.0rc0/src/tracksdata/array/_graph_array.py +324 -0
- tracksdata-0.1.0rc0/src/tracksdata/array/_nd_chunk_cache.py +158 -0
- tracksdata-0.1.0rc0/src/tracksdata/array/_test/test_graph_array.py +349 -0
- tracksdata-0.1.0rc0/src/tracksdata/array/_test/test_nd_chunk_cache.py +118 -0
- tracksdata-0.1.0rc0/src/tracksdata/attrs.py +681 -0
- tracksdata-0.1.0rc0/src/tracksdata/conftest.py +104 -0
- tracksdata-0.1.0rc0/src/tracksdata/constants.py +71 -0
- tracksdata-0.1.0rc0/src/tracksdata/edges/__init__.py +7 -0
- tracksdata-0.1.0rc0/src/tracksdata/edges/_base_edge_attrs.py +83 -0
- tracksdata-0.1.0rc0/src/tracksdata/edges/_base_edges.py +79 -0
- tracksdata-0.1.0rc0/src/tracksdata/edges/_distance_edges.py +203 -0
- tracksdata-0.1.0rc0/src/tracksdata/edges/_generic_edges.py +127 -0
- tracksdata-0.1.0rc0/src/tracksdata/edges/_iou_edges.py +28 -0
- tracksdata-0.1.0rc0/src/tracksdata/edges/_test/test_distance_edges.py +314 -0
- tracksdata-0.1.0rc0/src/tracksdata/edges/_test/test_generic_edges.py +231 -0
- tracksdata-0.1.0rc0/src/tracksdata/edges/_test/test_iou_edges.py +200 -0
- tracksdata-0.1.0rc0/src/tracksdata/functional/__init__.py +6 -0
- tracksdata-0.1.0rc0/src/tracksdata/functional/_edges.py +80 -0
- tracksdata-0.1.0rc0/src/tracksdata/functional/_iou.py +100 -0
- tracksdata-0.1.0rc0/src/tracksdata/functional/_napari.py +155 -0
- tracksdata-0.1.0rc0/src/tracksdata/functional/_rx.py +314 -0
- tracksdata-0.1.0rc0/src/tracksdata/functional/_test/test_functional_edges.py +72 -0
- tracksdata-0.1.0rc0/src/tracksdata/functional/_test/test_iou.py +304 -0
- tracksdata-0.1.0rc0/src/tracksdata/functional/_test/test_napari.py +64 -0
- tracksdata-0.1.0rc0/src/tracksdata/functional/_test/test_rx.py +197 -0
- tracksdata-0.1.0rc0/src/tracksdata/graph/__init__.py +10 -0
- tracksdata-0.1.0rc0/src/tracksdata/graph/_base_graph.py +1395 -0
- tracksdata-0.1.0rc0/src/tracksdata/graph/_graph_view.py +757 -0
- tracksdata-0.1.0rc0/src/tracksdata/graph/_mapped_graph_mixin.py +238 -0
- tracksdata-0.1.0rc0/src/tracksdata/graph/_rustworkx_graph.py +1728 -0
- tracksdata-0.1.0rc0/src/tracksdata/graph/_sql_graph.py +1573 -0
- tracksdata-0.1.0rc0/src/tracksdata/graph/_test/test_graph_backends.py +1798 -0
- tracksdata-0.1.0rc0/src/tracksdata/graph/_test/test_index_graph.py +199 -0
- tracksdata-0.1.0rc0/src/tracksdata/graph/_test/test_subgraph.py +1218 -0
- tracksdata-0.1.0rc0/src/tracksdata/graph/filters/__init__.py +3 -0
- tracksdata-0.1.0rc0/src/tracksdata/graph/filters/_base_filter.py +113 -0
- tracksdata-0.1.0rc0/src/tracksdata/graph/filters/_indexed_filter.py +84 -0
- tracksdata-0.1.0rc0/src/tracksdata/graph/filters/_spatial_filter.py +323 -0
- tracksdata-0.1.0rc0/src/tracksdata/graph/filters/_test/test_spatial_filter.py +231 -0
- tracksdata-0.1.0rc0/src/tracksdata/io/__init__.py +5 -0
- tracksdata-0.1.0rc0/src/tracksdata/io/_ctc.py +293 -0
- tracksdata-0.1.0rc0/src/tracksdata/io/_numpy_array.py +155 -0
- tracksdata-0.1.0rc0/src/tracksdata/io/_test/test_ctc_io.py +77 -0
- tracksdata-0.1.0rc0/src/tracksdata/metrics/__init__.py +11 -0
- tracksdata-0.1.0rc0/src/tracksdata/metrics/_ctc_metrics.py +356 -0
- tracksdata-0.1.0rc0/src/tracksdata/metrics/_test/test_ctc_metrics.py +127 -0
- tracksdata-0.1.0rc0/src/tracksdata/metrics/_test/test_metrics_visualize.py +98 -0
- tracksdata-0.1.0rc0/src/tracksdata/metrics/_visualize.py +257 -0
- tracksdata-0.1.0rc0/src/tracksdata/nodes/__init__.py +8 -0
- tracksdata-0.1.0rc0/src/tracksdata/nodes/_base_node_attrs.py +86 -0
- tracksdata-0.1.0rc0/src/tracksdata/nodes/_base_nodes.py +32 -0
- tracksdata-0.1.0rc0/src/tracksdata/nodes/_generic_nodes.py +183 -0
- tracksdata-0.1.0rc0/src/tracksdata/nodes/_mask.py +333 -0
- tracksdata-0.1.0rc0/src/tracksdata/nodes/_random.py +172 -0
- tracksdata-0.1.0rc0/src/tracksdata/nodes/_regionprops.py +301 -0
- tracksdata-0.1.0rc0/src/tracksdata/nodes/_test/test_generic_nodes.py +472 -0
- tracksdata-0.1.0rc0/src/tracksdata/nodes/_test/test_mask.py +293 -0
- tracksdata-0.1.0rc0/src/tracksdata/nodes/_test/test_random.py +264 -0
- tracksdata-0.1.0rc0/src/tracksdata/nodes/_test/test_regionprops.py +280 -0
- tracksdata-0.1.0rc0/src/tracksdata/options.py +165 -0
- tracksdata-0.1.0rc0/src/tracksdata/solvers/__init__.py +6 -0
- tracksdata-0.1.0rc0/src/tracksdata/solvers/_base_solver.py +48 -0
- tracksdata-0.1.0rc0/src/tracksdata/solvers/_ilp_solver.py +410 -0
- tracksdata-0.1.0rc0/src/tracksdata/solvers/_nearest_neighbors_solver.py +307 -0
- tracksdata-0.1.0rc0/src/tracksdata/solvers/_test/test_ilp_solver.py +676 -0
- tracksdata-0.1.0rc0/src/tracksdata/solvers/_test/test_nearest_neighbors_solver.py +384 -0
- tracksdata-0.1.0rc0/src/tracksdata/utils/__init__.py +1 -0
- tracksdata-0.1.0rc0/src/tracksdata/utils/_dataframe.py +52 -0
- tracksdata-0.1.0rc0/src/tracksdata/utils/_dtypes.py +119 -0
- tracksdata-0.1.0rc0/src/tracksdata/utils/_logging.py +6 -0
- tracksdata-0.1.0rc0/src/tracksdata/utils/_multiprocessing.py +74 -0
- tracksdata-0.1.0rc0/src/tracksdata/utils/_test/test_dataframe.py +33 -0
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
name: Benchmarks
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
pull_request:
|
|
5
|
+
branches: [ main ]
|
|
6
|
+
|
|
7
|
+
jobs:
|
|
8
|
+
benchmark:
|
|
9
|
+
runs-on: ubuntu-latest
|
|
10
|
+
|
|
11
|
+
steps:
|
|
12
|
+
- uses: actions/checkout@v4
|
|
13
|
+
with:
|
|
14
|
+
fetch-depth: 0 # Important for asv to access the git history
|
|
15
|
+
ref: ${{ github.ref }}
|
|
16
|
+
|
|
17
|
+
- name: Fetch main branch
|
|
18
|
+
run: |
|
|
19
|
+
git fetch origin main
|
|
20
|
+
|
|
21
|
+
- name: Install uv
|
|
22
|
+
uses: astral-sh/setup-uv@v5
|
|
23
|
+
with:
|
|
24
|
+
python-version: "3.12"
|
|
25
|
+
enable-cache: true
|
|
26
|
+
|
|
27
|
+
- name: Install dependencies
|
|
28
|
+
run: |
|
|
29
|
+
uv pip install 'asv<0.6.2' virtualenv
|
|
30
|
+
uv pip install "."
|
|
31
|
+
|
|
32
|
+
- name: Run benchmarks
|
|
33
|
+
id: benchmark_output
|
|
34
|
+
run: |
|
|
35
|
+
cd benchmarks
|
|
36
|
+
uv pip install -r requirements.txt
|
|
37
|
+
python graph_backends.py
|
|
38
|
+
echo "benchmark-results<<EOF" >> $GITHUB_OUTPUT
|
|
39
|
+
cat outputs/graph_backends.md >> $GITHUB_OUTPUT
|
|
40
|
+
echo "EOF" >> $GITHUB_OUTPUT
|
|
41
|
+
|
|
42
|
+
# Currently not working because PRs comes from forks
|
|
43
|
+
# - name: Comment PR with benchmark results
|
|
44
|
+
# uses: peter-evans/create-or-update-comment@v4
|
|
45
|
+
# with:
|
|
46
|
+
# issue-number: ${{ github.event.pull_request.number }}
|
|
47
|
+
# body: |
|
|
48
|
+
# ### Benchmark Results
|
|
49
|
+
#
|
|
50
|
+
# ```
|
|
51
|
+
# ${{ steps.benchmark_output.outputs.benchmark-results }}
|
|
52
|
+
# ```
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
name: CI
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches: [ main ]
|
|
6
|
+
pull_request:
|
|
7
|
+
branches: [ main ]
|
|
8
|
+
|
|
9
|
+
jobs:
|
|
10
|
+
lint:
|
|
11
|
+
runs-on: ubuntu-latest
|
|
12
|
+
steps:
|
|
13
|
+
- uses: actions/checkout@v4
|
|
14
|
+
|
|
15
|
+
- name: Set up Python
|
|
16
|
+
uses: actions/setup-python@v5
|
|
17
|
+
with:
|
|
18
|
+
python-version: "3.12"
|
|
19
|
+
|
|
20
|
+
# these libraries enable testing on Qt on linux
|
|
21
|
+
- name: Set up Qt
|
|
22
|
+
uses: tlambert03/setup-qt-libs@v1
|
|
23
|
+
|
|
24
|
+
- name: Install uv
|
|
25
|
+
uses: astral-sh/setup-uv@v5
|
|
26
|
+
with:
|
|
27
|
+
enable-cache: true
|
|
28
|
+
|
|
29
|
+
- name: Install dependencies
|
|
30
|
+
run: |
|
|
31
|
+
uv sync
|
|
32
|
+
uv add --dev ruff
|
|
33
|
+
|
|
34
|
+
- name: Lint with ruff
|
|
35
|
+
run: |
|
|
36
|
+
uv run ruff check .
|
|
37
|
+
uv run ruff format --check .
|
|
38
|
+
|
|
39
|
+
test:
|
|
40
|
+
needs: lint
|
|
41
|
+
runs-on: ubuntu-latest
|
|
42
|
+
strategy:
|
|
43
|
+
matrix:
|
|
44
|
+
python-version: ["3.10", "3.11", "3.12"]
|
|
45
|
+
|
|
46
|
+
steps:
|
|
47
|
+
- uses: actions/checkout@v4
|
|
48
|
+
|
|
49
|
+
- name: Set up Python ${{ matrix.python-version }}
|
|
50
|
+
uses: actions/setup-python@v5
|
|
51
|
+
with:
|
|
52
|
+
python-version: ${{ matrix.python-version }}
|
|
53
|
+
|
|
54
|
+
# these libraries enable testing on Qt on linux
|
|
55
|
+
- name: Set up Qt
|
|
56
|
+
uses: tlambert03/setup-qt-libs@v1
|
|
57
|
+
|
|
58
|
+
- name: Install uv
|
|
59
|
+
uses: astral-sh/setup-uv@v5
|
|
60
|
+
with:
|
|
61
|
+
enable-cache: true
|
|
62
|
+
|
|
63
|
+
- name: Install dependencies
|
|
64
|
+
run: |
|
|
65
|
+
uv sync --extra test
|
|
66
|
+
|
|
67
|
+
- name: Run tests with coverage
|
|
68
|
+
uses: aganders3/headless-gui@v2
|
|
69
|
+
with:
|
|
70
|
+
run: uv run pytest --cov=tracksdata --cov-report=xml
|
|
71
|
+
|
|
72
|
+
- name: Upload coverage to Codecov
|
|
73
|
+
if: matrix.python-version == '3.12'
|
|
74
|
+
uses: codecov/codecov-action@v5
|
|
75
|
+
with:
|
|
76
|
+
token: ${{ secrets.CODECOV_TOKEN }}
|
|
77
|
+
fail_ci_if_error: true
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
name: Documentation
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches:
|
|
6
|
+
- main
|
|
7
|
+
tags:
|
|
8
|
+
- "v*"
|
|
9
|
+
pull_request:
|
|
10
|
+
branches:
|
|
11
|
+
- main
|
|
12
|
+
workflow_dispatch:
|
|
13
|
+
|
|
14
|
+
permissions:
|
|
15
|
+
contents: write
|
|
16
|
+
pages: write
|
|
17
|
+
id-token: write
|
|
18
|
+
|
|
19
|
+
concurrency:
|
|
20
|
+
group: pages
|
|
21
|
+
cancel-in-progress: false
|
|
22
|
+
|
|
23
|
+
jobs:
|
|
24
|
+
build:
|
|
25
|
+
runs-on: ubuntu-latest
|
|
26
|
+
steps:
|
|
27
|
+
- name: Checkout repository
|
|
28
|
+
uses: actions/checkout@v4
|
|
29
|
+
with:
|
|
30
|
+
fetch-depth: 0 # Fetch full history for versioning
|
|
31
|
+
|
|
32
|
+
- name: Set up Python
|
|
33
|
+
uses: actions/setup-python@v5
|
|
34
|
+
with:
|
|
35
|
+
python-version: "3.11"
|
|
36
|
+
|
|
37
|
+
- name: Install uv
|
|
38
|
+
uses: astral-sh/setup-uv@v5
|
|
39
|
+
with:
|
|
40
|
+
enable-cache: true
|
|
41
|
+
|
|
42
|
+
- name: Install dependencies
|
|
43
|
+
run: |
|
|
44
|
+
uv sync --all-extras --dev
|
|
45
|
+
|
|
46
|
+
- name: Configure Git
|
|
47
|
+
run: |
|
|
48
|
+
git config --global user.name "github-actions[bot]"
|
|
49
|
+
git config --global user.email "github-actions[bot]@users.noreply.github.com"
|
|
50
|
+
git remote set-url origin https://x-access-token:${GITHUB_TOKEN}@github.com/${GITHUB_REPOSITORY}.git
|
|
51
|
+
|
|
52
|
+
- name: Build documentation for PR
|
|
53
|
+
if: github.event_name == 'pull_request'
|
|
54
|
+
run: |
|
|
55
|
+
uv run mkdocs build --verbose
|
|
56
|
+
|
|
57
|
+
- name: Deploy development docs
|
|
58
|
+
if: github.ref == 'refs/heads/main' && github.event_name == 'push'
|
|
59
|
+
run: |
|
|
60
|
+
uv run mike deploy --push --update-aliases dev development
|
|
61
|
+
uv run mike set-default --push dev
|
|
62
|
+
|
|
63
|
+
- name: Deploy release docs
|
|
64
|
+
if: startsWith(github.ref, 'refs/tags/v')
|
|
65
|
+
run: |
|
|
66
|
+
VERSION=${GITHUB_REF#refs/tags/v}
|
|
67
|
+
uv run mike deploy --push --update-aliases $VERSION latest
|
|
68
|
+
uv run mike set-default --push latest
|
|
69
|
+
|
|
70
|
+
- name: Setup Pages
|
|
71
|
+
if: github.ref == 'refs/heads/main' && github.event_name == 'push'
|
|
72
|
+
uses: actions/configure-pages@v4
|
|
73
|
+
|
|
74
|
+
- name: Build site for Pages
|
|
75
|
+
if: github.ref == 'refs/heads/main' && github.event_name == 'push'
|
|
76
|
+
run: |
|
|
77
|
+
uv run mkdocs build
|
|
78
|
+
|
|
79
|
+
- name: Upload artifact
|
|
80
|
+
if: github.ref == 'refs/heads/main' && github.event_name == 'push'
|
|
81
|
+
uses: actions/upload-pages-artifact@v3
|
|
82
|
+
with:
|
|
83
|
+
path: './site'
|
|
84
|
+
|
|
85
|
+
deploy:
|
|
86
|
+
if: github.ref == 'refs/heads/main' && github.event_name == 'push'
|
|
87
|
+
environment:
|
|
88
|
+
name: github-pages
|
|
89
|
+
url: ${{ steps.deployment.outputs.page_url }}
|
|
90
|
+
runs-on: ubuntu-latest
|
|
91
|
+
needs: build
|
|
92
|
+
steps:
|
|
93
|
+
- name: Deploy to GitHub Pages
|
|
94
|
+
id: deployment
|
|
95
|
+
uses: actions/deploy-pages@v4
|
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
name: Release
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
tags:
|
|
6
|
+
- "v*"
|
|
7
|
+
workflow_dispatch:
|
|
8
|
+
inputs:
|
|
9
|
+
test_release:
|
|
10
|
+
description: 'Test release (skips PyPI publish)'
|
|
11
|
+
required: false
|
|
12
|
+
default: false
|
|
13
|
+
type: boolean
|
|
14
|
+
|
|
15
|
+
permissions:
|
|
16
|
+
contents: write
|
|
17
|
+
id-token: write
|
|
18
|
+
|
|
19
|
+
jobs:
|
|
20
|
+
build:
|
|
21
|
+
runs-on: ubuntu-latest
|
|
22
|
+
steps:
|
|
23
|
+
- name: Checkout repository
|
|
24
|
+
uses: actions/checkout@v4
|
|
25
|
+
with:
|
|
26
|
+
fetch-depth: 0 # Required for hatch-vcs to access git history
|
|
27
|
+
|
|
28
|
+
- name: Set up Python
|
|
29
|
+
uses: actions/setup-python@v5
|
|
30
|
+
with:
|
|
31
|
+
python-version: "3.12"
|
|
32
|
+
|
|
33
|
+
# these libraries enable testing on Qt on linux
|
|
34
|
+
- name: Set up Qt
|
|
35
|
+
uses: tlambert03/setup-qt-libs@v1
|
|
36
|
+
|
|
37
|
+
- name: Install uv
|
|
38
|
+
uses: astral-sh/setup-uv@v5
|
|
39
|
+
with:
|
|
40
|
+
enable-cache: true
|
|
41
|
+
|
|
42
|
+
- name: Install dependencies
|
|
43
|
+
run: |
|
|
44
|
+
uv sync --extra test
|
|
45
|
+
|
|
46
|
+
- name: Run tests
|
|
47
|
+
uses: aganders3/headless-gui@v2
|
|
48
|
+
with:
|
|
49
|
+
run: uv run pytest
|
|
50
|
+
|
|
51
|
+
- name: Build package
|
|
52
|
+
run: |
|
|
53
|
+
uv build
|
|
54
|
+
|
|
55
|
+
- name: Upload build artifacts
|
|
56
|
+
uses: actions/upload-artifact@v4
|
|
57
|
+
with:
|
|
58
|
+
name: dist
|
|
59
|
+
path: dist/
|
|
60
|
+
|
|
61
|
+
release:
|
|
62
|
+
needs: build
|
|
63
|
+
runs-on: ubuntu-latest
|
|
64
|
+
# Only run on main repo and not for test releases
|
|
65
|
+
if: github.repository == 'royerlab/tracksdata' && github.event.inputs.test_release != 'true'
|
|
66
|
+
environment:
|
|
67
|
+
name: pypi
|
|
68
|
+
url: https://pypi.org/p/tracksdata
|
|
69
|
+
steps:
|
|
70
|
+
- name: Download build artifacts
|
|
71
|
+
uses: actions/download-artifact@v4
|
|
72
|
+
with:
|
|
73
|
+
name: dist
|
|
74
|
+
path: dist/
|
|
75
|
+
|
|
76
|
+
- name: Publish to PyPI
|
|
77
|
+
uses: pypa/gh-action-pypi-publish@release/v1
|
|
78
|
+
with:
|
|
79
|
+
attestations: true
|
|
80
|
+
|
|
81
|
+
test-release:
|
|
82
|
+
needs: build
|
|
83
|
+
runs-on: ubuntu-latest
|
|
84
|
+
# Only run for test releases or on forks
|
|
85
|
+
if: github.event.inputs.test_release == 'true' || github.repository != 'royerlab/tracksdata'
|
|
86
|
+
steps:
|
|
87
|
+
- name: Download build artifacts
|
|
88
|
+
uses: actions/download-artifact@v4
|
|
89
|
+
with:
|
|
90
|
+
name: dist
|
|
91
|
+
path: dist/
|
|
92
|
+
|
|
93
|
+
- name: Test PyPI upload (dry run)
|
|
94
|
+
run: |
|
|
95
|
+
echo "🧪 This would upload to PyPI:"
|
|
96
|
+
ls -la dist/
|
|
97
|
+
echo "✅ Test release completed successfully!"
|
|
98
|
+
|
|
99
|
+
github-release:
|
|
100
|
+
needs: build
|
|
101
|
+
runs-on: ubuntu-latest
|
|
102
|
+
# Only create GitHub releases on main repo and not for test releases
|
|
103
|
+
if: github.repository == 'royerlab/tracksdata' && github.event.inputs.test_release != 'true'
|
|
104
|
+
steps:
|
|
105
|
+
- name: Checkout repository
|
|
106
|
+
uses: actions/checkout@v4
|
|
107
|
+
|
|
108
|
+
- name: Download build artifacts
|
|
109
|
+
uses: actions/download-artifact@v4
|
|
110
|
+
with:
|
|
111
|
+
name: dist
|
|
112
|
+
path: dist/
|
|
113
|
+
|
|
114
|
+
- name: Create GitHub Release
|
|
115
|
+
uses: softprops/action-gh-release@v2
|
|
116
|
+
with:
|
|
117
|
+
files: dist/*
|
|
118
|
+
generate_release_notes: true
|
|
119
|
+
draft: false
|
|
120
|
+
prerelease: ${{ contains(github.ref, 'alpha') || contains(github.ref, 'beta') || contains(github.ref, 'rc') }}
|
|
@@ -0,0 +1,197 @@
|
|
|
1
|
+
# Byte-compiled / optimized / DLL files
|
|
2
|
+
__pycache__/
|
|
3
|
+
*.py[cod]
|
|
4
|
+
*$py.class
|
|
5
|
+
|
|
6
|
+
# C extensions
|
|
7
|
+
*.so
|
|
8
|
+
|
|
9
|
+
# Distribution / packaging
|
|
10
|
+
.Python
|
|
11
|
+
build/
|
|
12
|
+
develop-eggs/
|
|
13
|
+
dist/
|
|
14
|
+
downloads/
|
|
15
|
+
eggs/
|
|
16
|
+
.eggs/
|
|
17
|
+
lib/
|
|
18
|
+
lib64/
|
|
19
|
+
parts/
|
|
20
|
+
sdist/
|
|
21
|
+
var/
|
|
22
|
+
wheels/
|
|
23
|
+
share/python-wheels/
|
|
24
|
+
*.egg-info/
|
|
25
|
+
.installed.cfg
|
|
26
|
+
*.egg
|
|
27
|
+
MANIFEST
|
|
28
|
+
|
|
29
|
+
# PyInstaller
|
|
30
|
+
# Usually these files are written by a python script from a template
|
|
31
|
+
# before PyInstaller builds the exe, so as to inject date/other infos into it.
|
|
32
|
+
*.manifest
|
|
33
|
+
*.spec
|
|
34
|
+
|
|
35
|
+
# Installer logs
|
|
36
|
+
pip-log.txt
|
|
37
|
+
pip-delete-this-directory.txt
|
|
38
|
+
|
|
39
|
+
# Unit test / coverage reports
|
|
40
|
+
htmlcov/
|
|
41
|
+
.tox/
|
|
42
|
+
.nox/
|
|
43
|
+
.coverage
|
|
44
|
+
.coverage.*
|
|
45
|
+
.cache
|
|
46
|
+
nosetests.xml
|
|
47
|
+
coverage.xml
|
|
48
|
+
*.cover
|
|
49
|
+
*.py,cover
|
|
50
|
+
.hypothesis/
|
|
51
|
+
.pytest_cache/
|
|
52
|
+
cover/
|
|
53
|
+
|
|
54
|
+
# Translations
|
|
55
|
+
*.mo
|
|
56
|
+
*.pot
|
|
57
|
+
|
|
58
|
+
# Django stuff:
|
|
59
|
+
*.log
|
|
60
|
+
local_settings.py
|
|
61
|
+
db.sqlite3
|
|
62
|
+
db.sqlite3-journal
|
|
63
|
+
|
|
64
|
+
# Flask stuff:
|
|
65
|
+
instance/
|
|
66
|
+
.webassets-cache
|
|
67
|
+
|
|
68
|
+
# Scrapy stuff:
|
|
69
|
+
.scrapy
|
|
70
|
+
|
|
71
|
+
# Sphinx documentation
|
|
72
|
+
docs/_build/
|
|
73
|
+
|
|
74
|
+
# PyBuilder
|
|
75
|
+
.pybuilder/
|
|
76
|
+
target/
|
|
77
|
+
|
|
78
|
+
# Jupyter Notebook
|
|
79
|
+
.ipynb_checkpoints
|
|
80
|
+
|
|
81
|
+
# IPython
|
|
82
|
+
profile_default/
|
|
83
|
+
ipython_config.py
|
|
84
|
+
|
|
85
|
+
# pyenv
|
|
86
|
+
# For a library or package, you might want to ignore these files since the code is
|
|
87
|
+
# intended to run in multiple environments; otherwise, check them in:
|
|
88
|
+
# .python-version
|
|
89
|
+
|
|
90
|
+
# pipenv
|
|
91
|
+
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
|
|
92
|
+
# However, in case of collaboration, if having platform-specific dependencies or dependencies
|
|
93
|
+
# having no cross-platform support, pipenv may install dependencies that don't work, or not
|
|
94
|
+
# install all needed dependencies.
|
|
95
|
+
#Pipfile.lock
|
|
96
|
+
|
|
97
|
+
# UV
|
|
98
|
+
# Similar to Pipfile.lock, it is generally recommended to include uv.lock in version control.
|
|
99
|
+
# This is especially recommended for binary packages to ensure reproducibility, and is more
|
|
100
|
+
# commonly ignored for libraries.
|
|
101
|
+
#uv.lock
|
|
102
|
+
|
|
103
|
+
# poetry
|
|
104
|
+
# Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control.
|
|
105
|
+
# This is especially recommended for binary packages to ensure reproducibility, and is more
|
|
106
|
+
# commonly ignored for libraries.
|
|
107
|
+
# https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control
|
|
108
|
+
#poetry.lock
|
|
109
|
+
|
|
110
|
+
# pdm
|
|
111
|
+
# Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.
|
|
112
|
+
#pdm.lock
|
|
113
|
+
# pdm stores project-wide configurations in .pdm.toml, but it is recommended to not include it
|
|
114
|
+
# in version control.
|
|
115
|
+
# https://pdm.fming.dev/latest/usage/project/#working-with-version-control
|
|
116
|
+
.pdm.toml
|
|
117
|
+
.pdm-python
|
|
118
|
+
.pdm-build/
|
|
119
|
+
|
|
120
|
+
# PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm
|
|
121
|
+
__pypackages__/
|
|
122
|
+
|
|
123
|
+
# Celery stuff
|
|
124
|
+
celerybeat-schedule
|
|
125
|
+
celerybeat.pid
|
|
126
|
+
|
|
127
|
+
# SageMath parsed files
|
|
128
|
+
*.sage.py
|
|
129
|
+
|
|
130
|
+
# Environments
|
|
131
|
+
.env
|
|
132
|
+
.venv
|
|
133
|
+
env/
|
|
134
|
+
venv/
|
|
135
|
+
ENV/
|
|
136
|
+
env.bak/
|
|
137
|
+
venv.bak/
|
|
138
|
+
|
|
139
|
+
# Spyder project settings
|
|
140
|
+
.spyderproject
|
|
141
|
+
.spyproject
|
|
142
|
+
|
|
143
|
+
# Rope project settings
|
|
144
|
+
.ropeproject
|
|
145
|
+
|
|
146
|
+
# mkdocs documentation
|
|
147
|
+
/site
|
|
148
|
+
|
|
149
|
+
# mypy
|
|
150
|
+
.mypy_cache/
|
|
151
|
+
.dmypy.json
|
|
152
|
+
dmypy.json
|
|
153
|
+
|
|
154
|
+
# Pyre type checker
|
|
155
|
+
.pyre/
|
|
156
|
+
|
|
157
|
+
# pytype static type analyzer
|
|
158
|
+
.pytype/
|
|
159
|
+
|
|
160
|
+
# Cython debug symbols
|
|
161
|
+
cython_debug/
|
|
162
|
+
|
|
163
|
+
# PyCharm
|
|
164
|
+
# JetBrains specific template is maintained in a separate JetBrains.gitignore that can
|
|
165
|
+
# be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
|
|
166
|
+
# and can be added to the global gitignore or merged into this file. For a more nuclear
|
|
167
|
+
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
|
|
168
|
+
#.idea/
|
|
169
|
+
|
|
170
|
+
# Ruff stuff:
|
|
171
|
+
.ruff_cache/
|
|
172
|
+
|
|
173
|
+
# PyPI configuration file
|
|
174
|
+
.pypirc
|
|
175
|
+
|
|
176
|
+
# image files
|
|
177
|
+
*.tif
|
|
178
|
+
|
|
179
|
+
# CTC files
|
|
180
|
+
man_track.txt
|
|
181
|
+
|
|
182
|
+
# macOS files
|
|
183
|
+
.DS_Store
|
|
184
|
+
|
|
185
|
+
# ASV
|
|
186
|
+
.asv/
|
|
187
|
+
|
|
188
|
+
# uv
|
|
189
|
+
uv.lock
|
|
190
|
+
|
|
191
|
+
# benchmarks
|
|
192
|
+
benchmarks/outputs/*.md
|
|
193
|
+
|
|
194
|
+
# Version file generated by hatch-vcs
|
|
195
|
+
src/tracksdata/__about__.py
|
|
196
|
+
|
|
197
|
+
.vscode/
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
---
|
|
2
|
+
repos:
|
|
3
|
+
# basic pre-commit
|
|
4
|
+
- repo: https://github.com/pre-commit/pre-commit-hooks
|
|
5
|
+
rev: v4.4.0
|
|
6
|
+
hooks:
|
|
7
|
+
- id: trailing-whitespace
|
|
8
|
+
- id: end-of-file-fixer
|
|
9
|
+
- id: check-added-large-files
|
|
10
|
+
- id: detect-private-key
|
|
11
|
+
- id: check-yaml
|
|
12
|
+
files: \.yaml$|\.yml$
|
|
13
|
+
args: [--unsafe]
|
|
14
|
+
- id: check-toml
|
|
15
|
+
files: \.toml$
|
|
16
|
+
|
|
17
|
+
# make every import absolute
|
|
18
|
+
- repo: https://github.com/MarcoGorelli/absolufy-imports
|
|
19
|
+
rev: v0.3.0
|
|
20
|
+
hooks:
|
|
21
|
+
- id: absolufy-imports
|
|
22
|
+
|
|
23
|
+
# sorting imports
|
|
24
|
+
- repo: https://github.com/pycqa/isort
|
|
25
|
+
rev: 5.12.0
|
|
26
|
+
hooks:
|
|
27
|
+
- id: isort
|
|
28
|
+
args: ["--profile", "black", "--filter-files"]
|
|
29
|
+
|
|
30
|
+
# formatting
|
|
31
|
+
- repo: https://github.com/psf/black
|
|
32
|
+
rev: 25.1.0
|
|
33
|
+
hooks:
|
|
34
|
+
- id: black
|
|
35
|
+
args: ["--line-length", "120"]
|
|
36
|
+
|
|
37
|
+
- repo: https://github.com/astral-sh/ruff-pre-commit
|
|
38
|
+
# Ruff version.
|
|
39
|
+
rev: v0.11.12
|
|
40
|
+
hooks:
|
|
41
|
+
# Run the linter.
|
|
42
|
+
- id: ruff
|
|
43
|
+
types_or: [python, pyi, jupyter]
|
|
44
|
+
args: [--fix]
|
|
45
|
+
# Run the formatter.
|
|
46
|
+
- id: ruff-format
|
|
47
|
+
types_or: [python, pyi, jupyter]
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
BSD 3-Clause License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2025-present, Jordao Bragantini <jordao.bragantini@czbiohub.org>
|
|
4
|
+
|
|
5
|
+
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
|
|
6
|
+
|
|
7
|
+
1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
|
|
8
|
+
|
|
9
|
+
2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
|
|
10
|
+
|
|
11
|
+
3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
|
|
12
|
+
|
|
13
|
+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS “AS IS” AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
.PHONY: test test-cov test-cov-xml help install clean
|
|
2
|
+
|
|
3
|
+
# Default target
|
|
4
|
+
help:
|
|
5
|
+
@echo "Available targets:"
|
|
6
|
+
@echo " test - Run tests without coverage"
|
|
7
|
+
@echo " test-cov - Run tests with coverage and generate HTML report"
|
|
8
|
+
@echo " test-cov-xml - Run tests with coverage and generate XML report"
|
|
9
|
+
@echo " install - Install dependencies with test extras"
|
|
10
|
+
@echo " clean - Clean coverage files and cache"
|
|
11
|
+
|
|
12
|
+
# Install dependencies
|
|
13
|
+
install:
|
|
14
|
+
uv sync --extra test
|
|
15
|
+
|
|
16
|
+
# Run tests without coverage
|
|
17
|
+
test: install
|
|
18
|
+
@echo "Running tests..."
|
|
19
|
+
uv run pytest -v
|
|
20
|
+
|
|
21
|
+
# Run tests with coverage and generate HTML report
|
|
22
|
+
test-cov: install
|
|
23
|
+
@echo "Running tests with coverage..."
|
|
24
|
+
uv run pytest --cov=src/tracksdata --cov-report=html --cov-report=term-missing -v
|
|
25
|
+
@echo ""
|
|
26
|
+
@echo "Coverage report generated in htmlcov/index.html"
|
|
27
|
+
@echo "You can open it with: open htmlcov/index.html (macOS) or xdg-open htmlcov/index.html (Linux)"
|
|
28
|
+
|
|
29
|
+
# Run tests with coverage and generate XML report
|
|
30
|
+
test-cov-xml: install
|
|
31
|
+
@echo "Running tests with coverage (XML output)..."
|
|
32
|
+
uv run pytest --cov=src/tracksdata --cov-report=xml --cov-report=term-missing -v
|
|
33
|
+
@echo ""
|
|
34
|
+
@echo "Coverage report generated in coverage.xml"
|
|
35
|
+
|
|
36
|
+
# Clean coverage files and cache
|
|
37
|
+
clean:
|
|
38
|
+
@echo "Cleaning coverage files and cache..."
|
|
39
|
+
rm -rf htmlcov/
|
|
40
|
+
rm -f coverage.xml
|
|
41
|
+
rm -f .coverage
|
|
42
|
+
rm -rf .pytest_cache/
|
|
43
|
+
rm -rf src/**/__pycache__/
|
|
44
|
+
find . -name "*.pyc" -delete
|
|
45
|
+
find . -name "__pycache__" -type d -exec rm -rf {} + 2>/dev/null || true
|