Skip to content

Commit 88f4611

Browse files
adding initial structure
1 parent d6149d3 commit 88f4611

6 files changed

Lines changed: 50 additions & 0 deletions

File tree

Makefile

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
install:
2+
pip install --upgrade pip &&\
3+
pip install -r requirements.txt
4+
5+
format:
6+
black *.py
7+
8+
lint:
9+
pylint --disable=R,C hello.py
10+
11+
test:
12+
python -m pytest --cov=hello test_hello.py
13+
14+
all: install lint format test

README.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,8 @@
11
# PythonScaffold
22
https://www.youtube.com/watch?v=-mdv2wf8yQ8
3+
4+
# Setup virtual env
5+
python3 -m venv ~/.PythonScaffold
6+
source ~/.PythonScaffold/bin/activate
7+
8+

hello.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
def add(x, y):
2+
return x + y
3+
4+
5+
# x = 4
6+
# y = 5
7+
result = add(4, 5)
8+
print(f"This is the sum: 4, 5, {result}")

req.txt

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
appdirs==1.4.4
2+
attrs==20.3.0
3+
black==20.8b1
4+
click==7.1.2
5+
iniconfig==1.1.1
6+
mypy-extensions==0.4.3
7+
packaging==20.4
8+
pathspec==0.8.0
9+
pluggy==0.13.1
10+
py==1.9.0
11+
pyparsing==2.4.7
12+
pytest==6.1.2
13+
regex==2020.10.28
14+
six==1.15.0
15+
toml==0.10.2
16+
typed-ast==1.4.1
17+
typing-extensions==3.7.4.3

requirements.txt

Whitespace-only changes.

test_hello.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
from hello import add
2+
3+
4+
def test_add():
5+
assert 9 == add(4, 5)

0 commit comments

Comments
 (0)