Skip to content
Open
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
20 changes: 10 additions & 10 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,24 +2,24 @@ fail_fast: false
default_language_version:
python: python3
default_stages:
- commit
- push
- pre-commit
- pre-push
minimum_pre_commit_version: 2.16.0
repos:
- repo: https://github.com/psf/black
rev: 24.4.2
- repo: https://github.com/psf/black-pre-commit-mirror
rev: 26.5.1
hooks:
- id: black
- repo: https://github.com/pre-commit/mirrors-prettier
rev: v4.0.0-alpha.8
hooks:
- id: prettier
- repo: https://github.com/asottile/blacken-docs
rev: 1.16.0
rev: 1.20.0
hooks:
- id: blacken-docs
- repo: https://github.com/PyCQA/isort
rev: 5.13.2
rev: 9.0.0b1
hooks:
- id: isort
- repo: https://github.com/asottile/yesqa
Expand All @@ -34,7 +34,7 @@ repos:
- flake8-bugbear
- flake8-blind-except
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.6.0
rev: v6.0.0
hooks:
- id: detect-private-key
- id: check-ast
Expand All @@ -44,7 +44,7 @@ repos:
- id: trailing-whitespace
- id: check-case-conflict
- repo: https://github.com/PyCQA/autoflake
rev: v2.3.1
rev: v2.3.3
hooks:
- id: autoflake
args:
Expand All @@ -53,7 +53,7 @@ repos:
- --remove-unused-variable
- --ignore-init-module-imports
- repo: https://github.com/PyCQA/flake8
rev: 7.1.0
rev: 7.3.0
hooks:
- id: flake8
additional_dependencies:
Expand All @@ -64,7 +64,7 @@ repos:
- flake8-bugbear
- flake8-blind-except
- repo: https://github.com/asottile/pyupgrade
rev: v3.16.0
rev: v3.21.2
hooks:
- id: pyupgrade
args: [--py3-plus, --py38-plus, --keep-runtime-typing]
Expand Down
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,4 @@ and this project adheres to [Semantic Versioning][].

### Added

