Skip to main content

No project description provided

Project description

catleg

A library of helper tools for catala programming in the context of French legislative texts.

Installing

catleg is not released on PyPI yet ; install it by running pip install -e . from a source clone.

Running catleg

Run catleg --help for a list of commands.

Legifrance credentials

catleg uses the Legifrance API (though we hope to provide our own API soon!) to access French legislative texts.

This API is authenticated and requires credentials, which may be obtained by registering on the Piste portal.

To provide credentials to catleg, create a .catleg_secrets.toml file like so:

lf_client_id = "your_client_id"
lf_client_secret = "your_client_secret"

Alternatively, you may define the environment variables CATLEG_LF_CLIENT_ID and CATLEG_LF_CLIENT_SECRET.

Development install

Run pip install -e .[dev] for a local, editable install that includes development dependencies.

catleg uses tox to run linters and unit tests in various environments.

Run tox to execute tests and linters.

Formatting and import ordering is done by µFmt which is basically black + µsort.

Pre-commit hook

To ensure code is always formatted before a commit, you can use the supplied pre-commit hook.

Run this once:

pre-commit install

Then, before every commit, the code will be reformatted automatically.

The pre-commit hook will also run the ruff linter.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

catleg-0.1.0rc1.tar.gz (16.8 kB view hashes)

Uploaded Source

Built Distribution

catleg-0.1.0rc1-py3-none-any.whl (20.7 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page