-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
When someone uploads a spreadsheet what version of the schema do we assume it is? #35
Comments
There is an issue here to be fixed. I have a spreadsheet with BODS 0.2 data. The version info is included per statement (publicationDetails/bodsVersion), but the version is not detected and used for conversion and validation. (So there are validation errors like 'interests/0/type contains an unrecognised value. Check the related codelist for allowed code values.', with 'other-influence-or-control' being the unrecognised value. And the new 0.2 fields are treated as additional fields.) |
When it comes to conversion from the spreadsheet to JSON, is the (correct version of the) schema used to interpret data formats correctly from the spreadsheet to JSON? If so, there are a number of possible issues with conversion of 0.2 data from spreadsheets which might disappear once this version detection issue is sorted out. Or they may be unrelated issues. For reference, they are: Date format
(I'm currently using this regex to find and replace them: Boolean values
componentStatementIDs field
|
I think the best solution to this is to run the conversion twice, once to pick up the schema version, and then a second time to do the conversion with the correct schema. Here's a dev instance to try: https://dev.datareview.openownership.org/ This fixes everything except for:
|
@Bjwebb That looks great to me. It even works on a .ods file that's saved in LibreOffice as .xlsx. What would it take to have flatten-tool handle |
No, I think this is the first time we've come across it, all the other standards allow I've made an issue OpenDataServices/flatten-tool#357 now, and I have a suggested fix already OpenDataServices/flatten-tool#358 |
I've deployed the flatten-tool fix to the dev site https://dev.datareview.openownership.org/ |
@Bjwebb - well that's working as expected now - at least with the ZCMC data. And I can round trip from Excel-> BODS JSON and back again. Lovely. |
This has the `"format": "date"` fix that we want OpenDataServices/flatten-tool#358 #35
This is now deployed to the live instance https://datareview.openownership.org/ |
In OCDS, it looks like we just assume it's 1.1
The problem is this bit in view.py:
We need to pass the json_data to SchemaBODS so it can select the right version, but we don't have that yet ... and we need to pass the schema to convert_spreadsheet, but we don't know which version of the schema to use until we open the spreadsheet!
The text was updated successfully, but these errors were encountered: