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

YDA-5059: add hierarchical keyword selector #537

Open
wants to merge 22 commits into
base: development
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 12 commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
bde1a30
EPOS-MSL schema: update subdomains enum and geolocation description
lwesterhof Nov 2, 2023
cd0ee40
EPOS-MSL schema: update creator description
lwesterhof Nov 3, 2023
5f522a9
EPOS-MSL schema: add keyword selector proof of concept
lwesterhof Nov 3, 2023
66927d6
Merge branch 'development' into epos-msl
lwesterhof Jan 4, 2024
8ca8721
Merge branch 'development' into epos-msl
lwesterhof Mar 13, 2024
b352083
Add EPOS-MSL vocabulary
lwesterhof Mar 13, 2024
6614d79
Merge branch 'development' into epos-msl
lwesterhof Sep 5, 2024
38ddb3b
YDA-5059: make epos-msl keyword like datacite subject
claravox Nov 19, 2024
db9ac39
Merge branch 'development' into epos-msl
claravox Nov 25, 2024
8d15b41
rename keyword selector
claravox Dec 3, 2024
9132eb6
Rename keyword even more
claravox Dec 3, 2024
45bb675
YDA-5059: Add keyword selector ui tests
claravox Dec 11, 2024
69cee11
YDA-5059: Support tree keywords in landingpages and datacite
claravox Dec 13, 2024
dc9e198
Switch subject to lowercase to match datacite json
claravox Dec 16, 2024
8081dd0
Fix landing page json for tag
claravox Dec 16, 2024
bc25105
Rename Hierarchical to Tree for keyword
claravox Dec 16, 2024
473a347
Fix typo
claravox Dec 16, 2024
45ad544
Merge branch 'development' into epos-msl
lwesterhof Dec 18, 2024
9a154ad
Merge branch 'epos-msl' of github.com:UtrechtUniversity/irods-ruleset…
lwesterhof Dec 18, 2024
feceedb
Merge branch 'development' into epos-msl
Jan 6, 2025
7d71dc9
Add minItems to Epos metadata schema
claravox Jan 10, 2025
2bb5f6d
Remove schemeUri
claravox Jan 17, 2025
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
36 changes: 28 additions & 8 deletions schemas/epos-msl-0/metadata.json
Original file line number Diff line number Diff line change
Expand Up @@ -300,7 +300,9 @@
"Analogue modelling of geologic processes",
"Paleomagnetic and magnetic data",
"Rock and melt physical properties",
"Analytical and microscopy data"
"Microscopy and tomography data",
"Geochemistry",
"Geo-energy test beds"
]
},
"optionsLicense": {
Expand Down Expand Up @@ -839,7 +841,7 @@
"Version",
"Language",
"Collected",
"Keyword",
"HierarchicalKeyword",
"Retention_Period",
"Data_Type",
"Data_Classification",
Expand Down Expand Up @@ -995,14 +997,32 @@
}
}
},
"Keyword": {
"title": "Keywords",
"HierarchicalKeyword": {
"type": "array",
"minItems": 1,
claravox marked this conversation as resolved.
Show resolved Hide resolved
"additionalProperties": false,
"title": "Keywords",
"items": {
"$ref": "#/definitions/stringNormal",
"title": "Keyword",
"default": null
"type": "object",
"additionalProperties": false,
"properties": {
"Subject": {
"$ref": "#/definitions/stringNormal",
"title": "Keyword name"
},
"subjectScheme": {
"$ref": "#/definitions/stringNormal",
"title": "Name of the subject scheme"
},
"schemeURI": {
"$ref": "#/definitions/stringNormal",
"title": "URI of the subject identifier scheme"
},
"valueURI": {
"$ref": "#/definitions/stringNormal",
"title": "URI of the subject term"
}
},
"required": ["Subject"]
}
},
"Related_Resource": {
Expand Down
12 changes: 8 additions & 4 deletions schemas/epos-msl-0/uischema.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,15 +37,19 @@
}
},
"GeoLocation": {
"ui:description": "Geographical location refers to a specific physical point on Earth. This is more precise than 'area' or 'place' often defined by a set of latitude and longitude coordinates.",
"ui:description": "Sample location: the location of the outcrop/quarry/borehole/other from which the sample(s) used in your study were taken originally. Please do not add a location of a shop, repository or other facility that temporarily stores samples. Model location: include only if a model you publish refers to a specific location on Earth.",
"items": {
"geoLocationBox": {
"ui:field": "geo"
}
}
},
"Keyword": {
"ui:description": "Free text field for adding (searchable) keywords to your data package"
"HierarchicalKeyword": {
"ui:description": "Adding (searchable) keywords to your data package.",
"ui:field": "hierarchical_keyword_selector",
"ui:data": "https://raw.githubusercontent.com/UtrechtUniversity/msl_vocabularies/refs/heads/main/vocabularies/combined/editor/1.3/editor_1-3.json",
lwesterhof marked this conversation as resolved.
Show resolved Hide resolved
"ui:subjectScheme": "EPOS MSL",
"ui:schemeURI": "https://github.com/UtrechtUniversity/msl_vocabularies"
lwesterhof marked this conversation as resolved.
Show resolved Hide resolved
},
"Related_Resource": {
"items": {
Expand Down Expand Up @@ -87,7 +91,7 @@
"ui:help": "How is your data classified with regard to information security policy"
},
"Creator": {
"ui:description": "The person(s) who created (a version of) the data package.",
"ui:description": "The main researchers involved in producing the data or model, and/or the authors of the publication, in priority order. To supply multiple creators/authors (adviced), please repeat this property (plus sign top-richt corner).",
"items": {
"Name": {
"Given_Name": {
Expand Down
26 changes: 24 additions & 2 deletions tests/features/ui/ui_meta.feature
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,9 @@ Feature: Meta UI
Given user researcher is authenticated
And collection /tempZone/home/research-initial exists
And collection /tempZone/home/research-initial/folder space exists
And collection /tempZone/home/research-epos-msl-0 exists
And /tempZone/home/research-initial is unlocked
And /tempZone/home/research-epos-msl-0 is unlocked


Scenario Outline: Save metadata
Expand Down Expand Up @@ -36,6 +38,25 @@ Feature: Meta UI
| research-initial/folder space | research-initial | folder space |


Scenario Outline: Save hierarchical keywords
Given user researcher is logged in
And module "research" is shown
When user browses to folder <folder>
And user opens metadata form
# EPOS keyword
And user selects keyword "decane"
# user-defined keyword
And user selects keyword "totally custom keyword!42"
And user clicks save button
Then metadata form is saved as yoda-metadata.json for folder <folder>
When user clears keyword selector
And user clicks save button

Examples:
| folder |
| research-epos-msl-0 |


Scenario Outline: Delete metadata
Given user researcher is logged in
And module "research" is shown
Expand All @@ -45,8 +66,9 @@ Feature: Meta UI
Then metadata is deleted from folder

Examples:
| folder |
| research-initial |
| folder |
| research-initial |
| research-epos-msl-0 |


Scenario Outline: Check person identifier functionality in metadata form
Expand Down
14 changes: 14 additions & 0 deletions tests/step_defs/ui/test_ui_meta.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
then,
when,
)
from selenium.webdriver.common.keys import Keys

scenarios('../../features/ui/ui_meta.feature')

Expand All @@ -31,6 +32,19 @@ def ui_metadata_fill(browser):
input.fill('The quick brown fox jumps over the lazy dog')


@when(parsers.parse('user selects keyword "{keyword}"'))
def ui_metadata_select_keyword(browser, keyword):
browser.find_by_css('.ant-select').click()
active_web_el = browser.switch_to.active_element
active_web_el.send_keys(keyword)
active_web_el.send_keys(Keys.ENTER)


@when('user clears keyword selector')
def ui_metadata_clear_hierarchal_keywords(browser):
browser.find_by_css('.ant-select-clear').click()


@when('users checks person identifier field in metadata form')
def ui_metadata_check_person_id_field(browser):
# Find the fieldset for the first 'Person identifier'.
Expand Down
Loading
Loading