Skip to content

Commit f63cde4

Browse files
committed
template update
1 parent db182f7 commit f63cde4

14 files changed

+193
-141
lines changed

.cruft.json

+21-21
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,23 @@
11
{
2-
"template": "https://github.com/scverse/cookiecutter-scverse",
3-
"commit": "7cc5403b05e299d7a4bb169c2bd8c27a2a7676f3",
4-
"checkout": null,
5-
"context": {
6-
"cookiecutter": {
7-
"project_name": "sobolev_alignment",
8-
"package_name": "sobolev_alignment",
9-
"project_description": "Sobolev alignment of deep probabilistic models for comparing single cell profiles",
10-
"author_full_name": "Soufiane Mourragui",
11-
"author_email": "soufiane.mourragui@gmail.com",
12-
"github_user": "saroudant",
13-
"project_repo": "https://github.com/saroudant/sobolev_alignment",
14-
"license": "MIT License",
15-
"_copy_without_render": [
16-
".github/workflows/**.yaml",
17-
"docs/_templates/autosummary/**.rst"
18-
],
19-
"_template": "https://github.com/scverse/cookiecutter-scverse"
20-
}
21-
},
22-
"directory": null
2+
"template": "https://github.com/scverse/cookiecutter-scverse",
3+
"commit": "c21b82bf134f3a0f13db7482d4fb04ca1f562d59",
4+
"checkout": "main",
5+
"context": {
6+
"cookiecutter": {
7+
"project_name": "sobolev_alignment",
8+
"package_name": "sobolev_alignment",
9+
"project_description": "Sobolev alignment of deep probabilistic models for comparing single cell profiles",
10+
"author_full_name": "Soufiane Mourragui",
11+
"author_email": "soufiane.mourragui@gmail.com",
12+
"github_user": "saroudant",
13+
"project_repo": "https://github.com/saroudant/sobolev_alignment",
14+
"license": "MIT License",
15+
"_copy_without_render": [
16+
".github/workflows/**.yaml",
17+
"docs/_templates/autosummary/**.rst"
18+
],
19+
"_template": "https://github.com/scverse/cookiecutter-scverse"
20+
}
21+
},
22+
"directory": null
2323
}

.flake8

-57
This file was deleted.

