Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DX: replace nbstripout by nb-clean #91

Closed
wants to merge 3 commits into from
Closed
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 8 additions & 9 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -33,17 +33,16 @@ repos:
.*\.py
)$

- repo: https://github.com/kynan/nbstripout
rev: 0.7.1
- repo: https://github.com/srstevenson/nb-clean
rev: 3.3.0
hooks:
- id: nbstripout
- id: nb-clean
args:
- --extra-keys
- |
cell.attachments
cell.metadata.editable
cell.metadata.id
cell.metadata.slideshow
- --remove-empty-cells
- --preserve-cell-metadata
- tags
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also keep jupyter and mystnb (see 4420106)

- slideshow
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would also remove slideshow. Only keep tags (which are used by myst-nb)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok

- --

- repo: https://github.com/pre-commit/mirrors-prettier
rev: v4.0.0-alpha.8
Expand Down
39 changes: 1 addition & 38 deletions docs/eta-pi-p/automated.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,6 @@
"cell_type": "code",
"execution_count": null,
"metadata": {
"jupyter": {
"source_hidden": true
},
"mystnb": {
"code_prompt_show": "Import Python libraries"
},
"tags": [
"hide-input"
]
Expand Down Expand Up @@ -133,9 +127,6 @@
"cell_type": "code",
"execution_count": null,
"metadata": {
"jupyter": {
"source_hidden": true
},
"tags": [
"hide-input"
]
Expand Down Expand Up @@ -183,9 +174,6 @@
"cell_type": "code",
"execution_count": null,
"metadata": {
"jupyter": {
"source_hidden": true
},
"tags": [
"hide-input",
"full-width"
Expand All @@ -201,9 +189,6 @@
"cell_type": "code",
"execution_count": null,
"metadata": {
"jupyter": {
"source_hidden": true
},
"tags": [
"hide-input"
]
Expand All @@ -222,9 +207,6 @@
"cell_type": "code",
"execution_count": null,
"metadata": {
"jupyter": {
"source_hidden": true
},
"tags": [
"hide-input"
]
Expand Down Expand Up @@ -291,9 +273,6 @@
"cell_type": "code",
"execution_count": null,
"metadata": {
"jupyter": {
"source_hidden": true
},
"tags": [
"hide-input",
"scroll-input"
Expand Down Expand Up @@ -326,12 +305,6 @@
"cell_type": "code",
"execution_count": null,
"metadata": {
"jupyter": {
"source_hidden": true
},
"mystnb": {
"code_prompt_show": "Collect resonances for each subsystem"
},
"tags": [
"hide-input"
]
Expand All @@ -353,12 +326,6 @@
"cell_type": "code",
"execution_count": null,
"metadata": {
"jupyter": {
"source_hidden": true
},
"mystnb": {
"code_prompt_show": "Design slider UI"
},
"tags": [
"hide-input"
]
Expand Down Expand Up @@ -400,9 +367,6 @@
"cell_type": "code",
"execution_count": null,
"metadata": {
"jupyter": {
"source_hidden": true
},
"tags": [
"hide-input",
"full-width",
Expand Down Expand Up @@ -502,8 +466,7 @@
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.12.5"
"pygments_lexer": "ipython3"
}
},
"nbformat": 4,
Expand Down
24 changes: 1 addition & 23 deletions docs/eta-pi-p/manual.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,6 @@
"cell_type": "code",
"execution_count": null,
"metadata": {
"mystnb": {
"code_prompt_show": "Import Python libraries"
},
"tags": [
"hide-cell"
]
Expand Down Expand Up @@ -320,9 +317,6 @@
"cell_type": "code",
"execution_count": null,
"metadata": {
"jupyter": {
"source_hidden": true
},
"tags": [
"hide-cell"
]
Expand Down Expand Up @@ -431,9 +425,6 @@
"cell_type": "code",
"execution_count": null,
"metadata": {
"jupyter": {
"source_hidden": true
},
"tags": [
"hide-input"
]
Expand Down Expand Up @@ -516,9 +507,6 @@
"cell_type": "code",
"execution_count": null,
"metadata": {
"jupyter": {
"source_hidden": true
},
"tags": [
"hide-input",
"scroll-input",
Expand Down Expand Up @@ -569,9 +557,6 @@
"cell_type": "code",
"execution_count": null,
"metadata": {
"jupyter": {
"source_hidden": true
},
"tags": [
"hide-input",
"full-width"
Expand Down Expand Up @@ -628,9 +613,6 @@
"cell_type": "code",
"execution_count": null,
"metadata": {
"jupyter": {
"source_hidden": true
},
"tags": [
"hide-input",
"full-width"
Expand Down Expand Up @@ -670,9 +652,6 @@
"cell_type": "code",
"execution_count": null,
"metadata": {
"jupyter": {
"source_hidden": true
},
"tags": [
"hide-input",
"full-width"
Expand Down Expand Up @@ -743,8 +722,7 @@
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.12.5"
"pygments_lexer": "ipython3"
}
},
"nbformat": 4,
Expand Down
16 changes: 1 addition & 15 deletions docs/eta-pi-p/pgamma-state.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -39,12 +39,6 @@
"cell_type": "code",
"execution_count": null,
"metadata": {
"jupyter": {
"source_hidden": true
},
"mystnb": {
"code_prompt_show": "Import Python libraries"
},
"tags": [
"hide-cell"
]
Expand Down Expand Up @@ -562,13 +556,6 @@
"print(\"found\", len(reaction.transitions), \"solutions!\")\n",
"reaction.get_intermediate_particles().names"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": []
}
],
"metadata": {
Expand All @@ -586,8 +573,7 @@
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.12.4"
"pygments_lexer": "ipython3"
}
},
"nbformat": 4,
Expand Down
Loading
Loading