mirror of
https://github.com/kuhyx/WUT_Computer_Science.git
synced 2026-11-10 18:07:14 +01:00
Re-point paths for the ~ reorganisation (home-tidy)
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01AwtowrowDXx6ccmWVPkCaF
This commit is contained in:
parent
8798105aa1
commit
7739d33532
2
.github/workflows/pre-commit.yml
vendored
2
.github/workflows/pre-commit.yml
vendored
@ -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:
|
||||
|
||||
@ -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
|
||||
|
||||
@ -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
|
||||
|
||||
@ -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 |
|
||||
|
||||
@ -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.
|
||||
|
||||
@ -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 |
|
||||
|
||||
@ -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
|
||||
|
||||
|
@ -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
|
||||
|
||||
@ -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
|
||||
|
||||
|
||||
2
run.sh
2
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'
|
||||
}
|
||||
|
||||
@ -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
|
||||
|
||||
@ -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
|
||||
|
||||
Loading…
Reference in New Issue
Block a user