Skip to content

Commit

Permalink
retrieve deposition ID
Browse files Browse the repository at this point in the history
  • Loading branch information
FriederikeHanssen committed Nov 16, 2023
1 parent ac39f0c commit b5fbd43
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/ncbench.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ jobs:
destination: ./variant_calling
flags: --no-sign-request --include ".vcf.gz" --exclude "g.vcf.gz"

# TOD remove this, it is probably not needed anymore, we are using python now
# TODO remove this, it is probably not needed anymore, we are using python now
#- name: Create new Zenodo entry
# uses: popperized/zenodo/create@master
# env:
Expand Down Expand Up @@ -91,7 +91,7 @@ jobs:
with(.variant-calls.nf-core-sarek-321-strelka-agilent-75M.subcategory;
. = "NA12878-agilent" ) |
with(.variant-calls.nf-core-sarek-321-strelka-agilent-75M.zenodo;
.deposition = "get here proper zenodo ID" |
.deposition = $DEPOSITION_ID |
.filename = "get here proper file names" ) |
with(.variant-calls.nf-core-sarek-321-strelka-agilent-75M.benchmark;
. = "giab-NA12878-agilent-75M" ) |
Expand All @@ -105,7 +105,7 @@ jobs:
cd ncbench-workflow
git config --global user.email "[email protected]"
git config --global user.name "FriederikeHanssen"
git checkout -b test6
git checkout -b test7
git add config/config.yaml
git commit -a -m "Add changes"
git push origin test6
git push origin test7
6 changes: 5 additions & 1 deletion .github/workflows/upload.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@
headers = {"Content-Type": "application/json"}
access_token = os.environ["ACCESS_TOKEN"]

url = f"https://zenodo.org/api/deposit/depositions?access_token={access_token}"
# TODO: replace sandbox link https://zenodo.org/api/deposit/depositions
url = f"https://sandbox.zenodo.org/api/deposit/depositions?access_token={access_token}"

filename = "*.vcf.gz"
path = "../../variant_calling/%s" % filename
Expand All @@ -31,6 +32,9 @@
r.status_code
# 200

r.json()["metadata"]["recid"]

os.environ['DEPOSITION_ID'] = r.json()["metadata"]["recid"]
# TODO add publication step
#r = requests.post('https://zenodo.org/api/deposit/depositions/%s/actions/publish' % deposition_id,
# params={'access_token': ACCESS_TOKEN} )
Expand Down

0 comments on commit b5fbd43

Please sign in to comment.