Skip to content

Commit 707375c

Browse files
authored
Fix codecov CI and update template (#52)
1 parent 96b3bba commit 707375c

File tree

11 files changed

+121
-41
lines changed

11 files changed

+121
-41
lines changed

.cruft.json

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,23 @@
11
{
2-
"template": "https://github.com/scverse/cookiecutter-scverse",
3-
"commit": "57f6267716826dad73baba46dc3c00fe7262c459",
4-
"checkout": "v0.1.4",
5-
"context": {
6-
"cookiecutter": {
7-
"project_name": "spatialdata-plot",
8-
"package_name": "spatialdata_plot",
9-
"project_description": "A very interesting piece of code",
10-
"author_full_name": "scverse",
11-
"author_email": "scverse",
12-
"github_user": "scverse",
13-
"project_repo": "https://github.com/scverse/spatialdata-plot",
14-
"license": "BSD 3-Clause License",
15-
"_copy_without_render": [
16-
".github/workflows/**.yaml",
17-
"docs/_templates/autosummary/**.rst"
18-
],
19-
"_template": "https://github.com/scverse/cookiecutter-scverse"
20-
}
21-
},
22-
"directory": null
2+
"template": "https://github.com/scverse/cookiecutter-scverse",
3+
"commit": "c21b82bf134f3a0f13db7482d4fb04ca1f562d59",
4+
"checkout": "main",
5+
"context": {
6+
"cookiecutter": {
7+
"project_name": "spatialdata-plot",
8+
"package_name": "spatialdata_plot",
9+
"project_description": "A very interesting piece of code",
10+
"author_full_name": "scverse",
11+
"author_email": "scverse",
12+
"github_user": "scverse",
13+
"project_repo": "https://github.com/scverse/spatialdata-plot",
14+
"license": "BSD 3-Clause License",
15+
"_copy_without_render": [
16+
".github/workflows/**.yaml",
17+
"docs/_templates/autosummary/**.rst"
18+
],
19+
"_template": "https://github.com/scverse/cookiecutter-scverse"
20+
}
21+
},
22+
"directory": null
2323
}

.github/workflows/build.yaml

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,21 @@ on:
66
pull_request:
77
branches: [main]
88

9+
concurrency:
10+
group: ${{ github.workflow }}-${{ github.ref }}
11+
cancel-in-progress: true
12+
913
jobs:
1014
package:
1115
runs-on: ubuntu-latest
1216
steps:
13-
- uses: actions/checkout@v2
17+
- uses: actions/checkout@v3
1418
- name: Set up Python 3.10
15-
uses: actions/setup-python@v2
19+
uses: actions/setup-python@v4
1620
with:
1721
python-version: "3.10"
22+
cache: "pip"
23+
cache-dependency-path: "**/pyproject.toml"
1824
- name: Install build dependencies
1925
run: python -m pip install --upgrade pip wheel twine build
2026
- name: Build package

.github/workflows/sync.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,4 +43,4 @@ jobs:
4343
manually merge these changes.**
4444
4545
For more information about the template sync, please refer to the
46-
[template documentation](https://cookiecutter-scverse-instance.readthedocs.io/en/latest/developer_docs.html#automated-template-sync).
46+
[template documentation](https://cookiecutter-scverse-instance.readthedocs.io/en/latest/template_usage.html#automated-template-sync).

.github/workflows/test.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,10 @@ on:
66
pull_request:
77
branches: [main]
88

9+
concurrency:
10+
group: ${{ github.workflow }}-${{ github.ref }}
11+
cancel-in-progress: true
12+
913
jobs:
1014
test:
1115
runs-on: ${{ matrix.os }}

.github/workflows/test.yaml.rej

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
diff a/.github/workflows/test.yaml b/.github/workflows/test.yaml (rejected hunks)
2+
@@ -24,27 +28,17 @@ jobs:
3+
PYTHON: ${{ matrix.python }}
4+
5+
steps:
6+
- - uses: actions/checkout@v2
7+
+ - uses: actions/checkout@v3
8+
- name: Set up Python ${{ matrix.python }}
9+
- uses: actions/setup-python@v2
10+
+ uses: actions/setup-python@v4
11+
with:
12+
python-version: ${{ matrix.python }}
13+
+ cache: "pip"
14+
+ cache-dependency-path: "**/pyproject.toml"
15+
16+
- - name: Get pip cache dir
17+
- id: pip-cache-dir
18+
- run: |
19+
- echo "::set-output name=dir::$(pip cache dir)"
20+
- - name: Restore pip cache
21+
- uses: actions/cache@v2
22+
- with:
23+
- path: ${{ steps.pip-cache-dir.outputs.dir }}
24+
- key: pip-${{ runner.os }}-${{ env.pythonLocation }}-${{ hashFiles('**/pyproject.toml') }}
25+
- restore-keys: |
26+
- pip-${{ runner.os }}-${{ env.pythonLocation }}-
27+
- name: Install test dependencies
28+
run: |
29+
python -m pip install --upgrade pip wheel
30+
- pip install codecov
31+
- name: Install dependencies
32+
run: |
33+
pip install ".[dev,test]"
34+
@@ -56,7 +50,4 @@ jobs:
35+
run: |
36+
pytest -v --cov --color=yes
37+
- name: Upload coverage
38+
- env:
39+
- CODECOV_NAME: ${{ matrix.python }}-${{ matrix.os }}
40+
- run: |
41+
- codecov --required --flags=unittests
42+
+ uses: codecov/codecov-action@v3

docs/conf.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,15 @@
1616

1717
# -- Project information -----------------------------------------------------
1818

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

2629
# The full version, including alpha/beta/rc tags
2730
release = info["Version"]

docs/contributing.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -142,6 +142,7 @@ Please write documentation for new or changed features and use-cases. This proje
142142
- [Numpy-style docstrings][numpydoc] (through the [napoloen][numpydoc-napoleon] extension).
143143
- Jupyter notebooks as tutorials through [myst-nb][] (See [Tutorials with myst-nb](#tutorials-with-myst-nb-and-jupyter-notebooks))
144144
- [Sphinx autodoc typehints][], to automatically reference annotated input and output types
145+
- Citations (like {cite:p}`Virshup_2023`) can be included with [sphinxcontrib-bibtex](https://sphinxcontrib-bibtex.readthedocs.io/)
145146

146147
See the [scanpy developer docs](https://scanpy.readthedocs.io/en/latest/dev/documentation.html) for more information
147148
on how to write documentation.

docs/references.bib

Lines changed: 9 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,10 @@
1-
@article{Wolf2018,
2-
author = {Wolf, F. Alexander
3-
and Angerer, Philipp
4-
and Theis, Fabian J.},
5-
title = {SCANPY: large-scale single-cell gene expression data analysis},
6-
journal = {Genome Biology},
7-
year = {2018},
8-
month = {Feb},
9-
day = {06},
10-
volume = {19},
11-
number = {1},
12-
pages = {15},
13-
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).},
14-
issn = {1474-760X},
15-
doi = {10.1186/s13059-017-1382-0},
16-
url = {https://doi.org/10.1186/s13059-017-1382-0}
1+
@article{Virshup_2023,
2+
doi = {10.1038/s41587-023-01733-8},
3+
url = {https://doi.org/10.1038%2Fs41587-023-01733-8},
4+
year = 2023,
5+
month = {apr},
6+
publisher = {Springer Science and Business Media {LLC}},
7+
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},
8+
title = {The scverse project provides a computational ecosystem for single-cell omics data analysis},
9+
journal = {Nature Biotechnology}
1710
}

pyproject.toml.rej

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
diff a/pyproject.toml b/pyproject.toml (rejected hunks)
2+
@@ -109,6 +109,9 @@ ignore = [
3+
"D213",
4+
]
5+
6+
+[tool.ruff.pydocstyle]
7+
+convention = "numpy"
8+
+
9+
[tool.ruff.per-file-ignores]
10+
"docs/*" = ["I"]
11+
"tests/*" = ["D"]

src/spatialdata_plot/pp/basic.py.rej

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
diff a/src/spatialdata_plot/pp/basic.py b/src/spatialdata_plot/pp/basic.py (rejected hunks)
2+
@@ -2,7 +2,7 @@ from anndata import AnnData
3+
4+
5+
def basic_preproc(adata: AnnData) -> int:
6+
- """Run a basic preprocessing on the AnnData :cite:p:`Wolf2018` object.
7+
+ """Run a basic preprocessing on the AnnData object.
8+
9+
Parameters
10+
----------

tests/test_basic.py.rej

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
diff a/tests/test_basic.py b/tests/test_basic.py (rejected hunks)
2+
@@ -4,7 +4,7 @@ import spatialdata_plot
3+
4+
5+
def test_package_has_version():
6+
- spatialdata_plot.__version__
7+
+ assert spatialdata_plot.__version__ is not None
8+
9+
10+
@pytest.mark.skip(reason="This decorator should be removed when test passes.")

0 commit comments

Comments
 (0)