Skip to content

Fix codecov CI and update template #52

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 14, 2023
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
42 changes: 21 additions & 21 deletions .cruft.json
Original file line number Diff line number Diff line change
@@ -1,23 +1,23 @@
{
"template": "https://github.com/scverse/cookiecutter-scverse",
"commit": "57f6267716826dad73baba46dc3c00fe7262c459",
"checkout": "v0.1.4",
"context": {
"cookiecutter": {
"project_name": "spatialdata-plot",
"package_name": "spatialdata_plot",
"project_description": "A very interesting piece of code",
"author_full_name": "scverse",
"author_email": "scverse",
"github_user": "scverse",
"project_repo": "https://github.com/scverse/spatialdata-plot",
"license": "BSD 3-Clause License",
"_copy_without_render": [
".github/workflows/**.yaml",
"docs/_templates/autosummary/**.rst"
],
"_template": "https://github.com/scverse/cookiecutter-scverse"
}
},
"directory": null
"template": "https://github.com/scverse/cookiecutter-scverse",
"commit": "c21b82bf134f3a0f13db7482d4fb04ca1f562d59",
"checkout": "main",
"context": {
"cookiecutter": {
"project_name": "spatialdata-plot",
"package_name": "spatialdata_plot",
"project_description": "A very interesting piece of code",
"author_full_name": "scverse",
"author_email": "scverse",
"github_user": "scverse",
"project_repo": "https://github.com/scverse/spatialdata-plot",
"license": "BSD 3-Clause License",
"_copy_without_render": [
".github/workflows/**.yaml",
"docs/_templates/autosummary/**.rst"
],
"_template": "https://github.com/scverse/cookiecutter-scverse"
}
},
"directory": null
}
10 changes: 8 additions & 2 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,21 @@ on:
pull_request:
branches: [main]

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
package:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- name: Set up Python 3.10
uses: actions/setup-python@v2
uses: actions/setup-python@v4
with:
python-version: "3.10"
cache: "pip"
cache-dependency-path: "**/pyproject.toml"
- name: Install build dependencies
run: python -m pip install --upgrade pip wheel twine build
- name: Build package
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/sync.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -43,4 +43,4 @@ jobs:
manually merge these changes.**

For more information about the template sync, please refer to the
[template documentation](https://cookiecutter-scverse-instance.readthedocs.io/en/latest/developer_docs.html#automated-template-sync).
[template documentation](https://cookiecutter-scverse-instance.readthedocs.io/en/latest/template_usage.html#automated-template-sync).
4 changes: 4 additions & 0 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@ on:
pull_request:
branches: [main]

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
test:
runs-on: ${{ matrix.os }}
Expand Down
42 changes: 42 additions & 0 deletions .github/workflows/test.yaml.rej
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
diff a/.github/workflows/test.yaml b/.github/workflows/test.yaml (rejected hunks)
@@ -24,27 +28,17 @@ jobs:
PYTHON: ${{ matrix.python }}

steps:
- - uses: actions/checkout@v2
+ - uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python }}
- uses: actions/setup-python@v2
+ uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python }}
+ cache: "pip"
+ cache-dependency-path: "**/pyproject.toml"

- - name: Get pip cache dir
- id: pip-cache-dir
- run: |
- echo "::set-output name=dir::$(pip cache dir)"
- - name: Restore pip cache
- uses: actions/cache@v2
- with:
- path: ${{ steps.pip-cache-dir.outputs.dir }}
- key: pip-${{ runner.os }}-${{ env.pythonLocation }}-${{ hashFiles('**/pyproject.toml') }}
- restore-keys: |
- pip-${{ runner.os }}-${{ env.pythonLocation }}-
- name: Install test dependencies
run: |
python -m pip install --upgrade pip wheel
- pip install codecov
- name: Install dependencies
run: |
pip install ".[dev,test]"
@@ -56,7 +50,4 @@ jobs:
run: |
pytest -v --cov --color=yes
- name: Upload coverage
- env:
- CODECOV_NAME: ${{ matrix.python }}-${{ matrix.os }}
- run: |
- codecov --required --flags=unittests
+ uses: codecov/codecov-action@v3
5 changes: 4 additions & 1 deletion docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,15 @@

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

# NOTE: If you installed your project in editable mode, this might be stale.
# If this is the case, reinstall it to refresh the metadata
info = metadata("spatialdata-plot")
project_name = info["Name"]
author = info["Author"]
copyright = f"{datetime.now():%Y}, {author}."
version = info["Version"]
repository_url = f"https://github.com/scverse/{project_name}"
urls = dict(pu.split(", ") for pu in info.get_all("Project-URL"))
repository_url = urls["Source"]

