Skip to content

Commit

Permalink
add release_date
Browse files Browse the repository at this point in the history
  • Loading branch information
bilalebi committed Jul 8, 2024
1 parent 7fb9dad commit b11e627
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 4 deletions.
11 changes: 8 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,16 @@ To install dependencies, run:
Rename example_connections.conf to connections.conf and update the config values accordingly.

This command will start the server:
```
uvicorn --workers 1 --host=0.0.0.0 graphql_service.server:APP
```

```uvicorn --workers 1 --host=0.0.0.0 graphql_service.server:APP```

To run a Uvicorn server with automatic reload for development purposes, you can use the --reload flag. This flag will make Uvicorn watch your code for changes and automatically restart the server when it detects any changes.
```
uvicorn --workers 1 --host 0.0.0.0 --reload graphql_service.server:APP
```

If you're developing in PyCharm, you will probably find it useful to create a run
Also, if you're developing in PyCharm, you will probably find it useful to create a run
configuration so that you can use the debugger. Create a run configuration that
looks like this:

Expand Down
1 change: 1 addition & 0 deletions common/schemas/genome.graphql
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ type Genome {
assembly_accession: String!
scientific_name: String!
release_number: Float!
release_date: String!
taxon_id: Int!
tol_id: String
parlance_name: String
Expand Down
3 changes: 2 additions & 1 deletion graphql_service/resolver/gene_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -751,6 +751,7 @@ def create_genome_response(genome, assembly_data=None):
"assembly_accession": genome.assembly.accession,
"scientific_name": genome.organism.scientific_name,
"release_number": genome.release.release_version,
"release_date": genome.release.release_date,
"taxon_id": genome.taxon.taxonomy_id,
"tol_id": genome.assembly.tol_id,
"parlance_name": genome.organism.scientific_parlance_name,
Expand Down Expand Up @@ -793,7 +794,7 @@ def fetch_and_combine_genome_data(info: GraphQLResolveInfo, genomes: List) -> Li

if not is_assembly_prensent:
# Don't bother getting the assembly data if it's not requested in the query
# TODO: See if this can be approved
# TODO: See if this can be improved
combined_results.append(create_genome_response(genome, None))
else:
assembly_data = fetch_assembly_data(
Expand Down

0 comments on commit b11e627

Please sign in to comment.