The implementation is designed to be robust to filesystems having integers
or nanosecond stat time.
Added a requirements.txt file for the tests:
`pip install -r tests/requirements.txt` to install the necessary packages
to run the tests.
Fix#13, Fix#14
The default behavior for commands is now to only catch exceptions that
must be handled specifically. This includes outputting a context
dependant message, cleaning up, etc. All other exceptions will be
handled by the ui.
It depends on configobj, is cleaner and simpler than the previous implementation.
It adds comments in the config file, and type verification.
Related: #18
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.
- 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).
The Repository rename_paper method has been updated. The citekey update
and syncronization with citekey in the bibdata should be handled in a
sane manner inside the Paper class.
The error raised by Repository.push_paper was different depending on
whether the existence of the paper in the repository was tested directly
through the filebroker (quicker when list of citekeys in not loaded) or
through the regular __contains__ method.
* only bibtex format is supported
* all tests except test_repo.py and edit test pass
* edit and update commands were not updated
* removed --format argument from export, only bibtex is supported.