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: implement ontology agents endpoint #84

Merged
merged 6 commits into from
Jul 23, 2024

Conversation

Copy link

codecov bot commented Jul 7, 2024

Codecov Report

Attention: Patch coverage is 92.85714% with 1 line in your changes missing coverage. Please review.

Project coverage is 71.68%. Comparing base (85617ad) to head (e67914c).
Report is 15 commits behind head on development.

Files Patch % Lines
controllers/agents_controller.rb 92.85% 1 Missing ⚠️
Additional details and impacted files
@@               Coverage Diff               @@
##           development      #84      +/-   ##
===============================================
+ Coverage        71.26%   71.68%   +0.41%     
===============================================
  Files               67       67              
  Lines             3508     3662     +154     
===============================================
+ Hits              2500     2625     +125     
- Misses            1008     1037      +29     
Flag Coverage Δ
unittests 71.68% <92.85%> (+0.41%) ⬆️

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
Author

@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.

Require to add the tests form @Bilelkihal before merging.

@@ -1,5 +1,24 @@
class AgentsController < ApplicationController

# Ontology agents
Copy link
Author

Choose a reason for hiding this comment

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

remove the comment

…agents' that contains all the agents of the ontology using agents_attrs list
Copy link
Author

@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.

Added some change requests for the implemeted test

test/controllers/test_ontologies_controller.rb Outdated Show resolved Hide resolved
ontologies_and_submissions = create_ontologies_and_submissions(ont_count: 1, submission_count: 1, process_submission: true)
submission = ontologies_and_submissions[2].first.submissions.last
ontology_acronym = ontologies_and_submissions[1].first
submission.bring(*OntologySubmission.agents_attrs)
Copy link
Author

Choose a reason for hiding this comment

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

do instead submission.bring_remaining

Copy link
Collaborator

Choose a reason for hiding this comment

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

Why? (we need only agent attributes in this endpoint)

@@ -282,11 +282,100 @@ def test_detach_a_view
assert_equal onto["viewOf"], ont.id.to_s
end

def test_ontology_agents
ontologies_and_submissions = create_ontologies_and_submissions(ont_count: 1, submission_count: 1, process_submission: true)
Copy link
Author

Choose a reason for hiding this comment

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

do process_submission: false, so that the tests is faster.

Copy link
Collaborator

Choose a reason for hiding this comment

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

When I do process submission false I get this error:
image

test/controllers/test_ontologies_controller.rb Outdated Show resolved Hide resolved
@Bilelkihal
Copy link
Collaborator

Done ✅

@syphax-bouazzouni syphax-bouazzouni merged commit 67bc9fb into development Jul 23, 2024
26 checks passed
syphax-bouazzouni added a commit that referenced this pull request Aug 8, 2024
* Feature: mappings statistics slices support (#78)

* restrict mapping statistics ontologies to the ontologies of the current slice

* add a test for the mappings slices support

* add test for mappings statistics slices support

* update owl wrapper version to v1.4.3

* update test search multilingual test to ensure selecting one prefLabel

* add filter search results attributes by language

* add search  multiple languages or all languages tests

* implement display search results in multiple languages

* fix annotator prefLabel language selection

* fix: remove duplicated agents endpoint ('/Agents') (#85)

* Feature: implement ontology agents endpoint (#84)

* implement ontology agents endpoint

* Move ontology agents method out of agents namespace in agents_controller

* return a list of uniq values, for the endpoint '/ontologies/:acronym/agents' that contains all the agents of the ontology using agents_attrs list

* test for ontology agents endpoing

* add another ontologyin test ontology agents test, and assert only the number of results and the names

---------

Co-authored-by: Bilel KIHAL <kb_kihal@esi.dz>

* update API deploy CI  to SSH jump host and get configs from private repo

* update deploy files and add agroportal, stage and test environments

* Feature: update agents search endpoint to add option to have a custom qf paramter  (#90)

* fix agents search sensibility

* improve agents search endpoint to search only exact string or substring match

* make the agent search endpoint query filter configurable

---------

Co-authored-by: Syphax <gs_bouazzouni@esi.dz>

* Fix: hide duplicated agents endpoint ('/Agents')  (#91)

* remove duplicated agents endpoint ('/Agents')

* put again the Agents endpoint

* hide Agents endpoint in the home endpoint

* fix properties tests

---------

Co-authored-by: Bilel KIHAL <kb_kihal@esi.dz>

---------

Co-authored-by: Bilel Kihal <61744974+Bilelkihal@users.noreply.github.com>
Co-authored-by: Bilel KIHAL <kb_kihal@esi.dz>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants