-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
5.1.0: Migrate to poetry, python 3.10 support (#50)
* 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
Showing
19 changed files
with
646 additions
and
103 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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" |
Oops, something went wrong.