Skip to article frontmatterSkip to article content
Site not loading correctly?

This may be due to an incorrect BASE_URL configuration. See the MyST Documentation for reference.

download_sivacor.py - Download SIVACOR submission artifacts

Description

Downloads all artifacts associated with a SIVACOR submission ID, handles ZIP file extraction, and commits the results to a git branch. Automates the workflow of fetching SIVACOR submissions and integrating them into the repository.

Usage

python3 tools/download_sivacor.py [JIRA_CASE]

Arguments

The script determines the Jira case in this order of precedence:

  1. Command line argument

  2. Current directory name (if starts with aearep-)

  3. jiraticket field in config.yml

Examples

# Using current directory name as Jira case
cd aearep-8885
python3 tools/download_sivacor.py

# Specifying Jira case explicitly
python3 tools/download_sivacor.py aearep-8885

# Using config.yml (jiraticket field)
python3 tools/download_sivacor.py

Requirements

Environment Variables Required

Workflow

  1. Determines Jira case from argument, directory name, or config.yml

  2. Looks up SIVACOR ID from Jira ticket

  3. Determines target folder from config.yml (precedence: openicpsr > zenodo > dataverse > osf)

  4. Downloads all artifacts using sivacor CLI

  5. If ZIP file exists:

    • Clears folder contents (keeping folder)

    • Unpacks ZIP

    • Downloads other artifacts

  6. Creates branch sivacor-{sivacor_id} (lowercase)

  7. Git adds and commits the folder

Error Handling

See Also