Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 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
27 changes: 27 additions & 0 deletions .github/workflows/publish-client.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: Build and Publish Client to PyPI
on:
release:
types: [published]
jobs:
build-and-publish-client:
runs-on: ubuntu-latest
environment:
name: pypi
url: https://pypi.org/p/pydicomweb-client
permissions:
id-token: write
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Install uv
uses: astral-sh/setup-uv@v6
with:
version: "0.7.2"
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version-file: "pyproject.toml"
- name: Build wheel and sdist
run: uv build
- name: Publish package distributions to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
20 changes: 9 additions & 11 deletions .github/workflows/run_unit_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,18 +28,16 @@ jobs:
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
python-version: ${{ matrix.python-version }}
- name: Install uv
uses: astral-sh/setup-uv@v6
with:
version: "0.7.2"
- name: Install dependencies
run: |
python -m pip install --upgrade pip setuptools
pip install '.[test]'
pip install .
run: uv sync
- name: Lint with flake8
run: |
flake8 --exclude='bin,build,.eggs'
run: uv run flake8 src tests --exclude=.venv,build,.eggs
- name: Check type hints with mypy
run: |
mypy src tests
run: uv run mypy src tests
- name: Test with pytest
run: |
pytest --cov=dicomweb_client --cov-fail-under=65 tests
run: uv run pytest --cov=dicomweb_client --cov-fail-under=65 tests
26 changes: 16 additions & 10 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,13 +1,9 @@
[build-system]
requires = ["setuptools>=64"]
build-backend = "setuptools.build_meta"

[project]
name = "dicomweb-client"
version = "0.59.3"
dynamic = [ "version" ]
description = "Client for DICOMweb RESTful services."
readme = "README.md"
requires-python = ">=3.6"
requires-python = ">=3.9"
authors = [
{ name = "Markus D. Herrmann" },
]
Expand All @@ -28,9 +24,6 @@ classifiers = [
"Topic :: Multimedia :: Graphics",
"Topic :: Scientific/Engineering :: Information Analysis",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.6",
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
Expand All @@ -51,8 +44,11 @@ gcp = [
"dataclasses>=0.8; python_version=='3.6'",
"google-auth>=1.6",
]
test = [

[dependency-groups]
dev = [
"mypy==0.982",
"flake8==6.1.0",
"pytest==7.1.3",
"pytest-cov==3.0.0",
"pytest-flake8==1.1.3",
Expand Down Expand Up @@ -98,3 +94,13 @@ ignore_missing_imports = true
[[tool.mypy.overrides]]
module = "retrying.*"
ignore_missing_imports = true

[tool.uv-dynamic-versioning]
pattern = "default-unprefixed"

[tool.hatch.version]
source = "uv-dynamic-versioning"

[build-system]
requires = ["hatchling", "uv-dynamic-versioning"]
build-backend = "hatchling.build"
Loading