Skip to content

Commit

Permalink
libcovebods: Add handling of BODS 0.4 data
Browse files Browse the repository at this point in the history
Include BODS 0.4 schema, update to handle new jsonschema version,
include BODS 0.4 specific checks, statistics and tests etc.
  • Loading branch information
Ed (ODSC) committed Dec 17, 2024
1 parent 2356532 commit bdf9e01
Show file tree
Hide file tree
Showing 490 changed files with 32,685 additions and 167 deletions.
13 changes: 13 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,19 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.

## [Unreleased]

### Changed

- Update to handle new jsonschema version (Draft202012Validator)
- Adapt infrastructure to handle BODS 0.4 (structure, statement types etc.)

### Added

- Include the BODS 0.4 schema
- Include BODS 0.4 specific additional checks
- Include BODS 0.4 specific statistics
- Add tests for BODS 0.4 schema validation
- Add tests for BODS 0.4 specific additional checks

## [0.15.0] - 2023-06-16

This Release marks a very big refactoring to use with new cove and new libcove2 library.
Expand Down
2 changes: 2 additions & 0 deletions MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
include libcovebods/data/*.json
include libcovebods/data/schema-0-4-0/*.json
include libcovebods/data/schema-0-4-0/codelists/*.csv
3 changes: 3 additions & 0 deletions libcovebods/base_task.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,9 @@ def check_person_statement_first_pass(self, statement):
def check_ownership_or_control_statement_first_pass(self, statement):
pass

def check_statement_second_pass(self, statement):
pass

def check_entity_statement_second_pass(self, statement):
pass

Expand Down
8 changes: 7 additions & 1 deletion libcovebods/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,16 @@
"schema_url": os.path.join(_schema_folder, "schema-0-3-0.json"),
"schema_url_host": _schema_folder,
},
"0.4": {
"schema_url": os.path.join(_schema_folder, "schema-0-4-0"),
"schema_url_host": _schema_folder,
},
},
# In some cases we default to the latest schema version, so we need to know what the latest version is.
# It should be a key that is in the 'schema_versions' data.
"schema_latest_version": "0.3",
"schema_latest_version": "0.4",
# Or latest version before change to records (in 0.4)
"schema_latest_nonrecord_version": "0.3",
# These default values are very wide on purpose. It is left to apps using this to tighten them up.
"bods_additional_checks_person_birthdate_min_year": 1,
"bods_additional_checks_person_birthdate_max_year": datetime.datetime.now().year,
Expand Down
Loading

0 comments on commit bdf9e01

Please sign in to comment.