File tree Expand file tree Collapse file tree 11 files changed +78
-25
lines changed Expand file tree Collapse file tree 11 files changed +78
-25
lines changed Original file line number Diff line number Diff line change 5656 flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
5757 - name : Test with unittest
5858 run : |
59- python -m unittest tests/module .py
59+ python -m unittest tests/test_module .py
6060
Original file line number Diff line number Diff line change 1+ name : Upload Python Package
2+
3+ on :
4+ release :
5+ types : [created]
6+
7+ jobs :
8+ deploy :
9+ runs-on : ubuntu-latest
10+
11+ steps :
12+ - uses : actions/checkout@v3
13+ - uses : actions/setup-python@v3
14+ - name : Install dependencies
15+ run : |
16+ python -m pip install --upgrade pip
17+ pip install setuptools wheel twine
18+ - name : Build and publish
19+ env :
20+ TWINE_USERNAME : __token__
21+ TWINE_PASSWORD : ${{ secrets.PYPI_TOKEN }}
22+ run : |
23+ python setup.py sdist bdist_wheel
24+ twine upload dist/*
Original file line number Diff line number Diff line change 55venv /
66
77# caches
8- * /__pycache__ /
8+ * /__pycache__ /
9+
10+ # PyPI integration file
11+ . /build
12+ . /dist
13+ * .egg-info
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 1+ [build-system ]
2+ requires = [" setuptools" , " setuptools_scm[toml]" ]
3+ build-backend = " setuptools.build_meta"
4+
5+ [project ]
6+ name = " unit-db-test"
7+ description = " Unittest wrapper focused on making DB integrity tests"
8+ readme = " README.md"
9+ license = {file = " LICENSE" }
10+ maintainers = [
11+ {
name =
" @cortze | Mikel Cortes " ,
email =
" [email protected] " },
12+ ]
13+ requires-python = " >=3.10"
14+ dependencies = [
15+ ' dotenv' ,
16+ ' unittest' ,
17+ ' psycopg2-binary' ,
18+ ' sqlalchemy' ,
19+ ' pandas' ,
20+ ]
21+
22+ dynamic = [
23+ " version" ,
24+ ]
25+
26+ [tool .setuptools_scm ]
27+
28+ [project .urls ]
29+ Repository = " https://github.com/cortze/unit-db-test"
30+
31+ [tool .setuptools .packages .find ]
32+ include = [
33+ " unit_db_test*" ,
34+ ]
Original file line number Diff line number Diff line change 1- # setup.py
2- from setuptools import setup
1+ #!/usr/bin/env python
32
4- setup (
5- name = 'dbtest' ,
6- version = '0.1' ,
7- packages = ['dbtest' ],
8- install_requires = [
9- 'dotenv' ,
10- 'unittest' ,
11- 'psycopg2-binary' ,
12- 'sqlalchemy' ,
13- 'pandas' ,
14- ],
15- )
3+ import setuptools
4+
5+ if __name__ == "__main__" :
6+ setuptools .setup ()
Original file line number Diff line number Diff line change 11import unittest
2- from dbtest . unittest import DBintegrityTest
2+ import unit_db_test . testcase as dbtest
33
4-
5- class TestDBTestModule (DBintegrityTest ):
4+ class TestDBTestModule (dbtest .DBintegrityTest ):
65 db_config_file = '.env'
76
87 def test_not_null_items_in_column (self ):
Original file line number Diff line number Diff line change 1+ from unit_db_test .testcase import *
2+ from unit_db_test .postgresql import *
3+ from unit_db_test .utils import *
File renamed without changes.
Original file line number Diff line number Diff line change 1- # db_unit_tests .py
1+ # testcase .py
22import pandas as pd
33import unittest
44
5- from dbtest .postgresql import Postgres
6- from dbtest .utils import load_credentials_from
5+ from unit_db_test .postgresql import Postgres
6+ from unit_db_test .utils import load_credentials_from
77
88
99
You can’t perform that action at this time.
0 commit comments