Skip to content

Commit fd39bee

Browse files
authored
Add support for JSON5 config input (#28)
* Add pyjson5 dep * Read config file using `pyjson5`
1 parent b569353 commit fd39bee

File tree

3 files changed

+69
-5
lines changed

3 files changed

+69
-5
lines changed

compass/cli.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,14 @@
11
"""Ordinances CLI"""
22

33
import sys
4-
import json
54
import click
65
import asyncio
76
import logging
87
import multiprocessing
98
from pathlib import Path
109

10+
import pyjson5
11+
1112
from compass import __version__
1213
from compass.process import process_counties_with_openai
1314

@@ -40,7 +41,7 @@ def main(ctx):
4041
def process(config, verbose):
4142
"""Download and extract ordinances for a list of counties"""
4243
with Path(config).open(encoding="utf-8") as fh:
43-
config = json.load(fh)
44+
config = pyjson5.decode_io(fh)
4445

4546
if verbose:
4647
for lib in ["compass", "elm"]:

0 commit comments

Comments
 (0)