Skip to content

Commit

Permalink
fix: corrected PyPI spelling and corrected outdated docs
Browse files Browse the repository at this point in the history
  • Loading branch information
tdejager committed Sep 29, 2023
1 parent 08e7e9f commit adfc704
Show file tree
Hide file tree
Showing 5 changed files with 27 additions and 24 deletions.
16 changes: 8 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,9 @@
[crates-badge]: https://img.shields.io/crates/v/rattler_installs_packages.svg


`RIP` is a library that allows the resolving and installing of Python [PyPi](https://pypi.org/) packages from Rust into a virtual environment.
`RIP` is a library that allows the resolving and installing of Python [PyPI](https://pypi.org/) packages from Rust into a virtual environment.
It's based on our experience with building [Rattler](https://github.com/mamba-org/rattler) and aims to provide the same
experience but for PyPi instead of Conda.
experience but for PyPI instead of Conda.
It should be fast and easy to use. Like Rattler, this library is not a package manager itself but provides the low-level plumbing to be used in one.

`RIP` is based on the quite excellent work of [posy](https://github.com/njsmith/posy) and we have tried to credit
Expand All @@ -41,19 +41,19 @@ We've added a small binary to showcase this:

![flask-install](https://github.com/prefix-dev/rip/assets/4995967/5b0356b6-8e06-47bb-9424-94b3fdd9da09)

This showcases the downloading and caching of metadata from PyPi. As well as the package resolution using our solver, more on this below.
This showcases the downloading and caching of metadata from PyPI. As well as the package resolution using our solver, more on this below.
We cache everything in a local directory so that we can re-use the metadata and don't have to download it again.

## Features

This is a list of current and planned features of `RIP`, the biggest are listed below:

* [x] Downloading and aggressive caching of PyPi metadata.
* [x] Resolving of PyPi packages using [Resolvo](https://github.com/mamba-org/resolvo).
* [x] Downloading and aggressive caching of PyPI metadata.
* [x] Resolving of PyPI packages using [Resolvo](https://github.com/mamba-org/resolvo).
* [ ] Installation of wheel files (planned)
* [ ] Support sdist files (planned)

More intricacies of the PyPi ecosystem need to be implemented, see our GitHub issues for more details.
More intricacies of the PyPI ecosystem need to be implemented, see our GitHub issues for more details.


# Solver
Expand All @@ -65,6 +65,6 @@ This feature can be enabled with the `resolvo-pypi` feature flag.

## 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].
4 changes: 2 additions & 2 deletions crates/rattler_installs_packages/src/artifact.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ use std::io::Read;
use std::str::FromStr;
use zip::ZipArchive;

/// Trait that represents an artifact type in the PyPi ecosystem.
/// Trait that represents an artifact type in the PyPI ecosystem.
/// Currently implemented for [`Wheel`] files.
#[async_trait]
pub trait Artifact: Sized {
Expand All @@ -28,7 +28,7 @@ pub trait Artifact: Sized {
fn name(&self) -> &Self::Name;
}

/// Wheel file in the PyPi ecosystem.
/// Wheel file in the PyPI ecosystem.
/// See the [Reference Page](https://packaging.python.org/en/latest/specifications/binary-distribution-format/#binary-distribution-format)
/// for more information.
pub struct Wheel {
Expand Down
9 changes: 6 additions & 3 deletions crates/rattler_installs_packages/src/artifact_name.rs
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ impl Display for ArtifactName {

/// Structure that contains the information that is contained in a wheel name
/// See: [File Name Convention](https://www.python.org/dev/peps/pep-0427/#file-name-convention),
/// and: [PyPa Conventions](https://packaging.python.org/en/latest/specifications/),
/// and: [PyPA Conventions](https://packaging.python.org/en/latest/specifications/),
/// for more details regarding the structure of a wheel name.
#[derive(Clone, PartialEq, Eq, PartialOrd, Ord, Debug)]
pub struct WheelName {
Expand Down Expand Up @@ -385,8 +385,11 @@ mod test {
"numpy-1.26.0-pp39-pypy39_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl"
.parse()
.unwrap();
dbg!(n);
assert!(false);

assert_eq!(
n.arch_tags,
vec!["manylinux_2_17_x86_64", "manylinux2014_x86_64"]
);
}

#[test]
Expand Down
4 changes: 2 additions & 2 deletions crates/rattler_installs_packages/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
//! RIP is a library that allows the resolving and installing of Python PyPi packages from Rust into a virtual environment.
//! It's based on our experience with building Rattler and aims to provide the same experience but for PyPi instead of Conda.
//! RIP is a library that allows the resolving and installing of Python PyPI packages from Rust into a virtual environment.
//! It's based on our experience with building Rattler and aims to provide the same experience but for PyPI instead of Conda.
//! It should be fast and easy to use.
//! Like Rattler, this library is not a package manager itself but provides the low-level plumbing to be used in one.
Expand Down
18 changes: 9 additions & 9 deletions crates/rattler_installs_packages/src/resolve.rs
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
//! This module contains the [`PypiDependencyProvider`] which is used
//! to make the PyPi ecosystem compatible with the [`resolvo`] crate.
//! This module contains the [`resolve`] function which is used
//! to make the PyPI ecosystem compatible with the [`resolvo`] crate.
//!
//! To use this enable the `resolvo-pypi` feature.
//! Note that this can also serve an example to integrate an alternate packaging system
//! To use this enable the `resolve` feature.
//! Note that this module can also serve an example to integrate an alternate packaging system
//! with [`resolvo`].
//!
//! See the `rip_bin` crate for an example of how to use this provider, in the [RIP Repo](https://github.com/prefix-dev/rip)
//! See the `rip_bin` crate for an example of how to use the [`resolve`] function in the: [RIP Repo](https://github.com/prefix-dev/rip)
use crate::{
CompareOp, Extra, NormalizedPackageName, PackageDb, PackageName, Requirement, Specifier,
Specifiers, UserRequirement, Version, Wheel,
Expand All @@ -22,7 +22,7 @@ use tokio::task;
#[repr(transparent)]
#[derive(Clone, Debug, Hash, Eq, PartialEq)]
/// This is a wrapper around [`Specifiers`] that implements [`VersionSet`]
pub struct PypiVersionSet(Specifiers);
struct PypiVersionSet(Specifiers);

impl From<Specifiers> for PypiVersionSet {
fn from(value: Specifiers) -> Self {
Expand All @@ -40,7 +40,7 @@ impl Display for PypiVersionSet {
#[derive(Clone, Debug, Ord, PartialOrd, Eq, PartialEq)]
/// This is a wrapper around [`Version`] that serves a version
/// within the [`PypiVersionSet`] version set.
pub struct PypiVersion(pub Version);
struct PypiVersion(pub Version);

impl VersionSet for PypiVersionSet {
type V = PypiVersion;
Expand Down Expand Up @@ -99,8 +99,8 @@ impl Display for PypiPackageName {
}
}

/// This is a [`DependencyProvider`] for PyPi packages
pub struct PypiDependencyProvider<'db> {
/// This is a [`DependencyProvider`] for PyPI packages
struct PypiDependencyProvider<'db> {
pool: Pool<PypiVersionSet, PypiPackageName>,
package_db: &'db PackageDb,
}
Expand Down

0 comments on commit adfc704

Please sign in to comment.