Skip to content

Commit 5eb97cb

Browse files
authored
Switch to scverse cookiecutter template (#402)
* Add tests for databases and fix IEDB Despite sticking to v3 version number, IEDB have updated their file format * BCR and TCR are now in separate files * the csv header has changed. Names are different, and there are now *two* rows representing the header. * rename to src * update readme * WIP * update pyproject.toml * add changelog * fix tests * apply pre-commit autofixes * update pre-commit file * clean up sphinx modules * Switch to ipynb tutorials for now * WIP docs * WIP docs * WIP docs * update CI * update conda deps * Add action to test notebook * add RTD config * clean up imports in ddatasets * add dependency for coverage * CI * CI * doc fixes * CI * CI * get rid of raw cells in IO tutorial * CI * convert raw cells in 3k tutorial * bump tutorials * debug rtd * Revert "debug rtd" This reverts commit 3b5ef86. * debug rtd * debug rtd * fix spacing * exclude a few ruff warnings * update editorconfig * fix blacken-docs pre-commit * Add cruft.json * update target versions for black/ruff * update README * sphinx fail on warning * debug rtd * debug rtd * debug rtd * debug RTD
1 parent 2854ab8 commit 5eb97cb

File tree

157 files changed

+49531
-46189
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

157 files changed

+49531
-46189
lines changed

Diff for: .conda/meta.yaml

+4-8
Original file line numberDiff line numberDiff line change
@@ -16,15 +16,12 @@ build:
1616

1717
requirements:
1818
host:
19-
- python >=3.8
20-
- pip!=22.1 # https://github.com/pypa/pip/issues/11110
21-
- flit
22-
- setuptools_scm
23-
- pytoml
24-
- importlib_metadata
19+
- python >=3.9
20+
- hatchling
21+
- hatch-vcs
2522

2623
run:
27-
- python >=3.8
24+
- python >=3.9
2825
- anndata >=0.9
2926
- awkward >=2.1.0
3027
- mudata >=0.2.2
@@ -60,7 +57,6 @@ test:
6057
- scirpy
6158
commands:
6259
- pytest --pyargs scirpy -m "not extra"
63-
- cd docs && jupytext --execute tutorials/tutorial_3k_tcr.md
6460

6561
about:
6662
home: https://scverse.org/scirpy

Diff for: .cruft.json

+23
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
{
2+
"template": "https://github.com/scverse/cookiecutter-scverse",
3+
"commit": "6a4338030e0c83a9034d607ed66abeff83e18840",
4+
"checkout": null,
5+
"context": {
6+
"cookiecutter": {
7+
"project_name": "scirpy",
8+
"package_name": "scirpy",
9+
"project_description": "A very interesting piece of code",
10+
"author_full_name": "Gregor Sturm",
11+
"author_email": "[email protected]",
12+
"github_user": "grst",
13+
"project_repo": "https://github.com/scverse/scirpy",
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
23+
}

Diff for: .editorconfig

+9-6
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,18 @@
11
root = true
22

33
[*]
4-
charset = utf-8
4+
indent_style = space
5+
indent_size = 4
56
end_of_line = lf
6-
insert_final_newline = true
7+
charset = utf-8
78
trim_trailing_whitespace = true
8-
max_line_length = 88
9+
insert_final_newline = true
910

10-
[*.py]
11-
indent_size = 4
12-
indent_style = space
11+
[*.{yml,yaml}]
12+
indent_size = 2
13+
14+
[.cruft.json]
15+
indent_size = 2
1316

1417
[Makefile]
1518
indent_style = tab

Diff for: .gitattributes

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
# Pickle files (for testing) should always have UNIX line endings.
1+
# Pickle files (for testing) should always have UNIX line endings.
22
*.pkl text eol=lf

Diff for: .github/ISSUE_TEMPLATE/bug_report.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,9 @@ A clear and concise description of what you expected to happen.
2020

2121
**System**
2222

23-
- OS: [e.g. Windows 10]
24-
- Python version [e.g. 3.9]
25-
- Versions of libraries involved [e.g. AnnData 0.8.0, Scirpy 0.12.0]
23+
- OS: [e.g. Windows 10]
24+
- Python version [e.g. 3.9]
25+
- Versions of libraries involved [e.g. AnnData 0.8.0, Scirpy 0.12.0]
2626

2727
**Additional context**
2828
Add any other context about the problem here.

Diff for: .github/ISSUE_TEMPLATE/config.yml

+5-5
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
blank_issues_enabled: true
2-
contact_links:
3-
- name: Scverse Community Forum
4-
url: https://discourse.scverse.org/
5-
about: If you have questions about “How to do X”, please ask them here.
1+
blank_issues_enabled: true
2+
contact_links:
3+
- name: Scverse Community Forum
4+
url: https://discourse.scverse.org/
5+
about: If you have questions about “How to do X”, please ask them here.

Diff for: .github/workflows/build.yaml

+29
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
name: Check Build
2+
3+
on:
4+
push:
5+
branches: [main]
6+
pull_request:
7+
branches: [main]
8+
9+
concurrency:
10+
group: ${{ github.workflow }}-${{ github.ref }}
11+
cancel-in-progress: true
12+
13+
jobs:
14+
package:
15+
runs-on: ubuntu-latest
16+
steps:
17+
- uses: actions/checkout@v3
18+
- name: Set up Python 3.10
19+
uses: actions/setup-python@v4
20+
with:
21+
python-version: "3.10"
22+
cache: "pip"
23+
cache-dependency-path: "**/pyproject.toml"
24+
- name: Install build dependencies
25+
run: python -m pip install --upgrade pip wheel twine build
26+
- name: Build package
27+
run: python -m build
28+
- name: Check package
29+
run: twine check --strict dist/*.whl

Diff for: .github/workflows/conda.yml renamed to .github/workflows/conda.yaml

+15-9
Original file line numberDiff line numberDiff line change
@@ -2,28 +2,34 @@ name: conda
22

33
on:
44
push:
5-
branches: [master]
5+
branches: [main]
66
pull_request:
7-
branches: [master]
7+
branches: [main]
88

99
concurrency:
1010
group: ${{ github.workflow }}-${{ github.ref }}
1111
cancel-in-progress: true
1212

1313
jobs:
14-
tests:
15-
if: "!contains(github.event.head_commit.message, 'skip ci')"
14+
test:
1615
runs-on: ${{ matrix.os }}
16+
defaults:
17+
run:
18+
shell: bash -e {0} # -e to fail on error
19+
1720
strategy:
1821
fail-fast: false
1922
matrix:
20-
python-version: ["3.8", "3.9", "3.10"]
21-
os: ["ubuntu-latest", "macos-latest"]
23+
include:
24+
- os: ubuntu-latest
25+
python: "3.9"
26+
27+
env:
28+
OS: ${{ matrix.os }}
29+
PYTHON: ${{ matrix.python }}
2230

2331
steps:
24-
- uses: actions/checkout@v2
25-
with:
26-
fetch-depth: 0 # required for setuptools-scm
32+
- uses: actions/checkout@v3
2733

2834
- name: Setup Miniconda
2935
uses: conda-incubator/setup-miniconda@v2

Diff for: .github/workflows/docs.yml

-114
This file was deleted.

Diff for: .github/workflows/pythonpublish.yml

-31
This file was deleted.

Diff for: .github/workflows/release.yaml

+30
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
name: Release
2+
3+
on:
4+
push:
5+
tags:
6+
- "*.*.*"
7+
8+
jobs:
9+
release:
10+
name: Release
11+
runs-on: ubuntu-latest
12+
steps:
13+
- name: Checkout code
14+
uses: actions/checkout@v3
15+
16+
- name: Set up Python 3.10
17+
uses: actions/setup-python@v4
18+
with:
19+
python-version: "3.10"
20+
21+
- name: Install hatch
22+
run: pip install hatch
23+
24+
- name: Build project for distribution
25+
run: hatch build
26+
27+
- name: Publish a Python distribution to PyPI
28+
uses: pypa/gh-action-pypi-publish@release/v1
29+
with:
30+
password: ${{ secrets.PYPI_API_TOKEN }}

0 commit comments

Comments
 (0)