IQSS / dataverse-uploader

GitHub Action to publish repository content on Dataverse

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

"DELETE" and "PUBLISH" parameters required

haarli opened this issue · comments

Hi,

thanks for contributing this GitHub action, it's a great extension to Dataverse!

We made some test with version 1.2 (available on GitHub Marketplace) and found a small problem: According to documentation on https://github.com/marketplace/actions/dataverse-uploader-action, the parameters "DELETE" and "PUBLISH" are not required and default values are used. However, when leaving them out, we get the following error whenever the action is triggered:

$GITHUB_REPOSITORY -d ""  -r ""  -p "" 
usage: dataverse.py [-h] [-d DIR] [-r {True,TRUE,true,False,FALSE,false}]
                    [-p {True,TRUE,true,False,FALSE,false}]
                    token server doi repo
dataverse.py: error: argument -r/--remove: invalid choice: '' (choose from 'True', 'TRUE', 'true', 'False', 'FALSE', 'false')
Error: Process completed with exit code 2.

This is the yml file:

on: 
  push:
  workflow_dispatch:
jobs:
  build:
    runs-on: ubuntu-latest
    steps:
      - name: Send repo to Dataverse 
        uses: IQSS/dataverse-uploader@v1.2
        with:
          DATAVERSE_TOKEN: ${{secrets.DATAVERSE_TOKEN}}
          DATAVERSE_SERVER: https://edmond.mpdl.mpg.de
          DATAVERSE_DATASET_DOI: doi:10.17617/3.TF31SS

When adding both parameters to the YML file, it works fine.

That's very interesting - thank you for submitting the issue. I'll look into it!

Hi @haarli
I have updated the action and it should work without the optional arguments.
If you have a moment to test it out (as version v1.3), that would be much appreciated.
Once again, thank you for opening the issue!

Yes, just tested and now it's working without the parameters and default values are applied with v1.3.
Thank you for the quick fix!