Skip to content

Commit bab74f1

Browse files
github-actions[bot]grstpre-commit-ci[bot]
authored
Automated template update from cookiecutter-scverse (#61)
* Update sync.yaml * Automated template update from cookiecutter-scverse * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * fix merge conflicts * Fix merge conflict Co-authored-by: Gregor Sturm <[email protected]> Co-authored-by: grst <[email protected]> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: Gregor Sturm <[email protected]>
1 parent 008f8ae commit bab74f1

13 files changed

+299
-33
lines changed

.cruft.json

+6-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"template": "https://github.com/scverse/cookiecutter-scverse",
3-
"commit": "8148f720e622a82345bfc18b74b2bd288d12f7d5",
3+
"commit": "28f47a97470826ca5000df24fd272e0d32d1c6fa",
44
"context": {
55
"cookiecutter": {
66
"project_name": "infercnvpy",
@@ -11,10 +11,13 @@
1111
"github_user": "grst",
1212
"project_repo": "https://github.com/icbi-lab/infercnvpy",
1313
"license": "BSD 3-Clause License",
14-
"_copy_without_render": [".github/workflows/**.yaml"],
14+
"_copy_without_render": [
15+
".github/workflows/**.yaml",
16+
"docs/_templates/autosummary/**.rst"
17+
],
1518
"_template": "https://github.com/scverse/cookiecutter-scverse"
1619
}
1720
},
1821
"directory": null,
19-
"checkout": "v0.0.2"
22+
"checkout": "v0.0.3"
2023
}

.flake8

+7-9
Original file line numberDiff line numberDiff line change
@@ -10,32 +10,28 @@ ignore =
1010
E501
1111
# whitespace before : -> black does not adhere to PEP8
1212
E203
13+
# line break before binary operator -> black does not adhere to PEP8
14+
W503
1315
# missing whitespace after ,', ';', or ':' -> black does not adhere to PEP8
1416
E231
1517
# continuation line over-indented for hanging indent -> black does not adhere to PEP8
1618
E126
17-
# E266 too many leading '#' for block comment -> this is fine for indicating sections
19+
# too many leading '#' for block comment -> this is fine for indicating sections
1820
E262
1921
# Do not assign a lambda expression, use a def -> lambda expression assignments are convenient
2022
E731
21-
# allow I, O, l as variable names -> I is the identity matrix, i, j, k, l is reasonable indexing notation
23+
# allow I, O, l as variable names -> I is the identity matrix
2224
E741
2325
# Missing docstring in public package
2426
D104
25-
# ... imported but unused
26-
F401
2727
# Missing docstring in public module
2828
D100
2929
# Missing docstring in __init__
3030
D107
31-
# Do not perform function calls in argument defaults.
31+
# Errors from function calls in argument defaults. These are fine when the result is immutable.
3232
B008
33-
# line break before binary operator
34-
W503
3533
# Missing docstring in magic method
3634
D105
37-
# whitespace before ':'
38-
E203
3935
# format string does contain unindexed parameters
4036
P101
4137
# first line should end with a period [Bug: doesn't work with single-line docstrings]
@@ -58,6 +54,8 @@ rst-roles =
5854
class,
5955
func,
6056
ref,
57+
cite:p,
58+
cite:t,
6159
rst-directives =
6260
envvar,
6361
exception,

.github/ISSUE_TEMPLATE/bug_report.yml