.github/ISSUE_TEMPLATE/bug_report.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@ body:
88
**Note**: Please read [this guide](https://matthewrocklin.com/blog/work/2018/02/28/minimal-bug-reports)
99
detailing how to provide the necessary information for us to reproduce your bug. In brief:
1010
* 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
11+
* In case it's not clear what's causing this bug, please provide the data or the data generation procedure.
12+
* Sometimes it is not possible to share the data, but usually it is possible to replicate problems on publicly
1313
available datasets or to share a subset of your data.
1414
1515
- type: textarea

.github/workflows/build.yaml

+8-2
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,21 @@ on:
66
pull_request:
77
branches: [main]
88

9+
concurrency:
10+
group: ${{ github.workflow }}-${{ github.ref }}
11+
cancel-in-progress: true
12+
913
jobs:
1014
package:
1115
runs-on: ubuntu-latest
1216
steps:
13-
- uses: actions/checkout@v2
17+
- uses: actions/checkout@v3
1418
- name: Set up Python 3.10
15-
uses: actions/setup-python@v2
19+
uses: actions/setup-python@v4
1620
with:
1721
python-version: "3.10"
22+
cache: "pip"
23+
cache-dependency-path: "**/pyproject.toml"
1824
- name: Install build dependencies
1925
run: python -m pip install --upgrade pip wheel twine build
2026
- name: Build package

.github/workflows/sync.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -43,4 +43,4 @@ jobs:
4343
manually merge these changes.**
4444
4545
For more information about the template sync, please refer to the
46-
[template documentation](https://cookiecutter-scverse-instance.readthedocs.io/en/latest/developer_docs.html#automated-template-sync).
46+
[template documentation](https://cookiecutter-scverse-instance.readthedocs.io/en/latest/template_usage.html#automated-template-sync).

.github/workflows/test.yaml

+8-14
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,10 @@ on:
66
pull_request:
77
branches: [main]
88

9+
concurrency:
10+
group: ${{ github.workflow }}-${{ github.ref }}
11+
cancel-in-progress: true
12+
913
jobs:
1014
test:
1115
runs-on: ${{ matrix.os }}
@@ -24,27 +28,17 @@ jobs:
2428
PYTHON: ${{ matrix.python }}
2529

2630
steps:
27-
- uses: actions/checkout@v2
31+
- uses: actions/checkout@v3
2832
- name: Set up Python ${{ matrix.python }}
29-
uses: actions/setup-python@v2
33+
uses: actions/setup-python@v4
3034
with:
3135
python-version: ${{ matrix.python }}
36+
cache: "pip"
37+
cache-dependency-path: "**/pyproject.toml"
3238

33-
- name: Get pip cache dir
34-
id: pip-cache-dir
35-
run: |
36-
echo "::set-output name=dir::$(pip cache dir)"
37-
- name: Restore pip cache
38-
uses: actions/cache@v2
39-
with:
40-
path: ${{ steps.pip-cache-dir.outputs.dir }}
41-
key: pip-${{ runner.os }}-${{ env.pythonLocation }}-${{ hashFiles('**/pyproject.toml') }}
42-
restore-keys: |
43-
pip-${{ runner.os }}-${{ env.pythonLocation }}-
4439
- name: Install test dependencies
4540
run: |
4641
python -m pip install --upgrade pip wheel
47-
pip install codecov
4842
- name: Install dependencies
4943
run: |
5044
pip install ".[dev,test]"

.github/workflows/test.yaml.rej

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
diff a/.github/workflows/test.yaml b/.github/workflows/test.yaml (rejected hunks)
2+
@@ -56,7 +50,4 @@ jobs:
3+
run: |
4+
pytest -v --cov --color=yes
5+
- name: Upload coverage
6+
- env:
7+
- CODECOV_NAME: ${{ matrix.python }}-${{ matrix.os }}
8+
- run: |
9+
- codecov --required --flags=unittests
10+
+ uses: codecov/codecov-action@v3

.gitignore

+4
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,13 @@
11
# Temp files
22
.DS_Store
33
*~
4+
buck-out/
45

56
# Compiled files
7+
.venv/
68
__pycache__/
9+
.mypy_cache/
10+
.ruff_cache/
711

812
# Distribution / packaging
913
/build/

.pre-commit-config.yaml

+14-18
Original file line numberDiff line numberDiff line change
@@ -7,32 +7,28 @@ default_stages:
77
minimum_pre_commit_version: 2.16.0
88
repos:
99
- repo: https://github.com/psf/black
10-
rev: 23.3.0
10+
rev: "23.3.0"
1111
hooks:
1212
- id: black
13-
- repo: https://github.com/pre-commit/mirrors-prettier
14-
rev: v3.0.0-alpha.6
15-
hooks:
16-
- id: prettier
1713
- repo: https://github.com/asottile/blacken-docs
1814
rev: 1.13.0
1915
hooks:
2016
- id: blacken-docs
21-
- repo: https://github.com/PyCQA/isort
22-
rev: 5.12.0
17+
- repo: https://github.com/pre-commit/mirrors-prettier
18+
rev: v3.0.0-alpha.6
2319
hooks:
24-
- id: isort
25-
- repo: https://github.com/asottile/yesqa
26-
rev: v1.4.0
20+
- id: prettier
21+
# Newer versions of node don't work on systems that have an older version of GLIBC
22+
# (in particular Ubuntu 18.04 and Centos 7)
23+
# EOL of Centos 7 is in 2024-06, we can probably get rid of this then.
24+
# See https://github.com/scverse/cookiecutter-scverse/issues/143 and
25+
# https://github.com/jupyterlab/jupyterlab/issues/12675
26+
language_version: "17.9.1"
27+
- repo: https://github.com/charliermarsh/ruff-pre-commit
28+
rev: v0.0.261
2729
hooks:
28-
- id: yesqa
29-
additional_dependencies:
30-
- flake8-tidy-imports
31-
- flake8-docstrings
32-
- flake8-rst-docstrings
33-
- flake8-comprehensions
34-
- flake8-bugbear
35-
- flake8-blind-except
30+
- id: ruff
31+
args: [--fix, --exit-non-zero-on-fix]
3632
- repo: https://github.com/pre-commit/pre-commit-hooks
3733
rev: v4.4.0
3834
hooks:

.pre-commit-config.yaml.rej

+33
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
diff a/.pre-commit-config.yaml b/.pre-commit-config.yaml (rejected hunks)
2+
@@ -43,31 +39,6 @@ repos:
3+
args: [--fix=lf]
4+
- id: trailing-whitespace
5+
- id: check-case-conflict
6+
- - repo: https://github.com/myint/autoflake
7+
- rev: v2.0.2
8+
- hooks:
9+
- - id: autoflake
10+
- args:
11+
- - --in-place
12+
- - --remove-all-unused-imports
13+
- - --remove-unused-variable
14+
- - --ignore-init-module-imports
15+
- - repo: https://github.com/PyCQA/flake8
16+
- rev: 6.0.0
17+
- hooks:
18+
- - id: flake8
19+
- additional_dependencies:
20+
- - flake8-tidy-imports
21+
- - flake8-docstrings
22+
- - flake8-rst-docstrings
23+
- - flake8-comprehensions
24+
- - flake8-bugbear
25+
- - flake8-blind-except
26+
- - repo: https://github.com/asottile/pyupgrade
27+
- rev: v3.3.1
28+
- hooks:
29+
- - id: pyupgrade
30+
- args: [--py3-plus, --py38-plus, --keep-runtime-typing]
31+
- repo: local
32+
hooks:
33+
- id: forbid-to-commit

docs/conf.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@
5050
napoleon_include_init_with_doc = False
5151
napoleon_use_rtype = True # having a separate entry generally helps readability
5252
napoleon_use_param = True
53-
myst_heading_anchors = 3 # create anchors for h1-h3
53+
myst_heading_anchors = 6 # create anchors for h1-h6
5454
myst_enable_extensions = [
5555
"amsmath",
5656
"colon_fence",
@@ -72,6 +72,7 @@
7272
}
7373

7474
intersphinx_mapping = {
75+
"python": ("https://docs.python.org/3", None),
7576
"anndata": ("https://anndata.readthedocs.io/en/stable/", None),
7677
"numpy": ("https://numpy.org/doc/stable/", None),
7778
}

docs/conf.py.rej

+26
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
diff a/docs/conf.py b/docs/conf.py (rejected hunks)
2+
@@ -16,12 +16,15 @@ sys.path.insert(0, str(HERE / "extensions"))
3+
4+
# -- Project information -----------------------------------------------------
5+
6+
+# NOTE: If you installed your project in editable mode, this might be stale.
7+
+# If this is the case, reinstall it to refresh the metadata
8+
info = metadata("sobolev_alignment")
9+
project_name = info["Name"]
10+
author = info["Author"]
11+
copyright = f"{datetime.now():%Y}, {author}."
12+
version = info["Version"]
13+
-repository_url = f"https://github.com/saroudant/{project_name}"
14+
+urls = dict(pu.split(", ") for pu in info.get_all("Project-URL"))
15+
+repository_url = urls["Source"]
16+
17+
# The full version, including alpha/beta/rc tags
18+
release = info["Version"]
19+
@@ -109,6 +113,7 @@ html_title = project_name
20+
html_theme_options = {
21+
"repository_url": repository_url,
22+
"use_repository_button": True,
23+
+ "path_to_docs": "docs/",
24+
}
25+
26+
pygments_style = "default"

0 commit comments

Comments
 (0)