open-contracting / ocdskit

A suite of command-line tools for working with OCDS data
https://ocdskit.readthedocs.io
BSD 3-Clause "New" or "Revised" License
17 stars 7 forks source link

Consider extracting non-OCDS specific commands to separate tool #103

Closed jpmckinney closed 5 years ago

jpmckinney commented 5 years ago

The indent, mapping-sheet, schema-report, schema-strict, set-closed-codelist-enums commands aren't OCDS-specific. We might therefore consider extracting them to a new tool.

Those commands work with all specifications that combine JSON Schema with CSV codelists, so we might call the new tool JSCCKit. (Related: https://github.com/open-contracting/ocds-babel/issues/10) This new tool might also be a good target for schema tests. (Related: https://github.com/open-contracting/standard-maintenance-scripts/issues/140 and https://github.com/openownership/data-standard/issues/171)

OCDSKit can still make the commands available, by adding the other tool's commands to this list. If we do that, OCDSKit might want to monkey-patch some commands to add default arguments, e.g. adding --infer-required to mapping-sheet.

This would slightly improve the user experience, as users wouldn't have to see commands they are unlikely to use (commands related to schema development rather than data processing).

robredpath commented 5 years ago

The pattern of $standardkit is a very helpful one. Are those commands on their own enough to be a useful tool, or would a better approach be to create a template which anyone wanting to adapt to their own standard could set up quickly - getting those commands for free, and an easy path to adding the commands that are useful for their context?

jpmckinney commented 5 years ago

Creating that template is essentially the same as the proposal in the issue description; the only differences with the issue description are that (1) the 'template' could also be used as a standalone tool and library, and (2) the method of getting the commands for free is to import them (as a library) rather than copy-paste them (in the usual sense of a template).

jpmckinney commented 5 years ago

Can re-open once governance issues are clarified.