-
Notifications
You must be signed in to change notification settings - Fork 155
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[WIP] Process bibtex #32
base: process_reference
Are you sure you want to change the base?
[WIP] Process bibtex #32
Conversation
You can't use `[]` as a default argument because then all instances end up with a reference to a single list, causing weird and unexpected bugs.
TODO: make subclass of ProcessorBase
…n/doi [WIP] Use DOI in decorator
Thinking about this a bit more... I think @dalonsoa's DOI processing thoughts and my bibtex processing thoughts might both need rethinking to be compatible. Here are my understandings of the competing limitations:
Possible solution: instead of using lru_cache, we store each DOI endpoint in a self.cache dictionary within the processor object (check there first, call crossref if not there); then, for the bib case we just store the parsed bibtex in self.cache instead? |
Then, thinking about the big picture - one would just call |
Of course, the other way to solve this is not to use a ProcessorBase at all but rather to mirror what has been done in |
Also, I realise I have currently set-up the args in |
Merge pull request ImperialCollegeLondon#28 from ImperialCollegeLondon/doi
…ove-test-coverage Improve test coverage
…n/all-contributors/add-jezcope docs: add jezcope as a contributor
… into ImperialCollegeLondon-develop
…n/all-contributors/add-ChasNelson1990 docs: add ChasNelson1990 as a contributor
Codecov Report
@@ Coverage Diff @@
## process_reference #32 +/- ##
======================================================
+ Coverage 29.26% 50.00% +20.73%
======================================================
Files 6 6
Lines 164 224 +60
======================================================
+ Hits 48 112 +64
+ Misses 116 112 -4
Continue to review full report at Codecov.
|
I've started to add the ability to use bibtex_keys and process them as part of @dalonsoa's doi & process_reference changes.
Currently this is not fully merged with @dalonsoa's ideas - I'm still trying to understand the best way to do this in my brain because his approach would, I think, mean that I had to parse my .bib file on each call of the processor classes (because the class is being reinitialised inside
process_reference()
) which I want to avoid.Any suggestions/comments/commits welcome.