Architecture
Every user-facing operation in modalysis follows the same six-layer flow:
CLI Parser
CLI Handler
HTTP Client
FastAPI Server
Core Function
The main CLI entrypoint is modalysis.__init__.main. Subcommands are registered in parser modules with set_defaults(func=...) and dispatched by args.func(args).
Design Rules
Core modules in
src/modalysis/corecontain business logic and should not include HTTP or CLI logic.Server modules in
src/modalysis/serverexpose POST endpoints and delegate to core.Client modules in
src/modalysis/clientsend requests to server endpoints.CLI handlers in
src/modalysis/cli/handlersparse command arguments and invoke clients.CLI parsers in
src/modalysis/cli/parsersdefine command groups and argument schemas.
Output Convention
Tabular processing commands write .modalysis TSV outputs. Plot commands write .png files.