Still plenty more tidy up to do
Cleaning up and improving scripts as they are used again
This repository is configured for automated pull requests generated by tools such as ChatGPT Codex.
The pull request template at .github/pull_request_template.md captures the required summary,
testing commands, and checklists so that automated agents provide consistent information. Keep the
template up to date when workflows change to ensure the automation continues to produce useful PRs.
Automated code reviews by Codex should follow .github/code_review_instructions.md, which documents
the repository structure, review checklist, and feedback expectations. Update the guide when review
patterns change so that automated reviewers stay aligned with human preferences.
Somewhat working:
- POMM and 1d max file parsing collections
- TUFLOW culverts merge
- TUFLOW POMM
- TUFLOW logsummary from .tlf files
- set_layer_to_filename: rename gpkg file to single internal layer name
- hydrograph to closure time - but not pretty
- tif to csv or las in tiles
- culverts - partial, but still a bunch to do and test
- pretty dodgy, but I think v9 was safe
- also pretty dodgy
Lots of others at varying levels of quality.
Pretty much no tests.
-
Recommended – repo-local virtual environment. Keeping everything inside
.venvgives Codex a stable interpreter path so it stops asking for approvals every time it opens a terminal, and it isolates dependencies from your global install to avoid version drift between human and agent sessions.py -3.13 -m venv .venv .\.venv\Scripts\Activate.ps1 python -m pip install -U pip
After those steps, the checked-in
.vscode/settings.jsonautomatically pins${workspaceFolder}\.venv\Scripts\python.exefor both you and the Codex extension. -
Alternative – reuse an existing interpreter: update the
python.defaultInterpreterPathsetting (or set theRYAN_TOOLS_PYTHONenvironment variable) to the interpreter you prefer. The repo task below falls back to that variable or topythononPATHif.venvis missing. Expect VS Code to prompt for interpreter approval more often in this mode because the path can change between sessions.
To save the back-and-forth, run python repo-scripts/ensure_venv.py (or the python:ensure-venv task) before you start a Codex session. The script will create .venv if it is missing, upgrade pip, and install requirements.txt. It also stores a hash so python repo-scripts/ensure_venv.py --check-only can tell you whether the environment is still in sync when you come back later.
Leave the integrated terminal on the default PowerShell profile. Changing shells mid-session forces the Codex agent to request approvals again.
Use the pre-defined python:stdin task (Tasks → Run Task → python:stdin) and pipe code into it. The task automatically selects the interpreter from step 1 and executes the code through repo-scripts/run_snippet.py, so the agent does not have to craft fragile python -c strings. If you want the task to launch a different snippet runner, set RYAN_TOOLS_SNIPPET to the alternative script path.
Codex can also call the python:ensure-venv task whenever it needs to guarantee the repo-managed environment exists. That command resolves the same interpreter heuristics as python:stdin, so it works whether you stick with .venv or point RYAN_TOOLS_PYTHON at a different install.
For anything non-trivial, drop the code into a reusable script—python repo-scripts/<name>.py or another module in the repo—so the agent can rerun it easily.