<commit_before># Shortcut to refer to programs in the virtual environment during development
VE := venv/bin

# Python command to use for venv setup
PYTHON ?= python3

# Build virtual environment
venv: requirements.txt requirements-dev.txt
	$(PYTHON) -m venv venv
	$(VE)/pip3 install -r requirements.txt
	$(VE)/pip3 install -r requirements-dev.txt
	touch venv

# Format code
format: venv
	$(VE)/black .

# Lint code
lint: venv
	$(VE)/black --check .
	$(VE)/flake8
	$(VE)/mypy --config-file pyproject.toml .
	$(VE)/pydocstyle --match-dir='^(?!venv)'

# Run `overseer.py` during development to check configuration.
run: venv
	BROKER_URL=amqp://stencila:password@localhost:5672/stencila \
	MANAGER_URL=http://staff:staff@localhost:8000 \
	$(VE)/python3 overseer.py

# Run `celery flower` during development.
flower: venv
	$(VE)/celery flower --broker=amqp://stencila:password@localhost:5672/stencila
<commit_msg>chore(Overseer): Run with debug logging during development<commit_after># Shortcut to refer to programs in the virtual environment during development
VE := venv/bin

# Python command to use for venv setup
PYTHON ?= python3

# Build virtual environment
venv: requirements.txt requirements-dev.txt
	$(PYTHON) -m venv venv
	$(VE)/pip3 install -r requirements.txt
	$(VE)/pip3 install -r requirements-dev.txt
	touch venv

# Format code
format: venv
	$(VE)/black .

# Lint code
lint: venv
	$(VE)/black --check .
	$(VE)/flake8
	$(VE)/mypy --config-file pyproject.toml .
	$(VE)/pydocstyle --match-dir='^(?!venv)'

# Run `overseer.py` during development to check configuration.
run: venv
	BROKER_URL=amqp://stencila:password@localhost:5672/stencila \
	MANAGER_URL=http://staff:staff@localhost:8000 \
	DEBUG=1 $(VE)/python3 overseer.py

# Run `celery flower` during development.
flower: venv
	$(VE)/celery flower --broker=amqp://stencila:password@localhost:5672/stencila

{'fraction_non_alphanumeric': 0.1337613697164259, 'fraction_numerical': 0.018726591760299626, 'mean_word_length': 4.632530120481928, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1409730', 'n_tokens_mistral': 672, 'n_tokens_neox': 645, 'n_words': 173}