This repository contains multiple independently publishable Python packages:
code2logic- core analyzer and format generatorlolm- LLM provider management (shared by other packages)logic2test- test generation from Code2Logic outputlogic2code- code generation from Code2Logic output
You can work with each package independently (inside its folder), or manage everything from the repository root.
# Install code2logic (dev)
make install-dev
# Install all subpackages (dev)
make install-subpackages# Test only code2logic
make test
# Test all packages (code2logic + lolm + logic2test + logic2code)
make test-all
# Test only subpackages
make test-subpackages# Build code2logic
make build
# Build all subpackages
make build-subpackages# Publish single package
make publish # code2logic
make publish-lolm
make publish-logic2test
make publish-logic2code
# Publish all packages
make publish-all
# TestPyPI
make publish-test
make publish-all-testmake version
make version-allEach package contains its own Makefile and pyproject.toml.
Example:
cd lolm
make install-dev
make test
make build
make publishWorkflow file:
.github/workflows/packages.yml
- Runs tests for
lolm,logic2test,logic2codeon pushes/PRs (paths filtered) - Publishes packages on GitHub Releases when the tag matches the package prefix
lolm-vX.Y.Zpublisheslolmlogic2test-vX.Y.Zpublisheslogic2testlogic2code-vX.Y.Zpublisheslogic2code
Set these repository secrets:
PYPI_API_TOKEN_LOLMPYPI_API_TOKEN_LOGIC2TESTPYPI_API_TOKEN_LOGIC2CODE
logic2codedepends onlogic2test(shared parsers)- LLM support in
logic2codeuseslolm(optional dependency)
# 1. Analyze source project into a logic file
code2logic src/ -f hybrid -o out/code2logic/project.c2l.hybrid.yaml
# 2. Generate tests
python -m logic2test out/code2logic/project.c2l.hybrid.yaml -o out/logic2test/tests/ --type all
# 3. Generate code scaffolds (or regenerate)
python -m logic2code out/code2logic/project.c2l.hybrid.yaml -o out/logic2code/generated_code/
# 4. Run all tests across monorepo
make test-all