diff --git a/.github/workflows/codespell.yml b/.github/workflows/codespell.yml new file mode 100644 index 00000000..3ebbf550 --- /dev/null +++ b/.github/workflows/codespell.yml @@ -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 diff --git a/README.md b/README.md index eac6b558..6f8b3b6f 100644 --- a/README.md +++ b/README.md @@ -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. diff --git a/davos/core/config.py b/davos/core/config.py index df4df1ca..00c76ac0 100644 --- a/davos/core/config.py +++ b/davos/core/config.py @@ -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 diff --git a/paper/main.tex b/paper/main.tex index b65328c7..6f69c84e 100644 --- a/paper/main.tex +++ b/paper/main.tex @@ -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 @@ -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 @@ -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). diff --git a/paper/old/main-old.tex b/paper/old/main-old.tex index b9e621a7..7a871faf 100644 --- a/paper/old/main-old.tex +++ b/paper/old/main-old.tex @@ -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 diff --git a/pyproject.toml b/pyproject.toml index 1e4ccb97..395ace0e 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -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' diff --git a/tests/test__environment_and_init.ipynb b/tests/test__environment_and_init.ipynb index 92f4f54a..7b86c7bf 100644 --- a/tests/test__environment_and_init.ipynb +++ b/tests/test__environment_and_init.ipynb @@ -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", diff --git a/tests/test_core.ipynb b/tests/test_core.ipynb index 73ad0485..baad2ff6 100644 --- a/tests/test_core.ipynb +++ b/tests/test_core.ipynb @@ -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", @@ -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", @@ -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", diff --git a/tests/test_ipython_pre7.ipynb b/tests/test_ipython_pre7.ipynb index 727e371a..1c9721d7 100644 --- a/tests/test_ipython_pre7.ipynb +++ b/tests/test_ipython_pre7.ipynb @@ -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", diff --git a/tests/test_project.ipynb b/tests/test_project.ipynb index 021078d1..00b50445 100644 --- a/tests/test_project.ipynb +++ b/tests/test_project.ipynb @@ -113,7 +113,7 @@ " `atexit.unregister()` compares to each function in the \n", " list with `==`, and fails silently if 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", @@ -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",