This repository is a self-documenting Fable.Python guide. Author chapter content as literate F# in chapters/*.fs; each file mixes executable examples with Markdown in (** ... *) comments. Keep chapter order synchronized between fable-python.fsproj and the chapters variable in justfile.
Fable.Literate/ contains the F# parser and Markdown generator. Its cross-target tests live in Fable.Literate.Tests/. Fable writes generated Python to output/, while documentation is generated under docs/; do not hand-edit generated files. docs/blogpost.md is the published, tracked aggregate.
Use the repository justfile as the command entry point:
just setuprestores local .NET tools and synchronizes Python dependencies withuv.just restorerestores NuGet and npm dependencies.just buildtranspiles the chapters and converter to Python.just generaterebuilds individual chapter Markdown;just blogpostrebuildsdocs/blogpost.md.just watchrecompiles chapter sources during development.just test-allruns the Expecto suite on .NET and the Pyxpecto build on Python. Usejust testorjust test-pythonfor one target.just formatapplies Fantomas to F# and Ruff to generated Python;just lintchecks generated Markdown.just allruns the complete restore, generation, formatting, and lint pipeline, but not tests.
Use four-space indentation and let Fantomas format .fs files according to .editorconfig. Follow F# conventions: PascalCase for modules, types, and chapter filenames; camelCase for values and functions. Keep examples compatible with both .NET and Fable.Python unless a chapter explicitly demonstrates target-specific interop. Use Ruff for generated Python and markdownlint for generated documentation.
Tests use Expecto on .NET and Fable.Pyxpecto on Python. Add focused cases to Fable.Literate.Tests/Tests.fs, group them in descriptive testList values, and name cases as behaviors, such as "parses simple markdown block". Run just test-all before submitting changes to the converter or generation pipeline.
Recent history uses short, imperative Conventional Commit prefixes such as feat:, fix:, docs:, and chore:. Keep each commit scoped. Pull requests should summarize the source change, note generated documentation updates, and list validation commands. Include the rebuilt docs/blogpost.md when chapter output changes; link relevant issues and add screenshots only when rendered output needs visual review.