Skip to content

Commit

Permalink
feat!: v1.0.0 (#55)
Browse files Browse the repository at this point in the history
  **Release of first major version 🎉**

  ## BREAKING Changes
  * Dropped support for python <3.8

---------

Signed-off-by: Jan Kowalleck <jan.kowalleck@gmail.com>
  • Loading branch information
jkowalleck authored Jan 22, 2024
1 parent 5645ca6 commit 2cee4d5
Show file tree
Hide file tree
Showing 17 changed files with 265 additions and 313 deletions.
37 changes: 37 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
# EditorConfig is awesome: https://EditorConfig.org

root = true

[*]
insert_final_newline = true
charset = utf-8
trim_trailing_whitespace = true
end_of_line = lf

[*.py]
indent_style = space
indent_size = 4

[*.{yml,yaml}]
indent_style = space
indent_size = 2

[*.toml]
indent_style = space
indent_size = 2

[*.md]
charset = latin1
indent_style = space
indent_size = 2
# 2 trailing spaces indicate line breaks.
trim_trailing_whitespace = false

[*.{rst,txt}]
indent_style = space
indent_size = 4

[{*.ini,.bandit,.flake8}]
charset = latin1
indent_style = space
indent_size = 4
21 changes: 21 additions & 0 deletions .flake8
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
[flake8]
## https://flake8.pycqa.org/en/latest/user/configuration.html
## keep in sync with isort config - in `isort.cfg` file

exclude =
build,dist,__pycache__,.eggs,*.egg-info*,
*_cache,*.cache,
.git,.tox,.venv,venv
_OLD,_TEST,
docs

max-line-length = 120

# max-complexity = 10

ignore =
# ignore `self`, `cls` markers of flake8-annotations>=2.0
ANN101,ANN102
# ignore Opinionated Warnings - which are documented as disabled by default
# See https://github.com/sco1/flake8-annotations#opinionated-warnings
ANN401
82 changes: 0 additions & 82 deletions .github/workflows/manual-release-candidate.yml

This file was deleted.

48 changes: 10 additions & 38 deletions .github/workflows/python.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,25 +49,21 @@ jobs:
- name: Checkout
# see https://github.com/actions/checkout
uses: actions/checkout@v4

- name: Setup Python Environment
# see https://github.com/actions/setup-python
uses: actions/setup-python@v5
with:
python-version: ${{ env.PYTHON_VERSION_DEFAULT }}
architecture: 'x64'

- name: Install poetry
# see https://github.com/marketplace/actions/setup-poetry
uses: Gr1N/setup-poetry@v8
with:
poetry-version: ${{ env.POETRY_VERSION }}

- name: Install dependencies
run: poetry install

- name: Run tox
run: poetry run tox -e flake8 -s false
run: poetry run tox run -e flake8 -s false

static-code-analysis:
name: Static Coding Analysis (py${{ matrix.python-version}} ${{ matrix.toxenv-factor }})
Expand All @@ -77,39 +73,34 @@ jobs:
fail-fast: false
matrix:
include:
- # test with the locked dependencies
- # latest python
python-version: '3.12'
toxenv-factor: 'locked'
- # test with the lowest dependencies
python-version: '3.7'
toxenv-factor: 'current'
- # lowest supported python
python-version: '3.8'
toxenv-factor: 'lowest'
poetry-version: '1.4.1' # py3.7 does not allow latest poetry
steps:
- name: Checkout
# see https://github.com/actions/checkout
uses: actions/checkout@v4

- name: Setup Python Environment
# see https://github.com/actions/setup-python
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
architecture: 'x64'

- name: Install poetry
# see https://github.com/marketplace/actions/setup-poetry
uses: Gr1N/setup-poetry@v8
with:
poetry-version: ${{ matrix.poetry-version || env.POETRY_VERSION }}

poetry-version: ${{ env.POETRY_VERSION }}
- name: Install Dependencies
run: poetry install --no-interaction --no-root

- name: Run tox
run: poetry run tox -re mypy-${{ matrix.toxenv-factor }} -s false
run: poetry run tox run -r -e mypy-${{ matrix.toxenv-factor }} -s false

build-and-test:
name: Test (${{ matrix.os }} py${{ matrix.python-version }} ${{ matrix.toxenv-factor }})
name: Test (${{ matrix.os }} py${{ matrix.python-version }})
runs-on: ${{ matrix.os }}
timeout-minutes: 10
env:
Expand All @@ -123,54 +114,35 @@ jobs:
- "3.11"
- "3.10"
- "3.9"
- "3.8"
- "3.7" # lowest supported
toxenv-factor: ['locked']
include:
- # test with the lowest dependencies
os: 'ubuntu-latest'
python-version: '3.7'
toxenv-factor: 'lowest'
- "3.8" # lowest supported
steps:
- name: Checkout
# see https://github.com/actions/checkout
uses: actions/checkout@v4

- name: Create reports directory
run: mkdir ${{ env.REPORTS_DIR }}

- name: Setup Python Environment
# see https://github.com/actions/setup-python
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
architecture: 'x64'

- name: override POETRY_VERSION
if: startsWith(matrix.python-version, '3.7')
run: echo "POETRY_VERSION=1.4.1" >> "$GITHUB_ENV"
shell: bash
- name: Install poetry
# see https://github.com/marketplace/actions/setup-poetry
uses: Gr1N/setup-poetry@v8
with:
poetry-version: ${{ env.POETRY_VERSION }}

- name: Install dependencies
run: poetry install

- name: Ensure build successful
run: poetry build

- name: Run tox
run: poetry run tox -v -r -e py-${{ matrix.toxenv-factor }} -s false

run: poetry run tox run -v -r -e py -s false
- name: Generate coverage reports
run: >
poetry run coverage report &&
poetry run coverage xml -o ${{ env.REPORTS_DIR }}/coverage-${{ matrix.os }}-${{ matrix.python-version }}-${{ matrix.toxenv-factor }}.xml &&
poetry run coverage html -d ${{ env.REPORTS_DIR }}
- name: Artifact reports
if: ${{ ! cancelled() }}
# see https://github.com/actions/upload-artifact
Expand Down
Loading

0 comments on commit 2cee4d5

Please sign in to comment.