Skip to content

Commit

Permalink
Merge pull request #144 from Janelia-Trackathon-2023/pre-commit-ci-up…
Browse files Browse the repository at this point in the history
…date-config

ci(pre-commit.ci): autoupdate
  • Loading branch information
cmalinmayor authored Feb 6, 2024
2 parents 88752c4 + e3c751f commit 4c729d2
Show file tree
Hide file tree
Showing 8 changed files with 12 additions and 6 deletions.
8 changes: 4 additions & 4 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,23 +5,23 @@ ci:

repos:
- repo: https://github.com/crate-ci/typos
rev: v1.16.26
rev: v1.18.1
hooks:
- id: typos

- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.1.9
rev: v0.2.0
hooks:
- id: ruff
args: [--fix]

- repo: https://github.com/psf/black
rev: 23.12.1
rev: 24.1.1
hooks:
- id: black

- repo: https://github.com/abravalheri/validate-pyproject
rev: v0.15
rev: v0.16
hooks:
- id: validate-pyproject

Expand Down
1 change: 1 addition & 0 deletions src/traccuracy/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""package description."""

from importlib.metadata import PackageNotFoundError, version

try:
Expand Down
4 changes: 2 additions & 2 deletions src/traccuracy/_tracking_graph.py
Original file line number Diff line number Diff line change
Expand Up @@ -195,13 +195,13 @@ def __init__(
self.nodes_by_frame[frame].add(node)
# store node id in nodes_by_flag mapping
for node_flag in NodeFlag:
if node_flag in attrs and attrs[node_flag]:
if attrs.get(node_flag):
self.nodes_by_flag[node_flag].add(node)

# store edge id in edges_by_flag
for edge, attrs in self.graph.edges.items():
for edge_flag in EdgeFlag:
if edge_flag in attrs and attrs[edge_flag]:
if attrs.get(edge_flag):
self.edges_by_flag[edge_flag].add(edge)

# Store first and last frames for reference
Expand Down
1 change: 1 addition & 0 deletions src/traccuracy/loaders/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
Each loading function must return one TrackingGraph object which has a
track graph and optionally contains a corresponding segmentation.
"""

from ._ctc import _check_ctc, _get_node_attributes, _load_tiffs, load_ctc_data

__all__ = ["load_ctc_data", "_check_ctc", "_load_tiffs", "_get_node_attributes"]
1 change: 1 addition & 0 deletions src/traccuracy/matchers/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
While we specify ground truth and prediction, it is possible to
write a matching function that matches two arbitrary tracking solutions.
"""

from ._base import Matched
from ._compute_overlap import get_labels_with_overlap
from ._ctc import CTCMatcher
Expand Down
1 change: 1 addition & 0 deletions src/traccuracy/matchers/_compute_overlap.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
Licensed under The MIT License [see LICENSE for details]
Copyright (c) 2015 Microsoft
"""

from typing import Tuple

import numpy as np
Expand Down
1 change: 1 addition & 0 deletions src/traccuracy/metrics/_divisions.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
of the early division, by advancing along the graph to find nodes in the same frame
as the late division daughters.
"""

from __future__ import annotations

from typing import TYPE_CHECKING
Expand Down
1 change: 1 addition & 0 deletions src/traccuracy/metrics/_track_overlap.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
- TP is defined analogously, with T^g_j and T^p_j being swapped in the definition.
"""

from __future__ import annotations

from itertools import groupby, product
Expand Down

0 comments on commit 4c729d2

Please sign in to comment.