chore: housekeeping (#202)

This commit is contained in:
Lam Chau
2024-10-29 16:00:35 -07:00
committed by GitHub
parent 40da95b3e9
commit 7285cbbca3
3 changed files with 14 additions and 19 deletions

5
.gitignore vendored
View File

@@ -104,7 +104,7 @@ celerybeat.pid
.venv
# exception for local langfuse init vars
!**/packages/exchange/.env.langfuse.local
!**/packages/exchange/.env.langfuse.local
# Spyder project settings
.spyderproject
@@ -130,3 +130,6 @@ docs/docs/reference
# uv lock file
uv.lock
# local files
.DS_Store

View File

@@ -1,25 +1,18 @@
# list all tasks
default:
@just --list --unsorted
@just --list
# run tests
test *FLAGS:
#! /usr/bin/env bash
uv run pytest tests -m "not integration" {{ FLAGS }}
if ! git diff --quiet pyproject.toml; then
uv run pytest .github/workflows {{ FLAGS }}
fi
@uv run pytest .github/workflows/ tests/ -m "not integration" {{ FLAGS }}
# run integration tests
integration *FLAGS:
uv run pytest tests -m integration {{ FLAGS }}
@uv run pytest tests/ -m integration {{ FLAGS }}
# check licenses
check-licenses:
#!/usr/bin/env bash
if ! git diff --quiet pyproject.toml; then
uv run .github/workflows/scripts/check_licenses.py pyproject.toml
fi
@uv run .github/workflows/scripts/check_licenses.py pyproject.toml packages/exchange/pyproject.toml
# format code
format:
@@ -37,13 +30,13 @@ format:
# run tests with coverage
coverage *FLAGS:
uv run coverage run -m pytest tests -m "not integration" {{ FLAGS }}
uv run coverage report
uv run coverage lcov -o lcov.info
@uv run coverage run -m pytest tests/ -m "not integration" {{ FLAGS }}
@uv run coverage report
@uv run coverage lcov -o lcov.info
# build docs
docs:
uv sync && uv run mkdocs serve
@uv sync && uv run mkdocs serve
# install pre-commit hooks
install-hooks:
@@ -89,8 +82,7 @@ release version:
# extract tag from pyproject.toml
get-tag-version:
#!/usr/bin/env bash
uvx --from=toml-cli toml get --toml-path=pyproject.toml "project.version"
@uvx --from=toml-cli toml get --toml-path=pyproject.toml "project.version"
# create tag from pyproject.toml
tag:

View File

@@ -256,4 +256,4 @@ def test_prompt_overwrite_session(session_factory):
check_overwrite_behavior(
choice="r",
expected_messages=[Message.user(text="duck duck"), Message.user(text="goose")],
) #
)