Skip to content

Commit

Permalink
Update workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
scaramallion committed Aug 11, 2024
1 parent fb366ce commit aec6bfa
Show file tree
Hide file tree
Showing 7 changed files with 31 additions and 158 deletions.
52 changes: 6 additions & 46 deletions .github/workflows/merge-pytest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,26 +51,13 @@ jobs:
id: setup-python
with:
python-version: ${{ matrix.python-version }}
- name: Install poetry
uses: snok/install-poetry@v1
with:
virtualenvs-create: true
virtualenvs-in-project: true
installer-parallel: true
- name: Load cached venv
id: cached-poetry-dependencies
uses: actions/cache@v4
with:
path: .venv
key: venv-${{ runner.os }}-${{ steps.setup-python.outputs.python-version }}-${{ hashFiles('**/poetry.lock') }}
- name: Install dependencies
run: poetry install --no-interaction --extras tests
run: pip install .[tests]
- name: Test with pytest
env:
PYTHON_VERSION: ${{ matrix.python-version }}
run: |
poetry run pytest --cov pynetdicom --ignore=pynetdicom/apps &&
poetry run coverage xml
pytest --cov pynetdicom --ignore=pynetdicom/apps && coverage xml
- name: Send coverage results
if: success()
uses: codecov/codecov-action@v4
Expand All @@ -95,29 +82,16 @@ jobs:
id: setup-python
with:
python-version: ${{ matrix.python-version }}
- name: Install poetry
uses: snok/install-poetry@v1
with:
virtualenvs-create: true
virtualenvs-in-project: true
installer-parallel: true
- name: Load cached venv
id: cached-poetry-dependencies
uses: actions/cache@v4
with:
path: .venv
key: venv-${{ runner.os }}-${{ steps.setup-python.outputs.python-version }}-${{ hashFiles('**/poetry.lock') }}
- name: Install dependencies
run: poetry install --no-interaction --extras tests
run: pip install .[tests]
- name: Switch to development pydicom
run: |
pip install git+https://github.com/pydicom/pydicom
- name: Test with pytest
env:
PYTHON_VERSION: ${{ matrix.python-version }}
run: |
poetry run pytest --cov pynetdicom --ignore=pynetdicom/apps &&
poetry run coverage xml
pytest --cov pynetdicom --ignore=pynetdicom/apps && coverage xml
- name: Send coverage results
if: success()
uses: codecov/codecov-action@v4
Expand All @@ -142,28 +116,14 @@ jobs:
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install poetry
uses: snok/install-poetry@v1
with:
virtualenvs-create: true
virtualenvs-in-project: true
installer-parallel: true
- name: Load cached venv
id: cached-poetry-dependencies
uses: actions/cache@v4
with:
path: .venv
key: venv-${{ runner.os }}-${{ steps.setup-python.outputs.python-version }}-${{ hashFiles('**/poetry.lock') }}
- name: Install dependencies
run: |
poetry install --no-interaction --extras tests &&
poetry run pip list
pip install -e .[tests]
- name: Test with pytest
env:
PYTHON_VERSION: ${{ matrix.python-version }}
run: |
poetry run pytest --cov pynetdicom --ignore=pynetdicom/apps &&
poetry run coverage xml
pytest --cov pynetdicom --ignore=pynetdicom/apps && coverage xml
- name: Send coverage results
if: success()
uses: codecov/codecov-action@v4
Expand Down
16 changes: 2 additions & 14 deletions .github/workflows/merge-typing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,20 +21,8 @@ jobs:
id: setup-python
with:
python-version: ${{ matrix.python-version }}
- name: Install poetry
uses: snok/install-poetry@v1
with:
virtualenvs-create: true
virtualenvs-in-project: true
installer-parallel: true
- name: Load cached venv
id: cached-poetry-dependencies
uses: actions/cache@v4
with:
path: .venv
key: venv-${{ runner.os }}-${{ steps.setup-python.outputs.python-version }}-${{ hashFiles('**/poetry.lock') }}
- name: Install dependencies
run: poetry install --no-interaction --no-root --extras dev
run: pip install .[dev]
- name: Run typing check with mypy
run: |
poetry run mypy
mypy
19 changes: 3 additions & 16 deletions .github/workflows/pr-pytest-apps.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,29 +23,16 @@ jobs:
id: setup-python
with:
python-version: ${{ matrix.python-version }}
- name: Install poetry
uses: snok/install-poetry@v1
with:
virtualenvs-create: true
virtualenvs-in-project: true
installer-parallel: true
- name: Load cached venv
id: cached-poetry-dependencies
uses: actions/cache@v4
with:
path: .venv
key: venv-${{ runner.os }}-${{ steps.setup-python.outputs.python-version }}-${{ hashFiles('**/poetry.lock') }}
- name: Install dependencies
run: poetry install --no-interaction --extras tests
run: pip install -e .[tests]
- name: Switch to development pydicom
run: |
pip install git+https://github.com/pydicom/pydicom &&
poetry run pip list
pip install git+https://github.com/pydicom/pydicom
- name: Test with pytest
env:
PYTHON_VERSION: ${{ matrix.python-version }}
run: |
poetry run pytest -x --ignore=pynetdicom/tests
pytest -x --ignore=pynetdicom/tests
# pydicom-release:
# runs-on: ubuntu-latest
Expand Down
56 changes: 8 additions & 48 deletions .github/workflows/pr-pytest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,29 +54,16 @@ jobs:
id: setup-python
with:
python-version: ${{ matrix.python-version }}
- name: Install poetry
uses: snok/install-poetry@v1
with:
virtualenvs-create: true
virtualenvs-in-project: true
installer-parallel: true
- name: Load cached venv
id: cached-poetry-dependencies
uses: actions/cache@v4
with:
path: .venv
key: venv-${{ runner.os }}-${{ steps.setup-python.outputs.python-version }}-${{ hashFiles('**/poetry.lock') }}
- name: Install dependencies
run: poetry install --no-interaction --extras tests
run: pip install -e .[tests]
- name: Get OpenSSL version
run: |
poetry run python -c "import ssl; print('OpenSSL:', ssl.OPENSSL_VERSION_INFO)"
python -c "import ssl; print('OpenSSL:', ssl.OPENSSL_VERSION_INFO)"
- name: Test with pytest
env:
PYTHON_VERSION: ${{ matrix.python-version }}
run: |
poetry run pytest -x --cov pynetdicom --ignore=pynetdicom/apps &&
poetry run coverage xml
pytest -x --cov pynetdicom --ignore=pynetdicom/apps && coverage xml
- name: Send coverage results
if: ${{ success() }}
uses: codecov/codecov-action@v4
Expand All @@ -99,29 +86,16 @@ jobs:
id: setup-python
with:
python-version: ${{ matrix.python-version }}
- name: Install poetry
uses: snok/install-poetry@v1
with:
virtualenvs-create: true
virtualenvs-in-project: true
installer-parallel: true
- name: Load cached venv
id: cached-poetry-dependencies
uses: actions/cache@v4
with:
path: .venv
key: venv-${{ runner.os }}-${{ steps.setup-python.outputs.python-version }}-${{ hashFiles('**/poetry.lock') }}
- name: Install dependencies
run: poetry install --no-interaction --extras tests
run: pip install -e .[tests]
- name: Switch to development pydicom
run: |
pip install git+https://github.com/pydicom/pydicom
- name: Test with pytest
env:
PYTHON_VERSION: ${{ matrix.python-version }}
run: |
poetry run pytest -x --cov pynetdicom --ignore=pynetdicom/apps &&
poetry run coverage xml
pytest -x --cov pynetdicom --ignore=pynetdicom/apps && coverage xml
- name: Send coverage results
if: ${{ success() }}
uses: codecov/codecov-action@v4
Expand All @@ -144,31 +118,17 @@ jobs:
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install poetry
uses: snok/install-poetry@v1
with:
virtualenvs-create: true
virtualenvs-in-project: true
installer-parallel: true
- name: Load cached venv
id: cached-poetry-dependencies
uses: actions/cache@v4
with:
path: .venv
key: venv-${{ runner.os }}-${{ steps.setup-python.outputs.python-version }}-${{ hashFiles('**/poetry.lock') }}
- name: Install dependencies
run: |
poetry install --no-interaction --extras tests &&
poetry run pip list
pip install -e .[tests]
- name: Get OpenSSL version
run: |
poetry run python -c "import ssl; print('OpenSSL:', ssl.OPENSSL_VERSION_INFO)"
python -c "import ssl; print('OpenSSL:', ssl.OPENSSL_VERSION_INFO)"
- name: Test with pytest
env:
PYTHON_VERSION: ${{ matrix.python-version }}
run: |
poetry run pytest -x --cov pynetdicom --ignore=pynetdicom/apps &&
poetry run coverage xml
pytest -x --cov pynetdicom --ignore=pynetdicom/apps && coverage xml
- name: Send coverage results
if: ${{ success() }}
uses: codecov/codecov-action@v4
22 changes: 5 additions & 17 deletions .github/workflows/pr-type-lint-format.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,29 +21,17 @@ jobs:
id: setup-python
with:
python-version: ${{ matrix.python-version }}
- name: Install poetry
uses: snok/install-poetry@v1
with:
virtualenvs-create: true
virtualenvs-in-project: true
installer-parallel: true
- name: Load cached venv
id: cached-poetry-dependencies
uses: actions/cache@v4
with:
path: .venv
key: venv-${{ runner.os }}-${{ steps.setup-python.outputs.python-version }}-${{ hashFiles('**/poetry.lock') }}
- name: Install dependencies
run: poetry install --no-interaction --no-root --extras dev
run: pip install -e .[dev]
- name: Run type check using mypy
run: |
poetry run mypy
mypy
- name: Run formatting check using black
run: |
poetry run black . --check
black . --check
- name : Run linting check using ruff
run: |
poetry run ruff check .
ruff check .
- name: Run spell check using codespell
run: |
poetry run codespell -d pynetdicom
codespell -d pynetdicom
13 changes: 5 additions & 8 deletions .github/workflows/publish-pypi-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,16 +18,13 @@ jobs:
with:
python-version: '3.10'

