Skip to content

Commit

Permalink
Merge branch 'main' of https://github.com/diligejy/mlops
Browse files Browse the repository at this point in the history
  • Loading branch information
diligejy committed Jan 19, 2024
2 parents b0664b6 + a8a3002 commit 720af12
Show file tree
Hide file tree
Showing 6 changed files with 22 additions and 4 deletions.
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ install:
pip install -r requirements.txt

lint:
pylint --disable=R,C hello.py
pylint --disable=R,C Practical_MLOps/Ch1/hello.py

test:
python -m pytest -vv --cov=hello test_hello.py
python -m pytest -vv --cov=hello Practical_MLOps/Ch1/test_hello.py
10 changes: 9 additions & 1 deletion Practical_MLOps/Ch1/hello.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,15 @@
import numpy as np

def add(x, y):
"""This is an add function"""
return x + y

def numpy_add(x, y):
return x + y


print(add(1, 1))

print(add(2, 1))
print(add(2, 1))

print(numpy_add(np.arange(4), np.arange(4)))
6 changes: 5 additions & 1 deletion Practical_MLOps/Ch1/test_hello.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
from hello import add
import numpy as np
from hello import add, numpy_add


def test_add():
assert 2 == add(1, 1)

def test_numpy_add():
assert 1 == 1
2 changes: 2 additions & 0 deletions PyCon_PL/Readme.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
1. [Grzegorz Kocjan - Test Driven Pandas](https://youtu.be/oaADte_9u6Q)
- [Folder](./Test_Driven_Pandas/)
2 changes: 2 additions & 0 deletions PyCon_PL/Test_Driven_Pandas/tests/test_x.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
def test_x():
assert False
2 changes: 2 additions & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,5 @@ nbclient
pandas
pytest
pytest-cov
pylint
numpy

0 comments on commit 720af12

Please sign in to comment.