Skip to content

enable "extract --recursive"#92

Open
boyanpenkov wants to merge 5 commits intoperrette:masterfrom
boyanpenkov:recursive_extract
Open

enable "extract --recursive"#92
boyanpenkov wants to merge 5 commits intoperrette:masterfrom
boyanpenkov:recursive_extract

Conversation

@boyanpenkov
Copy link
Contributor

papers extract thing.pdf is wonderful for checking that the DOI/crossref call on a single PDF is going to make sense.

This PR enables the same behavior on a whole directory recursively, much like papers add --recursive.

@perrette I need a pointer on how to write good tests for this one -- I was playing with test/test_extract.py but can't figure out how to capture printed output to compare to the database of the two test files you have -- much like in tests/test_add.py

@boyanpenkov
Copy link
Contributor Author

aca948e the last one here is a pointer to how I think this should go, but I wanted to see about the print capture....

@boyanpenkov
Copy link
Contributor Author

Note that the race condition here is visible also if you run multiple concurrent copies of papers under separate interpreters.

@boyanpenkov
Copy link
Contributor Author

OK, this does have a test that does work on the existing test files and is the bare minimum of quality control, but I'd be glad for a pointer to a better way of doing that print capture.

Ready for review.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant