Skip to content

Basic Packagedcode module for handling Rust's cargo crates - #1426

Merged
pombredanne merged 5 commits into
aboutcode-org:developfrom
ritiek:cargo-toml-packagedcode
Mar 10, 2019
Merged

Basic Packagedcode module for handling Rust's cargo crates#1426
pombredanne merged 5 commits into
aboutcode-org:developfrom
ritiek:cargo-toml-packagedcode

Conversation

@ritiek

@ritiek ritiek commented Mar 8, 2019

Copy link
Copy Markdown
Contributor

A very basic implementation at the moment. This is still missing tests which I'll add in shortly.

Otherwise, this is ready for review!

ritiek added 3 commits March 8, 2019 19:08
Signed-off-by: Ritiek Malhotra <ritiekmalhotra123@gmail.com>
Signed-off-by: Ritiek Malhotra <ritiekmalhotra123@gmail.com>
Signed-off-by: Ritiek Malhotra <ritiekmalhotra123@gmail.com>
@ritiek

ritiek commented Mar 8, 2019

Copy link
Copy Markdown
Contributor Author

Also see #1424.

@ritiek

ritiek commented Mar 8, 2019

Copy link
Copy Markdown
Contributor Author

For those looking to quickly test this out. Clone any Rust repository and run scancode on it:

$ git clone https://github.com/jvns/snake.rs
$ scancode --package snake.rs/ --json-pp -

@codecov

codecov Bot commented Mar 8, 2019

Copy link
Copy Markdown

Codecov Report

Merging #1426 into develop will decrease coverage by 0.02%.
The diff coverage is 60.78%.

Impacted file tree graph

@@             Coverage Diff             @@
##           develop    #1426      +/-   ##
===========================================
- Coverage    83.84%   83.81%   -0.03%     
===========================================
  Files          119      120       +1     
  Lines        14041    14091      +50     
===========================================
+ Hits         11772    11810      +38     
- Misses        2269     2281      +12
Impacted Files Coverage Δ
src/packagedcode/npm.py 84.83% <0%> (ø) ⬆️
src/packagedcode/__init__.py 75.86% <100%> (+0.86%) ⬆️
src/packagedcode/cargo.py 61.22% <61.22%> (ø)
src/commoncode/fileutils.py 82.5% <0%> (+1.32%) ⬆️
src/scancode/extract_cli.py 88% <0%> (+3%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update fb9734d...d3d6cb5. Read the comment docs.

@pombredanne pombredanne left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thank you ++ this is looking very good!
🙇‍♂️

ritiek added 2 commits March 10, 2019 14:03
Signed-off-by: Ritiek Malhotra <ritiekmalhotra123@gmail.com>
Signed-off-by: Ritiek Malhotra <ritiekmalhotra123@gmail.com>
@ritiek

ritiek commented Mar 10, 2019

Copy link
Copy Markdown
Contributor Author

I've added some tests as well.

This should be ready to merge if everything looks good. I think we could extend the subclass for handling more Cargo.toml attributes in an another PR. As it would be a big task in itself.

@ritiek ritiek changed the title [WIP] Packagedcode module for handling Rust's cargo crates Basic Packagedcode module for handling Rust's cargo crates Mar 10, 2019

@pombredanne pombredanne left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This all looking good.
Thanks ++
Merging now.

"thirdparty/text_unidecode-1.2-py2.py3-none-any.whl",
"thirdparty/text_unidecode-1.2-py2.py3-none-any.whl.ABOUT",
"thirdparty/text_unidecode-1.2-py2.py3-none-any.whl.NOTICE",
"thirdparty/toml-0.10.0-py2.py3-none-any.whl",

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

That's not your making but this is a weird test that I will need to fix.

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