Skip to content

Commit 864b1ea

Browse files
committed
Fix AnatomyExpressedIn TypeError: cache wrapper param rename
In v1.13.6 we renamed get_expression_overlaps_here's parameter anatomy_short_form -> expression_pattern_short_form to reflect the inverse-direction semantics. The XMI side and ha_api.QUERY_TYPE_MAP were updated, but the cache wrapper in cached_functions.py kept the old keyword and continued to call _original_get_expression_overlaps_here( anatomy_short_form=anatomy_short_form, ...) against the renamed function. Every AnatomyExpressedIn /run_query call has been raising TypeError: get_expression_overlaps_here() got an unexpected keyword argument 'anatomy_short_form' in prod since v1.13.6. Caught by the v1.14.0 reference-walks audit when AnatomyExpressedIn returned count=None instead of rows. The fix is the same one-line rename in cached_functions.py — wrapper parameter and forwarded keyword both become expression_pattern_short_form. Docstring updated. Patch bump 1.14.0 -> 1.14.1 — no schema or behaviour change for any other query, no SOLR cache implications (the broken wrapper means no AnatomyExpressedIn payloads ever made it into cache).
1 parent 5d7ed02 commit 864b1ea

2 files changed

Lines changed: 10 additions & 5 deletions

File tree

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
here = path.abspath(path.dirname(__file__))
55

6-
__version__ = "1.14.0"
6+
__version__ = "1.14.1"
77

88
# Get the long description from the README file
99
with open(path.join(here, 'README.md')) as f:

src/vfbquery/cached_functions.py

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -450,19 +450,24 @@ def get_neuron_region_connectivity_cached(short_form: str, return_dataframe=True
450450
return _original_get_neuron_region_connectivity(short_form=short_form, return_dataframe=return_dataframe, limit=limit, force_refresh=force_refresh)
451451

452452
@with_solr_cache('expression_overlaps_here')
453-
def get_expression_overlaps_here_cached(anatomy_short_form: str, return_dataframe=True, limit: int = -1, force_refresh: bool = False):
453+
def get_expression_overlaps_here_cached(expression_pattern_short_form: str, return_dataframe=True, limit: int = -1, force_refresh: bool = False):
454454
"""
455455
Enhanced get_expression_overlaps_here with SOLR caching.
456456
457457
Args:
458-
anatomy_short_form: Anatomy short form
458+
expression_pattern_short_form: Expression_pattern Class short_form
459+
(e.g. VFBexp_FBtp0001321). v1.13.6
460+
flipped this function to the
461+
INVERSE direction — see the
462+
underlying get_expression_overlaps_here
463+
docstring for the migration note.
459464
return_dataframe: Whether to return DataFrame or list of dicts
460465
limit: Maximum number of results (-1 for all)
461466
462467
Returns:
463-
Expression overlaps data
468+
Anatomy classes where the expression pattern is expressed.
464469
"""
465-
return _original_get_expression_overlaps_here(anatomy_short_form=anatomy_short_form, return_dataframe=return_dataframe, limit=limit)
470+
return _original_get_expression_overlaps_here(expression_pattern_short_form=expression_pattern_short_form, return_dataframe=return_dataframe, limit=limit)
466471

467472
@with_solr_cache('anatomy_scrnaseq')
468473
def get_anatomy_scrnaseq_cached(anatomy_short_form: str, return_dataframe=True, limit: int = -1, force_refresh: bool = False):

0 commit comments

Comments
 (0)