713 Commits

Author SHA1 Message Date
Olivier Mangin
03900c324a
Adds changelog entry. 2018-08-01 15:12:48 +02:00
Olivier Mangin
ea2bc7f732
Merge branch 'master' into fix87 2018-08-01 15:02:01 +02:00
Olivier Mangin
fe2e31e2d0
Merge pull request #151 from pubs/fix/pyfakefs37
Fix compatibility with latest Pyfakefs.
2018-08-01 15:01:39 +02:00
Olivier Mangin
13f21a3d28
Minor grammar in warning. 2018-08-01 14:43:32 +02:00
Olivier Mangin
9093cbfbed
Add changelog entry for #151. 2018-08-01 14:42:15 +02:00
Olivier Mangin
3d76501a5c
Merge branch 'master' into fix/pyfakefs37 2018-08-01 14:36:24 +02:00
Fabien C. Y. Benureau
cf97f681ef
cleanup commented code, better reset_fs() 2018-08-01 14:37:23 +09:00
Fabien C. Y. Benureau
c76c7607f9
Upgrade pyfakefs to current version
Fix #148. Also did some cleanup on the tests.
2018-08-01 14:22:18 +09:00
Olivier Mangin
95d314a2aa
Merge pull request #150 from pubs/changelog
[Fix #85] Adds changelog file.
2018-07-31 11:09:50 +02:00
Olivier Mangin
bc239aba69
Removes italic on one contributor. 2018-07-31 11:08:05 +02:00
Olivier Mangin
5a47150aad
Adds option to ignore malformed bibtex files or entry during import. 2018-07-30 18:24:56 +02:00
Olivier Mangin
60650b874a
Addresses minor comments (error message and better test). 2018-07-30 17:46:04 +02:00
Olivier Mangin
754e926893
Adds authors of PRs to changelog and missing ksunden to readme. 2018-07-30 17:27:12 +02:00
J. Antognini
ccdbe72eb7 Address omangin's code review.
* This fixes the logic in the `pubs add` command so that an arxiv ID doesn't
  overwrite a DOI.  This also changes the logic so that if an invalid DOI, ISBN,
  or arXiv ID is provided the program will raise an error.

* The code now uses the bibtexparser package to generate the bibtex file for
  arxiv papers.

* A dedicated exception is added for references that can't be found.
2018-07-28 22:37:14 -07:00
Olivier Mangin
7518dfd56a
[Fix #85] Adds changelog file. 2018-07-26 16:34:02 +02:00
Olivier Mangin
ea711b6b42
[Fix #87] Include citekey in message on bibtex decoding error from repository.
Catches decoding error at databroker level to include citekey in message.
Could be improved by a better exception class for BibDecodingError.
2018-07-25 22:52:27 +02:00
Olivier Mangin
8a7d143261
Improves behaviors related to bibtex decoding error.
- from editor input in add and edit commands,
- from files in import command.
2018-07-25 22:20:14 +02:00
Olivier Mangin
d8dc386a18
Fix fake input behavior in tests on unexpected input.
Because of the mechanism for catching exceptions in pubs, the
UnexpectedInput exception raised by FakeInput never reached the catch
statement in the CommandTestCase and raised a FakeSystemExit instead.

This commit monkey-patches the exception handler in the ui at the same
time as the patching of the input functions to ignore UnexptectedInput
at the ui level.
2018-07-25 19:59:23 +02:00
Olivier Mangin
2f48f37199
Fixes duplicated test names in same TestCase (1st was not run). 2018-07-25 18:30:26 +02:00
Olivier Mangin
99dfcd1691
Merge pull request #142 from pubs/feat/dialogedit
Dialog after editing paper
2018-07-25 17:36:28 +02:00
Olivier Mangin
6957ae3cbb
Merge branch 'master' into feat/dialogedit 2018-07-25 17:24:06 +02:00
Olivier Mangin
fbd29d27a4
Merge pull request #141 from pubs/feat/editor_missing
error message when editor is missing
2018-07-25 17:23:06 +02:00
Olivier Mangin
8fe650c040
Use join for joining paths. 2018-07-25 12:44:15 +02:00
Olivier Mangin
4dc69bcfc2
Use vi as a (saner) default. Fixes #140. 2018-07-24 11:01:06 +02:00
Joe Antognini
30f5f86c9d Don't immediately exit on malformed arxiv id.
To be consistent with errors in other uses of `pubs add`, we only exit when the returned bibentry is
None.
2018-07-23 23:37:12 -07:00
Joe Antognini
35f209a98a Remove unnecessary function from earlier commit. 2018-07-23 23:33:05 -07:00
Joe Antognini
f3c83668f9 Allow bibtex to be added from arxiv id.
This allows the user to add a reference via an arXiv ID similarly to how a reference can be added
from a DOI or ISBN.  If the arXiv ID has a DOI associated with it (according to the arXiv server),
the DOI will be used.  If it does not (perhaps the paper is unpublished), then a bibtex entry will
automatically be generated from the reference's metadata.

Note that a potential issue with this addition is that if a paper is added before it is published
(i.e., there is no DOI associated with it), and the paper is later published, the updated
information will have to be manually added.
2018-07-23 18:23:36 -06:00
Fabien C. Y. Benureau
c513870132
add requirements.txt file, mock. 2018-06-10 19:20:57 +09:00
Fabien C. Y. Benureau
4b1717b7fd
dialog after editing paper 2018-06-10 19:09:49 +09:00
Fabien C. Y. Benureau
1b59aefc08
Merge pull request #139 from ksunden/url
Add a command to open urls
2018-06-05 12:47:08 +09:00
ksunden
a0525b5147 Remove unused /dev/null 2018-05-22 20:56:34 -05:00
ksunden
2f59b4f2ce Clean up tests 2018-05-22 20:16:50 -05:00
ksunden
aaf2ed52c1 Use mock to test url command 2018-05-22 10:32:43 -05:00
ksunden
e177b43d14 Remove unused imports, update strings 2018-05-20 20:17:45 -05:00
Fabien C. Y. Benureau
6cd74a9966
error message when editor is missing
simplified a bit the ui code, to remove unecessary out-of-class functions
(needed anyway because of ui.error calls).
2018-05-17 09:22:31 +09:00
ksunden
54a056c277 Change error to warning 2018-05-14 18:38:43 -05:00
Kyle Sunden
7c82a8518b
remove extraneous print 2018-05-14 18:03:39 -05:00
ksunden
247554c248 Fix error handling 2018-05-08 23:20:32 -05:00
ksunden
bff1f5763d Add a command to open urls 2018-05-08 22:32:12 -05:00
Olivier Mangin
29aed39bf8
Merge pull request #133 from benureau/fix/utf8citekeys
Fix/utf8citekeys
2018-04-12 13:50:35 -04:00
Fabien C. Y. Benureau
913a5d77b5 unicode citekey in python2; removes 2018-04-10 14:55:55 +09:00
Fabien C. Y. Benureau
c7e9470300 implement requested changes for #133 2018-04-10 14:46:27 +09:00
Fabien C. Y. Benureau
dc4e118c3c make utf8 citekeys possible in python 2.7. closes #28
This involved many changes, some side effects of the change include:
- remove of all `u"abc"` forms, in favor of
  `from __future__ import unicode_literals`. Their usage was
  inconsistent anyway, leading to problems when mixing with
  unicode content.
- improve the tests, to allow printing for usecase even when
  crashing. Should make future test easier. This is done with a
  rather hacky `StdIO` class in `p3`, but it works.
- for some reason, the skipped test for Python 2 seems to work
  now. While the previous point might seem related, it is not clear
  that this is actually the case.
2018-04-10 14:45:54 +09:00
Fabien C. Y. Benureau
38133fc053 fix for utf8 citekeys 2018-04-10 14:44:01 +09:00
Fabien C. Y. Benureau
9a6db894d8 fix fakeenv creation when used from a non-primary volume 2018-04-10 14:44:01 +09:00
Olivier Mangin
47b69820b8
Merge #138: Rebuilds cache on version change and de-duplicate version definition.
See #86 and #129.

The version number is now only stored in pubs/version.py. setup.py loads the version from the file as well as does pubs/__init__.py.

The cache structure changes to now include the version of the code which wrote the cache, which enables rebuilding the cache on version change. Loading an old cache (i.e. without the version) fails and triggers a rebuild (so does loading the new cache from the old code) so moving across this change is transparent here.

The code also switches to version 0.8.dev1 to trigger a cache rebuild (and also because the milestone is almost there). In general we will need to bump the version number to a development one each time a change makes loading old cache incompatible. There is no test for that at the moment so this means testing new code on a local bibliography repository before pushing to master.

#129 discussed using git versions, which is not so easy to integrate nicely with setuptools. This is why I chose to stick with manually changing version numbers when necessary (which should not be so often).
2018-04-03 13:04:55 -04:00
Olivier Mangin
50a44d964c
Merge branch 'master' into version 2018-04-03 12:36:52 -04:00
Olivier Mangin
857ebdef00
Merge pull request #137 from pubs/fix/135
Fixes tests for printing help on `--help` and without argument.
2018-04-03 12:35:45 -04:00
Olivier Mangin
801e0c035f
Adds code version to cache. (Fixes #129)
Current code version is added to the cache on writting. If the cache
version does not match the code version on read, the cache is ignored
which means it resets.
2018-03-30 19:16:23 -04:00
Olivier Mangin
0d7b44a3f5
Have version defined in only one place (fixes #86). 2018-03-30 18:47:21 -04:00