Skip to content

Commit cecea01

Browse files
authored
Merge pull request #675 from theislab/release/0.2.4
Release/0.2.4
2 parents 1659cc8 + 8d3a346 commit cecea01

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

85 files changed

+4213
-2922
lines changed

.flake8

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
[flake8]
2+
max-line-length = 88
3+
filename = *.py
4+
exclude =
5+
.git,
6+
__pycache__,
7+
docs/*
8+
# F403: unable to detect undefined names
9+
# F405: undefined, or defined from star imports
10+
# W503: Linebreak before binary operator
11+
ignore = F403, F405, W503

.github/ISSUE_TEMPLATE/bug_report.md

Lines changed: 18 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -6,22 +6,31 @@ labels: bug
66
assignees: ''
77
---
88

9-
<!-- Description of the bug: -->
9+
<!-- Description of the bug -->
1010
...
1111

12-
<!-- Reproducible example in the code block below (if applicable, else delete): -->
12+
13+
<!-- Reproducible example -->
1314
```python
14-
...
15+
# paste your code here, if applicable
1516
```
1617

17-
<!-- Error output in the code block below (if applicable, else delete): -->
18+
19+
<!-- Error Output -->
1820
<details>
19-
<summary> Error </summary>
21+
22+
<summary> Error output </summary>
23+
2024
```pytb
21-
...
25+
# paste the error output here, if applicable
2226
```
2327
</details>
2428

25-
#### Versions:
26-
<!-- Output of scv.logging.print_versions() -->
27-
>
29+
30+
<!-- Versions -->
31+
<details> <summary> Versions </summary>
32+
33+
```pytb
34+
# paste the ouput of scv.logging.print_versions() here
35+
```
36+
</details>

.github/workflows/ci.yml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@ name: CI
22

33
on:
44
push:
5-
branches: [master, develop]
5+
branches: [master, develop, 'release/**']
66
pull_request:
7-
branches: [master, develop]
7+
branches: [master, develop, 'release/**']
88

99
jobs:
1010
# Skip CI if commit message contains `[ci skip]` in the subject
@@ -19,7 +19,7 @@ jobs:
1919
- id: ci-skip-step
2020
uses: mstachniuk/ci-skip@master
2121

22-
# Check if code agrees with `black` and if README.rst can be converted to HTML
22+
# Check if pre-commit hooks pass and if README.rst can be converted to HTML
2323
linting:
2424
needs: init
2525
if: ${{ needs.init.outputs.skip == 'false' }}
@@ -33,9 +33,9 @@ jobs:
3333
- name: Install dependencies
3434
run: |
3535
python -m pip install --upgrade pip
36-
pip install black>=20.8b1 docutils
37-
- name: Check code style
38-
run: black --check --diff --color .
36+
pip install pre-commit docutils
37+
- name: Check pre-commit compatibility
38+
run: pre-commit run --all-files --show-diff-on-failure
3939
- name: Run rst2html.py
4040
run: rst2html.py --halt=2 README.rst >/dev/null
4141

@@ -55,6 +55,6 @@ jobs:
5555
- name: Install dependencies
5656
run: |
5757
pip install -e .
58-
pip install pytest pytest-cov
58+
pip install hypothesis pytest pytest-cov
5959
- name: Unit tests
6060
run: python -m pytest --cov=scvelo

.gitignore

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ scripts/
77
write/
88
scanpy*/
99
benchmarking/
10+
htmlcov/
1011

1112
scvelo.egg-info/
1213

@@ -37,4 +38,7 @@ docs/source/scvelo*
3738
/dist/
3839

3940
.coverage
40-
.eggs
41+
.eggs
42+
43+
# Files generated by unit tests
44+
.hypothesis/

.pre-commit-config.yaml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,18 @@ repos:
33
rev: 20.8b1
44
hooks:
55
- id: black
6+
- repo: https://gitlab.com/pycqa/flake8
7+
rev: 3.8.4
8+
hooks:
9+
- id: flake8
10+
- repo: https://github.com/pycqa/isort
11+
rev: 5.7.0
12+
hooks:
13+
- id: isort
14+
name: isort (python)
15+
- id: isort
16+
name: isort (cython)
17+
types: [cython]
18+
- id: isort
19+
name: isort (pyi)
20+
types: [pyi]

CONTRIBUTING.rst

