-
Notifications
You must be signed in to change notification settings - Fork 1
Test Cases Meta Data
Meta Data for the Test Cases (eg "Regular Waves", "Facility") is hard coded in the application.
With regards to the taxonomy, it hasn't all been implemented yet because there would just be a long list of meta data with [0] next to it on the search page (to show there are no test cases with that meta data yet).
With regards to the facility eg COAST, there is consideration to making this flexible so that users can add new facilities, but for now it's hardcoded see issue 75.
If a new Test Case is to be added which requires meta data from the taxonomy not yet added, or a new facility needs to be added, add to the test case schema. This was done in issue 78 and this commit but is repeated here in an example for clarity and deployment details.
Add "Breaking Waves" to "Dynamics of Fluids" and "Flexible Structures" to "Structures, Devices and Obstacles"
File to be changed: https://github.com/CCP-WSI/research-software-directory/blob/master/backend/schemas/testcase.json
Add "breaking waves" to the "technologies" variable:
"technologies": {
"items": {
"enum": [
"Focused/Design Waves",
"Regular Waves",
"Irregular Waves",
"Breaking Waves",
"Sloshing",
"Nonlinearities",
"Aeration/compressibility"
],
"type": "string"
},
"type": "array",
"uniqueItems": true
},
Add "flexible structures" to "topics":
"topics": {
"items": {
"enum": [
"Floating Structures",
"Fixed Structures",
"Flexible Structures",
"Coastal Structures",
"Offshore Structures"
],
"type": "string"
},
"type": "array",
"uniqueItems": true
},
"technologies" will in due course be changed to "fluids", and "topics" to "structures" see issue 34
Deploy change:
From the root rsd directory:
Rebuild backend
:
docker-compose rm backend
docker-compose build backend
docker-compose up -d backend
Restart admin
(as the change in the backend needs to be recognised by the admin page)
docker-compose up -d admin