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

Feature: Add SemanticArtefactCatalog model #183

Merged
merged 12 commits into from
Feb 17, 2025

Conversation

imadbourouche
Copy link
Member

@imadbourouche imadbourouche commented Jan 24, 2025

Context

What's new

This is the model that represent the portal and it's configurations

  • semantic_artefact_catalog.rb: is the main model that will define the attributes and the methods that the model need
  • semantic_artefact_catalog.yml: is the yaml file that defines the scheme of the model
  • The default values of the attributes will be brought from the yml file not the config file when we want to save the model for the first time in the triple store

References

@imadbourouche imadbourouche self-assigned this Jan 24, 2025
Copy link

codecov bot commented Jan 24, 2025

Codecov Report

Attention: Patch coverage is 78.16092% with 38 lines in your changes missing coverage. Please review.

Project coverage is 82.77%. Comparing base (a680ef1) to head (0336655).
Report is 13 commits behind head on development.

Files with missing lines Patch % Lines
...inked_data/models/mod/semantic_artefact_catalog.rb 78.16% 38 Missing ⚠️
Additional details and impacted files
@@               Coverage Diff               @@
##           development     #183      +/-   ##
===============================================
+ Coverage        82.44%   82.77%   +0.33%     
===============================================
  Files              103      106       +3     
  Lines             6834     7211     +377     
===============================================
+ Hits              5634     5969     +335     
- Misses            1200     1242      +42     
Flag Coverage Δ
unittests 82.77% <78.16%> (+0.33%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link

@syphax-bouazzouni syphax-bouazzouni left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

add link to resolved issue. and a description of the changes.

@syphax-bouazzouni syphax-bouazzouni force-pushed the development branch 4 times, most recently from bbd132c to 194fcfb Compare February 5, 2025 12:34
Copy link

@syphax-bouazzouni syphax-bouazzouni left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

tests are red

@imadbourouche imadbourouche requested review from syphax-bouazzouni and removed request for Bilelkihal February 14, 2025 14:23

def calculate_attr_from_metrics(attr)
attr_to_get = attr.to_sym
submissions = LinkedData::Models::OntologySubmission.where.include(OntologySubmission.goo_attrs_to_load([attr_to_get]))

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this code will be really slow, and sum all the submissions not only the latest.

why no just just do. LinkedData::Models::Metric.where.include(...things_you_want...).all it is faster, from that you need to filter the latest IDs only

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@imadbourouche can you open an issue about this, I merged the PR forgot I said this.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes i'll fix this in another pull request before closing the main issue for catalog

@syphax-bouazzouni syphax-bouazzouni merged commit f7498ac into development Feb 17, 2025
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants