Comments (10)
Once clarity-h2020/csis#101 has been implemented, we need to include study_variant, time_period, emission_scenario and event_frequency
in the csisHelpers.studyInfo
JS Object.
from csis-helpers-module.
Not sure if this changed lately, but the study_presets contain wrong values: e.g. instead of "scenario:historial" EMIKAT expects "Baseline" as value for emissions_scenario:
Here is documented what is expected by the table and map applications.
from csis-helpers-module.
O.K., I tried to revolve this in branch feature/010-extend-entityinfo by accessing field_var_value
instead of field_var_meaning
, but this didn't work:
The website encountered an unexpected error. Please try again later.</br></br><em class="placeholder">InvalidArgumentException</em>: Field field_var_value is unknown. in <em class="placeholder">Drupal\Core\Entity\ContentEntityBase->getTranslatedField()</em> (line <em class="placeholder">587</em> of <em class="placeholder">core/lib/Drupal/Core/Entity/ContentEntityBase.php</em>).
from csis-helpers-module.
Another thing we need in 'study_info' is 'field_eea_city_profile_name' from the Cities/Regions Taxonomy. Maybe @patrickkaleta can add this, too?
from csis-helpers-module.
Do you mean the "scenario:historical" and such?
If yes, this is a very simple thing to fix. Or at least to work around until we do something better. Let me explain:
We have two taxonomies governing the issue at hand: "DP variable meanings" and "DP variables"
DP variables is used in the ressource tags, whereas the DP variables meanings is used in study to indicate which combinations the user wants. Why two and not one? Because EMIKAT uses the "Baseline" where our hazard packages use the "historical" and we need some way to map this to one other.
Thus, the workaround is simply to replace the value of "meaning ID" variable in DP variables meanings taxonomy so that it's the same as the "variable value" in DP variables. I'll do this now and then your applications will get what they need.
TODO later
One day when we start doing this for non-emikat resources, we'll have to deal with the issue of synonyms. In one way or another, the helpers modules wil lhave to signal that emission scenario can be either "Baseline" or "historical" and the apps will ahve to parse the resource tags to find out which of the two these resources can understand. The alternative woudl be to hard-code such knowledge somewhere - I don't like that idea.
Resolving this is a pre-requisite for clarity-h2020/data-package#47
from csis-helpers-module.
OK, I have finished setting the "meaning ID" values. If there is any error left, you can fix it here: https://csis.myclimateservice.eu/admin/structure/taxonomy/manage/dp_variable_meanings/overview
This said, the titles of the "dp variable meaning" taxonomy terms are meant to be used as labels on CSIS UI. So they should probably also be exposed by csis helpers.
from csis-helpers-module.
O.K., I tried to revolve this in branch feature/010-extend-entityinfo by accessing
field_var_value
instead offield_var_meaning
, but this didn't work:
The website encountered an unexpected error. Please try again later.</br></br><em class="placeholder">InvalidArgumentException</em>: Field field_var_value is unknown. in <em class="placeholder">Drupal\Core\Entity\ContentEntityBase->getTranslatedField()</em> (line <em class="placeholder">587</em> of <em class="placeholder">core/lib/Drupal/Core/Entity/ContentEntityBase.php</em>).
@p-a-s-c-a-l
As explained by Denis, there are two taxonomies at play here and you were trying to access the field of one taxonomy in the second taxonomy, where it's not present... and Drupal doesn't like things like that.
Denis already finished his workaround, so you should now get the wished results. I will revert the changes in feature/010-extend-entityinfo.
Another thing we need in 'study_info' is 'field_eea_city_profile_name' from the Cities/Regions Taxonomy. Maybe @patrickkaleta can add this, too?
That field was added to the studyInfo object already a while ago. It's called eea_city_name
, but I can rename it to eea_city_profile_name
if you like.
from csis-helpers-module.
but I can rename it to
eea_city_profile_name
if you like.
no it's o.k. Thanks.
regarding the variables / taxonomies / taxonomy mappings / meanings / .... : we shouldn't overcomplicate things. lets keep it simple and move on.
from csis-helpers-module.
I wonder what is the status of this ticket now?
In principle we have all we need at the moment. So maybe it's done?
We also know that more will be needed later, see #14 (comment). So is it on hold then?
from csis-helpers-module.
It's done. We open a new issue if we need more.
from csis-helpers-module.
Related Issues (20)
- Include additional info in $entityinfo HOT 20
- Explain what the module does HOT 1
- Emikat Trigger specifications HOT 4
- Include iFrames in Report HOT 17
- A wrong parameter name is used HOT 2
- Hide edit buttons if user permissions are not sufficient HOT 1
- Calculation in progress/finished indication HOT 7
- Creating automated tests for Integration with Emikat HOT 1
- Transport Module (TM) trigger specifications HOT 5
- Cannot read property 'step' of undefined HOT 1
- Include in Report button: use jpeg instead of png images
- Support for extended iFrame query parameters HOT 1
- Add boolean field for Adaptation Project into $StudyInfo HOT 2
- Documentation HOT 1
- Get Node UUID HOT 2
- 404 Error message for Report image GET request via JSON:API HOT 1
- Theme Missing HOT 1
- Opening Edit-form as modal not working for links created by the module HOT 2
- Include In Report Button not working properly HOT 54
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from csis-helpers-module.