cf2e80ba51
* Use the newer "pyproject.toml" for syntax highlighters * Use venv for everything (previously, the pygment lexers were installed globally, but more recent Python releases frown upon that. This will probably be more stable in the long run...) * Use one venv at the root of the project (`_python_venv/`) for both pygments and the runtime * Initialise this venv automatically from the Makefile (it should no longer be necessary to run scattered `set_up.sh` scripts with mysterious interactions) On the downsides, though: * Only tested with Python 3.11 at the moment * Need to remember to activate the venv (`. _python_venv/bin/activate`) from the root for e.g. HTML literate output to work. A more manageable solution could be for Catala to provide the lexers on-the-fly when calling `pygmentize`. |
||
---|---|---|
.. | ||
catala_legifrance | ||
js | ||
ocaml | ||
python | ||
README.md |
French Law Libraries
This folder presents a working example of how Catala could be distributed and deployed inside existing applications. Each sub-folder is specialized for a particular programming language, and features a ready-to-use library of all the French public algorithms coded up using Catala so far.
General principles
Let us say you want to deploy a Catala program inside an application written
in programming language X. The Catala compiler will translate the source
Catala program into X, yielding a new .x
source code file. This .x
file
will export functions corresponding to the scopes of the original Catala
program. You can then reuse those exported functions in your application written
in X.
OCaml
To see how to deploy Catala programs as an OCaml library, see the dedicated readme.
JS
To see how to deploy Catala programs as a JS library, see the dedicated readme.
Python
To see how to deploy Catala programs as a Python library, see the dedicated readme.