Skip to content

Commit

Permalink
Switch build system to flit (#965)
Browse files Browse the repository at this point in the history
  • Loading branch information
scaramallion committed Aug 11, 2024
1 parent 03ca7fb commit bc5f1ae
Show file tree
Hide file tree
Showing 9 changed files with 164 additions and 1,595 deletions.
114 changes: 37 additions & 77 deletions .github/workflows/merge-pytest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,78 +51,52 @@ 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
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}

pydicom-dev:
# Matrix builds with development pydicom
runs-on: ubuntu-latest
timeout-minutes: 30
strategy:
fail-fast: false
matrix:
python-version: ['3.10', '3.11', '3.12']

steps:
- uses: actions/checkout@v4
with:
fetch-depth: 2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
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
- 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
- name: Send coverage results
if: success()
uses: codecov/codecov-action@v4
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
# pydicom-dev:
# # Matrix builds with development pydicom
# runs-on: ubuntu-latest
# timeout-minutes: 30
# strategy:
# fail-fast: false
# matrix:
# python-version: ['3.10', '3.11', '3.12']
#
# steps:
# - uses: actions/checkout@v4
# with:
# fetch-depth: 2
# - name: Set up Python ${{ matrix.python-version }}
# uses: actions/setup-python@v5
# id: setup-python
# with:
# python-version: ${{ matrix.python-version }}
# - name: Install dependencies
# 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: |
# pytest --cov pynetdicom --ignore=pynetdicom/apps && coverage xml
# - name: Send coverage results
# if: success()
# uses: codecov/codecov-action@v4
# env:
# CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}

pydicom-release:
# Matrix builds with released pydicom
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
- 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
76 changes: 31 additions & 45 deletions .github/workflows/pr-pytest-apps.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,35 @@ on:

jobs:

pydicom-dev:
# pydicom-dev:
# runs-on: ubuntu-latest
# timeout-minutes: 30
# strategy:
# fail-fast: false
# matrix:
# python-version: ['3.10']
#
# steps:
# - uses: actions/checkout@v4
# with:
# fetch-depth: 2
# - name: Set up Python ${{ matrix.python-version }}
# uses: actions/setup-python@v5
# id: setup-python
# with:
# python-version: ${{ matrix.python-version }}
# - name: Install dependencies
# 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: |
# pytest -x --ignore=pynetdicom/tests

pydicom-release:
runs-on: ubuntu-latest
timeout-minutes: 30
strategy:
Expand All @@ -23,52 +51,10 @@ 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
- name: Switch to development pydicom
run: |
pip install git+https://github.com/pydicom/pydicom &&
poetry run pip list
run: pip install -e .[tests]
- name: Test with pytest
env:
PYTHON_VERSION: ${{ matrix.python-version }}
run: |
poetry run pytest -x --ignore=pynetdicom/tests
# pydicom-release:
# runs-on: ubuntu-latest
# timeout-minutes: 30
# strategy:
# fail-fast: false
# matrix:
# python-version: ['3.9']
#
# steps:
# - uses: actions/checkout@v4
# with:
# fetch-depth: 2
# - name: Set up Python ${{ matrix.python-version }}
# uses: actions/setup-python@v5
# with:
# python-version: ${{ matrix.python-version }}
# - name: Install dependencies
# run: |
# python -m pip install --upgrade pip
# pip install pytest pydicom sqlalchemy pyfakefs
# - name: Test with pytest
# env:
# PYTHON_VERSION: ${{ matrix.python-version }}
# run: |
# pytest --ignore=pynetdicom/tests
pytest -x --ignore=pynetdicom/tests
Loading

0 comments on commit bc5f1ae

Please sign in to comment.