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

Add SemanticArtefactCatalog for the mod-api implementation #184

Open
6 of 7 tasks
Tracked by #666
imadbourouche opened this issue Jan 30, 2025 · 6 comments
Open
6 of 7 tasks
Tracked by #666

Add SemanticArtefactCatalog for the mod-api implementation #184

imadbourouche opened this issue Jan 30, 2025 · 6 comments
Assignees

Comments

@imadbourouche
Copy link
Member

imadbourouche commented Jan 30, 2025

Context

We need to implement a model to define the SemanticArtefactCatalog that will represent the catalog and the portal configurations.

Requirements

  • This model will be the main model for the / route.
  • The attributes should be as defined in the MOD3.0.
  • The model should be persisted in the triple store and we should be able to update it
  • The attributes should had default values that we define them in a yaml file
  • Ability to edit the attributes and save the new values in the triple store (not the computed one)
  • Remove the config file that we are using now
  • Ability to edit the portal configurations from a dedicated interface in the admin page

References

@jonquet
Copy link

jonquet commented Jan 30, 2025

Maybe also mention the elements discussed related to :

  • default values (via YAML)
  • replacement of the config file(s)
  • automatic population of some of those values
  • edition page in the admin page with some fields (the one computed) not editable

@syphax-bouazzouni
Copy link

syphax-bouazzouni commented Feb 17, 2025

This need to be done before merging, #183 (comment)

@imadbourouche
Copy link
Member Author

imadbourouche commented Feb 18, 2025

This need to be done before merging, #183 (comment)

done here: e7a0e8f

@syphax-bouazzouni
Copy link

This need to be done before merging, #183 (comment)

done here: e7a0e8f

@imadbourouche ,the code you added, do the sum of all the metrics, not only the latest submission of each ontology metrics.
And do a PR not a commit.

@imadbourouche
Copy link
Member Author

This need to be done before merging, #183 (comment)

done here: e7a0e8f

@imadbourouche ,the code you added, do the sum of all the metrics, not only the latest submission of each ontology metrics. And do a PR not a commit.

@syphax-bouazzouni , but this will give wrong metrics no ? for example numberOfClasses will be more even the number of classes is the same in all submissions, so if submissions in ontology has number of classes is 30 and we have 3 submissions, if we do the sum of all submissions we will have 90 classes which are in fact just 30 or i'm wrong ?

@syphax-bouazzouni
Copy link

This need to be done before merging, #183 (comment)

done here: e7a0e8f

@imadbourouche ,the code you added, do the sum of all the metrics, not only the latest submission of each ontology metrics. And do a PR not a commit.

@syphax-bouazzouni , but this will give wrong metrics no ? for example numberOfClasses will be more even the number of classes is the same in all submissions, so if submissions in ontology has number of classes is 30 and we have 3 submissions, if we do the sum of all submissions we will have 90 classes which are in fact just 30 or i'm wrong ?

@imadbourouche exactly, but your code is doing the inverse,

When you do LinkedData::Models::Metric.where.include(:classes).all,
you will get the full list of all metrics, see example bellow, the ontology AFEO appears more then one time. You need to filter it to have only one record of metric for AFEO in the list,

[...
#<LinkedData::Models::Metric:0x00007f304ac9a690
  @aggregates=nil,
  @classes=37,
  @id=#<RDF::URI:0x852a0 URI:http://data.bioontology.org/ontologies/AFEO/submissions/1/metrics>,
  @loaded_attributes=#<Set: {:classes}>,
  @modified_attributes=#<Set: {}>,
  @persistent=true,
  @previous_values=nil,
  @unmapped=nil>,
 #<LinkedData::Models::Metric:0x00007f304abbc700
  @aggregates=nil,
  @classes=68,
  @id=#<RDF::URI:0x852b4 URI:http://data.bioontology.org/ontologies/AFEO/submissions/11/metrics>,
  @loaded_attributes=#<Set: {:classes}>,
  @modified_attributes=#<Set: {}>,
  @persistent=true,
  @previous_values=nil,
  @unmapped=nil>,
 #<LinkedData::Models::Metric:0x00007f304ad780f8
  @aggregates=nil,
  @classes=145,
  @id=#<RDF::URI:0x852c8 URI:http://data.bioontology.org/ontologies/AFEO/submissions/12/metrics>,
  @loaded_attributes=#<Set: {:classes}>,
  @modified_attributes=#<Set: {}>,
  @persistent=true,
  @previous_values=nil, 
...]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants