8000 Add sphinx support - pydotorg compat (ref #1385) by AA-Turner · Pull Request #1569 · python/peps · GitHub
[go: up one dir, main page]

Skip to content

Add sphinx support - pydotorg compat (ref #1385) #1569

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

Closed
wants to merge 108 commits into from
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
108 commits
Select commit Hold shift + click to select a range
f4ced1b
Current state
AA-Turner Apr 24, 2020
f83e08f
Fix title generation
AA-Turner Apr 25, 2020
9cd91e4
Fix contents section location
AA-Turner Apr 25, 2020
4a36065
Clarify contents page
AA-Turner Apr 25, 2020
62edb6e
Split pep_parser to files
AA-Turner Apr 25, 2020
eb795e0
Update conf
AA-Turner Apr 25, 2020
a13f959
clean imports
AA-Turner Apr 25, 2020
c7b9cea
get pep 0 generation to work
AA-Turner Apr 26, 2020
9403363
Update build and Makefile
AA-Turner Apr 26, 2020
88e20a2
Misc cleanup
AA-Turner Apr 26, 2020
e6869ca
Add sphinx dependency
AA-Turner Apr 26, 2020
4080e62
update makefile
AA-Turner Apr 26, 2020
af0dfc3
fix for read the docs
AA-Turner Apr 26, 2020
531e860
updates for contents
AA-Turner Apr 26, 2020
c9e1c14
support pythondotorg build process
AA-Turner Apr 26, 2020
3dd68a1
fix urls for read the docs
AA-Turner Apr 27, 2020
ab28391
fix import error
AA-Turner Apr 27, 2020
1d64717
make compatible with read the docs
AA-Turner Apr 27, 2020
9d57d7f
update base url
AA-Turner Apr 27, 2020
e88699f
Fix numerical index (pep list was being overwritten)
AA-Turner Apr 27, 2020
cfafa99
Fix name parsing
AA-Turner Apr 27, 2020
d5fe06f
Update name parsing in PEP 0
AA-Turner Apr 28, 2020
0b2c7a4
Include requirements file
AA-Turner Apr 28, 2020
31fe99c
Update ToC to remove title
AA-Turner Apr 28, 2020
1fb3112
Update Contents class
AA-Turner Apr 28, 2020
cd600b4
Fixes as per Éric Araujo's comments
AA-Turner Apr 28, 2020
6bf48d5
move Travis CI to use requirements.txt
AA-Turner Apr 28, 2020
3c31d04
Update build to include 3.8 and sanity checks
AA-Turner Apr 28, 2020
f779673
Move to author metadata lookup for PEP index
AA-Turner Apr 28, 2020
cc2eb9e
update .travis.yml
AA-Turner Apr 28, 2020
992ec43
Lint travis config with config.travis-ci.com
AA-Turner Apr 28, 2020
12e8a96
oops...
AA-Turner Apr 28, 2020
a92fa4c
Correct command calls
AA-Turner Apr 28, 2020
d72d4f4
Move CSV to comma separated
AA-Turner Apr 29, 2020
0057861
Allow Failures in Travis
AA-Turner Apr 30, 2020
2f3b15e
Update Makefile
AA-Turner May 1, 2020
7351d99
Re-organise extension
AA-Turner May 1, 2020
4f6ea10
Update Makefile
AA-Turner May 1, 2020
f08e9ff
Improve packaging process
AA-Turner May 15, 2020
1e8ea36
Transform <code> to <tt>
AA-Turner May 15, 2020
72064da
Transform literal blocks
AA-Turner May 15, 2020
108615e
Transform blockquotes
AA-Turner May 16, 2020
441b35f
Fix author sort
AA-Turner May 16, 2020
d409205
PEP0 transforms
AA-Turner May 16, 2020
fa77eb0
Fix minor regression in blocktest code
AA-Turner May 16, 2020
761e66f
Fix minor regression in li/p code
AA-Turner May 16, 2020
c42e5f6
Try again on theming - starting over!
AA-Turner Jun 17, 2020
6213270
Type hinting: pep_zero.py
AA-Turner Jun 21, 2020
9aaff1f
clean imports in PEPTargetNotes
AA-Turner Jun 21, 2020
62e2536
Add github source link transform
AA-Turner Jun 21, 2020
15696fb
Rename pep_target_notes.py to better reflect role
AA-Turner Jun 21, 2020
c9da153
Remove header fields as per pydotorg converters
AA-Turner Jun 21, 2020
7a348b3
prevent unneeded source copying
AA-Turner Jun 21, 2020
1e73311
Clean up docutils.conf
AA-Turner Jun 21, 2020
ee3e9a5
Clean contents.rst - emphasise that we only use it for Sphinx
AA-Turner Jun 21, 2020
841fa31
PEP header styling changes
AA-Turner Jun 21, 2020
25b76ff
Add custom paragraph and ordered list visitors (based on html4css1 wr…
AA-Turner Jun 21, 2020
4ced4a0
Add jinja2 filter for PEP Ids
AA-Turner Jun 21, 2020
d5aab3b
Add math2html maths processor
AA-Turner Jun 21, 2020
6fd9795
Reduce page weight - remove jQuery and underscore.js
AA-Turner Jun 21, 2020
3bfadb2
Add pydotorg base styles (and fix fonts)
AA-Turner Jun 21, 2020
022a561
Add favicon
AA-Turner Jun 21, 2020
c5ba162
Clean theme.conf
AA-Turner Jun 21, 2020
68f87c7
Add custom breadcrumbs template to mirror pydotorg
AA-Turner Jun 21, 2020
9d82e6b
Remove jQuery from the search page
AA-Turner Jun 21, 2020
371a61d
Add custom sidebar templates
AA-Turner Jun 21, 2020
da69c1a
subset of doctools.js and searchtools.js in plain ES6
AA-Turner Jun 21, 2020
a4f227a
Core layout template
AA-Turner Jun 21, 2020
494db5c
clear PEP styles
AA-Turner Jun 21, 2020
9b66893
PEP style overrides
AA-Turner Jun 21, 2020
cd22dd7
Misc conf.py changes
AA-Turner Jun 21, 2020
ae8f901
Check translator class used by RTD
AA-Turner Jun 21, 2020
a7f3736
Add make clean option
AA-Turner Jun 22, 2020
47c5a66
Add GH pages
AA-Turner Jun 22, 2020
12a30ad
Add index file
AA-Turner Jun 22, 2020
754b684
Clean up RSS generation
AA-Turner Jun 22, 2020
3ab124a
Remove old pyramid files
AA-Turner Jun 22, 2020
1d1d8db
Re-organise pep_processor
AA-Turner Jun 22, 2020
819b0cb
Rename pep zero generator files for consistency
AA-Turner Jun 22, 2020
54b94fb
Reorganise pep theme
AA-Turner Jun 22, 2020
126195a
Clean conf.py
AA-Turner Jun 22, 2020
2dddd9c
Clean imports
AA-Turner Jun 22, 2020
8216159
Modern class defs
AA-Turner Jun 22, 2020
cf7fae2
Type hints
AA-Turner Jun 22, 2020
2e2cb32
Compile regex
AA-Turner Jun 22, 2020
d30356d
PEPError helper method
AA-Turner Jun 22, 2020
d0e57e0
Functionise
AA-Turner Jun 22, 2020
771d24e
Move constants
AA-Turner Jun 22, 2020
8e82d03
Small changes to pep_zero_generator
AA-Turner Jun 22, 2020
2385ded
Update excludes
AA-Turner Jun 22, 2020
1822c19
Conf updates
AA-Turner Jun 22, 2020
1e30f64
Update sphinx version
AA-Turner Aug 14, 2020
4b79aaf
Remove unneeded files
AA-Turner Aug 14, 2020
40d706a
Fix typos
AA-Turner Aug 14, 2020
6147159
Use pydotorg mathematics rendering
AA-Turner Aug 14, 2020
b661ccc
Edits for style in __init__.py
AA-Turner Aug 14, 2020
270b825
Clarify elements in build flow
AA-Turner Aug 14, 2020
4f15149
Update pep2rss to closer match current output
AA-Turner Aug 15, 2020
e257372
Use absolute path
AA-Turner Aug 15, 2020
c263371
Add venv to gitignore
AA-Turner Aug 15, 2020
116f3a7
Match current state of name parsing branch
AA-Turner Aug 15, 2020
e37b5d2
Makefile should be generating rss!
AA-Turner Aug 15, 2020
c44d852
PEP 249 style is different
AA-Turner Aug 15, 2020
ad4c6 8000 a1
Implemented auto-linking with the PEP pattern
AA-Turner Aug 15, 2020
6586784
Definition list styling only applies to headers and footnotes
AA-Turner Aug 15, 2020
ae53f01
Add last-modified date to footer re python/pythondotorg#1564
AA-Turner Aug 15, 2020
8f03eeb
Add sphinx support - pythondotorg compat.
AA-Turner Aug 15, 2020
08f55d7
Change html_title to lowercase (per @pradyunsg)
AA-Turner Aug 16, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Match current state of name parsing branch
  • Loading branch information
AA-Turner committed Aug 15, 2020
commit 116f3a7761849d34ddcd9c60dee00c2907d79e23
261 changes: 12 additions & 249 deletions AUTHORS.csv
Original file line number Diff line number Diff line change
@@ -1,249 +1,12 @@
"Full Name", "Surna 8000 me First", "Name Reference"
"Aahz", "Aahz", "Aahz"
"James C. Ahlstrom", "Ahlstrom, James C.", "Ahlstrom"
"Jim Althoff", "Althoff, Jim", "Althoff"
"Kevin Altis", "Altis, Kevin", "Altis"
"Chris Angelico", "Angelico, Chris", "Angelico"
"Philipp Angerer", "Angerer, Philipp", "Angerer"
"David Ascher", "Ascher, David", "Ascher"
"Peter Astrand", "Astrand, Peter", "Astrand"
"Carl Banks", "Banks, Carl", "Banks"
"Christopher Barker", "Barker, Christopher", "Barker"
"Paul Barrett", "Barrett, Paul", "Barrett"
"Facundo Batista", "Batista, Facundo", "Batista"
"Anthony Baxter", "Baxter, Anthony", "Baxter"
"Stefan Behnel", "Behnel, Stefan", "Behnel"
"Thomas Bellman", "Bellman, Thomas", "Bellman"
"Alexander Belopolsky", "Belopolsky, Alexander", "Belopolsky"
"Eli Bendersky", "Bendersky, Eli", "Bendersky"
"Cory Benfield", "Benfield, Cory", "Benfield"
"Steven Bethard", "Bethard, Steven", "Bethard"
"Stéphane Bidoul", "Bidoul, Stéphane", "Bidoul"
"Stefano Borini", "Borini, Stefano", "Borini"
"Georg Brandl", "Brandl, Georg", "Brandl"
"Erik M. Bray", "Bray, Erik M.", "Bray"
"Gerald Britton", "Britton, Gerald", "Britton"
"Oleg Broytman", "Broytman, Oleg", "Broytman"
"Benoit Bryon", "Bryon, Benoit", "Bryon"
"Brandt Bucher", "Bucher, Brandt", "Bucher"
"Brett Cannon", "Cannon, Brett", "Cannon"
"Justin Cappos", "Cappos, Justin", "Cappos"
"Josiah Carlson", "Carlson, Josiah", "Carlson"
"W Isaac Carroll", "Carroll, W Isaac", "Carroll"
"Matt Chisholm", "Chisholm, Matt", "Chisholm"
"Nick Coghlan", "Coghlan, Nick", "Coghlan"
"Dave Cole", "Cole, Dave", "Cole"
"Robert Collins", "Collins, Robert", "Collins"
"Paul Colomiets", "Colomiets, Paul", "Colomiets"
"Mario Corchero", "Corchero, Mario", "Corchero"
"Christopher A. Craig", "Craig, Christopher A.", "Craig"
"Laura Creighton", "Creighton, Laura", "Creighton"
"Steven D'Aprano", "D'Aprano, Steven", "D'Aprano"
"Kushal Das", "Das, Kushal", "Das"
"Ned Deily", "Deily, Ned", "Deily"
"Tim Delaney", "Delaney, Tim", "Delaney"
"Lois Anne DeLong", "DeLong, Lois Anne", "DeLong"
"Jeroen Demeyer", "Demeyer, Jeroen", "Demeyer"
"Vladimir Diaz", "Diaz, Vladimir", "Diaz"
"Jack Diederich", "Diederich, Jack", "Diederich"
"Steve Dower", "Dower, Steve", "Dower"
"Walter Dörwald", "Dörwald, Walter", "Dörwald"
"Fred L. Drake, Jr.", "Drake, Fred L., Jr.", "Drake"
"Michael P. Dubner", "Dubner, Michael P.", "Dubner"
"Paul F. Dubois", "Dubois, Paul F.", "Dubois"
"Ernest W. Durbin III", "Durbin, Ernest W., III", "Durbin"
"P.J. Eby", "Eby, P.J.", "Eby"
"Phillip J. Eby", "Eby, Phillip J.", "Eby"
"Tal Einat", "Einat, Tal", "Einat"
"Micah Elliott", "Elliott, Micah", "Elliott"
"Jeff Epler", "Epler, Jeff", "Epler"
"David Eppstein", "Eppstein, David", "Eppstein"
"Clark C. Evans", "Evans, Clark C.", "Evans"
"Gregory Ewing", "Ewing, Gregory", "Ewing"
"Greg Ewing", "Ewing, Greg", "Ewing"
"Martijn Faassen", "Faassen, Martijn", "Faassen"
"Ben Finney", "Finney, Ben", "Finney"
"Michael Foord", "Foord, Michael", "Foord"
"Ethan Furman", "Furman, Ethan", "Furman"
"Pablo Galindo", "Galindo, Pablo", "Galindo"
"Paul Ganssle", "Ganssle, Paul", "Ganssle"
"Alex Gaynor", "Gaynor, Alex", "Gaynor"
"Pradyun Gedam", "Gedam, Pradyun", "Gedam"
"Damien George", "George, Damien", "George"
"Frédéric B. Giacometti", "Giacometti, Frédéric B.", "Giacometti"
"Scott Gilbert", "Gilbert, Scott", "Gilbert"
"Ryan Gonzalez", "Gonzalez, Ryan", "Gonzalez"
"David Goodger", "Goodger, David", "Goodger"
"Grant Griffin", "Griffin, Grant", "Griffin"
"Mark E. Haase", "Haase, Mark E.", "Haase"
"Mark Hammond", "Hammond, Mark", "Hammond"
"Peter Harris", "Harris, Peter", "Harris"
"Larry Hastings", "Hastings, Larry", "Hastings"
"Christian Heimes", "Heimes, Christian", "Heimes"
"Thomas Heller", "Heller, Thomas", "Heller"
"Doug Hellmann", "Hellmann, Doug", "Hellmann"
"Magnus Lie Hetland", "Hetland, Magnus Lie", "Hetland"
"Raymond Hettinger", "Hettinger, Raymond", "Hettinger"
"Neil Hodgson", "Hodgson, Neil", "Hodgson"
"Daniel Holth", "Holth, Daniel", "Holth"
"Philip House", "House, Philip", "House"
"Laurens Van Houtven", "Van Houtven, Laurens", "Houtven"
"Ben Hoyt", "Hoyt, Ben", "Hoyt"
"Miro Hrončok", "Hrončok, Miro", "Hrončok"
"Michael Hudson", "Hudson, Michael", "Hudson"
"Jeremy Hylton", "Hylton, Jeremy", "Hylton"
"Inada Naoki", "Inada, Naoki", "Inada"
"Dustin Ingram", "Ingram, Dustin", "Ingram"
"Atsuo Ishimoto", "Ishimoto, Atsuo", "Ishimoto"
"Jack Jansen", "Jansen, Jack", "Jansen"
"Chris Jerdonek", "Jerdonek, Chris", "Jerdonek"
"Joseph Jevnik", "Jevnik, Joseph", "Jevnik"
"Jim J. Jewett", "Jewett, Jim J.", "Jewett"
"Jim Jewett", "Jewett, Jim", "Jewett"
"Ewa Jodlowska", "Jodlowska, Ewa", "Jodlowska"
"Richard Jones", "Jones, Richard", "Jones"
"Konstantin Kashin", "Kashin, Konstantin", "Kashin"
"Reid Kleckner", "Kleckner, Reid", "Kleckner"
"Thomas Kluyver", "Kluyver, Thomas", "Kluyver"
"Stepan Koltsov", "Koltsov, Stepan", "Koltsov"
"Stefan Krah", "Krah, Stefan", "Krah"
"Sebastian Kreft", "Kreft, Sebastian", "Kreft"
"Holger Krekel", "Krekel, Holger", "Krekel"
"A.M. Kuchling", "Kuchling, A.M.", "Kuchling"
"Trishank Karthik Kuppusamy", "Kuppusamy, Trishank Karthik", "Kuppusamy"
"Robert Kuska", "Kuska, Robert", "Kuska"
"Joshua Landau", "Landau, Joshua", "Landau"
"Łukasz Langa", "Langa, Łukasz", "Langa"
"Michael Lee", "Lee, Michael", "Lee"
"Jukka Lehtosalo", "Lehtosalo, Jukka", "Lehtosalo"
"Marc-André Lemburg", "Lemburg, Marc-André", "Lemburg"
"Ivan Levkivskyi", "Levkivskyi, Ivan", "Levkivskyi"
"Gregory Lielens", "Lielens, Gregory", "Lielens"
"Björn Lindqvist", "Lindqvist, Björn", "Lindqvist"
"Joshua Lock", "Lock, Joshua", "Lock"
"Tony Lownds", "Lownds, Tony", "Lownds"
"Martin von Löwis", "von Löwis, Martin", "von Löwis"
"Martin v. Löwis", "\v. Löwis, Martin", "\v. Löwis"
"Mariatta", "Mariatta", "Mariatta"
"Alex Martelli", "Martelli, Alex", "Martelli"
"Joseph Martinot-Lagarde", "Martinot-Lagarde, Joseph", "Martinot-Lagarde"
"Lino Mastrodomenico", "Mastrodomenico, Lino", "Mastrodomenico"
"Patrick Maupin", "Maupin, Patrick", "Maupin"
"Andrew McClelland", "McClelland, Andrew", "McClelland"
"Charles R. McCreary", "McCreary, Charles R.", "McCreary"
"Chris McDonough", "McDonough, Chris", "McDonough"
"Robert T. McGibbon", "McGibbon, Robert T.", "McGibbon"
"Gordon McMillan", "McMillan, Gordon", "McMillan"
"Andrew McNamara", "McNamara, Andrew", "McNamara"
"Ezio Melotti", "Melotti, Ezio", "Melotti"
"Mark Mendoza", "Mendoza, Mark", "Mendoza"
"Markus Meskanen", "Meskanen, Markus", "Meskanen"
"Mike Meyer", "Meyer, Mike", "Meyer"
"Carl Meyer", "Meyer, Carl", "Meyer"
"Trent Mick", "Mick, Trent", "Mick"
"Mike G. Miller", "Miller, Mike G.", "Miller"
"Skip Montanaro", "Montanaro, Skip", "Montanaro"
"Peter Moody", "Moody, Peter", "Moody"
"Marina Moore", "Moore, Marina", "Moore"
"Paul Moore", "Moore, Paul", "Moore"
"R David Murray", "Murray, R David", "Murray"
"Charles-François Natali", "Natali, Charles-François", "Natali"
"Lysandros Nikolaou", "Nikolaou, Lysandros", "Nikolaou"
"Jesse Noller", "Noller, Jesse", "Noller"
"Ben North", "North, Ben", "North"
"Neal Norwitz", "Norwitz, Neal", "Norwitz"
"Dirkjan Ochtman", "Ochtman, Dirkjan", "Ochtman"
"Travis Oliphant", "Oliphant, Travis", "Oliphant"
"Jason Orendorff", "Orendorff, Jason", "Orendorff"
"Tomáš Orsava", "Orsava, Tomáš", "Orsava"
"Richard Oudkerk", "Oudkerk, Richard", "Oudkerk"
"Ronald Oussoren", "Oussoren, Ronald", "Oussoren"
"Julien Palard", "Palard, Julien", "Palard"
"Samuele Pedroni", "Pedroni, Samuele", "Pedroni"
"Berker Peksag", "Peksag, Berker", "Peksag"
"Michel Pelletier", "Pelletier, Michel", "Pelletier"
"Tim Peters", "Peters, Tim", "Peters"
"Benjamin Peterson", "Peterson, Benjamin", "Peterson"
"Jason Petrone", "Petrone, Jason", "Petrone"
"Antoine Pitrou", "Pitrou, Antoine", "Pitrou"
"Marcel Plch", "Plch, Marcel", "Plch"
"James Polley", "Polley, James", "Polley"
"Philippe PRADOS", "Prados, Philippe", "Prados"
"Elvis Pranskevichus", "Pranskevichus, Elvis", "Pranskevichus"
"Paul Prescod", "Prescod, Paul", "Prescod"
"(James) Eric Pruitt", "Pruitt, (James) Eric", "Pruitt"
"Lukas Puehringer", "Puehringer, Lukas", "Puehringer"
"Brian Quinlan", "Quinlan, Brian", "Quinlan"
"Terry Reedy", "Reedy, Terry", "Reedy"
"Lennart Regebro", "Regebro, Lennart", "Regebro"
"Sean Reifschneider", "Reifschneider, Sean", "Reifschneider"
"Christian R. Reis", "Reis, Christian R.", "Reis"
"Jonathan Riehl", "Riehl, Jonathan", "Riehl"
"Lisa Roach", "Roach, Lisa", "Roach"
"Andre Roberge", "Roberge, Andre", "Roberge"
"Armin Ronacher", "Ronacher, Armin", "Ronacher"
"Guido van Rossum", "van Rossum, Guido (GvR)", "GvR"
"Just van Rossum", "van Rossum, Just (JvR)", "JvR"
"Todd Rovito", "Rovito, Todd", "Rovito"
"Lie Ryan", "Ryan, Lie", "Ryan"
"Vinay Sajip", "Sajip, Vinay", "Sajip"
"Pablo Galindo Salgado", "Salgado, Pablo Galindo", "Salgado"
"Neil Schemenauer", "Schemenauer, Neil", "Schemenauer"
"Peter Schneider-Kamp", "Schneider-Kamp, Peter", "Schneider-Kamp"
"Ed Schofield", "Schofield, Ed", "Schofield"
"Yury Selivanov", "Selivanov, Yury", "Selivanov"
"Jiwon Seo", "Seo, Jiwon", "Seo"
"Mark Shannon", "Shannon, Mark", "Shannon"
"Cameron Simpson", "Simpson, Cameron", "Simpson"
"Greg Slodkowicz", "Slodkowicz, Greg", "Slodkowicz"
"Nathaniel J. Smith", "Smith, Nathaniel J.", "Smith"
"Gregory P. Smith", "Smith, Gregory P.", "Smith"
"Kevin D. Smith", "Smith, Kevin D.", "Smith"
"Ethan Smith", "Smith, Ethan", "Smith"
"Nathaniel Smith", "Smith, Nathaniel", "Smith"
"Eric V. Smith", "Smith, Eric V.", "Smith"
"Eric Snow", "Snow, Eric", "Snow"
"Calvin Spealman", "Spealman, Calvin", "Spealman"
"Kerrick Staley", "Staley, Kerrick", "Staley"
"Greg Stein", "Stein, Greg", "Stein"
"Victor Stinner", "Stinner, Victor", "Stinner"
"Serhiy Storchaka", "Storchaka, Serhiy", "Storchaka"
"Donald Stufft", "Stufft, Donald", "Stufft"
"Daniel Stutzbach", "Stutzbach, Daniel", "Stutzbach"
"Michael J. Sullivan", "Sullivan, Michael J.", "Sullivan"
"Roman Suzi", "Suzi, Roman", "Suzi"
"Dennis Sweeney", "Sweeney, Dennis", "Sweeney"
"Talin", "Talin", "Talin"
"Steven Taschuk", "Taschuk, Steven", "Taschuk"
"Batuhan Taskaya", "Taskaya, Batuhan", "Taskaya"
"Martin Teichmann", "Teichmann, Martin", "Teichmann"
"The Python core team and community", "The Python core team and community", "The Python core team and community"
"Geoffrey Thomas", "Thomas, Geoffrey", "Thomas"
"Oren Tirosh", "Tirosh, Oren", "Tirosh"
"Stephen J. Turnbull", "Turnbull, Stephen J.", "Turnbull"
"Daniel Urban", "Urban, Daniel", "Urban"
"Eric N. Vander Weele", "Vander Weele, Eric N.", "Vander Weele"
"Till Varoquaux", "Varoquaux, Till", "Varoquaux"
"Alexandre Vassalotti", "Vassalotti, Alexandre", "Vassalotti"
"Mike Verdone", "Verdone, Mike", "Verdone"
"Dino Viehland", "Viehland, Dino", "Viehland"
"Petr Viktorin", "Viktorin, Petr", "Viktorin"
"Zachary Ware", "Ware, Zachary", "Ware"
"Gregory R. Warnes", "Warnes, Gregory R.", "Warnes"
"Barry Warsaw", "Warsaw, Barry", "Warsaw"
"Terence Way", "Way, Terence", "Way"
"Cliff Wells", "Wells, Cliff", "Wells"
"Jervis Whitley", "Whitley, Jervis", "Whitley"
"Mark Williams", "Williams, Mark", "Williams"
"Carol Willing", "Willing, Carol", "Willing"
"Greg Wilson", "Wilson, Greg", "Wilson"
"Collin Winter", "Winter, Collin", "Winter"
"Thomas Wouters", "Wouters, Thomas", "Wouters"
"Masayuki Yamamoto", "Yamamoto, Masayuki", "Yamamoto"
"Jeffrey Yasskin", "Yasskin, Jeffrey", "Yasskin"
"Ka-Ping Yee", "Yee, Ka-Ping", "Yee"
"Moshe Zadka", "Zadka, Moshe", "Zadka"
"Koos Zevenhoven", "Zevenhoven, Koos", "Zevenhoven"
"Huaiyu Zhu", "Zhu, Huaiyu", "Zhu"
"Shannon Zhu", "Zhu, Shannon", "Zhu"
"Tarek Ziadé", "Ziadé, Tarek", "Ziadé"
Full Name, Surname First, Name Reference
Ernest W. Durbin III, "Durbin, Ernest W., III", Durbin
Inada Naoki, "Inada, Naoki", Inada
Guido van Rossum, "van Rossum, Guido (GvR)", GvR
Just van Rossum, "van Rossum, Just (JvR)", JvR
The Python core team and community, The Python core team and community, python-dev
P.J. Eby, "Eby, Phillip J.", Eby
Greg Ewing, "Ewing, Gregory", Ewing
Jim Jewett, "Jewett, Jim J.", Jewett
Nathaniel Smith, "Smith, Nathaniel J.", Smith
Martin v. Löwis, "von Löwis, Martin", von Löwis

86 changes: 81 additions & 5 deletions pep_extensions/pep_zero_generator/pep_0_parser.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
# -*- coding: utf-8 -*-
"""Code for handling object representation of a PEP."""
import re
import textwrap
Expand Down Expand Up @@ -50,16 +49,38 @@ class Author:
The author's email address.
"""

def __init__(self, author_and_email_tuple: Tuple[str, str], authors_lookup: dict):
def __init__(self, author_and_email_tuple: Tuple[str, str], authors_exceptions: dict):
"""Parse the name and email address of an author."""
self.first = self.last = ''

name, email = author_and_email_tuple
self.first_last: str = name.strip()
self.email: str = email.lower()

name_dict = authors_lookup[self.first_last]
name_dict = authors_exceptions.get(self.first_last)
if name_dict:
self.last_first = name_dict["Surname First"]
self.nick = self.last = name_dict["Name Reference"]
else:
self.set_name_parts()

def set_name_parts(self):
name_dict = self._parse_name(self.first_last)
suffix = name_dict.get("suffix")
if "name" in name_dict:
self.last_first = name_dict["name"]
self.nick = name_dict["name"]
else:
self.first = name_dict["forename"].rstrip()
self.last = name_dict["surname"]
if self.last[1] == ".":
# Add an escape to avoid docutils turning `v.` into `22.`.
self.last = "\\" + self.last
self.last_first = ", ".join([self.last, self.first])
self.nick = self.last

self.last_first: str = name_dict["Surname First"]
self.nick: str = name_dict["Name Reference"]
if suffix:
self.last_first += f", {suffix}"

def __hash__(self):
return hash(self.first_last)
Expand All @@ -82,6 +103,61 @@ def sort_by(self) -> str:
base = last.lower()
return unicodedata.normalize("NFKD", base)

@staticmethod
def _parse_name(full_name):
"""Decompose a full name into parts.

If a mononym (e.g, 'Aahz') then return the full name. If there are
suffixes in the name (e.g. ', Jr.' or 'III'), then find and extract
them. If there is a middle initial followed by a full stop, then
combine the following words into a surname (e.g. N. Vander Weele). If
there is a leading, lowercase portion to the last name (e.g. 'van' or
'von') then include it in the surname.

"""
possible_suffixes = ["Jr", "Jr.", "II", "III"]

suffix_partition = full_name.partition(",")
pre_suffix = suffix_partition[0].strip()
suffix = suffix_partition[2].strip()

name_parts = pre_suffix.split(" ")
num_parts = len(name_parts)
name = {"suffix": suffix}

if num_parts == 0:
raise ValueError("Name is empty!")
elif num_parts == 1:
name.update(name=name_parts[0])
elif num_parts == 2:
name.update(forename=name_parts[0], surname=name_parts[1])
elif num_parts > 2:
# handles III etc.
if name_parts[-1] in possible_suffixes:
new_suffix = " ".join([*name_parts[-1:], suffix]).strip()
name_parts.pop(-1)
name.update(suffix=new_suffix)

# handles von, van, v. etc.
if name_parts[-2].islower():
forename = " ".join(name_parts[:-2])
surname = " ".join(name_parts[-2:])
name.update(forename=forename, surname=surname)

# handles double surnames after a middle initial (e.g. N. Vander Weele)
elif any(s.endswith(".") for s in name_parts):
split_position = [i for i, x in enumerate(name_parts) if x.endswith(".")][-1] + 1
forename = " ".join(name_parts[:split_position])
surname = " ".join(name_parts[split_position:])
name.update(forename=forename, surname=surname)

else:
forename = " ".join(name_parts[:-1])
surname = " ".join(name_parts[-1:])
name.update(forename=forename, surname=surname)

return name


class PEP:
"""Representation of PEPs.
Expand Down
7 changes: 4 additions & 3 deletions pep_extensions/pep_zero_generator/pep_0_writer.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
import datetime
import unicodedata
from functools import partial
from itertools import groupby
from operator import attrgetter
from typing import List

Expand Down Expand Up @@ -172,9 +173,9 @@ def verify_email_addresses(peps):

@staticmethod
def sort_authors(authors_dict):
authors_list = list(authors_dict.keys())
authors_list.sort(key=attrgetter("sort_by"))
return authors_list
authors_list = sorted(authors_dict.keys(), key=attrgetter("sort_by"))
unique_authors = [next(a) for k, a in groupby(authors_list, key=attrgetter("last_first"))]
return unique_authors

@staticmethod
def normalized_last_first(name):
Expand Down
Loading
0