Skip to content

Commit 327dea2

Browse files
committed
Switch to pyproject, add requirements, remove docker
1 parent eb9b095 commit 327dea2

12 files changed

Lines changed: 1368 additions & 90 deletions

File tree

.github/workflows/binder.yaml

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

.github/workflows/test.yaml

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,24 +5,30 @@ on:
55
branches:
66
- master
77
pull_request:
8+
workflow_call:
89

910
jobs:
1011
build:
1112

12-
runs-on: ubuntu-latest
13+
runs-on: ${{ matrix.os }}
14+
strategy:
15+
fail-fast: false
16+
matrix:
17+
os: [ windows-latest, ubuntu-latest, macos-latest ]
18+
python-version: [ "3.8", "3.11" ]
1319

1420
steps:
1521
- uses: actions/checkout@v3
1622

1723
- name: Set up Python
1824
uses: actions/setup-python@v4
1925
with:
20-
python-version: '3.7'
26+
python-version: ${{ matrix.python-version }}
2127

2228
- name: Install dependencies
2329
run: |
2430
python -m pip install --upgrade pip
25-
pip install -r requirements.txt
31+
pip install .[dev]
2632
2733
- name: Test with pytest
2834
run: |

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,3 +16,5 @@ dist/
1616
# IPython notebooks
1717
.ipynb_checkpoints
1818

19+
# Virtual environment
20+
.venv

README.md

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,19 +18,23 @@ Python implementation of SAIBR: a simple, platform independent protocol for spec
1818

1919
## Tutorial notebook
2020

21-
Please see the [tutorial notebook](https://nbviewer.org/github/goehringlab/saibr_python/blob/master/scripts/SAIBRdemonstration.ipynb) for instructions on usage.
21+
As a first step, I would recommend checking out the [tutorial notebook](https://nbviewer.org/github/goehringlab/saibr_python/blob/master/scripts/SAIBRdemonstration.ipynb). This can be run in the cloud using Binder (please note that it may take several minutes to open the notebook):
2222

23-
To run interactively in the cloud with Binder, click here: [![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/goehringlab/saibr_python/HEAD?filepath=%2Fscripts/SAIBRdemonstration.ipynb)
23+
[![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/goehringlab/saibr_python/HEAD?filepath=%2Fscripts/SAIBRdemonstration.ipynb)
2424

25-
(The notebook may take a few minutes to open)
25+
To run locally, download the code and install the relevant requirements (requirements.txt) in a virtual environment.
2626

2727

2828
## Install instructions
2929

30-
To explore further and incorporate into your own analysis pipelines, you can install the package using pip:
30+
To explore further and incorporate into your own analysis pipelines, you can install the package from PyPI using pip:
3131

3232
pip install saibr
3333

34+
If you want to make changes to the code you can download/clone this folder, navigate to it, and run:
35+
36+
pip install -e .[dev]
37+
3438

3539
## Citation
3640

binder/Dockerfile

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

environment.yml

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

pyproject.toml

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
[build-system]
2+
requires = ["setuptools"]
3+
4+
[tool.setuptools]
5+
packages = ["saibr"]
6+
7+
[project]
8+
name = "saibr"
9+
description = "Python implementation of SAIBR: a tool for performing spectral autofluorescence correction on biological images"
10+
readme = "README.md"
11+
version = "0.1.6"
12+
license = {file = "LICENSE"}
13+
authors = [
14+
{ name = "Tom Bland", email = "tom_bland@hotmail.co.uk" },
15+
]
16+
dependencies = [
17+
"numpy",
18+
"matplotlib",
19+
"scipy",
20+
"ipywidgets",
21+
"scikit-learn",
22+
"scikit-image",
23+
"jupyter",
24+
"opencv-python",
25+
]
26+
27+
[project.urls]
28+
Documentation = "https://saibr.readthedocs.io/en/latest/"
29+
Source = "https://github.com/goehringlab/saibr_python"
30+
31+
[project.optional-dependencies]
32+
dev = [
33+
"pytest",
34+
"pre-commit",
35+
"black",
36+
"pip-tools",
37+
"pytest-cov",
38+
]
39+
40+
doc = [
41+
"sphinx_rtd_theme==1.0.0",
42+
]
43+

0 commit comments

Comments
 (0)