ADD CLAUDE.md with repository guidance for Claude Code - #49
Merged
Conversation
Documents the commands, architecture, and conventions that are not discoverable from a single file: - Test invocation (full suite, per-directory, per-test, -k) and the split between pinned runtime requirements and the uninstalled requirements-dev.txt geo stack. - The BaseTool lifecycle and its non-obvious behaviors: filename_prefix is overwritten with the class name, execute() does not forward nrows/ncols to _export_file, and calculators re-declare execute() only to change matplotlib defaults. - The FileHandler band-I/O layer, including the difference between normalized and raw metadata bands and the coupling between band_paths ordering, get_images_collection(), and PCA band selection. - The tools/docs/tests 1:1 category layout, the inconsistent per-category __init__.py files, and fezrs/__init__.py as the canonical import surface. - The checklist and mock-based test pattern for adding a calculator. - Release plumbing: .bumpversion.cfg as the version source, the setup.py/requirements.txt sync enforced by tests, and generated CITATION.cff.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changed
Adds a
CLAUDE.mdat the repository root documenting the commands, architecture, and conventions that currently require reading several files to reconstruct.Why
The FEZrs codebase has a strong, consistent internal contract (
BaseTool→FileHandler→ per-category calculators) that is not written down anywhere. New contributors — and AI-assisted contributions, whichCONTRIBUTING.mdexplicitly welcomes — have to infer it by readingbase.py,file_handler.py, and several calculators side by side. This file captures that contract in one place.Contents
-k), the split between the pinnedrequirements.txtand the uninstalledrequirements-dev.txtgeo stack, how to run the bundled examples, andbump2version.BaseToollifecycle — the six-step contract plus its non-obvious behaviors:filename_prefixis always overwritten with the class name,execute()accepts but does not forwardnrows/ncolsto_export_file, and nearly every calculator re-declaresexecute()purely to change matplotlib defaults.FileHandleras the single pixel-entry point, the consequential difference betweenget_normalized_bandsandget_metadata_bands, and the coupling betweenband_pathsdict ordering,get_images_collection(), andPCACalculator.bindTheBandsToNumber.fezrs/tools/<cat>/↔docs/<cat>.md↔tests/tools/<cat>/mapping, withfezrs/__init__.pyas the canonical import surface.BaseTool.__init__at the calculator's own module path) that keeps tests off the disk and off the network, perCONTRIBUTING.md..bumpversion.cfgas the single version source, thesetup.py↔requirements.txtsync thattests/setup_test.pyenforces, and the generatedCITATION.cff.Notes for reviewers
Documentation only. No code, no behavior changes, no new dependencies, no structural reorganization.
README.mdis untouched, per theCONTRIBUTING.mdguideline.Two pre-existing issues are documented but not fixed here, as both are out of scope for a docs-only change:
fezrs/tools/change_detection/,fezrs/tools/svm/, andfezrs/media/have no__init__.py, sofind_packages(include=["fezrs", "fezrs.*"])insetup.pydoes not collect them. Worth verifying that an installed wheel actually contains those modules.README.mdandpaper/paper.mdboth document achart_export()method that does not exist in the code — the actual public method ishistogram_export().CLAUDE.mdalso notes that thefeature/...branch convention inCONTRIBUTING.mdconflicts with afeat/-prefix policy enforced locally on the author's machine, hence this branch name.