Skip to content

Schema validator#296

Merged
jesper-friis merged 43 commits intomasterfrom
294-validator-for-schema
Mar 17, 2025
Merged

Schema validator#296
jesper-friis merged 43 commits intomasterfrom
294-validator-for-schema

Conversation

@jesper-friis
Copy link
Contributor

@jesper-friis jesper-friis commented Jan 7, 2025

Description

Main aim: Update the keyword definitions to conform to DCAT-AP.

Subgoals:

  • provide an single source for defining keywords (from which json-ld files and documentation can be generated)
  • make it easy to extend keywords for different fields or domains
  • enable validation of data

This PR include many improvements:

  • A single YAML source for defining keywords
  • A pre-commit hook that generates the JSON-LD context and documentation from the keywords
  • Support for additional keywords defined by other packages via entry points
  • Validation of dicts with data documentation
  • Fix pylint issues
  • Updated the context to comply with DCAT-AP
  • Updated tests to comply with DCAT-AP
  • Improve search_iris(). Criterias can now be nested

Type of change

  • Bug fix and code cleanup
  • New feature
  • Documentation update
  • Testing

Checklist for the reviewer

This checklist should be used as a help for the reviewer.

  • Is the change limited to one issue?
  • Does this PR close the issue?
  • Is the code easy to read and understand?
  • Do all new feature have an accompanying new test?
  • Has the documentation been updated as necessary?
  • Is the code properly tested?

@jesper-friis jesper-friis linked an issue Jan 7, 2025 that may be closed by this pull request
@jesper-friis jesper-friis marked this pull request as draft January 7, 2025 23:01
@codecov
Copy link

codecov bot commented Jan 7, 2025

Codecov Report

Attention: Patch coverage is 88.00000% with 60 lines in your changes missing coverage. Please review.

Project coverage is 78.74%. Comparing base (be012ac) to head (744e3c6).
Report is 44 commits behind head on master.

Files with missing lines Patch % Lines
tripper/datadoc/keywords.py 84.46% 32 Missing ⚠️
tripper/datadoc/dataset.py 92.21% 13 Missing ⚠️
tripper/utils.py 84.84% 10 Missing ⚠️
tripper/datadoc/dataaccess.py 63.63% 4 Missing ⚠️
tripper/backends/sparqlwrapper.py 50.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master     #296      +/-   ##
==========================================
+ Coverage   77.91%   78.74%   +0.83%     
==========================================
  Files          22       24       +2     
  Lines        2522     2856     +334     
==========================================
+ Hits         1965     2249     +284     
- Misses        557      607      +50     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@jesper-friis jesper-friis mentioned this pull request Jan 7, 2025
@jesper-friis jesper-friis changed the title Schema validator WIP: Schema validator Jan 8, 2025
@jesper-friis jesper-friis changed the title WIP: Schema validator Schema validator Mar 16, 2025
@jesper-friis jesper-friis marked this pull request as ready for review March 16, 2025 23:58
@jesper-friis jesper-friis mentioned this pull request Mar 17, 2025
10 tasks
@jesper-friis jesper-friis merged commit a5bc45a into master Mar 17, 2025
19 checks passed
@jesper-friis jesper-friis deleted the 294-validator-for-schema branch March 17, 2025 20:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Validator for schema

1 participant