Skip to content

Commit

Permalink
Fix dump function
Browse files Browse the repository at this point in the history
  • Loading branch information
gromdimon committed Sep 24, 2024
1 parent 8405d8f commit 57470bc
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
3 changes: 0 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,3 @@ jupyterlab:
dump-openapi:
pipenv run python -c 'from src.utils import dump_openapi_yaml; dump_openapi_yaml("openapi.yaml")'

.PHONY: ci-dump-openapi
ci-dump-openapi:
pipenv run python -c 'from src.utils import dump_openapi_yaml; dump_openapi_yaml("tmp/openapi.yaml")'
5 changes: 3 additions & 2 deletions src/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@

import yaml
from biocommons.seqrepo import SeqRepo
from fastapi import FastAPI
from loguru import logger

from lib.maxentpy import maxent
Expand Down Expand Up @@ -599,7 +598,9 @@ def _choose_transcript(
return transcripts_mapping[max_length_transcript]


def dump_openapi_yaml(app: FastAPI, path_out: str):
def dump_openapi_yaml(path_out: str):
"""Dump OpenAPI YAML file"""
from src.main import app

with open(path_out, "wt") as f:
yaml.dump(app.openapi(), f)

0 comments on commit 57470bc

Please sign in to comment.