Skip to content

Issue 64 uv #83

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 11 commits into from
May 18, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
39 changes: 19 additions & 20 deletions .github/workflows/python-publish-pypi.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# This workflow will upload a Python Package using Twine when a release is created
# This workflow will upload a Python Package using uv
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python#publishing-to-package-registries

# This workflow uses actions that are not certified by GitHub.
Expand All @@ -10,30 +10,29 @@ name: Upload Python Package To Actual PyPI

on:
workflow_dispatch:

permissions:
contents: read

jobs:
deploy:
runs-on: ubuntu-latest
permissions:
id-token: write # IMPORTANT: mandatory for trusted publishing
id-token: write # IMPORTANT: mandatory for trusted publishing
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v3
with:
python-version: 3.11
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install build
- name: Build package
run: python -m build
- name: Publish package
uses: pypa/gh-action-pypi-publish@release/v1
with:
user: __token__
password: ${{ secrets.PYPI_API_TOKEN }}

- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v3
with:
python-version: 3.11
- name: Install uv
run: curl -LsSf https://astral.sh/uv/install.sh | sh
- name: Add uv to PATH
run: echo "$HOME/.cargo/bin" >> $GITHUB_PATH
- name: Build package
run: uv build
- name: Publish package
uses: pypa/gh-action-pypi-publish@release/v1
with:
user: __token__
password: ${{ secrets.PYPI_API_TOKEN }}
38 changes: 18 additions & 20 deletions .github/workflows/python-publish-testpypi.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# This workflow will upload a Python Package using Twine when a release is created
# This workflow will upload a Python Package using uv
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python#publishing-to-package-registries

# This workflow uses actions that are not certified by GitHub.
Expand All @@ -10,30 +10,28 @@ name: Upload Python Package To Test PyPI

on:
workflow_dispatch:

permissions:
contents: read

jobs:
deploy:
runs-on: ubuntu-latest
permissions:
id-token: write # IMPORTANT: mandatory for trusted publishing
id-token: write # IMPORTANT: mandatory for trusted publishing
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v3
with:
python-version: 3.11
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install build
- name: Build package
run: python -m build
- name: Publish package
uses: pypa/gh-action-pypi-publish@release/v1
with:
user: __token__
password: ${{ secrets.TEST_PYPI_API_TOKEN }}
repository-url: https://test.pypi.org/legacy/
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v3
with:
python-version: 3.11
- name: Install uv
run: curl -LsSf https://astral.sh/uv/install.sh | sh
- name: Build package
run: uv build
- name: Publish package
uses: pypa/gh-action-pypi-publish@release/v1
with:
user: __token__
password: ${{ secrets.TEST_PYPI_API_TOKEN }}
repository-url: https://test.pypi.org/legacy/
22 changes: 14 additions & 8 deletions .github/workflows/test-dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,9 @@ jobs:
# python-version: 3.11
- os: ubuntu-latest
python-version: 3.12

- os: ubuntu-latest
python-version: 3.13

runs-on: ${{ matrix.os }}

steps:
Expand All @@ -37,19 +39,23 @@ jobs:
with:
python-version: ${{ matrix.python-version }}

- name: Install uv
run: curl -LsSf https://astral.sh/uv/install.sh | sh

- name: Install dependencies
run: pip install -r tests/requirements.txt
run: |
uv venv .venv
source .venv/bin/activate
uv pip sync tests/uv.lock
uv pip install coverage

- name: Run unit tests and generate coverage report
run: |
pip install coverage
coverage run -m unittest discover -s tests -p 'test_*.py'
coverage report -m
source .venv/bin/activate
uv run coverage run -m unittest discover -s tests -p 'test_*.py'
uv run coverage report -m

- name: Upload coverage report to codecov
uses: codecov/codecov-action@v4.0.1
with:
token: ${{ secrets.CODECOV_TOKEN }}



25 changes: 13 additions & 12 deletions .github/workflows/test-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,8 @@ on:
branches:
- release


jobs:
test:

strategy:
matrix:
include:
Expand All @@ -22,7 +20,7 @@ jobs:
# python-version: 3.11
- os: ubuntu-latest
python-version: 3.12

runs-on: ${{ matrix.os }}

steps:
Expand All @@ -34,15 +32,18 @@ jobs:
with:
python-version: ${{ matrix.python-version }}

- name: Install uv
run: curl -LsSf https://astral.sh/uv/install.sh | sh

- name: Install dependencies
run: |
pip install -r tests/requirements.txt
pip install jsonschema
pip install -i https://test.pypi.org/simple/ hololinked

run: |
uv venv .venv
source .venv/bin/activate
uv pip sync tests/uv.lock
uv pip install jsonschema
uv pip install --index-url https://test.pypi.org/simple/ hololinked

- name: Run unit tests to verify if the release to TestPyPI is working
run: |
python -m unittest discover -s tests -p 'test_*.py'



source .venv/bin/activate
uv run python -m unittest discover -s tests -p 'test_*.py'
6 changes: 5 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -172,4 +172,8 @@ cython_debug/
# be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
# and can be added to the global gitignore or merged into this file. For a more nuclear
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
#.idea/
#.idea/

# UV related files
.uv/
venv/
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,13 @@ This release will contain a lot of new features and improvements so that a versi
Not finalised:
- cookie auth & its specification in TD (cookie auth branch)

## [v0.2.12] - 2025-05-18
- virtual environment with `uv` package manager:
⚡ Faster onboarding: New contributors can setup environments in seconds
📦 Consistent installations: Precise dependency resolution avoids "works on my machine" issues
🧪 Efficient testing: uv run executes tests with minimal overhead
please report bugs if any as this is the first iteration of this feature.

## [v0.2.11] - 2025-04-25

- new feature - support for JSON files as backup for property values (use with `db_commit`, `db_persist` and `db_init`). Compatible only with JSON serializable properties.
Expand Down
Loading
Loading