ossify 0.3.1__tar.gz → 0.3.2__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 (37) hide show
  1. ossify-0.3.2/.github/workflows/publish.yml +51 -0
  2. {ossify-0.3.1 → ossify-0.3.2}/PKG-INFO +1 -1
  3. {ossify-0.3.1 → ossify-0.3.2}/pyproject.toml +2 -2
  4. {ossify-0.3.1 → ossify-0.3.2}/src/ossify/__init__.py +1 -1
  5. {ossify-0.3.1 → ossify-0.3.2}/src/ossify/translate.py +10 -0
  6. {ossify-0.3.1 → ossify-0.3.2}/.github/workflows/mkdocs_publish.yml +0 -0
  7. {ossify-0.3.1 → ossify-0.3.2}/.github/workflows/python-package.yml +0 -0
  8. {ossify-0.3.1 → ossify-0.3.2}/.gitignore +0 -0
  9. {ossify-0.3.1 → ossify-0.3.2}/.pre-commit-config.yaml +0 -0
  10. {ossify-0.3.1 → ossify-0.3.2}/LICENSE +0 -0
  11. {ossify-0.3.1 → ossify-0.3.2}/README.md +0 -0
  12. {ossify-0.3.1 → ossify-0.3.2}/mkdocs.yml +0 -0
  13. {ossify-0.3.1 → ossify-0.3.2}/scripts/build_example_cell.py +0 -0
  14. {ossify-0.3.1 → ossify-0.3.2}/src/ossify/_sync/__init__.py +0 -0
  15. {ossify-0.3.1 → ossify-0.3.2}/src/ossify/_sync/base.py +0 -0
  16. {ossify-0.3.1 → ossify-0.3.2}/src/ossify/_sync/graph.py +0 -0
  17. {ossify-0.3.1 → ossify-0.3.2}/src/ossify/_sync/mapping.py +0 -0
  18. {ossify-0.3.1 → ossify-0.3.2}/src/ossify/_sync/mesh.py +0 -0
  19. {ossify-0.3.1 → ossify-0.3.2}/src/ossify/_sync/morph.py +0 -0
  20. {ossify-0.3.1 → ossify-0.3.2}/src/ossify/_sync/points.py +0 -0
  21. {ossify-0.3.1 → ossify-0.3.2}/src/ossify/_sync/table.py +0 -0
  22. {ossify-0.3.1 → ossify-0.3.2}/src/ossify/algorithms.py +0 -0
  23. {ossify-0.3.1 → ossify-0.3.2}/src/ossify/base.py +0 -0
  24. {ossify-0.3.1 → ossify-0.3.2}/src/ossify/compartment_models/minnie65_ds15_us0_bd0.json +0 -0
  25. {ossify-0.3.1 → ossify-0.3.2}/src/ossify/compartment_models/v1dd_ds15_us0_bd0.json +0 -0
  26. {ossify-0.3.1 → ossify-0.3.2}/src/ossify/compartment_models/xgb/minnie65_ds15_us0_bd0.ubj +0 -0
  27. {ossify-0.3.1 → ossify-0.3.2}/src/ossify/compartment_models/xgb/v1dd_ds15_us0_bd0.ubj +0 -0
  28. {ossify-0.3.1 → ossify-0.3.2}/src/ossify/compartments.py +0 -0
  29. {ossify-0.3.1 → ossify-0.3.2}/src/ossify/data_layers.py +0 -0
  30. {ossify-0.3.1 → ossify-0.3.2}/src/ossify/file_io.py +0 -0
  31. {ossify-0.3.1 → ossify-0.3.2}/src/ossify/graph_functions.py +0 -0
  32. {ossify-0.3.1 → ossify-0.3.2}/src/ossify/plot.py +0 -0
  33. {ossify-0.3.1 → ossify-0.3.2}/src/ossify/plot3d.py +0 -0
  34. {ossify-0.3.1 → ossify-0.3.2}/src/ossify/plot_utils.py +0 -0
  35. {ossify-0.3.1 → ossify-0.3.2}/src/ossify/structured_prediction.py +0 -0
  36. {ossify-0.3.1 → ossify-0.3.2}/src/ossify/sync_classes.py +0 -0
  37. {ossify-0.3.1 → ossify-0.3.2}/src/ossify/utils.py +0 -0
