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
add desiutil.depend.mergedep + tests #164
Conversation
I'll try to review this evening. |
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.
A couple of minor comments that can be easily fixed. Merge when ready.
py/desiutil/depend.py
Outdated
Raises | ||
------ | ||
ValueError | ||
If `conflict == 'exception'` and the same dependency name appears |
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.
In RST, double backticks are equivalent to <code></code>
, unlike MarkDown.
py/desiutil/depend.py
Outdated
in both headers with different values; or if `conflict` isn't one | ||
of 'src', 'dst', or 'exception'. | ||
''' | ||
if not conflict in ('src', 'dst', 'exception'): |
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.
conflict not in
is the more typical idiom.
thanks, comments addressed, merging. |
This PR adds
desiutil.depend.mergedep
as a utility function to merge DEPNAMnn + DEPVERnn dependencies+versions from one header into another. We messed this up with the blanc run by simply copying header keywords from one to the other, resulting in the sameDEPNAMnn
being listed more than once for different dependencies. Thismergedep
function takes care of rearranging numbers as needed. See the tests for examples.