From 547a4fe24847e1e8e6ae82eb8b80a964576df449 Mon Sep 17 00:00:00 2001 From: karlnyr Date: Tue, 7 Jan 2025 11:36:14 +0100 Subject: [PATCH] bump version --- microSALT/__init__.py | 35 +++++++++-------------------------- 1 file changed, 9 insertions(+), 26 deletions(-) diff --git a/microSALT/__init__.py b/microSALT/__init__.py index 3472d3cb..9e49c4fb 100644 --- a/microSALT/__init__.py +++ b/microSALT/__init__.py @@ -10,7 +10,7 @@ from flask import Flask from distutils.sysconfig import get_python_lib -__version__ = "4.0.0" +__version__ = "4.1.0" app = Flask(__name__, template_folder="server/templates") app.config.setdefault("SQLALCHEMY_DATABASE_URI", "sqlite:///:memory:") @@ -51,16 +51,11 @@ app.config["folders"] = preset_config.get("folders", {}) # Ensure PubMLST configuration is included - app.config["pubmlst"] = preset_config.get("pubmlst", { - "client_id": "", - "client_secret": "" - }) + app.config["pubmlst"] = preset_config.get("pubmlst", {"client_id": "", "client_secret": ""}) # Add extrapaths to config preset_config["folders"]["expec"] = os.path.abspath( - os.path.join( - pathlib.Path(__file__).parent.parent, "unique_references/ExPEC.fsa" - ) + os.path.join(pathlib.Path(__file__).parent.parent, "unique_references/ExPEC.fsa") ) # Check if release install exists for entry in os.listdir(get_python_lib()): @@ -113,22 +108,14 @@ ): # Special string, mangling if thing == "log_file": - unmade_fldr = os.path.dirname( - preset_config[entry][thing] - ) - bash_cmd = "touch {}".format( - preset_config[entry][thing] - ) - proc = subprocess.Popen( - bash_cmd.split(), stdout=subprocess.PIPE - ) + unmade_fldr = os.path.dirname(preset_config[entry][thing]) + bash_cmd = "touch {}".format(preset_config[entry][thing]) + proc = subprocess.Popen(bash_cmd.split(), stdout=subprocess.PIPE) output, error = proc.communicate() elif thing == "SQLALCHEMY_DATABASE_URI": unmade_fldr = os.path.dirname(db_file) bash_cmd = "touch {}".format(db_file) - proc = subprocess.Popen( - bash_cmd.split(), stdout=subprocess.PIPE - ) + proc = subprocess.Popen(bash_cmd.split(), stdout=subprocess.PIPE) output, error = proc.communicate() if proc.returncode != 0: logger.error( @@ -141,12 +128,8 @@ os.makedirs(unmade_fldr) logger.info("Created path {}".format(unmade_fldr)) - fh = logging.FileHandler( - os.path.expanduser(preset_config["folders"]["log_file"]) - ) - fh.setFormatter( - logging.Formatter("%(asctime)s - %(name)s - %(levelname)s - %(message)s") - ) + fh = logging.FileHandler(os.path.expanduser(preset_config["folders"]["log_file"])) + fh.setFormatter(logging.Formatter("%(asctime)s - %(name)s - %(levelname)s - %(message)s")) logger.addHandler(fh) # Integrity check database