-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
GNIP 97: New metadata editor #12794
GNIP 97: New metadata editor #12794
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #12794 +/- ##
==========================================
+ Coverage 67.00% 67.95% +0.94%
==========================================
Files 952 975 +23
Lines 56912 58883 +1971
Branches 6725 6886 +161
==========================================
+ Hits 38134 40014 +1880
- Misses 17166 17232 +66
- Partials 1612 1637 +25 |
I am not sure to be ready to do a helpful review from my position. However, I was wondering why the schema will include geonode specific properties like |
Hi @ridoo
|
# override base schema: was a codelist, is a fixed value in the codelist | |
jsonschema["properties"][FIELD_RESTRICTION_TYPE] = { | |
"type": "string", | |
"title": "restrictions", | |
"ui:widget": "hidden", | |
"geonode:handler": "inspire", | |
} |
geonode:required
so for which cases geonode:required is necessary?
JSON schema defines the required fields (using the annotation required
) in a level above the sub schema definition.
The handlers only work on their own sub schema.
The MetadataManager
uses the geonode:required
custom annotations to build the upper level required
array:
geonode/geonode/metadata/manager.py
Lines 78 to 85 in 7e81443
# Set required fields. | |
required = [] | |
for fieldname, field in schema["properties"].items(): | |
if field.get("geonode:required", False): | |
required.append(fieldname) | |
if required: | |
schema["required"] = required |
Complete rewriting of the metadata editor according to GNIP 97
Checklist
For all pull requests:
The following are required only for core and extension modules (they are welcomed, but not required, for contrib modules):
Submitting the PR does not require you to check all items, but by the time it gets merged, they should be either satisfied or inapplicable.