Skip to content
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

Fix npm package.json parsing errors, improve parsing #786

Merged
merged 4 commits into from
Oct 4, 2017

Conversation

pombredanne
Copy link
Member

This PR is for #775 #785 and #782 and #779 ad generally improves and fixes multiple issues when dealing with URL parsing and package.json handling

Signed-off-by: Philippe Ombredanne <[email protected]>
 * do not map the legacy "url" to anything #775
 * allow to build a Package from data and not only from a file
 * do not return full location for the metafile but only filename #782
 * ensure only one download_urls is created #779
 * improve the mapping of "parties"
 * other misc code improvement and TODOs
 * add new tests for #775 and other samples

Signed-off-by: Philippe Ombredanne <[email protected]>
 * ensure that url parsing utils do not choke on empty
 * do not populate repo fields in Package if the url is not presemt

Signed-off-by: Philippe Ombredanne <[email protected]>
@codecov
Copy link

codecov bot commented Oct 4, 2017

Codecov Report

Merging #786 into develop will increase coverage by 0.95%.
The diff coverage is 89.47%.

Impacted file tree graph

@@             Coverage Diff             @@
##           develop     #786      +/-   ##
===========================================
+ Coverage    78.39%   79.35%   +0.95%     
===========================================
  Files           91       92       +1     
  Lines        11300    12135     +835     
===========================================
+ Hits          8859     9630     +771     
- Misses        2441     2505      +64
Impacted Files Coverage Δ
src/packagedcode/models.py 92.4% <100%> (ø) ⬆️
src/packagedcode/utils.py 92.3% <100%> (+2.83%) ⬆️
src/packagedcode/npm.py 84.1% <82.22%> (+7.88%) ⬆️
src/typecode/contenttype.py 76.67% <0%> (-8.84%) ⬇️
src/licensedcode/tokenize.py 91.76% <0%> (-3.83%) ⬇️
src/licensedcode/frequent_tokens.py 100% <0%> (ø) ⬆️
src/typecode/entropy.py 32% <0%> (ø)
src/licensedcode/__init__.py 95.45% <0%> (+0.21%) ⬆️
src/commoncode/fileutils.py 84.75% <0%> (+1.21%) ⬆️
src/scancode/cli.py 93.66% <0%> (+1.58%) ⬆️
... and 6 more

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 7d12968...b0ae573. Read the comment docs.

@pombredanne pombredanne merged commit 536f354 into develop Oct 4, 2017
@pombredanne pombredanne deleted the 775-npm-error branch October 4, 2017 02:07
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.

1 participant