- Notifications
You must be signed in to change notification settings - Fork 236
add list of contributors for releases #781
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
Conversation
taken from the x_contributors META attribute. I strip the emails from the contributors, because we don't want an email straight on a webpage. I also see if the name is actually a CPAN ID, and if so go a little fancier. To see an example, look at Test-Strict.
gabor++ for the idea
root/inc/author-pic.html Outdated
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.
Is this causing trouble on the /author/ page? I know float == left is used there.
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.
Argh. Good one. I'll check.
Is there a spec for the x_cuntributors tag? It seems it is unstructured which makes it harder for us to parse. Since it's not widely used yet, can we change it to be a hash like structure with separate keys for pause id and email? |
The reason we are using an x_ tag is to allow us to figure out how it should work. What about two arrays x_contributors_pause and x_contributors_email which would be Name user@domain ? Actually if there was only one key x_contributors then it could be either a single PAUSE id or an e-mail. Does that make things hard? |
I was looking at the Contributors thing this morning... |
let's be explicit: x_contributors: - email: perler@pause.org pauseid: PERLER name: "Moritz Onken" - pauseid: RWSTAUNER make none of the attributes mandatory, but strongly recommend at least entering the pauseid so we can easily link to their profile and do other nasty stuff. We would index that information as well so people can search on it. |
We could match email addresses against any "alternate email addresses" specified in metacpan author data, |
I guess we could do that. But timing might be an issue. We could map at index time, or we could query the email addresses "live". |
yeah, your hash structure seems useful, i'm just also thinking about how to populate this data (like the dzil plugin). |
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.
Please make sure that $contributors
is an arrayref.
The dzil plugin can use the metacpan api to resolve the email address to a pauseid if the contributor has his email address added to the metacpan profile. |
What will be really awesome is when you will be able to see all the contributors of a given person. Even for people who don't have a PAUSE id. I wonder what needs to be done to have that capability. |
All excellent advice. Mucho danke. :-) I like splitting the x_contributor entries in a hash. I'll sure be safer than the current s/<.*?>// scrubbing. And yes, we don't want to have the pause_id mandatory because one of the goals is to reward casual patchers who might not be CPAN authors. I'll take the review comments in and change the code to work with the new proposed x_contributors format. Expect a patch sometime before the end of the week-end. |
maybe @rsrchboy might like to chime in |
... as it was indeed causing problems with the author page. monken++
... with a little automatic convertion done for testing with the current structure
The Dist::Zilla plugin automatically generates this information by looking at the git commit history, and only the git history at the moment... so it's stored as an array of I don't really mind doing lookups against the metacpan api for PAUSE ids if needs be, but I'm interested in hearing what @dagolden thinks. |
I would strongly suggest sticking with an array of email addresses. I say that for three reasons: (1) It follows the exact same rules as the existing 'authors' field. Because 'authors' means "people responsible" (i.e. complain to them), it's not right to list contributors there, thus the idea to add a field. (2) It can be easily generated from VCS data, which is by far the easiest way to manage such a list. I've already had to go reconstruct some stuff for HTTP::Tiny and I can tell you that if I had to manage contributor data by hand to add PAUSE ID's, I probably wouldn't bother. (3) PAUSE ID's are effectively redundant with an @cpan.org email address, so having both is unnecessary. Thus... I strongly suspect that authors who list contributors will do so in automated ways. Anyone who wants to be sure their contributors can be matched to PAUSE accounts will need to make sure they know what it is. Once they know what it is, they can just as easily provide the @cpan.org address as add an extra field. If this becomes common, contributors who really want their PAUSE ID used will use it for their commits or will ask authors to list them under their @cpan.org address. In my case with HTTP::TIny, I found that using a git .mailmap file along with ContributorsFromGit was the easy thing to do. If I were really motivated to map to PAUSE ID's, I'd just add entries there so commit emails get mapped to @cpan.org emails. Done. Overengineering the field for the sake of metacpan seems like bad spec design. I would oppose x_contributors ever becoming an official part of the spec unless it matches the 'authors' field in format. From metacpan's perspective, if the email addresses are @cpan.org, then it's easy to link. Even if not, it's easy to grab gravatars and at least show pictures. That's probably enough. Or, people could register email addresses themselves to link to PAUSE. Or metacpan could link to github account emails, etc. I encourage anyone who disagrees with me to ship at least two modules to CPAN with a contributors list of at least a few people to get a sense of the workload and how people will probably do this in practice. (Heck, just go try to create the contributors list for metacpan.) Email addresses are easy. PAUSE IDs are hard. |
I'm inclined to agree with David. As in almost everything I think simpler is better, and with the discovery of the .mailmap option I know not everything uses git and/or dzil, but to take David's comment to the next level, |
The whole point of calling this x_contributors and not adding it to the CPAN::Meta::Spec yet was to allow experimenting. I think it would be better to stick with the simple 'Name <email>' for now, make MeteCPAN display it and encourage people to add the field to their distributions. IMHO it would be way better than hoping to find the perfect solution. Then we can see if this catches on and we can see input from more people. (updated to show <email> part) |
I would still suggest getting email addresses, so it's possible to link to PAUSE ID via @cpan.org. But as I said, I encourage people to actually do this for some real projects -- particularly bigger ones -- and see what you find easiest to do before trying to make an abstract decision about it. For example, getting a list of author names and emails addresses from git commits is trivial (even without dzil):
I suspect most multi-author projects are using dzil or M::I and I'm sure someone can whip up an M::I plugin to grab git author data. Using the CommittersFromGit plugin I've done it for these modules so far (HTTP::Tiny has the biggest list):
If you want adoption, you want to make this as easy as possible. Now I don't even think about it. My dzil plugin bundle just generates it automatically for me on each release. |
Oh the <email> part in my previous commend was eaten by Github. I meant 'Name <email>' |
Algorithm is dead simple. Entry looks like 'Name <email>', the email will be extracted. Otherwise, the entry is considered to be the name and that's it. And if the email has a cpan.org domain, it's taken to be a pause id. That's it.
The latest code now re-work with the simple x_contributor list. I'll begin to use the CommitersFromGit plugin on my distributions to soak the whole thing. And @dagolden++ to make me discover the '.mailmap' git feature. |
add list of contributors for releases
Thanks very much for this. :) |
+1 Looks great! |
I'm a hired gun here. :-)
@szabgab introduced a x_contributors key in the release's metadata. That patch inserts the list of contributors (if there are any) below the author.
if you want to have examples of distributions that have contributors, have a gander at Test-Strict and /Dist-Zilla-PluginBundle-DAGOLDEN
Two points: