You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* try to move to uv+hatch
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* update test.yml
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* problems of vibe coding :(
* retry
* try out this setting
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* fix2
* remove scanpy specific options
* remove junit
* remove juntxml uplaod
* dont publish debug data and upload test data
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* upload figures
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* just slack the tests for less flaky tests
* update assertion
* update matrix
* update matrix
* update configs
* ofc you can't set os in hatch
* fix hatch
* set notebook to main again
* simplify test.yml
* clean up
* fix the yaml names
* no need for build in test.yml
* undo test change and remove tox.ini
* fix macos dir error
* fix archive filepath problem
* add tolerance for tests/graph/test_ppatterns.py::test_spatial_autocorr_reproducibility[1-moran]
* fix attempt for coverage
* fix the path
* don't specify .xml
* match the versions so they are the same
* undo the tolerance
* update the python versions in hatch
* point to old commit
* replace bash script in CI to avoid .sh'es
* use matrix.os instead of runner.os
* redo scheduled job
* remove unnecessary lines
* remove scripts instead will use uv defaults
* remove set -u
* use hatch matrix
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* fix the bash code
* fix names and where matrix is
* update matrix os
* incorperate the cache again as in old code
* reduce number of versions and conditionally upload coverage
* update docs
* use v5 instead
* the results aren't from version 6
* check if the floating point dep. is related to matrix list
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* update yml
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* add 3.12
* fix the issue finally
* change the versions
* 3.11, 3.12, 3.13 ubuntu and 3.12 macos. bc macos is slow
* check if this is the issue
* pin versions
* no pytest-cov
* undo the version pin testing
* Python source: 'from __future__ imports must occur at the beginning of the file' at line 10
* add tolerance and explain why
* refer to issue instead of commit
* Allow download fail on darwin
* give it as condition expression
* simplify the matrix and get rid of python 3.10 ci test
* mark internet required
---------
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Philipp A. <[email protected]>
Copy file name to clipboardExpand all lines: CONTRIBUTING.rst
+20-16Lines changed: 20 additions & 16 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -61,9 +61,6 @@ Tests structure:
61
61
Code style guide
62
62
----------------
63
63
We rely on ``black`` and ``isort`` to do the most of the formatting - both of them are integrated as pre-commit hooks.
64
-
You can use ``tox`` to check the changes::
65
-
66
-
tox -e lint
67
64
68
65
Furthermore, we also require that:
69
66
@@ -75,26 +72,28 @@ Furthermore, we also require that:
75
72
76
73
Testing
77
74
-------
78
-
We use ``tox`` to automate our testing, as well as linting and documentation creation. To run the tests, run::
79
75
80
-
tox -e py{38,39,310}-{linux,macos}
76
+
77
+
We use [pytest][] to test squidpy.
78
+
To run the tests, simply run `hatch test`.
79
+
80
+
It can take a while to run the whole test suite. There are a few ways to cut down on this while working on a PR:
81
+
82
+
1. Only run a subset of the tests.
83
+
This can be done by specifying paths or test name patterns using the `-k` argument (e.g. `hatch test tests/graph/test_nhood.py` or `hatch test -k "test_umap*"`)
84
+
2. Run the tests in parallel using the `-n` argument (e.g. `hatch test -n 8`).
85
+
81
86
82
87
depending on the Python version(s) in your ``PATH`` and your operating system. We use ``flake8`` and ``mypy`` to further
83
88
analyze the code. Use ``# noqa: <error1>,<error2>`` to ignore certain ``flake8`` errors and
84
89
``# type: ignore[error1,error2]`` to ignore specific ``mypy`` errors.
85
90
86
-
To run only a subset of tests, run::
87
91
88
-
tox -e <environment> -- <name>
89
92
90
-
where ``<name>`` can be a path to a test file/directory or a name of a test function/class.
91
-
For example, to run only the tests in the ``nhood`` module, use::
92
93
93
-
tox -e py39-linux -- tests/graph/test_nhood.py
94
94
95
-
If needed, a specific ``tox`` environment can be recreated as::
95
+
[pytest]: https://docs.pytest.org/en/stable/
96
96
97
-
tox -e <environment> --recreate
98
97
99
98
Writing documentation
100
99
---------------------
@@ -106,20 +105,25 @@ We use ``numpy``-style docstrings for the documentation with the following addit
106
105
- prefer putting references in the ``references.bib`` instead under the ``References`` sections of the docstring.
107
106
- use ``docrep`` for repeating documentation.
108
107
109
-
In order to build the documentation, run::
110
108
111
-
tox -e docs
109
+
To build the docs, run run::
110
+
hatch run docs:build
111
+
112
+
Afterwards, you can run run::
113
+
hatch run docs:open
114
+
115
+
to open {file}`docs/_build/html/index.html`.
112
116
113
117
Since the tutorials are hosted on a separate repository (see `Writing tutorials/examples`_), we download the newest
114
118
tutorials/examples from there and build the documentation here.
115
119
116
120
To validate the links inside the documentation, run::
117
121
118
-
tox -e check-docs
122
+
hatch run docs:check
119
123
120
124
If you need to clean the artifacts from previous documentation builds, run::
0 commit comments