From dfcf87e5a56a05f24cb908c5dd9a49c691c7fd82 Mon Sep 17 00:00:00 2001 From: mathieulemieux Date: Mon, 2 Feb 2026 13:39:44 -0800 Subject: [PATCH 1/7] Add login demo warning in GraphKBConnection --- pori_python/graphkb/util.py | 1 + 1 file changed, 1 insertion(+) diff --git a/pori_python/graphkb/util.py b/pori_python/graphkb/util.py index bbc6776..7061888 100644 --- a/pori_python/graphkb/util.py +++ b/pori_python/graphkb/util.py @@ -252,6 +252,7 @@ def login(self, username: str, password: str, pori_demo: bool = False) -> None: # KBDEV-1328. Alt. GraphKB login for GSC's PORI online demo if pori_demo or "pori-demo" in self.url: + logger.warning("login demo") self.login_demo() # use requests package directly to avoid recursion loop on login failure From 8a3d29dc904408cb7f506f1fe7f840a637a23876 Mon Sep 17 00:00:00 2001 From: mathieulemieux Date: Mon, 2 Feb 2026 13:41:06 -0800 Subject: [PATCH 2/7] Fix error msg typo in ipr_report() --- pori_python/ipr/main.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pori_python/ipr/main.py b/pori_python/ipr/main.py index 3194779..b55682b 100644 --- a/pori_python/ipr/main.py +++ b/pori_python/ipr/main.py @@ -502,7 +502,7 @@ def ipr_report( if include_ipr_variant_text: if not ipr_conn: - raise ValueError("ipr_url required to to include ipr variant text") + raise ValueError("ipr_url required to include ipr variant text") ipr_comments = get_ipr_analyst_comments( ipr_conn, gkb_matches, From 85168323cb36d4b00edd673f5f4d118b43c0b019 Mon Sep 17 00:00:00 2001 From: mathieulemieux Date: Tue, 3 Feb 2026 10:14:05 -0800 Subject: [PATCH 3/7] Add empty url check to GraphKBConnection --- pori_python/graphkb/util.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pori_python/graphkb/util.py b/pori_python/graphkb/util.py index 7061888..85bfa51 100644 --- a/pori_python/graphkb/util.py +++ b/pori_python/graphkb/util.py @@ -125,6 +125,10 @@ def __init__( if username and password: self.login(username=username, password=password) + # URL check + if not self.url: + raise ValueError("URL to a GraphKB API instance is required") + @property def load(self) -> Optional[float]: if self.first_request and self.last_request: From 02bb7c85a9a5eb0e1a33cb601d48d7d4d329e65e Mon Sep 17 00:00:00 2001 From: mathieulemieux Date: Tue, 3 Feb 2026 10:32:20 -0800 Subject: [PATCH 4/7] Update GraphKB connection in ipr_report() --- pori_python/ipr/main.py | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/pori_python/ipr/main.py b/pori_python/ipr/main.py index b55682b..14a84ca 100644 --- a/pori_python/ipr/main.py +++ b/pori_python/ipr/main.py @@ -419,16 +419,13 @@ def ipr_report( ) # GKB CONNECTION - if graphkb_url: - logger.info(f"connecting to graphkb: {graphkb_url}") - graphkb_conn = GraphKBConnection(graphkb_url) - else: - graphkb_conn = GraphKBConnection() - - gkb_user = graphkb_username if graphkb_username else username - gkb_pass = graphkb_password if graphkb_password else password + graphkb_conn = GraphKBConnection(graphkb_url) if graphkb_url else GraphKBConnection() + logger.info(f"connecting to graphkb: {graphkb_conn.url}") - graphkb_conn.login(gkb_user, gkb_pass) + graphkb_conn.login( + graphkb_username if graphkb_username else username, + graphkb_password if graphkb_password else password, + ) # DISEASE # Disease term from bioapps; expected OncoTree term From e667d5e41a569f0db515d28303e9aba2f15d79c4 Mon Sep 17 00:00:00 2001 From: mathieulemieux Date: Tue, 3 Feb 2026 10:44:00 -0800 Subject: [PATCH 5/7] Black linting --- pori_python/ipr/main.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pori_python/ipr/main.py b/pori_python/ipr/main.py index 14a84ca..3a44a6d 100644 --- a/pori_python/ipr/main.py +++ b/pori_python/ipr/main.py @@ -419,7 +419,7 @@ def ipr_report( ) # GKB CONNECTION - graphkb_conn = GraphKBConnection(graphkb_url) if graphkb_url else GraphKBConnection() + graphkb_conn = GraphKBConnection(graphkb_url) if graphkb_url else GraphKBConnection() logger.info(f"connecting to graphkb: {graphkb_conn.url}") graphkb_conn.login( From 318f6b02875931d3ca19ff227d042521cc503a5c Mon Sep 17 00:00:00 2001 From: mathieulemieux Date: Tue, 3 Feb 2026 11:53:35 -0800 Subject: [PATCH 6/7] Set black to v25.11.0 --- .github/workflows/quick-pytest.yml | 2 +- setup.cfg | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/quick-pytest.yml b/.github/workflows/quick-pytest.yml index 9c5318a..867b5e5 100644 --- a/.github/workflows/quick-pytest.yml +++ b/.github/workflows/quick-pytest.yml @@ -32,7 +32,7 @@ jobs: flake8 pori_python --count --select=E9,F63,F7,F82 --show-source --statistics - name: Check with black run: | - pip install black + pip install black==25.11.0 black --check -S -l 100 pori_python tests - name: Short Tests with pytest run: pytest --junitxml=junit/test-results-${{ matrix.python-version }}.xml --cov ipr --cov-report term --cov-report xml diff --git a/setup.cfg b/setup.cfg index e466a48..b5d3df0 100644 --- a/setup.cfg +++ b/setup.cfg @@ -54,7 +54,7 @@ dev = mkdocs-redirects markdown-refdocs flake8 - black + black==25.11.0 # black >25.11 requires python >=3.10 flake8-annotations isort mypy From 01e64fa65dea36d146e7ee675af4ffae1c43abf8 Mon Sep 17 00:00:00 2001 From: mathieulemieux Date: Tue, 3 Feb 2026 11:57:19 -0800 Subject: [PATCH 7/7] Set black to v25.11.0 in pytests.yml --- .github/workflows/pytest.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/pytest.yml b/.github/workflows/pytest.yml index 866a822..97bf7f4 100644 --- a/.github/workflows/pytest.yml +++ b/.github/workflows/pytest.yml @@ -35,7 +35,7 @@ jobs: flake8 pori_python --count --select=E9,F63,F7,F82 --show-source --statistics - name: Check with black run: | - pip install black + pip install black==25.11.0 black --check -S -l 100 pori_python tests - name: Full Tests with pytest run: |