It would be nice to default to the highest revision number in the directory
Example: skipping revision in the from_db call would scan this folder and return the vehicle at r2.yaml.
v1/fastsim-3/conv/ford/fusion/2012/base/
r1.yaml
r2.yaml
This would enable users to provide just v1/fastsim-3/conv/ford/fusion/2012 as a path, as variant and extension already have sensible defaults base and yaml
For example these paths would all be valid and return the same vehicle:
v1/fastsim-3/conv/ford/fusion/2012/base/r2.yaml
v1/fastsim-3/conv/ford/fusion/2012/base/r2
v1/fastsim-3/conv/ford/fusion/2012/base
v1/fastsim-3/conv/ford/fusion/2012
Currently only the first two of these work.
This would need to be done in Rust, as thats where 95% of the database loading stuff is done.
Notes:
- Very easy to do with local paths
- More finagling required for remote databases, getting the list of files in the dir, etc.
- What value could Python (specifically the internals of
from_db) provide to Rust to signal we should scan for latest?
- change from supplying a
u32 to a more flexible type?
- just supply
u32::MAX aka 4294967295, and check on the rust side when loading?
It would be nice to default to the highest revision number in the directory
Example: skipping
revisionin thefrom_dbcall would scan this folder and return the vehicle atr2.yaml.This would enable users to provide just
v1/fastsim-3/conv/ford/fusion/2012as a path, asvariantandextensionalready have sensible defaultsbaseandyamlFor example these paths would all be valid and return the same vehicle:
v1/fastsim-3/conv/ford/fusion/2012/base/r2.yamlv1/fastsim-3/conv/ford/fusion/2012/base/r2v1/fastsim-3/conv/ford/fusion/2012/basev1/fastsim-3/conv/ford/fusion/2012Currently only the first two of these work.
This would need to be done in Rust, as thats where 95% of the database loading stuff is done.
Notes:
from_db) provide to Rust to signal we should scan for latest?u32to a more flexible type?u32::MAXaka4294967295, and check on the rust side when loading?