Skip to content

freelawproject/classifier-experiments

Repository files navigation

Classifier Experiments

Classifier Experiments is a toolkit for developing docket classification pipelines.

Documentation

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.

Installation

To install the clx package, first clone this repo:

git clone https://github.com/freelawproject/classifier-experiments
cd classifier-experiments

Then you can install with uv:

uv sync

or pip:

pip install -e .

It is recommended to run clx config --autoload-env on after installing the package. See below for more details.

Configuration

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 on

This will update your package config to automatically load your .env file with python-dotenv.

Quickstart

TODO

# Using models outside of Django
from clx.models import DocketEntry

print(DocketEntry.objects.all().count())

Development

Here are a few tips for setting up your development environment.

Configure Data Directory

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.

Dependencies

Install with the dev extra to include development dependencies:

uv sync --extra dev

or

pip install -e '.[dev]'

Pre-commit Hooks

Run the following to install the pre-commit hooks:

pre-commit install

Or you can run pre-commit manually before committing your changes:

pre-commit run --all-files

Testing

Run the tests with:

tox run

Or to run a specific test, give the module path as an argument:

tox run -- tests.test_env.EnvTest.test_env

License

This repository is available under the permissive BSD license, making it easy and safe to incorporate in your own libraries.

Requirements

  • Python 3.13+

About

A place for tools and experiments for creating classifiers.

Resources

License

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •