Skip to content

Commit 9fd23b0

Browse files
committed
feat: allow passing corine secret via envvar
1 parent 257a535 commit 9fd23b0

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

doc/configtables/toplevel.csv

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,4 @@ remote,,,
88
-- ssh,--,,Optionally specify the SSH of a remote cluster to be synchronized.
99
-- path,--,,Optionally specify the file path within the remote cluster to be synchronized.
1010
secrets,,,
11-
-- corine,--,,API token for corine dataset retrieval. See `scripts/retrieve_corine_dataset_primary.py` for more instructions.
11+
-- corine,--,,API token for corine dataset retrieval. You can also pass the token by setting the environment variable "CORINE_API_TOKEN". See `scripts/retrieve_corine_dataset_primary.py` for more instructions.

rules/retrieve.smk

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ elif (CORINE_DATASET := dataset_version("corine"))["source"] in ["primary"]:
9696

9797
rule retrieve_corine:
9898
params:
99-
apikey=config["secrets"]["corine"],
99+
apikey=os.environ.get("CORINE_API_TOKEN", config["secrets"]["corine"]),
100100
output:
101101
zip=f"{CORINE_DATASET['folder']}/corine.zip",
102102
tif_file=f"{CORINE_DATASET['folder']}/corine.tif",

0 commit comments

Comments
 (0)