Skip to content

Commit 4de82f0

Browse files
E-wave112keosarielkenneth gabriel
authored
upgraded to v0.0.4 (#2)
* improved Importations (#1) * changed test directory * improved exception importation * improved importation * improved importation * fixed importation * added test script * moved constants * moved back * add .db_store to .gitignore * decoupled exceptions * removed .db_store Co-authored-by: kenneth gabriel <[email protected]> * upgraded to v0.0.4 Co-authored-by: keosariel <[email protected]> Co-authored-by: kenneth gabriel <[email protected]>
1 parent 578ff50 commit 4de82f0

File tree

9 files changed

+18
-10
lines changed

9 files changed

+18
-10
lines changed

.github/workflows/pytests.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,4 +38,4 @@ jobs:
3838
pip install coverage
3939
# Run the tests. I'm using unittest and coverage and the file is in the tests directory.
4040
- name: Run tests
41-
run: coverage run -m unittest thepeer/tests/thepeer_test.py
41+
run: coverage run -m unittest

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -129,5 +129,8 @@ dmypy.json
129129
.pyre/
130130

131131
*.sh
132+
!run_tests.sh
132133
notes.md
133134
guide.md
135+
.DS_Store
136+
junk*

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ pip install pythepeer
1717
Instantiate ```Thepeer``` class like so:
1818
```python
1919
import thepeer
20-
from thepeer.main import Thepeer
20+
from thepeer import Thepeer
2121

2222
# create an instance of ThepeerInit class
2323

run_tests.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
python -m unittest discover -s './tests' -p 'test_*.py'

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212

1313
setup(
1414
name="pythepeer",
15-
version="0.0.3",
15+
version="0.0.4",
1616
description="official python sdk for interacting with thepeer payment processing \
1717
infrastructure",
1818
author="Osagie Iyayi",
File renamed without changes.

thepeer/tests/thepeer_test.py renamed to tests/test_thepeer.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import unittest
2-
from thepeer import main # type: ignore
2+
from thepeer import Thepeer # type: ignore
33

4-
thepeer_test_suites = main.Thepeer("pssk_test_vwww1yvvpymamtut26x5tvpx1znrcmeis2k0kvcmwzjax")
4+
thepeer_test_suites = Thepeer("pssk_test_vwww1yvvpymamtut26x5tvpx1znrcmeis2k0kvcmwzjax")
55

66

77
class ThePeerInitMethods(unittest.TestCase):

thepeer/__init__.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
from .main import Thepeer
2+
from .utils import exceptions
3+
4+
__all__ = (
5+
"Thepeer",
6+
"exceptions"
7+
)

thepeer/main.py

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,9 @@
44
import os
55
import sys
66

7-
sys.path.append(os.path.dirname(os.path.abspath(__file__)))
8-
9-
107
import httpx # noqa: E402
11-
from utils.constants import BASE_URL # noqa: E402
12-
from utils.exceptions.handleErrors import SwitchErrorStates # noqa: E402
8+
from .utils.constants import BASE_URL # noqa: E402
9+
from .utils.exceptions.handleErrors import SwitchErrorStates # noqa: E402
1310

1411

1512
class Thepeer:

0 commit comments

Comments
 (0)