Skip to content

Commit

Permalink
store cache and sett Agg for matplotlib to prevent matplotlib windows…
Browse files Browse the repository at this point in the history
… opening
  • Loading branch information
stellaprins committed Nov 5, 2024
1 parent ccf8305 commit 88ce0f4
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion BioModels/parse_biomodels.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@
sys.path.append("..")
import utils

matplotlib.use('Agg') #prevent matplotlib from trying to open a window

API_URL: str = "https://www.ebi.ac.uk/biomodels"

out_format="json"
Expand Down Expand Up @@ -181,7 +183,7 @@ def main():

#caching is used to prevent the need to download the same responses from the remote server multiple times during testing
#mode="off" to disable caching, "store" to wipe and store fresh results, "reuse" to use the stored cache
cache = utils.RequestCache(mode="auto",direc="cache")
cache = utils.RequestCache(mode="store",direc="cache")

#accumulate results in columns defined by keys which correspond to the local variable names to be used below
#to allow automated loading into the columns
Expand Down

0 comments on commit 88ce0f4

Please sign in to comment.