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

add description and source to quality dimensions #720

Merged
merged 7 commits into from
May 23, 2024
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.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 1 addition & 0 deletions ohsome_quality_api/quality_dimensions/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
class QualityDimension(BaseModel):
name: str
description: str
source: str | None = None
model_config = ConfigDict(
title="Topic",
frozen=True,
Expand Down
12 changes: 8 additions & 4 deletions ohsome_quality_api/quality_dimensions/quality_dimensions.yaml
Original file line number Diff line number Diff line change
@@ -1,20 +1,24 @@
---
# TODO description

completeness:
name: Completeness
description: >-
something that is still a TODO
The degree to which subject data associated with an entity has values for all expected attributes
and related entity instances in a specific context of use.
source:
https://www.iso.org/standard/78900.html

currentness:
name: Currentness
description: >-
something that is still a TODO
The degree to which data has attributes that are of the right age in a specific context of use.
source:
https://www.iso.org/standard/35736.html

minimal:
name: Minimal
description: >-
something that is still a TODO
A minimal quality dimension definition for testing purposes.

none:
name: None
Expand Down
8 changes: 5 additions & 3 deletions tests/integrationtests/api/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,9 +85,11 @@ def metadata_report_multilevel_mapping_saturation():
@pytest.fixture
def metadata_quality_dimension_completeness():
return {
"completeness": {
"name": "Completeness",
"description": "something that is still a TODO",
"minimal": {
"name": "Minimal",
"description": "black A minimal quality dimension"
matthiasschaub marked this conversation as resolved.
Show resolved Hide resolved
" definition for testing purposes.",
"source": None,
}
}

Expand Down
4 changes: 2 additions & 2 deletions tests/integrationtests/api/test_metadata.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ def test_metadata(
)
# check quality dimensions result
assert (
metadata_quality_dimension_completeness["completeness"]
== result["qualityDimensions"]["completeness"]
metadata_quality_dimension_completeness["minimal"]
matthiasschaub marked this conversation as resolved.
Show resolved Hide resolved
== result["qualityDimensions"]["minimal"]
)
# check projects result
assert metadata_project_core["core"] == result["projects"]["core"]
Expand Down