inbo / whip

✅ Human and machine-readable syntax to express specifications for data
MIT License
7 stars 0 forks source link

Declare external vocabularies #9

Open peterdesmet opened 7 years ago

peterdesmet commented 7 years ago

Documenting email discussion with @tucotuco.

@tucotuco:

Do you think there is a place for being able to declare an external vocabulary as an allowed set?

peterdesmet commented 7 years ago

Yeah, it's something we have been thinking about and should probably document as a feature request (GitHub issue). The two disadvantages I see are:

peterdesmet commented 7 years ago

@tucotuco:

Hmmm. What if there was a step to grab the vocabs to local files and make them part of the specification. Not fully self-contained still, but a step closer?

peterdesmet commented 7 years ago

Yes, but rather than separate local files, I would write these to the spec file itself, as lists. That would keep the specs contained to a single file, with versioning.

Also, this retrieving and local writing seems to be part of implementation, not specification. Still, it would be nice to indicate the url of the external vocab in the specs. The simplest solution is to indicate this as a comment after the list, but that might only be human-readable. I don't have any ideas on how to indicate it otherwise...

tucotuco commented 7 years ago

I agree that the specification of the external vocab in the specs is a good thing. It means that, as an implementation, one could take a WHIP file that has the external link and no vocabs, run it through a "flesher" and get the vocabs inserted in the resulting new WHIP file, which could then be edited to remove and vocab values you did not want in there.

peterdesmet commented 7 years ago

Tempting... :relaxed: How would such a syntax look like?