Open Xarthisius opened 5 years ago
I don't think we really have the need to register datasets from DataONE development server anymore. This came about when we had a restriction where we could only publish production data to production DataONE, and development data to development DataONE.
It's a nice feature to allow users to publish to the development server to spot check their package to make sure it's perfect before assigning a DOI to it. This means we need knowledge of two CNs in gwvolman. The production CN and the dev CN, which is determined when the user selects the repository in the publish modal dropdown.
Publishing part is addressed in https://github.com/whole-tale/girder_wholetale/pull/367
Through out the codebase we often reference (or pass as a parameter) the location of DataONE's CN or MN, e.g.
GET /repository/lookup
orPOST /dataset/register
. Those variables are also hardcoded in gwvolman. This approach raises a couple of issues:master
andstable
would be always in a diverged state. Not to mention, they need to be kept in sync between this plugin and gwvolman.Proposed solution
Abstract everything that's D1 specific into the settings. Use them where they're needed instead of trickling down
base_url
all the way from the REST API down to the actual methods doing registration/publication. Proposed settings: