NatLabRockies / NatLabRockies/fastsim

Default `revision` to latest (highest number in directory) when querying database

Open
#308 0 comments 0 reactions 1 assignee View on GitHub

@kylecarow is already working on this.

Since Jul 23, 2026.

enhancement
Dominant language
Rust
Stars
60
Forks
19
Avg merge
10d 2h
Merged PRs (30d)
2

Description

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?

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.