Skip to content
This repository was archived by the owner on Jul 21, 2026. It is now read-only.

G3 733 fix null symbol 500 on geneset values cross species - #109

Merged
francastell merged 2 commits into
mainfrom
G3-733-fix-null-symbol-500-on-geneset-values-cross-species
Mar 12, 2026
Merged

G3 733 fix null symbol 500 on geneset values cross species#109
francastell merged 2 commits into
mainfrom
G3-733-fix-null-symbol-500-on-geneset-values-cross-species

Conversation

@francastell

Copy link
Copy Markdown
Collaborator

No description provided.

…ping

Genes with no matching ortholog were returned with ode_ref_id=None,
causing Pydantic serialization failures (500) on /values and silent
null symbol corruption on /{id} and /file endpoints.
…12.3

Unit tests cover filtering of null ode_ref_id entries in both
get_geneset_gene_values and get_geneset_w_gene_id_type, including
mixed and all-null scenarios. Also fixes pre-existing test that
relied on broken cross-species homolog mock behavior.
@github-actions

Copy link
Copy Markdown

Test Coverage Report

============================= test session starts ==============================
platform linux -- Python 3.11.14, pytest-8.3.5, pluggy-1.5.0
rootdir: /home/runner/work/geneweaver-api/geneweaver-api
configfile: pyproject.toml
plugins: asyncio-0.21.2, anyio-4.9.0, cov-4.1.0
asyncio: mode=Mode.STRICT
collected 364 items

tests/controllers/test_api_standards.py ................................ [  8%]
........................................................................ [ 28%]
.sssssssssssssssssssss                                                   [ 34%]
tests/controllers/test_genes.py .............                            [ 38%]
tests/controllers/test_genesets.py ..................................... [ 48%]
......................                                                   [ 54%]
tests/controllers/test_monitor.py .                                      [ 54%]
tests/controllers/test_publications.py ........                          [ 56%]
tests/controllers/test_return_schemas.py .                               [ 57%]
tests/controllers/test_search.py ..                                      [ 57%]
tests/controllers/test_species.py ....                                   [ 58%]
tests/core/test_security.py ..........                                   [ 61%]
tests/services/io/test_read_file_contents.py ...............             [ 65%]
tests/services/test_gene.py ..............                               [ 69%]
tests/services/test_genset.py .......................................... [ 81%]
.................................................                        [ 94%]
tests/services/test_monitors.py ..                                       [ 95%]
tests/services/test_ontology.py ....                                     [ 96%]
tests/services/test_publications.py .......                              [ 98%]
tests/services/test_species.py .......                                   [100%]

