Open siddharth-krishna opened 8 months ago
There's code in generate_uc_properties that expands allregions and comma-separated region lists: https://github.com/etsap-TIMES/xl2times/blob/b12287d15324ddf058b34266a6c5d0ffd3a67ce7/xl2times/transforms.py#L749-L767 which is very similar to code in process_transform_tables: https://github.com/etsap-TIMES/xl2times/blob/3720c7e554534131e7975753ef1b8e42c5311d97/xl2times/transforms.py#L1708-L1745 and there's also an explode function in utils.py.
generate_uc_properties
allregions
process_transform_tables
explode
utils.py
It would be good to have all the code exploding regions in one place, both for code reuse and conciseness but also so that optimizations are applied everywhere.
(Link to original discussion: https://github.com/etsap-TIMES/xl2times/pull/179/files/4ea76267c9558b3a08d09ec282b7a5fcaa458f8c#r1487242195)
There's code in
generate_uc_properties
that expandsallregions
and comma-separated region lists: https://github.com/etsap-TIMES/xl2times/blob/b12287d15324ddf058b34266a6c5d0ffd3a67ce7/xl2times/transforms.py#L749-L767 which is very similar to code inprocess_transform_tables
: https://github.com/etsap-TIMES/xl2times/blob/3720c7e554534131e7975753ef1b8e42c5311d97/xl2times/transforms.py#L1708-L1745 and there's also anexplode
function inutils.py
.It would be good to have all the code exploding regions in one place, both for code reuse and conciseness but also so that optimizations are applied everywhere.
(Link to original discussion: https://github.com/etsap-TIMES/xl2times/pull/179/files/4ea76267c9558b3a08d09ec282b7a5fcaa458f8c#r1487242195)