Classifier Experiments is a toolkit for developing docket classification pipelines.
See the quickstart below. For more detail, check out the documentation for the core modules:
Some CLI commands generate or pull cached data into your clx home directory. This defaults to ~/clx and can be configured with the CLX_HOME environment variable. See the Data Branch for more details.
To install the clx package, first clone this repo:
git clone https://github.com/freelawproject/classifier-experiments
cd classifier-experimentsThen you can install with uv:
uv syncor pip:
pip install -e .It is recommended to run clx config --autoload-env on after installing the package. See below for more details.
The package can be configured through environment variables or a .env file. See .env.example for a complete list of configuration options.
The easiest way to make sure your environment variables are always loaded is to run the following once:
clx config --autoload-env onThis will update your package config to automatically load your .env file with python-dotenv.
TODO
# Using models outside of Django
from clx.models import DocketEntry
print(DocketEntry.objects.all().count())Here are a few tips for setting up your development environment.
You can set CLX_HOME=home in your environment if you want to use the home directory in this repo. Otherwise, it will default to ~/clx.
Install with the dev extra to include development dependencies:
uv sync --extra devor
pip install -e '.[dev]'Run the following to install the pre-commit hooks:
pre-commit installOr you can run pre-commit manually before committing your changes:
pre-commit run --all-filesRun the tests with:
tox runOr to run a specific test, give the module path as an argument:
tox run -- tests.test_env.EnvTest.test_envThis repository is available under the permissive BSD license, making it easy and safe to incorporate in your own libraries.
- Python 3.13+