Skip to content

Commit

Permalink
Switch to scverse cookiecutter template (#402)
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
grst authored May 24, 2023
1 parent 2854ab8 commit 5eb97cb
Show file tree
Hide file tree
Showing 157 changed files with 49,531 additions and 46,189 deletions.
12 changes: 4 additions & 8 deletions .conda/meta.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,12 @@ build:

requirements:
host:
- python >=3.8
- pip!=22.1 # https://github.com/pypa/pip/issues/11110
- flit
- setuptools_scm
- pytoml
- importlib_metadata
- python >=3.9
- hatchling
- hatch-vcs

run:
- python >=3.8
- python >=3.9
- anndata >=0.9
- awkward >=2.1.0
- mudata >=0.2.2
Expand Down Expand Up @@ -60,7 +57,6 @@ test:
- scirpy
commands:
- pytest --pyargs scirpy -m "not extra"
- cd docs && jupytext --execute tutorials/tutorial_3k_tcr.md

about:
home: https://scverse.org/scirpy
Expand Down
23 changes: 23 additions & 0 deletions .cruft.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{
"template": "https://github.com/scverse/cookiecutter-scverse",
"commit": "6a4338030e0c83a9034d607ed66abeff83e18840",
"checkout": null,
"context": {
"cookiecutter": {
"project_name": "scirpy",
"package_name": "scirpy",
"project_description": "A very interesting piece of code",
"author_full_name": "Gregor Sturm",
"author_email": "[email protected]",
"github_user": "grst",
"project_repo": "https://github.com/scverse/scirpy",
"license": "BSD 3-Clause License",
"_copy_without_render": [
".github/workflows/**.yaml",
"docs/_templates/autosummary/**.rst"
],
"_template": "https://github.com/scverse/cookiecutter-scverse"
}
},
"directory": null
}
15 changes: 9 additions & 6 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -1,15 +1,18 @@
root = true

[*]
charset = utf-8
indent_style = space
indent_size = 4
end_of_line = lf
insert_final_newline = true
charset = utf-8
trim_trailing_whitespace = true
max_line_length = 88
insert_final_newline = true

[*.py]
indent_size = 4
indent_style = space
[*.{yml,yaml}]
indent_size = 2

[.cruft.json]
indent_size = 2

[Makefile]
indent_style = tab
2 changes: 1 addition & 1 deletion .gitattributes
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
# Pickle files (for testing) should always have UNIX line endings.
# Pickle files (for testing) should always have UNIX line endings.
*.pkl text eol=lf
6 changes: 3 additions & 3 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@ A clear and concise description of what you expected to happen.

**System**

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

**Additional context**
Add any other context about the problem here.
10 changes: 5 additions & 5 deletions .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
blank_issues_enabled: true
contact_links:
- name: Scverse Community Forum
url: https://discourse.scverse.org/
about: If you have questions about “How to do X”, please ask them here.
blank_issues_enabled: true
contact_links:
- name: Scverse Community Forum
url: https://discourse.scverse.org/
about: If you have questions about “How to do X”, please ask them here.
29 changes: 29 additions & 0 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: Check Build

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

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

jobs:
package:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Python 3.10
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
run: python -m build
- name: Check package
run: twine check --strict dist/*.whl
24 changes: 15 additions & 9 deletions .github/workflows/conda.yml → .github/workflows/conda.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,28 +2,34 @@ name: conda

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

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

jobs:
tests:
if: "!contains(github.event.head_commit.message, 'skip ci')"
test:
runs-on: ${{ matrix.os }}
defaults:
run:
shell: bash -e {0} # -e to fail on error

strategy:
fail-fast: false
matrix:
python-version: ["3.8", "3.9", "3.10"]
os: ["ubuntu-latest", "macos-latest"]
include:
- os: ubuntu-latest
python: "3.9"

env:
OS: ${{ matrix.os }}
PYTHON: ${{ matrix.python }}

steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0 # required for setuptools-scm
- uses: actions/checkout@v3

- name: Setup Miniconda
uses: conda-incubator/setup-miniconda@v2
Expand Down
114 changes: 0 additions & 114 deletions .github/workflows/docs.yml

This file was deleted.

31 changes: 0 additions & 31 deletions .github/workflows/pythonpublish.yml

This file was deleted.

30 changes: 30 additions & 0 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: Release

on:
push:
tags:
- "*.*.*"

jobs:
release:
name: Release
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3

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

- 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 }}
Loading

0 comments on commit 5eb97cb

Please sign in to comment.