Closed ShweataNHegde closed 3 years ago
I think we need to outline what we want these functions to do. And what information the CProject holds. It should maintain state as much as possible e.g.
pygetpapers -o ebola -q ebola -k 1000 -x should remember:
I can think of:
restart after a crash or deliberate break (this is what I assume 'restart" means). The value of this is that in a long download on a slow line you might want to break the download and pick up from where you left off
pygetpapers -o foo -q pandemic -k 1000 -x
<break after 300>
pygetpapers -o foo --restart
("foo/eupmc_results.json" should contain the cursor??
expand additional information by types, e.g. add -p to a completed xml download
pygetpapers -o foo -q pandemic -k 100 -x
<terminates OK>
pygetpapers -o foo --expand -p
(where expand is the required new command - I don't think "update" is right. And do we even need it?)
update in case the repo has more data
pygetpapers -o ebola -q ebola -k 1000 -x --start-date 2021-01-01
<wait a few months>
pygetpapers -o ebola --update
(not even sure we need update).
pygetpapers -o ebola
should be able to work out what it can do, and what it needs to do.
I think we need a Wikipage about this.
On Fri, Aug 6, 2021 at 6:01 PM ShweataNHegde @.***> wrote:
Describe the bug From what I understand, --restart works just like how --update now works. We would have to specify the output directory (already existing Cproject) and give it --restart. But the error says that --restart` flag requires an argument.
To Reproduce INPUT:
C:\Users\shweata>pygetpapers -q "invasive plant species" -o lantana_test_5 --restart -c
OUTPUT:
usage: pygetpapers [-h] [--config CONFIG] [-v] [-q QUERY] [-o OUTPUT] [--save_query] [-x] [-p] [-s] [-z] [--references REFERENCES] [-n] [--citations CITATIONS] [-l LOGLEVEL] [-f LOGFILE] [-k LIMIT] [-r RESTART] [-u] [--onlyquery] [-c] [--makehtml] [--synonym] [--startdate STARTDATE] [--enddate ENDDATE] [--terms TERMS] [--api API] [--filter FILTER] pygetpapers: error: argument -r/--restart: expected one argument
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/petermr/pygetpapers/issues/27, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAFTCS4NJXP6PLGW7ZKAWGLT3QIONANCNFSM5BWIRIUA . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&utm_campaign=notification-email .
-- Peter Murray-Rust Founder ContentMine.org and Reader Emeritus in Molecular Informatics Dept. Of Chemistry, University of Cambridge, CB2 1EW, UK
@ayush4921,
I'm now running on version:
C:\Users\shweata>pygetpapers -v
INFO: You are running pygetpapers version 0.0.8.7
I tried reproducing the same query as earlier, here's the error I get:
C:\Users\shweata>pygetpapers -q "invasive plant species" -o lantana_test_5 --restart -c
Traceback (most recent call last):
File "c:\users\shweata\appdata\local\programs\python\python38\lib\runpy.py", line 194, in _run_module_as_main
return _run_code(code, main_globals, None,
File "c:\users\shweata\appdata\local\programs\python\python38\lib\runpy.py", line 87, in _run_code
exec(code, run_globals)
File "C:\Users\shweata\AppData\Local\Programs\Python\Python38\Scripts\pygetpapers.exe\__main__.py", line 7, in <module>
File "c:\users\shweata\appdata\local\programs\python\python38\lib\site-packages\pygetpapers\pygetpapers.py", line 604, in main
callpygetpapers.handlecli()
File "c:\users\shweata\appdata\local\programs\python\python38\lib\site-packages\pygetpapers\pygetpapers.py", line 568, in handlecli
self.handle_restart(args)
File "c:\users\shweata\appdata\local\programs\python\python38\lib\site-packages\pygetpapers\pygetpapers.py", line 235, in handle_restart
self.europe_pmc.eupmc_restart(args, restart_file_path)
TypeError: eupmc_restart() takes 2 positional arguments but 3 were given
What am I getting wrong?
This issue has been fixed
Describe the bug From what I understand,
--restart
works just like how--update
now works. We would have to specify the output directory (already existing Cproject) and give it--restart
. But the error says that--restart
flag requires an argument.To Reproduce INPUT:
OUTPUT: