Skip to content

Commit

Permalink
Add more pre-commit checks (#1848)
Browse files Browse the repository at this point in the history
* exclude docs/data for large files

Signed-off-by: zethson <[email protected]>

* removed pbmc3k data & exclude path

Signed-off-by: zethson <[email protected]>

* add docs data to gitignore

Signed-off-by: zethson <[email protected]>

* add exclude of pre-commit formatting for test data

Signed-off-by: zethson <[email protected]>

* reverted formatting of test files

Signed-off-by: zethson <[email protected]>
  • Loading branch information
Zethson authored May 26, 2021
1 parent c68db2e commit 4dd8de9
Show file tree
Hide file tree
Showing 16 changed files with 72 additions and 80 deletions.
1 change: 0 additions & 1 deletion .flake8
Original file line number Diff line number Diff line change
Expand Up @@ -34,4 +34,3 @@ exclude =
build,
docs/_build,
dist,

2 changes: 1 addition & 1 deletion .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<!--
<!--
Thanks for opening a PR to scanpy!
Please be sure to follow the guidelines in our contribution guide (https://scanpy.readthedocs.io/en/latest/dev/index.html) to familiarize yourself with our workflow and speed up review.
-->
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
/docs/_build/
/docs/api/scanpy.*.rst
/docs/external/scanpy.*.rst
/docs/data/
!/docs/api/scanpy.api.rst
!/docs/api/scanpy.api.AnnData.rst
!/docs/api/scanpy.plotting.rst
Expand Down
13 changes: 13 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,16 @@ repos:
hooks:
- id: autopep8
args: ["-i"]
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.0.1
hooks:
- id: trailing-whitespace
exclude: scanpy/tests/_data
- id: end-of-file-fixer
exclude: scanpy/tests/_data
- id: check-added-large-files
- id: check-case-conflict
- id: check-toml
- id: check-yaml
- id: check-merge-conflict
- id: detect-private-key
21 changes: 1 addition & 20 deletions docs/api/scanpy.plotting.rst
Original file line number Diff line number Diff line change
@@ -1,23 +1,4 @@
scanpy.plotting
scanpy.plotting
===============

.. automodule:: scanpy.plotting



















2 changes: 1 addition & 1 deletion docs/dev/ci.rst
Original file line number Diff line number Diff line change
Expand Up @@ -31,4 +31,4 @@ From here you can view and download the images which were compared, as well as a
Misc
~~~~

:func:`matplotlib.testing.setup` tries to establish a consistent environment for creating plots. Make sure it's active!
:func:`matplotlib.testing.setup` tries to establish a consistent environment for creating plots. Make sure it's active!
2 changes: 1 addition & 1 deletion docs/dev/documentation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ Plots in docstrings

One of the most useful things you can include in a docstring is examples of how the function should be used.
These are a great way to demonstrate intended usage and give users a template they can copy and modify.
We're able to include the plots produced by these snippets in the rendered docs using `matplotlib's plot directive <https://matplotlib.org/devel/plot_directive.html>`__.
We're able to include the plots produced by these snippets in the rendered docs using `matplotlib's plot directive <https://matplotlib.org/devel/plot_directive.html>`__.
For examples of this, see the `Examples` sections of :func:`~scanpy.pl.dotplot` or :func:`~scanpy.pp.calculate_qc_metrics`.

Note that anything in these sections will need to be run when the docs are built, so please keep them computationally light.
Expand Down
2 changes: 1 addition & 1 deletion docs/dev/getting-set-up.rst
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ We'll try and get back to you soon!
Development environments
------------------------

It's recommended to do development work in an isolated environment.
It's recommended to do development work in an isolated environment.
There are number of ways to do this, including conda environments, virtual environments, and virtual machines.

We think the easiest is probably conda environments. Simply create a new environment with a supported version of python and make a :ref:`development install <dev-install-instructions>` of `scanpy`.
10 changes: 5 additions & 5 deletions docs/ecosystem.rst
Original file line number Diff line number Diff line change
Expand Up @@ -68,16 +68,16 @@ scvi-tools

| scvi-tools hosts deep generative models (DGM) for end-to-end analysis of single-cell
omics data (e.g., scVI, scANVI, totalVI). It also contains several primitives to build novel DGMs.

Adaptive immune receptor repertoire (AIRR)
------------------------------------------

* `scirpy <https://github.com/icbi-lab/scirpy>`__ :small:`Medical University of Innsbruck`
| scirpy is a scanpy extension to expore single-cell T-cell receptor (TCR) and B-cell receptor (BCR) repertoires.

| scirpy is a scanpy extension to expore single-cell T-cell receptor (TCR) and B-cell receptor (BCR) repertoires.

Feature selection
-----------------
* `triku 🦔 <https://gitlab.com/alexmascension/triku>`__ :small:`Biodonostia Health Research Institute`
Expand Down
1 change: 0 additions & 1 deletion docs/release-notes/0.2.1.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,3 @@ trajectory inference, differential expression testing and simulation of gene
regulatory networks. The implementation efficiently deals with `datasets of more
than one million cells
<https://github.com/theislab/scanpy_usage/tree/master/170522_visualizing_one_million_cells>`__. :smaller:`A Wolf, P Angerer`

1 change: 0 additions & 1 deletion docs/release-notes/0.4.0.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,3 @@

.. _SPRING: https://github.com/AllonKleinLab/SPRING/
.. _spring tutorial: https://github.com/theislab/scanpy_usage/tree/master/171111_SPRING_export

2 changes: 1 addition & 1 deletion docs/release-notes/1.8.0.rst
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@

.. rubric:: Documentation

- Clarified docs issues for :func:`~scanpy.pp.neighbors`,
- Clarified docs issues for :func:`~scanpy.pp.neighbors`,
:func:`~scanpy.tl.diffmap`, :func:`~scanpy.pp.calculate_qc_metrics` :pr:`1680` :smaller:`G Palla`
- Integrated DocSearch_, a find-as-you-type documentation index search. :pr:`1754` :smaller:`P Angerer`

Expand Down
2 changes: 1 addition & 1 deletion docs/release-notes/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -74,4 +74,4 @@ Version 0.2
Version 0.1
-----------

.. include:: 0.1.0.rst
.. include:: 0.1.0.rst
4 changes: 2 additions & 2 deletions scanpy/datasets/krumsiek11.txt
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
# model = /Users/alexwolf/hholtz/01_projects/1512_scanpy/scanpy/scanpy/sim_models/krumsiek11.txt
# model = /Users/alexwolf/hholtz/01_projects/1512_scanpy/scanpy/scanpy/sim_models/krumsiek11.txt
# tmax = 160
# branching = True
# nrRealizations = 4
# noiseObs = 0
# noiseDyn = 0.001
# seed = 0
# it Gata2 Gata1 Fog1 EKLF Fli1 SCL Cebpa Pu.1 cJun EgrNab Gfi1
# it Gata2 Gata1 Fog1 EKLF Fli1 SCL Cebpa Pu.1 cJun EgrNab Gfi1
0 0.8032 -0.0005 -0.0001 0.0003 0.0013 0.0011 0.7997 0.8017 0.0006 0.0009 0.0002
1 0.7239 0.0016 -0.0003 -0.0010 0.0011 0.0022 0.8195 0.7256 0.0784 0.0077 0.0941
2 0.6578 0.0013 -0.0010 -0.0027 0.0025 0.0011 0.8358 0.6624 0.1105 0.0239 0.1497
Expand Down
74 changes: 37 additions & 37 deletions scanpy/sim_models/krumsiek11.txt
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
# See Table 1 in Krumsiek et al. (2011), p. 3 or
# See Table 1 in Krumsiek et al. (2011), p. 3 or
# Table 1, in Suppl. Mat. of Moignard et al. (2015), p. 28.
#
# For each "variable = ", there must be a right hand side:
# either an empty string or a python-style logical expression
# involving variable names, "or", "and", "(", ")".
# The order of equations matters!
#
# For each "variable = ", there must be a right hand side:
# either an empty string or a python-style logical expression
# involving variable names, "or", "and", "(", ")".
# The order of equations matters!
#
# modelType = hill
# invTimeStep = 0.02
#
#
# boolean update rules:
Gata2 = Gata2 and not (Gata1 and Fog1) and not Pu.1
Gata1 = (Gata1 or Gata2 or Fli1) and not Pu.1
Expand All @@ -22,33 +22,33 @@ cJun = Pu.1 and not Gfi1
EgrNab = (Pu.1 and cJun) and not Gfi1
Gfi1 = Cebpa and not EgrNab
# coupling list:
Gata2 Gata2 1.0
Gata2 Gata1 -0.1
Gata2 Fog1 -1.0
Gata2 Pu.1 -1.15
Gata1 Gata2 1.0
Gata1 Gata1 0.1
Gata1 Fli1 1.0
Gata1 Pu.1 -1.21
Fog1 Gata1 0.1
EKLF Gata1 0.2
EKLF Fli1 -1.0
Fli1 Gata1 0.2
Fli1 EKLF -1.0
SCL Gata1 1.0
SCL Pu.1 -1.0
Cebpa Gata1 -1.0
Cebpa Fog1 -1.0
Cebpa SCL -1.0
Cebpa Cebpa 10.0
Pu.1 Gata2 -1.0
Pu.1 Gata1 -1.0
Pu.1 Cebpa 10.0
Pu.1 Pu.1 10.0
cJun Pu.1 1.0
cJun Gfi1 -1.0
EgrNab Pu.1 1.0
EgrNab cJun 1.0
EgrNab Gfi1 -1.3
Gfi1 Cebpa 1.0
Gfi1 EgrNab -5.0
Gata2 Gata2 1.0
Gata2 Gata1 -0.1
Gata2 Fog1 -1.0
Gata2 Pu.1 -1.15
Gata1 Gata2 1.0
Gata1 Gata1 0.1
Gata1 Fli1 1.0
Gata1 Pu.1 -1.21
Fog1 Gata1 0.1
EKLF Gata1 0.2
EKLF Fli1 -1.0
Fli1 Gata1 0.2
Fli1 EKLF -1.0
SCL Gata1 1.0
SCL Pu.1 -1.0
Cebpa Gata1 -1.0
Cebpa Fog1 -1.0
Cebpa SCL -1.0
Cebpa Cebpa 10.0
Pu.1 Gata2 -1.0
Pu.1 Gata1 -1.0
Pu.1 Cebpa 10.0
Pu.1 Pu.1 10.0
cJun Pu.1 1.0
cJun Gfi1 -1.0
EgrNab Pu.1 1.0
EgrNab cJun 1.0
EgrNab Gfi1 -1.3
Gfi1 Cebpa 1.0
Gfi1 EgrNab -5.0
14 changes: 7 additions & 7 deletions scanpy/sim_models/toggleswitch.txt
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# For each "variable = ", there must be a right hand side:
# either an empty string or a python-style logical expression
# involving variable names, "or", "and", "(", ")".
# The order of equations matters!
#
# For each "variable = ", there must be a right hand side:
# either an empty string or a python-style logical expression
# involving variable names, "or", "and", "(", ")".
# The order of equations matters!
#
# modelType = hill
# invTimeStep = 0.1
#
Expand All @@ -12,5 +12,5 @@
# coupling list:
0 0 1.0
0 1 -1.0
1 1 1.0
1 0 -1.0
1 1 1.0
1 0 -1.0

0 comments on commit 4dd8de9

Please sign in to comment.