- Basic tool, preprocessing and plotting functions
- Basic tool, preprocessing and plotting functions
5 changes: 2 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ This package was initialized using the [cookicutter-scverse](https://github.com/

Please refer to the [documentation][link-docs]. In particular, the

- [API documentation][link-api].
- [API documentation][link-api].

## Installation

Expand Down Expand Up @@ -67,8 +67,7 @@ If you found a bug, please use the [issue tracker][issue-tracker].
[changelog]: https://simple-scvi.readthedocs.io/latest/changelog.html
[link-docs]: https://simple-scvi.readthedocs.io
[link-api]: https://simple-scvi.readthedocs.io/latest/api.html

[//]: # (numfocus-fiscal-sponsor-attribution)
[//]: # "numfocus-fiscal-sponsor-attribution"

simple-scvi is part of the scverse® project ([website](https://scverse.org), [governance](https://scverse.org/about/roles)) and is fiscally sponsored by [NumFOCUS](https://numfocus.org/).
If you like scverse® and want to support our mission, please consider making a tax-deductible [donation](https://numfocus.org/donate-to-scverse) to help the project pay for developer time, professional services, travel, workshops, and a variety of other needs.
Expand Down
16 changes: 8 additions & 8 deletions docs/contributing.md
Original file line number Diff line number Diff line change
Expand Up @@ -138,10 +138,10 @@ in the cookiecutter-scverse template.

Please write documentation for new or changed features and use-cases. This project uses [sphinx][] with the following features:

- the [myst][] extension allows to write documentation in markdown/Markedly Structured Text
- [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
- the [myst][] extension allows to write documentation in markdown/Markedly Structured Text
- [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

See the [scanpy developer docs](https://scanpy.readthedocs.io/en/latest/dev/documentation.html) for more information
on how to write documentation.
Expand All @@ -158,10 +158,10 @@ repository.

#### Hints

- If you refer to objects from other packages, please add an entry to `intersphinx_mapping` in `docs/conf.py`. Only
if you do so can sphinx automatically create a link to the external documentation.
- If building the documentation fails because of a missing link that is outside your control, you can add an entry to
the `nitpick_ignore` list in `docs/conf.py`
- If you refer to objects from other packages, please add an entry to `intersphinx_mapping` in `docs/conf.py`. Only
if you do so can sphinx automatically create a link to the external documentation.
- If building the documentation fails because of a missing link that is outside your control, you can add an entry to
the `nitpick_ignore` list in `docs/conf.py`

#### Building the docs locally

Expand Down
114 changes: 57 additions & 57 deletions docs/template_usage.md
Original file line number Diff line number Diff line change
Expand Up @@ -115,13 +115,13 @@ We recommend using [readthedocs.org][] (RTD) to build and host the documentation
To enable readthedocs, head over to [their website][readthedocs.org] and sign in with your GitHub account.
On the RTD dashboard choose "Import a Project" and follow the instructions to add your repository.

- Make sure to choose the correct name of the default branch. On GitHub, the name of the default branch should be `main` (it has
recently changed from `master` to `main`).
- We recommend to enable documentation builds for pull requests (PRs). This ensures that a PR doesn't introduce changes
that break the documentation. To do so, got to `Admin -> Advanced Settings`, check the
`Build pull requests for this projects` option, and click `Save`. For more information, please refer to
the [official RTD documentation](https://docs.readthedocs.io/en/stable/pull-requests.html).
- If you find the RTD builds are failing, you can disable the `fail_on_warning` option in `.readthedocs.yaml`.
- Make sure to choose the correct name of the default branch. On GitHub, the name of the default branch should be `main` (it has
recently changed from `master` to `main`).
- We recommend to enable documentation builds for pull requests (PRs). This ensures that a PR doesn't introduce changes
that break the documentation. To do so, got to `Admin -> Advanced Settings`, check the
`Build pull requests for this projects` option, and click `Save`. For more information, please refer to
the [official RTD documentation](https://docs.readthedocs.io/en/stable/pull-requests.html).
- If you find the RTD builds are failing, you can disable the `fail_on_warning` option in `.readthedocs.yaml`.

If your project is private, there are ways to enable docs rendering on [readthedocs.org][] but it is more cumbersome and requires a different subscription for read the docs. See a guide [here](https://docs.readthedocs.io/en/stable/guides/importing-private-repositories.html).

Expand All @@ -144,52 +144,52 @@ Once authorized, pre-commit.ci should automatically be activated.

The following pre-commit checks are for code style and format:

- [black](https://black.readthedocs.io/en/stable/): standard code
formatter in Python.
- [isort](https://pycqa.github.io/isort/): sort module imports into
sections and types.
- [prettier](https://prettier.io/docs/en/index.html): standard code
formatter for non-Python files (e.g. YAML).
- [blacken-docs](https://github.com/asottile/blacken-docs): black on
python code in docs.
- [black](https://black.readthedocs.io/en/stable/): standard code
formatter in Python.
- [isort](https://pycqa.github.io/isort/): sort module imports into
sections and types.
- [prettier](https://prettier.io/docs/en/index.html): standard code
formatter for non-Python files (e.g. YAML).
- [blacken-docs](https://github.com/asottile/blacken-docs): black on
python code in docs.

The following pre-commit checks are for errors and inconsistencies:

- [flake8](https://flake8.pycqa.org/en/latest/): standard check for errors in Python files.
- [flake8-tidy-imports](https://github.com/adamchainz/flake8-tidy-imports):
tidy module imports.
- [flake8-docstrings](https://github.com/PyCQA/flake8-docstrings):
pydocstyle extension of flake8.
- [flake8-rst-docstrings](https://github.com/peterjc/e8-rst-docstrings):
extension of `flake8-docstrings` for `rst` docs.
- [flake8-comprehensions](https://github.com/adamchainz/e8-comprehensions):
write better list/set/dict comprehensions.
- [flake8-bugbear](https://github.com/PyCQA/flake8-bugbear):
find possible bugs and design issues in program.
- [flake8-blind-except](https://github.com/elijahandrews/flake8-blind-except):
checks for blind, catch-all `except` statements.
- [yesqa](https://github.com/asottile/yesqa):
remove unneccesary `# noqa` comments, follows additional dependencies listed above.
- [autoflake](https://github.com/PyCQA/autoflake):
remove unused imports and variables.
- [pre-commit-hooks](https://github.com/pre-commit/pre-commit-hooks): generic pre-commit hooks.
- **detect-private-key**: checks for the existence of private keys.
- **check-ast**: check whether files parse as valid python.
- **end-of-file-fixer**:check files end in a newline and only a newline.
- **mixed-line-ending**: checks mixed line ending.
- **trailing-whitespace**: trims trailing whitespace.
- **check-case-conflict**: check files that would conflict with case-insensitive file systems.
- [pyupgrade](https://github.com/asottile/pyupgrade):
upgrade syntax for newer versions of the language.
- **forbid-to-commit**: Make sure that `*.rej` files cannot be commited. These files are created by the
[automated template sync](#automated-template-sync) if there's a merge conflict and need to be addressed manually.
- [flake8](https://flake8.pycqa.org/en/latest/): standard check for errors in Python files.
- [flake8-tidy-imports](https://github.com/adamchainz/flake8-tidy-imports):
tidy module imports.
- [flake8-docstrings](https://github.com/PyCQA/flake8-docstrings):
pydocstyle extension of flake8.
- [flake8-rst-docstrings](https://github.com/peterjc/e8-rst-docstrings):
extension of `flake8-docstrings` for `rst` docs.
- [flake8-comprehensions](https://github.com/adamchainz/e8-comprehensions):
write better list/set/dict comprehensions.
- [flake8-bugbear](https://github.com/PyCQA/flake8-bugbear):
find possible bugs and design issues in program.
- [flake8-blind-except](https://github.com/elijahandrews/flake8-blind-except):
checks for blind, catch-all `except` statements.
- [yesqa](https://github.com/asottile/yesqa):
remove unneccesary `# noqa` comments, follows additional dependencies listed above.
- [autoflake](https://github.com/PyCQA/autoflake):
remove unused imports and variables.
- [pre-commit-hooks](https://github.com/pre-commit/pre-commit-hooks): generic pre-commit hooks.
- **detect-private-key**: checks for the existence of private keys.
- **check-ast**: check whether files parse as valid python.
- **end-of-file-fixer**:check files end in a newline and only a newline.
- **mixed-line-ending**: checks mixed line ending.
- **trailing-whitespace**: trims trailing whitespace.
- **check-case-conflict**: check files that would conflict with case-insensitive file systems.
- [pyupgrade](https://github.com/asottile/pyupgrade):
upgrade syntax for newer versions of the language.
- **forbid-to-commit**: Make sure that `*.rej` files cannot be commited. These files are created by the
[automated template sync](#automated-template-sync) if there's a merge conflict and need to be addressed manually.

### How to disable or add pre-commit checks

- To ignore lint warnigs from **flake8**, see [Ignore certain lint warnings](#how-to-ignore-certain-lint-warnings).
- You can add or remove pre-commit checks by simply deleting relevant lines in the `.pre-commit-config.yaml` file.
Some pre-commit checks have additional options that can be specified either in the `pyproject.toml` or tool-specific
config files, such as `.prettierrc.yml` for **prettier** and `.flake8` for **flake8**.
- To ignore lint warnigs from **flake8**, see [Ignore certain lint warnings](#how-to-ignore-certain-lint-warnings).
- You can add or remove pre-commit checks by simply deleting relevant lines in the `.pre-commit-config.yaml` file.
Some pre-commit checks have additional options that can be specified either in the `pyproject.toml` or tool-specific
config files, such as `.prettierrc.yml` for **prettier** and `.flake8` for **flake8**.

### How to ignore certain lint warnings

Expand Down Expand Up @@ -220,10 +220,10 @@ W504
Scverse ecosystem packages should operate on [AnnData][] and/or [MuData][] data structures and typically use an API
as originally [introduced by scanpy][scanpy-api] with the following submodules:

- `pp` for preprocessing
- `tl` for tools (that, compared to `pp` generate interpretable output, often associated with a corresponding plotting
function)
- `pl` for plotting functions
- `pp` for preprocessing
- `tl` for tools (that, compared to `pp` generate interpretable output, often associated with a corresponding plotting
function)
- `pl` for plotting functions

You may add additional submodules as appropriate. While we encourage to follow a scanpy-like API for ecosystem packages,
there may also be good reasons to choose a different approach, e.g. using an object-oriented API.
Expand Down Expand Up @@ -280,12 +280,12 @@ The pull request can only be merged after all `*.rej` files have been removed.
:::{tip}
The following hints may be useful to work with the template sync:

- GitHub automatically disables scheduled actions if there has been not activity to the repository for 60 days.
You can re-enable or manually trigger the sync by navigating to `Actions` -> `Sync Template` in your GitHub repository.
- If you want to ignore certain files from the template update, you can add them to the `[tool.cruft]` section in the
`pyproject.toml` file in the root of your repository. More details are described in the
[cruft documentation][cruft-update-project].
- To disable the sync entirely, simply remove the file `.github/workflows/sync.yaml`.
- GitHub automatically disables scheduled actions if there has been not activity to the repository for 60 days.
You can re-enable or manually trigger the sync by navigating to `Actions` -> `Sync Template` in your GitHub repository.
- If you want to ignore certain files from the template update, you can add them to the `[tool.cruft]` section in the
`pyproject.toml` file in the root of your repository. More details are described in the
[cruft documentation][cruft-update-project].
- To disable the sync entirely, simply remove the file `.github/workflows/sync.yaml`.

:::

Expand Down
Loading