biocommons / hgvs

Python library to parse, format, validate, normalize, and map sequence variants. `pip install hgvs`
https://hgvs.readthedocs.io/
Apache License 2.0
240 stars 94 forks source link

Global configuration item not always being used #736

Open wlymanambry opened 5 months ago

wlymanambry commented 5 months ago

Describe the bug I set a global_config setting like:

global_config.normalizer.shuffle_direction = 5

I then call assembly_mapper:

 variant_mapper: assemblymapper.AssemblyMapper = assemblymapper.AssemblyMapper(
        connection,
        assembly_name="GRCh37",
        alt_aln_method="splign",
        normalize=1,
        prevalidation_level="INTRINSIC",
    )

with a print statement, I can see that this config value is set correctly here in assembly mapper: image

But when the Normalizer class is initialized, it is pulling whatever value is in the _data/defaults.ini file (and I'm not sure why)

A print here shows this is '3' instead of the expected 5 value that was set: image

To Reproduce Described above

Expected behavior For this configuration value to be set globally