Skip to content

feature/json-spec-scripts#272

Merged
sambles merged 3 commits into
mainfrom
feature/json-spec-scripts
Apr 2, 2026
Merged

feature/json-spec-scripts#272
sambles merged 3 commits into
mainfrom
feature/json-spec-scripts

Conversation

@SkylordA

@SkylordA SkylordA commented Mar 20, 2026

Copy link
Copy Markdown
Contributor

feature/json-spec-scripts

Adds spec_* utility scripts for generating, downloading, comparing, validating, and uploading OED JSON specs across all release tags. Also fixes two pandas 3.0 compatibility issues in extract_spec.py and updates Example CSVs to pass 5.0.0 spec validation.

Changes

utils/extract_spec.py

  • Fix apply(pd.Series, 1)apply(pd.Series) (pandas 3.0 removed convert_dtype positional arg)
  • Skip NaN keys from blank "File Names" cells (pandas 3.0 changed split/stack to produce float('nan') instead of None)
  • Fall back to "AIR code" column when "CEDE code" is absent (pre-3.0.0 Excel files)

utils/spec_*.py (new)

  • spec_download.py — download released JSON specs from GitHub into spec-downloaded/
  • spec_generate.py — regenerate JSON specs from source at each tag into spec-generated/
  • spec_compare.py — diff spec-downloaded/ vs spec-generated/
  • spec_validate.py — validate specs against ods_tools validators using Example CSVs or a PiWind config
  • spec_upload.py — upload generated specs to GitHub releases

Examples/

  • property_location.csv: populate LocPerilsCovered=WW1 and LocCurrency=GBP for all 500 rows
  • marinecargo_account.csv: add PolDedType6All (conditionally required when PolDed6All is set)

JSON spec changes

Status Versions
New (no existing release asset) 1.1.2 – 2.3.2 (13 versions)
Updated (cr_field + versioning) 3.0.0 – 3.0.3
Updated (versioning only) 3.0.4
Unchanged 3.1.0 – 5.0.0

Note: specs for 1.1.2–3.0.4 will be updated on their GitHub releases. Download again to pick up the corrected files.

closes OasisLMF/ODS_Tools#237
closes OasisLMF/ODS_Tools#236

…ng and uploading json schemas for all found tags
@SkylordA SkylordA self-assigned this Mar 20, 2026
@SkylordA SkylordA added the feature New feature or request label Mar 20, 2026
@github-actions

Copy link
Copy Markdown

Build Preview

You can find files attached to the below linked Workflow Run URL (Logs).
Please note that files only stay for around 14 days!

Name Link
Commit fb5c67c
Build https://github.com/OasisLMF/ODS_OpenExposureData/actions/runs/23346795473
Excel File excel_spec.zip
JSON File extracted_spec.zip

@SkylordA

SkylordA commented Mar 23, 2026

Copy link
Copy Markdown
Contributor Author

CI was failing due to unrelated ODS_Tools test bug(s), passing CI with fix/schema-validation branch:
https://github.com/OasisLMF/ODS_OpenExposureData/actions/runs/23429516283

Specific test fixes:
OasisLMF/ODS_Tools@268c931 and OasisLMF/ODS_Tools@0333b67

@github-actions

Copy link
Copy Markdown

Build Preview

You can find files attached to the below linked Workflow Run URL (Logs).
Please note that files only stay for around 14 days!

Name Link
Commit bfbef6d
Build https://github.com/OasisLMF/ODS_OpenExposureData/actions/runs/23478047340
Excel File excel_spec.zip
JSON File extracted_spec.zip

@github-actions

Copy link
Copy Markdown

Build Preview

You can find files attached to the below linked Workflow Run URL (Logs).
Please note that files only stay for around 14 days!

Name Link
Commit c9efa22
Build https://github.com/OasisLMF/ODS_OpenExposureData/actions/runs/23481364081
Excel File excel_spec.zip
JSON File extracted_spec.zip

@SkylordA SkylordA requested a review from benhayes21 March 26, 2026 11:20
@github-actions

github-actions Bot commented Apr 2, 2026

Copy link
Copy Markdown

Build Preview

You can find files attached to the below linked Workflow Run URL (Logs).
Please note that files only stay for around 14 days!

Name Link
Commit c9efa22
Build https://github.com/OasisLMF/ODS_OpenExposureData/actions/runs/23481364081
Excel File excel_spec.zip
JSON File extracted_spec.zip

@sambles sambles merged commit 6660469 into main Apr 2, 2026
13 of 16 checks passed
@sambles sambles deleted the feature/json-spec-scripts branch April 2, 2026 13:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feature New feature or request

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

ods_tools 5.0.1 does not support OED <3 ods_tools 5.0.1 crashes on OED v3.0.0 to 3.0.3

4 participants