Skip to content

Commit

Permalink
add codespell to prevent simple typos (#754)
Browse files Browse the repository at this point in the history
* add codespell to prevent simple typos

* fixing
  • Loading branch information
Borda authored Nov 21, 2023
1 parent 1db705a commit d05eadb
Show file tree
Hide file tree
Showing 6 changed files with 28 additions and 12 deletions.
7 changes: 7 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,13 @@ repos:
# - id: docformatter
# args: [--in-place, --wrap-summaries=120, --wrap-descriptions=120]

- repo: https://github.com/codespell-project/codespell
rev: v2.2.6
hooks:
- id: codespell
additional_dependencies: [tomli]
#args: ["--write-changes"] # uncomment if you want to get automatic fixing

- repo: https://github.com/psf/black
rev: 23.11.0
hooks:
Expand Down
18 changes: 9 additions & 9 deletions docs/changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,19 +12,19 @@
- Added “github” extra deps. to the “all” extra [PR #715](https://github.com/nteract/papermill/pull/715)
- Github actions updated to latest version [PR #732](https://github.com/nteract/papermill/pull/732)
- Added a warning if non set parameter is passed through CLI [PR #701](https://github.com/nteract/papermill/pull/701)
- Skip black formatting when encounting attribute errors [PR #699](https://github.com/nteract/papermill/pull/699)
- Removed fored deepcopy of notebook objects [PR #694](https://github.com/nteract/papermill/pull/694)
- Skip black formatting when encountering attribute errors [PR #699](https://github.com/nteract/papermill/pull/699)
- Removed forced deepcopy of notebook objects [PR #694](https://github.com/nteract/papermill/pull/694)
- Always update notebook version on execute [PR #691](https://github.com/nteract/papermill/pull/691)
- Set minimum version for tenacity [PR #682](https://github.com/nteract/papermill/pull/682)
- Removed use of ansiwrap [PR #681](https://github.com/nteract/papermill/pull/681)
- Added precommit hook [PR #678](https://github.com/nteract/papermill/pull/678)
- Added pre-commit hook [PR #678](https://github.com/nteract/papermill/pull/678)
- Added dependabot for GHA [PR #677](https://github.com/nteract/papermill/pull/677)

## 2.4.0

- Add tracking cell executions with cell descriptions [PR #650](https://github.com/nteract/papermill/pull/650)
- Fixed Azure Blob URI matching for prefixes [PR #654](https://github.com/nteract/papermill/pull/654)
- Updates HDFS handler to use PyArrow.fs.HadoopFileSystm [PR #658](https://github.com/nteract/papermill/pull/658)
- Updates HDFS handler to use `PyArrow.fs.HadoopFileSystm` [PR #658](https://github.com/nteract/papermill/pull/658)
- Drop support for Python 3.6 [PR #666](https://github.com/nteract/papermill/pull/666)
- CI Build fixes [PR #664](https://github.com/nteract/papermill/pull/664)
- Updated mock references in tests [PR #668](https://github.com/nteract/papermill/pull/668)
Expand Down Expand Up @@ -224,7 +224,7 @@ pip install papermill[all]

- Optional IO extensions are now separated into different dependencies.
- Added gs:// optional dependency for google cloud storage support.
- null json fields in parmaeters now translate correctly to equivilent fields in each supported language
- null json fields in parameters now translate correctly to equivalent fields in each supported language

### Fixes

Expand All @@ -240,7 +240,7 @@ pip install papermill[all]
### Features

- Log level can now be set with `--log-level`
- The working directory of papermill can be set with the `--cwd` option. This will set the executing context of the kernel but not impact input/output paths. `papermill --cwd foo bar/input_nb.ipynb bar/output_nb.ipynb` would make the notebook able to reference files in the `foo` directoy without `../foo` but still save the output notebook in the `bar` directory.
- The working directory of papermill can be set with the `--cwd` option. This will set the executing context of the kernel but not impact input/output paths. `papermill --cwd foo bar/input_nb.ipynb bar/output_nb.ipynb` would make the notebook able to reference files in the `foo` directory without `../foo` but still save the output notebook in the `bar` directory.
- Tox has been added for testing papermill. This makes it easier to catch linting and manifest issues without waiting for a failed Travis build.

### Fixes
Expand Down Expand Up @@ -274,7 +274,7 @@ pip install papermill[all]
- Added engines abstraction and command line argument
- Moved some nbconvert wrappers out of papermill
- Added Azure blob storage support
- Fixed botocore upgrade comptability issue (all version of boto now supported again)
- Fixed botocore upgrade compatibility issue (all version of boto now supported again)
- Removed whitelisted environment variable assignment

## 0.15.1
Expand All @@ -286,7 +286,7 @@ pip install papermill[all]
- Warnings added when an unexpected file extension is used
- Papermill version is visible to the CLI
- More messages us logging module now (and can be filtered accordingly)
- Binder link from README was greatly improved to demostrate papermill features
- Binder link from README was greatly improved to demonstrate papermill features

## 0.15.0

Expand Down Expand Up @@ -333,7 +333,7 @@ pip install papermill[all]
## 0.12.6

- Changed CLI outputs from papermill messaging to stderr
- Changed IOResolvers to perseve ordering of definition in resolving paths
- Changed IOResolvers to persevere ordering of definition in resolving paths

## 0.12.5

Expand Down
2 changes: 1 addition & 1 deletion papermill/engines.py
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ def __init__(
self.last_save_time = self.now() # Not exactly true, but simplifies testing logic
self.pbar = None
if progress_bar:
# lazy import due to implict slow ipython import
# lazy import due to implicit slow ipython import
from tqdm.auto import tqdm

self.pbar = tqdm(total=len(self.nb.cells), unit="cell", desc="Executing")
Expand Down
2 changes: 1 addition & 1 deletion papermill/exceptions.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ def __init__(self, cell_index, exec_count, source, ename, evalue, traceback):

def __str__(self):
# Standard Behavior of an exception is to produce a string representation of its arguments
# when called with str(). In order to maintain compatability with previous versions which
# when called with str(). In order to maintain compatibility with previous versions which
# passed only the message to the superclass constructor, __str__ method is implemented to
# provide the same result as was produced in the past.
message = "\n" + 75 * "-" + "\n"
Expand Down
2 changes: 1 addition & 1 deletion papermill/translators.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ def translate_list(cls, val):

@classmethod
def translate(cls, val):
"""Translate each of the standard json/yaml types to appropiate objects."""
"""Translate each of the standard json/yaml types to appropriate objects."""
if val is None:
return cls.translate_none(val)
elif isinstance(val, str):
Expand Down
9 changes: 9 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,15 @@ exclude = '''
skip-string-normalization = true


[tool.codespell]
quiet-level = 3
# comma separated list of words; waiting for:
# https://github.com/codespell-project/codespell/issues/2839#issuecomment-1731601603
# also adding links until they ignored by its: nature
# https://github.com/codespell-project/codespell/issues/2243#issuecomment-1732019960
ignore-words-list = "dne, compiletime"


[tool.ruff]
line-length = 120
# Enable Pyflakes `E` and `F` codes by default.
Expand Down

0 comments on commit d05eadb

Please sign in to comment.