From 5491545abc4f914b778cdcf979ed6d77c7975531 Mon Sep 17 00:00:00 2001 From: Luca Marconato Date: Tue, 10 Dec 2024 16:22:09 +0100 Subject: [PATCH 1/3] new test datasets --- .github/workflows/prepare_test_data.yaml | 22 ++++++++++++++++++---- tests/test_xenium.py | 3 +++ 2 files changed, 21 insertions(+), 4 deletions(-) diff --git a/.github/workflows/prepare_test_data.yaml b/.github/workflows/prepare_test_data.yaml index 10d58c44..6c468b3a 100644 --- a/.github/workflows/prepare_test_data.yaml +++ b/.github/workflows/prepare_test_data.yaml @@ -18,15 +18,29 @@ jobs: run: | mkdir -p ./data cd ./data + + # 10x Genomics Xenium 2.0.0 curl -O https://cf.10xgenomics.com/samples/xenium/2.0.0/Xenium_V1_human_Breast_2fov/Xenium_V1_human_Breast_2fov_outs.zip curl -O https://cf.10xgenomics.com/samples/xenium/2.0.0/Xenium_V1_human_Lung_2fov/Xenium_V1_human_Lung_2fov_outs.zip + # 10x Genomics Xenium 3.0.0 (5K) Mouse ileum, multimodal cell segmentation + curl -O https://cf.10xgenomics.com/samples/xenium/3.0.0/Xenium_Prime_MultiCellSeg_Mouse_Ileum_tiny/Xenium_Prime_MultiCellSeg_Mouse_Ileum_tiny.zip + + # 10x Genomics Xenium 3.0.0 (5K) Mouse ileum, nuclear expansion + curl -O https://cf.10xgenomics.com/samples/xenium/3.0.0/Xenium_Prime_Mouse_Ileum_tiny/Xenium_Prime_Mouse_Ileum_tiny_outs.zip + + # Spatial Genomics seqFISH v2 + curl -O https://s3.embl.de/spatialdata/raw_data/seqfish-2-test-dataset.zip + - name: Unzip files run: | - unzip ./data/Xenium_V1_human_Breast_2fov_outs.zip -d ./data/Xenium_V1_human_Breast_2fov_outs - unzip ./data/Xenium_V1_human_Lung_2fov_outs.zip -d ./data/Xenium_V1_human_Lung_2fov_outs - rm ./data/Xenium_V1_human_Breast_2fov_outs.zip - rm ./data/Xenium_V1_human_Lung_2fov_outs.zip + cd ./data + for file in *.zip; do + dir="${file%.zip}" + mkdir -p "$dir" + unzip "$file" -d "$dir" + rm "$file" + done - name: Upload artifacts uses: actions/upload-artifact@v3 diff --git a/tests/test_xenium.py b/tests/test_xenium.py index fedb824b..2fb35ce1 100644 --- a/tests/test_xenium.py +++ b/tests/test_xenium.py @@ -63,3 +63,6 @@ def test_example_data(dataset: str, expected: str) -> None: extent = get_extent(sdata, exact=False) extent = {ax: (math.floor(extent[ax][0]), math.ceil(extent[ax][1])) for ax in extent} assert str(extent) == expected + + +# TODO: add tests for Xenium 3.0.0 From 64f54f92843509b64407dadd3d5a591c9aa1fbfc Mon Sep 17 00:00:00 2001 From: Luca Marconato Date: Wed, 11 Dec 2024 11:59:43 +0100 Subject: [PATCH 2/3] update test datasets --- .github/workflows/prepare_test_data.yaml | 3 ++- src/spatialdata_io/readers/xenium.py | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/prepare_test_data.yaml b/.github/workflows/prepare_test_data.yaml index 6c468b3a..77f984fc 100644 --- a/.github/workflows/prepare_test_data.yaml +++ b/.github/workflows/prepare_test_data.yaml @@ -24,7 +24,8 @@ jobs: curl -O https://cf.10xgenomics.com/samples/xenium/2.0.0/Xenium_V1_human_Lung_2fov/Xenium_V1_human_Lung_2fov_outs.zip # 10x Genomics Xenium 3.0.0 (5K) Mouse ileum, multimodal cell segmentation - curl -O https://cf.10xgenomics.com/samples/xenium/3.0.0/Xenium_Prime_MultiCellSeg_Mouse_Ileum_tiny/Xenium_Prime_MultiCellSeg_Mouse_Ileum_tiny.zip + # this file seems to be corrupted; skipping it for now + # curl -O https://cf.10xgenomics.com/samples/xenium/3.0.0/Xenium_Prime_MultiCellSeg_Mouse_Ileum_tiny/Xenium_Prime_MultiCellSeg_Mouse_Ileum_tiny.zip # 10x Genomics Xenium 3.0.0 (5K) Mouse ileum, nuclear expansion curl -O https://cf.10xgenomics.com/samples/xenium/3.0.0/Xenium_Prime_Mouse_Ileum_tiny/Xenium_Prime_Mouse_Ileum_tiny_outs.zip diff --git a/src/spatialdata_io/readers/xenium.py b/src/spatialdata_io/readers/xenium.py index 54f911d2..2a5d6165 100644 --- a/src/spatialdata_io/readers/xenium.py +++ b/src/spatialdata_io/readers/xenium.py @@ -84,7 +84,7 @@ def xenium( .. seealso:: - - `10X Genomics Xenium file format `_. + - `10X Genomics Xenium file format `_. Parameters ---------- From 4c92edd53fe849a570ffe64338f73fce609551f7 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Wed, 11 Dec 2024 11:00:54 +0000 Subject: [PATCH 3/3] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- CHANGELOG.md | 98 +++++++++++++++++------------------ README.md | 38 +++++++------- docs/contributing.md | 16 +++--- docs/template_usage.md | 114 ++++++++++++++++++++--------------------- 4 files changed, 133 insertions(+), 133 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index aa47ea7b..ed3d6456 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,138 +10,138 @@ and this project adheres to [Semantic Versioning][]. ## incoming release -- (Visium/Visium HD) lowres and hires images now mapped also to the 'global' coordinate system #230 -- (Macsima) added support @berombau #224 +- (Visium/Visium HD) lowres and hires images now mapped also to the 'global' coordinate system #230 +- (Macsima) added support @berombau #224 ## [0.1.6] - 2024-11-26 -- (MERSCOPE) added `feature_key` attribute for points (i.e., the `'gene'` column) #210 -- (Visium HD) get transformation matrices even when only images are parsed #215 -- Support for `xarray.DataTree` (which was moved from `datatree.DataTree`) #232 +- (MERSCOPE) added `feature_key` attribute for points (i.e., the `'gene'` column) #210 +- (Visium HD) get transformation matrices even when only images are parsed #215 +- Support for `xarray.DataTree` (which was moved from `datatree.DataTree`) #232 ## [0.1.5] - 2024-09-25 ### Added -- (Xenium) added `dims` parameter for more control in `xenium_aligned_image()` +- (Xenium) added `dims` parameter for more control in `xenium_aligned_image()` ### Fixed -- Passing `rgb=None` to image model parser for both visium and visiumhd, leading to 3-4 channel images being - interpreted as RGB(A) -- Fix header bug Visium data #200 -- (Visium HD) Fix path parsing when images are missing #204 #206 +- Passing `rgb=None` to image model parser for both visium and visiumhd, leading to 3-4 channel images being + interpreted as RGB(A) +- Fix header bug Visium data #200 +- (Visium HD) Fix path parsing when images are missing #204 #206 ## [0.1.4] - 2024-08-07 ### Changed -- (Xenium) changed default target of table to labels; radii of circles computed from cells, not nuclei #179 -- (Visium HD) changed default geometry to squares from circles for the bins; added parameter to choose #183 -- (CosMx) dropping points element with zero-length from the cosmx reader #191 +- (Xenium) changed default target of table to labels; radii of circles computed from cells, not nuclei #179 +- (Visium HD) changed default geometry to squares from circles for the bins; added parameter to choose #183 +- (CosMx) dropping points element with zero-length from the cosmx reader #191 ## [0.1.3] - 2024-07-03 ### Added -- (Xenium) support reading multi-polygon selection files from the Xenium Explorer -- (ISS) An experimental loader to load elemental ISS data objects, e.g. raw.tif, label.tif and anndata.h5ad -- (Stereo-seq) Added reader @LLehner @timtreis @florianingelfinger #70 -- (MERSCOPE) Optional rioxarray backend for MERSCOPE data (reads chunks) -- (MERSCOPE) Can choose which elements should be loaded +- (Xenium) support reading multi-polygon selection files from the Xenium Explorer +- (ISS) An experimental loader to load elemental ISS data objects, e.g. raw.tif, label.tif and anndata.h5ad +- (Stereo-seq) Added reader @LLehner @timtreis @florianingelfinger #70 +- (MERSCOPE) Optional rioxarray backend for MERSCOPE data (reads chunks) +- (MERSCOPE) Can choose which elements should be loaded ### Fixed -- (Visium) Fixed issue with joining a SpatialElement with a table due to index values not being unique. - obs_names_make_unique is now called internally to enforce unique index values allowing for join operations. +- (Visium) Fixed issue with joining a SpatialElement with a table due to index values not being unique. + obs_names_make_unique is now called internally to enforce unique index values allowing for join operations. ### Changed -- (MERSCOPE) "global" coordinate system is used as a default instead of "microns" +- (MERSCOPE) "global" coordinate system is used as a default instead of "microns" ## [0.1.2] - 2024-03-30 ### Added -- (Visium HD) added reader, coauthored by @LLehner +- (Visium HD) added reader, coauthored by @LLehner ### Fixed -- (Xenium) reader for 1.0.1 (paper data) and unknown versions -- (Xenium) fix in reading "minimalistic" Xenium datasets #132 +- (Xenium) reader for 1.0.1 (paper data) and unknown versions +- (Xenium) fix in reading "minimalistic" Xenium datasets #132 ## [0.1.1] - 2024-03-24 ### Added -- (Xenium) support for post-xenium aligned images (IF, HE) -- (Xenium) reader for the selection coordinates file from the Xenium Explorer -- (Xenium) support for the new Xenium 2.0.0 (multimodal segmentation) -- (Xenium) reading multiscale labels from cells.zarr.zip -- (MCMICRO) support for TMAs (such as the data of exemplar-002) -- (DBiT-seq) reader -- converter functions `experimental.to_legacy_anndata()` and `experimental.from_legacy_anndata()` -- (Visium) support for raw reads (capture locations not under tissue) +- (Xenium) support for post-xenium aligned images (IF, HE) +- (Xenium) reader for the selection coordinates file from the Xenium Explorer +- (Xenium) support for the new Xenium 2.0.0 (multimodal segmentation) +- (Xenium) reading multiscale labels from cells.zarr.zip +- (MCMICRO) support for TMAs (such as the data of exemplar-002) +- (DBiT-seq) reader +- converter functions `experimental.to_legacy_anndata()` and `experimental.from_legacy_anndata()` +- (Visium) support for raw reads (capture locations not under tissue) ### Fixed -- (Xenium) fixed index (fail on write) -- (Xenium) renamed cells_as_shapes to cells_as_circles; set default to True -- (MERSCOPE) don't try to load unexisting elements #87 -- (Visium) fixed axes ordering +- (Xenium) fixed index (fail on write) +- (Xenium) renamed cells_as_shapes to cells_as_circles; set default to True +- (MERSCOPE) don't try to load unexisting elements #87 +- (Visium) fixed axes ordering ## [0.0.9] - 2023-11-06 ### Fixed -- (Xenium) bug when converting feature_name #81, from @fbnrst -- (Visium) visium() supports file counts without dataset_id #91 +- (Xenium) bug when converting feature_name #81, from @fbnrst +- (Visium) visium() supports file counts without dataset_id #91 ## [0.0.8] - 2023-10-02 ### Fixed -- (Xenium) coerce cell id to str #64 -- (MERSCOPE) fix coordinate transformation #68 -- (MERSCOPE) Improvements/fixes: merscope reader #73 +- (Xenium) coerce cell id to str #64 +- (MERSCOPE) fix coordinate transformation #68 +- (MERSCOPE) Improvements/fixes: merscope reader #73 ## [0.0.7] - 2023-07-23 ### Fixed -- Bugs in Xenium and MERSCOPE +- Bugs in Xenium and MERSCOPE ## [0.0.5] - 2023-06-21 ### Added -- MERFISH reader (from @quentinblampey) -- CODEX reader (from @LLehner) +- MERFISH reader (from @quentinblampey) +- CODEX reader (from @LLehner) ### Fixed -- Issues on Visium reader (thanks @ilia-kats) and Xenium reader +- Issues on Visium reader (thanks @ilia-kats) and Xenium reader ## [0.0.4] - 2023-05-23 ### Added -- Curio reader +- Curio reader ## [0.0.3] - 2023-05-22 ### Merged -- Merge pull request #40 from scverse/fix/categories +- Merge pull request #40 from scverse/fix/categories ## [0.0.2] - 2023-05-04 ### Changed -- Revert version regex (#37) +- Revert version regex (#37) ## [0.0.1] - 2023-05-04 ### Tested -- Test installation from pypi +- Test installation from pypi diff --git a/README.md b/README.md index a25b245c..2eaa490c 100644 --- a/README.md +++ b/README.md @@ -12,19 +12,19 @@ This package contains reader functions to load common spatial omics formats into SpatialData. Currently, we provide support for: -- 10x Genomics Visium® -- 10x Genomics Visium HD® -- 10x Genomics Xenium® -- Akoya PhenoCycler® (formerly CODEX®) -- Curio Seeker® -- DBiT-seq -- MCMICRO (output data) -- NanoString CosMx® -- Spatial Genomics GenePS® (seqFISH) -- Steinbock (output data) -- STOmics Stereo-seq® -- Vizgen MERSCOPE® (MERFISH) -- MACSima® (MACS® iQ View output) +- 10x Genomics Visium® +- 10x Genomics Visium HD® +- 10x Genomics Xenium® +- Akoya PhenoCycler® (formerly CODEX®) +- Curio Seeker® +- DBiT-seq +- MCMICRO (output data) +- NanoString CosMx® +- Spatial Genomics GenePS® (seqFISH) +- Steinbock (output data) +- STOmics Stereo-seq® +- Vizgen MERSCOPE® (MERFISH) +- MACSima® (MACS® iQ View output) Note: all mentioned technologies are registered trademarks of their respective companies. @@ -32,7 +32,7 @@ Note: all mentioned technologies are registered trademarks of their respective c Contributions for addressing the below limitations are very welcomed. -- Only Stereo-seq 7.x is supported, 8.x is not currently supported. https://github.com/scverse/spatialdata-io/issues/161 +- Only Stereo-seq 7.x is supported, 8.x is not currently supported. https://github.com/scverse/spatialdata-io/issues/161 ### How to Contribute @@ -46,7 +46,7 @@ Contributions for addressing the below limitations are very welcomed. Please refer to the [documentation][link-docs]. In particular, the -- [API documentation][link-api]. +- [API documentation][link-api]. ## Installation @@ -76,10 +76,10 @@ If you found a bug, please use the [issue tracker][issue-tracker]. Technologies that can be read into `SpatialData` objects using third-party libraries: -- METASPACE (MALDI, ...): [metaspace-converter](https://github.com/metaspace2020/metaspace-converter) -- PhenoCycler®: [SOPA](https://github.com/gustaveroussy/sopa) -- MACSima®: [SOPA](https://github.com/gustaveroussy/sopa) -- Hyperion® (Imaging Mass Cytometry): [SOPA](https://github.com/gustaveroussy/sopa) +- METASPACE (MALDI, ...): [metaspace-converter](https://github.com/metaspace2020/metaspace-converter) +- PhenoCycler®: [SOPA](https://github.com/gustaveroussy/sopa) +- MACSima®: [SOPA](https://github.com/gustaveroussy/sopa) +- Hyperion® (Imaging Mass Cytometry): [SOPA](https://github.com/gustaveroussy/sopa) ## Disclaimer diff --git a/docs/contributing.md b/docs/contributing.md index b678c149..7df41462 100644 --- a/docs/contributing.md +++ b/docs/contributing.md @@ -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. @@ -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 diff --git a/docs/template_usage.md b/docs/template_usage.md index bf8152f6..f8efbc16 100644 --- a/docs/template_usage.md +++ b/docs/template_usage.md @@ -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). @@ -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 @@ -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. @@ -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`. :::