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

mapping-sheet: extension column is blank for Milestone Documents extension #156

Closed romifz closed 4 years ago

romifz commented 4 years ago

Example:

$ ocdskit mapping-sheet release-schema.json --extension https://raw.githubusercontent.com/open-contracting-extensions/ocds_milestone_documents_extension/master/extension.json --extension-field extension > mapping-sheet.csv
jpmckinney commented 4 years ago

That's a weird extension, because all it does is set deprecated to null. Personally, I think it's a bit weird that the extension exists; all it does is make it so that the Data Review Tool stops complaining about that deprecated field.

Since the field is defined by OCDS, I think it makes sense for the extension column to be blank.

romifz commented 4 years ago

I see. That makes sense, although it makes things confusing for me as well.

Milestone documents is a core extension, so it is included in the OCDS mapping template. Extension fields are pushed to the end of the sheet, and each group is preceded by the name and description of the extension that adds the field.

With the current update, I have no way to identify which fields have been modified by the Milestone documents extension, and since they are not deprecated anymore, they appear in the main sections. Before the last mapping-sheet update I've been using a custom method to dereference the patched schema and copy the extension name down the schema tree for sections added by extensions using refs, but due to recent changes in the ProfileBuilder (this commit I think, but I'm not really sure), I can't do this anymore. Before the change, the extension field appeared in the top sections altered by Milestone documents, like tender/milestones/documents.

I know that this may not be an issue of ocdskit anymore, but I don't know what to do with Milestone documents, maybe we shouldn't be applying this extension at all?

jpmckinney commented 4 years ago

I recommend acting like that extension doesn’t exist. Extensions shouldn’t be un-deprecating fields.

romifz commented 4 years ago

That makes sense, thanks!