This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
All commands use uv as the package manager. Prefer Makefile targets over raw commands (see Makefile or make help for the full list).
PyCFAST is a Python interface for building, running, and parsing CFAST fire simulation models. CFAST uses Fortran namelist (.in) files as input and produces CSV result files. CFASTParser reads an existing .in file via f90nml and reconstructs component objects into a CFASTModel.
CFASTComponent.__setattr__calls_validate()on every public attribute write once the component is_initialized = True. To apply several attribute changes atomically, toggle_initializedoff, set the attributes, call_validate(), then turn it back on (this is whatCFASTModel._apply_kwargsdoes).- Component routing is driven by
_COMPONENT_SPECS(akind -> (cls, model_attr, label, id_fields)table) which is the single source of truth shared byadd(),_update_component(), and_resolve_identifier(). NamelistRecord(utils/namelist.py) silently skipsNonevalues when serializing to Fortran namelist format.- All public API is exported from
src/pycfast/__init__.py.