@@ -0,0 +1,51 @@
1
+ name: Publish to PyPI
2
+
3
+ on:
4
+ release:
5
+ types: [published]
6
+
7
+ jobs:
8
+ build:
9
+ runs-on: ubuntu-latest
10
+ steps:
11
+ - uses: actions/checkout@v7
12
+ - name: Install system dependencies for PyVista/VTK rendering
13
+ run: |
14
+ sudo apt-get update
15
+ sudo apt-get install -y --no-install-recommends \
16
+ libgl1 libglx-mesa0 libxrender1 libxkbcommon0 libdbus-1-3 \
17
+ libegl1 libosmesa6 xvfb
18
+ - name: Install uv
19
+ uses: astral-sh/setup-uv@v10.2.0
20
+ with:
21
+ python-version: "3.13"
22
+ - name: Check release tag matches package version
23
+ run: |
24
+ version=$(grep -m1 '^version = ' pyproject.toml | cut -d'"' -f2)
25
+ if [ "${GITHUB_REF_NAME}" != "v${version}" ]; then
26
+ echo "::error::Release tag ${GITHUB_REF_NAME} does not match pyproject version ${version}"
27
+ exit 1
28
+ fi
29
+ - name: Run tests
30
+ run: uv run --locked pytest tests
31
+ - name: Build
32
+ run: uv build
33
+ - uses: actions/upload-artifact@v7
34
+ with:
35
+ name: dist
36
+ path: dist/
37
+
38
+ publish:
39
+ needs: build
40
+ runs-on: ubuntu-latest
41
+ environment:
42
+ name: pypi
43
+ url: https://pypi.org/p/ossify
44
+ permissions:
45
+ id-token: write
46
+ steps:
47
+ - uses: actions/download-artifact@v8
48
+ with:
49
+ name: dist
50
+ path: dist/
51
+ - uses: pypa/gh-action-pypi-publish@release/v1
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.5
2
2
  Name: ossify
3
- Version: 0.3.1
3
+ Version: 0.3.2
4
4
  Summary: Mesh and skeleton analysis
5
5
  Author-email: Casey Schneider-Mizell <caseysm@gmail.com>
6
6
  License-File: LICENSE
@@ -6,7 +6,7 @@ build-backend = "hatchling.build"
6
6
  allow-direct-references = true
7
7
  [project]
8
8
  name = "ossify"
9
- version = "0.3.1"
9
+ version = "0.3.2"
10
10
  description = "Mesh and skeleton analysis"
11
11
  readme = "README.md"
12
12
  requires-python = ">=3.11"
@@ -95,7 +95,7 @@ default-groups = ["dev", "docs", "lint", "profile", "viz"]
95
95
 
96
96
 
97
97
  [tool.bumpversion]
98
- current_version = "0.3.1"
98
+ current_version = "0.3.2"
99
99
  parse = "(?P<major>\\d+)\\.(?P<minor>\\d+)\\.(?P<patch>\\d+)"
100
100
  serialize = ["{major}.{minor}.{patch}"]
101
101
  regex = false
@@ -5,7 +5,7 @@ from .base import *
5
5
  from .file_io import *
6
6
  from .translate import *
7
7
 
8
- __version__ = "0.3.1"
8
+ __version__ = "0.3.2"
9
9
 
10
10
 
11
11
  def __getattr__(name):
@@ -508,6 +508,11 @@ def fetch_frames_batch(
508
508
  not fetched (e.g. synapses off) are ``None``.
509
509
  """
510
510
  root_ids = [int(r) for r in root_ids]
511
+ if not root_ids:
512
+ # Nothing to fetch. Never issue a pooled query with an empty root-id filter: the
513
+ # materialization server rejects it with a misleading 500 ("ALL root id filters
514
+ # passed ([]) were invalid").
515
+ return {}
511
516
  if reference_suffixes is None:
512
517
  reference_suffixes = {}
513
518
  results: dict[int, dict] = {
@@ -660,6 +665,8 @@ def load_cell_batch_from_client(
660
665
  f"{len(invalid_ids)} root id(s) not valid at {ts}: {invalid_ids[:5]}"
661
666
  + (" ..." if len(invalid_ids) > 5 else "")
662
667
  )
668
+ if not valid_ids:
669
+ return {}
663
670
 
664
671
  # 2. Skeletons: one cached bulk download (chunked at the cached-bulk cap) to obtain lvl2_ids,
665
672
  # then injected into assembly. Assumes a prior generate_bulk_skeletons_async pre-pass.
@@ -677,6 +684,9 @@ def load_cell_batch_from_client(
677
684
  f"{no_skeleton[:5]}" + (" ..." if len(no_skeleton) > 5 else "")
678
685
  )
679
686
  valid_ids = [r for r in valid_ids if r in sk_by_root]
687
+ if not valid_ids:
688
+ # Every valid root lacked a cached skeleton (only reachable with skip_invalid=True).
689
+ return {}
680
690
  lvl2_ids_by_root = {r: sk_by_root[r]["lvl2_ids"] for r in valid_ids}
681
691
 
682
692
  # 3. Pooled synapse + L2 fetch.
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes