Data Repository Upload¶
Overview¶
cartloader
offers two modules (upload_aws
and upload_zenodo
) to upload all generated outputs —- including rasterized SGE tiles, decoded spatial factor maps, and molecule-factor joins —- to a target data repository for sharing or deployment. It supports both AWS and Zenodo as upload backends, allowing users to choose their preferred platform.
Requirements¶
- A completed run of
run_cartload2
, which produces:- Rasterized SGE tiles
- Decoded spatial factor maps
- Joined molecule-factor outputs
- A catalog file (
catalog.yaml
) summarizing the output structure and metadata
- For AWS uploads:
- AWS CLI installed and configured (e.g., via
aws configure
)
- AWS CLI installed and configured (e.g., via
-
For Zenodo uploads:
- A personal access token saved in a file, required for authentication with the Zenodo API
- A Zenodo deposition ID
What are the Zenodo token and deposition ID, why do you need them, and how do you get them?
Zenodo Token File
cartloader
leverages the Zenodo API for uploading files, which provides a streamlined and efficient experience. To authenticate uploads via the API, Zenodo requires an access token for secure.To obtain a token for use with
cartloader
:- Log in to Zenodo.
- Go to your applications page.
- Click "New Token" and select appropriate scopes (e.g.,
deposit:write
,deposit:actions
). - Copy the generated token.
- Save the token in a plain text file, and pass the file path to the
--token-file
option when runningcartloader
.
Zenodo Deposition ID
A deposition ID is a unique numeric identifier assigned to a deposition (i.e., a dataset record) you create on Zenodo. This ID specifies where your uploaded files will be stored. If you’ve already created a deposition, you can find its ID at the end of the URL. For example:
1 2 3
https://zenodo.org/deposit/1234567 ↑ This is the deposition ID
Example Usage¶
AWS Uploads¶
We recommend to create create a directory within your AWS S3 bucket using a data id as directory name.
1 2 3 4 5 6 7 8 |
|
--in-dir
(str): Path to the input directory containing the cartloader compilation output--s3-dir
(str): Path to the target S3 directory for uploading.--aws
(str): Path to the AWS CLI binary--n-jobs
(str): Number of parallel jobs--catalog-yaml
(str): Path to thecatalog.yaml
file generated inrun_cartload2
. If absent, will use thecatalog.yaml
in the input directory specified by--in-dir
.
Zenodo Uploads¶
1 2 3 4 5 6 7 |
|
--in-dir
(str): Path to the input directory containing the cartloader compilation output--zenodo-id
(str): Zenodo Deposition ID--zenodo-token
(str): Path to the Zenodo token file--upload-method
(str): Specifiycatalog
to use the catalog file to locate files to be uploaded--catalog-yaml
(str): Path to thecatalog.yaml
file generated inrun_cartload2
. If absent, will use thecatalog.yaml
in the input directory specified by--in-dir
.