Skip to content

Commit

Permalink
Feature/setup-actions (#10)
Browse files Browse the repository at this point in the history
* add github actions

* update excludes

* add failing test script

* fix linting/style errors

* reomove script used to test actions
  • Loading branch information
rjchallis authored Jun 25, 2024
1 parent 002bf1d commit f417589
Show file tree
Hide file tree
Showing 5 changed files with 77 additions and 1 deletion.
29 changes: 29 additions & 0 deletions .github/workflows/flake8.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: flake8 Lint

on:
push:
workflow_dispatch:
pull_request:
branches:
- main

jobs:
flake8:
runs-on: ubuntu-latest
name: flake8 Lint
steps:
- name: Check out source repository
uses: actions/checkout@v4
- name: Set up Python environment
uses: actions/setup-python@v5
with:
python-version: "3.10"
- name: flake8 Lint
uses: TrueBrain/actions-flake8@v2
with:
ignore: E203,E701,W503,W504
max_line_length: 88
path: src
plugins: flake8-black flake8-isort flake8-quotes
error_classes: E,H,I00,Q00
extra_arguments: "--exclude kinfin.py,scripts"
22 changes: 22 additions & 0 deletions .github/workflows/sourcery.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: sourcery

on:
push:
workflow_dispatch:
pull_request:
branches:
- main

jobs:
sourcery:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

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

- uses: sourcery-ai/action@v1
with:
token: ${{ secrets.SOURCERY_TOKEN }}
5 changes: 5 additions & 0 deletions .sourcery.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
ignore:
- src/kinfin.py
- scripts/*
- build/*
- setup.py
14 changes: 14 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"git.ignoreLimitWarning": true,
"editor.formatOnSave": true,
"flake8.args": [
"--max-line-length=88"
],
"[python]": {
"editor.codeActionsOnSave": {
"source.organizeImports.python": "explicit"
},
"editor.defaultFormatter": "ms-python.black-formatter",
"editor.formatOnSave": true,
}
}
8 changes: 7 additions & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,10 @@
universal=1

[metadata]
description-file=README.md
description-file=README.md

[flake8]
max-line-length = 88
extend-ignore = E203,E701
inline-quotes = double
exclude = src/kinfin.py,scripts

0 comments on commit f417589

Please sign in to comment.