pywarper 0.1.0__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.
- pywarper-0.1.0/.github/workflows/python-package.yml +45 -0
- pywarper-0.1.0/.github/workflows/python-publish.yml +70 -0
- pywarper-0.1.0/.gitignore +31 -0
- pywarper-0.1.0/PKG-INFO +46 -0
- pywarper-0.1.0/README.md +26 -0
- pywarper-0.1.0/notebooks/example.ipynb +266 -0
- pywarper-0.1.0/pyproject.toml +35 -0
- pywarper-0.1.0/pywarper/__init__.py +0 -0
- pywarper-0.1.0/pywarper/arbor.py +282 -0
- pywarper-0.1.0/pywarper/surface.py +693 -0
- pywarper-0.1.0/pywarper/utils.py +118 -0
- pywarper-0.1.0/tests/__init__.py +0 -0
- pywarper-0.1.0/tests/data/Image013-009_01_ChAT-BottomBand-Mike.txt +253 -0
- pywarper-0.1.0/tests/data/Image013-009_01_ChAT-TopBand-Mike.txt +228 -0
- pywarper-0.1.0/tests/data/Image013-009_01_raw_latest_Uygar.swc +5737 -0
- pywarper-0.1.0/tests/data/warpedArbor_jump.mat +0 -0
- pywarper-0.1.0/tests/test_arbor.py +44 -0
- pywarper-0.1.0/uv.lock +1912 -0
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
# This workflow will install Python dependencies, run tests and lint with a variety of Python versions
|
|
2
|
+
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python
|
|
3
|
+
|
|
4
|
+
name: Python package
|
|
5
|
+
|
|
6
|
+
on:
|
|
7
|
+
push:
|
|
8
|
+
branches: [ "main" ]
|
|
9
|
+
pull_request:
|
|
10
|
+
branches: [ "main" ]
|
|
11
|
+
|
|
12
|
+
jobs:
|
|
13
|
+
build:
|
|
14
|
+
|
|
15
|
+
runs-on: ubuntu-latest
|
|
16
|
+
strategy:
|
|
17
|
+
fail-fast: false
|
|
18
|
+
matrix:
|
|
19
|
+
python-version: ["3.9", "3.10", "3.11", "3.12"]
|
|
20
|
+
|
|
21
|
+
steps:
|
|
22
|
+
- uses: actions/checkout@v4
|
|
23
|
+
- name: Install SuiteSparse (required by scikit-sparse)
|
|
24
|
+
run: |
|
|
25
|
+
sudo apt-get update
|
|
26
|
+
sudo apt-get install -y libsuitesparse-dev
|
|
27
|
+
- name: Set up Python ${{ matrix.python-version }}
|
|
28
|
+
uses: actions/setup-python@v3
|
|
29
|
+
with:
|
|
30
|
+
python-version: ${{ matrix.python-version }}
|
|
31
|
+
- name: Install dependencies
|
|
32
|
+
run: |
|
|
33
|
+
python -m pip install --upgrade pip
|
|
34
|
+
python -m pip install flake8 pytest
|
|
35
|
+
python -m pip install .[scikit-sparse]
|
|
36
|
+
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
|
|
37
|
+
- name: Lint with flake8
|
|
38
|
+
run: |
|
|
39
|
+
# stop the build if there are Python syntax errors or undefined names
|
|
40
|
+
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
|
|
41
|
+
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
|
|
42
|
+
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
|
|
43
|
+
- name: Test with pytest
|
|
44
|
+
run: |
|
|
45
|
+
pytest
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
# This workflow will upload a Python Package to PyPI when a release is created
|
|
2
|
+
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python#publishing-to-package-registries
|
|
3
|
+
|
|
4
|
+
# This workflow uses actions that are not certified by GitHub.
|
|
5
|
+
# They are provided by a third-party and are governed by
|
|
6
|
+
# separate terms of service, privacy policy, and support
|
|
7
|
+
# documentation.
|
|
8
|
+
|
|
9
|
+
name: Upload Python Package
|
|
10
|
+
|
|
11
|
+
on:
|
|
12
|
+
release:
|
|
13
|
+
types: [published]
|
|
14
|
+
|
|
15
|
+
permissions:
|
|
16
|
+
contents: read
|
|
17
|
+
|
|
18
|
+
jobs:
|
|
19
|
+
release-build:
|
|
20
|
+
runs-on: ubuntu-latest
|
|
21
|
+
|
|
22
|
+
steps:
|
|
23
|
+
- uses: actions/checkout@v4
|
|
24
|
+
|
|
25
|
+
- uses: actions/setup-python@v5
|
|
26
|
+
with:
|
|
27
|
+
python-version: "3.x"
|
|
28
|
+
|
|
29
|
+
- name: Build release distributions
|
|
30
|
+
run: |
|
|
31
|
+
# NOTE: put your own distribution build steps here.
|
|
32
|
+
python -m pip install build
|
|
33
|
+
python -m build
|
|
34
|
+
|
|
35
|
+
- name: Upload distributions
|
|
36
|
+
uses: actions/upload-artifact@v4
|
|
37
|
+
with:
|
|
38
|
+
name: release-dists
|
|
39
|
+
path: dist/
|
|
40
|
+
|
|
41
|
+
pypi-publish:
|
|
42
|
+
runs-on: ubuntu-latest
|
|
43
|
+
needs:
|
|
44
|
+
- release-build
|
|
45
|
+
permissions:
|
|
46
|
+
# IMPORTANT: this permission is mandatory for trusted publishing
|
|
47
|
+
id-token: write
|
|
48
|
+
|
|
49
|
+
# Dedicated environments with protections for publishing are strongly recommended.
|
|
50
|
+
# For more information, see: https://docs.github.com/en/actions/deployment/targeting-different-environments/using-environments-for-deployment#deployment-protection-rules
|
|
51
|
+
environment:
|
|
52
|
+
name: pypi
|
|
53
|
+
# OPTIONAL: uncomment and update to include your PyPI project URL in the deployment status:
|
|
54
|
+
# url: https://pypi.org/p/YOURPROJECT
|
|
55
|
+
#
|
|
56
|
+
# ALTERNATIVE: if your GitHub Release name is the PyPI project version string
|
|
57
|
+
# ALTERNATIVE: exactly, uncomment the following line instead:
|
|
58
|
+
# url: https://pypi.org/project/YOURPROJECT/${{ github.event.release.name }}
|
|
59
|
+
|
|
60
|
+
steps:
|
|
61
|
+
- name: Retrieve release distributions
|
|
62
|
+
uses: actions/download-artifact@v4
|
|
63
|
+
with:
|
|
64
|
+
name: release-dists
|
|
65
|
+
path: dist/
|
|
66
|
+
|
|
67
|
+
- name: Publish release distributions to PyPI
|
|
68
|
+
uses: pypa/gh-action-pypi-publish@release/v1
|
|
69
|
+
with:
|
|
70
|
+
packages-dir: dist/
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
# Byte-compiled / optimized / DLL files
|
|
2
|
+
__pycache__/
|
|
3
|
+
*.py[cod]
|
|
4
|
+
*$py.class
|
|
5
|
+
.pytest_cache
|
|
6
|
+
|
|
7
|
+
# Distribution / packaging
|
|
8
|
+
build/
|
|
9
|
+
dist/
|
|
10
|
+
*.egg-info/
|
|
11
|
+
*.egg
|
|
12
|
+
|
|
13
|
+
# Environments
|
|
14
|
+
.env
|
|
15
|
+
.venv
|
|
16
|
+
env/
|
|
17
|
+
venv/
|
|
18
|
+
|
|
19
|
+
# Jupyter Notebook
|
|
20
|
+
.ipynb_checkpoints
|
|
21
|
+
|
|
22
|
+
# macOS
|
|
23
|
+
.DS_Store
|
|
24
|
+
|
|
25
|
+
# Editor directories and files
|
|
26
|
+
.idea/
|
|
27
|
+
.vscode/
|
|
28
|
+
*.swp
|
|
29
|
+
*.swo
|
|
30
|
+
|
|
31
|
+
dev/
|
pywarper-0.1.0/PKG-INFO
ADDED
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: pywarper
|
|
3
|
+
Version: 0.1.0
|
|
4
|
+
Summary: Conformal mapping-based warping of neuronal arbor morphologies.
|
|
5
|
+
Requires-Python: >=3.9.0
|
|
6
|
+
Requires-Dist: numpy>=2.0.2
|
|
7
|
+
Requires-Dist: pandas>=2.2.3
|
|
8
|
+
Requires-Dist: pygridfit>=0.1.4
|
|
9
|
+
Requires-Dist: scipy>=1.13.1
|
|
10
|
+
Requires-Dist: watermark>=2.5.0
|
|
11
|
+
Provides-Extra: dev
|
|
12
|
+
Requires-Dist: maturin; extra == 'dev'
|
|
13
|
+
Requires-Dist: pytest; extra == 'dev'
|
|
14
|
+
Requires-Dist: ruff; extra == 'dev'
|
|
15
|
+
Requires-Dist: twine; extra == 'dev'
|
|
16
|
+
Provides-Extra: scikit-sparse
|
|
17
|
+
Requires-Dist: pygridfit[scikit-sparse]>=0.1.4; extra == 'scikit-sparse'
|
|
18
|
+
Requires-Dist: scikit-sparse>=0.4.15; extra == 'scikit-sparse'
|
|
19
|
+
Description-Content-Type: text/markdown
|
|
20
|
+
|
|
21
|
+
# pywarper
|
|
22
|
+
|
|
23
|
+
`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).
|
|
24
|
+
|
|
25
|
+
## Installation
|
|
26
|
+
|
|
27
|
+
```bash
|
|
28
|
+
git clone https://github.com/berenslab/pywarper.git
|
|
29
|
+
pip install -e pywarper
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
By default, `pywarper` uses `scipy.sparse.linalg.spsolve` to solve sparse matrices, which can be slow. For faster performance, you can manually install [scikit-sparse](https://github.com/scikit-sparse/scikit-sparse), as it requires additional dependencies:
|
|
33
|
+
|
|
34
|
+
```bash
|
|
35
|
+
# mac
|
|
36
|
+
brew install suite-sparse
|
|
37
|
+
|
|
38
|
+
# debian
|
|
39
|
+
sudo apt-get install libsuitesparse-dev
|
|
40
|
+
|
|
41
|
+
pip install -e pywarper[scikit-sparse]
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
## Usage
|
|
45
|
+
|
|
46
|
+
See the [example](https://github.com/berenslab/pywarper/blob/main/notebooks/example.ipynb) notebook for usage.
|
pywarper-0.1.0/README.md
ADDED
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
# pywarper
|
|
2
|
+
|
|
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).
|
|
4
|
+
|
|
5
|
+
## Installation
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
git clone https://github.com/berenslab/pywarper.git
|
|
9
|
+
pip install -e pywarper
|
|
10
|
+
```
|
|
11
|
+
|
|
12
|
+
By default, `pywarper` uses `scipy.sparse.linalg.spsolve` to solve sparse matrices, which can be slow. For faster performance, you can manually install [scikit-sparse](https://github.com/scikit-sparse/scikit-sparse), as it requires additional dependencies:
|
|
13
|
+
|
|
14
|
+
```bash
|
|
15
|
+
# mac
|
|
16
|
+
brew install suite-sparse
|
|
17
|
+
|
|
18
|
+
# debian
|
|
19
|
+
sudo apt-get install libsuitesparse-dev
|
|
20
|
+
|
|
21
|
+
pip install -e pywarper[scikit-sparse]
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
## Usage
|
|
25
|
+
|
|
26
|
+
See the [example](https://github.com/berenslab/pywarper/blob/main/notebooks/example.ipynb) notebook for usage.
|