.PHONY: setup create_molpile create_gdb create_zinc test

SHELL := /bin/bash

setup:
    # check all required programs are available
	@uv --version >/dev/null 2>&1 || (echo "uv is not installed, please install it" && exit 1)
	@aria2c --version >/dev/null 2>&1 || (echo "aria2 is not installed, please install it" && exit 1)
	@rg --version >/dev/null 2>&1 || (echo "ripgrep is not installed, please install it" && exit 1)
	@unzip -v >/dev/null 2>&1 || (echo "unzip is not installed, please install it" && exit 1)

    # set up virtual environment and install dependencies
	uv sync --all-groups
	uv run pre-commit install

create_molpile:
	uv run python main_molpile.py

create_gdb:
	uv run python main_gdb.py

create_zinc:
	uv run python main_zinc.py

test:
	uv run pre-commit run --all-files
