Skip to content

Commit

Permalink
Deploy preview for PR 71 🛫
Browse files Browse the repository at this point in the history
  • Loading branch information
grst committed Dec 6, 2024
1 parent 598feeb commit ee9141d
Show file tree
Hide file tree
Showing 161 changed files with 13,000 additions and 0 deletions.
4 changes: 4 additions & 0 deletions pr-preview/pr-71/.buildinfo
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# Sphinx build info version 1
# This file records the configuration used when building these files. When it is not found, a full rebuild will be done.
config: 75a73b4fe51b463011d0ccac3daed33e
tags: 645f666f9bcd5a90fca523b33c5a78b7
856 changes: 856 additions & 0 deletions pr-preview/pr-71/CHANGELOG.html

Large diffs are not rendered by default.

Binary file added pr-preview/pr-71/_images/config.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added pr-preview/pr-71/_images/dso_kraken.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions pr-preview/pr-71/_sources/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
```{include} ../CHANGELOG.md
```
155 changes: 155 additions & 0 deletions pr-preview/pr-71/_sources/contributing.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,155 @@
# Contributing guide

We assume that you are already familiar with git and with making pull requests on GitHub.
If not, please refer to the [scanpy developer guide][].

## Installing dev dependencies

In addition to the packages needed to _use_ this package,
you need additional python packages to [run tests](#writing-tests) and [build the documentation](#docs-building).

The easiest way is to get familiar with [hatch environments][], with which these tasks are simply:

```bash
hatch test # defined in the table [tool.hatch.envs.hatch-test] in pyproject.toml
hatch run docs:build # defined in the table [tool.hatch.envs.docs]
```

If you prefer managing environments manually, you can use `pip`:

```bash
cd dso
python3 -m venv .venv
source .venv/bin/activate
pip install -e ".[dev,test,doc]"
```

[hatch environments]: https://hatch.pypa.io/latest/tutorials/environment/basic-usage/

## Code-style

This package uses [pre-commit][] to enforce consistent code-styles.
On every commit, pre-commit checks will either automatically fix issues with the code, or raise an error message.

To enable pre-commit locally, simply run

```bash
pre-commit install
```

in the root of the repository.
Pre-commit will automatically download all dependencies when it is run for the first time.

Alternatively, you can rely on the [pre-commit.ci][] service enabled on GitHub.
If you didn't run `pre-commit` before pushing changes to GitHub it will automatically commit fixes to your pull request, or show an error message.

If pre-commit.ci added a commit on a branch you still have been working on locally, simply use

```bash
git pull --rebase
```

to integrate the changes into yours.
While the [pre-commit.ci][] is useful, we strongly encourage installing and running pre-commit locally first to understand its usage.

Finally, most editors have an _autoformat on save_ feature.
Consider enabling this option for [ruff][ruff-editors] and [prettier][prettier-editors].

[pre-commit]: https://pre-commit.com/
[pre-commit.ci]: https://pre-commit.ci/
[ruff-editors]: https://docs.astral.sh/ruff/integrations/

[prettier-editors]: https://prettier.io/docs/en/editors.html

(writing-tests)=

## Writing tests

This package uses [pytest][] for automated testing.
Please write {doc}`scanpy:dev/testing` for every function added to the package.

Most IDEs integrate with pytest and provide a GUI to run tests.
Just point yours to one of the environments returned by

```bash
hatch env create hatch-test # create test environments for all supported versions
hatch env find hatch-test # list all possible test environment paths
```

Alternatively, you can run all tests from the command line by executing

```bash
hatch test # test with the highest supported Python version
# or
hatch test --all # test with all supported Python versions
```

in the root of the repository.

[pytest]: https://docs.pytest.org/

### Continuous integration

Continuous integration will automatically run the tests on all pull requests and test
against the minimum and maximum supported Python version.

Additionally, there's a CI job that tests against pre-releases of all dependencies (if there are any).
The purpose of this check is to detect incompatibilities of new package versions early on and
gives you time to fix the issue or reach out to the developers of the dependency before the package is released to a wider audience.

## Publishing a release

### Updating the version number

DSO uses [hatch-vcs](https://github.com/ofek/hatch-vcs) to automaticlly retrieve the version number
from the git tag. To make a new release, navigate to the “Releases” page of this project on GitHub. Specify vX.X.X as a tag name and create a release. For more information, see [managing GitHub releases][]. This will automatically create a git tag and trigger a Github workflow that creates a release on PyPI.

Please adhere to [Semantic Versioning][semver], in brief

> Given a version number MAJOR.MINOR.PATCH, increment the:
>
> 1. MAJOR version when you make incompatible API changes,
> 2. MINOR version when you add functionality in a backwards compatible manner, and
> 3. PATCH version when you make backwards compatible bug fixes.
>
> Additional labels for pre-release and build metadata are available as extensions to the MAJOR.MINOR.PATCH format.

[semver]: https://semver.org/
[managing GitHub releases]: https://docs.github.com/en/repositories/releasing-projects-on-github/managing-releases-in-a-repository
[pypi]: https://pypi.org/

## Writing documentation

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).
- [sphinx-autodoc-typehints][], to automatically reference annotated input and output types
- Citations 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.

[sphinx]: https://www.sphinx-doc.org/en/master/
[myst]: https://myst-parser.readthedocs.io/en/latest/intro.html
[myst-nb]: https://myst-nb.readthedocs.io/en/latest/
[numpydoc-napoleon]: https://www.sphinx-doc.org/en/master/usage/extensions/napoleon.html
[numpydoc]: https://numpydoc.readthedocs.io/en/latest/format.html
[sphinx-autodoc-typehints]: https://github.com/tox-dev/sphinx-autodoc-typehints

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

(docs-building)=

### Building the docs locally

```bash
hatch docs:build
hatch docs:open
```
11 changes: 11 additions & 0 deletions pr-preview/pr-71/_sources/dso_python.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# Python API

TODO

```{eval-rst}
.. module:: dso
.. currentmodule:: dso
.. autosummary::
:toctree: generated
```
3 changes: 3 additions & 0 deletions pr-preview/pr-71/_sources/dso_r.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# DSO R package

TODO
3 changes: 3 additions & 0 deletions pr-preview/pr-71/_sources/getting_started.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Getting started

TODO
36 changes: 36 additions & 0 deletions pr-preview/pr-71/_sources/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
```{include} ../README.md
```

```{toctree}
:hidden: true
:maxdepth: 1
:caption: User Guide
getting_started.md
```

```{toctree}
:hidden: true
:maxdepth: 1
:caption: DSO CLI
CHANGELOG.md
contributing.md
```

```{toctree}
:hidden: true
:maxdepth: 1
:caption: DSO Python API
dso_python.md
```

```{toctree}
:hidden: true
:maxdepth: 1
:caption: DSO R API
dso_r.md
```
Loading

0 comments on commit ee9141d

Please sign in to comment.