Commit 5ea8d17b authored by Olivier's avatar Olivier Committed by oroulet

use uv in CI

parent c773b51a
......@@ -10,45 +10,56 @@ on:
branches: [master]
jobs:
build:
lint:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: ["3.10", "3.13", "pypy-3.10"]
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v3
with:
submodules: true
- name: Set up Python ${{ matrix.python-version }}
- name: Install uv
uses: astral-sh/setup-uv@v3
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
python-version: "3.13"
- name: Install the project
run: |
python -m pip install --upgrade pip
python -m pip install pytest mypy ruff
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
if [ -f dev_requirements.txt ]; then pip install -r dev_requirements.txt; fi
- name: Test with pytest
uv sync --all-extras --dev
uv tool install pre-commit
- name: Lint with ruff
run: |
pytest -v -s
uvx pre-commit run -a
lint:
build:
runs-on: ubuntu-latest
needs: lint
strategy:
fail-fast: false
matrix:
python-version: ["3.9", "3.10", "pypy-3.10"]
steps:
- uses: actions/checkout@v4
with:
submodules: true
- name: Install uv
uses: astral-sh/setup-uv@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: "3.12"
python-version: ${{ matrix.python-version }}
- name: Install the project
run: uv sync --all-extras --dev
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install pre-commit
- name: Lint with ruff
run: |
pre-commit run -a
uv tool install mypy
uv tool install ruff
- name: Run tests
run: uv run pytest -v -s tests
[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"
[project]
dependencies = [
"aiofiles",
"aiosqlite",
"cryptography>42.0.0",
"pyOpenSSL>23.2.0",
"python-dateutil",
"pytz",
"sortedcontainers",
"typing-extensions",
"wait_for2==0.3.2;python_version<'3.12'",
]
version = "1.1.5"
name = "asyncua"
description = "Pure Python OPC-UA client and server library"
requires-python = ">=3.10"
requires-python = ">=3.9"
readme = "README.md"
license = { text = "GNU Lesser General Public License v3 or later" }
authors = [
......@@ -13,22 +29,27 @@ classifiers = [
"Intended Audience :: Developers",
"License :: OSI Approved :: GNU Lesser General Public License v3 or later (LGPLv3+)",
"Operating System :: OS Independent",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Topic :: Software Development :: Libraries :: Python Modules",
]
dependencies = [
"aiofiles",
"aiosqlite",
"cryptography>42.0.0",
"pyOpenSSL>23.2.0",
"python-dateutil",
"pytz",
"sortedcontainers",
"typing-extensions",
"wait_for2==0.3.2",
[tool.uv]
dev-dependencies = [
"pytest",
"pytest-asyncio == 0.21.2",
"coverage",
"pytest-cov",
"pytest-repeat",
"pytest-mock",
"asynctest",
"types-aiofiles",
"types-pyOpenSSL",
"types-python-dateutil",
"types-pytz",
]
[project.scripts]
......@@ -46,9 +67,13 @@ uawrite = "asyncua.tools:uawrite"
[project.urls]
Homepage = "http://freeopcua.github.io/"
[tool.hatch.version]
path = "asyncua/__init__.py"
Repository = "https://github.com/FreeOpcUa/opcua-asyncio"
[tool.hatch.build.targets.sdist]
include = ["/asyncua"]
[tool.ruff]
line-length = 120
[tool.ruff.format]
quote-style = "preserve"
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment