Skip to content

Commit 413cb58

Browse files
authored
81 linting action (#82)
* Added lint workflow * trigger on all PR and commit * setting versions * on push * black --check * adding more settings * Dont need to build on commit * Now check linting passes
1 parent fbf2dc9 commit 413cb58

File tree

3 files changed

+40
-11
lines changed

3 files changed

+40
-11
lines changed

.github/workflows/build.yaml

-3
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,6 @@
11
name: build
22

33
on:
4-
push:
5-
branches:
6-
- "*"
74
pull_request:
85
branches:
96
- "*"

.github/workflows/lint.yaml

+31
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
name: Lint
2+
3+
on:
4+
# Trigger the workflow on push or pull request,
5+
push:
6+
pull_request:
7+
8+
jobs:
9+
run-linters:
10+
name: Run linters
11+
runs-on: ubuntu-latest
12+
13+
steps:
14+
- name: Check out Git repository
15+
uses: actions/checkout@v2
16+
17+
- name: Set up Python
18+
uses: actions/setup-python@v1
19+
with:
20+
python-version: 3.8
21+
22+
- name: Install Python dependencies
23+
run: pip install black==22.6.0
24+
25+
- name: Run linters
26+
uses: wearerequired/lint-action@v2
27+
with:
28+
black: true
29+
black_args: "sapai/*.py tests/*.py --check"
30+
commit: false
31+
continue_on_error: false

setup.py

+9-8
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,12 @@
44
from distutils.core import setup
55

66
setup(
7-
name='sapai',
8-
version='0.1.0',
9-
packages=['sapai',
10-
],
11-
#find_packages(exclude=[]),
12-
install_requires=['numpy', 'keras','torch', 'graphviz'],
13-
data_files=[],
14-
)
7+
name="sapai",
8+
version="0.1.0",
9+
packages=[
10+
"sapai",
11+
],
12+
# find_packages(exclude=[]),
13+
install_requires=["numpy", "keras", "torch", "graphviz"],
14+
data_files=[],
15+
)

0 commit comments

Comments
 (0)