Skip to content

Cannot upload files without extensions #6557

@setgree

Description

@setgree

Background:

  • Political Analysis is working with authors and with Code Ocean (whom I work for) to make authors' code reproducible & executable as part of the publication process.
  • Authors upload their materials to Code Ocean, e.g. https://doi.org/10.24433/CO.4189072.v1, and then those materials are exported to the Political Analysis Dataverse (https://dataverse.harvard.edu/dataverse/pan)
  • We currently do this manually but the goal is to have API integration that automates the export and uploading process.

Problem:

  • Code Ocean's 'master script' (the thing the system executes when a reader or author presses 'Reproducible Run') is just called run, no file extension. It's a shell script comprising something like:
#!/usr/bin/env bash
set -ex

# This is the master script for the capsule. When you click "Reproducible Run", the code in this file will execute.
Rscript "Run_all.R"
  • It's a bash script, but we dropped the extension at some point.

  • Dataverse does not seem to allow us to upload files without file extensions.

  • When I drag and drop run (or something called newfile with arbitrary text in it) via the Dataverse Interface, my browser (Firefox) scrolls to the top of the page, and when I scroll down, the file has not been uploaded.

  • When I tried a few weeks ago (on Chrome) to upload all the materials from https://doi.org/10.24433/CO.4189072.v1, I received a message that run and Run_all.R are duplicates and only Run_all.R was successfully uploaded.

The short-term solution:

  • We can rename all the run scripts run.sh before they are uploaded to Dataverse.

The problem with that short-term solution, long-term:

  • An additional manual step in the process makes API integration harder because it's one more thing that could go wrong in an unsupervised setting (what if users already have a run.sh script uploaded, for instance).

The ideal solution (from our POV):

  • Dataverse allows files that do not have file extensions to be uploaded.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions