Skip to content

Collection of tools used to automate some surface water tasks and workflows (TUFLOW, terrain processing, data processing)

Notifications You must be signed in to change notification settings

Chain-Frost/ryan-tools

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ryan-tools

Still plenty more tidy up to do

Cleaning up and improving scripts as they are used again

Automation Support

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:

TUFLOW

  • 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

RORB

  • hydrograph to closure time - but not pretty

12D

  • tif to csv or las in tiles
  • culverts - partial, but still a bunch to do and test

GDAL python

  • pretty dodgy, but I think v9 was safe

GDAL bat

  • also pretty dodgy

Lots of others at varying levels of quality.

Pretty much no tests.

VS Code + Codex agent setup on Windows

1. Pick a Python interpreter

  • Recommended – repo-local virtual environment. Keeping everything inside .venv gives 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.json automatically pins ${workspaceFolder}\.venv\Scripts\python.exe for both you and the Codex extension.

  • Alternative – reuse an existing interpreter: update the python.defaultInterpreterPath setting (or set the RYAN_TOOLS_PYTHON environment variable) to the interpreter you prefer. The repo task below falls back to that variable or to python on PATH if .venv is 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.

2. Keep the shell stable

Leave the integrated terminal on the default PowerShell profile. Changing shells mid-session forces the Codex agent to request approvals again.

3. Provide a safe entry point for snippets

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.

About

Collection of tools used to automate some surface water tasks and workflows (TUFLOW, terrain processing, data processing)

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •