Repository navigation
Conversation
…ode-org#5369 Split Depends on every comma so a single-line field such as "R (>= 3.4.0), methods, utils" yields one dependency per package instead of a single R dependency with a garbled requirement. Skip empty entries so a missing Depends field no longer creates an invalid purl, and make get_party_info return (None, None) so a DESCRIPTION without Author or Maintainer no longer crashes. Signed-off-by: 72004 <syahra2014@gmail.com>
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #5369
The CRAN
DESCRIPTIONparser now:Dependson every comma, soR (>= 3.4.0), methods, utilsgives three dependencies (Rwith>= 3.4.0,methods,utilswith>= 3.0) instead of oneRdependency with a garbled requirement;Dependsfield returns no dependencies instead of raisingValueError: Invalid purl;(None, None)fromget_party_infofor an empty value, so a file withoutAuthororMaintainer(common in source packages that only haveAuthors@R) no longer raisesTypeError.Tests: two new fixtures (
cran/single-line-depends,cran/no-depends) and a unit test for the newget_dependencieshelper. All three tests fail ondevelopand pass with this change. The existingcodetoolsandgeometryexpectations are unchanged.Tasks
pytest tests/packagedcode/test_cran.py(5 passed)