Repository navigation
Issue #784 -- Dynamic author list - #787
Merged
richardjgowers merged 7 commits intoMar 20, 2016
Merged
Conversation
A list of authors usable from python is generated from the AUTHORS file by 'package/setup.py'. That list allows to maintain a single list of authors instead of one list in AUTHORS and one list in the sphinx documentation. MDAnalysis.__init__ imports authors.py to give access to MDAnalysis.__authors__.
The list of authors used by sphinx is the one in authors.py.
| import warnings | ||
|
|
||
| from .version import __version__ | ||
| from .authors import __authors__ |
Member
There was a problem hiding this comment.
So if setup is ran from a location where you don't have write permission (is this possible?), this file won't be generated. So would it be safer to wrap this in a try/except block just so this never stops the entire module working one day?
MDAnalysis should not fail if authors.py cannot be generated and therefore imported. If authors.py is not present, then __authors__ is an empty list.
richardjgowers
added a commit
that referenced
this pull request
Mar 20, 2016
Issue #784 -- Dynamic author list
jbarnoud
added a commit
to jbarnoud/mdanalysis
that referenced
this pull request
Mar 20, 2016
We prohibit relative imports in the tests (see MDAnalysis#189). When adding tests for the dynamic author list (MDAnalysis#787), I introduced some such relative imports.
richardjgowers
added a commit
that referenced
this pull request
Mar 20, 2016
Remove relative imports introduced in #787
Member
|
@jbarnoud , this commit seems to badly break the 3.3 tests right at the beginning, see e.g. https://travis-ci.org/MDAnalysis/mdanalysis/jobs/117197996 |
Contributor
Author
|
Ghraaa! I omitted to run the tests on python 3. I'll work on this. If anybody has an idea why Travis crashes on the python 3 builds, it would be nice to fix. I had a look but I do not know what happens. |
jbarnoud
added a commit
to jbarnoud/mdanalysis
that referenced
this pull request
Mar 21, 2016
The dynamic author list introduced in MDAnalysis#787 did not work on python 3 because of the way encoding was handled. This commit fixes the handling of file encodings by using the codecs library.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #784
Changes made in this Pull Request:
setup.pyreads AUTHORS and writeauthors.pythat get imported by__init__.pyto expose__authors__.__authors__for its author list.The order of the authors is not perfect. Except for the two first authors and the last author, the authors are sorted alphabetically by their last name. Yet, last names are difficult to define; the last word of the name is used as last name. It causes an issue with "Christian Beckstein (logo)" because of the "(logo)", also "Manel Nuno Melo" was sorted at "Nuno" and is now sorted as "Melo".
The code is repeated between
package/setup.pyandtestsuite/setup.py. I do not like it much but I do not see how to avoid that easily.PR Checklist
Docs?