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

use uv in CI

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