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

Scheming support #281

Merged
merged 57 commits into from
Jul 5, 2024
Merged
Changes from 1 commit
Commits
Show all changes
57 commits
Select commit Hold shift + click to select a range
65abb1f
[#56] Allow to provide a dataset schema to profiles
amercader May 8, 2024
9faf5f5
[#56] Handle list values
amercader May 8, 2024
a808f72
[#56] Handle repeating subfields
amercader May 8, 2024
d0b219e
[#56] Add draft schema
amercader May 8, 2024
7ee354a
[#56] Add some examples
amercader May 8, 2024
9b847e9
[#56] Fix repeating subfields index logic
amercader May 9, 2024
e6583aa
[#56] [#56] Initial e2e scheming support test
amercader May 9, 2024
d86f467
[#56] Serialize repeating subfields
amercader May 14, 2024
000baa4
[#56] Add sample of resource fields
amercader May 15, 2024
2d8d969
[#56] [#56] Serialize repeating subfields
amercader May 14, 2024
c5865fb
[#56] [#56] Add sample of resource fields
amercader May 15, 2024
a77d5c2
[#56] Use profiles from config in CLI
amercader May 20, 2024
35657ef
[#56] Separate scheming compat profile, parsing
amercader May 20, 2024
62a7962
Merge branch '56-add-schema-file-dcat-ap-2.1' of github.com:ckan/ckan…
amercader May 20, 2024
e0f15f5
[#56] e2e test DCAT -> CKAN
amercader May 21, 2024
0b6a8dd
[#56] Scheming compatibility profile, serialization
amercader May 21, 2024
20ac269
[#56] Install scheming in github actions
amercader May 21, 2024
5375232
[#56] Add CKAN<2.10 before index hook variant
amercader May 21, 2024
9b0abce
[#56] dataset_schema -> dataset_type
amercader May 23, 2024
e1b5f32
[#56] Add most DCAT AP 1.1 standard and list fields
amercader May 27, 2024
2e4b4bc
[#56] Test fixes
amercader May 28, 2024
f9467d4
[#56] Consolidate and simplify publisher handling
amercader May 29, 2024
214d853
Merge branch 'master' into 56-add-schema-file-dcat-ap-2.1
amercader May 29, 2024
1bce834
Fix merge errors
amercader May 29, 2024
cd1d3f0
[#56] Add temporal extent
amercader May 30, 2024
103aa08
[#56] Add support for spatial_coverage
amercader May 30, 2024
a862d77
[#56] Add missing var
amercader May 30, 2024
aa23a70
[#56] Update repeating subfields indexing logic
amercader May 30, 2024
4256e73
[#56] Store geometry in spatial field for indexing
amercader May 30, 2024
afb74d1
[#56] Add rest of DCAT-AP 1 and 2.1 fields
amercader Jun 3, 2024
c6fc970
[#56] Add spatial_resolution_in_meters
amercader Jun 4, 2024
99b4c89
[#56] Review validators for resource fields
amercader Jun 4, 2024
4763d2b
Merge branch 'master' into 56-add-schema-file-dcat-ap-2.1
amercader Jun 4, 2024
1790404
[#56] Fix spatial_resolution validators
amercader Jun 4, 2024
73523d6
[#56] Don't mess with field keys if using scheming
amercader Jun 6, 2024
d456c00
[#56] Display snippets for file size, markdown
amercader Jun 6, 2024
b1e1718
[#56] Common preset for DCAT date-based fields
amercader Jun 6, 2024
209fda5
[#56] Fix dates tests
amercader Jun 6, 2024
634ff52
[#56] Fix number form snippet
amercader Jun 6, 2024
8b78139
[#56] Help texts for all fields in the schema
amercader Jun 6, 2024
15b0cc1
[#56] Use choices for resource status
amercader Jun 6, 2024
da8de09
Merge branch 'master' into 56-add-schema-file-dcat-ap-2.1
amercader Jun 10, 2024
602d505
[#56] Create a full and a slimmed down schema version
amercader Jun 10, 2024
614e23b
[#56] Update README
amercader Jun 10, 2024
c11f3c2
[#56] README tweaks
amercader Jun 11, 2024
030cd3d
[#56] Docstrings
amercader Jun 11, 2024
5fffa15
[#56] Fix function call
amercader Jun 11, 2024
ad35359
Schemas description
amercader Jun 12, 2024
b600493
[#56] Index subfields as extras_ Solr field
amercader Jun 13, 2024
f88e433
[#56] Clean the index before tests
amercader Jun 13, 2024
898912c
[#56] Avoid empty list in spatial resolution
amercader Jun 19, 2024
97e68de
[#56] Markdown for provenance
amercader Jun 19, 2024
a8a3f25
[#56] Don't serialize empty repeating subfields
amercader Jun 19, 2024
c7b8c02
[#56] More robust date parsing with dateutil, expand tests
amercader Jul 2, 2024
39b4d91
[#56] Add tests for invalid and ambiguous dates
amercader Jul 3, 2024
31a69f5
Merge branch 'master' into 56-add-schema-file-dcat-ap-2.1
amercader Jul 3, 2024
ae78f0f
[#56] Update changelog with scheming changes
amercader Jul 5, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
[#56] Avoid empty list in spatial resolution
amercader committed Jun 19, 2024

Verified

This commit was signed with the committer’s verified signature.
Daanvdplas Daan van der Plas
commit 898912ca19a43efe65fc42c9a8952eaf61641e89
2 changes: 1 addition & 1 deletion ckanext/dcat/profiles/base.py
Original file line number Diff line number Diff line change
@@ -713,7 +713,7 @@ def _read_list_value(self, value):
# List of values
if isinstance(value, list):
items = value
elif isinstance(value, str):
elif value and isinstance(value, str):
try:
items = json.loads(value)
if isinstance(items, ((int, float, complex))):
2 changes: 1 addition & 1 deletion ckanext/dcat/validators.py
Original file line number Diff line number Diff line change
@@ -86,7 +86,7 @@ def _scheming_multiple_number(key, data, errors, context):
return

value = data[key]
if value is not missing:
if value and value is not missing:

if not isinstance(value, list):
if isinstance(value, str) and value.startswith("["):