Lines changed: 78 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,78 @@
1+
Contributing guide
2+
==================
3+
4+
5+
Getting started
6+
^^^^^^^^^^^^^^^
7+
8+
Contributing to scVelo requires a developer installation. As a first step, we suggest creating a new environment
9+
10+
.. code:: bash
11+
12+
conda create -n ENV_NAME python=PYTHON_VERSION && conda activate ENV_NAME
13+
14+
15+
Following, fork the scVelo repo on GitHub `here <https://github.com/theislab/scvelo>`.
16+
If you are unsure on how to do so, please checkout the corresponding
17+
`GitHub docs <https://docs.github.com/en/github/getting-started-with-github/quickstart/fork-a-repo>`.
18+
You can now clone your fork of scVelo and install the development mode
19+
20+
.. code:: bash
21+
22+
git clone https://github.com/YOUR-USER-NAME/scvelo.git
23+
cd scvelo
24+
git checkout --track origin/develop
25+
pip install -e '.[dev]'
26+
27+
The last line can, alternatively, be replaced by
28+
29+
.. code:: bash
30+
31+
pip install -r requirements-dev.txt
32+
33+
34+
Finally, to make sure your code follows our code style guideline, install pre-commit:
35+
36+
.. code:: bash
37+
38+
pre-commit install
39+
40+
41+
Coding style
42+
^^^^^^^^^^^^
43+
44+
Our code follows `black` and `flake8` coding style. Code formatting (`black`, `isort`) is automated through pre-commit hooks. In addition, we require that
45+
46+
- functions are fully type-annotated.
47+
- variables referred to in an error/warning message or docstrings are enclosed in \`\`.
48+
49+
50+
Testing
51+
^^^^^^^
52+
53+
To run the implemented unit tests locally, simply run
54+
55+
.. code:: bash
56+
57+
python -m pytest
58+
59+
60+
Documentation
61+
^^^^^^^^^^^^^
62+
63+
The docstrings of scVelo largely follow the `numpy`-style. New docstrings should
64+
65+
- include neither type hints nor return types.
66+
- reference an argument within the same docstrings using \`\`.
67+
68+
69+
Submitting pull requests
70+
^^^^^^^^^^^^^^^^^^^^^^^^
71+
72+
New features and bug fixes are added to the code base through a pull request (PR). To implement a feature or bug fix, create a branch from `develop`. For hotfixes use `master` as base. The existence of bugs suggests insufficient test coverage. As such, bug fixes should, ideally, include a unit test or extend an existing one. Please ensure that
73+
74+
- branch names have the prefix `feat/`, `bug/` or `hotfix/`.
75+
- your code follows the project conventions.
76+
- newly added functions are unit tested.
77+
- all tests pass locally.
78+
- if there is no issue solved by the PR, create one outlining what you try to add/solve and reference it in the PR description.

README.rst

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ patients and dynamic processes in human lung regeneration. Find out more in this
3434

3535
Latest news
3636
^^^^^^^^^^^
37+
- Aug/2021: `Perspectives paper out in MSB <https://doi.org/10.15252/msb.202110282>`_
3738
- Feb/2021: scVelo goes multi-core
3839
- Dec/2020: Cover of `Nature Biotechnology <https://www.nature.com/nbt/volumes/38>`_
3940
- Nov/2020: Talk at `Single Cell Biology <https://coursesandconferences.wellcomegenomecampus.org/our-events/single-cell-biology-2020/>`_
@@ -42,11 +43,15 @@ Latest news
4243
- Sep/2020: Talk at `Single Cell Omics <https://twitter.com/fabian_theis/status/1305621028056465412>`_
4344
- Aug/2020: `scVelo out in Nature Biotech <https://www.helmholtz-muenchen.de/en/aktuelles/latest-news/press-information-news/article/48658/index.html>`_
4445

45-
Reference
46-
^^^^^^^^^
46+
References
47+
^^^^^^^^^^
48+
La Manno *et al.* (2018), RNA velocity of single cells, `Nature <https://doi.org/10.1038/s41586-018-0414-6>`_.
49+
4750
Bergen *et al.* (2020), Generalizing RNA velocity to transient cell states through dynamical modeling,
4851
`Nature Biotech <https://doi.org/10.1038/s41587-020-0591-3>`_.
49-
|dim|
52+
53+
Bergen *et al.* (2021), RNA velocity - current challenges and future perspectives,
54+
`Molecular Systems Biology <https://doi.org/10.15252/msb.202110282>`_.
5055

5156
Support
5257
^^^^^^^

docs/requirements.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,5 +9,5 @@ sphinx_autodoc_typehints<=1.6
99

1010
# converting notebooks to html
1111
ipykernel
12-
sphinx>=1.7
13-
nbsphinx>=0.7
12+
sphinx>=1.7,<4.0
13+
nbsphinx>=0.7,<0.8.7

docs/source/_ext/edit_on_github.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
import os
66
import warnings
77

8-
98
__licence__ = "BSD (3 clause)"
109

1110

docs/source/api.rst

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -153,6 +153,12 @@ Datasets
153153
datasets.pancreas
154154
datasets.dentategyrus
155155
datasets.forebrain
156+
datasets.dentategyrus_lamanno
157+
datasets.gastrulation
158+
datasets.gastrulation_e75
159+
datasets.gastrulation_erythroid
160+
datasets.bonemarrow
161+
datasets.pbmc68k
156162
datasets.simulation
157163

158164

0 commit comments

Comments
 (0)