oda-hub / frontend-tab-generator

0 stars 0 forks source link

Default parameters not passed for some entries #21

Closed ferrigno closed 4 months ago

ferrigno commented 5 months ago

T1='2022-10-22T05:18:22' # http://odahub.io/ontology#StartTime T2='2022-10-22T23:10:16' # http://odahub.io/ontology#EndTime src_name="Her X-1" # http://odahub.io/ontology#AstrophysicalObject RA=0. # http://odahub.io/ontology#PointOfInterestRA DEC=0. # http://odahub.io/ontology#PointOfInterestDEC

These parameters are not shown with the default values that is in the notebook. Is it expected ?

https://gitlab.renkulab.io/astronomy/mmoda/ibis-isgri-spectrum

dsavchenko commented 5 months ago

"Source query" parameters are different from others and have some restrictions.

  1. Defaults are the same for the entire instrument, regardless of the product name. So if there are several notebooks in a repo, defaults are taken from one of them only. 1.5. Moreover, if e.g. time bounds are used in every notebook, but not coordinates, defaults for coordinates and times may come from different notebooks. (This is the only point which may be addressed comparably easy).
  2. Default values are not shown in the frontend. This is done intentionally, we don't want tab switching to affect upper panel (to easily get results for the same source with different instruments)
  3. But you can see default values in dispatcher response (through oda_api, for example)
ferrigno commented 5 months ago

Thanks for the explanations.

dsavchenko commented 5 months ago
  • The variable name with underscores is ugly, is there a way to specify a dctionary as {'var_name': 'Pretty Variable Name'} ?

There is an issue to add annotations for parameter labels https://github.com/oda-hub/dispatcher-plugin-nb2workflow/issues/53 but it's not implemented for MMODA, it requires a change in dispatcher. (But the annotation term is used for galaxy tool generation, so you can use it already for the future http://odahub.io/ontology#label)

Is there a way to order the appearance of parameters?

There is no way to do it. I'm not even sure how does the order form. Need to explore.

Do you know why boolean parameters do not take a default value? (they are not present in all notebooks)

I don't know for a moment. Created an issue https://github.com/oda-hub/frontend-tab-generator/issues/24, will explore

ferrigno commented 5 months ago

Thanks. Could you point to an example of this label annotation ?

dsavchenko commented 4 months ago

See pixsize parameter annotation here Note the whitespace before ;, it's required!