-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #27 from ayasyrev:dev
0.0.8
- Loading branch information
Showing
17 changed files
with
393 additions
and
139 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,51 @@ | ||
repos: | ||
- repo: https://github.com/ayasyrev/nbmetaclean | ||
rev: 0.0.5 | ||
rev: 0.0.7 | ||
hooks: | ||
- id: nbclean | ||
name: nbclean | ||
entry: nbclean | ||
entry: nbclean | ||
|
||
- repo: https://github.com/pre-commit/pre-commit-hooks | ||
rev: v4.5.0 | ||
hooks: | ||
- id: check-added-large-files | ||
- id: check-ast | ||
- id: check-builtin-literals | ||
- id: check-case-conflict | ||
- id: check-docstring-first | ||
- id: check-executables-have-shebangs | ||
- id: check-shebang-scripts-are-executable | ||
- id: check-symlinks | ||
- id: check-toml | ||
- id: check-xml | ||
- id: detect-private-key | ||
- id: forbid-new-submodules | ||
- id: forbid-submodules | ||
- id: mixed-line-ending | ||
- id: destroyed-symlinks | ||
- id: fix-byte-order-marker | ||
- id: check-json | ||
- id: check-yaml | ||
args: [ --unsafe ] | ||
- id: debug-statements | ||
- id: end-of-file-fixer | ||
- id: trailing-whitespace | ||
- id: requirements-txt-fixer | ||
- repo: https://github.com/astral-sh/ruff-pre-commit | ||
# Ruff version. | ||
rev: v0.3.5 | ||
hooks: | ||
# Run the linter. | ||
- id: ruff | ||
args: [ --fix ] | ||
# Run the formatter. | ||
- id: ruff-format | ||
- repo: https://github.com/pre-commit/pygrep-hooks | ||
rev: v1.10.0 | ||
hooks: | ||
- id: python-check-mock-methods | ||
- id: python-use-type-annotations | ||
- id: python-check-blanket-noqa | ||
- id: python-use-type-annotations | ||
- id: text-unicode-replacement-char |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,34 @@ | ||
# nbmetaclean | ||
nbmetaclean | ||
|
||
Pre-commit hook to clean Jupyter Notebooks metadata, execution_count and optionally output. | ||
|
||
Pure Python, no dependencies. | ||
|
||
Can be used as a pre-commit hook or as a command line tool. | ||
|
||
## Usage | ||
|
||
### Pre-commit hook | ||
add to `.pre-commit-config.yaml`: | ||
```yaml | ||
repos: | ||
- repo: https://github.com/ayasyrev/nbmetaclean | ||
rev: 0.0.8 | ||
hooks: | ||
- id: nbclean | ||
name: nbclean | ||
entry: nbclean | ||
``` | ||
|
||
### Command line tool | ||
|
||
Install: | ||
```bash | ||
pip install nbmetaclean | ||
``` | ||
|
||
Usage: | ||
|
||
```bash | ||
nbclean | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,5 @@ | ||
import nox | ||
|
||
|
||
locations = "src/nbmetaclean", "tests", "noxfile.py" | ||
|
||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
black | ||
black[jupyter] | ||
flake8 | ||
isort | ||
mypy | ||
pre-commit | ||
ruff |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,2 @@ | ||
coverage[toml] | ||
nox | ||
black | ||
flake8 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.