From 2c6706e09fbfa59ef5068af635fb7ebe5bea5159 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gwendolyn=20O=2E=20D=C3=B6bel?= <81755070+GwennyGit@users.noreply.github.com> Date: Mon, 11 Nov 2024 15:07:16 +0100 Subject: [PATCH 1/2] Updated regexes to raw strings --- src/refinegems/utility/databases.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/refinegems/utility/databases.py b/src/refinegems/utility/databases.py index 6d33722..8eec169 100644 --- a/src/refinegems/utility/databases.py +++ b/src/refinegems/utility/databases.py @@ -114,9 +114,9 @@ def is_valid_database(db_cursor: sqlite3.Cursor) -> int: db_cursor.execute("SELECT name FROM sqlite_master WHERE type='table';") tables = [string[0] for string in db_cursor.fetchall()] - bigg_tables_contained = len([s for s in tables if re.match('^bigg_(?!to)(.*?)', s, re.IGNORECASE)]) == 2 - sbo_tables_contained = len([s for s in tables if re.match('(.*?)_sbo$', s, re.IGNORECASE)]) == 2 - media_tables_contained = len([s for s in tables if re.match('^medium(.*?)|^substance(.*?)|^subset(.*?)', s, re.IGNORECASE)]) == 6 + bigg_tables_contained = len([s for s in tables if re.match(r'^bigg_(?!to)(.*?)', s, re.IGNORECASE)]) == 2 + sbo_tables_contained = len([s for s in tables if re.match(r'(.*?)_sbo$', s, re.IGNORECASE)]) == 2 + media_tables_contained = len([s for s in tables if re.match(r'^medium(.*?)|^substance(.*?)|^subset(.*?)', s, re.IGNORECASE)]) == 6 sbo_media_tables_contained = sbo_tables_contained and media_tables_contained # These can only occur together modelseed_cmpd_tbl_contained = len([s for s in tables if s == 'modelseed_compounds']) == 1 From f28bba081ae3ab1350eb0a972130d65f9f860ce9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gwendolyn=20O=2E=20D=C3=B6bel?= <81755070+GwennyGit@users.noreply.github.com> Date: Mon, 11 Nov 2024 15:12:07 +0100 Subject: [PATCH 2/2] Removed deprecated dsplay_version flag from conf.py --- docs/source/conf.py | 1 - 1 file changed, 1 deletion(-) diff --git a/docs/source/conf.py b/docs/source/conf.py index 6778a3c..ec42dc1 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -82,7 +82,6 @@ html_logo = str(Path('images','refineGEMs_logo.png')) html_theme_options = { 'logo_only': True, - 'display_version': False, 'flyout_display': 'attached' }