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

feat(openchallenges): create endpoint to search EDAM concepts #2622

Merged
merged 14 commits into from
Apr 10, 2024

Conversation

tschaffter
Copy link
Member

@tschaffter tschaffter commented Apr 9, 2024

Closes #2608

Description

Add endpoints to the Challenge Service to explore EDAM concepts.

This endpoint will be used by the OC web app to enable users to filter challenges using selected EDAM concepts. The filtering of challenges using EDAM concepts will be implemented in another PR to keep this PR lean.

cc: @rrchai

Changelog

  • add the endpoint /edamConcepts to the API description
  • add the endpoint /edamConcepts to the challenge service
  • enable full-text search on EDAM concepts
  • update the OC API client for Angular
  • allow access to the new endpoint in the API gateway

Notes

For the new endpoint to be accessible via the API gateway, its config must be updated. See #2636.

Preview

List EDAM concepts:

GET {{basePath}}/edamConcepts
HTTP/1.1 200 

{
  "number": 0,
  "size": 100,
  "totalElements": 3473,
  "totalPages": 35,
  "hasNext": true,
  "hasPrevious": false,
  "edamConcepts": [
    {
      "id": 7,
      "classId": "http://edamontology.org/data_0831",
      "preferredLabel": "MeSH vocabulary"
    },
    {
      "id": 19,
      "classId": "http://edamontology.org/data_0851",
      "preferredLabel": "Sequence mask character"
    },

List the EDAM concepts that match the space-separated search terms "sequence":

GET {{basePath}}/edamConcepts?searchTerms=sequence
HTTP/1.1 200 

{
  "number": 0,
  "size": 100,
  "totalElements": 362,
  "totalPages": 4,
  "hasNext": true,
  "hasPrevious": false,
  "edamConcepts": [
    {
      "id": 805,
      "classId": "http://edamontology.org/data_2044",
      "preferredLabel": "Sequence"
    },
    {
      "id": 18,
      "classId": "http://edamontology.org/data_0850",
      "preferredLabel": "Sequence set"
    },
    {
      "id": 3073,
      "classId": "http://edamontology.org/topic_0158",
      "preferredLabel": "Sequence motifs"
    },

How to test

  1. Remove all Docker artifacts: workspace-docker-stop && docker system prune -a
  2. Build the OC images: openchallenges-build-images
  3. Start the challenge service and its dependencies: nx serve-detach openchallenges-challenge-service
  4. Try the EDAM example queries defined in apps/openchallenges/challenge-service/requests.http

@tschaffter
Copy link
Member Author

I need to fix 9 issues identified by Sonar for the challenge service.

@tschaffter tschaffter marked this pull request as ready for review April 9, 2024 22:37
Copy link
Contributor

@rrchai rrchai left a comment

Choose a reason for hiding this comment

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

Tested and LGTM!

@tschaffter tschaffter merged commit d503473 into Sage-Bionetworks:main Apr 10, 2024
14 checks passed
@tschaffter tschaffter deleted the create-edam-endpoints branch April 10, 2024 14:01
Copy link

Quality Gate Passed Quality Gate passed for 'openchallenges-app'

Issues
0 New issues
0 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
No data about Duplication

See analysis details on SonarCloud

Copy link

Quality Gate Passed Quality Gate passed for 'openchallenges-challenge-service'

Issues
0 New issues
0 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
No data about Duplication

See analysis details on SonarCloud

Copy link

Quality Gate Passed Quality Gate passed for 'openchallenges-organization-service'

Issues
0 New issues
0 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
No data about Duplication

See analysis details on SonarCloud

Copy link

Quality Gate Passed Quality Gate passed for 'openchallenges-image-service'

Issues
0 New issues
0 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
No data about Duplication

See analysis details on SonarCloud

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.

[Feature] Create endpoint to search EDAM concepts
2 participants