Skip to content

Commit f6d4b1f

Browse files
authored
Adding GH Actions Formatting CI Check and GH Pages for Docs (#41)
* Adding GH Actions Formatting CI Check and GH Pages for Docs * Remove dups
1 parent fb9010e commit f6d4b1f

File tree

10 files changed

+41
-1
lines changed

10 files changed

+41
-1
lines changed

.github/workflows/python-app.yml

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
# This workflow will install Python dependencies, run tests and lint with a single version of Python
2+
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions
3+
4+
name: Python application
5+
6+
on:
7+
push:
8+
branches: [ main ]
9+
pull_request:
10+
branches: [ main ]
11+
12+
jobs:
13+
build:
14+
15+
runs-on: ubuntu-latest
16+
17+
steps:
18+
- uses: actions/checkout@v2
19+
- name: Set up Python 3.9
20+
uses: actions/setup-python@v2
21+
with:
22+
python-version: 3.9
23+
- name: Install dependencies
24+
run: |
25+
python -m pip install --upgrade pip
26+
pip install pytest
27+
pip install pytest-dependency
28+
pip install pytest-mock
29+
pip install black==22.3.0
30+
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
31+
- name: Check formatting with black
32+
run: |
33+
black --check .

README.md

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,13 @@ For testing, make sure to have installed:
1616

1717
NOTE: Self-contained unit/functional tests coming soon, will live in `tests` folder
1818

19+
For formatting:
20+
- Currently using black v22.3.0 for format checking
21+
- To install, run `pip install black==22.3.0`
22+
- To check file formatting, in top-level dir run `black --check .`
23+
- To auto-reformat all files, remove the `--check` flag
24+
- To reformat an individual file, run `black <filename>`
25+
1926
To build the python package:
20-
- If poetry is not installed: `pip3 install poetry`
27+
- If poetry is not installed: `pip install poetry`
2128
- `poetry build`
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)