Skip to content
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

libcovebods: Add handling of BODS 0.4 data #144

Merged
merged 4 commits into from
Jan 7, 2025
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
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
This conversation was marked as resolved.
Show resolved Hide resolved

- 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
Loading