Skip to content

Commit

Permalink
refactor: remove support for python 3.6 and clean
Browse files Browse the repository at this point in the history
BREAKING CHANGE: Removed support for Python 3.6 and overall cleanup
  • Loading branch information
trallnag committed May 1, 2022
1 parent 673f12b commit 363d353
Show file tree
Hide file tree
Showing 49 changed files with 20,681 additions and 4,096 deletions.
5 changes: 1 addition & 4 deletions .flake8
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,4 @@
exclude = .git,.lock
max-complexity = 10
max-line-length = 90
ignore=E501,W503,E203,E701
per-file-ignores =
__init__.py:F401
main.py:C901
ignore=E501,W503
18 changes: 12 additions & 6 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,17 @@
version: 2

updates:
- package-ecosystem: "github-actions"
directory: "/"
- package-ecosystem: github-actions
directory: /
schedule:
interval: monthly

- package-ecosystem: pip
directory: /
schedule:
interval: "daily"
interval: monthly

- package-ecosystem: "pip"
directory: "/"
- package-ecosystem: npm
directory: /node/
schedule:
interval: "daily"
interval: monthly
36 changes: 0 additions & 36 deletions .github/workflows/codeql-analysis.yml

This file was deleted.

73 changes: 0 additions & 73 deletions .github/workflows/commit.yml

This file was deleted.

89 changes: 89 additions & 0 deletions .github/workflows/primary.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@
name: primary

on:
workflow_dispatch:
push:
branches: [trunk, master, main]

jobs:
secondary:
runs-on: ubuntu-latest

steps:

# ------------------------------------------------------------------------

- uses: actions/checkout@v3

- uses: actions/setup-python@v3
with:
python-version: "3.10"

# ------------------------------------------------------------------------
# Poetry

- name: Setup Poetry
uses: Gr1N/setup-poetry@v7

- name: Cache Poetry
uses: actions/cache@v3
with:
path: ~/.cache/pypoetry/virtualenvs
key: ${{ runner.os }}-poetry-${{ hashFiles('poetry.lock') }}
restore-keys: ${{ runner.os }}-poetry-

- run: poetry --version
- run: poetry install

# ------------------------------------------------------------------------
# Pre-Commit

- name: Setup pre-commit
run: |
pip install pre-commit
pre-commit install
- name: Cache pre-commit
uses: actions/cache@v3
with:
path: ~/.cache/pre-commit
key: ${{ runner.os }}-pre-commit

- name: Run pre-commit
run: pre-commit run --all-files --verbose --show-diff-on-failure

# ------------------------------------------------------------------------
# Tests

- run: ./scripts/test.sh

- uses: codecov/codecov-action@v2
with:
files: ./coverage.xml
flags: unittests
fail_ci_if_error: true

# ------------------------------------------------------------------------
# Semantic Release

- name: Prepare for npm
run: cp node/package* .

- name: Setup Node
uses: actions/setup-node@v3
with:
node-version: "16"
cache: npm

- name: Install node packages
run: npm install --no-progress --prefer-offline

- name: Perform semantic-release
id: semantic_release
run: npx --no-install semantic-release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
PYPI_TOKEN: ${{ secrets.PYPI_TOKEN }}
PYPI_REPOSITORY: https://upload.pypi.org/legacy/

# ------------------------------------------------------------------------
67 changes: 0 additions & 67 deletions .github/workflows/release.yml

This file was deleted.

67 changes: 67 additions & 0 deletions .github/workflows/secondary.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
name: secondary

on:
workflow_dispatch:
pull_request:
push:
branches-ignore: [trunk, master, main]

jobs:
secondary:
runs-on: ubuntu-latest

steps:

# ------------------------------------------------------------------------

- uses: actions/checkout@v3

- uses: actions/setup-python@v3
with:
python-version: "3.10"

# ------------------------------------------------------------------------
# Poetry

- name: Setup Poetry
uses: Gr1N/setup-poetry@v7

- name: Cache Poetry
uses: actions/cache@v3
with:
path: ~/.cache/pypoetry/virtualenvs
key: ${{ runner.os }}-poetry-${{ hashFiles('poetry.lock') }}
restore-keys: ${{ runner.os }}-poetry-

- run: poetry --version
- run: poetry install

# ------------------------------------------------------------------------
# Pre-Commit

- name: Setup pre-commit
run: |
pip install pre-commit
pre-commit install
- name: Cache pre-commit
uses: actions/cache@v3
with:
path: ~/.cache/pre-commit
key: ${{ runner.os }}-pre-commit

- name: Run pre-commit
run: pre-commit run --all-files --verbose --show-diff-on-failure

# ------------------------------------------------------------------------
# Tests

- run: ./scripts/test.sh

- uses: codecov/codecov-action@v2
with:
files: ./coverage.xml
flags: unittests
fail_ci_if_error: true

# ------------------------------------------------------------------------
Loading

0 comments on commit 363d353

Please sign in to comment.