summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorYaroslav Halchenko <debian@onerussian.com>2023-09-12 05:58:59 -0400
committerGitHub <noreply@github.com>2023-09-12 11:58:59 +0200
commit740f4de77a131993133f63d91da4e699e00c9c58 (patch)
treecc837d1403a9d015aa9328a5cf96e53c8018484b
parentc7245f1dfbc68894f0a0be8f4dfb9f3a02a6297c (diff)
feat: add codespell (config, workflow) to catch typos + catch and fix some of those (#329)
-rw-r--r--.codespellrc6
-rw-r--r--.pre-commit-config.yaml4
-rw-r--r--README.md4
-rw-r--r--docs/advanced/advanced_tasks.mdx2
-rw-r--r--docs/advanced/multi_platform_configuration.mdx2
-rw-r--r--docs/authentication.mdx2
-rw-r--r--docs/installation.mdx2
-rw-r--r--docs/vision.mdx2
-rw-r--r--examples/README.md2
-rw-r--r--examples/opencv/README.md4
-rw-r--r--install/windows/main.wxs2
-rw-r--r--src/cli/auth.rs2
-rw-r--r--src/cli/init.rs2
-rw-r--r--src/cli/run.rs2
-rw-r--r--src/environment.rs6
-rw-r--r--src/prefix.rs2
-rw-r--r--src/project/manifest.rs2
-rw-r--r--src/project/mod.rs2
-rw-r--r--tests/install_tests.rs2
19 files changed, 31 insertions, 21 deletions
diff --git a/.codespellrc b/.codespellrc
new file mode 100644
index 0000000..38bfbcd
--- /dev/null
+++ b/.codespellrc
@@ -0,0 +1,6 @@
+[codespell]
+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
diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml
index 24c1fb0..42ff9e4 100644
--- a/.pre-commit-config.yaml
+++ b/.pre-commit-config.yaml
@@ -40,3 +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
diff --git a/README.md b/README.md
index c5ac094..9fa7cd9 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]
<a name="pixibuilt"></a>
## 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 c9f48dc..63f3b4c 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 0617065..9ba73c6 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 87ae733..d76afe6 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 9bab707..3fba8e9 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 1d31966..a78bfb6 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 74af561..878e924 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 d232e5a..245a01e 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 aab77ac..938d0ca 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 `<WixVariable Id='WixUILicenseRtf' Value='Path\to\Eula.rft'>` tag futher down
+ 2. Uncomment the `<WixVariable Id='WixUILicenseRtf' Value='Path\to\Eula.rft'>` 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 941710b..1edaabf 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/init.rs b/src/cli/init.rs
index 17e0b4e..ff0e81c 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/cli/run.rs b/src/cli/run.rs
index a04190b..85d1b8d 100644
--- a/src/cli/run.rs
+++ b/src/cli/run.rs
@@ -141,7 +141,7 @@ pub async fn create_script(task: Task, args: Vec<String>) -> miette::Result<Sequ
deno_task_shell::parser::parse(full_script.trim()).map_err(|e| miette!("{e}"))
}
-/// Executes the given command withing the specified project and with the given environment.
+/// Executes the given command within the specified project and with the given environment.
pub async fn execute_script(
script: SequentialList,
project: &Project,
diff --git a/src/environment.rs b/src/environment.rs
index fc34b5d..8ccc1ce 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<Prefix> {
// Make sure the project supports the current platform
@@ -397,7 +397,7 @@ pub async fn execute_transaction(
// Open the package cache
let package_cache = PackageCache::new(cache_dir.join("pkgs"));
- // Create an install driver which helps limit the number of concurrent fileystem operations
+ // Create an install driver which helps limit the number of concurrent filesystem operations
let install_driver = InstallDriver::default();
// Define default installation options.
@@ -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 4a7e826..b1d2811 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<PathBuf>) -> miette::Result<Self> {
let root = path.into();
Ok(Self { root })
diff --git a/src/project/manifest.rs b/src/project/manifest.rs
index dbad372..fc8666e 100644
--- a/src/project/manifest.rs
+++ b/src/project/manifest.rs
@@ -350,7 +350,7 @@ pub struct Activation {
pub scripts: Option<Vec<String>>,
}
-// 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<usize>,
diff --git a/src/project/mod.rs b/src/project/mod.rs
index 4e1e68e..c46b377 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());
}
diff --git a/tests/install_tests.rs b/tests/install_tests.rs
index 31af5d2..dc073d1 100644
--- a/tests/install_tests.rs
+++ b/tests/install_tests.rs
@@ -90,7 +90,7 @@ async fn test_incremental_lock_file() {
.unwrap();
// Force using version 2 of `foo`. This should force `foo` to version `2` but `bar` should still
- // remaing on `1` because it was previously locked
+ // remaining on `1` because it was previously locked
pixi.add("foo >=2").await.unwrap();
let lock = pixi.lock_file().await.unwrap();