-
Notifications
You must be signed in to change notification settings - Fork 50
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 package maintainer information to metadata #484
Conversation
Codecov Report
@@ Coverage Diff @@
## master #484 +/- ##
==========================================
+ Coverage 81.01% 81.09% +0.07%
==========================================
Files 59 59
Lines 3556 3570 +14
Branches 682 687 +5
==========================================
+ Hits 2881 2895 +14
Misses 629 629
Partials 46 46
Continue to review full report at Codecov.
|
This information could be useful to other extensions.
3a98d9c
to
6d955de
Compare
We're working on a port of catkin-tools-document to the colcon ecosystem and this kind of thing is pretty useful for that. 👍 |
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.
One question: what are the specs that define the format of setup.cfg. These ones?
else: | ||
# If no explicit maintainer is given then it is likely that the | ||
# original author is maintaining the package | ||
maintainer = metadata.get('author') |
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.
We probably want to check if author exists before using get.
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.
get
will return None
if not set, which is intentional, otherwise I'd have used ['author']
.
We check it in 3 lines.
maintainer_email = metadata.get('maintainer_email') | ||
else: | ||
# If no explicit maintainer is given then it is likely that the | ||
# original author is maintaining the package |
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.
Assuming that the author is the maintainer is a bit optimistic. Not sure what is the end goal of the information but would be great if we could indicate somehow that this info is not as accurate as the one getting directly from the maintainer
tag.
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.
This behavior is based on recommended practices in the official Python packaging guide: https://packaging.python.org/en/latest/specifications/core-metadata/#maintainer
Co-authored-by: Jose Luis Rivero <[email protected]>
This information could be useful to other extensions.