Skip to content

Commit

Permalink
5.1.0: Migrate to poetry, python 3.10 support (#50)
Browse files Browse the repository at this point in the history
* migrated to poetry, black formatted

* fix: incorrect workflow; flake8 unused import

* fix: flake8 import error; make install; workflows

* fix: cli installation

* add support for python 3.7

* fix: client closing after request

* upgrade dependencies

* use ubuntu latest for ci

* fix version number

* fix: version number

* cleanup typing

* fix: parameter names

* fix: pydantic default value definition

* fix: import

* add: python-multipart

* add removed comments back in

Co-authored-by: patrick <[email protected]>
  • Loading branch information
pkern90 and patrick authored Aug 17, 2022
1 parent c489927 commit 5177390
Show file tree
Hide file tree
Showing 19 changed files with 646 additions and 103 deletions.
25 changes: 11 additions & 14 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,28 +4,25 @@ on: [push]

jobs:
build:

runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: [ 3.7, 3.8, 3.9 ]
python-version: ["3.7", "3.8", "3.9", "3.10"]
poetry-version: ["1.0", "1.1.11"]
os: [ubuntu-latest]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
- uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install Dependencies
run: |
python -m pip install --upgrade pip
pip install pip-autoremove
pip install flit
- name: Run image
uses: abatilo/[email protected]
with:
poetry-version: ${{ matrix.poetry-version }}
- name: Build & Install Package
run: |
make install
- name: Remove Aux. Dependencies
run: |
pip-autoremove flit -y
- name: Test CLI Endpoints
run: |
make test-cmd-install
make test-cmd-install
20 changes: 12 additions & 8 deletions .github/workflows/pytest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,24 +4,28 @@ on: [push]

jobs:
build:

runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: [ 3.7, 3.8, 3.9 ]
python-version: ["3.7", "3.8", "3.9", "3.10"]
poetry-version: ["1.0", "1.1.11"]
os: [ubuntu-latest]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
- uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Run image
uses: abatilo/[email protected]
with:
poetry-version: ${{ matrix.poetry-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r tests/requirements.txt
poetry install
- name: Unit tests
run: |
make test-unit
- name: Integration tests
run: |
make test-integration
make test-integration
11 changes: 5 additions & 6 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,25 +1,24 @@
VERSION=5.0.1
VERSION=5.1.0

SHELL := /bin/bash

.PHONY: build install test-functional test-unit test-integration test-cmd-install

build:
cd redact
flit build
poetry build

install:
make build
pip install . --upgrade

test-functional:
python3 -m pytest tests/functional/ --api_key $(api_key) --redact_url $(redact_url)
poetry run pytest tests/functional/ --api_key $(api_key) --redact_url $(redact_url)

test-unit:
python3 -m pytest tests/unit/
poetry run pytest tests/unit/

test-integration:
python3 -m pytest tests/integration/
poetry run pytest tests/integration/

test-cmd-install:
redact_file --help && redact_folder --help && echo "OK: Command-line endpoints installed"
Loading

0 comments on commit 5177390

Please sign in to comment.