Skip to content

Commit

Permalink
Update instance repo from cookiecutter template
Browse files Browse the repository at this point in the history
  • Loading branch information
github-actions[bot] committed Dec 17, 2024
1 parent e937087 commit 46dfd01
Show file tree
Hide file tree
Showing 4 changed files with 62 additions and 62 deletions.
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ repos:
hooks:
- id: pyproject-fmt
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.8.1
rev: v0.8.3
hooks:
- id: ruff
types_or: [python, pyi, jupyter]
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
18 changes: 9 additions & 9 deletions docs/contributing.md
Original file line number Diff line number Diff line change
Expand Up @@ -156,11 +156,11 @@ This will automatically create a git tag and trigger a Github workflow that crea
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
- Citations (like {cite:p}`Virshup_2023`) can be included with [sphinxcontrib-bibtex](https://sphinxcontrib-bibtex.readthedocs.io/)
- 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
- Citations (like {cite:p}`Virshup_2023`) can be included with [sphinxcontrib-bibtex](https://sphinxcontrib-bibtex.readthedocs.io/)

See scanpy’s {doc}`scanpy:dev/documentation` for more information on how to write your own.

Expand All @@ -184,10 +184,10 @@ please check out [this feature request][issue-render-notebooks] in the `cookiecu

#### 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`

(docs-building)=

Expand Down
102 changes: 51 additions & 51 deletions docs/template_usage.md
Original file line number Diff line number Diff line change
Expand Up @@ -168,13 +168,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 enabling 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][rtd-prs].
- 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 enabling 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][rtd-prs].
- 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 Down Expand Up @@ -259,44 +259,44 @@ Once authorized, pre-commit.ci should automatically be activated.

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

- [prettier](https://prettier.io/docs/en/index.html):
standard code formatter for non-Python files (e.g. YAML).
- [ruff][] formatting (`ruff-format`)
- [ruff][] based checks:
- [isort](https://beta.ruff.rs/docs/rules/#isort-i) (rule category: `I`):
sort module imports into sections and types.
- [pydocstyle](https://beta.ruff.rs/docs/rules/#pydocstyle-d) (rule category: `D`):
pydocstyle extension of flake8.
- [flake8-tidy-imports](https://beta.ruff.rs/docs/rules/#flake8-tidy-imports-tid) (rule category: `TID`):
tidy module imports.
- [flake8-comprehensions](https://beta.ruff.rs/docs/rules/#flake8-comprehensions-c4) (rule category: `C4`):
write better list/set/dict comprehensions.
- [pyupgrade](https://beta.ruff.rs/docs/rules/#pyupgrade-up) (rule category: `UP`):
upgrade syntax for newer versions of the language.
- [prettier](https://prettier.io/docs/en/index.html):
standard code formatter for non-Python files (e.g. YAML).
- [ruff][] formatting (`ruff-format`)
- [ruff][] based checks:
- [isort](https://beta.ruff.rs/docs/rules/#isort-i) (rule category: `I`):
sort module imports into sections and types.
- [pydocstyle](https://beta.ruff.rs/docs/rules/#pydocstyle-d) (rule category: `D`):
pydocstyle extension of flake8.
- [flake8-tidy-imports](https://beta.ruff.rs/docs/rules/#flake8-tidy-imports-tid) (rule category: `TID`):
tidy module imports.
- [flake8-comprehensions](https://beta.ruff.rs/docs/rules/#flake8-comprehensions-c4) (rule category: `C4`):
write better list/set/dict comprehensions.
- [pyupgrade](https://beta.ruff.rs/docs/rules/#pyupgrade-up) (rule category: `UP`):
upgrade syntax for newer versions of the language.

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

- [pre-commit-hooks](https://github.com/pre-commit/pre-commit-hooks): generic pre-commit hooks for text files.
- **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.
- **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.
- [ruff][] based checks:
- [pyflakes](https://beta.ruff.rs/docs/rules/#pyflakes-f) (rule category: `F`):
various checks for errors.
- [pycodestyle](https://beta.ruff.rs/docs/rules/#pycodestyle-e-w) (rule category: `E`, `W`):
various checks for errors.
- [flake8-bugbear](https://beta.ruff.rs/docs/rules/#flake8-bugbear-b) (rule category: `B`):
find possible bugs and design issues in program.
- [flake8-blind-except](https://beta.ruff.rs/docs/rules/#flake8-blind-except-ble) (rule category: `BLE`):
checks for blind, catch-all `except` statements.
- [Ruff-specific rules](https://beta.ruff.rs/docs/rules/#ruff-specific-rules-ruf) (rule category: `RUF`):
- `RUF100`: remove unneccesary `# noqa` comments ()
- [pre-commit-hooks](https://github.com/pre-commit/pre-commit-hooks): generic pre-commit hooks for text files.
- **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.
- **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.
- [ruff][] based checks:
- [pyflakes](https://beta.ruff.rs/docs/rules/#pyflakes-f) (rule category: `F`):
various checks for errors.
- [pycodestyle](https://beta.ruff.rs/docs/rules/#pycodestyle-e-w) (rule category: `E`, `W`):
various checks for errors.
- [flake8-bugbear](https://beta.ruff.rs/docs/rules/#flake8-bugbear-b) (rule category: `B`):
find possible bugs and design issues in program.
- [flake8-blind-except](https://beta.ruff.rs/docs/rules/#flake8-blind-except-ble) (rule category: `BLE`):
checks for blind, catch-all `except` statements.
- [Ruff-specific rules](https://beta.ruff.rs/docs/rules/#ruff-specific-rules-ruf) (rule category: `RUF`):
- `RUF100`: remove unneccesary `# noqa` comments ()

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

Expand Down Expand Up @@ -373,9 +373,9 @@ add it to Ruff’s [`external = [...]`][ruff-external] setting to prevent `RUF10
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,
Expand Down Expand Up @@ -439,12 +439,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

0 comments on commit 46dfd01

Please sign in to comment.