Closed asongtoruin closed 3 months ago
As with the other issue, sorry I didn't spot that this has been raised, I'll look at fixing it tomorrow
This issue appears to still not be fixed, and actually is now causing different issues. Line 447 still does not pass through the cached path:
The default cache path for _generate_spatial_translation
also looks incorrect:
Should this not be ZONE_TRANSLATION_CACHE
? @isaac-tfn can you review please?
Hi Adam, yes you're right on both counts, should be fixed now sorry
We've been trying to set up some translations with a non-default cache path, but after a certain point in the chain the custom cache path stops being included, and as such the output location resets to the default.
To follow the chain through,
ZoningSystem.translate
accepts the cache path and passes it through toZoningSystem._get_translation_definition
. However, when this subsequently callsZoningSystem._generate_spatial_translation
the cache path is not passed through:https://github.com/Transport-for-the-North/caf.core/blob/a644f6f719232e9ac2d0eefb289f591153b3385b/src/caf/core/zoning.py#L432
This in turn ultimately sets up
ZoningTranslationInputs
(fromcaf.space
):https://github.com/Transport-for-the-North/caf.core/blob/a644f6f719232e9ac2d0eefb289f591153b3385b/src/caf/core/zoning.py#L358-L383
which can accept a
cache_path
.I think there are two steps to fix:
_generate_spatial_translation
to takecache_path
as a parameter and pass it through toZoningTranslationInputs
_get_translation_definition
so that it passes thecache_path
through to it.