- name: Install poetry
uses: snok/install-poetry@v1
with:
virtualenvs-create: true
virtualenvs-in-project: true
installer-parallel: true
- name: Install flit
run: |
pip install -U flit
- name: Build package
run: |
poetry build
flit build
- name: Upload artifacts
if: ${{ success() }}
Expand All @@ -42,7 +39,7 @@ jobs:
runs-on: ubuntu-latest
environment:
name: pypi
url: https://pypi.org/project/pylibjpeg-libjpeg/
url: https://pypi.org/project/pynetdicom/
permissions:
id-token: write

Expand Down
11 changes: 2 additions & 9 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,13 @@ classifiers=[
]
description = "A Python implementation of the DICOM networking protocol"
keywords = ["dicom", "networking", "pydicom"]
license = {file = "LICENSE"}
license = {file = "LICENCE"}
maintainers = [
{name = "scaramallion", email = "scaramallion@users.noreply.github.com"},
]
name = "pynetdicom"
readme = "README.rst"
version = "2.1.1"
version = "2.2.0.dev0"
requires-python = ">=3.10"
dependencies = ["pydicom >=2.4"]

Expand Down Expand Up @@ -77,13 +77,6 @@ qrscp = "pynetdicom.apps.qrscp.qrscp:main"
storescp = "pynetdicom.apps.storescp.storescp:main"
storescu = "pynetdicom.apps.storescu.storescu:main"

# [tool.flit.sdist]
# include = [
# "pynetdicom/tests/cert_files/*",
# "pynetdicom/tests/dicom_files/*",
# "pynetdicom/apps/qrscp/default.ini",
# ]


[tool.black]
exclude = ".venv*|env*|build|/_.*_dict.py$"
Expand Down

0 comments on commit aec6bfa

Please sign in to comment.