diff --git a/.cargo/config.toml b/.cargo/config.toml index b756cd431a..8008257bee 100644 --- a/.cargo/config.toml +++ b/.cargo/config.toml @@ -79,4 +79,4 @@ rustflags = [ [target.'wasm32-unknown-unknown'] # See https://docs.rs/getrandom/latest/getrandom/#webassembly-support -rustflags = ["--cfg", 'getrandom_backend="wasm_js"'] \ No newline at end of file +rustflags = ["--cfg", 'getrandom_backend="wasm_js"'] diff --git a/.github/workflows/pre-commit.yaml b/.github/workflows/pre-commit.yaml index affab68db2..d3ee6f8eea 100644 --- a/.github/workflows/pre-commit.yaml +++ b/.github/workflows/pre-commit.yaml @@ -4,6 +4,10 @@ on: push: branches: [ "main" ] pull_request: + types: + - labeled + - synchronize + - opened jobs: pre-commit: diff --git a/.github/workflows/rust-compile.yml b/.github/workflows/rust-compile.yml index 989cbe44e3..a36f974c39 100644 --- a/.github/workflows/rust-compile.yml +++ b/.github/workflows/rust-compile.yml @@ -32,9 +32,9 @@ jobs: - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 with: submodules: recursive - - uses: actions-rust-lang/setup-rust-toolchain@fb51252c7ba57d633bc668f941da052e410add48 # v1.13.0 - - run: | - RUSTDOCFLAGS="-Dwarnings -Wunreachable-pub" cargo doc --no-deps --all --all-features + - name: Set up pixi + uses: prefix-dev/setup-pixi@14c8aabd75893f83f4ab30c03e7cf853c8208961 # v0.8.10 + - run: pixi r doc format_and_lint: name: Format and Lint @@ -43,15 +43,15 @@ jobs: - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 with: submodules: recursive + - name: Set up pixi + uses: prefix-dev/setup-pixi@14c8aabd75893f83f4ab30c03e7cf853c8208961 # v0.8.10 - uses: Swatinem/rust-cache@9d47c6ad4b02e050fd481d890b2ea34778fd09d6 # v2.7.8 with: save-if: ${{ github.ref == 'refs/heads/main' }} - - name: Install Rust toolchain - run: rustup component add clippy rustfmt - name: Run rustfmt - run: cargo fmt --all --check + run: pixi run fmt --check - name: Run clippy - run: cargo clippy --all-targets + run: pixi run lint build: name: ${{ matrix.name }} diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index a525a82bc0..d35ee85c8d 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,4 +1,7 @@ -exclude: (^.pixi/|.snap) +# Reason of exclusion: +# js-rattler/src/PackageName.test.ts: complains about valid test names in strings +# py-rattler/mkdocs.yml: complain about invalid constructor for the tag, although it is valid in mkdocs.yaml +exclude: (^.pixi/|.snap|js-rattler/src/PackageName.test.ts|py-rattler/mkdocs.yml) repos: - repo: local hooks: @@ -9,24 +12,26 @@ repos: always_run: true require_serial: true pass_filenames: false + stages: [pre-commit, manual] # pre-commit-hooks - id: check-yaml name: check-yaml entry: pixi run -e lint check-yaml language: system types: [yaml] + stages: [pre-commit, manual] - id: end-of-file name: end-of-file entry: pixi run -e lint end-of-file-fixer language: system types: [text] - stages: [commit, push, manual] + stages: [pre-commit, manual] - id: trailing-whitespace name: trailing-whitespace entry: pixi run -e lint trailing-whitespace-fixer language: system types: [text] - stages: [commit, push, manual] + stages: [pre-commit, manual] # Use ruff for python examples - id: ruff name: ruff @@ -34,18 +39,21 @@ repos: language: system types_or: [python, pyi] require_serial: true + stages: [pre-commit, manual] - id: ruff-format name: ruff-format entry: pixi run -e lint ruff format --force-exclude language: system types_or: [python, pyi] require_serial: true + stages: [pre-commit, manual] # typos - id: typos name: typos entry: pixi run -e lint typos --write-changes --force-exclude language: system types: [text] + stages: [pre-commit, manual] # Copied from Mozilla https://github.com/mozilla/grcov/blob/master/.pre-commit-config.yaml - repo: https://github.com/DevinR528/cargo-sort rev: v1.0.9 @@ -57,18 +65,20 @@ repos: name: fmt language: system types: [file, rust] - entry: cargo fmt + entry: pixi run fmt pass_filenames: false + stages: [pre-commit, manual] - id: clippy name: clippy language: system types: [file, rust] entry: cargo clippy --all-targets -- -D warnings -Dclippy::dbg_macro # Use -D warnings option to ensure the job fails when encountering warnings pass_filenames: false + stages: [pre-commit, manual] - id: test name: test language: system - stages: [push] + stages: [pre-push] types: [file, rust] entry: cargo test pass_filenames: false diff --git a/CHANGELOG.md b/CHANGELOG.md index b7ffb97243..85e42a374d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -35,13 +35,13 @@ This release contains some big changes to rattler: #### Consistent clobbering Rattler installs packages in parallel but this was at the cost of not being able to resolve files properly that existed in multiple packages. -With this release we fixed this issue by creating a consistent clobbering experience. +With this release we fixed this issue by creating a consistent clobbering experience. When a file is clobbered (installed by multiple packages) the last package in the topological ordering wins. This information is also recorded in the prefix itself which means that even if packages are added or removed from the environment the order remains consistent. #### reqwest-middleware-client -The `AuthenticatedClient` has been rewritten by @vlad-ivanov-name. +The `AuthenticatedClient` has been rewritten by @vlad-ivanov-name. Instead of having a custom client for network requests we now use the [`reqwest-middleware`](https://crates.io/crates/reqwest-middleware) crate. The rattler implementation adds a middleware that handles authentication. This changes makes it easier to integrate with other crates that use `reqwest` for network requests, and it allows users to add their own middleware. @@ -51,7 +51,7 @@ This changes makes it easier to integrate with other crates that use `reqwest` f The lock-file format has been updated to version 4. Originally our implementation was semi-compatible with [conda-lock](https://github.com/conda/conda-lock). We wanted to stay as close as possible to this format because it was already an established standard. -However, with version 2 and 3 of the format we started to diverge more and more. +However, with version 2 and 3 of the format we started to diverge more and more. We felt like the goals between both formats also started to diverge more and more so with version 4 we decided to completely abandon the conda-lock format and create our own. For more information about the lock-file format and the differences between conda-lock you can [read the documentation](https://docs.rs/rattler_lock/0.17.0/rattler_lock). Note that all old formats (including the original conda-lock format) can still be parsed by rattler. @@ -90,7 +90,7 @@ Note that all old formats (including the original conda-lock format) can still b # [0.16.2] - 2024-01-11 -### 📃 Details +### 📃 Details #### Fixed @@ -208,7 +208,7 @@ Note that all old formats (including the original conda-lock format) can still b ### ✨ Highlights -Adds support for strict priority channel ordering, channel-specific selectors, +Adds support for strict priority channel ordering, channel-specific selectors, ### 📃 Details @@ -259,7 +259,7 @@ Lock file support has been moved into its own crate (rattler_lock) and support f ### ✨ Highlights The solver has been renamed and moved to its own repository: [resolvo](https://github.com/mamba-org/resolvo). -With the latest changes to the python bindings you can now download repodata and solve environments! +With the latest changes to the python bindings you can now download repodata and solve environments! Still no official release of the bindings though, but getting closer every day. ### 📃 Details @@ -293,7 +293,7 @@ Still no official release of the bindings though, but getting closer every day. ### ✨ Highlights -This is a pretty substantial release which includes many refactors to the solver (which we will pull out of this repository at some point), initial work on Python bindings, and many many fixes. +This is a pretty substantial release which includes many refactors to the solver (which we will pull out of this repository at some point), initial work on Python bindings, and many many fixes. ### 📃 Details @@ -326,14 +326,14 @@ This is a pretty substantial release which includes many refactors to the solver * update all dependencies and fix chrono deprecation by @wolfv in [#302](https://github.com/conda/rattler/pull/302) * shell improvements for powershell env-var escaping and xonsh detection by @wolfv in [#307](https://github.com/conda/rattler/pull/307) * also export strict version by @wolfv in [#312](https://github.com/conda/rattler/pull/312) -* make FetchRepoDataOptions clonable by @Wackyator in [#321](https://github.com/conda/rattler/pull/321) +* make FetchRepoDataOptions cloneable by @Wackyator in [#321](https://github.com/conda/rattler/pull/321) * bump json-patch 1.1.0 to fix stack overflow by @baszalmstra in [#332](https://github.com/conda/rattler/pull/332) * emscripten is a unix variant by @wolfv in [#339](https://github.com/conda/rattler/pull/339) * authentication fallback storage location by @ruben-arts in [#347](https://github.com/conda/rattler/pull/347) ### 🐍 Python -Although this release doesn't include a formal release of the python bindings yet, a lot of work has been done to work towards a first version. +Although this release doesn't include a formal release of the python bindings yet, a lot of work has been done to work towards a first version. * initial version of rattler python bindings by @baszalmstra in [#279](https://github.com/conda/rattler/pull/279) * bind `Version`, `MatchSpec`, `NamelessMatchSpec` by @Wackyator in [#292](https://github.com/conda/rattler/pull/292) @@ -407,7 +407,7 @@ This release mostly contains bug fixes. #### New rust based solver implementation -This version of rattler includes a new solver implementation! +This version of rattler includes a new solver implementation! @aochagavia worked hard on porting libsolv to rust and integrating that with `rattler_solve`. The port performs slightly faster or similar to the original C code and does not contain unsafe code, is well documented, and thread-safe. Our implementation (`rattler_libsolv_rs`) is specific to solving conda packages by leveraging `rattler_conda_types` for matching and parsing. @@ -452,7 +452,7 @@ Caching the result of an activation script can be useful if you need to invoke m - Run activation scripts and capture their output by @baszalmstra in ([#239](https://github.com/conda/rattler/pull/239)) - Support for sha256 and md5 field in matchspec by @0xbe7a in ([#241](https://github.com/conda/rattler/pull/241)) -- A rust port of libsolv as an additional solver backend by @aochagavia, @baszalmstra in ([#243](https://github.com/conda/rattler/pull/243) & [#253](https://github.com/conda/rattler/pull/253)) +- A rust port of libsolv as an additional solver backend by @aochagavia, @baszalmstra in ([#243](https://github.com/conda/rattler/pull/243) & [#253](https://github.com/conda/rattler/pull/253)) - Test cases and benchmarks for solver implementations by @baszalmstra in ([#250](https://github.com/conda/rattler/pull/249) & [#250](https://github.com/conda/rattler/pull/249)) - The ability to add a dependency from `python` on `pip` while loading repodata @wolfv in ([#238](https://github.com/conda/rattler/pull/238)) @@ -549,8 +549,8 @@ A new crate has been added to facilitate authentication when downloading repodat #### Added - Support for detecting more platforms ([#135](https://github.com/conda/rattler/pull/135)) -- `RepoData` is now clonable ([#138](https://github.com/conda/rattler/pull/138)) -- `RunExportsJson` is now clonable ([#169](https://github.com/conda/rattler/pull/169)) +- `RepoData` is now cloneable ([#138](https://github.com/conda/rattler/pull/138)) +- `RunExportsJson` is now cloneable ([#169](https://github.com/conda/rattler/pull/169)) - `file://` urls are now supported for package extraction functions ([#157](https://github.com/conda/rattler/pull/157)) - `file://` urls are now supported for repodata fetching ([#158](https://github.com/conda/rattler/pull/158)) - Getting started with rattler using micromamba ([#163](https://github.com/conda/rattler/pull/163)) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index d24460277c..29ec1f8d0c 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -5,7 +5,7 @@ For a good list of things you could help us with, take a look at our [*good firs If you want to go deeper though, any [open issue](https://github.com/conda/rattler/issues) is up for grabs. Just let us know what you start on something. -For questions, requests or a casual chat, we are very active on our discord server. +For questions, requests or a casual chat, we are very active on our discord server. You can [join our discord server via this link][chat-url]. ## Development @@ -20,7 +20,7 @@ You can use [pixi](https://github.com/prefix-dev/pixi) for setting up the enviro ``` ### Virtual env with conda/mamba -The environment can also be managed with conda using the spec in `environments.yml` in the project root. +The environment can also be managed with conda using the spec in `environments.yml` in the project root. As below, ```sh ❱ git submodule update --init @@ -28,6 +28,3 @@ As below, ❱ cargo build # uses cargo from your mamba venv ❱ mamba deactivate # don't forget you're in the venv ``` - - - diff --git a/README.md b/README.md index 1f6a8396a7..5ffc337653 100644 --- a/README.md +++ b/README.md @@ -32,7 +32,7 @@ Rattler is a library that provides common functionality used within the conda ec The goal of the library is to enable programs and other libraries to easily interact with the conda ecosystem without being dependent on Python. Its primary use case is as a library that you can use to provide conda related workflows in your own tools. -Rattler is written in Rust and tries to provide a clean API to its functionalities (see: [Components](#components)). +Rattler is written in Rust and tries to provide a clean API to its functionalities (see: [Components](#components)). With the primary goal in mind we aim to provide bindings to different languages to make it easy to integrate Rattler in non-rust projects. Rattler is actively used by [pixi](https://github.com/prefix-dev/pixi), [rattler-build](https://github.com/prefix-dev/rattler-build), and the https://prefix.dev backend. @@ -54,7 +54,7 @@ To install the Python bindings, you can use pip or conda: ```bash pip install py-rattler -# or +# or conda install -c conda-forge py-rattler ``` @@ -142,24 +142,24 @@ Run the following command to start jupyterlab: ./.prefix/bin/jupyter-lab ``` -Voila! -You have a working installation of jupyterlab installed on your system! -You can of course install any package you want this way. +Voila! +You have a working installation of jupyterlab installed on your system! +You can of course install any package you want this way. Try it! ## Contributing 😍 -We would love to have you contribute! -See the CONTRIBUTION.md for more info. For questions, requests or a casual chat, we are very active on our discord server. +We would love to have you contribute! +See the CONTRIBUTION.md for more info. For questions, requests or a casual chat, we are very active on our discord server. You can [join our discord server via this link][chat-url]. ## Components -Rattler consists of several crates that provide different functionalities. +Rattler consists of several crates that provide different functionalities. * **rattler_conda_types**: foundational types for all datastructures used within the conda eco-system. -* **rattler_package_streaming**: provides functionality to download, extract and create conda package archives. +* **rattler_package_streaming**: provides functionality to download, extract and create conda package archives. * **rattler_repodata_gateway**: downloads, reads and processes information about existing conda packages from an index. * **rattler_shell**: code to activate an existing environment and run programs in it. * **rattler_solve**: a backend agnostic library to solve the package satisfiability problem. diff --git a/crates/rattler-bin/src/commands/create.rs b/crates/rattler-bin/src/commands/create.rs index b30fe7ebe8..a55760f4a3 100644 --- a/crates/rattler-bin/src/commands/create.rs +++ b/crates/rattler-bin/src/commands/create.rs @@ -200,7 +200,7 @@ pub async fn create(opt: Opt) -> anyhow::Result<()> { .await .context("failed to load repodata")?; - // Determine the number of recors + // Determine the number of records let total_records: usize = repo_data.iter().map(RepoData::len).sum(); println!( "Loaded {} records in {:?}", diff --git a/crates/rattler/CHANGELOG.md b/crates/rattler/CHANGELOG.md index ba485a0667..3729ee3bb4 100644 --- a/crates/rattler/CHANGELOG.md +++ b/crates/rattler/CHANGELOG.md @@ -473,4 +473,3 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - every crate should have its own version ([#557](https://github.com/conda/rattler/pull/557)) ## [0.19.0](https://github.com/baszalmstra/rattler/compare/rattler-v0.18.0...rattler-v0.19.0) - 2024-02-26 - diff --git a/crates/rattler_cache/src/package_cache/mod.rs b/crates/rattler_cache/src/package_cache/mod.rs index 24811c4465..dae8e79ec8 100644 --- a/crates/rattler_cache/src/package_cache/mod.rs +++ b/crates/rattler_cache/src/package_cache/mod.rs @@ -447,9 +447,11 @@ where } else if !cache_dir_exists { tracing::debug!("cache directory does not exist, fetching package"); } else if hash_mismatch { - tracing::warn!("hash mismatch, wanted a package with hash {} but the cached package has hash {}, fetching package", + tracing::warn!( + "hash mismatch, wanted a package with hash {} but the cached package has hash {}, fetching package", given_sha.map_or(String::from(""), |s| format!("{s:x}")), - locked_sha256.map_or(String::from(""), |s| format!("{s:x}"))); + locked_sha256.map_or(String::from(""), |s| format!("{s:x}")) + ); } // If the cache is stale, we need to fetch the package again. We have to acquire @@ -850,7 +852,7 @@ mod test { let file_name = get_file_name_from_path(cache_lock_without_origin_hash.path()); let path_hash = compute_bytes_digest::(package_path.to_string_lossy().as_bytes()); - let expected_file_name = format!("clobber-python-0.1.0-cpython-{:x}", path_hash); + let expected_file_name = format!("clobber-python-0.1.0-cpython-{path_hash:x}"); assert_eq!(file_name, expected_file_name); } diff --git a/crates/rattler_cache/src/run_exports_cache/mod.rs b/crates/rattler_cache/src/run_exports_cache/mod.rs index c189a119aa..6cd39caaf4 100644 --- a/crates/rattler_cache/src/run_exports_cache/mod.rs +++ b/crates/rattler_cache/src/run_exports_cache/mod.rs @@ -336,11 +336,11 @@ pub enum RunExportsCacheError { #[error("{0}")] Persist(#[from] PersistError), - /// An error occured when extracting `run_exports` from archive + /// An error occurred when extracting `run_exports` from archive #[error(transparent)] Extract(#[from] ExtractError), - /// An error occured when serializing `run_exports` + /// An error occurred when serializing `run_exports` #[error(transparent)] Serialize(#[from] serde_json::Error), diff --git a/crates/rattler_conda_types/src/match_spec/parse.rs b/crates/rattler_conda_types/src/match_spec/parse.rs index a88b2ce99a..5218503643 100644 --- a/crates/rattler_conda_types/src/match_spec/parse.rs +++ b/crates/rattler_conda_types/src/match_spec/parse.rs @@ -75,7 +75,8 @@ pub enum ParseMatchSpecError { InvalidVersionAndBuild(String), /// Invalid build string - #[error("the build string '{0}' is not valid, it can only contain alphanumeric characters and underscores" + #[error( + "the build string '{0}' is not valid, it can only contain alphanumeric characters and underscores" )] InvalidBuildString(String), @@ -1349,7 +1350,10 @@ mod tests { let err = MatchSpec::from_str("bla/bla", Strict) .expect_err("Should try to parse as name not url"); - assert_eq!(err.to_string(), "'bla/bla' is not a valid package name. Package names can only contain 0-9, a-z, A-Z, -, _, or ."); + assert_eq!( + err.to_string(), + "'bla/bla' is not a valid package name. Package names can only contain 0-9, a-z, A-Z, -, _, or ." + ); } #[test] @@ -1469,7 +1473,7 @@ mod tests { .unwrap(); let version_spec = match_spec.version.unwrap(); let version = Version::from_str("0.4.1").unwrap(); - assert!(version_spec.matches(&version)) + assert!(version_spec.matches(&version)); } #[cfg(feature = "experimental_extras")] diff --git a/crates/rattler_conda_types/src/utils/serde.rs b/crates/rattler_conda_types/src/utils/serde.rs index 89aa54bcd2..feca9c4b8b 100644 --- a/crates/rattler_conda_types/src/utils/serde.rs +++ b/crates/rattler_conda_types/src/utils/serde.rs @@ -157,7 +157,7 @@ pub(crate) fn sort_map_alphabetically( } /// A helper to serialize and deserialize `track_features` in repodata. Track -/// features are expected to be a space seperated list. However, in the past we +/// features are expected to be a space separated list. However, in the past we /// have serialized and deserialized them as a list of strings so for /// deserialization that behavior is retained. pub struct Features; diff --git a/crates/rattler_config/CHANGELOG.md b/crates/rattler_config/CHANGELOG.md index 1a3c3bc0b2..f28b85eda5 100644 --- a/crates/rattler_config/CHANGELOG.md +++ b/crates/rattler_config/CHANGELOG.md @@ -20,7 +20,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - add `rattler_config` crate (derived from `pixi_config`) ([#1389](https://github.com/conda/rattler/pull/1389)) - better readme ([#118](https://github.com/conda/rattler/pull/118)) - replace zulip with discord ([#116](https://github.com/conda/rattler/pull/116)) -- move all conda types to seperate crate +- move all conda types to separate crate ### Fixed diff --git a/crates/rattler_lock/src/parse/serialize.rs b/crates/rattler_lock/src/parse/serialize.rs index 081fa91555..96287f1a1d 100644 --- a/crates/rattler_lock/src/parse/serialize.rs +++ b/crates/rattler_lock/src/parse/serialize.rs @@ -171,7 +171,7 @@ impl<'a> SerializablePackageSelector<'a> { .filter(|p| p.location() == package.location()) .collect::>(); - // Iterate over other distinguising factors and reduce the set of possible + // Iterate over other distinguishing factors and reduce the set of possible // packages to a minimum with the least number of keys added. let mut name = None; let mut version = None; diff --git a/crates/rattler_lock/src/url_or_path.rs b/crates/rattler_lock/src/url_or_path.rs index 407c82528c..830d9a285a 100644 --- a/crates/rattler_lock/src/url_or_path.rs +++ b/crates/rattler_lock/src/url_or_path.rs @@ -149,7 +149,7 @@ impl UrlOrPath { } /// Returns the file name of the path or url. If the path or url ends in a - /// directory seperator `None` is returned. + /// directory separator `None` is returned. pub fn file_name(&self) -> Option<&str> { match self { UrlOrPath::Path(path) if !path.as_str().ends_with(['/', '\\']) => path.file_name(), diff --git a/crates/rattler_menuinst/CHANGELOG.md b/crates/rattler_menuinst/CHANGELOG.md index feabcf7aec..f669a0eae7 100644 --- a/crates/rattler_menuinst/CHANGELOG.md +++ b/crates/rattler_menuinst/CHANGELOG.md @@ -118,7 +118,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - add `rattler_menuinst` crate (#840) - better readme (#118) - replace zulip with discord (#116) -- move all conda types to seperate crate +- move all conda types to separate crate ### Fixed diff --git a/crates/rattler_menuinst/src/schema.rs b/crates/rattler_menuinst/src/schema.rs index ef5e04369d..8605677129 100644 --- a/crates/rattler_menuinst/src/schema.rs +++ b/crates/rattler_menuinst/src/schema.rs @@ -427,12 +427,12 @@ pub struct MacOS { /// Build version number for the bundle. In the context of 'menuinst' /// this can be used to signal a new version of the menu item for the same - /// application version. + /// application version. #[serde(rename = "CFBundleVersion")] pub cf_bundle_version: Option, /// URL types supported by this app. Requires setting `event_handler` too. - /// Note this feature requires macOS 10.15+. + /// Note this feature requires macOS 10.15+. #[serde(rename = "CFBundleURLTypes")] pub cf_bundle_url_types: Option>, diff --git a/crates/rattler_menuinst/test-data/defaults/defaults.json b/crates/rattler_menuinst/test-data/defaults/defaults.json index 56499b3f76..3f18d0beae 100644 --- a/crates/rattler_menuinst/test-data/defaults/defaults.json +++ b/crates/rattler_menuinst/test-data/defaults/defaults.json @@ -65,4 +65,4 @@ } ], "$schema": "https://schemas.conda.org/menuinst-1.schema.json" - } \ No newline at end of file + } diff --git a/crates/rattler_menuinst/test-data/gnuradio/gnuradio-grc.json b/crates/rattler_menuinst/test-data/gnuradio/gnuradio-grc.json index a890200dbd..c0cf7fd63e 100644 --- a/crates/rattler_menuinst/test-data/gnuradio/gnuradio-grc.json +++ b/crates/rattler_menuinst/test-data/gnuradio/gnuradio-grc.json @@ -18,4 +18,4 @@ } } ] -} \ No newline at end of file +} diff --git a/crates/rattler_menuinst/test-data/gqrx/gqrx-menu.json b/crates/rattler_menuinst/test-data/gqrx/gqrx-menu.json index c3785329bf..c5747f9993 100644 --- a/crates/rattler_menuinst/test-data/gqrx/gqrx-menu.json +++ b/crates/rattler_menuinst/test-data/gqrx/gqrx-menu.json @@ -35,4 +35,4 @@ } } ] -} \ No newline at end of file +} diff --git a/crates/rattler_menuinst/test-data/mne/menu.json b/crates/rattler_menuinst/test-data/mne/menu.json index 4c212c4ce2..f90cf6149c 100644 --- a/crates/rattler_menuinst/test-data/mne/menu.json +++ b/crates/rattler_menuinst/test-data/mne/menu.json @@ -165,4 +165,4 @@ } } }] - } \ No newline at end of file + } diff --git a/crates/rattler_networking/src/authentication_storage/backends/memory.rs b/crates/rattler_networking/src/authentication_storage/backends/memory.rs index bdec7880f9..707639b828 100644 --- a/crates/rattler_networking/src/authentication_storage/backends/memory.rs +++ b/crates/rattler_networking/src/authentication_storage/backends/memory.rs @@ -45,7 +45,7 @@ impl StorageBackend for MemoryStorage { let mut store = self .store .lock() - .map_err(|_| MemoryStorageError::LockError)?; + .map_err(|_err| MemoryStorageError::LockError)?; store.insert(host.to_string(), authentication.clone()); Ok(()) } @@ -54,7 +54,7 @@ impl StorageBackend for MemoryStorage { let store = self .store .lock() - .map_err(|_| MemoryStorageError::LockError)?; + .map_err(|_err| MemoryStorageError::LockError)?; Ok(store.get(host).cloned()) } @@ -62,7 +62,7 @@ impl StorageBackend for MemoryStorage { let mut store = self .store .lock() - .map_err(|_| MemoryStorageError::LockError)?; + .map_err(|_err| MemoryStorageError::LockError)?; store.remove(host); Ok(()) } diff --git a/crates/rattler_networking/src/authentication_storage/backends/netrc.rs b/crates/rattler_networking/src/authentication_storage/backends/netrc.rs index dffe4a307c..8a5e8a8f68 100644 --- a/crates/rattler_networking/src/authentication_storage/backends/netrc.rs +++ b/crates/rattler_networking/src/authentication_storage/backends/netrc.rs @@ -32,7 +32,7 @@ pub enum NetRcStorageError { } impl NetRcStorage { - /// Create a new fallback storage by retrieving the netrc file from the user environment. + /// Create a new fallback storage by retrieving the netrc file from the user environment. /// This uses the same environment variable as curl and will read the file from $NETRC /// falling back to `~/.netrc`. /// diff --git a/crates/rattler_repodata_gateway/src/gateway/mod.rs b/crates/rattler_repodata_gateway/src/gateway/mod.rs index e8f020c405..7565a91701 100644 --- a/crates/rattler_repodata_gateway/src/gateway/mod.rs +++ b/crates/rattler_repodata_gateway/src/gateway/mod.rs @@ -46,7 +46,7 @@ use crate::{gateway::subdir_builder::SubdirBuilder, Reporter}; /// /// The gateway is thread-safe and can be shared between multiple threads. The /// gateway struct itself uses internal reference counting and is cheaply -/// clonable. There is no need to wrap the gateway in an `Arc`. +/// cloneable. There is no need to wrap the gateway in an `Arc`. #[derive(Clone)] pub struct Gateway { inner: Arc, diff --git a/crates/rattler_shell/src/activation.rs b/crates/rattler_shell/src/activation.rs index 8c7c9c3057..6796302665 100644 --- a/crates/rattler_shell/src/activation.rs +++ b/crates/rattler_shell/src/activation.rs @@ -244,7 +244,8 @@ fn collect_env_vars(prefix: &Path) -> Result, Activatio env_vars.insert(key.to_string(), value.to_string()); } else { tracing::warn!( - "WARNING: environment variable {key} has no string value (path: {env_var_file:?})"); + "WARNING: environment variable {key} has no string value (path: {env_var_file:?})" + ); } } } @@ -267,14 +268,16 @@ fn collect_env_vars(prefix: &Path) -> Result, Activatio for (key, value) in state_env_vars { if state_env_vars.contains_key(key) { tracing::warn!( - "WARNING: environment variable {key} already defined in packages (path: {state_file:?})"); + "WARNING: environment variable {key} already defined in packages (path: {state_file:?})" + ); } if let Some(value) = value.as_str() { env_vars.insert(key.to_uppercase(), value.to_string()); } else { tracing::warn!( - "WARNING: environment variable {key} has no string value (path: {state_file:?})"); + "WARNING: environment variable {key} has no string value (path: {state_file:?})" + ); } } } @@ -1093,7 +1096,7 @@ mod tests { platform: Platform::current(), }; - // CONDA_SHLVL to set to the initial leve ( 1 meaning that it's activated) + // CONDA_SHLVL to set to the initial level ( 1 meaning that it's activated) let test_env = HashMap::from([ ("CONDA_SHLVL".to_string(), "1".to_string()), ( @@ -1242,7 +1245,7 @@ mod tests { } #[test] - fn test_reseting_conda_shlvl() { + fn test_resetting_conda_shlvl() { let tmp_dir = TempDir::new("test_deactivation").unwrap(); let tmp_dir_path = tmp_dir.path(); @@ -1301,7 +1304,7 @@ mod tests { } insta::assert_snapshot!( - format!("test_reseting_conda_shlvl{}", shell_name), + format!("test_resetting_conda_shlvl{}", shell_name), script_contents ); } diff --git a/crates/rattler_shell/src/shell/mod.rs b/crates/rattler_shell/src/shell/mod.rs index 684c6c9670..32632fa7e0 100644 --- a/crates/rattler_shell/src/shell/mod.rs +++ b/crates/rattler_shell/src/shell/mod.rs @@ -286,7 +286,7 @@ impl Shell for Bash { fn run_script(&self, f: &mut impl Write, path: &Path) -> ShellResult { let lossy_path = path.to_string_lossy(); let quoted_path = shlex::try_quote(&lossy_path).unwrap_or_default(); - Ok(writeln!(f, ". {}", quoted_path)?) + Ok(writeln!(f, ". {quoted_path}")?) } fn set_path( @@ -369,7 +369,7 @@ impl Shell for Bash { } else { completions_dir.to_string_lossy().to_string() }; - writeln!(f, "source {}/*", completions_dir_str)?; + writeln!(f, "source {completions_dir_str}/*")?; } Ok(()) } @@ -647,7 +647,10 @@ impl Default for PowerShell { impl Shell for PowerShell { fn force_utf8(&self, f: &mut impl Write) -> ShellResult { // Taken from https://stackoverflow.com/a/49481797 - Ok(writeln!(f, "$OutputEncoding = [System.Console]::OutputEncoding = [System.Console]::InputEncoding = [System.Text.Encoding]::UTF8")?) + Ok(writeln!( + f, + "$OutputEncoding = [System.Console]::OutputEncoding = [System.Console]::InputEncoding = [System.Text.Encoding]::UTF8" + )?) } fn set_env_var(&self, f: &mut impl Write, env_var: &str, value: &str) -> ShellResult { diff --git a/crates/rattler_shell/src/snapshots/rattler_shell__activation__tests__test_resetting_conda_shlvlbash.snap b/crates/rattler_shell/src/snapshots/rattler_shell__activation__tests__test_resetting_conda_shlvlbash.snap new file mode 100644 index 0000000000..f619327a45 --- /dev/null +++ b/crates/rattler_shell/src/snapshots/rattler_shell__activation__tests__test_resetting_conda_shlvlbash.snap @@ -0,0 +1,17 @@ +--- +source: crates/rattler_shell/src/activation.rs +expression: script_contents +--- +if [ -n "${CONDA_ENV_SHLVL_1_TEST_VAR1:-}" ]; then + TEST_VAR1="${CONDA_ENV_SHLVL_1_TEST_VAR1}" + unset CONDA_ENV_SHLVL_1_TEST_VAR1 + else + unset TEST_VAR1 + fi +if [ -n "${CONDA_ENV_SHLVL_1_CONDA_PREFIX:-}" ]; then + CONDA_PREFIX="${CONDA_ENV_SHLVL_1_CONDA_PREFIX}" + unset CONDA_ENV_SHLVL_1_CONDA_PREFIX + else + unset CONDA_PREFIX + fi +unset CONDA_SHLVL diff --git a/crates/rattler_shell/src/snapshots/rattler_shell__activation__tests__test_resetting_conda_shlvlcmd.snap b/crates/rattler_shell/src/snapshots/rattler_shell__activation__tests__test_resetting_conda_shlvlcmd.snap new file mode 100644 index 0000000000..cf3f271381 --- /dev/null +++ b/crates/rattler_shell/src/snapshots/rattler_shell__activation__tests__test_resetting_conda_shlvlcmd.snap @@ -0,0 +1,18 @@ +--- +source: crates/rattler_shell/src/activation.rs +expression: script_contents +--- +@chcp 65001 > nul +if defined CONDA_ENV_SHLVL_1_TEST_VAR1 ( + set "TEST_VAR1=%CONDA_ENV_SHLVL_1_TEST_VAR1%" + set "CONDA_ENV_SHLVL_1_TEST_VAR1=" + ) else ( + set "TEST_VAR1=" + ) +if defined CONDA_ENV_SHLVL_1_CONDA_PREFIX ( + set "CONDA_PREFIX=%CONDA_ENV_SHLVL_1_CONDA_PREFIX%" + set "CONDA_ENV_SHLVL_1_CONDA_PREFIX=" + ) else ( + set "CONDA_PREFIX=" + ) +@SET CONDA_SHLVL= diff --git a/crates/rattler_shell/src/snapshots/rattler_shell__activation__tests__test_resetting_conda_shlvlfish.snap b/crates/rattler_shell/src/snapshots/rattler_shell__activation__tests__test_resetting_conda_shlvlfish.snap new file mode 100644 index 0000000000..cf73e724cb --- /dev/null +++ b/crates/rattler_shell/src/snapshots/rattler_shell__activation__tests__test_resetting_conda_shlvlfish.snap @@ -0,0 +1,17 @@ +--- +source: crates/rattler_shell/src/activation.rs +expression: script_contents +--- +if set -q CONDA_ENV_SHLVL_1_TEST_VAR1 + set -gx TEST_VAR1 $CONDA_ENV_SHLVL_1_TEST_VAR1 + set -e CONDA_ENV_SHLVL_1_TEST_VAR1 + else + set -e TEST_VAR1 + end +if set -q CONDA_ENV_SHLVL_1_CONDA_PREFIX + set -gx CONDA_PREFIX $CONDA_ENV_SHLVL_1_CONDA_PREFIX + set -e CONDA_ENV_SHLVL_1_CONDA_PREFIX + else + set -e CONDA_PREFIX + end +set -e CONDA_SHLVL diff --git a/crates/rattler_shell/src/snapshots/rattler_shell__activation__tests__test_resetting_conda_shlvlnushell.snap b/crates/rattler_shell/src/snapshots/rattler_shell__activation__tests__test_resetting_conda_shlvlnushell.snap new file mode 100644 index 0000000000..43d8a57f6a --- /dev/null +++ b/crates/rattler_shell/src/snapshots/rattler_shell__activation__tests__test_resetting_conda_shlvlnushell.snap @@ -0,0 +1,17 @@ +--- +source: crates/rattler_shell/src/activation.rs +expression: script_contents +--- +if ($env | get CONDA_ENV_SHLVL_1_TEST_VAR1?) { + $env.TEST_VAR1 = $env.CONDA_ENV_SHLVL_1_TEST_VAR1 + $env = $env | reject CONDA_ENV_SHLVL_1_TEST_VAR1 + } else { + $env = $env | reject TEST_VAR1 + } +if ($env | get CONDA_ENV_SHLVL_1_CONDA_PREFIX?) { + $env.CONDA_PREFIX = $env.CONDA_ENV_SHLVL_1_CONDA_PREFIX + $env = $env | reject CONDA_ENV_SHLVL_1_CONDA_PREFIX + } else { + $env = $env | reject CONDA_PREFIX + } +hide-env CONDA_SHLVL diff --git a/crates/rattler_shell/src/snapshots/rattler_shell__activation__tests__test_resetting_conda_shlvlpowershell.snap b/crates/rattler_shell/src/snapshots/rattler_shell__activation__tests__test_resetting_conda_shlvlpowershell.snap new file mode 100644 index 0000000000..5e52ad9f63 --- /dev/null +++ b/crates/rattler_shell/src/snapshots/rattler_shell__activation__tests__test_resetting_conda_shlvlpowershell.snap @@ -0,0 +1,18 @@ +--- +source: crates/rattler_shell/src/activation.rs +expression: script_contents +--- +$OutputEncoding = [System.Console]::OutputEncoding = [System.Console]::InputEncoding = [System.Text.Encoding]::UTF8 +if (Test-Path env:CONDA_ENV_SHLVL_1_TEST_VAR1) { + $env:TEST_VAR1 = $env:CONDA_ENV_SHLVL_1_TEST_VAR1 + Remove-Item env:CONDA_ENV_SHLVL_1_TEST_VAR1 + } else { + Remove-Item env:TEST_VAR1 -ErrorAction SilentlyContinue + } +if (Test-Path env:CONDA_ENV_SHLVL_1_CONDA_PREFIX) { + $env:CONDA_PREFIX = $env:CONDA_ENV_SHLVL_1_CONDA_PREFIX + Remove-Item env:CONDA_ENV_SHLVL_1_CONDA_PREFIX + } else { + Remove-Item env:CONDA_PREFIX -ErrorAction SilentlyContinue + } +${Env:CONDA_SHLVL}="" diff --git a/crates/rattler_shell/src/snapshots/rattler_shell__activation__tests__test_resetting_conda_shlvlxonsh.snap b/crates/rattler_shell/src/snapshots/rattler_shell__activation__tests__test_resetting_conda_shlvlxonsh.snap new file mode 100644 index 0000000000..58326c92eb --- /dev/null +++ b/crates/rattler_shell/src/snapshots/rattler_shell__activation__tests__test_resetting_conda_shlvlxonsh.snap @@ -0,0 +1,15 @@ +--- +source: crates/rattler_shell/src/activation.rs +expression: script_contents +--- +if CONDA_ENV_SHLVL_1_TEST_VAR1 in $env: + $env[TEST_VAR1] = $env[CONDA_ENV_SHLVL_1_TEST_VAR1] + del $env[CONDA_ENV_SHLVL_1_TEST_VAR1] + else: + del $env[TEST_VAR1] +if CONDA_ENV_SHLVL_1_CONDA_PREFIX in $env: + $env[CONDA_PREFIX] = $env[CONDA_ENV_SHLVL_1_CONDA_PREFIX] + del $env[CONDA_ENV_SHLVL_1_CONDA_PREFIX] + else: + del $env[CONDA_PREFIX] +del $CONDA_SHLVL diff --git a/crates/rattler_shell/src/snapshots/rattler_shell__activation__tests__test_resetting_conda_shlvlzsh.snap b/crates/rattler_shell/src/snapshots/rattler_shell__activation__tests__test_resetting_conda_shlvlzsh.snap new file mode 100644 index 0000000000..f619327a45 --- /dev/null +++ b/crates/rattler_shell/src/snapshots/rattler_shell__activation__tests__test_resetting_conda_shlvlzsh.snap @@ -0,0 +1,17 @@ +--- +source: crates/rattler_shell/src/activation.rs +expression: script_contents +--- +if [ -n "${CONDA_ENV_SHLVL_1_TEST_VAR1:-}" ]; then + TEST_VAR1="${CONDA_ENV_SHLVL_1_TEST_VAR1}" + unset CONDA_ENV_SHLVL_1_TEST_VAR1 + else + unset TEST_VAR1 + fi +if [ -n "${CONDA_ENV_SHLVL_1_CONDA_PREFIX:-}" ]; then + CONDA_PREFIX="${CONDA_ENV_SHLVL_1_CONDA_PREFIX}" + unset CONDA_ENV_SHLVL_1_CONDA_PREFIX + else + unset CONDA_PREFIX + fi +unset CONDA_SHLVL diff --git a/crates/rattler_solve/src/resolvo/conda_sorting.rs b/crates/rattler_solve/src/resolvo/conda_sorting.rs index d8da82ac13..d1444541e4 100644 --- a/crates/rattler_solve/src/resolvo/conda_sorting.rs +++ b/crates/rattler_solve/src/resolvo/conda_sorting.rs @@ -51,7 +51,7 @@ impl<'a, 'repo> SolvableSorter<'a, 'repo> { &solvable.record } - /// Referece to the pool + /// Reference to the pool fn pool(&self) -> &Pool, NameType> { &self.solver.provider().pool } diff --git a/crates/rattler_solve/tests/backends.rs b/crates/rattler_solve/tests/backends.rs index a01e3216d2..b0bea48a5b 100644 --- a/crates/rattler_solve/tests/backends.rs +++ b/crates/rattler_solve/tests/backends.rs @@ -1069,7 +1069,7 @@ mod resolvo { #[cfg(feature = "experimental_extras")] /// Attempts to enable two optional features that conflict: `[with-oldbors,with-latest-bors]`. - /// This should fail because one requests `bors <2.0` and the other requests `bors >=2.0`. + /// This should fail because one requests `bors <2.0` and the other requests `bors >=2.0`. #[test] fn test_solve_dummy_repo_extra_depends_conflict_resolvo() { let result = solve::( diff --git a/js-rattler/.cargo/config.toml b/js-rattler/.cargo/config.toml index aa003a60c1..0ba91bac1f 100644 --- a/js-rattler/.cargo/config.toml +++ b/js-rattler/.cargo/config.toml @@ -3,4 +3,4 @@ target = "wasm32-unknown-unknown" [target.'wasm32-unknown-unknown'] # See https://docs.rs/getrandom/latest/getrandom/#webassembly-support -rustflags = ["--cfg", 'getrandom_backend="wasm_js"'] \ No newline at end of file +rustflags = ["--cfg", 'getrandom_backend="wasm_js"'] diff --git a/js-rattler/.gitattributes b/js-rattler/.gitattributes index df3ddcba60..5fc4d971ee 100644 --- a/js-rattler/.gitattributes +++ b/js-rattler/.gitattributes @@ -1 +1 @@ -*.json linguist-language=JSON-with-Comments \ No newline at end of file +*.json linguist-language=JSON-with-Comments diff --git a/js-rattler/.gitignore b/js-rattler/.gitignore index 8b5201a84b..6d44c83cca 100644 --- a/js-rattler/.gitignore +++ b/js-rattler/.gitignore @@ -6,4 +6,4 @@ dist/ types/ node_modules/ wasm-pack.log -!Cargo.lock \ No newline at end of file +!Cargo.lock diff --git a/js-rattler/src/PackageRecord.test.ts b/js-rattler/src/PackageRecord.test.ts index b8330f59ae..498fbe272f 100644 --- a/js-rattler/src/PackageRecord.test.ts +++ b/js-rattler/src/PackageRecord.test.ts @@ -23,7 +23,7 @@ describe("PackageRecord", () => { }); }).not.toThrow(); }); - it("creation from json retuns the same json", () => { + it("creation from json returns the same json", () => { expect( new PackageRecord({ build: "py36h1af98f8_1", diff --git a/pixi.toml b/pixi.toml index 568ad3a513..0c49646954 100644 --- a/pixi.toml +++ b/pixi.toml @@ -13,13 +13,14 @@ license = "BSD-3-Clause" [tasks] build = "cargo build" -fmt = "cargo fmt" -lint = "cargo clippy" +fmt = "cargo fmt --all" +lint = "cargo clippy --all-targets -- -D warnings -Dclippy::dbg_macro" check = "cargo check" # libsolv compilation cannot find pixi's clang for some reason # so we skip that test for now -test = "cargo nextest run --workspace --no-default-features --features=rustls-tls -E 'not test(libsolv_bindings_up_to_date)'" +test = "cargo nextest run --workspace --no-default-features --features=indicatif,tokio,serde,reqwest,sparse,gateway,resolvo,libsolv_c,s3,experimental_extras,edit,rattler_config -E 'not test(libsolv_bindings_up_to_date)' --no-fail-fast" rattler = "cargo run --bin rattler --release --" +doc = "RUSTDOCFLAGS='-Dwarnings -Wunreachable-pub' cargo doc --no-deps --all --all-features" [dependencies] cxx-compiler = "~=1.6.0" @@ -45,7 +46,7 @@ typos = ">=1.23.1,<2" [feature.lint.tasks] pre-commit-install = "pre-commit install" -pre-commit-run = "pre-commit run" +pre-commit-run = "pre-commit run --all-files --hook-stage manual" [environments] lint = { features = [ diff --git a/py-rattler/docs/detect_virtual_package_error.md b/py-rattler/docs/detect_virtual_package_error.md index cc42c0d9e6..f9e6707b34 100644 --- a/py-rattler/docs/detect_virtual_package_error.md +++ b/py-rattler/docs/detect_virtual_package_error.md @@ -1,4 +1,3 @@ # DetectVirtualPackageError ::: rattler.exceptions.DetectVirtualPackageError - diff --git a/py-rattler/docs/fetch_repo_data_error.md b/py-rattler/docs/fetch_repo_data_error.md index 510d532827..8ff7b0f261 100644 --- a/py-rattler/docs/fetch_repo_data_error.md +++ b/py-rattler/docs/fetch_repo_data_error.md @@ -1,4 +1,3 @@ # FetchRepoDataError ::: rattler.exceptions.FetchRepoDataError - diff --git a/py-rattler/docs/file_mode.md b/py-rattler/docs/file_mode.md index 6f62955556..0df864200c 100644 --- a/py-rattler/docs/file_mode.md +++ b/py-rattler/docs/file_mode.md @@ -1,3 +1,3 @@ # FileMode -::: rattler.package.paths_json.FileMode \ No newline at end of file +::: rattler.package.paths_json.FileMode diff --git a/py-rattler/docs/invalid_channel_error.md b/py-rattler/docs/invalid_channel_error.md index 18f61747b4..bb4c9359eb 100644 --- a/py-rattler/docs/invalid_channel_error.md +++ b/py-rattler/docs/invalid_channel_error.md @@ -1,4 +1,3 @@ # InvalidChannelError ::: rattler.exceptions.InvalidChannelError - diff --git a/py-rattler/docs/invalid_match_spec_error.md b/py-rattler/docs/invalid_match_spec_error.md index 2a7fcf9b1a..081933b39e 100644 --- a/py-rattler/docs/invalid_match_spec_error.md +++ b/py-rattler/docs/invalid_match_spec_error.md @@ -1,4 +1,3 @@ # InvalidMatchSpecError ::: rattler.exceptions.InvalidMatchSpecError - diff --git a/py-rattler/docs/invalid_package_name_error.md b/py-rattler/docs/invalid_package_name_error.md index c8560fee1b..72100f9ae0 100644 --- a/py-rattler/docs/invalid_package_name_error.md +++ b/py-rattler/docs/invalid_package_name_error.md @@ -1,4 +1,3 @@ # InvalidPackageNameError ::: rattler.exceptions.InvalidPackageNameError - diff --git a/py-rattler/docs/invalid_url_error.md b/py-rattler/docs/invalid_url_error.md index 6eceb874a3..684317a09c 100644 --- a/py-rattler/docs/invalid_url_error.md +++ b/py-rattler/docs/invalid_url_error.md @@ -1,4 +1,3 @@ # InvalidUrlError ::: rattler.exceptions.InvalidUrlError - diff --git a/py-rattler/docs/invalid_version_error.md b/py-rattler/docs/invalid_version_error.md index fbf0c8331f..03f16e4f5b 100644 --- a/py-rattler/docs/invalid_version_error.md +++ b/py-rattler/docs/invalid_version_error.md @@ -1,4 +1,3 @@ # InvalidVersionError ::: rattler.exceptions.InvalidVersionError - diff --git a/py-rattler/docs/io_error.md b/py-rattler/docs/io_error.md index 650b27b1d7..cec9b3b10d 100644 --- a/py-rattler/docs/io_error.md +++ b/py-rattler/docs/io_error.md @@ -1,4 +1,3 @@ # IoError ::: rattler.exceptions.IoError - diff --git a/py-rattler/docs/link_error.md b/py-rattler/docs/link_error.md index 827a7a7b86..7ab9c6a767 100644 --- a/py-rattler/docs/link_error.md +++ b/py-rattler/docs/link_error.md @@ -1,4 +1,3 @@ # LinkError ::: rattler.exceptions.LinkError - diff --git a/py-rattler/docs/parse_arch_error.md b/py-rattler/docs/parse_arch_error.md index b0681a1c98..42d6124dcc 100644 --- a/py-rattler/docs/parse_arch_error.md +++ b/py-rattler/docs/parse_arch_error.md @@ -1,4 +1,3 @@ # ParseArchError ::: rattler.exceptions.ParseArchError - diff --git a/py-rattler/docs/parse_platform_error.md b/py-rattler/docs/parse_platform_error.md index 75d6c5e7b9..9dbac37bbc 100644 --- a/py-rattler/docs/parse_platform_error.md +++ b/py-rattler/docs/parse_platform_error.md @@ -1,4 +1,3 @@ # ParsePlatformError ::: rattler.exceptions.ParsePlatformError - diff --git a/py-rattler/docs/prefix_placeholder.md b/py-rattler/docs/prefix_placeholder.md index 63fd6e58d2..7a0ab10b74 100644 --- a/py-rattler/docs/prefix_placeholder.md +++ b/py-rattler/docs/prefix_placeholder.md @@ -1,3 +1,3 @@ # PrefixPlaceholder -::: rattler.package.paths_json.PrefixPlaceholder \ No newline at end of file +::: rattler.package.paths_json.PrefixPlaceholder diff --git a/py-rattler/docs/transaction_error.md b/py-rattler/docs/transaction_error.md index 18fe4bb908..fb068da4cc 100644 --- a/py-rattler/docs/transaction_error.md +++ b/py-rattler/docs/transaction_error.md @@ -1,4 +1,3 @@ # TransactionError ::: rattler.exceptions.TransactionError - diff --git a/py-rattler/examples/cli.py b/py-rattler/examples/cli.py index 82e2e26549..46caadf32e 100755 --- a/py-rattler/examples/cli.py +++ b/py-rattler/examples/cli.py @@ -56,7 +56,7 @@ async def create_environment( """ -Example usage: +Example usage: python3 -m examples.cli --prefix ~/Downloads/test python=3.12 flask --lockfile ~/Downloads/test.lock --channel conda-forge """ diff --git a/py-rattler/mkdocs.yml b/py-rattler/mkdocs.yml index c5ada89800..2c9f35bbc6 100644 --- a/py-rattler/mkdocs.yml +++ b/py-rattler/mkdocs.yml @@ -2,16 +2,16 @@ site_name: "py-rattler" theme: name: material - palette: - primary: yellow - accent: yellow - scheme: slate site_url: https://prefix.dev font: text: Red Hat Text code: JetBrains Mono palette: + - primary: yellow + accent: yellow + scheme: slate + # Palette toggle for automatic mode - media: "(prefers-color-scheme)" toggle: diff --git a/py-rattler/rattler/repo_data/gateway.py b/py-rattler/rattler/repo_data/gateway.py index 3f918e86fb..bfb4bccd7d 100644 --- a/py-rattler/rattler/repo_data/gateway.py +++ b/py-rattler/rattler/repo_data/gateway.py @@ -37,7 +37,7 @@ class SourceConfig: cache_action: CacheAction = "cache-or-fetch" """How to interact with the cache. - + * `'cache-or-fetch'` (default): Use the cache if its up to date or fetch from the URL if there is no valid cached value. * `'use-cache-only'`: Only use the cache, but error out if the cache is not up to date * `'force-cache-only'`: Only use the cache, ignore whether or not it is up to date. diff --git a/test-data/channels/dummy-optional-dependencies/noarch/repodata.json b/test-data/channels/dummy-optional-dependencies/noarch/repodata.json index 8ea5d85bb1..7afe3fa037 100644 --- a/test-data/channels/dummy-optional-dependencies/noarch/repodata.json +++ b/test-data/channels/dummy-optional-dependencies/noarch/repodata.json @@ -134,7 +134,7 @@ "build": "py36h1af98f8_1", "build_number": 1, "depends": [], - "license": "MIT", + "license": "MIT", "license_family": "MIT", "md5": "fb731d9290f0bcbf3a054665f33ec94f", "name": "foo", @@ -150,7 +150,7 @@ } }, "foo-3.2.0-py36h1af98f8_1.conda": { - "build": "py36h1af98f8_1", + "build": "py36h1af98f8_1", "build_number": 1, "depends": [], "license": "MIT", @@ -173,7 +173,7 @@ "build_number": 1, "depends": [], "license": "MIT", - "license_family": "MIT", + "license_family": "MIT", "md5": "fb731d9290f0bcbf3a054665f33ec94f", "name": "foo", "sha256": "67a63bec3fd3205170eaad532d487595b8aaceb9814d13c6858d7bac3ef24cd4", @@ -194,7 +194,7 @@ "license": "MIT", "license_family": "MIT", "md5": "fb731d9290f0bcbf3a054665f33ec94f", - "name": "foo", + "name": "foo", "sha256": "67a63bec3fd3205170eaad532d487595b8aaceb9814d13c6858d7bac3ef24cd4", "size": 414494, "subdir": "noarch", @@ -525,4 +525,4 @@ }, "packages.conda": {}, "repodata_version": 2 - } \ No newline at end of file + } diff --git a/test-data/channels/patch/linux-64/patch_instructions.json b/test-data/channels/patch/linux-64/patch_instructions.json index ea9cb6b3bf..65e98e5b90 100644 --- a/test-data/channels/patch/linux-64/patch_instructions.json +++ b/test-data/channels/patch/linux-64/patch_instructions.json @@ -1,7 +1,7 @@ { "packages": { "cross-python_emscripten-32-3.10.1-h60d57d3_8.tar.bz2": { - "license": "WOLF LICENSE", + "license": "WOLF LICENSE", "depends": [ "coreutils", "crossenv >=1.2", @@ -19,4 +19,4 @@ "license": "WOLF LICENSE II" } } -} \ No newline at end of file +} diff --git a/test-data/channels/patch/linux-64/patch_instructions_2.json b/test-data/channels/patch/linux-64/patch_instructions_2.json index 167453f0f7..8ef180eecd 100644 --- a/test-data/channels/patch/linux-64/patch_instructions_2.json +++ b/test-data/channels/patch/linux-64/patch_instructions_2.json @@ -4,4 +4,4 @@ "cross-python_emscripten-32-3.10.1-h60d57d3_8.tar.bz2", "emscripten_emscripten-32-3.1.27-h60d57d3_5.tar.bz2" ] -} \ No newline at end of file +} diff --git a/test-data/channels/patch/linux-64/patch_instructions_3.json b/test-data/channels/patch/linux-64/patch_instructions_3.json index 10a56ec5db..6265925e7c 100644 --- a/test-data/channels/patch/linux-64/patch_instructions_3.json +++ b/test-data/channels/patch/linux-64/patch_instructions_3.json @@ -4,4 +4,4 @@ "cross-python_emscripten-32-3.10.1-h60d57d3_8.conda", "i-dont-exist-23.12-hrhh2.conda" ] -} \ No newline at end of file +} diff --git a/test-data/channels/patch/linux-64/repodata_from_packages.json b/test-data/channels/patch/linux-64/repodata_from_packages.json index 2ed9eb3e2d..d4b9b371f2 100644 --- a/test-data/channels/patch/linux-64/repodata_from_packages.json +++ b/test-data/channels/patch/linux-64/repodata_from_packages.json @@ -85,4 +85,4 @@ }, "removed": [], "repodata_version": 1 - } \ No newline at end of file + } diff --git a/test-data/channels/patch/linux-64/repodata_from_packages_5.json b/test-data/channels/patch/linux-64/repodata_from_packages_5.json index dc38c4e10a..b418f0156e 100644 --- a/test-data/channels/patch/linux-64/repodata_from_packages_5.json +++ b/test-data/channels/patch/linux-64/repodata_from_packages_5.json @@ -25,4 +25,4 @@ }, "removed": [], "repodata_version": 1 -} \ No newline at end of file +} diff --git a/test-data/channels/pytorch/linux-64/repodata.json b/test-data/channels/pytorch/linux-64/repodata.json index c87e5329f9..ebcc115d18 100644 --- a/test-data/channels/pytorch/linux-64/repodata.json +++ b/test-data/channels/pytorch/linux-64/repodata.json @@ -42574,4 +42574,4 @@ "packages.conda": {}, "removed": [], "repodata_version": 1 -} \ No newline at end of file +} diff --git a/test-data/clobber/recipe/recipe-dependencyclobber.yaml b/test-data/clobber/recipe/recipe-dependencyclobber.yaml index cd5f90929d..1eb5aa2920 100644 --- a/test-data/clobber/recipe/recipe-dependencyclobber.yaml +++ b/test-data/clobber/recipe/recipe-dependencyclobber.yaml @@ -12,4 +12,4 @@ outputs: noarch: generic script: - mkdir -p $PREFIX/bin - - echo "cpython" > $PREFIX/bin/python \ No newline at end of file + - echo "cpython" > $PREFIX/bin/python diff --git a/test-data/clobber/recipe/recipe-nested.yaml b/test-data/clobber/recipe/recipe-nested.yaml index 51b3d5d0df..af7d448343 100644 --- a/test-data/clobber/recipe/recipe-nested.yaml +++ b/test-data/clobber/recipe/recipe-nested.yaml @@ -6,8 +6,8 @@ outputs: - package: name: clobber-nested-1 version: 0.1.0 - - build: + + build: noarch: generic script: - mkdir -p $PREFIX/clobber/bobber @@ -20,8 +20,8 @@ outputs: - package: name: clobber-nested-2 version: 0.1.0 - - build: + + build: noarch: generic script: - mkdir -p $PREFIX/clobber/bobber @@ -34,9 +34,9 @@ outputs: - package: name: clobber-nested-3 version: 0.1.0 - + build: noarch: generic script: - mkdir -p $PREFIX/clobber/bobber - - echo "clobber-3" > $PREFIX/clobber/bobber/clobber.txt \ No newline at end of file + - echo "clobber-3" > $PREFIX/clobber/bobber/clobber.txt diff --git a/test-data/clobber/recipe/recipe-noarch.yaml b/test-data/clobber/recipe/recipe-noarch.yaml index c57e017fab..06b661fdf4 100644 --- a/test-data/clobber/recipe/recipe-noarch.yaml +++ b/test-data/clobber/recipe/recipe-noarch.yaml @@ -6,8 +6,8 @@ outputs: - package: name: clobber-pynoarch-1 version: 0.1.0 - - build: + + build: noarch: python script: - mkdir -p $PREFIX/site-packages/clobber @@ -16,8 +16,8 @@ outputs: - package: name: clobber-pynoarch-2 version: 0.1.0 - - build: + + build: noarch: python script: - mkdir -p $PREFIX/site-packages/clobber diff --git a/test-data/clobber/recipe/recipe-version-2.yaml b/test-data/clobber/recipe/recipe-version-2.yaml index b1c71fb3e1..13e1c9e868 100644 --- a/test-data/clobber/recipe/recipe-version-2.yaml +++ b/test-data/clobber/recipe/recipe-version-2.yaml @@ -5,24 +5,24 @@ recipe: outputs: - package: name: clobber-1 - - build: + + build: noarch: generic script: - echo "clobber-1 v2" > $PREFIX/clobber.txt - package: name: clobber-2 - - build: + + build: noarch: generic script: - echo "clobber-2 v2" > $PREFIX/clobber.txt - package: name: clobber-3 - - build: + + build: noarch: generic script: - echo "clobber-3 v2" > $PREFIX/clobber.txt diff --git a/test-data/clobber/recipe/recipe.yaml b/test-data/clobber/recipe/recipe.yaml index 8f8bf6b8f4..b35a31ea52 100644 --- a/test-data/clobber/recipe/recipe.yaml +++ b/test-data/clobber/recipe/recipe.yaml @@ -6,8 +6,8 @@ outputs: - package: name: clobber-1 version: 0.1.0 - - build: + + build: noarch: generic script: - echo "clobber-1" > $PREFIX/clobber.txt @@ -16,8 +16,8 @@ outputs: - package: name: clobber-2 version: 0.1.0 - - build: + + build: noarch: generic script: - echo "clobber-2" > $PREFIX/clobber.txt @@ -26,8 +26,8 @@ outputs: - package: name: clobber-3 version: 0.1.0 - - build: + + build: noarch: generic script: - echo "clobber-3" > $PREFIX/clobber.txt diff --git a/test-data/conda-22.9.0-py38haa244fe_2-paths.json b/test-data/conda-22.9.0-py38haa244fe_2-paths.json index 0651a7d538..a1362b5c57 100644 --- a/test-data/conda-22.9.0-py38haa244fe_2-paths.json +++ b/test-data/conda-22.9.0-py38haa244fe_2-paths.json @@ -2536,4 +2536,4 @@ } ], "paths_version": 1 -} \ No newline at end of file +} diff --git a/test-data/conda-lock/v4/python-lock.yml b/test-data/conda-lock/v4/python-lock.yml index e129944058..085f7895ed 100644 --- a/test-data/conda-lock/v4/python-lock.yml +++ b/test-data/conda-lock/v4/python-lock.yml @@ -1285,4 +1285,3 @@ packages: subdir: win-64 version: 5.2.6 url: "https://conda.anaconda.org/conda-forge/win-64/xz-5.2.6-h8d14728_0.tar.bz2" - diff --git a/test-data/conda-lock/v6/conda-path-lock.yml b/test-data/conda-lock/v6/conda-path-lock.yml index 69cecb9507..8d58141576 100644 --- a/test-data/conda-lock/v6/conda-path-lock.yml +++ b/test-data/conda-lock/v6/conda-path-lock.yml @@ -57,4 +57,3 @@ packages: build: "h398123" subdir: noarch noarch: python - diff --git a/test-data/conda-meta/bzip2-1.0.8-h93a5062_5.json b/test-data/conda-meta/bzip2-1.0.8-h93a5062_5.json index f263025e10..4be4a3d38e 100644 --- a/test-data/conda-meta/bzip2-1.0.8-h93a5062_5.json +++ b/test-data/conda-meta/bzip2-1.0.8-h93a5062_5.json @@ -210,4 +210,4 @@ "source": "/Users/graf/Library/Caches/rattler/cache/pkgs/bzip2-1.0.8-h93a5062_5", "type": 1 } -} \ No newline at end of file +} diff --git a/test-data/conda-meta/ca-certificates-2024.2.2-hf0a4a13_0.json b/test-data/conda-meta/ca-certificates-2024.2.2-hf0a4a13_0.json index 68486aa213..3b95c98f18 100644 --- a/test-data/conda-meta/ca-certificates-2024.2.2-hf0a4a13_0.json +++ b/test-data/conda-meta/ca-certificates-2024.2.2-hf0a4a13_0.json @@ -41,4 +41,4 @@ "source": "/Users/graf/Library/Caches/rattler/cache/pkgs/ca-certificates-2024.2.2-hf0a4a13_0", "type": 1 } -} \ No newline at end of file +} diff --git a/test-data/conda-meta/icu-73.2-hc8870d7_0.json b/test-data/conda-meta/icu-73.2-hc8870d7_0.json index 14e4641f36..b4b50fdae1 100644 --- a/test-data/conda-meta/icu-73.2-hc8870d7_0.json +++ b/test-data/conda-meta/icu-73.2-hc8870d7_0.json @@ -2038,4 +2038,4 @@ "source": "/Users/graf/Library/Caches/rattler/cache/pkgs/icu-73.2-hc8870d7_0", "type": 1 } -} \ No newline at end of file +} diff --git a/test-data/conda-meta/libblas-3.9.0-20_osxarm64_openblas.json b/test-data/conda-meta/libblas-3.9.0-20_osxarm64_openblas.json index 654dc2e4e8..ac638c041d 100644 --- a/test-data/conda-meta/libblas-3.9.0-20_osxarm64_openblas.json +++ b/test-data/conda-meta/libblas-3.9.0-20_osxarm64_openblas.json @@ -51,4 +51,4 @@ "source": "/Users/graf/Library/Caches/rattler/cache/pkgs/libblas-3.9.0-20_osxarm64_openblas", "type": 1 } -} \ No newline at end of file +} diff --git a/test-data/conda-meta/libcblas-3.9.0-20_osxarm64_openblas.json b/test-data/conda-meta/libcblas-3.9.0-20_osxarm64_openblas.json index 84e0efc7b3..c4fc2a67d2 100644 --- a/test-data/conda-meta/libcblas-3.9.0-20_osxarm64_openblas.json +++ b/test-data/conda-meta/libcblas-3.9.0-20_osxarm64_openblas.json @@ -49,4 +49,4 @@ "source": "/Users/graf/Library/Caches/rattler/cache/pkgs/libcblas-3.9.0-20_osxarm64_openblas", "type": 1 } -} \ No newline at end of file +} diff --git a/test-data/conda-meta/libclang-16.0.6-default_he012953_6.json b/test-data/conda-meta/libclang-16.0.6-default_he012953_6.json index f9a0b2b089..35df301821 100644 --- a/test-data/conda-meta/libclang-16.0.6-default_he012953_6.json +++ b/test-data/conda-meta/libclang-16.0.6-default_he012953_6.json @@ -38,4 +38,4 @@ "source": "/Users/graf/Library/Caches/rattler/cache/pkgs/libclang-16.0.6-default_he012953_6", "type": 1 } -} \ No newline at end of file +} diff --git a/test-data/conda-meta/libclang13-16.0.6-default_h83d0a53_6.json b/test-data/conda-meta/libclang13-16.0.6-default_h83d0a53_6.json index f9501575ab..ad9f8f054b 100644 --- a/test-data/conda-meta/libclang13-16.0.6-default_h83d0a53_6.json +++ b/test-data/conda-meta/libclang13-16.0.6-default_h83d0a53_6.json @@ -37,4 +37,4 @@ "source": "/Users/graf/Library/Caches/rattler/cache/pkgs/libclang13-16.0.6-default_h83d0a53_6", "type": 1 } -} \ No newline at end of file +} diff --git a/test-data/conda-meta/libcxx-17.0.6-h5f092b4_0.json b/test-data/conda-meta/libcxx-17.0.6-h5f092b4_0.json index 441ff73ac3..5ccbe39245 100644 --- a/test-data/conda-meta/libcxx-17.0.6-h5f092b4_0.json +++ b/test-data/conda-meta/libcxx-17.0.6-h5f092b4_0.json @@ -8180,4 +8180,4 @@ "source": "/Users/graf/Library/Caches/rattler/cache/pkgs/libcxx-17.0.6-h5f092b4_0", "type": 1 } -} \ No newline at end of file +} diff --git a/test-data/conda-meta/libexpat-2.6.2-hebf3989_0.json b/test-data/conda-meta/libexpat-2.6.2-hebf3989_0.json index c93c17299f..6f8fb79243 100644 --- a/test-data/conda-meta/libexpat-2.6.2-hebf3989_0.json +++ b/test-data/conda-meta/libexpat-2.6.2-hebf3989_0.json @@ -45,4 +45,4 @@ "source": "/Users/graf/Library/Caches/rattler/cache/pkgs/libexpat-2.6.2-hebf3989_0", "type": 1 } -} \ No newline at end of file +} diff --git a/test-data/conda-meta/libffi-3.4.2-h3422bc3_5.json b/test-data/conda-meta/libffi-3.4.2-h3422bc3_5.json index 06d80df75d..b403d65a1e 100644 --- a/test-data/conda-meta/libffi-3.4.2-h3422bc3_5.json +++ b/test-data/conda-meta/libffi-3.4.2-h3422bc3_5.json @@ -118,4 +118,4 @@ "source": "/Users/graf/Library/Caches/rattler/cache/pkgs/libffi-3.4.2-h3422bc3_5", "type": 1 } -} \ No newline at end of file +} diff --git a/test-data/conda-meta/libgfortran-5.0.0-13_2_0_hd922786_3.json b/test-data/conda-meta/libgfortran-5.0.0-13_2_0_hd922786_3.json index 7e6ae1e130..cb7c1dd8a7 100644 --- a/test-data/conda-meta/libgfortran-5.0.0-13_2_0_hd922786_3.json +++ b/test-data/conda-meta/libgfortran-5.0.0-13_2_0_hd922786_3.json @@ -26,4 +26,4 @@ "source": "/Users/graf/Library/Caches/rattler/cache/pkgs/libgfortran-5.0.0-13_2_0_hd922786_3", "type": 1 } -} \ No newline at end of file +} diff --git a/test-data/conda-meta/libgfortran5-13.2.0-hf226fd6_3.json b/test-data/conda-meta/libgfortran5-13.2.0-hf226fd6_3.json index 0f8f562d7d..1edc59f7de 100644 --- a/test-data/conda-meta/libgfortran5-13.2.0-hf226fd6_3.json +++ b/test-data/conda-meta/libgfortran5-13.2.0-hf226fd6_3.json @@ -87,4 +87,4 @@ "source": "/Users/graf/Library/Caches/rattler/cache/pkgs/libgfortran5-13.2.0-hf226fd6_3", "type": 1 } -} \ No newline at end of file +} diff --git a/test-data/conda-meta/libiconv-1.17-h0d3ecfb_2.json b/test-data/conda-meta/libiconv-1.17-h0d3ecfb_2.json index d6700efe4d..ce2dadff88 100644 --- a/test-data/conda-meta/libiconv-1.17-h0d3ecfb_2.json +++ b/test-data/conda-meta/libiconv-1.17-h0d3ecfb_2.json @@ -97,4 +97,4 @@ "source": "/Users/graf/Library/Caches/rattler/cache/pkgs/libiconv-1.17-h0d3ecfb_2", "type": 1 } -} \ No newline at end of file +} diff --git a/test-data/conda-meta/liblapack-3.9.0-20_osxarm64_openblas.json b/test-data/conda-meta/liblapack-3.9.0-20_osxarm64_openblas.json index 7d69fea0f9..66d42143e1 100644 --- a/test-data/conda-meta/liblapack-3.9.0-20_osxarm64_openblas.json +++ b/test-data/conda-meta/liblapack-3.9.0-20_osxarm64_openblas.json @@ -49,4 +49,4 @@ "source": "/Users/graf/Library/Caches/rattler/cache/pkgs/liblapack-3.9.0-20_osxarm64_openblas", "type": 1 } -} \ No newline at end of file +} diff --git a/test-data/conda-meta/libllvm16-16.0.6-haab561b_3.json b/test-data/conda-meta/libllvm16-16.0.6-haab561b_3.json index 20955965ec..6518b59959 100644 --- a/test-data/conda-meta/libllvm16-16.0.6-haab561b_3.json +++ b/test-data/conda-meta/libllvm16-16.0.6-haab561b_3.json @@ -55,4 +55,4 @@ "source": "/Users/graf/Library/Caches/rattler/cache/pkgs/libllvm16-16.0.6-haab561b_3", "type": 1 } -} \ No newline at end of file +} diff --git a/test-data/conda-meta/libopenblas-0.3.25-openmp_h6c19121_0.json b/test-data/conda-meta/libopenblas-0.3.25-openmp_h6c19121_0.json index 7fadec645f..cff460e6de 100644 --- a/test-data/conda-meta/libopenblas-0.3.25-openmp_h6c19121_0.json +++ b/test-data/conda-meta/libopenblas-0.3.25-openmp_h6c19121_0.json @@ -65,4 +65,4 @@ "source": "/Users/graf/Library/Caches/rattler/cache/pkgs/libopenblas-0.3.25-openmp_h6c19121_0", "type": 1 } -} \ No newline at end of file +} diff --git a/test-data/conda-meta/libsqlite-3.40.0-hcfcfb64_0.json b/test-data/conda-meta/libsqlite-3.40.0-hcfcfb64_0.json index b21a4d472c..616f6f8c1c 100644 --- a/test-data/conda-meta/libsqlite-3.40.0-hcfcfb64_0.json +++ b/test-data/conda-meta/libsqlite-3.40.0-hcfcfb64_0.json @@ -66,4 +66,4 @@ "timestamp": 1668697639781, "url": "https://conda.anaconda.org/conda-forge/win-64/libsqlite-3.40.0-hcfcfb64_0.tar.bz2", "version": "3.40.0" -} \ No newline at end of file +} diff --git a/test-data/conda-meta/libsqlite-3.45.3-h091b4b1_0.json b/test-data/conda-meta/libsqlite-3.45.3-h091b4b1_0.json index 568ff18c69..02b3e7be27 100644 --- a/test-data/conda-meta/libsqlite-3.45.3-h091b4b1_0.json +++ b/test-data/conda-meta/libsqlite-3.45.3-h091b4b1_0.json @@ -69,4 +69,4 @@ "source": "/Users/graf/Library/Caches/rattler/cache/pkgs/libsqlite-3.45.3-h091b4b1_0", "type": 1 } -} \ No newline at end of file +} diff --git a/test-data/conda-meta/libxml2-2.12.7-ha661575_0.json b/test-data/conda-meta/libxml2-2.12.7-ha661575_0.json index 507900e165..1267429ef1 100644 --- a/test-data/conda-meta/libxml2-2.12.7-ha661575_0.json +++ b/test-data/conda-meta/libxml2-2.12.7-ha661575_0.json @@ -490,4 +490,4 @@ "source": "/Users/graf/Library/Caches/rattler/cache/pkgs/libxml2-2.12.7-ha661575_0", "type": 1 } -} \ No newline at end of file +} diff --git a/test-data/conda-meta/libzlib-1.2.13-h53f4e23_5.json b/test-data/conda-meta/libzlib-1.2.13-h53f4e23_5.json index 6a6f76885b..2235405d17 100644 --- a/test-data/conda-meta/libzlib-1.2.13-h53f4e23_5.json +++ b/test-data/conda-meta/libzlib-1.2.13-h53f4e23_5.json @@ -45,4 +45,4 @@ "source": "/Users/graf/Library/Caches/rattler/cache/pkgs/libzlib-1.2.13-h53f4e23_5", "type": 1 } -} \ No newline at end of file +} diff --git a/test-data/conda-meta/llvm-openmp-18.1.6-hde57baf_0.json b/test-data/conda-meta/llvm-openmp-18.1.6-hde57baf_0.json index b5ea6aa6ce..b3a943cdca 100644 --- a/test-data/conda-meta/llvm-openmp-18.1.6-hde57baf_0.json +++ b/test-data/conda-meta/llvm-openmp-18.1.6-hde57baf_0.json @@ -87,4 +87,4 @@ "source": "/Users/graf/Library/Caches/rattler/cache/pkgs/llvm-openmp-18.1.6-hde57baf_0", "type": 1 } -} \ No newline at end of file +} diff --git a/test-data/conda-meta/menuinst-1.4.19-py311h1ea47a8_1.json b/test-data/conda-meta/menuinst-1.4.19-py311h1ea47a8_1.json index 8de49d1c84..355bcb9e05 100644 --- a/test-data/conda-meta/menuinst-1.4.19-py311h1ea47a8_1.json +++ b/test-data/conda-meta/menuinst-1.4.19-py311h1ea47a8_1.json @@ -298,4 +298,4 @@ "track_features": "", "url": "https://conda.anaconda.org/conda-forge/win-64/menuinst-1.4.19-py311h1ea47a8_1.tar.bz2", "version": "1.4.19" -} \ No newline at end of file +} diff --git a/test-data/conda-meta/ncurses-6.5-hb89a1cb_0.json b/test-data/conda-meta/ncurses-6.5-hb89a1cb_0.json index f8b17a4c13..e60571e955 100644 --- a/test-data/conda-meta/ncurses-6.5-hb89a1cb_0.json +++ b/test-data/conda-meta/ncurses-6.5-hb89a1cb_0.json @@ -24145,4 +24145,4 @@ "source": "/Users/graf/Library/Caches/rattler/cache/pkgs/ncurses-6.5-hb89a1cb_0", "type": 1 } -} \ No newline at end of file +} diff --git a/test-data/conda-meta/numpy-1.26.4-py311h7125741_0.json b/test-data/conda-meta/numpy-1.26.4-py311h7125741_0.json index 99f026f2d0..238fb5ac1e 100644 --- a/test-data/conda-meta/numpy-1.26.4-py311h7125741_0.json +++ b/test-data/conda-meta/numpy-1.26.4-py311h7125741_0.json @@ -11276,4 +11276,4 @@ "source": "/Users/graf/Library/Caches/rattler/cache/pkgs/numpy-1.26.4-py311h7125741_0", "type": 1 } -} \ No newline at end of file +} diff --git a/test-data/conda-meta/openssl-3.3.0-hfb2fe0b_3.json b/test-data/conda-meta/openssl-3.3.0-hfb2fe0b_3.json index 6c1de41006..c6aceb8c23 100644 --- a/test-data/conda-meta/openssl-3.3.0-hfb2fe0b_3.json +++ b/test-data/conda-meta/openssl-3.3.0-hfb2fe0b_3.json @@ -1307,4 +1307,4 @@ "source": "/Users/graf/Library/Caches/rattler/cache/pkgs/openssl-3.3.0-hfb2fe0b_3", "type": 1 } -} \ No newline at end of file +} diff --git a/test-data/conda-meta/pip-23.0-pyhd8ed1ab_0.json b/test-data/conda-meta/pip-23.0-pyhd8ed1ab_0.json index 93cd64268d..315682c670 100644 --- a/test-data/conda-meta/pip-23.0-pyhd8ed1ab_0.json +++ b/test-data/conda-meta/pip-23.0-pyhd8ed1ab_0.json @@ -6558,4 +6558,4 @@ "timestamp": 1675141351173, "url": "https://conda.anaconda.org/conda-forge/noarch/pip-23.0-pyhd8ed1ab_0.conda", "version": "23.0" -} \ No newline at end of file +} diff --git a/test-data/conda-meta/pysocks-1.7.1-pyh0701188_6.json b/test-data/conda-meta/pysocks-1.7.1-pyh0701188_6.json index 85428fc0b7..e2d20e32e4 100644 --- a/test-data/conda-meta/pysocks-1.7.1-pyh0701188_6.json +++ b/test-data/conda-meta/pysocks-1.7.1-pyh0701188_6.json @@ -127,4 +127,4 @@ "track_features": "", "url": "https://conda.anaconda.org/conda-forge/noarch/pysocks-1.7.1-pyh0701188_6.tar.bz2", "version": "1.7.1" -} \ No newline at end of file +} diff --git a/test-data/conda-meta/python_abi-3.11-4_cp311.json b/test-data/conda-meta/python_abi-3.11-4_cp311.json index 71e1a65748..c29ae1aaf6 100644 --- a/test-data/conda-meta/python_abi-3.11-4_cp311.json +++ b/test-data/conda-meta/python_abi-3.11-4_cp311.json @@ -27,4 +27,4 @@ "source": "/Users/graf/Library/Caches/rattler/cache/pkgs/python_abi-3.11-4_cp311", "type": 1 } -} \ No newline at end of file +} diff --git a/test-data/conda-meta/readline-8.2-h92ec313_1.json b/test-data/conda-meta/readline-8.2-h92ec313_1.json index 0da32802d5..8b1f482862 100644 --- a/test-data/conda-meta/readline-8.2-h92ec313_1.json +++ b/test-data/conda-meta/readline-8.2-h92ec313_1.json @@ -224,4 +224,4 @@ "source": "/Users/graf/Library/Caches/rattler/cache/pkgs/readline-8.2-h92ec313_1", "type": 1 } -} \ No newline at end of file +} diff --git a/test-data/conda-meta/requests-2.28.2-pyhd8ed1ab_0.json b/test-data/conda-meta/requests-2.28.2-pyhd8ed1ab_0.json index 1aa01b7ecd..1ce3937168 100644 --- a/test-data/conda-meta/requests-2.28.2-pyhd8ed1ab_0.json +++ b/test-data/conda-meta/requests-2.28.2-pyhd8ed1ab_0.json @@ -338,4 +338,4 @@ "track_features": "", "url": "https://conda.anaconda.org/conda-forge/noarch/requests-2.28.2-pyhd8ed1ab_0.conda", "version": "2.28.2" -} \ No newline at end of file +} diff --git a/test-data/conda-meta/scipy-1.11.4-py311h2b215a9_0.json b/test-data/conda-meta/scipy-1.11.4-py311h2b215a9_0.json index 4761ec17e7..4fb5a5ea99 100644 --- a/test-data/conda-meta/scipy-1.11.4-py311h2b215a9_0.json +++ b/test-data/conda-meta/scipy-1.11.4-py311h2b215a9_0.json @@ -8928,4 +8928,4 @@ "source": "/Users/graf/Library/Caches/rattler/cache/pkgs/scipy-1.11.4-py311h2b215a9_0", "type": 1 } -} \ No newline at end of file +} diff --git a/test-data/conda-meta/tk-8.6.12-h8ffe710_0.json b/test-data/conda-meta/tk-8.6.12-h8ffe710_0.json index b6936db05e..04de573c2c 100644 --- a/test-data/conda-meta/tk-8.6.12-h8ffe710_0.json +++ b/test-data/conda-meta/tk-8.6.12-h8ffe710_0.json @@ -8832,4 +8832,4 @@ "timestamp": 1645033031535, "url": "https://conda.anaconda.org/conda-forge/win-64/tk-8.6.12-h8ffe710_0.tar.bz2", "version": "8.6.12" -} \ No newline at end of file +} diff --git a/test-data/conda-meta/tk-8.6.13-h5083fa2_1.json b/test-data/conda-meta/tk-8.6.13-h5083fa2_1.json index 36b9181944..2433df2c8a 100644 --- a/test-data/conda-meta/tk-8.6.13-h5083fa2_1.json +++ b/test-data/conda-meta/tk-8.6.13-h5083fa2_1.json @@ -4322,4 +4322,4 @@ "source": "/Users/graf/Library/Caches/rattler/cache/pkgs/tk-8.6.13-h5083fa2_1", "type": 1 } -} \ No newline at end of file +} diff --git a/test-data/conda-meta/tzdata-2024a-h0c530f3_0.json b/test-data/conda-meta/tzdata-2024a-h0c530f3_0.json index 966104b761..ebb76b0aca 100644 --- a/test-data/conda-meta/tzdata-2024a-h0c530f3_0.json +++ b/test-data/conda-meta/tzdata-2024a-h0c530f3_0.json @@ -4858,4 +4858,4 @@ "source": "/Users/graf/Library/Caches/rattler/cache/pkgs/tzdata-2024a-h0c530f3_0", "type": 1 } -} \ No newline at end of file +} diff --git a/test-data/conda-meta/urllib3-1.26.14-pyhd8ed1ab_0.json b/test-data/conda-meta/urllib3-1.26.14-pyhd8ed1ab_0.json index 628693b2c0..8a25f6e72d 100644 --- a/test-data/conda-meta/urllib3-1.26.14-pyhd8ed1ab_0.json +++ b/test-data/conda-meta/urllib3-1.26.14-pyhd8ed1ab_0.json @@ -595,4 +595,4 @@ "track_features": "", "url": "https://conda.anaconda.org/conda-forge/noarch/urllib3-1.26.14-pyhd8ed1ab_0.conda", "version": "1.26.14" -} \ No newline at end of file +} diff --git a/test-data/conda-meta/vc-14.3-hb6edc58_10.json b/test-data/conda-meta/vc-14.3-hb6edc58_10.json index 42c6f70d10..e9a96496b2 100644 --- a/test-data/conda-meta/vc-14.3-hb6edc58_10.json +++ b/test-data/conda-meta/vc-14.3-hb6edc58_10.json @@ -32,4 +32,4 @@ "track_features": "vc14", "url": "https://conda.anaconda.org/conda-forge/win-64/vc-14.3-hb6edc58_10.conda", "version": "14.3" -} \ No newline at end of file +} diff --git a/test-data/conda-meta/wheel-0.38.4-pyhd8ed1ab_0.json b/test-data/conda-meta/wheel-0.38.4-pyhd8ed1ab_0.json index 139e1604ff..51bdafec77 100644 --- a/test-data/conda-meta/wheel-0.38.4-pyhd8ed1ab_0.json +++ b/test-data/conda-meta/wheel-0.38.4-pyhd8ed1ab_0.json @@ -320,4 +320,4 @@ "timestamp": 1668051714265, "url": "https://conda.anaconda.org/conda-forge/noarch/wheel-0.38.4-pyhd8ed1ab_0.tar.bz2", "version": "0.38.4" -} \ No newline at end of file +} diff --git a/test-data/conda-meta/xz-5.2.6-h57fd34a_0.json b/test-data/conda-meta/xz-5.2.6-h57fd34a_0.json index 954c709978..03a2c18b4a 100644 --- a/test-data/conda-meta/xz-5.2.6-h57fd34a_0.json +++ b/test-data/conda-meta/xz-5.2.6-h57fd34a_0.json @@ -691,4 +691,4 @@ "source": "/Users/graf/Library/Caches/rattler/cache/pkgs/xz-5.2.6-h57fd34a_0", "type": 1 } -} \ No newline at end of file +} diff --git a/test-data/conda-meta/xz-5.2.6-h8d14728_0.json b/test-data/conda-meta/xz-5.2.6-h8d14728_0.json index 02b18c47ee..8ddb2e66fa 100644 --- a/test-data/conda-meta/xz-5.2.6-h8d14728_0.json +++ b/test-data/conda-meta/xz-5.2.6-h8d14728_0.json @@ -203,4 +203,4 @@ "track_features": "", "url": "https://conda.anaconda.org/conda-forge/win-64/xz-5.2.6-h8d14728_0.tar.bz2", "version": "5.2.6" -} \ No newline at end of file +} diff --git a/test-data/conda-meta/zstd-1.5.6-hb46c0d2_0.json b/test-data/conda-meta/zstd-1.5.6-hb46c0d2_0.json index b636ac74a1..4e39a519d9 100644 --- a/test-data/conda-meta/zstd-1.5.6-hb46c0d2_0.json +++ b/test-data/conda-meta/zstd-1.5.6-hb46c0d2_0.json @@ -207,4 +207,4 @@ "source": "/Users/graf/Library/Caches/rattler/cache/pkgs/zstd-1.5.6-hb46c0d2_0", "type": 1 } -} \ No newline at end of file +} diff --git a/test-data/link-json/jupyterlab-link.json b/test-data/link-json/jupyterlab-link.json index 9239f03a50..e84158c5e5 100644 --- a/test-data/link-json/jupyterlab-link.json +++ b/test-data/link-json/jupyterlab-link.json @@ -9,4 +9,4 @@ "type": "python" }, "package_metadata_version": 1 -} +} diff --git a/test-data/link-json/tzdata-link.json b/test-data/link-json/tzdata-link.json index f072e87f8b..62c9a6eb41 100644 --- a/test-data/link-json/tzdata-link.json +++ b/test-data/link-json/tzdata-link.json @@ -3,4 +3,4 @@ "type": "generic" }, "package_metadata_version": 1 -} \ No newline at end of file +} diff --git a/test-data/link-scripts/recipe/pre-unlink.sh b/test-data/link-scripts/recipe/pre-unlink.sh index 3b163c22e1..ed39ac2b9f 100644 --- a/test-data/link-scripts/recipe/pre-unlink.sh +++ b/test-data/link-scripts/recipe/pre-unlink.sh @@ -1 +1 @@ -rm $PREFIX/i-was-post-linked \ No newline at end of file +rm $PREFIX/i-was-post-linked diff --git a/test-data/parsed_versions.txt b/test-data/parsed_versions.txt index e07bc97a4e..f5f1fb23e0 100644 --- a/test-data/parsed_versions.txt +++ b/test-data/parsed_versions.txt @@ -1,17 +1,17 @@ # This is a versions and the result of parsing them with Conda. -# +# # To recreate this do the following: # # 1. Initially versions are extracted from repodata.json using the following jq expression: -# +# # ```shell # jq -n -r '[inputs | .packages[], ."packages.conda"[] | .version] | unique[]' repodata1.json repodata2.json ... repodataN.json > versions.txt # ``` -# +# # This produces a list of unique versions found in a bunch of repodata files. # # 2. The following python code is then run to use Conda to parse the versions: -# +# # ```python # from conda.models.version import VersionOrder # diff --git a/test-data/python-3.10.6-h2c4edbf_0_cpython-run_exports.json b/test-data/python-3.10.6-h2c4edbf_0_cpython-run_exports.json index d36e0a626c..8c0818b17c 100644 --- a/test-data/python-3.10.6-h2c4edbf_0_cpython-run_exports.json +++ b/test-data/python-3.10.6-h2c4edbf_0_cpython-run_exports.json @@ -1 +1 @@ -{"noarch": ["python"], "weak": ["python_abi 3.10.* *_cp310"]} \ No newline at end of file +{"noarch": ["python"], "weak": ["python_abi 3.10.* *_cp310"]} diff --git a/test-data/repodata-records/_libgcc_mutex-0.1-conda_forge.json b/test-data/repodata-records/_libgcc_mutex-0.1-conda_forge.json index b1bbd36363..9a48833394 100644 --- a/test-data/repodata-records/_libgcc_mutex-0.1-conda_forge.json +++ b/test-data/repodata-records/_libgcc_mutex-0.1-conda_forge.json @@ -13,4 +13,4 @@ "fn": "_libgcc_mutex-0.1-conda_forge.tar.bz2", "url": "https://conda.anaconda.org/conda-forge/linux-64/_libgcc_mutex-0.1-conda_forge.tar.bz2", "channel": "https://conda.anaconda.org/conda-forge/" -} \ No newline at end of file +} diff --git a/test-data/shebang_test.txt b/test-data/shebang_test.txt index 964396f455..998baa4e9a 100644 --- a/test-data/shebang_test.txt +++ b/test-data/shebang_test.txt @@ -5,4 +5,4 @@ import sys import re -main(...) \ No newline at end of file +main(...) diff --git a/test-data/test-server/reposerver.py b/test-data/test-server/reposerver.py index 56bd2deb29..35d4cd8a7f 100644 --- a/test-data/test-server/reposerver.py +++ b/test-data/test-server/reposerver.py @@ -388,7 +388,7 @@ def token_do_GET(self, server_token: str) -> None: print("Server started at localhost:" + str(PORT)) try: server.serve_forever() -except: +except Exception: # Catch all sorts of interrupts print("Shutting server down") server.shutdown() diff --git a/test-data/topological-sort/big_resolution.json b/test-data/topological-sort/big_resolution.json index 8451d7d2ac..f5f05fff49 100644 --- a/test-data/topological-sort/big_resolution.json +++ b/test-data/topological-sort/big_resolution.json @@ -7529,4 +7529,4 @@ "url": "https://conda.anaconda.org/conda-forge/noarch/python-fastjsonschema-2.20.0-pyhd8ed1ab_0.conda", "channel": "https://conda.anaconda.org/conda-forge" } -] \ No newline at end of file +]