Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] committed Dec 16, 2024
1 parent 4f7e5d5 commit 1befbec
Show file tree
Hide file tree
Showing 3 changed files with 112 additions and 112 deletions.
80 changes: 40 additions & 40 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,152 +12,152 @@ and this project adheres to [Semantic Versioning][].

### Added

- Add `progress_bar` argument to {class}`scib_metrics.benchmark.Benchmarker` {pr}`152`.
- Add ability of {class}`scib_metrics.benchmark.Benchmarker` plotting code to handle missing sets of metrics {pr}`181`.
- Add `progress_bar` argument to {class}`scib_metrics.benchmark.Benchmarker` {pr}`152`.
- Add ability of {class}`scib_metrics.benchmark.Benchmarker` plotting code to handle missing sets of metrics {pr}`181`.

### Changed

- Changed Leiden clustering now has a seed argument for reproducibility {pr}`173`.
- Changed passing `None` to `bio_conservation_metrics` or `batch_correction_metrics` in {class}`scib_metrics.benchmark.Benchmarker` now implies to skip this set of metrics {pr}`181`.
- Changed Leiden clustering now has a seed argument for reproducibility {pr}`173`.
- Changed passing `None` to `bio_conservation_metrics` or `batch_correction_metrics` in {class}`scib_metrics.benchmark.Benchmarker` now implies to skip this set of metrics {pr}`181`.

### Fixed

- Fix neighbors connectivities in test to use new scanpy fn {pr}`170`.
- Fix Kmeans test {pr}`172`.
- Fix deprecation and future warnings {pr}`171`.
- Fix lisi return type and docstring {pr}`182`.
- Fix neighbors connectivities in test to use new scanpy fn {pr}`170`.
- Fix Kmeans test {pr}`172`.
- Fix deprecation and future warnings {pr}`171`.
- Fix lisi return type and docstring {pr}`182`.

## 0.5.1 (2024-02-23)

### Changed

- Replace removed {class}`jax.random.KeyArray` with {class}`jax.Array` {pr}`135`.
- Replace removed {class}`jax.random.KeyArray` with {class}`jax.Array` {pr}`135`.

## 0.5.0 (2024-01-04)

### Changed

- Refactor all relevant metrics to use `NeighborsResults` as input instead of sparse
distance/connectivity matrices {pr}`129`.
- Refactor all relevant metrics to use `NeighborsResults` as input instead of sparse
distance/connectivity matrices {pr}`129`.

## 0.4.1 (2023-10-08)

### Fixed

- Fix KMeans. All previous versions had a bug with KMeans and ARI/NMI metrics are not reliable
with this clustering {pr}`115`.
- Fix KMeans. All previous versions had a bug with KMeans and ARI/NMI metrics are not reliable
with this clustering {pr}`115`.

## 0.4.0 (2023-09-19)

### Added

- Update isolated labels to use newest scib methodology {pr}`108`.
- Update isolated labels to use newest scib methodology {pr}`108`.

### Fixed

- Fix jax one-hot error {pr}`107`.
- Fix jax one-hot error {pr}`107`.

### Removed

- Drop Python 3.8 {pr}`107`.
- Drop Python 3.8 {pr}`107`.

## 0.3.3 (2023-03-29)

### Fixed

- Large scale tutorial now properly uses gpu index {pr}`92`
- Large scale tutorial now properly uses gpu index {pr}`92`

## 0.3.2 (2023-03-13)

### Changed

- Switch to Ruff for linting/formatting {pr}`87`
- Update cookiecutter template {pr}`88`
- Switch to Ruff for linting/formatting {pr}`87`
- Update cookiecutter template {pr}`88`

## 0.3.1 (2023-02-16)

### Changed

- Expose chunk size for silhouette {pr}`82`
- Expose chunk size for silhouette {pr}`82`

## 0.3.0 (2023-02-16)

### Changed

- Rename `KmeansJax` to `Kmeans` and fix ++ initialization, use Kmeans as default in benchmarker instead of Leiden {pr}`81`.
- Warn about joblib, add progress bar postfix str {pr}`80`
- Rename `KmeansJax` to `Kmeans` and fix ++ initialization, use Kmeans as default in benchmarker instead of Leiden {pr}`81`.
- Warn about joblib, add progress bar postfix str {pr}`80`

## 0.2.0 (2023-02-02)

### Added

- Allow custom nearest neighbors methods in Benchmarker {pr}`78`.
- Allow custom nearest neighbors methods in Benchmarker {pr}`78`.

