8000 feat: add first part of `rattler_pypi_interop` crate by travishathaway · Pull Request #1151 · conda/rattler · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
Dismiss alert

feat: add first part of rattler_pypi_interop crate #1151

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

travishathaway
Copy link
Contributor

Description

This pull request is an attempt to make initial pull request submitted (#1054) a little more manageable. It contains just the types module and this module has been trimmed down to remove sub-modules that depended on other modules in this crate. The missing files are:

  • artifact
  • artifact_name
  • install_path
  • project_info

The above will be add back in future pull requests.

Copy link
@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot reviewed 114 out of 122 changed files in this pull request and generated no comments.

Files not reviewed (8)
  • crates/rattler_pypi_interop/test-data/find_distributions/Lib/site-packages/Flask-1.1.4.dist-info/INSTALLER: Language not supported
  • crates/rattler_pypi_interop/test-data/find_distributions/Lib/site-packages/Flask-1.1.4.dist-info/LICENSE.rst: Language not supported
  • crates/rattler_pypi_interop/test-data/find_distributions/Lib/site-packages/Flask-1.1.4.dist-info/METADATA: Language not supported
  • crates/rattler_pypi_interop/test-data/find_distributions/Lib/site-packages/Flask-1.1.4.dist-info/RECORD: Language not supported
  • crates/rattler_pypi_interop/test-data/find_distributions/Lib/site-packages/Flask-1.1.4.dist-info/WHEEL: Language not supported
  • crates/rattler_pypi_interop/test-data/find_distributions/Lib/site-packages/Jinja2-2.11.3.dist-info/INSTALLER: Language not supported
  • crates/rattler_pypi_interop/test-data/find_distributions/Lib/site-packages/Jinja2-2.11.3.dist-info/LICENSE.rst: Language not supported
  • crates/rattler_pypi_interop/test-data/find_distributions/L 8000 ib/site-packages/Jinja2-2.11.3.dist-info/METADATA: Language not supported

@baszalmstra
Copy link
Collaborator

Just want to let you know that this is on my radar! I will take a look on Thursday!

Copy link
Collaborator
@baszalmstra baszalmstra left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry for the late review.

I think there are a few types that can be replaced by pep508_rs or other crates. The less we have to maintain here the better.

There is a lot of test-data that is unused. Lets get rid of that.

Lets also remove commented out unused code.

@@ -0,0 +1,180 @@
use miette::Diagnostic;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I dont think we need this type. Everthing we would need is included in pep508_rs::PackageName

Comment on lines +21 to +27
// Private modules
// mod utils;

// Public modules
// pub mod artifacts;
// pub mod index;
// pub mod python_env;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lets remove any code that is not used.

//!
//! - Querying a `PyPI` repository for package metadata.
//! - Reading Python package metadata from locally installed packages.
//!
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it would be especially good to amend this with what the library wont do!

native-tls = ['reqwest/native-tls']
rustls-tls = ['reqwest/rustls-tls']

[dependencies]
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are all these dependencies actually used? It seems like a lot for just the types? You can check with cargo machete

@@ -0,0 +1,119 @@
// Implementation comes from https://github.com/njsmith/posy/blob/main/src/vocab/extra.rs
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

pub type Fields = HashMap<String, Vec<String>>;

#[cfg_attr(test, derive(Debug, serde::Deserialize, PartialEq, Eq))]
pub struct RFC822ish {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think uv uses mailparse for this. Id much rather use an existing crate than maintain this ourselves.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this used?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we dont use these sdist test data files do we?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I dont think we use this.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I dont think we use this vendored library!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants
0