JaneliaSciComp / dis-utilities

Utilities for Data and Information Services
BSD 3-Clause "New" or "Revised" License
0 stars 0 forks source link

wrapper script #85

Open virginiascarlett opened 5 days ago

virginiascarlett commented 5 days ago

I'd like to wrap the whole weekly procedure in one script to make it really easy on the next librarian/Mike. My plan is to import the /bin scripts I need as modules, and essentially copy-paste the stuff under 'if name==main' into my wrapper script, to run it all in one go.

virginiascarlett commented 5 days ago

Already hitting a roadblock: Traceback (most recent call last): File "/groups/scicompsoft/home/scarlettv/dis-utilities/utility/bin/weekly_pubs.py", line 42, in update_dois.initialize_program() File "/groups/scicompsoft/home/scarlettv/dis-utilities/sync/bin/update_dois.py", line 105, in initialize_program if ARG.TARGET == 'dis': NameError: name 'ARG' is not defined

I think the problem is that this function relies on ARG variables that were defined in the namespace of that running program. A solution would be to rewrite the function to pass ARG.TARGET and ARG.MANIFOLD as command-line args.

virginiascarlett commented 1 day ago

Use a shell script instead