Conversation
…ource files Closes #6. Adds professional-grade Google-style docstrings, module-level docstrings, and targeted inline comments to all 14 Python source files. Changes per file: - agent_state.py: module docstring explaining profile params and AGENT_STATES global; dataclass field docs; docstrings for all public functions. - belief_model.py: module docstring explaining Bayesian pipeline; docstrings with threshold rationale for all functions. - departure_model.py: module docstring explaining three-clause departure rule; inline comments on each clause. - information_model.py: module docstring; docs explaining noise/delay model and keyword-vote social signal aggregation. - routing_utility.py: module docstring explaining utility formula and weight rationale; docs on penalty lookup table and exposure formula components. - scenarios.py: module docstring explaining three information regimes; docstrings on all filter/config functions. - forecast_layer.py: module docstring; docs on margin band thresholds and fire growth computation. - metrics.py: module docstring explaining five KPIs; class docstring; docstrings on all record/compute/export methods. - replay.py: module docstring explaining record/replay contract and output files; docstrings on all methods. - calibration.py: module docstring explaining loss formula and METRIC_SPECS weights; docstrings on all functions. - experiments.py: module docstring explaining parameter axes and output files; docstrings on grid/sweep/export functions. - study_runner.py: module docstring explaining three-stage study flow; docstring on run_study(). - Spawn_Events.py: module docstring explaining tuple format and active/disabled vehicle groups. - Traci_GPT2.py: module docstring with full CLI/env-var reference and pipeline overview; section headers for fire dynamics config; docstrings for LiveEventStream, WebDashboard, AgentOverlayManager, AgentMessagingBus, process_pending_departures, process_vehicles, active_fires, compute_edge_risk_for_fires, update_fire_shapes, _circle_polygon, and CLI helpers. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
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.
Closes #6.
Summary
replay.pyused as the style reference (it was the only file with partial docs); all others brought up to the same standardWhat was added per file
agent_state.pyAgentRuntimeStatefield docs; docstrings for all functionsbelief_model.pycategorize_hazard_state; formula explanations on all functionsdeparture_model.pyinformation_model.pyrouting_utility.pyscenarios.pyforecast_layer.pymetrics.pyreplay.pycalibration.pyMETRIC_SPECSweights and their rationale; docstrings on all functionsexperiments.pystudy_runner.pyrun_studydocstringSpawn_Events.pyTraci_GPT2.pyLiveEventStream,WebDashboard,AgentOverlayManager,AgentMessagingBus,process_pending_departures,process_vehicles,active_fires,compute_edge_risk_for_fires,update_fire_shapes,_circle_polygon, and CLI helpersTest plan
python -c "import ast; ast.parse(open('Traci_GPT2.py').read())"passes for all modified filesgit diff main --stat(only line counts changed, no functional edits)belief_model.py,routing_utility.py,departure_model.py)🤖 Generated with Claude Code