Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 26 additions & 0 deletions .github/workflows/pr-tag.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: Bump version
on:
pull_request:
types:
- closed
branches:
- master

jobs:
build:
if: github.event.pull_request.merged == true
runs-on: ubuntu-22.04
permissions:
contents: write
steps:
- uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.merge_commit_sha }}
fetch-depth: '0'

- name: Bump version and push tag
uses: anothrNick/github-tag-action@v1 # Don't use @master or @v1 unless you're happy to test the latest version
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # if you don't want to set write permissions use a PAT token
TAG_PREFIX: v
DEFAULT_BUMP: patch
2 changes: 1 addition & 1 deletion python/ouroboros/helpers/memory_usage.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ def calculate_gigabytes_from_dimensions(shape: tuple[int], dtype: np.dtype) -> f
num_elements = np.prod(shape)

# Calculate the total number of bytes
num_bytes = np.multiply(num_elements, dtype_size, dtype=np.float64)
num_bytes = np.multiply(num_elements, dtype_size, dtype=np.uint64)

return num_bytes / GIGABYTE

Expand Down
1 change: 1 addition & 0 deletions python/ouroboros/helpers/volume_cache.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ def __init__(
flush_cache=FLUSH_CACHE,
) -> None:
self.bounding_boxes = bounding_boxes

self.link_rects = link_rects
self.cv = cloud_volume_interface
self.mip = mip
Expand Down
7 changes: 3 additions & 4 deletions python/ouroboros/pipeline/slice_parallel_pipeline.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,8 +85,6 @@ def _process(self, input_data: tuple[any]) -> None | str:
"unit": "um"
}

print(f"Resolution: {volume_cache.get_resolution_um()} | {resolution}")

# Determine the dimensions of the image
has_color_channels = volume_cache.has_color_channels()
num_color_channels = (
Expand All @@ -105,7 +103,7 @@ def _process(self, input_data: tuple[any]) -> None | str:
output_file_path,
temp_data,
software="ouroboros",
resolution=resolution[:2], # XY Resolution
resolution=resolution[:2], # XY Resolution
resolutionunit=resolutionunit,
photometric=(
"rgb"
Expand Down Expand Up @@ -227,8 +225,9 @@ def thread_worker_iterative(
volume_cache, volumes_range, data_queue, single_thread=False
):
for i in volumes_range:
# Create a packet of data to process
# Create a packet of data to process - Make the threading check make more sense.
data = volume_cache.create_processing_data(i, parallel=single_thread)

data_queue.put(data)

# Remove the volume from the cache after the packet is created
Expand Down
1 change: 0 additions & 1 deletion python/ouroboros/pipeline/slices_geom_pipeline.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
from pydantic import BaseModel
from ouroboros.helpers.coordinates import convert_points_between_volumes
from ouroboros.helpers.slice import calculate_slice_rects
from ouroboros.helpers.spline import Spline
Expand Down
897 changes: 61 additions & 836 deletions python/poetry.lock

Large diffs are not rendered by default.

7 changes: 4 additions & 3 deletions python/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -24,15 +24,16 @@ tifffile = "^2024.6.18"
pydantic = "^2.7.4"
tqdm = "^4.66.4"
imagecodecs = "^2024.6.1"
fastapi = "^0.111.0"
fastapi = "^0.115.0"
asyncio = "^3.4.3"
uuid = "^1.30"
sse-starlette = "^2.1.2"
sse-starlette = "^2.3.2"

[tool.poetry.group.dev.dependencies]
pytest = "^8.2.2"
pytest-cov = "^6.1.1"
pyinstaller = "^6.8.0"
pyinstaller = "^6.13.0"
setuptools = "^78.1.1"
coverage = "^7.6.0"

[build-system]
Expand Down