Skip to content

Commit a145a4c

Browse files
authored
Merge pull request #8 from berenslab/better_api
Better APIs
2 parents b12f821 + 15e9715 commit a145a4c

File tree

11 files changed

+565
-399
lines changed

11 files changed

+565
-399
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# pywarper
22

3-
`pywarper` is a Python package for conformal mapping-based warping of neuronal arbor morphologies, based on the [MATLAB implementations](https://github.com/uygarsumbul/rgc) (Sümbül, et al. 2014).
3+
`pywarper` is a Python package for conformal mapping-based warping of neuronal morphologies, based on the [MATLAB implementations](https://github.com/uygarsumbul/rgc) (Sümbül, et al. 2014).
44

55
![](.github/banner.png)
66

notebooks/example.api.high.ipynb

Lines changed: 131 additions & 58 deletions
Large diffs are not rendered by default.

notebooks/example.api.low.ipynb

Lines changed: 48 additions & 41 deletions
Large diffs are not rendered by default.

pyproject.toml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,16 +4,16 @@ build-backend = "hatchling.build"
44

55
[project]
66
name = "pywarper"
7-
version = "0.1.10"
8-
description = "Conformal mapping-based warping of neuronal arbor morphologies."
7+
version = "0.2.0"
8+
description = "Conformal mapping-based warping of neuronal morphologies."
99
authors = []
1010
requires-python = ">=3.10.0"
1111
dependencies = [
1212
"alphashape>=1.3.1",
1313
"numpy>=2.2.0",
1414
"pygridfit>=0.1.5",
1515
"scipy>=1.15.0",
16-
"skeliner>=0.1.3",
16+
"skeliner>=0.1.6",
1717
"watermark>=2.5.0",
1818
]
1919
license = "GPL-3.0-or-later"

pywarper/__init__.py

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,10 @@
1-
from .warper import Warper
1+
from importlib.metadata import PackageNotFoundError, version
22

3-
__all__ = ["Warper"]
3+
from .warpers import Warper
4+
5+
__all__ = ["Warper"]
6+
7+
try:
8+
__version__ = version(__name__)
9+
except PackageNotFoundError:
10+
__version__ = "0.0.0.dev0"

pywarper/surface.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,9 @@
4444
)
4545
print(_WARN_MSG)
4646

47+
from importlib import metadata as _metadata
48+
49+
_PYWARPER_VERSION = _metadata.version("pywarper")
4750

4851
def fit_sac_surface(
4952
x: np.ndarray,
@@ -775,5 +778,7 @@ def build_mapping(
775778
"sampled_y_idx": sampled_y_idx, # formerly `thisy`
776779
"on_sac_surface": on_sac_surface, # formerly `thisVZminmesh`
777780
"off_sac_surface": off_sac_surface, # formerly `thisVZmaxmesh`
778-
"n_anchors": n_anchors
781+
"n_anchors": n_anchors,
782+
"conformal_jump": conformal_jump,
783+
"meta": {"mapped_at": time.strftime("%Y-%m-%d %H:%M:%S"), "pywarper_version": _PYWARPER_VERSION}
779784
}

pywarper/warper.py

Lines changed: 0 additions & 198 deletions
This file was deleted.

0 commit comments

Comments
 (0)