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

Add package maintainer information to metadata #484

Merged
merged 4 commits into from
Mar 31, 2022
Merged

Conversation

cottsay
Copy link
Member

@cottsay cottsay commented Feb 16, 2022

This information could be useful to other extensions.

@cottsay cottsay added the enhancement New feature or request label Feb 16, 2022
@cottsay cottsay self-assigned this Feb 16, 2022
@codecov
Copy link

codecov bot commented Feb 16, 2022

Codecov Report

Merging #484 (c7c99bf) into master (d8e455e) will increase coverage by 0.07%.
The diff coverage is 100.00%.

@@            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              
Impacted Files Coverage Δ
colcon_core/package_augmentation/python.py 90.24% <100.00%> (+2.00%) ⬆️

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 d8e455e...c7c99bf. Read the comment docs.

This information could be useful to other extensions.
@cottsay cottsay force-pushed the cottsay/maintainers branch from 3a98d9c to 6d955de Compare March 15, 2022 17:51
@mikepurvis
Copy link
Contributor

We're working on a port of catkin-tools-document to the colcon ecosystem and this kind of thing is pretty useful for that. 👍

Copy link
Contributor

@j-rivero j-rivero left a 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')
Copy link
Contributor

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.

Copy link
Member Author

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
Copy link
Contributor

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.

Copy link
Member Author

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

@cottsay cottsay merged commit 64f06cf into master Mar 31, 2022
@cottsay cottsay deleted the cottsay/maintainers branch March 31, 2022 17:33
@cottsay cottsay added this to the 0.7.2 milestone Apr 11, 2022
esteve pushed a commit to esteve/colcon-core that referenced this pull request Apr 26, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Development

Successfully merging this pull request may close these issues.

3 participants