# The full version, including alpha/beta/rc tags
release = info["Version"]
Expand Down
1 change: 1 addition & 0 deletions docs/contributing.md
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,7 @@ Please write documentation for new or changed features and use-cases. This proje
- [Numpy-style docstrings][numpydoc] (through the [napoloen][numpydoc-napoleon] extension).
- Jupyter notebooks as tutorials through [myst-nb][] (See [Tutorials with myst-nb](#tutorials-with-myst-nb-and-jupyter-notebooks))
- [Sphinx autodoc typehints][], to automatically reference annotated input and output types
- Citations (like {cite:p}`Virshup_2023`) can be included with [sphinxcontrib-bibtex](https://sphinxcontrib-bibtex.readthedocs.io/)

See the [scanpy developer docs](https://scanpy.readthedocs.io/en/latest/dev/documentation.html) for more information
on how to write documentation.
Expand Down
25 changes: 9 additions & 16 deletions docs/references.bib
Original file line number Diff line number Diff line change
@@ -1,17 +1,10 @@
@article{Wolf2018,
author = {Wolf, F. Alexander
and Angerer, Philipp
and Theis, Fabian J.},
title = {SCANPY: large-scale single-cell gene expression data analysis},
journal = {Genome Biology},
year = {2018},
month = {Feb},
day = {06},
volume = {19},
number = {1},
pages = {15},
abstract = {Scanpy is a scalable toolkit for analyzing single-cell gene expression data. It includes methods for preprocessing, visualization, clustering, pseudotime and trajectory inference, differential expression testing, and simulation of gene regulatory networks. Its Python-based implementation efficiently deals with data sets of more than one million cells (https://github.com/theislab/Scanpy). Along with Scanpy, we present AnnData, a generic class for handling annotated data matrices (https://github.com/theislab/anndata).},
issn = {1474-760X},
doi = {10.1186/s13059-017-1382-0},
url = {https://doi.org/10.1186/s13059-017-1382-0}
@article{Virshup_2023,
doi = {10.1038/s41587-023-01733-8},
url = {https://doi.org/10.1038%2Fs41587-023-01733-8},
year = 2023,
month = {apr},
publisher = {Springer Science and Business Media {LLC}},
author = {Isaac Virshup and Danila Bredikhin and Lukas Heumos and Giovanni Palla and Gregor Sturm and Adam Gayoso and Ilia Kats and Mikaela Koutrouli and Philipp Angerer and Volker Bergen and Pierre Boyeau and Maren Büttner and Gokcen Eraslan and David Fischer and Max Frank and Justin Hong and Michal Klein and Marius Lange and Romain Lopez and Mohammad Lotfollahi and Malte D. Luecken and Fidel Ramirez and Jeffrey Regier and Sergei Rybakov and Anna C. Schaar and Valeh Valiollah Pour Amiri and Philipp Weiler and Galen Xing and Bonnie Berger and Dana Pe'er and Aviv Regev and Sarah A. Teichmann and Francesca Finotello and F. Alexander Wolf and Nir Yosef and Oliver Stegle and Fabian J. Theis and},
title = {The scverse project provides a computational ecosystem for single-cell omics data analysis},
journal = {Nature Biotechnology}
}
11 changes: 11 additions & 0 deletions pyproject.toml.rej
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
diff a/pyproject.toml b/pyproject.toml (rejected hunks)
@@ -109,6 +109,9 @@ ignore = [
"D213",
]

+[tool.ruff.pydocstyle]
+convention = "numpy"
+
[tool.ruff.per-file-ignores]
"docs/*" = ["I"]
"tests/*" = ["D"]
10 changes: 10 additions & 0 deletions src/spatialdata_plot/pp/basic.py.rej
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
diff a/src/spatialdata_plot/pp/basic.py b/src/spatialdata_plot/pp/basic.py (rejected hunks)
@@ -2,7 +2,7 @@ from anndata import AnnData


def basic_preproc(adata: AnnData) -> int:
- """Run a basic preprocessing on the AnnData :cite:p:`Wolf2018` object.
+ """Run a basic preprocessing on the AnnData object.

Parameters
----------
10 changes: 10 additions & 0 deletions tests/test_basic.py.rej
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
diff a/tests/test_basic.py b/tests/test_basic.py (rejected hunks)
@@ -4,7 +4,7 @@ import spatialdata_plot


def test_package_has_version():
- spatialdata_plot.__version__
+ assert spatialdata_plot.__version__ is not None


@pytest.mark.skip(reason="This decorator should be removed when test passes.")