Skip to content

Commit

Permalink
feat: command to dump OpenAPI schema
Browse files Browse the repository at this point in the history
  • Loading branch information
holtgrewe committed Aug 29, 2024
1 parent 23a9573 commit 7ca234b
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 35 deletions.
11 changes: 11 additions & 0 deletions cada_prio/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
import cattr
import click
import logzero
import yaml

try:
import optuna
Expand Down Expand Up @@ -140,6 +141,16 @@ def cli_dump_graph(
inspection.dump_graph(path_graph, path_hgnc_info, hgnc_to_entrez)


@cli_utils.command("dump-openapi-yaml")
@click.argument("path_out", type=str)
def cli_dump_openapi_yaml(path_out: str):
"""Dump OpenAPI YAML file"""
from cada_prio import rest_server

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


@cli.group("tune")
def cli_tune():
"""hyperparameter tuning"""
Expand Down
13 changes: 0 additions & 13 deletions requirements.txt

This file was deleted.

1 change: 1 addition & 0 deletions requirements.txt
1 change: 1 addition & 0 deletions requirements/base.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,4 @@ gensim >=4.3.2, <5.0
uvicorn >=0.23.2
fastapi >=0.103, <0.105
python-dotenv >=1.0, <2.0
pyyaml >=6.0, <7.0
2 changes: 0 additions & 2 deletions utils/terraform/.gitignore

This file was deleted.

19 changes: 0 additions & 19 deletions utils/terraform/main.tf

This file was deleted.

1 change: 0 additions & 1 deletion utils/terraform/provider.tf

This file was deleted.

0 comments on commit 7ca234b

Please sign in to comment.