## 0.1.1 (2023-01-04)

### Added

- Add new tutorial and fix scalability of lisi {pr}`71`.
- Add new tutorial and fix scalability of lisi {pr}`71`.

## 0.1.0 (2023-01-03)

### Added

- Add benchmarking pipeline with plotting {pr}`52` {pr}`69`.
- Add benchmarking pipeline with plotting {pr}`52` {pr}`69`.

### Fixed

- Fix diffusion distance computation, affecting kbet {pr}`70`.
- Fix diffusion distance computation, affecting kbet {pr}`70`.

## 0.0.9 (2022-12-16)

### Added

- Add kbet {pr}`60`.
- Add graph connectivty metric {pr}`61`.
- Add kbet {pr}`60`.
- Add graph connectivty metric {pr}`61`.

## 0.0.8 (2022-11-18)

### Changed

- Switch to random kmeans initialization due to kmeans++ complexity issues {pr}`54`.
- Switch to random kmeans initialization due to kmeans++ complexity issues {pr}`54`.

### Fixed

- Begin fixes to make kmeans++ initialization faster {pr}`49`.
- Begin fixes to make kmeans++ initialization faster {pr}`49`.

## 0.0.7 (2022-10-31)

### Changed

- Move PCR to utils module in favor of PCR comparison {pr}`46`.
- Move PCR to utils module in favor of PCR comparison {pr}`46`.

### Fixed

- Fix memory issue in `KMeansJax` by using `_kmeans_full_run` with `map` instead of `vmap` {pr}`45`.
- Fix memory issue in `KMeansJax` by using `_kmeans_full_run` with `map` instead of `vmap` {pr}`45`.

## 0.0.6 (2022-10-25)

### Changed

- Reimplement silhouette in a memory constant way, pdist using lax scan {pr}`42`.
- Reimplement silhouette in a memory constant way, pdist using lax scan {pr}`42`.

## 0.0.5 (2022-10-24)

### Added

- Standardize language of docstring {pr}`30`.
- Use K-means++ initialization {pr}`23`.
- Add pc regression and pc comparsion {pr}`16` {pr}`38`.
- Lax'd silhouette {pr}`33`.
- Cookicutter template sync {pr}`35`.
- Standardize language of docstring {pr}`30`.
- Use K-means++ initialization {pr}`23`.
- Add pc regression and pc comparsion {pr}`16` {pr}`38`.
- Lax'd silhouette {pr}`33`.
- Cookicutter template sync {pr}`35`.

## 0.0.4 (2022-10-10)

### Added

- NMI/ARI metric with Leiden clustering resolution optimization {pr}`24`.
- iLISI/cLISI metrics {pr}`20`.
- NMI/ARI metric with Leiden clustering resolution optimization {pr}`24`.
- iLISI/cLISI metrics {pr}`20`.

## 0.0.1 - 0.0.3

Expand Down
18 changes: 9 additions & 9 deletions docs/contributing.md
Original file line number Diff line number Diff line change
Expand Up @@ -99,11 +99,11 @@ Specify `vX.X.X` as a tag name and create a release. For more information, see [

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 the [scanpy developer docs](https://scanpy.readthedocs.io/en/latest/dev/documentation.html) for more information
on how to write documentation.
Expand All @@ -120,10 +120,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
126 changes: 63 additions & 63 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 @@ -148,47 +148,47 @@ Once authorized, pre-commit.ci should automatically be activated.
The following pre-commit hooks are for code style and format:
- [black](https://black.readthedocs.io/en/stable/):
standard code formatter in Python.
- [blacken-docs](https://github.com/asottile/blacken-docs):
black on Python code in docs.
- [prettier](https://prettier.io/docs/en/index.html):
standard code formatter for non-Python files (e.g. YAML).
- [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.
- [black](https://black.readthedocs.io/en/stable/):
standard code formatter in Python.
- [blacken-docs](https://github.com/asottile/blacken-docs):
black on Python code in docs.
- [prettier](https://prettier.io/docs/en/index.html):
standard code formatter for non-Python files (e.g. YAML).
- [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 @@ -262,10 +262,10 @@ add it to Ruff’s [`external = [...]`](https://beta.ruff.rs/docs/settings/#exte
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 @@ -319,12 +319,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 Expand Up @@ -377,10 +377,10 @@ in the cookiecutter-scverse template.
Please write documentation for your package. 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 @@ -397,10 +397,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

0 comments on commit 1befbec

Please sign in to comment.