First this brings a change to the paper API: the terminology of bibdata
and bibentry is clarified: now bibentry is a dictionary of the form
{citekey: bibdata} where bibdata corresponds to the actual dictionary of
bibliographic fields and values {author: ..., year: ...}.
Now bibentry is an attribute of the paper object that is generated from
citekey and bibdata.
This commit fixes all tests in particular an issue with citekey in
bibentry not updated.
Also removes prints in tests and deprecated assertEquals.
Usecase tests now fail if the command ask for unexpected inputs.
Removes queries for user input in attach and add commands (for deletion
of a copied document file). The input was not coherent with tests and is
annoying.
0b64bf0 introduced a hack (http://git.io/1ZbMkg) related to an issue
in bibtexparser : sciunto/python-bibtexparser/issues/17.
This has been fixed by sciunto/python-bibtexparser@6beb646 and the hack
can be safely removed.
Pubs should be updated accordingly as soon as the bibtexparser FIX gets to a released version.
Not so clean since trying to change stdout encoding requires accessing
sys.stdout.buffer, so fake_env has to mock this layer also. The basic
differences between p2 and p3 are handled in p3.py.
- Update fake_env for compatibility with io.
- Uniform open (through _my_open in content).
- Fix read issue for config (although still using SafeConfigParser that
is deprecated in py3).
- Document are added through repository method.
- Correct handling of the copy option.
- Does not check if document exists yet.
- Does not bypass copy=False if an url is given. Should it?
- Currently the document is actually pushed twice (not optimal).
Note: in current state the non-copy addition of document is not
implemented. This commit also adds the raise of a NotImplementedError if
the behavior is requested.