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

codespell: config, workflow and typos fixed #93

Merged
merged 7 commits into from
Aug 21, 2023
Merged
Show file tree
Hide file tree
Changes from all 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
22 changes: 22 additions & 0 deletions .github/workflows/codespell.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
---
name: Codespell

on:
push:
branches: [main]
pull_request:
branches: [main]

permissions:
contents: read

jobs:
codespell:
name: Check for spelling errors
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v3
- name: Codespell
uses: codespell-project/actions-codespell@v2
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ There are a few additional specific advantages to `davos` that go beyond more ty
typical overhead of setting up a new virtual environment (or container, virtual machine, etc.), installing
third-party tools, writing and sharing configuration files, and so on. All of your code *and its dependencies* may
be contained in a single notebook file.
- using onion comments, `davos` can enable mutliple versions of the same package to be used or specified in different
- using onion comments, `davos` can enable multiple versions of the same package to be used or specified in different
parts of the same notebook. Want to use some deprecated or removed function in `scikit-learn` in one cell, but then
use one of the latest features in another? You can! Just add onion comments specifying which versions of the
package you want to `smuggle` in which cells of your notebook.
Expand Down
2 changes: 1 addition & 1 deletion davos/core/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -511,7 +511,7 @@ def _block_greedy_ipython_completer():
imports.