+89
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,89 @@
1+
name: Bug report
2+
description: Report something that is broken or incorrect
3+
labels: bug
4+
body:
5+
- type: markdown
6+
attributes:
7+
value: |
8+
**Note**: Please read [this guide](https://matthewrocklin.com/blog/work/2018/02/28/minimal-bug-reports)
9+
detailing how to provide the necessary information for us to reproduce your bug. In brief:
10+
* Please provide exact steps how to reproduce the bug in a clean Python environment.
11+
* In case it's not clear what's causing this bug, please provide the data or the data generation procecure.
12+
* Sometimes it is not possible to share the data but usually it is possible to replicate problems on publicly
13+
available datasets or to share a subset of your data.
14+
15+
- type: textarea
16+
id: report
17+
attributes:
18+
label: Report
19+
description: A clear and concise description of what the bug is.
20+
validations:
21+
required: true
22+
23+
- type: textarea
24+
id: versions
25+
attributes:
26+
label: Version information
27+
description: |
28+
Please paste below the output of
29+
30+
```python
31+
import session_info
32+
session_info.show(html=False, dependencies=True)
33+
```
34+
placeholder: |
35+
-----
36+
anndata 0.8.0rc2.dev27+ge524389
37+
session_info 1.0.0
38+
-----
39+
asttokens NA
40+
awkward 1.8.0
41+
backcall 0.2.0
42+
cython_runtime NA
43+
dateutil 2.8.2
44+
debugpy 1.6.0
45+
decorator 5.1.1
46+
entrypoints 0.4
47+
executing 0.8.3
48+
h5py 3.7.0
49+
ipykernel 6.15.0
50+
jedi 0.18.1
51+
mpl_toolkits NA
52+
natsort 8.1.0
53+
numpy 1.22.4
54+
packaging 21.3
55+
pandas 1.4.2
56+
parso 0.8.3
57+
pexpect 4.8.0
58+
pickleshare 0.7.5
59+
pkg_resources NA
60+
prompt_toolkit 3.0.29
61+
psutil 5.9.1
62+
ptyprocess 0.7.0
63+
pure_eval 0.2.2
64+
pydev_ipython NA
65+
pydevconsole NA
66+
pydevd 2.8.0
67+
pydevd_file_utils NA
68+
pydevd_plugins NA
69+
pydevd_tracing NA
70+
pygments 2.12.0
71+
pytz 2022.1
72+
scipy 1.8.1
73+
setuptools 62.5.0
74+
setuptools_scm NA
75+
six 1.16.0
76+
stack_data 0.3.0
77+
tornado 6.1
78+
traitlets 5.3.0
79+
wcwidth 0.2.5
80+
zmq 23.1.0
81+
-----
82+
IPython 8.4.0
83+
jupyter_client 7.3.4
84+
jupyter_core 4.10.0
85+
-----
86+
Python 3.9.13 | packaged by conda-forge | (main, May 27 2022, 16:58:50) [GCC 10.3.0]
87+
Linux-5.18.6-arch1-1-x86_64-with-glibc2.35
88+
-----
89+
Session information updated at 2022-07-07 17:55

.github/ISSUE_TEMPLATE/config.yml

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
blank_issues_enabled: false
2+
contact_links:
3+
- name: Scverse Community Forum
4+
url: https://discourse.scverse.org/
5+
about: If you have questions about “How to do X”, please ask them here.
+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
name: Feature request
2+
description: Propose a new feature for infercnvpy
3+
labels: enhancement
4+
body:
5+
- type: textarea
6+
id: description
7+
attributes:
8+
label: Description of feature
9+
description: Please describe your suggestion for a new feature. It might help to describe a problem or use case, plus any alternatives that you have considered.
10+
validations:
11+
required: true

.readthedocs.yaml

+1
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ build:
66
python: "3.10"
77
sphinx:
88
configuration: docs/conf.py
9+
# disable this for more lenient docs builds
910
fail_on_warning: true
1011
python:
1112
install:

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ Please refer to the [documentation][link-docs]. In particular, the
3333
## Installation
3434

3535
You need to have Python 3.8 or newer installed on your system. If you don't have
36-
Python installed, we recommend installing [Miniconda](https://docs.conda.io/en/latest/miniconda.html).
36+
Python installed, we recommend installing [Mambaforge](https://github.com/conda-forge/miniforge#mambaforge).
3737

3838
There are several alternative options to install infercnvpy:
3939

docs/_templates/autosummary/class.rst

+65
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
{{ fullname | escape | underline}}
2+
3+
.. currentmodule:: {{ module }}
4+
5+
.. add toctree option to make autodoc generate the pages
6+
7+
.. autoclass:: {{ objname }}
8+
9+
{% block attributes %}
10+
{% if attributes %}
11+
Attributes table
12+
~~~~~~~~~~~~~~~~~~
13+
14+
.. autosummary::
15+
{% for item in attributes %}
16+
~{{ fullname }}.{{ item }}
17+
{%- endfor %}
18+
{% endif %}
19+
{% endblock %}
20+
21+
{% block methods %}
22+
{% if methods %}
23+
Methods table
24+
~~~~~~~~~~~~~
25+
26+
.. autosummary::
27+
{% for item in methods %}
28+
{%- if item != '__init__' %}
29+
~{{ fullname }}.{{ item }}
30+
{%- endif -%}
31+
{%- endfor %}
32+
{% endif %}
33+
{% endblock %}
34+
35+
{% block attributes_documentation %}
36+
{% if attributes %}
37+
Attributes
38+
~~~~~~~~~~~
39+
40+
{% for item in attributes %}
41+
{{ item }}
42+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
43+
44+
.. autoattribute:: {{ [objname, item] | join(".") }}
45+
{%- endfor %}
46+
47+
{% endif %}
48+
{% endblock %}
49+
50+
{% block methods_documentation %}
51+
{% if methods %}
52+
Methods
53+
~~~~~~~
54+
55+
{% for item in methods %}
56+
{%- if item != '__init__' %}
57+
{{ item }}
58+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
59+
60+
.. automethod:: {{ [objname, item] | join(".") }}
61+
{%- endif -%}
62+
{%- endfor %}
63+
64+
{% endif %}
65+
{% endblock %}

docs/conf.py

+32-7
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,11 @@
1717
# -- Project information -----------------------------------------------------
1818

1919
info = metadata("infercnvpy")
20-
project = info["Name"]
20+
project_name = info["Name"]
2121
author = info["Author"]
2222
copyright = f"{datetime.now():%Y}, {author}."
2323
version = info["Version"]
24+
repository_url = "https://github.com/" + "grst" + "/" + project_name
2425

2526
# The full version, including alpha/beta/rc tags
2627
release = info["Version"]
@@ -33,7 +34,7 @@
3334
html_context = {
3435
"display_github": True, # Integrate GitHub
3536
"github_user": "icbi-lab", # Username
36-
"github_repo": project, # Repo name
37+
"github_repo": project_name, # Repo name
3738
"github_version": "main", # Version
3839
"conf_py_path": "/docs/", # Path in the checkout to the docs root
3940
}
@@ -43,15 +44,14 @@
4344
# Add any Sphinx extension module names here, as strings.
4445
# They can be extensions coming with Sphinx (named 'sphinx.ext.*') or your custom ones.
4546
extensions = [
46-
"myst_parser",
47+
"myst_nb",
48+
"sphinx_copybutton",
4749
"sphinx.ext.autodoc",
4850
"sphinx.ext.intersphinx",
4951
"sphinx.ext.autosummary",
5052
"sphinx.ext.napoleon",
5153
"sphinxcontrib.bibtex",
5254
"sphinx_autodoc_typehints",
53-
"scanpydoc.definition_list_typed_field",
54-
"nbsphinx",
5555
"sphinx.ext.mathjax",
5656
*[p.stem for p in (HERE / "extensions").glob("*.py")],
5757
]
@@ -65,6 +65,25 @@
6565
napoleon_use_rtype = True # having a separate entry generally helps readability
6666
napoleon_use_param = True
6767
myst_heading_anchors = 3 # create anchors for h1-h3
68+
myst_enable_extensions = [
69+
"amsmath",
70+
"colon_fence",
71+
"deflist",
72+
"dollarmath",
73+
"html_image",
74+
"html_admonition",
75+
]
76+
myst_url_schemes = ("http", "https", "mailto")
77+
nb_output_stderr = "remove"
78+
nb_execution_mode = "off"
79+
nb_merge_streams = True
80+
typehints_defaults = "braces"
81+
82+
source_suffix = {
83+
".rst": "restructuredtext",
84+
".ipynb": "myst-nb",
85+
".myst": "myst-nb",
86+
}
6887

6988
intersphinx_mapping = {
7089
"scanpy": ("https://scanpy.readthedocs.io/en/stable/", None),
@@ -95,10 +114,16 @@
95114
# The theme to use for HTML and HTML Help pages. See the documentation for
96115
# a list of builtin themes.
97116
#
98-
html_theme = "furo"
117+
html_theme = "sphinx_book_theme"
99118
html_static_path = ["_static"]
119+
html_title = project_name
120+
121+
html_theme_options = {
122+
"repository_url": repository_url,
123+
"use_repository_button": True,
124+
}
100125

101-
pygments_style = "sphinx"
126+
pygments_style = "default"
102127

103128
nitpick_ignore = [
104129
# If building the documentation fails because of a missing link that is outside your control,

0 commit comments

Comments
 (0)