From 1f723b43e34186b05e13abf102f184a3024f7912 Mon Sep 17 00:00:00 2001 From: Yaroslav Halchenko Date: Thu, 7 Sep 2023 13:28:13 -0400 Subject: [PATCH 01/11] Add github action to codespell main on push and PRs --- .github/workflows/codespell.yml | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 .github/workflows/codespell.yml diff --git a/.github/workflows/codespell.yml b/.github/workflows/codespell.yml new file mode 100644 index 000000000..3ebbf5504 --- /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 From 4a224023ea2859c3e02e31d4157d67671db429ba Mon Sep 17 00:00:00 2001 From: Yaroslav Halchenko Date: Thu, 7 Sep 2023 13:28:13 -0400 Subject: [PATCH 02/11] Add rudimentary codespell config --- .codespellrc | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 .codespellrc diff --git a/.codespellrc b/.codespellrc new file mode 100644 index 000000000..945f6b01f --- /dev/null +++ b/.codespellrc @@ -0,0 +1,4 @@ +[codespell] +skip = .git,*.pdf,*.svg,Cargo.lock,pixi.lock +# +# ignore-words-list = From 7a8be8f8aaef10bff06b201038921a5d0e9fdaf0 Mon Sep 17 00:00:00 2001 From: Yaroslav Halchenko Date: Thu, 7 Sep 2023 13:28:13 -0400 Subject: [PATCH 03/11] Add pre-commit definition for codespell --- .pre-commit-config.yaml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 24c1fb038..74b0798f0 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -40,3 +40,8 @@ repos: types: [file, rust] entry: cargo test pass_filenames: false + +- repo: https://github.com/codespell-project/codespell + rev: v2.2.5 + hooks: + - id: codespell From 49572989b92f521d1b2b3195824c877877582540 Mon Sep 17 00:00:00 2001 From: Yaroslav Halchenko Date: Thu, 7 Sep 2023 13:29:34 -0400 Subject: [PATCH 04/11] Skip some files and hits --- .codespellrc | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/.codespellrc b/.codespellrc index 945f6b01f..c2ef608bc 100644 --- a/.codespellrc +++ b/.codespellrc @@ -1,4 +1,5 @@ [codespell] -skip = .git,*.pdf,*.svg,Cargo.lock,pixi.lock -# -# ignore-words-list = +skip = .git,*.pdf,*.svg,Cargo.lock,pixi.lock,LICENSE.* +# all images and other binaries embedded in .ipynb jsons +ignore-regex = "image/png": ".*|^ *".*data:\S+;base64.* +ignore-words-list = crate,ser From 583fec4757078a4fd5bacc27e1dd49cdd553057a Mon Sep 17 00:00:00 2001 From: Yaroslav Halchenko Date: Thu, 7 Sep 2023 13:30:24 -0400 Subject: [PATCH 05/11] [DATALAD RUNCMD] Do interactive fixing of some ambigous typos === Do not change lines below === { "chain": [], "cmd": "codespell -w -i 3 -C 2", "exit": 0, "extra_inputs": [], "inputs": [], "outputs": [], "pwd": "." } ^^^ Do not change lines above ^^^ --- src/cli/init.rs | 2 +- src/environment.rs | 4 ++-- src/prefix.rs | 2 +- src/project/manifest.rs | 2 +- src/project/mod.rs | 2 +- 5 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/cli/init.rs b/src/cli/init.rs index 17e0b4ec8..ff0e81c16 100644 --- a/src/cli/init.rs +++ b/src/cli/init.rs @@ -64,7 +64,7 @@ pub async fn execute(args: Args) -> miette::Result<()> { let gitignore_path = dir.join(".gitignore"); let gitattributes_path = dir.join(".gitattributes"); - // Check if the project file doesnt already exist. We don't want to overwrite it. + // Check if the project file doesn't already exist. We don't want to overwrite it. if fs::metadata(&manifest_path).map_or(false, |x| x.is_file()) { miette::bail!("{} already exists", consts::PROJECT_MANIFEST); } diff --git a/src/environment.rs b/src/environment.rs index fc34b5df2..30529b9f0 100644 --- a/src/environment.rs +++ b/src/environment.rs @@ -34,7 +34,7 @@ use std::{ time::Duration, }; -/// Returns the prefix associated with the given environment. If the prefix doesnt exist or is not +/// Returns the prefix associated with the given environment. If the prefix doesn't exist or is not /// up to date it is updated. pub async fn get_up_to_date_prefix(project: &Project) -> miette::Result { // Make sure the project supports the current platform @@ -587,7 +587,7 @@ async fn install_package_to_environment( link: None, }; - // Create the conda-meta directory if it doesnt exist yet. + // Create the conda-meta directory if it doesn't exist yet. let target_prefix = target_prefix.to_path_buf(); match tokio::task::spawn_blocking(move || { let conda_meta_path = target_prefix.join("conda-meta"); diff --git a/src/prefix.rs b/src/prefix.rs index 4a7e82683..b1d28110e 100644 --- a/src/prefix.rs +++ b/src/prefix.rs @@ -12,7 +12,7 @@ pub struct Prefix { } impl Prefix { - /// Constructs a new instance. Returns an error if the directory doesnt exist. + /// Constructs a new instance. Returns an error if the directory doesn't exist. pub fn new(path: impl Into) -> miette::Result { let root = path.into(); Ok(Self { root }) diff --git a/src/project/manifest.rs b/src/project/manifest.rs index dbad37204..fc8666ef1 100644 --- a/src/project/manifest.rs +++ b/src/project/manifest.rs @@ -350,7 +350,7 @@ pub struct Activation { pub scripts: Option>, } -// Create an error report for usign a platform that is not supported by the project. +// Create an error report for using a platform that is not supported by the project. fn create_unsupported_platform_report( source: NamedSource, span: Range, diff --git a/src/project/mod.rs b/src/project/mod.rs index 4e1e68e1e..c46b377c9 100644 --- a/src/project/mod.rs +++ b/src/project/mod.rs @@ -445,7 +445,7 @@ impl Project { deps_table: &mut Item, spec: &MatchSpec, ) -> miette::Result<(PackageName, NamelessMatchSpec)> { - // If it doesnt exist create a proper table + // If it doesn't exist create a proper table if deps_table.is_none() { *deps_table = Item::Table(Table::new()); } From 3e73571a12fc165f0558bd392970166f7ba4c45d Mon Sep 17 00:00:00 2001 From: Yaroslav Halchenko Date: Mon, 11 Sep 2023 09:46:27 -0400 Subject: [PATCH 06/11] ignore a test case --- .codespellrc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.codespellrc b/.codespellrc index c2ef608bc..50cb7484e 100644 --- a/.codespellrc +++ b/.codespellrc @@ -1,5 +1,6 @@ [codespell] skip = .git,*.pdf,*.svg,Cargo.lock,pixi.lock,LICENSE.* # all images and other binaries embedded in .ipynb jsons -ignore-regex = "image/png": ".*|^ *".*data:\S+;base64.* +# also ignore a case in the test +ignore-regex = "image/png": ".*|^ *".*data:\S+;base64.*|verion = "2.12" ignore-words-list = crate,ser From 9815d230e3c5d10ed5f9f2ecf3e244e151dd0e7e Mon Sep 17 00:00:00 2001 From: Yaroslav Halchenko Date: Mon, 11 Sep 2023 09:46:40 -0400 Subject: [PATCH 07/11] [DATALAD RUNCMD] run codespell throughout fixing typo automagically === Do not change lines below === { "chain": [], "cmd": "codespell -w", "exit": 0, "extra_inputs": [], "inputs": [], "outputs": [], "pwd": "." } ^^^ Do not change lines above ^^^ --- README.md | 4 ++-- docs/advanced/advanced_tasks.mdx | 2 +- docs/advanced/multi_platform_configuration.mdx | 2 +- docs/authentication.mdx | 2 +- docs/installation.mdx | 2 +- docs/vision.mdx | 2 +- examples/README.md | 2 +- examples/opencv/README.md | 4 ++-- install/windows/main.wxs | 2 +- src/cli/auth.rs | 2 +- src/cli/run.rs | 2 +- src/environment.rs | 2 +- tests/install_tests.rs | 2 +- 13 files changed, 15 insertions(+), 15 deletions(-) diff --git a/README.md b/README.md index c5ac094db..9fa7cd9ca 100644 --- a/README.md +++ b/README.md @@ -94,7 +94,7 @@ The script will inform you once the installation is successful and add the ~/.pi ## Install from source -`pixi` is 100% written in Rust and therefor it can be installed, build and tested with cargo. +`pixi` is 100% written in Rust and therefore it can be installed, build and tested with cargo. To start using `pixi` from a source build run: ```shell @@ -248,4 +248,4 @@ community. [Join our discord server today!][chat-url] ## Built using pixi -To see whats being built with `pixi` check out the [Community](/docs/Community.md) page. +To see what's being built with `pixi` check out the [Community](/docs/Community.md) page. diff --git a/docs/advanced/advanced_tasks.mdx b/docs/advanced/advanced_tasks.mdx index c9f48dc18..63f3b4cf5 100644 --- a/docs/advanced/advanced_tasks.mdx +++ b/docs/advanced/advanced_tasks.mdx @@ -130,7 +130,7 @@ Next to running actual executable like `./myprogram`, `cmake` or `python` the sh ### Syntax -- **Boolean list:** use `&&` or `||` to seperate two commands. +- **Boolean list:** use `&&` or `||` to separate two commands. - `&&`: if the command before `&&` succeeds continue with the next command. - `||`: if the command before `||` fails continue with the next command. - **Sequential lists:** use `;` to run two commands without checking if the fist command failed or succeeded. diff --git a/docs/advanced/multi_platform_configuration.mdx b/docs/advanced/multi_platform_configuration.mdx index 0617065c4..9ba73c68c 100644 --- a/docs/advanced/multi_platform_configuration.mdx +++ b/docs/advanced/multi_platform_configuration.mdx @@ -110,6 +110,6 @@ To deal with this you can define your activation scripts using the target defini scripts = ["setup.sh", "local_setup.bash"] [target.win-64.activation] -scritps = ["setup.ps1", "setup.bat", "local_setup.bat"] +scripts = ["setup.ps1", "setup.bat", "local_setup.bat"] ``` When this project is run on `win-64` it will only execute the target scripts not the scripts specified in the default `activation.scripts` diff --git a/docs/authentication.mdx b/docs/authentication.mdx index 87ae73383..d76afe649 100644 --- a/docs/authentication.mdx +++ b/docs/authentication.mdx @@ -64,4 +64,4 @@ On Linux, one can use `GNOME Keyring` (or just Keyring) to access credentials th ## Fallback storage -If you run on a server with none of the aformentioned keychains available, then pixi falls back to store the credentials in an _insecure_ JSON file. This JSON file is located at `~/.rattler/rattler_auth_store.json` and contains the credentials. +If you run on a server with none of the aforementioned keychains available, then pixi falls back to store the credentials in an _insecure_ JSON file. This JSON file is located at `~/.rattler/rattler_auth_store.json` and contains the credentials. diff --git a/docs/installation.mdx b/docs/installation.mdx index 9bab70737..3fba8e94f 100644 --- a/docs/installation.mdx +++ b/docs/installation.mdx @@ -44,7 +44,7 @@ The installer will download pixi and add it to the path. ### Install from source -pixi is 100% written in Rust and therefor it can be installed, build and +pixi is 100% written in Rust and therefore it can be installed, build and tested with cargo. To start using pixi from a source build run: diff --git a/docs/vision.mdx b/docs/vision.mdx index 1d31966a1..a78bfb6b9 100644 --- a/docs/vision.mdx +++ b/docs/vision.mdx @@ -12,7 +12,7 @@ Modern package managers like `cargo` have shown us, how great a package manager We want to make pixi a great experience for everyone, so we have a few values that we want to uphold: 1. **Fast**. We want to have a fast package manager, that is able to solve the environment in a few seconds. -2. **User Friendly**. We want to have a package manager that puts user friendliness on the front-line. Providing easy, accesible and intuitive commands. That have the element of _least surprise_. +2. **User Friendly**. We want to have a package manager that puts user friendliness on the front-line. Providing easy, accessible and intuitive commands. That have the element of _least surprise_. 3. **Isolated Environment**. We want to have isolated environments, that are reproducible and easy to share. Ideally, it should run on all common platforms. The Conda packaging system provides an excellent base for this. 4. **Single Tool**. We want to integrate most common uses when working on a development project with Pixi, so it should support at least dependency management, command management, building and uploading packages. You should not need to reach to another external tool for this. 5. **Fun**. It should be fun to use pixi and not cause frustrations, you should not need to think about it a lot and it should generally just get out of your way. diff --git a/examples/README.md b/examples/README.md index 74af56193..878e92451 100644 --- a/examples/README.md +++ b/examples/README.md @@ -11,7 +11,7 @@ These are examples that are hosted in other repositories that use pixi for build ### AI -[Lama.cpp](https://github.com/tdejager/llama.cpp) +[Llama.cpp](https://github.com/tdejager/llama.cpp) ### Games diff --git a/examples/opencv/README.md b/examples/opencv/README.md index d232e5af5..245a01edb 100644 --- a/examples/opencv/README.md +++ b/examples/opencv/README.md @@ -1,5 +1,5 @@ # OpenCV example -OpenCV is a powerfull tool to do computer vision and fully opensource. +OpenCV is a powerful tool to do computer vision and fully opensource. Here are some example on how to use it with `pixi`. @@ -25,4 +25,4 @@ After that press `ESC` which will start the calibration. When the calibration is done the camera will be used again to find the distance to the checkerboard. -![callibrated camera result](https://github.com/ruben-arts/pixi/assets/12893423/f42825d7-5010-4805-9f6b-b02075395413) +![calibrated camera result](https://github.com/ruben-arts/pixi/assets/12893423/f42825d7-5010-4805-9f6b-b02075395413) diff --git a/install/windows/main.wxs b/install/windows/main.wxs index aab77ac78..938d0cabd 100644 --- a/install/windows/main.wxs +++ b/install/windows/main.wxs @@ -206,7 +206,7 @@ 1. Comment out or remove the two `Publish` tags that follow the `WixVariable` tag. - 2. Uncomment the `` tag futher down + 2. Uncomment the `` tag further down 3. Replace the `Value` attribute of the `WixVariable` tag with the path to a RTF file that will be used as the EULA and displayed in the license agreement dialog. diff --git a/src/cli/auth.rs b/src/cli/auth.rs index 941710ba3..1edaabffc 100644 --- a/src/cli/auth.rs +++ b/src/cli/auth.rs @@ -8,7 +8,7 @@ fn default_authentication_storage() -> AuthenticationStorage { AuthenticationStorage::new("rattler", &get_default_auth_store_location()) } -// moved into seperate function to access from info command +// moved into separate function to access from info command pub fn get_default_auth_store_location() -> PathBuf { dirs::home_dir().unwrap().join(".rattler") } diff --git a/src/cli/run.rs b/src/cli/run.rs index a04190bc5..85d1b8ddf 100644 --- a/src/cli/run.rs +++ b/src/cli/run.rs @@ -141,7 +141,7 @@ pub async fn create_script(task: Task, args: Vec) -> miette::Result=2").await.unwrap(); let lock = pixi.lock_file().await.unwrap(); From a9894f55538c55e4f7be8dc300e54c912fcd39de Mon Sep 17 00:00:00 2001 From: Wolf Vollprecht Date: Mon, 11 Sep 2023 17:08:27 +0200 Subject: [PATCH 08/11] skip lock files from spell check --- .codespellrc | 1 + .pre-commit-config.yaml | 9 ++++----- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.codespellrc b/.codespellrc index 50cb7484e..cade2706a 100644 --- a/.codespellrc +++ b/.codespellrc @@ -4,3 +4,4 @@ skip = .git,*.pdf,*.svg,Cargo.lock,pixi.lock,LICENSE.* # also ignore a case in the test ignore-regex = "image/png": ".*|^ *".*data:\S+;base64.*|verion = "2.12" ignore-words-list = crate,ser +skip = *.lock diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 74b0798f0..42ff9e4f1 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -40,8 +40,7 @@ repos: types: [file, rust] entry: cargo test pass_filenames: false - -- repo: https://github.com/codespell-project/codespell - rev: v2.2.5 - hooks: - - id: codespell + - repo: https://github.com/codespell-project/codespell + rev: v2.2.5 + hooks: + - id: codespell From 173e2969a80330c26d85a8ce3088a231893c7e94 Mon Sep 17 00:00:00 2001 From: Wolf Vollprecht Date: Tue, 12 Sep 2023 09:31:45 +0200 Subject: [PATCH 09/11] fix codespell config --- .codespellrc | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.codespellrc b/.codespellrc index cade2706a..38bfbcd86 100644 --- a/.codespellrc +++ b/.codespellrc @@ -1,7 +1,6 @@ [codespell] -skip = .git,*.pdf,*.svg,Cargo.lock,pixi.lock,LICENSE.* +skip = .git,*.pdf,*.svg,Cargo.lock,**/pixi.lock,install/windows/resources/LICENSE.rtf # all images and other binaries embedded in .ipynb jsons # also ignore a case in the test ignore-regex = "image/png": ".*|^ *".*data:\S+;base64.*|verion = "2.12" ignore-words-list = crate,ser -skip = *.lock From cb4b23e1ccf2bdfdaa97d47dbb810ab7de6b4f59 Mon Sep 17 00:00:00 2001 From: Wolf Vollprecht Date: Tue, 12 Sep 2023 09:34:54 +0200 Subject: [PATCH 10/11] ignore more --- .codespellrc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.codespellrc b/.codespellrc index 38bfbcd86..3a33611db 100644 --- a/.codespellrc +++ b/.codespellrc @@ -1,5 +1,5 @@ [codespell] -skip = .git,*.pdf,*.svg,Cargo.lock,**/pixi.lock,install/windows/resources/LICENSE.rtf +skip = .git,*.pdf,*.svg,Cargo.lock,**/pixi.lock,*/install/windows/resources/LICENSE.rtf # all images and other binaries embedded in .ipynb jsons # also ignore a case in the test ignore-regex = "image/png": ".*|^ *".*data:\S+;base64.*|verion = "2.12" From 76b48a687848bed4b66e56a5c33f4b084cd81d49 Mon Sep 17 00:00:00 2001 From: Wolf Vollprecht Date: Tue, 12 Sep 2023 09:35:35 +0200 Subject: [PATCH 11/11] codespell is part of pre-commit --- .codespellrc | 2 +- .github/workflows/codespell.yml | 22 ---------------------- 2 files changed, 1 insertion(+), 23 deletions(-) delete mode 100644 .github/workflows/codespell.yml diff --git a/.codespellrc b/.codespellrc index 3a33611db..38bfbcd86 100644 --- a/.codespellrc +++ b/.codespellrc @@ -1,5 +1,5 @@ [codespell] -skip = .git,*.pdf,*.svg,Cargo.lock,**/pixi.lock,*/install/windows/resources/LICENSE.rtf +skip = .git,*.pdf,*.svg,Cargo.lock,**/pixi.lock,install/windows/resources/LICENSE.rtf # all images and other binaries embedded in .ipynb jsons # also ignore a case in the test ignore-regex = "image/png": ".*|^ *".*data:\S+;base64.*|verion = "2.12" diff --git a/.github/workflows/codespell.yml b/.github/workflows/codespell.yml deleted file mode 100644 index 3ebbf5504..000000000 --- a/.github/workflows/codespell.yml +++ /dev/null @@ -1,22 +0,0 @@ ---- -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