Skip to content

Commit

Permalink
Migrate to UV
Browse files Browse the repository at this point in the history
  • Loading branch information
Tpt committed Nov 2, 2024
1 parent 75f49e5 commit c595bf4
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 14 deletions.
38 changes: 25 additions & 13 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,51 +9,63 @@ on:
types:
- published

env:
UV_SYSTEM_PYTHON: 1

jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: astral-sh/setup-uv@v3
with:
enable-cache: true
- uses: actions/setup-python@v5
with:
python-version: 3.13
cache: pip
- run: pip install --upgrade pre-commit
python-version-file: "pyproject.toml"
- run: uv pip install --upgrade pre-commit
- run: pre-commit run --all-files

test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: astral-sh/setup-uv@v3
with:
enable-cache: true
- uses: actions/setup-python@v5
with:
python-version: 3.13
cache: pip
- run: pip install . && pip install -r requirements-dev.txt
python-version-file: "pyproject.toml"
- run: uv sync
- run: python -m unittest
working-directory: ./tests

test_msv:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: astral-sh/setup-uv@v3
with:
enable-cache: true
- uses: actions/setup-python@v5
with:
python-version: 3.8
cache: pip
- run: pip install . && pip install -r requirements-dev.txt && pip install 'rdflib==6.3.0'
- run: uv sync --resolution lowest-direct
- run: python -m unittest
working-directory: ./tests

codecov:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: astral-sh/setup-uv@v3
with:
enable-cache: true
- uses: actions/setup-python@v5
with:
python-version: 3.13
cache: pip
- run: pip install -e . && pip install pytest pytest-cov -r requirements-dev.txt
python-version-file: "pyproject.toml"
- run: uv sync --extra coverage
- run: pytest --cov --cov-report=xml
- uses: codecov/codecov-action@v4
with:
Expand All @@ -69,10 +81,10 @@ jobs:
id-token: write
steps:
- uses: actions/checkout@v4
- uses: astral-sh/setup-uv@v3
- uses: actions/setup-python@v5
with:
python-version: 3.13
cache: pip
- run: pip install build
python-version-file: "pyproject.toml"
- run: uv pip install build
- run: python -m build --sdist --wheel --outdir dist/ .
- uses: pypa/gh-action-pypi-publish@release/v1
4 changes: 4 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,10 @@ name = "oxrdflib"
readme = "README.md"
requires-python = ">=3.8"

[project.optional-dependencies]
coverage = ["pytest", "pytest-cov"]
dev = ["requests"]

[project.entry-points."rdf.plugins.store"]
Oxigraph = "oxrdflib.store:OxigraphStore"
oxigraph = "oxrdflib.store:OxigraphStore"
Expand Down
1 change: 0 additions & 1 deletion requirements-dev.txt

This file was deleted.

0 comments on commit c595bf4

Please sign in to comment.