diff --git a/.github/workflows/pre-commit.yml b/.github/workflows/pre-commit.yml index 39fbe723..b468de56 100644 --- a/.github/workflows/pre-commit.yml +++ b/.github/workflows/pre-commit.yml @@ -14,7 +14,7 @@ jobs: runs-on: ubuntu-latest env: # scripts/check_md_naming.sh is a thin shim that execs the shared gate - # out of the utils repo. A runner has no ~/utils, so without this the + # out of the utils repo. A runner has no ~/src/utils, so without this the # hook fails with "shared gate not found". UTILS_ROOT: ${{ github.workspace }}/.utils steps: diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 72459210..b4ec3b53 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -84,7 +84,7 @@ repos: pass_filenames: false always_run: true - # Thin shim into ~/utils, which owns the four markdown namespaces. + # Thin shim into ~/src/utils, which owns the four markdown namespaces. - id: md-naming name: markdown naming convention entry: scripts/check_md_naming.sh diff --git a/CLAUDE.md b/CLAUDE.md index fc118abb..4c8d1fb2 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -12,7 +12,7 @@ finished, and the value is that it still builds, runs and is readable. | `Programming/` | 25 course dirs with real code (Python, C/C++, Java, TS/Angular, C#, Unity, MATLAB-adjacent). | | `NotProgramming/` | 19 course dirs that are mostly LaTeX reports, PDFs and EDA schematics. Exceptions: `ENUME` (MATLAB), `STUP/makieta` (Angular), `EDABA-LAB` (SQL). | | `gates/` | Machine-readable gate inputs. `vendored.txt` is the source of truth for "not my code". | -| `scripts/` | Repo-local gates. Shims that `exec` into `~/utils` live here too. | +| `scripts/` | Repo-local gates. Shims that `exec` into `~/src/utils` live here too. | Two structural facts that surprise people: @@ -81,7 +81,7 @@ check. ### Everything - **Every file is at most 250 lines, source and prose alike**, enforced by the - shared gate in `~/utils`. There is deliberately no baseline and no + shared gate in `~/src/utils`. There is deliberately no baseline and no allowlist: split the file. For a LaTeX report that means `\input{}` per section; for a markdown report, sibling `DOCS-*.md` files behind an index. - **Coursework is held to the same bar as the tooling.** It gets the full @@ -102,7 +102,7 @@ check. `gates/vendored.txt` is the only place a path becomes exempt from lint, coverage and the cap. Every entry carries a reason **and how it was verified** — an unverified entry is a suppression wearing a costume. The list -is mirrored into `~/utils/file_length/_tables.py`, `[tool.ruff] exclude` and +is mirrored into `~/src/utils/file_length/_tables.py`, `[tool.ruff] exclude` and `[tool.coverage.run] omit`; edit the manifest, never a mirror. ### Python diff --git a/DOCS-runnability.md b/DOCS-runnability.md index 953a1ed1..d5f3adde 100644 --- a/DOCS-runnability.md +++ b/DOCS-runnability.md @@ -37,7 +37,7 @@ run cannot clobber the local column. | `Programming/EADS` | runnable | - | compiles each standalone .cpp | | `Programming/EARIN` | runnable | - | python3 the entry script | | `Programming/ECOAR` | runnable | - | make | -| `Programming/ECOTE` | runnable | - | python3 /home/kuhy/WUT_Computer_Science/Programming/ECOTE/program/translator/main.py | +| `Programming/ECOTE` | runnable | - | python3 /home/kuhy/src/WUT_Computer_Science/Programming/ECOTE/program/translator/main.py | | `Programming/ECRYPT` | no-code | - | test1.py is a 0-byte stub; this course produced no submitted code | | `Programming/ECRYPT_PROJECT` | runnable | - | python3 the entry script | | `Programming/EGUI` | runnable | - | dotnet build | @@ -48,10 +48,10 @@ run cannot clobber the local column. | `Programming/ERSMS-project` | runnable | - | docker compose up | | `Programming/NLP` | runnable | - | python3 the entry script | | `Programming/PBAD` | blocked | - | jupyter is on PATH but does not run (dead shim) | -| `Programming/PORR` | runnable | - | python3 /home/kuhy/WUT_Computer_Science/Programming/PORR/code/main.py | +| `Programming/PORR` | runnable | - | python3 /home/kuhy/src/WUT_Computer_Science/Programming/PORR/code/main.py | | `Programming/PSD` | runnable | - | starts the Kafka/Flink stack (installs packages with sudo) | | `Programming/psd_project` | runnable | - | mvn package | -| `Programming/TRAK` | runnable | - | python3 /home/kuhy/WUT_Computer_Science/Programming/TRAK/main.py | +| `Programming/TRAK` | runnable | - | python3 /home/kuhy/src/WUT_Computer_Science/Programming/TRAK/main.py | | `Programming/twm_4` | blocked | - | jupyter is on PATH but does not run (dead shim) | | `Programming/USD` | no-code | - | README describes a MetaDrive RL assignment; no implementation was submitted | | `Programming/WDWR` | runnable | - | python3 the entry script | diff --git a/TODO-file-length-250.md b/TODO-file-length-250.md index de9a711c..7ba02a68 100644 --- a/TODO-file-length-250.md +++ b/TODO-file-length-250.md @@ -12,11 +12,11 @@ Nothing here blocks the refactor. It blocks exactly one step — installing the `file-length` pre-commit hook and workflow — so it must be settled before that lands, and not before. -Run `bash ~/utils/scripts/check_file_length.sh --all` to see the current list. +Run `bash ~/src/utils/scripts/check_file_length.sh --all` to see the current list. ## Why the existing mechanism does not cover them -`VENDORED_SUBPATHS` in `~/utils/file_length/_tables.py` matches **directory +`VENDORED_SUBPATHS` in `~/src/utils/file_length/_tables.py` matches **directory prefixes** (`/{repo}/{sub}/`). That is enough for the 7 entries already in `gates/vendored.txt`, and it is not enough here: @@ -85,7 +85,7 @@ submission alters what was submitted. ## Options **A. Extend the shared manifest to support file paths.** Teach -`~/utils/file_length/exemptions.py:is_vendored` to read `gates/vendored.txt` at +`~/src/utils/file_length/exemptions.py:is_vendored` to read `gates/vendored.txt` at the repo root, supporting exact files as well as directories. This is the design originally chosen (one root manifest consumed by every gate) and is the only option that handles all four categories. @@ -101,6 +101,6 @@ WDWR submission-copy files. Does not address category 1. paths listed here, and treat the list as the record. Honest, but it is an allowlist by another name, which the fleet rules reject. -Recommendation: **A**, taken as its own `~/utils` change with its own tests and +Recommendation: **A**, taken as its own `~/src/utils` change with its own tests and CI job, sequenced before Milestone 2 step 4. B as a fallback for categories 2–3 if A is judged too large, leaving categories 1 and 4 to a narrower version of A. diff --git a/TODO-refactor-remaining.md b/TODO-refactor-remaining.md index 136a11aa..e17189f2 100644 --- a/TODO-refactor-remaining.md +++ b/TODO-refactor-remaining.md @@ -10,7 +10,7 @@ one specific blocking decision. | Area | State | |---|---| -| Vendored manifest | `gates/vendored.txt`, 8 entries, mirrored into `~/utils` | +| Vendored manifest | `gates/vendored.txt`, 8 entries, mirrored into `~/src/utils` | | Build artifacts | 189 untracked, `.gitignore` closed, 0 tracked-but-ignored files | | no-binaries gate | Path-scoped `.binary-allowlist`; verified blocking AND passing | | Markdown | 4 namespaces, all under 250 lines, `CLAUDE.md` written | diff --git a/gates/runnability-local.tsv b/gates/runnability-local.tsv index ac5b9be1..01f73ca5 100644 --- a/gates/runnability-local.tsv +++ b/gates/runnability-local.tsv @@ -23,7 +23,7 @@ Programming/BSS runnable builds the report with latexmk Programming/EADS runnable compiles each standalone .cpp Programming/EARIN runnable python3 the entry script Programming/ECOAR runnable make -Programming/ECOTE runnable python3 /home/kuhy/WUT_Computer_Science/Programming/ECOTE/program/translator/main.py +Programming/ECOTE runnable python3 /home/kuhy/src/WUT_Computer_Science/Programming/ECOTE/program/translator/main.py Programming/ECRYPT no-code test1.py is a 0-byte stub; this course produced no submitted code Programming/ECRYPT_PROJECT runnable python3 the entry script Programming/EGUI runnable dotnet build @@ -34,10 +34,10 @@ Programming/E-PSYOPS runnable opens in the Unity editor Programming/ERSMS-project runnable docker compose up Programming/NLP runnable python3 the entry script Programming/PBAD blocked jupyter is on PATH but does not run (dead shim) -Programming/PORR runnable python3 /home/kuhy/WUT_Computer_Science/Programming/PORR/code/main.py +Programming/PORR runnable python3 /home/kuhy/src/WUT_Computer_Science/Programming/PORR/code/main.py Programming/PSD runnable starts the Kafka/Flink stack (installs packages with sudo) Programming/psd_project runnable mvn package -Programming/TRAK runnable python3 /home/kuhy/WUT_Computer_Science/Programming/TRAK/main.py +Programming/TRAK runnable python3 /home/kuhy/src/WUT_Computer_Science/Programming/TRAK/main.py Programming/twm_4 blocked jupyter is on PATH but does not run (dead shim) Programming/USD no-code README describes a MetaDrive RL assignment; no implementation was submitted Programming/WDWR runnable python3 the entry script diff --git a/gates/vendored.txt b/gates/vendored.txt index 4f8e25a5..ae82fc6f 100644 --- a/gates/vendored.txt +++ b/gates/vendored.txt @@ -2,7 +2,7 @@ # # THE source of truth for "not kuhy's code". Every gate reads this list: # - the 250-line cap and the md-naming gate, via the "WUT_Computer_Science" -# key in VENDORED_SUBPATHS (~/utils/file_length/_tables.py) +# key in VENDORED_SUBPATHS (~/src/utils/file_length/_tables.py) # - ruff, via [tool.ruff] exclude in pyproject.toml # - coverage, via [tool.coverage.run] omit # - prettier, via .prettierignore diff --git a/install.sh b/install.sh index acbe6489..eba574bc 100755 --- a/install.sh +++ b/install.sh @@ -19,7 +19,7 @@ set -euo pipefail SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" readonly SCRIPT_DIR -readonly UTILS_ROOT="${UTILS_ROOT:-$HOME/utils}" +readonly UTILS_ROOT="${UTILS_ROOT:-$HOME/src/utils}" CHECK_ONLY=0 diff --git a/run.sh b/run.sh index 5a114412..9a82dbd1 100755 --- a/run.sh +++ b/run.sh @@ -196,7 +196,7 @@ cmd_sync_vendored() { log "gates/vendored.txt declares:" grep -vE '^\s*#|^\s*$' "${SCRIPT_DIR}/gates/vendored.txt" | sed 's/^/ /' printf '\nMirrored into:\n' - printf ' ~/utils/file_length/_tables.py VENDORED_SUBPATHS["WUT_Computer_Science"]\n' + printf ' ~/src/utils/file_length/_tables.py VENDORED_SUBPATHS["WUT_Computer_Science"]\n' printf ' pyproject.toml [tool.ruff] exclude (Milestone 4)\n' printf ' pyproject.toml [tool.coverage.run] omit (Milestone 4)\n' } diff --git a/scripts/check_md_naming.sh b/scripts/check_md_naming.sh index 50deaa00..7847c564 100755 --- a/scripts/check_md_naming.sh +++ b/scripts/check_md_naming.sh @@ -3,7 +3,7 @@ # ============================================================================ # Fail if any markdown file breaks the shared naming convention. # -# Thin delegate to the shared gate in ~/utils, which owns the four namespaces +# Thin delegate to the shared gate in ~/src/utils, which owns the four namespaces # (README / CLAUDE* / DOCS* / TODO*), the "REMOVE ME AFTER FINISH" marker rule # and the exemption list. Copying that logic here is what lets one repo's idea # of a valid name drift from every other repo's -- so this script only locates @@ -16,12 +16,12 @@ set -euo pipefail -readonly SHARED_GATE="${UTILS_ROOT:-$HOME/utils}/scripts/check_md_naming.sh" +readonly SHARED_GATE="${UTILS_ROOT:-$HOME/src/utils}/scripts/check_md_naming.sh" main() { if [[ ! -x "$SHARED_GATE" ]]; then echo "Error: shared markdown-naming gate not found at $SHARED_GATE" >&2 - echo " Clone github.com/kuhyx/utils to ~/utils, or set" >&2 + echo " Clone github.com/kuhyx/utils to ~/src/utils, or set" >&2 echo " UTILS_ROOT to where it lives." >&2 exit 1 fi diff --git a/scripts/check_no_binaries.sh b/scripts/check_no_binaries.sh index 080428a8..e27e3130 100755 --- a/scripts/check_no_binaries.sh +++ b/scripts/check_no_binaries.sh @@ -1,9 +1,9 @@ #!/bin/bash # Pre-commit hook: block binary and image files from being committed. # -# Copied from ~/testsAndMisc/meta/scripts/check_no_binaries.sh, which is where -# this gate lives today (it is NOT in the shared ~/utils gate set). Keep the two -# in step, and prefer moving it to ~/utils over letting them drift -- a +# Copied from ~/src/testsAndMisc/meta/scripts/check_no_binaries.sh, which is where +# this gate lives today (it is NOT in the shared ~/src/utils gate set). Keep the two +# in step, and prefer moving it to ~/src/utils over letting them drift -- a # hand-copied gate is exactly what produced four forks of the 250-line cap. # # Only the remedy text differs: "move it to a sibling _binaries/ dir" is wrong