perrette / papers

Command-line tool to manage bibliography (pdfs + bibtex)
MIT License
142 stars 22 forks source link

two comments, no functional changes #55

Closed boyanpenkov closed 2 weeks ago

boyanpenkov commented 1 year ago

Make two comments for functions on Biblio and extract, which are for my own understanding. But should be checked for correctness.

boyanpenkov commented 2 months ago

@perrette -- I think this is set, and has no functional changes.

boyanpenkov commented 1 month ago

Both test failures above are:

  tests/test_add.py:35: in _checkbib
      self.assertEqual([f(e) for e in db1.entries], [f(e) for e in db2.entries]) # entry is as expected
  E   AssertionError: Lists differ: [{'ye[35 chars]'http://dx.doi.org/10.5194/bg-8-515-2011', 'ti[323 chars]le'}] != [{'ye[35 chars]'https://doi.org/10.5194%2Fbg-8-515-2011', 'ti[292 chars]le'}]
  E   
  E   First differing element 0:
  E   {'yea[34 chars]'http://dx.doi.org/10.5194/bg-8-515-2011', 'ti[322 chars]cle'}
  E   {'yea[34 chars]'https://doi.org/10.5194%2Fbg-8-515-2011', 'ti[291 chars]cle'}
  E   
  E   Diff is 804 characters long. Set self.maxDiff to None to see it.

which is strange, since this PR only changes comments....

I can't reproduce this on my machine with the install in place; please let me know... I can try to uninstall and re-install and see what's up.

boyanpenkov commented 1 month ago

@perrette I played with this a little more this , and on your head https://github.com/perrette/papers/tree/pr-perfect-undo the checks pass OK.

Depending on where you are in your workflow, merging https://github.com/perrette/papers/tree/pr-perfect-undo and working off that might be best. The changes I have here are fundamentally trivial, and we can drop them or I can re-do them.

Do let me know... :)

perrette commented 1 month ago

I can do that. This is a bit of an ambitious branch in terms of how the undo is handled (it sets up a git repository in a central location under HOME, under which each instance of papers bibtex is tracked, so as to create absolute undo possibilities). It works, but I am still unsure whether this is a good idea or not. However it has been so long I started this feature branch that it has become my default working branch and I have made bugfixes in it. I guess at this point it can just be merged, and the way undo / redo is handled, and how local/global installs is handled, can be dealt with in the future.

boyanpenkov commented 1 month ago

Your call, certainly; also, if you want more eyes on that feature, I'd be glad to look, as I'm still "understanding how things work" here...

boyanpenkov commented 2 weeks ago

Closed -- I added these non-functional changes to https://github.com/perrette/papers/pull/65