Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add List Resources feature to FASTSim-2 (SerdeAPI tweaks, list_resources) #148

Merged
merged 5 commits into from
Aug 27, 2024

Conversation

michael-okeefe
Copy link
Collaborator

This is the fastsim-2 implementation to address this issue:
https://github.nrel.gov/MBAP/fastsim/issues/354

The resources::list_resources(subdir) will list all the resources of a given subdirectory. If the subdirectory doesn't exist, an empty vector of string is returned, else the files in that subdirectory.

The SerdeAPI trait connects the RESOURCE_PREFIX with the call to resources::list_resources.

The list_resources_py methods of RustCycle and RustVehicle allow exposure from Python.

Michael O'Keefe added 4 commits August 6, 2024 17:45
Also add unit test to confirm it works.
NOTE: there are (apparently) no vehicle data
files for FASTSim-2. Therefoe, the list_resources
call on RustVehicle was removed.
Also add python tests to confirm results
@michael-okeefe michael-okeefe self-assigned this Aug 8, 2024
@calbaker
Copy link
Collaborator

@michael-okeefe , this looks great!

@calbaker calbaker merged commit 73ffd38 into fastsim-2 Aug 27, 2024
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants