How devcompsy/cpm works
Project type and purpose
• This is a Python-only library (“cpm”) for Computational Psychiatry research.
• It provides data generators, models, optimisers, diagnostics, export tools and ready-to-run applications (e.g., reinforcement learning tasks).
• No front-end or web server; it’s a scientific toolkit packaged for PyPI, with docs generated via mkdocs and CI/tests driven by pytest.
File structure
• Top-level module: cpm/
• cpm/core/ Orchestrates data flow, diagnostics, exports, parallel execution.
• cpm/datasets/ Data loaders & CSV fixtures.
• cpm/generators/ Simulators & parameter sets.
• cpm/models/ Activation functions, decision rules, learning updates.
• cpm/hierarchical/ Empirical and variational inference layers.
• cpm/optimisation/ Algorithm implementations (BADS, fmin, genetic, free energy, etc.).
• cpm/applications/ Higher-level scripts (e.g., reinforcement_learning.py) that tie everything together.
• cpm/utils/ General helper functions.
• Other parts:
• docs/ mkdocs source for documentation & tutorials.
• test/ pytest suite mirroring module structure.
• Packaging/config: setup.py, setup.cfg, LICENSE, mkdocs.yml, CHANGELOG.md.
README for additional insights
• Confirms scientific focus, beta status, install from GitHub, docs with mkdocs, testing with pytest, packaging and publishing steps.
Elements
• Blue for core computational layers (models, optimisers).
• Green for data/generators.
• Orange for orchestration & applications.
• Gray for documentation, testing, and deployment.
Final advice
• build & release pipeline: doc build (mkdocs → GitHub Pages), test (pytest), packaging (setup.py → twine → PyPI).