Skip to content

Commit

Permalink
Sc 38 release (#75)
Browse files Browse the repository at this point in the history
* SC_38 rename

* SC_38 rename

* update notebooks

* SC_38 release

* SC_38 release

* SC_38 release

* SC_38 prepare release

* SC_38 prepare release
  • Loading branch information
ArneDefauw authored Dec 9, 2024
1 parent 52591b9 commit 5f6dd4d
Show file tree
Hide file tree
Showing 192 changed files with 1,800 additions and 1,721 deletions.
42 changes: 42 additions & 0 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: build

on:
push:
branches:
- main
pull_request:
branches: [main]

jobs:
build:
runs-on: ubuntu-latest

steps:
- name: Checkout Code
uses: actions/checkout@v3

- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.12'
cache: "pip"
cache-dependency-path: "**/setup.cfg"

- name: Install Build Dependencies
run: |
python -m pip install --upgrade pip setuptools wheel build twine
- name: Build Package
run: |
python -m build
#- name: Upload Build Artifacts
# uses: actions/upload-artifact@v3
# with:
# name: dist-artifacts
# path: dist/


- name: Check Package
run: |
twine check --strict dist/*
31 changes: 31 additions & 0 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: Release

on:
release:
types: [published]

jobs:
release:
# requires that you have put your twine API key in your
# github secrets
runs-on: ubuntu-latest
if: contains(github.ref, 'tags')
steps:
- name: Checkout code
uses: actions/checkout@v3

- name: Set up Python 3.12
uses: actions/setup-python@v4
with:
python-version: "3.12"

- name: Install hatch
run: pip install hatch

- name: Build project for distribution
run: hatch build

- name: Publish a Python distribution to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
password: ${{ secrets.PYPI_API_TOKEN }}
29 changes: 15 additions & 14 deletions .github/workflows/run_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,18 @@ name: Run tests
on:
workflow_dispatch:

push:
branches:
- main
# skip automatic testing
#push:
# branches:
# - main

#pull_request:
# branches:
# - main
#pull_request:
# branches:
# - main

paths:
- "src/sparrow/**"
- ".github/workflows/run_tests.yml"
# paths:
# - "src/harpy/**"
# - ".github/workflows/run_tests.yml"

env:
CACHE_NUMBER: 1 # increase to reset cache manually
Expand All @@ -37,7 +38,7 @@ jobs:
with:
miniforge-variant: Mambaforge
miniforge-version: latest
activate-environment: napari-sparrow
activate-environment: harpy
use-mamba: true
python-version: ${{ matrix.python-version }}

Expand All @@ -58,17 +59,17 @@ jobs:
id: cache

- name: Update environment
run: mamba env update -n napari-sparrow -f environment.yml
run: mamba env update -n harpy -f environment.yml
if: steps.cache.outputs.cache-hit != 'true'

# this runs the platform-specific tests declared in tox.ini
- name: Test with tox
shell: bash -l {0}
run: |
conda activate napari-sparrow
conda activate harpy
pip install -e '.[testing]'
pip install tox tox-gh-actions
tox
pytest --ignore=src/harpy/_tests/test_widget.py --color=yes --cov=dummy --cov-config=pyproject.toml --cov-report=xml --cov-report=term-missing
env:
PLATFORM: ${{ matrix.os }}

Expand Down
11 changes: 6 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
<!-- These badges won't work while the GitHub repo is private:
[![License BSD-3](https://img.shields.io/pypi/l/napari-sparrow.svg?color=green)](https://github.com/saeyslab/napari-sparrow/raw/main/LICENSE)
[![PyPI](https://img.shields.io/pypi/v/napari-sparrow.svg?color=green)](https://pypi.org/project/napari-sparrow)
[![License BSD-3](https://img.shields.io/pypi/l/harpy.svg?color=green)](https://github.com/saeyslab/harpy/raw/main/LICENSE)
[![PyPI](https://img.shields.io/pypi/v/harpy.svg?color=green)](https://pypi.org/project/harpy)
[![tests](https://github.com/saeyslab/harpy/workflows/tests/badge.svg)](https://github.com/saeyslab/harpy/actions)
[![Python Version](https://img.shields.io/pypi/pyversions/napari-sparrow.svg?color=green)](https://python.org)
[![Python Version](https://img.shields.io/pypi/pyversions/harpy.svg?color=green)](https://python.org)
[![codecov](https://codecov.io/gh/saeyslab/harpy/graph/badge.svg?token=7UXMDWVYFZ)](https://codecov.io/gh/saeyslab/harpy)
[![napari hub](https://img.shields.io/endpoint?url=https://api.napari-hub.org/shields/napari-sparrow)](https://napari-hub.org/plugins/napari-sparrow)
[![napari hub](https://img.shields.io/endpoint?url=https://api.napari-hub.org/shields/harpy)](https://napari-hub.org/plugins/harpy)
-->

# **Harpy: single-cell spatial proteomics analysis that makes you happy** <img src="./docs/_static/img/logo.png" align ="right" alt="" width ="150"/>

![Build Status](https://github.com//saeyslab/harpy/actions/workflows/build.yaml/badge.svg)
[![documentation badge](https://readthedocs.org/projects/harpy/badge/?version=latest)](https://harpy.readthedocs.io/en/latest/)

Note: This package is still under very active development.
Expand Down Expand Up @@ -46,7 +47,7 @@ If you encounter any problems, please [file an issue] along with a detailed desc
[Cookiecutter]: https://github.com/audreyr/cookiecutter
[BSD-3]: http://opensource.org/licenses/BSD-3-Clause
[cookiecutter-napari-plugin]: https://github.com/napari/cookiecutter-napari-plugin
[file an issue]: https://github.com/saeyslab/napari-sparrow/issues
[file an issue]: https://github.com/saeyslab/harpy/issues
[napari]: https://github.com/napari/napari
[tox]: https://tox.readthedocs.io/en/latest/
[pip]: https://pypi.org/project/pip/
Expand Down
44 changes: 22 additions & 22 deletions docs/api.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@
Import Harpy as::
import sparrow as sp
import harpy as hp
.. module:: sparrow
.. module:: harpy
```

## IO
Expand All @@ -15,8 +15,8 @@ I/O.

```{eval-rst}
.. module:: sparrow.io
.. currentmodule:: sparrow
.. module:: harpy.io
.. currentmodule:: harpy
.. autosummary::
:toctree: generated
Expand All @@ -38,8 +38,8 @@ Operations on image and labels layers.

```{eval-rst}
.. module:: sparrow.im
.. currentmodule:: sparrow
.. module:: harpy.im
.. currentmodule:: harpy
.. autosummary::
:toctree: generated
Expand Down Expand Up @@ -76,8 +76,8 @@ Operations on shapes (polygons) layers.

```{eval-rst}
.. module:: sparrow.sh
.. currentmodule:: sparrow
.. module:: harpy.sh
.. currentmodule:: harpy
.. autosummary::
:toctree: generated
Expand All @@ -94,8 +94,8 @@ Operations on table (`AnnData` object) layers.

```{eval-rst}
.. module:: sparrow.tb
.. currentmodule:: sparrow
.. module:: harpy.tb
.. currentmodule:: harpy
.. autosummary::
:toctree: generated
Expand Down Expand Up @@ -126,8 +126,8 @@ Operations on points (`Dask` `DataFrame` object) layers.

```{eval-rst}
.. module:: sparrow.pt
.. currentmodule:: sparrow
.. module:: harpy.pt
.. currentmodule:: harpy
.. autosummary::
:toctree: generated
Expand All @@ -143,8 +143,8 @@ Plotting functions.

```{eval-rst}
.. module:: sparrow.pl
.. currentmodule:: sparrow
.. module:: harpy.pl
.. currentmodule:: harpy
.. autosummary::
:toctree: generated
Expand All @@ -161,8 +161,8 @@ Plotting functions.

```{eval-rst}
.. module:: sparrow.pl
.. currentmodule:: sparrow
.. module:: harpy.pl
.. currentmodule:: harpy
.. autosummary::
:toctree: generated
Expand All @@ -182,8 +182,8 @@ Plotting functions.

```{eval-rst}
.. module:: sparrow.pl
.. currentmodule:: sparrow
.. module:: harpy.pl
.. currentmodule:: harpy
.. autosummary::
:toctree: generated
Expand All @@ -204,8 +204,8 @@ Utility functions.

```{eval-rst}
.. module:: sparrow.utils
.. currentmodule:: sparrow
.. module:: harpy.utils
.. currentmodule:: harpy
.. autosummary::
:toctree: generated
Expand All @@ -219,8 +219,8 @@ Dataset loaders.

```{eval-rst}
.. module:: sparrow.datasets
.. currentmodule:: sparrow
.. module:: harpy.datasets
.. currentmodule:: harpy
.. autosummary::
:toctree: generated
Expand Down
2 changes: 1 addition & 1 deletion docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

# -- Project information -----------------------------------------------------

info = metadata("sparrow")
info = metadata("harpy-analysis")
project_name = info["Name"]
author = "SaeysLab"
copyright = f"{datetime.now():%Y}, {author}"
Expand Down
2 changes: 1 addition & 1 deletion docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ Please read our documentation to learn more.
```

The Harpy Python package described here builds on the spatial transcriptomics analysis tool [SPArrOW](https://github.com/saeyslab/napari-sparrow) and keeps the package name for compatibility.
The Harpy Python package described here builds on the spatial transcriptomics analysis tool [SPArrOW](https://github.com/saeyslab/napari-sparrow).

For spatial proteomics analysis, cite [the Harpy GitHub repository](https://github.com/saeyslab/harpy).

Expand Down
8 changes: 4 additions & 4 deletions docs/installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ mamba env update -f environment.yml --prune
conda activate harpy
```

If you plan to use the `Harpy` function `sp.im.tiling_correction`, please install `jax` and `basicpy`. On Mac and Linux, this can be done via `pip install ...`, on Windows you will have to run the following commands:
If you plan to use the `Harpy` function `harpy.im.tiling_correction`, please install `jax` and `basicpy`. On Mac and Linux, this can be done via `pip install ...`, on Windows you will have to run the following commands:

```bash
pip install "jax[cpu]" -f https://whls.blob.core.windows.net/unstable/index.html --use-deprecated legacy-resolver
Expand All @@ -35,19 +35,19 @@ pip install git+https://github.com/saeyslab/harpy.git
To use the plugin, run

```bash
pip install "git+https://github.com/saeyslab/harpy.git#egg=sparrow[plugin]"
pip install "git+https://github.com/saeyslab/harpy.git#egg=harpy[plugin]"
```

To run `Harpy` from the `cli`:

```bash
pip install "git+https://github.com/saeyslab/harpy.git#egg=sparrow[cli]"
pip install "git+https://github.com/saeyslab/harpy.git#egg=harpy[cli]"
```

To be able to run the unit tests:

```bash
pip install "git+https://github.com/saeyslab/harpy.git#egg=sparrow[testing]"
pip install "git+https://github.com/saeyslab/harpy.git#egg=harpy[testing]"
```


Expand Down
Loading

0 comments on commit 5f6dd4d

Please sign in to comment.