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
43 changes: 0 additions & 43 deletions .github/workflows/actions_testing.yml

This file was deleted.

35 changes: 35 additions & 0 deletions .github/workflows/pr.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: Lint and Test

on: pull_request

jobs:
lint:
name: Lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: psf/black@stable
with:
src: "viscy"
options: "--check --verbose"
- uses: chartboost/ruff-action@v1
with:
src: "viscy"

test:
needs: [lint]
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.9", "3.10"]
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install ".[metrics,dev]"
- name: Test with pytest
run: pytest -v
9 changes: 9 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# Contributing to viscy

## Testing

Run tests with `pytest`:

```sh
pytest
```
15 changes: 10 additions & 5 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@ build-backend = "setuptools.build_meta"
name = "viscy"
description = "Learning vision for cells"
readme = "README.md"
requires-python = ">=3.9"
# cannot build on 3.11 due to https://github.com/cheind/py-lapsolver/pull/18
requires-python = ">=3.9,!=3.11"
license = { file = "LICENSE" }
authors = [{ name = "CZ Biohub SF", email = "compmicro@czbiohub.org" }]
dependencies = [
Expand All @@ -29,7 +30,7 @@ metrics = [
"scikit-learn>=1.1.3",
"scipy>=1.8.0",
]
dev = ["profilehooks", "onnxruntime"]
dev = ["pytest", "hypothesis", "profilehooks", "onnxruntime"]

[project.scripts]
viscy = "viscy.cli.cli:main"
Expand All @@ -38,8 +39,12 @@ viscy = "viscy.cli.cli:main"
write_to = "viscy/_version.py"

[tool.black]
src = ["viscy"]
line-length = 88

[tool.isort]
profile = "black"
line_length = 88
[tool.ruff]
src = ["viscy", "tests"]
extend-select = ["I001"]

[tool.ruff.isort]
known-first-party = ["viscy"]
Empty file added tests/ conftest.py
Empty file.
2 changes: 1 addition & 1 deletion tests/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
"""Tests for viscy"""
"""Tests for viscy"""
175 changes: 0 additions & 175 deletions tests/cli/inference_script_tests.py

This file was deleted.

Loading