-
Notifications
You must be signed in to change notification settings - Fork 2
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
Added scripts to restore submission from spreadsheet. ops-1163 #1165
base: master
Are you sure you want to change the base?
Conversation
json.dump(global_uuid_mapping, f, indent=4, separators=(', ', ': ')) | ||
|
||
def main(project_uuid, token, spreadsheet_path, submission_uuid): | ||
ingest_api = IngestApi('https://api.ingest.archive.data.humancellatlas.org/') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Don't use a hard coded ingest api url.
If you leave it blank, it is taken from the INGEST_API
environment variable.
Add a note in the readme to set the correct variable prior to running the script.
ingest_api = IngestApi('https://api.ingest.archive.data.humancellatlas.org/') | |
ingest_api = IngestApi() |
|
||
|
||
if __name__ == '__main__': | ||
main(sys.argv[1], sys.argv[2], sys.argv[3], sys.argv[4]) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Consider using some argument parsing here.
Co-authored-by: Amnon Khen <[email protected]>
Applied the feedback |
project_uuid = os.getenv('project_uuid') | ||
mongodb_uri = os.getenv('mongodb_uri') or 'mongodb://localhost:27017/' | ||
map_json_path = os.getenv('map_json_path') or 'uuid_mapping.json' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
env variables should be uppercase
mongodb_uri = os.getenv('mongodb_uri') or 'mongodb://localhost:27017/' | ||
map_json_path = os.getenv('map_json_path') or 'uuid_mapping.json' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
use the default
function argument of getenv
Applied feedback - Please @amnonkhen re-review |
Added scripts with instructions to fix the issue described in #1163