-
Notifications
You must be signed in to change notification settings - Fork 33
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
PythonPackage parse from string++ #253
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Honestly I love it. LGTM. If you don't have any other comments I think we can merge. The only thing I'm not 100% on is the extern crate piece in lib.rs.
Tag #128 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Cool, looks more idiomatic, this is a learning experience for me.
Same 😅. I really like it though so far. |
howdy, (retry)
closes #199
The scope of this pull request got a little bigger than I intended it to, and the PythonPackage was pretty much completely re-implemented. While all test are passing on my end, if this causes problems or just simply isn't what you envisioned, don't feel bad about saying so.
here's what we got in this puppy...
PythonPackage.op
as a new enum (VersionOp)VersionOp
Default
std::str::FromStr
fmt::Display
fmt::Display
foo PythonPackage::from("requests==2.28.1".to_string());
parses the python package/dependency from the string.just realize I didn't re-implement PythonPackage's string function, it returns the name currently. we can fix that though.
Like i said, it's a lot so if you have questions or it's just outright in conflict with future plans, just let me know.
I would not consider myself a "rustacean" so there may be plenty of way to improve/make more idiomatic.