Skip to content

Commit 7423f34

Browse files
committed
2 parents 909d7b8 + 3dc88eb commit 7423f34

File tree

56 files changed

+1778
-1712
lines changed

Some content is hidden

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

56 files changed

+1778
-1712
lines changed

.github/workflows/build_book.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,9 @@ jobs:
3535
v1-${{ github.ref }}
3636
v1-refs/heads/master
3737
38+
- name: Insert env-setup dropdown to all chapters
39+
run: make dropdown
40+
3841
- name: Build the JupyterBook
3942
run: make
4043

.github/workflows/build_environments.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ jobs:
1010
environments:
1111
[
1212
"jupyter-book/introduction/analysis_tools.yml",
13-
"jupyter-book/preprocessing_visualization/preprocessing.yml",
13+
"jupyter-book/preprocessing_visualization/preprocessing_visualization.yml",
1414
"jupyter-book/cellular_structure/clustering.yml",
1515
"jupyter-book/cellular_structure/annotation.yml",
1616
"jupyter-book/cellular_structure/integration.yml",

.pre-commit-config.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,11 @@ default_stages:
77
minimum_pre_commit_version: 2.16.0
88
repos:
99
- repo: https://github.com/pre-commit/mirrors-prettier
10-
rev: v2.5.1
10+
rev: v3.1.0
1111
hooks:
1212
- id: prettier
1313
- repo: https://github.com/astral-sh/ruff-pre-commit
14-
rev: v0.8.6
14+
rev: v0.9.7
1515
hooks:
1616
- id: ruff
1717
args: [--fix, --exit-non-zero-on-fix, --unsafe-fixes]

CONTRIBUTING.md

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,57 @@ All chapters are available as Jupyter Notebooks and end-to-end executable.
7575
The diverse requirements of tools for the chapters do not allow it for us to provide a single environment that can build all chapters.
7676
Hence, we decided to provide minimal Conda environments per chapter. These can be found in the respective folders.
7777

78+
## Adding changelog entries with `towncrier`
79+
80+
We use `towncrier` to manage our changelog. Here’s how to include a changelog entry when making a PR:
81+
82+
1. Install `towncrier` (only once):
83+
84+
```bash
85+
pip install towncrier
86+
```
87+
88+
2. Make your pull request as usual.
89+
90+
3. After opening your PR, note the PR number (e.g., 34), and create a changelog fragment:
91+
92+
```bash
93+
towncrier create -c 'update blah blah ([#34](https://github.com/theislab/single-cell-best-practices/pull/34)) <sub>@seohyonkim</sub>' 34.changed.md
94+
```
95+
96+
Replace "update blah blah" with a brief description of your change, PR number with your PR number, and the author of the PR with your github tag.
97+
Valid categories for the filename of the `markdown` are:
98+
99+
`added`
100+
`changed`
101+
`fixed`
102+
`removed`
103+
104+
4. This will create a `.md` file (e.g., `34.changed.md`) in the `changelog.d/` directory (at the root of the repo). Make sure this file is included in your commit.
105+
106+
5. Push your changes again.
107+
108+
### Releasing a new version (maintainers only)
109+
110+
To release a new version:
111+
112+
1. Run Towncrier to build the changelog:
113+
114+
```bash
115+
towncrier build --yes --version 2.0.0
116+
```
117+
118+
This will update `CHANGELOG.md` and remove the `changelog.d/` directory.
119+
120+
2. Add contributor names and links to the PR manually under each relevant PR entry in the generated `CHANGELOG.md`.
121+
122+
3. Recreate the `changelog.d/` directory for future PRs:
123+
124+
```bash
125+
mkdir changelog.d
126+
touch changelog.d/.gitkeep
127+
```
128+
78129
## Environment setup
79130

80131
Run the following command with the environment file of choice to create the environment for the chapter that you want to build.

Makefile

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@ JUPYTER_KERNEL := python3
44
build:
55
jupyter-book build $(JUPYTER_BOOK_DIR)
66

7+
dropdown:
8+
python3 scripts/insert_dropdown.py
9+
710
clean:
811
jupyter-book clean --all $(JUPYTER_BOOK_DIR)
912

changelog.d/345.added.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
Add `release notes`
1+
Add new feature `changelog`. Changelog fragments will be added in `changelog` chapter. ([#345](https://github.com/theislab/single-cell-best-practices/pull/345)) <sub>@seohyonkim</sub>

changelog.d/347.changed.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Add dataset generator and updatae texts in `Interoperability` chapter. ([#347](https://github.com/theislab/single-cell-best-practices/pull/347)) <sub>@seohyonkim</sub>

changelog.d/348.added.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Add env- and lamin-setup dropdown with `make dropdown`. ([#348](https://github.com/theislab/single-cell-best-practices/pull/348)) <sub>@LuisHenzlmeier</sub>

changelog.d/351.added.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Add manual to use `towncrier` in `CONTRIBUTING.md`. ([#351](https://github.com/theislab/single-cell-best-practices/pull/351)) <sub>@seohyonkim</sub>

jupyter-book/_static/book.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
document.querySelector(".prev-next-bottom").remove();
1919
document.querySelector(".footer").remove();
2020
var elementsToRemove = document.querySelectorAll(
21-
".remove-from-content-only"
21+
".remove-from-content-only",
2222
);
2323
elementsToRemove.forEach(function (el) {
2424
el.remove();
@@ -30,8 +30,8 @@
3030
var style = document.createElement("style");
3131
style.appendChild(
3232
document.createTextNode(
33-
"hypothesis-sidebar, hypothesis-notebook, hypothesis-adder{display:none!important;}"
34-
)
33+
"hypothesis-sidebar, hypothesis-notebook, hypothesis-adder{display:none!important;}",
34+
),
3535
);
3636
document.getElementsByTagName("head")[0].appendChild(style);
3737
}

0 commit comments

Comments
 (0)