mirror of
https://github.com/kuhyx/WUT_Computer_Science.git
synced 2026-11-10 21:07:09 +01:00
The archive reached zero ruff findings this morning, so the standing rule in
.pre-commit-config.yaml -- a hook lands only once the thing it gates is clean
-- is finally satisfied for ruff. `ruff check` and `ruff format --check` are
hooks now, pinned at v0.16.5 per rules/dependency-freshness, plus
`no-suppressions`, which rejects `# noqa` and `# type: ignore`. CLAUDE.md has
always claimed a hook did that; until now the only thing stopping them was
whoever was reading ruff's output, and I typed `# noqa-free` three times in
this session by accident. mypy stays out: six of its errors are third-party
typing limits rather than our code.
The first attempt used `language: system`, which passed `pre-commit run
--all-files` and then failed the actual commit with "Executable `ruff` not
found" -- git hooks do not get ~/.local/bin on PATH. Taking the hooks from
astral-sh/ruff-pre-commit means pre-commit installs ruff itself, which is also
what makes the pin mean anything.
`ruff format --check` failed the moment it was wired up, on four TRAK files I
wrote today and never formatted. Formatted, and the ray_tracing0 render is
still 02484bdb6b6c1ddeff317d7e5566580f.
Then the run guard from
|
||
|---|---|---|
| .. | ||
| .idea | ||
| .vscode | ||
| code | ||
| docs | ||
| environments | ||
| outputs | ||
| scenes | ||
| sightpy | ||
| .gitignore | ||
| .python-version | ||
| config.ini | ||
| init.sh | ||
| lab6.py | ||
| main.py | ||
| output_ray_traced.png | ||
| photon_geometry.py | ||
| photon_mapping.py | ||
| ray tracing testy.pdf | ||
| raytracer.py | ||
| README.md | ||
| rendering.py | ||
| requirements.txt | ||
| run.sh | ||
| utils.py | ||
Wywoływanie z terminala
# Wywołanie algorytmu ray tracing z domyślnymi parametrami i sceną
python main.py --algorithm ray_tracing
# Wywołanie algorytmu ray tracing ze specyfikacją sceny z folderu scenes, liczbą sampli na pixek, rozdzielczością, środowiskiem i rozmyciem środowiska
python main.py --scene three_spheres --samples_per_pixel 100 --resolution 100x100 --environment lake.png --env_blur 10
# Wywołanie algorytmu *photon mapping* ze specyfikacją liczby fotonów i maksymalnej głębokości
python main.py --algorithm photon_mapping --max_depth 4 --num_photons 1000
# Wywołanie algorytmu *photon mapping* wykonanego w c++
cd photonmappnig/cpp
./compile.sh
./photon_mapping