Skip to content

Commit

Permalink
Migrate to UV
Browse files Browse the repository at this point in the history
  • Loading branch information
Tpt committed Jan 12, 2025
1 parent fe9b8ee commit 868b4e9
Show file tree
Hide file tree
Showing 6 changed files with 20 additions and 37 deletions.
40 changes: 10 additions & 30 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,47 +14,31 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: 3.13
cache: pip
- run: pip install --upgrade pre-commit
- run: pre-commit run --all-files
- uses: astral-sh/setup-uv@v3
- run: uv run --with pre-commit pre-commit run --all-files

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

test_msv:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- 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: python -m unittest
- uses: astral-sh/setup-uv@v3
- run: uv run --python 3.8 --resolution lowest-direct -m unittest
working-directory: ./tests

codecov:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- 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
- run: pytest --cov --cov-report=xml
- uses: astral-sh/setup-uv@v3
- run: uv run --extra coverage pytest --cov --cov-report=xml
- uses: codecov/codecov-action@v5
with:
token: ${{ secrets.CODECOV_TOKEN }}
Expand All @@ -69,10 +53,6 @@ jobs:
id-token: write
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: 3.13
cache: pip
- run: pip install build
- run: python -m build --sdist --wheel --outdir dist/ .
- uses: astral-sh/setup-uv@v3
- run: uv run --with build -m build --sdist --wheel --outdir dist/ .
- uses: pypa/gh-action-pypi-publish@release/v1
4 changes: 2 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,12 @@ repos:
- id: requirements-txt-fixer
- id: trailing-whitespace
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.7.2
rev: v0.9.1
hooks:
- id: ruff
args: [ --fix ]
- id: ruff-format
- repo: https://github.com/pre-commit/mirrors-mypy
rev: v1.13.0
rev: v1.14.1
hooks:
- id: mypy
4 changes: 2 additions & 2 deletions oxrdflib/parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,11 @@

__all__ = [
"OxigraphN3Parser",
"OxigraphTurtleParser",
"OxigraphNQuadsParser",
"OxigraphNTriplesParser",
"OxigraphRdfXmlParser",
"OxigraphTriGParser",
"OxigraphNQuadsParser",
"OxigraphTurtleParser",
]


Expand Down
4 changes: 2 additions & 2 deletions oxrdflib/serializer.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,11 @@

__all__ = [
"OxigraphN3Serializer",
"OxigraphTurtleSerializer",
"OxigraphNQuadsSerializer",
"OxigraphNTriplesSerializer",
"OxigraphRdfXmlSerializer",
"OxigraphTriGSerializer",
"OxigraphNQuadsSerializer",
"OxigraphTurtleSerializer",
]


Expand Down
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~=8.0", "pytest-cov>=5,<7"]
dev = ["requests~=2.0"]

[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 868b4e9

Please sign in to comment.