diff options
author | Frederick Muriuki Muriithi | 2023-10-06 10:42:05 +0300 |
---|---|---|
committer | Frederick Muriuki Muriithi | 2023-10-06 10:42:05 +0300 |
commit | d96c1b8806780174c737b186fb5757dcd2fccb66 (patch) | |
tree | 4ea05f331777ce954dac136232fbeda6380ad4c1 /gn3/api | |
parent | 6e628e075f53ced7a73fd1ba774d782d52e90df6 (diff) | |
download | genenetwork3-d96c1b8806780174c737b186fb5757dcd2fccb66.tar.gz |
Pass in configs/settings as function arguments
To avoid reliance of `flask.current_app.config` or on `gn3.settings` modules
globally, this commit passes in the appropriate configurations as arguments to
the relevant functions.
Diffstat (limited to 'gn3/api')
-rw-r--r-- | gn3/api/heatmaps.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/gn3/api/heatmaps.py b/gn3/api/heatmaps.py index 26c165f..1b04a95 100644 --- a/gn3/api/heatmaps.py +++ b/gn3/api/heatmaps.py @@ -31,7 +31,11 @@ def clustered_heatmaps(): traits_fullnames = [parse_trait_fullname(trait) for trait in traits_names] with io.StringIO() as io_str: - figure = build_heatmap(traits_fullnames, conn, vertical=vertical) + figure = build_heatmap(conn, + traits_fullnames, + current_app.config["GENOTYPE_FILES"], + vertical=vertical, + current_app.config["TMPDIR"]) figure.write_json(io_str) fig_json = io_str.getvalue() return fig_json, 200 |