One of the major usability issues our publishing suite DaCHS has for operators (i.e., people who want publish data) is the “horror vacui”: How do I start a Resource Descriptor (RD – the file DaCHS interprets to build services)?
I used to recommend to start by having a look at the RDs of our existing services and pick whatever matches best your publication project. But finding a matching service and figuring out what is generic, what’s a special property of the concrete data collection, and what’s a hack that should not be reproduced isn’t straightforward at all, not to mention the fact that some of those RDs have been in maintenance mode for almost 10 years and hence may show deprecated practices.
I had planned to generalise Mikhail’s approach to several types of resources supported by DaCHS, ideally inferring the questions to ask from the built-in documentation of mixins and applys. But during the last year, whenever I felt it would be a good time to tackle that generalisation, I quickly gave up again. It was mostly rather trivial stuff such as how to tell apart repeatable metadata (waveband, say) and non-repeatable metadata (instrument, say). But it was bad enough that I quickly found something else to do each time I got started.
Eventually, I gave up on a menu interface altogether – making it flexible and generatable at the same time seemed a fairly complex problem. But that doesn’t mean I forgot about overcoming the horror vacui thing. So, when forms aren’t flexible enough for data entry, where do you turn? Right! A text editor.
dachs start. That’s a new DaCHS subcommand that gets you started with your RD. For one, you can list the templates available:
$ dachs start list siap -- Image collections via SIAP1 and TAP ssap+datalink -- Spectra via SSAP and TAP, going through datalink epntap -- Solar system data via EPN-TAP 2.0 scs -- Catalogs via SCS and TAP
More templates are planned; siap+datalink, for instance, would cover some frequent use cases. Feel free to mail in requests.
Once you find a suitable template, create your future resource directory, enter it and run
dachs start again, this time passing the name of the template you want:
$ mkdir ex_data $ cd ex_data $ dachs start scs $ head -16 q.rd | tail -9 <resource schema="ex_data"> <meta name="creationDate">2018-04-13T12:34:31Z</meta> <meta name="title">%title -- not more than a line%</meta> <meta name="description"> %this should be a paragraph or two (take care to mention salient terms)% </meta> <!-- Take keywords from http://astrothesaurus.org/thesaurus/hierarchical-browse/
dachs start uses the directory name as the new schema name and then writes a file
q.rd (which is the canonical name for the “main” RD in a resource). Within this file, you’ll see things to fill out between pairs of percent signs with short explanantions. Where longer explanations are necessary, embedded comments should help.
To give you an idea of the intended use: As a vim user, I’ve put
augroup rd au! au BufRead,BufNewFile *.rd imap
/%[^%]*% a au BufRead,BufNewFile *.rd imap cf% augroup END
~/.vimrc. That way, while editing the template into an actual RD, hitting F8 takes me to the next thing to be edited; I can then read the instructions, and when I have made up my mind, I can either delete the template element or hit F9 and replace the explanation text with whatever belongs there.
The command is available starting with the 1.1.3 beta (available now by switching to the beta repo) and will be part of the 1.2 release, planned for early June after the Victoria interop.
If you have a publication project: just try it out and give feedback. Note that the templates haven’t actually been tested yet, and the comments were written by a DaCHS and VO nerd, so they might not always be great either. Thus, when you get stuck: complain early, complain often!