Olivier Mangin
f2125b4c19
Tags have to be printed in alphabetical order.
11 years ago
Olivier Mangin
0479636393
Fix issues with stdout and updates tests.
...
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.
11 years ago
Olivier Mangin
52813439dd
Removes useless beets_ui and FIX input issue between python 2 and 3.
11 years ago
Olivier Mangin
136b8f83dc
Fix fake_env, fix configparser issues, uniform 'open'.
...
- 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).
11 years ago
Olivier Mangin
4fd2e964b3
FIX bug in tag command (multiple line printed instead of one).
11 years ago
Olivier Mangin
89bf370902
Fails to add with existing citekey.
...
Also adds add usecase test and improves repository __contains__.
11 years ago
Olivier Mangin
39b2e4f912
Factorizes code for adding document.
...
- 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).
11 years ago
Olivier Mangin
506bb24e50
Many cleanup in unicode encoding.
...
Originally intended to fix a bug in edit openning fils with non-ascii
characters.
Now all data is assumed to be manipulated as unicode. Therefore all
values returned by functions from content are unicode. There are a few
exception in order to download non-unicode data without failing to
decode. These exception are marked by the 'byte_' prefix.
The io package is used instead of builtin open for all file
transactions.
The fake_env test helper has to be modified (hacked, to be honnest) since
fake_filesystem does not offer a mock of io.
This is still WIP. Two issues still have to be solved:
- first there is an UnicodeWarning raised by bibparser,
- also config is still directly using builtin open.
11 years ago
Fabien Benureau
84fd5d7649
fix #17
11 years ago
Olivier Mangin
c45b64506a
Merge branch 'develop' into feat/python3
11 years ago
Fabien Benureau
071730a49b
fix #5 and achieve method parity between databroker and datacache
11 years ago
Olivier Mangin
8136e0906e
Fix use of range as list.
11 years ago
Olivier Mangin
bf2cce1c13
Only use print_function.
11 years ago
Olivier Mangin
ed16f0bb5b
Fix undefined variable and remove 'added' time (set by repo.push_paper).
11 years ago
Olivier Mangin
7713e5d80e
Fix encoding of keywords.
...
Also introduces ustr instead of unicode for python2 and str for python3.
11 years ago
Olivier Mangin
9b6f6db297
Fixes editor formatting.
11 years ago
Olivier Mangin
91b3fc75bb
Several bug fixes.
...
- edit command fails correctly on unknown citekey,
- init command and filebroker use content module to check paths,
- fix wrong docfile in testrepo,
- list command does not fail on None added date (unknown add dates are
older than everything else). Also adds relevant test.
11 years ago
Olivier Mangin
ac1562f4ea
Fix open_cmd and misleading example from testrepo.
...
Open command was not using system_path to ensure user expansion.
Testrepo was using pubsdir:// instead of docsdir://. Although not
directly used in test this was misleading and incoherent.
Also fixes missing system_path in filebroker.
11 years ago
Olivier Mangin
b71b602a50
FIX bug in color when color not activated.
...
_nodye does not support being called with arg instead of kwarg.
Also improves pretty print and adds related tests.
11 years ago
Olivier Mangin
ad29b27412
FIX bugs witth added time.
...
Actually implement set of added time in repository.
Changes storage of added time (now as datetime.datetime).
11 years ago
Olivier Mangin
d2ba13700f
Better handling of path (also fixes bugs).
...
Paths should be normalized through content.system_path before any actual
operation on files. This is in particular taken care of in content
functions check_file, check_dir, write_file, and read_file.
11 years ago
Fabien Benureau
f2de611106
fixed last regression test
11 years ago
Olivier Mangin
07cb6f696c
Adds back edit command.
...
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.
11 years ago
Olivier Mangin
c9e4f9788c
Moves removing of 'id' to endecoder where it belongs.
11 years ago
Olivier Mangin
e4a25abcfb
FIXES test_repo.
...
Removes 'id' entry from bibdata.
Fixes bug introduced in repo.
11 years ago
Olivier Mangin
93c7fb2f27
Moves TestFakeFs helper to fake_env module.
11 years ago
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.
11 years ago
Fabien Benureau
4ce261d636
more tests on tags
11 years ago
Fabien Benureau
dfd16c029d
first working paper test + bugfix
11 years ago
Fabien Benureau
9243859294
updated test_usecase + fixed bug in import_cmd
11 years ago
Fabien Benureau
810525b4d0
fixed test_config
11 years ago
Fabien Benureau
23cf48661b
added bibstruct text, cleaned fixtures and test_paper
11 years ago
Fabien Benureau
0b1a351485
bibstruct tests + bug fixes
11 years ago
Fabien Benureau
8d91545472
papers renamed 'pubs'
11 years ago
Fabien Benureau
1ad64d7859
notes cmd
11 years ago
Fabien Benureau
10fd0f86d6
only one usecase failing
11 years ago
Fabien Benureau
e0dab17dcd
added troublesome bibfile
11 years ago
Fabien Benureau
8c54b19207
updated import and added rename command
11 years ago
Fabien Benureau
76a6d092dd
fixed bug in datacache + added corresponding tests
11 years ago
Fabien Benureau
a774a1604e
databroker, datacache class + tests
11 years ago
Fabien Benureau
15857b5ecc
docbroker class + tests + more filebroker test
11 years ago
Fabien Benureau
c1bf80fe68
filebroker class + tests
11 years ago
Fabien Benureau
c4701953de
fake_env module for fake fs, fake input
11 years ago
Fabien Benureau
856cfa2a4f
moved test string fixtures to str_fixtures.py
11 years ago
Fabien Benureau
e26c606163
endecoder implementation
11 years ago
Olivier Mangin
e72f8fa7f2
Improves query handling for list command.
...
- Cleans code.
- Clever mode for case by default (case sensitive only if capitals in
query).
- Adds basic tests.
- Conjunction of blocks.
- Options to override smart case.
11 years ago
Olivier Mangin
08811b842f
Adds citekey argument to selectively import entries.
...
Also removes unused fatal argument from many_from_path and moves
printing of warning to the command.
12 years ago
Jonathan Grizou
62bdf7dfad
Changed event system to allow more advance listener.
...
See associated test for example.
12 years ago
jgrizou
0801b3882d
Merge branch 'develop' into plug/texnote
12 years ago
jgrizou
9cc893d8a7
Added AddEvent
12 years ago
jgrizou
7b555abf92
Change repo and removed the update function and the rename function. Now only the save_paper function must be used
12 years ago
Olivier Mangin
d5247a6618
Refactors usecase.
...
Integrate helpers into TestCase sub-classes to make use of setUp
mechanism.
12 years ago
Fabien Benureau
ab52785667
update test in test_usecases
12 years ago
Fabien Benureau
9c47951532
don't remove files at end of test.sh
12 years ago
Fabien Benureau
145710b928
test for every command except websearch and update
12 years ago
Fabien Benureau
6c9d4a3a41
lot more test in test_usecase : every command used
12 years ago
Fabien Benureau
04fcb42338
tests can be run from root dir
12 years ago
Fabien Benureau
3b7900a3a4
added tests/tmpdir* to gitignore
12 years ago
Fabien Benureau
cc3928ef4b
fake editor_input
12 years ago
Fabien Benureau
e0fd19f9d8
first input test working
12 years ago
Fabien Benureau
3dde852bdd
execute_cmd input ready
12 years ago
Fabien Benureau
62a4527a37
method to set FakeInput package-wide
12 years ago
Fabien Benureau
d109d93341
added FakeInput class to usecase tests
12 years ago
Fabien Benureau
1be61baf21
added testenv import to test current code
12 years ago
Fabien Benureau
dc73c987c8
update command for config v2 to v3
12 years ago
Fabien Benureau
3c0f575b92
backtracked on changes. repo is passing all tests
12 years ago
Fabien Benureau
164816a910
updated tests
12 years ago
Fabien Benureau
c7a8ada751
enabled load keyword in repo __init__
12 years ago
Fabien Benureau
7b66a4697d
all repo test pass. doc are temporarily disabled.
12 years ago
Fabien Benureau
904ae07bc5
more test_repo tests are passing
12 years ago
Fabien Benureau
ac4b682307
added doc_dir and keywords init to config
12 years ago
Fabien Benureau
a354e79523
first test of new repo passing
12 years ago
Fabien Benureau
320a488667
added get operator to config
12 years ago
Fabien Benureau
45da61f4d2
added config support for multiple sections
12 years ago
Fabien Benureau
f934e8c2ec
more tests for config, slightly changed implementation and interface.
12 years ago
Fabien Benureau
e92c418d80
new, simplified, easier to use config implementation
...
tests are provided, but the rest of the code has not be updated yet.
12 years ago
Fabien Benureau
500667baae
more usecase test, hack-fixed plugins.
12 years ago
Fabien Benureau
76e162be02
added test bibfiles for usecases
12 years ago
Fabien Benureau
ddfc129b64
redirect and check stdout in usecases
12 years ago
Fabien Benureau
cb94166aef
test.sh into virtual usecase
12 years ago
Fabien Benureau
293fc2393f
automatic copy of content into fake fs
12 years ago
Fabien Benureau
46e6630e7a
corrected test name
12 years ago
Fabien Benureau
b4504278f2
more robust fake_fs testing; added papers add test
12 years ago
Fabien Benureau
13bd18cda9
working fs replacement enabling use case testing.
...
papers content was mostly moved to papers_cmd.py
You can now use papers_cmd.execute('papers tag Page99'.split()) from the code
12 years ago
Fabien Benureau
585e09e498
tags set are algebrical: math+romance-war
12 years ago
Fabien Benureau
919c7c1c5a
method parse for algebric tags
12 years ago
Fabien Benureau
69f1fad7e9
Merge branch 'develop' into texnote
12 years ago
Fabien Benureau
cd0ddfd264
removed useless backup file
12 years ago
Fabien Benureau
7c80257e7e
updated test.sh script
12 years ago
Olivier Mangin
05ab7ec32a
Cleanup events.
...
- moves tests to separate test_events file
- cleanup base Event class
12 years ago
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
12 years ago
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']
12 years ago
Olivier Mangin
18ed2a7629
Simplifies paper retrieval from repo.
...
- Removes old paper_from_ref from repo.
- Changes papers_from_citekey to get_paper.
- Switches texnote plugin to new ref argument helpers.
12 years ago
Fabien Benureau
840deaccc1
test to measure color performance
12 years ago
Olivier Mangin
7c3ce78f70
Basic tag handling.
12 years ago
Olivier Mangin
3e6a1403b9
Adds basic export capabilities.
12 years ago
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.
12 years ago
Olivier Mangin
5bfe827b7e
Fixes test.sh.
12 years ago
Olivier Mangin
b46f8c543d
Improves repo dir specification to avoid issues.
12 years ago
Olivier Mangin
dbb73d6f8e
Fixes wrong test.
12 years ago
Olivier Mangin
0d53619e1f
Updates commands. Many bug fix.
12 years ago
Olivier Mangin
1fad286517
Improves repo.py, adds tests. Still things to clean and decide...
12 years ago
Olivier Mangin
b08133bd1d
Improves citekey suffix generation.
12 years ago
Olivier Mangin
2d758ea16e
Cleanup Paper class and adds test.
12 years ago
Fabien Benureau
15782375a5
citekey generation and support
13 years ago
Fabien Benureau
3c11994b6f
added test. fixed few syntaxic bugs.
13 years ago