package_name := "corel_asyncio"

# Default target: Print the list of commands.
_default:
    just --list --unsorted

# Install the concrete dependencies from the requirements.txt.
requirements:
    UV_GIT_LFS=1 uv pip install --reinstall --upgrade -r requirements.txt

# Install the package
install:
    uv pip install .

# Install the package in development/editable mode.
develop:
    uv pip install -e '.[dev]'

# Uninstall the package.
uninstall:
    uv pip uninstall {{package_name}}

# Clean generated files and uninstall the package.
clean: uninstall
    rm -rf $(python -c "import site; print(site.getsitepackages()[0])")/{{package_name}}*
    rm -rf build dist src/*.egg-info

# Run pytest.
pytest:
    pytest -vvv --color=yes

# Run all tests.
test: pytest

# Run all tests with coverage report
test-cov:
	pytest -vvv --color=yes --cov=corel_asyncio --cov-report=term-missing --cov-report=xml:artifacts/coverage.xml --cov-report=html:artifacts/coverage_html

# Run the pre-commit hooks.
pre-commit:
    pre-commit run --all-files

# Run the type checker.
type-check:
    MYPY_FORCE_COLOR=1 TERM=xterm-color mypy --strict -p {{package_name}} -p tests