This is particularly problematic for packages that set
`IPython`- or notebook-specific options or behavors on import (like
`IPython`- or notebook-specific options or behaviors on import (like
`davos`) because the autocomplete mechanism imports them *outside*
the `IPython` environment. To prevent this, `davos` parses the stack
trace for any calls originating from IPython's autocomple module
Expand Down
6 changes: 3 additions & 3 deletions paper/main.tex
Original file line number Diff line number Diff line change
Expand Up @@ -440,7 +440,7 @@ \subsubsection{Projects}\label{subsec:projects}
%By default, projects are notebook-specific, but can also be shared by multiple notebooks, and can be managed interactively from within a Davos-enhanced notebook.

%%%%%%%% JEREMY VERSION %%%%%%%%%
%Installing new packages in a notebook using standard approaches (e.g., system commmands) affect the
%Installing new packages in a notebook using standard approaches (e.g., system commands) affect the
%runtime environment. This could lead to undesired behaviors. For example, running a notebook that
%installs new packages in the user’s primary system environment might alter their main system installation
%and/or containerized environment in unexpected ways (e.g., changing package versions, causing conflicts
Expand Down Expand Up @@ -792,7 +792,7 @@ \section{Illustrative Example}\label{sec:illustrative-example}
environments are the same. However, a common ``advanced'' approach
entails running the notebook server from a base environment, with
additional environments each providing their own separate,
interchangeable IPython kernels. To accomodate this multi-environment
interchangeable IPython kernels. To accommodate this multi-environment
scenario, on lines 26 and 28, we use the \texttt{pip\_executable} option to control which environments each
package should be installed to. Once these two packages are installed
and imported, line 31 smuggles \texttt{tqdm}~\cite{daCoEtal22}, which
Expand Down Expand Up @@ -861,7 +861,7 @@ \section{Impact}
incorporates its own virtual environment system that isolates
notebook-installed packages from the runtime environment
(Sec.~\ref{subsec:projects}). In many setups this feature can eliminate the
need to set up a seperate virtual environment or container (e.g., in
need to set up a separate virtual environment or container (e.g., in
conjunction with a \texttt{requirements.txt}, \texttt{project.toml}, or
\texttt{environment.yml} file specifying the project's dependencies).

Expand Down
2 changes: 1 addition & 1 deletion paper/old/main-old.tex
Original file line number Diff line number Diff line change
Expand Up @@ -649,7 +649,7 @@ \section{Illustrative Example}\label{sec:illustrative-example}
environments are the same. However, a common ``advanced'' approach
entails running the notebook server from a base environment, with
additional environments each providing their own separate,
interchangeable IPython kernels. To accomodate this multi-environment
interchangeable IPython kernels. To accommodate this multi-environment
scenario, on lines 26 and 28, we use the \texttt{pip\_executable} option to control which environments each
package should be installed to. Once these two packages are installed
and imported, line 31 smuggles \texttt{tqdm}~\cite{daCoEtal22}, which
Expand Down
6 changes: 6 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -81,3 +81,9 @@ markers = [
"ipython_post7: marks tests that should run only if IPython>=7.0.0",
"timeout: marks tests that should fail after a certain amount of time"
]

[tool.codespell]
skip = '.git,*.pdf,*.svg,*.bst,*.cls'
ignore-regex = 'doesnt/exist|Ser Davos'
#
ignore-words-list = 'covert,dateset'
2 changes: 1 addition & 1 deletion tests/test__environment_and_init.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -269,7 +269,7 @@
"source": [
"def test_config_properties_accessible_toplevel():\n",
" \"\"\"\n",
" test that davos.config fields are accesible from the top-level davos \n",
" test that davos.config fields are accessible from the top-level davos \n",
" namespace\n",
" \"\"\"\n",
" config_fields = ['active', 'auto_rerun', 'confirm_install', \n",
Expand Down
6 changes: 3 additions & 3 deletions tests/test_core.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -1159,7 +1159,7 @@
" onion comment that constrains the smuggled package version using \n",
" multiple specifiers. -v/--verbose are passed in a somewhat \n",
" unrealistic way, but it's meant to test isolating the version \n",
" specifier from other arugments both before and after it\n",
" specifier from other arguments both before and after it\n",
" `smuggle foo # pip: -v foo-pkg>=1.0.1,<2 --verbose`\n",
" \"\"\"\n",
" installer_kwargs = {\n",
Expand Down Expand Up @@ -2698,7 +2698,7 @@
"@mark.timeout(30)\n",
"def test_smuggle_pip_new():\n",
" \"\"\"\n",
" smuggle a package that does't exist locally, using 'pip' as the \n",
" smuggle a package that doesn't exist locally, using 'pip' as the \n",
" installer program\n",
" \"\"\"\n",
" assert not is_installed_include_project('ppca')\n",
Expand Down Expand Up @@ -2886,7 +2886,7 @@
"@mark.timeout(300)\n",
"def test_smuggle_github_subdirectory():\n",
" \"\"\"\n",
" smuggle a package tthat exists as a subdirectory of a larger GitHub \n",
" smuggle a package that exists as a subdirectory of a larger GitHub \n",
" repository\n",
" \"\"\"\n",
" assert not is_installed_include_project('sherlock_helpers')\n",
Expand Down
2 changes: 1 addition & 1 deletion tests/test_ipython_pre7.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -399,7 +399,7 @@
"source": [
"def test_generate_parser_func_noop():\n",
" \"\"\"\n",
" the `IPython<7.0` implementation fo `generate_parser_func` should \n",
" the `IPython<7.0` implementation of `generate_parser_func` should \n",
" simply return the single-line parser, untouched\n",
" \"\"\"\n",
" davos_parser = davos.implementations.full_parser\n",
Expand Down
4 changes: 2 additions & 2 deletions tests/test_project.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@
" `atexit.unregister(<fn>)` compares <fn> to each function in the \n",
" list with `==`, and fails silently if <fn> isn't found. This \n",
" dummy class records each object it's compared to using `==`, so \n",
" passing it to `atexit.unregister()` will extrac te list of \n",
" passing it to `atexit.unregister()` will extract the list of \n",
" currently registered functions.\n",
" \"\"\"\n",
" def __init__(self):\n",
Expand Down Expand Up @@ -840,7 +840,7 @@
" f'{_sep.join(initial_installed_pkgs)}'\n",
" )\n",
" # v4.64.1 was the last version to support Python 3.6\n",
" # pass --ignore-installed to ensure packge gets installed in project \n",
" # pass --ignore-installed to ensure package gets installed in project \n",
" # rather than using version in notebook kernel environment, just in \n",
" # case the exact requested version is installed there\n",
" smuggle tqdm # pip: tqdm==4.64.1 --ignore-installed\n",
Expand Down
Loading