14 Commits

Author SHA1 Message Date
Olivier Mangin
de2a50eeb2 Fix tests and terminology.
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.
2015-05-07 13:17:44 +02:00
Fabien Benureau
d3736e257b moving from pybtex to bibtextparser, fixed major regressions.
* 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.
2014-04-13 15:10:40 +02:00
Fabien Benureau
4ce261d636 more tests on tags 2013-11-18 15:04:34 +01:00
Fabien Benureau
dfd16c029d first working paper test + bugfix 2013-11-18 14:53:43 +01:00
Fabien Benureau
23cf48661b added bibstruct text, cleaned fixtures and test_paper 2013-11-17 19:19:31 +01:00
Fabien Benureau
1be61baf21 added testenv import to test current code 2013-07-02 17:21:59 +01:00
Fabien Benureau
164816a910 updated tests 2013-07-02 14:03:32 +01:00
Olivier Mangin
e017ffef20 Fix bugs with saving tags in yaml.
- now saves tag set as list (maybe the save_meta function should be
  moved to paper.py)
- updates test to actually test storing of metadata
2013-06-27 19:21:28 +02:00
Fabien Benureau
d30d5f32c4 "label" renamed as "tag" in the metadata file (and everywhere else).
Use the update command to update your metadata files.
Tags is now a property of the Paper class, so one can use :
print(p.tags)
p.tags = ['math', 'romance']
2013-06-25 23:42:06 +02:00
Olivier Mangin
7c3ce78f70 Basic tag handling. 2013-06-05 14:52:50 +02:00
Olivier Mangin
83845d2360 Adds update funciton for paper and required API and test updates.
- Adds update function that handle changes in citekey.
- Adds copy functions to paper classes.
- Adds tests.
- FIX a few bugs.
2013-03-01 16:33:56 +01:00
Olivier Mangin
0d53619e1f Updates commands. Many bug fix. 2012-12-18 16:48:40 +01:00
Olivier Mangin
1fad286517 Improves repo.py, adds tests. Still things to clean and decide... 2012-12-17 16:56:32 +01:00
Olivier Mangin
2d758ea16e Cleanup Paper class and adds test. 2012-12-17 09:14:35 +01:00