From c259dc7e34cfdbcdb24e797d7bbb80a6291c9757 Mon Sep 17 00:00:00 2001 From: Tobias Raabe Date: Mon, 16 Dec 2024 23:19:08 +0100 Subject: [PATCH 1/2] Use uvx to run tests. --- .github/workflows/main.yml | 20 ++++++++------------ 1 file changed, 8 insertions(+), 12 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 37dabc2d..13f5e56d 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -22,13 +22,11 @@ jobs: steps: - uses: actions/checkout@v4 - - uses: actions/setup-python@v5 + - uses: astral-sh/setup-uv@v4 with: python-version-file: .python-version - allow-prereleases: true - cache: pip - - run: pip install tox-uv - - run: tox -e typing + enable-cache: true + - run: uvx --with=tox-uv tox -e typing run-tests: @@ -43,12 +41,10 @@ jobs: steps: - uses: actions/checkout@v4 - - uses: actions/setup-python@v5 + - uses: astral-sh/setup-uv@v4 with: + enable-cache: true python-version: ${{ matrix.python-version }} - cache: pip - allow-prereleases: true - - run: pip install tox-uv - if: matrix.os == 'ubuntu-latest' run: | @@ -59,7 +55,7 @@ jobs: - name: Run unit tests and doctests. shell: bash -l {0} - run: tox -e test -- -m "unit or (not integration and not end_to_end)" --cov=src --cov=tests --cov-report=xml -n auto + run: uvx --with=tox-uv tox -e test -- -m "unit or (not integration and not end_to_end)" --cov=src --cov=tests --cov-report=xml -n auto - name: Upload unit test coverage reports to Codecov with GitHub Action uses: codecov/codecov-action@v5 @@ -68,7 +64,7 @@ jobs: - name: Run integration tests. shell: bash -l {0} - run: tox -e test -- -m integration --cov=src --cov=tests --cov-report=xml -n auto + run: uvx --with=tox-uv tox -e test -- -m integration --cov=src --cov=tests --cov-report=xml -n auto - name: Upload integration test coverage reports to Codecov with GitHub Action uses: codecov/codecov-action@v5 @@ -77,7 +73,7 @@ jobs: - name: Run end-to-end tests. shell: bash -l {0} - run: tox -e test -- -m end_to_end --cov=src --cov=tests --cov-report=xml -n auto + run: uvx --with=tox-uv tox -e test -- -m end_to_end --cov=src --cov=tests --cov-report=xml -n auto - name: Upload end_to_end test coverage reports to Codecov with GitHub Action uses: codecov/codecov-action@v5 From 08cd01efbd3166ccc48ad36ff8d631ce104fd1b0 Mon Sep 17 00:00:00 2001 From: Tobias Raabe Date: Wed, 18 Dec 2024 00:27:51 +0100 Subject: [PATCH 2/2] fix. --- .github/workflows/main.yml | 2 +- .gitignore | 4 ++++ pyproject.toml | 1 - 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 13f5e56d..ed259ba3 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -24,7 +24,7 @@ jobs: - uses: actions/checkout@v4 - uses: astral-sh/setup-uv@v4 with: - python-version-file: .python-version + python-version: "3.12" enable-cache: true - run: uvx --with=tox-uv tox -e typing diff --git a/.gitignore b/.gitignore index d23644a4..09ec68b5 100644 --- a/.gitignore +++ b/.gitignore @@ -27,3 +27,7 @@ tests/test_jupyter/*.txt .ruff_cache .venv docs/jupyter_execute + +.env +logs/ +__pycache__/ diff --git a/pyproject.toml b/pyproject.toml index 55d8f7fc..c049ef7c 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -31,7 +31,6 @@ dependencies = [ "rich", "sqlalchemy>=2", 'tomli>=1; python_version < "3.11"', - 'typing-extensions; python_version < "3.9"', "universal-pathlib>=0.2.2", ]