regro / rever

Releaser of Versions
https://regro.github.io/rever-docs/
BSD 3-Clause "New" or "Revised" License
74 stars 34 forks source link

Add authors to rever #165

Closed CJ-Wright closed 5 years ago

CJ-Wright commented 5 years ago

I think we might need a regenerate authors command. That way when changes are made to the authors yaml we can update the generated files. The setup command created a thing with Christopher. I then changed the yaml file but I don't know how to regenerate the other files and make sure things are correct.

scopatz commented 5 years ago

rever -f -a authors setup will regenerate the authors

CJ-Wright commented 5 years ago

I got:

(regro) christopher@christopher-ubuntu ~/dev/rever rever_authors $ rever -f -a authors setup
Activity 'authors' has already been setup!
scopatz commented 5 years ago

That seems like a bug.

scopatz commented 5 years ago

Looking into it

scopatz commented 5 years ago

Fix is in #166

scopatz commented 5 years ago

Ok merge from master and try it again :)

CJ-Wright commented 5 years ago

Ok, I'll add docs on the force setup for doing this again

scopatz commented 5 years ago

Thanks!

CJ-Wright commented 5 years ago
Re-doing acctivity 'authors' which has already been setup!
Authors file 'AUTHORS' exists AND Mailmap file '.mailmap' exists
rever forced, overwriting files!
'igor.ghisi@gmail.com' does not have 'Igor T. Ghisi' listed! Please add the name to 'igor.ghisi@gmail.com' in '.authors.yml'. For example:

- name: Igor T. Ghisi
  email: igor.ghisi@gmail.com

Or add an alias:

- name: Some Body Else
  email: igor.ghisi@gmail.com
  aliases:
    - Igor T. Ghisi
Traceback (most recent call last):
  File "/home/christopher/mc/envs/regro/bin/rever", line 6, in <module>
    exec(compile(open(__file__).read(), __file__, 'exec'))
  File "/home/christopher/dev/rever/scripts/rever", line 3, in <module>
    main()
  File "/home/christopher/dev/rever/rever/main.xsh", line 233, in main
    env_main(args=args)
  File "/home/christopher/dev/rever/rever/main.xsh", line 225, in env_main
    setup_activities(ns)
  File "/home/christopher/dev/rever/rever/main.xsh", line 179, in setup_activities
    status = act.setup()
  File "/home/christopher/dev/rever/rever/activity.xsh", line 103, in setup
    status = self._setup()
  File "/home/christopher/dev/rever/rever/activities/authors.xsh", line 170, in setup_func
    md = self._update_authors(filename, template, format, metadata, sortby)
  File "/home/christopher/dev/rever/rever/activities/authors.xsh", line 178, in _update_authors
    md = update_metadata(metadata)
  File "/home/christopher/dev/rever/rever/authors.xsh", line 113, in update_metadata
    _verify_names_emails_aliases(y, by_names, by_emails, filename)
  File "/home/christopher/dev/rever/rever/authors.xsh", line 89, in _verify_names_emails_aliases
    raise RuntimeError("Duplicated author/email combos")
RuntimeError: Duplicated author/email combos
scopatz commented 5 years ago

Yeah that seems like it is supposed to happen. As the error message says, you need to edit the .authors.yml file

scopatz commented 5 years ago

I don't still don't understand how you got such a weird .authors.yml file. You may want to blow it away and start again.

scopatz commented 5 years ago

My .authors.yml file looks like:

- name: Anthony Scopatz
  email: scopatz@gmail.com
  num_commits: 215
  first_commit: 2017-05-16 14:52:07
- name: Marius van Niekerk
  email: marius.v.niekerk@gmail.com
  num_commits: 0
  first_commit: 2018-10-13 11:39:05
- name: Dougal J. Sutherland
  email: dougal@gmail.com
  num_commits: 1
  first_commit: 2018-08-11 13:07:29
- name: Christopher J. Wright
  email: cjwright4242gh@gmail.com
  num_commits: 3
  first_commit: 2017-07-25 20:41:13
- name: Igor T. Ghisi
  email: igor.ghisi@gmail.com
  num_commits: 4
  first_commit: 2018-02-26 18:09:46
- name: Aaron Meurer
  email: asmeurer@gmail.com
  num_commits: 34
  first_commit: 2017-06-23 14:44:39
- name: Christoph Deil
  email: Deil.Christoph@gmail.com
  num_commits: 1
  first_commit: 2018-10-17 16:35:00
- name: christopher
  email: cjwright4242@gmail.com
  num_commits: 114
  first_commit: 2017-08-31 14:00:05
CJ-Wright commented 5 years ago

I think there is a bug in this, I'm going to open a new PR but the duplicate stuff is not doing the right thing.