-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Create Pipfile and GH Actions workflow to run Makefile
* Add Pipfile of dependencies and a custom shortcut * Add Makefile of test and lint commands * Add GH Actions workflow to run Makefile * Add setup.cfg to prevent conflict black with flake8 and isort * Add dummy test to prevent CI error, will delete once real tests are added
- Loading branch information
Showing
7 changed files
with
755 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
name: Tests | ||
on: push | ||
jobs: | ||
test: | ||
name: Run tests | ||
env: | ||
COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_REPO_TOKEN }} | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Setup python | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: '3.9' | ||
architecture: x64 | ||
- name: Install | ||
run: | | ||
python -m pip install --upgrade pip pipenv | ||
pipenv install --dev | ||
- name: Tests | ||
run: make coveralls | ||
linting: | ||
name: Run linting | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Setup python | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: '3.9' | ||
architecture: x64 | ||
- name: Install | ||
run: | | ||
python -m pip install --upgrade pip pipenv | ||
pipenv install --dev | ||
- name: Linting | ||
run: make lint |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -127,3 +127,8 @@ dmypy.json | |
|
||
# Pyre type checker | ||
.pyre/ | ||
|
||
*.csv | ||
*.xlsx | ||
.DS_Store |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
lint: bandit black flake8 isort | ||
|
||
bandit: | ||
pipenv run bandit -r awd | ||
|
||
black: | ||
pipenv run black --check --diff . | ||
|
||
coveralls: test | ||
pipenv run coveralls | ||
|
||
flake8: | ||
pipenv run flake8 . | ||
|
||
isort: | ||
pipenv run isort . --diff | ||
|
||
test: | ||
pipenv run pytest --cov=awd |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
[[source]] | ||
url = "https://pypi.org/simple" | ||
verify_ssl = true | ||
name = "pypi" | ||
|
||
[packages] | ||
pandas = "*" | ||
openpyxl = "*" | ||
click = "*" | ||
coveralls = "*" | ||
|
||
[dev-packages] | ||
black = "==21.7b0" | ||
isort = "*" | ||
flake8 = "*" | ||
pylama = "*" | ||
bandit = "*" | ||
pytest = "*" | ||
requests-mock = "*" | ||
pytest-cov = "*" | ||
|
||
[requires] | ||
python_version = "3.9" | ||
|
||
[scripts] | ||
awd = "python -c \"from awd.cli import cli; cli()\"" |
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
[flake8] | ||
max-line-length = 90 | ||
extend-ignore = E203 | ||
|
||
[isort] | ||
profile = black |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
def test_dummy(): | ||
"""Dummy test to avoid CI error, will be deleted after real tests are added""" | ||
assert True |