=============================== warnings summary ===============================
tests/data/__init__.py:10
  /home/runner/work/geneweaver-api/geneweaver-api/tests/data/__init__.py:10: DeprecationWarning: read_text is deprecated. Use files() instead. Refer to https://importlib-resources.readthedocs.io/en/latest/using.html#migrating-from-legacy for migration advice.
    geneset_response_json = importlib.resources.read_text(

../../../../../opt/hostedtoolcache/Python/3.11.14/x64/lib/python3.11/importlib/resources/_legacy.py:80: 11 warnings
  /opt/hostedtoolcache/Python/3.11.14/x64/lib/python3.11/importlib/resources/_legacy.py:80: DeprecationWarning: open_text is deprecated. Use files() instead. Refer to https://importlib-resources.readthedocs.io/en/latest/using.html#migrating-from-legacy for migration advice.
    with open_text(package, resource, encoding, errors) as fp:

tests/data/__init__.py:13
  /home/runner/work/geneweaver-api/geneweaver-api/tests/data/__init__.py:13: DeprecationWarning: read_text is deprecated. Use files() instead. Refer to https://importlib-resources.readthedocs.io/en/latest/using.html#migrating-from-legacy for migration advice.
    geneset_w_gene_id_type_json = importlib.resources.read_text(

tests/data/__init__.py:17
  /home/runner/work/geneweaver-api/geneweaver-api/tests/data/__init__.py:17: DeprecationWarning: read_text is deprecated. Use files() instead. Refer to https://importlib-resources.readthedocs.io/en/latest/using.html#migrating-from-legacy for migration advice.
    geneset_list_response_json = importlib.resources.read_text("tests.data", "geneset.json")

tests/data/__init__.py:19
  /home/runner/work/geneweaver-api/geneweaver-api/tests/data/__init__.py:19: DeprecationWarning: read_text is deprecated. Use files() instead. Refer to https://importlib-resources.readthedocs.io/en/latest/using.html#migrating-from-legacy for migration advice.
    gene_homologus_ids_json = importlib.resources.read_text(

tests/data/__init__.py:23
  /home/runner/work/geneweaver-api/geneweaver-api/tests/data/__init__.py:23: DeprecationWarning: read_text is deprecated. Use files() instead. Refer to https://importlib-resources.readthedocs.io/en/latest/using.html#migrating-from-legacy for migration advice.
    gene_id_mapping_json = importlib.resources.read_text("tests.data", "gene_maping.json")

tests/data/__init__.py:25
  /home/runner/work/geneweaver-api/geneweaver-api/tests/data/__init__.py:25: DeprecationWarning: read_text is deprecated. Use files() instead. Refer to https://importlib-resources.readthedocs.io/en/latest/using.html#migrating-from-legacy for migration advice.
    publications_json = importlib.resources.read_text("tests.data", "publications.json")

tests/data/__init__.py:27
  /home/runner/work/geneweaver-api/geneweaver-api/tests/data/__init__.py:27: DeprecationWarning: read_text is deprecated. Use files() instead. Refer to https://importlib-resources.readthedocs.io/en/latest/using.html#migrating-from-legacy for migration advice.
    jwt_test_keys_json = importlib.resources.read_text(

tests/data/__init__.py:31
  /home/runner/work/geneweaver-api/geneweaver-api/tests/data/__init__.py:31: DeprecationWarning: read_text is deprecated. Use files() instead. Refer to https://importlib-resources.readthedocs.io/en/latest/using.html#migrating-from-legacy for migration advice.
    species_json = importlib.resources.read_text("tests.data", "species.json")

tests/data/__init__.py:33
  /home/runner/work/geneweaver-api/geneweaver-api/tests/data/__init__.py:33: DeprecationWarning: read_text is deprecated. Use files() instead. Refer to https://importlib-resources.readthedocs.io/en/latest/using.html#migrating-from-legacy for migration advice.
    genes_json = importlib.resources.read_text("tests.data", "genes.json")

tests/data/__init__.py:35
  /home/runner/work/geneweaver-api/geneweaver-api/tests/data/__init__.py:35: DeprecationWarning: read_text is deprecated. Use files() instead. Refer to https://importlib-resources.readthedocs.io/en/latest/using.html#migrating-from-legacy for migration advice.
    monitors_json = importlib.resources.read_text("tests.data", "monitors.json")

tests/data/__init__.py:37
  /home/runner/work/geneweaver-api/geneweaver-api/tests/data/__init__.py:37: DeprecationWarning: read_text is deprecated. Use files() instead. Refer to https://importlib-resources.readthedocs.io/en/latest/using.html#migrating-from-legacy for migration advice.
    ontology_json = importlib.resources.read_text("tests.data", "ontology.json")

tests/controllers/test_genes.py: 10 warnings
tests/controllers/test_genesets.py: 2 warnings
  /home/runner/.cache/pypoetry/virtualenvs/geneweaver-api-setE78Sd-py3.11/lib/python3.11/site-packages/httpx/_models.py:408: DeprecationWarning: Use 'content=<...>' to upload raw bytes/text content.
    headers, stream = encode_request(

-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html

---------- coverage: platform linux, python 3.11.14-final-0 ----------
Name                                            Stmts   Miss  Cover
-------------------------------------------------------------------
src/geneweaver/api/__init__.py                      5      2    60%
src/geneweaver/api/controller/__init__.py           0      0   100%
src/geneweaver/api/controller/api.py               14      0   100%
src/geneweaver/api/controller/genes.py             39      0   100%
src/geneweaver/api/controller/genesets.py          98      4    96%
src/geneweaver/api/controller/message.py           27      0   100%
src/geneweaver/api/controller/monitors.py          16      0   100%
src/geneweaver/api/controller/publications.py      35      0   100%
src/geneweaver/api/controller/search.py            21      0   100%
src/geneweaver/api/controller/species.py           17      0   100%
src/geneweaver/api/controller/utilities.py          9      0   100%
src/geneweaver/api/core/__init__.py                 0      0   100%
src/geneweaver/api/core/config.py                   2      0   100%
src/geneweaver/api/core/config_class.py            31      0   100%
src/geneweaver/api/core/exceptions.py              13      1    92%
src/geneweaver/api/core/security.py               121     20    83%
src/geneweaver/api/dependencies.py                 61     30    51%
src/geneweaver/api/main.py                          1      0   100%
src/geneweaver/api/schemas/__init__.py              0      0   100%
src/geneweaver/api/schemas/apimodels.py            61      6    90%
src/geneweaver/api/schemas/auth.py                 18      0   100%
src/geneweaver/api/schemas/messages.py             18     18     0%
src/geneweaver/api/schemas/score.py                13     13     0%
src/geneweaver/api/schemas/search.py               19      0   100%
src/geneweaver/api/services/__init__.py             0      0   100%
src/geneweaver/api/services/genes.py               45      0   100%
src/geneweaver/api/services/geneset.py            186      6    97%
src/geneweaver/api/services/io.py                   4      0   100%
src/geneweaver/api/services/monitors.py            10      0   100%
src/geneweaver/api/services/parse/__init__.py       0      0   100%
src/geneweaver/api/services/publications.py        47      0   100%
src/geneweaver/api/services/pubmeds.py              0      0   100%
src/geneweaver/api/services/species.py             18      3    83%
-------------------------------------------------------------------
TOTAL                                             949    103    89%
Coverage HTML written to dir htmlcov

Required test coverage of 60% reached. Total coverage: 89.15%
================= 343 passed, 21 skipped, 34 warnings in 5.33s =================

@francastell
francastell deployed to jax-cluster-dev-10--dev March 12, 2026 15:42 — with GitHub Actions Active
@francastell
francastell merged commit 5144880 into main Mar 12, 2026
7 checks passed
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants