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

Scope of genes call set to UBKG; proposed endpoints for proteins and genes #48

Merged
merged 12 commits into from
Nov 8, 2023

Conversation

AlanSimmons
Copy link
Contributor

  1. With the removal of calls to data from Cells API, the genes endpoint now has scope of UBKG--i.e., it returns all genes in UBKG, not just those relevant to HuBMAP.
  2. The SmartAPI specification YAML describes proposed endpoints for:
  • proteins
  • protein/{id}
  • celltypes
  • celltype/{id}

@AlanSimmons AlanSimmons requested a review from yuanzhou October 31, 2023 15:08
@AlanSimmons AlanSimmons self-assigned this Oct 31, 2023
@AlanSimmons AlanSimmons added documentation Improvements or additions to documentation enhancement New feature or request labels Oct 31, 2023
…ypes.yaml, field_entities.yaml, field_assays.yaml, and field_schemas.yaml in ingest-validation-tools.
…names of routes--i.e., genes and genes-info.
… Moved loadquerystring function into neo4j_logic.py.
…nd celltypes-info/celltypes endpoints. Updated YAML for new pagination object in *-info endpoints.
return make_response(f'There are no genes with HGNC symbols that start with \'{starts_with}\'.', 404)
genecount = genelist_count_get_logic(neo4j_instance, startswith)
if genecount == 0:
return make_response(f'There are no genes with HGNC symbols that start with \'{startswith}\'.', 404)

Check warning

Code scanning / CodeQL

Reflected server-side cross-site scripting

Cross-site scripting vulnerability due to a [user-provided value](1).
@yuanzhou yuanzhou changed the base branch from main to dev-integrate November 8, 2023 16:26
@yuanzhou
Copy link
Contributor

yuanzhou commented Nov 8, 2023

Updated change log:

  • Refactored routes and controllers to genes-info and genes
  • Repackaged pagination information into a Pagination class.
  • Refactored for locations of utility scripts, such as neo4j_logic.py and cellsclient.py
  • Updated YAML for new pagination object.
  • Updated test script.

Copy link
Contributor

@yuanzhou yuanzhou left a comment

Choose a reason for hiding this comment

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

@AlanSimmons two things to change:

  1. since you use underscore-separated fields (approved_name, approved_symbol ...) in the response json payload, we should also do the same with the pagination fields for consistency. Add underscore as a separator for the following fields:
    "itemcount": 43143,
    "itemsperpage": 10,
    "startswith": "",
    "totalpages": 4315
  1. To merge this PR, we'll also need to resolve the merge conflicts caused by hs-ontology-api-spec.yaml.

@AlanSimmons
Copy link
Contributor Author

I changed all references everywhere (parameters, returns, etc.) to use underscores--e.g., starts_with instead of startswith.

@AlanSimmons
Copy link
Contributor Author

Merge conflicts resolved in YAML file.

@yuanzhou yuanzhou force-pushed the jas_remove_cells_smart_api_for_all branch from af5383b to b1faaee Compare November 8, 2023 20:47
yuanzhou and others added 3 commits November 8, 2023 15:48
field-descriptions
field-types
field-entities
field-assays
field-schemas

Also changed underscores to dashes in route summary fields to reflect the names of the legacy YAML files.
@yuanzhou yuanzhou merged commit a79d901 into dev-integrate Nov 8, 2023
2 checks passed
@yuanzhou yuanzhou deleted the jas_remove_cells_smart_api_for_all branch November 10, 2023 16:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants