Repository navigation
46/cli no weather api - #95
Merged
Merged
Conversation
Passes use_api_weather=not args.no_api_weather into single runs, --plan, and --speed-sweep. Default behavior (try API first) unchanged. Documents the offline commands in the README. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Contributor
|
W gander, I'll approve ur other one too |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds a
--no-api-weatherCLI flag so the simulator can run offline with syntheticweather. The flag is passed into all three run modes: the normal single run,
--plan,and
--speed-sweep. Without the flag, behavior is unchanged: the Open-Meteo API istried first, with the existing fallback to synthetic data if it fails.
The offline commands are documented in
README.md.Changes
sim/main.py: new--no-api-weatherargument. The four hardcodeduse_api_weather=Truecalls now usenot args.no_api_weather.README.md: offline usage examples, plus a note in the Weather section.tests/test_cli_offline.py: 11 new pytest tests.Testing
Run
python3 -m pytest tests/test_cli_offline.py. The tests cover:--plan)--planand--speed-sweep, with and without the flagtries the API and falls back to synthetic weather when the network fails
I also ran each command by hand:
--no-api-weatherfor the single run,--planand--speed-sweep. With the network blocked,--plan --no-api-weathermade no API calls.Related Issue
Closes #46
Notes
tests/test_config.py::test_invalid_track_configwas already failing onmain.The separate PR for the
fix/test-invalid-track-configbranch fixes it, sothis branch can still show that one failure until that PR is merged.