From d9491491c138622e5789cb944e62d6087718d2d3 Mon Sep 17 00:00:00 2001 From: arzani Date: Wed, 13 Oct 2021 17:50:17 +0200 Subject: [PATCH] redesigned python structure --- .../py_project_structure/app/__init__.py | 1 - .../py_project_structure/app/__main__.py | 3 - .../py_project_structure/app/__version__.py | 3 - .../py_project_structure/app/cli.py | 12 -- .../{MANIFEST.in => package/__init__.py} | 0 .../__pycache__/__init__.cpython-38.pyc | Bin 0 -> 177 bytes .../package/__pycache__/core.cpython-38.pyc | Bin 0 -> 468 bytes .../__pycache__/helpers.cpython-38.pyc | Bin 0 -> 453 bytes .../py_project_structure/package/core.py | 9 ++ .../py_project_structure/package/helpers.py | 13 +++ .../py_project_structure/requirements.txt | 11 +- .../py_project_structure/runner.py | 4 - 00_introduction/py_project_structure/setup.py | 108 ------------------ .../py_project_structure/tests/test_core.py | 11 ++ .../tests/test_helpers.py | 11 ++ .../py_project_structure/tests/tests.py | 8 -- 16 files changed, 46 insertions(+), 148 deletions(-) delete mode 100644 00_introduction/py_project_structure/app/__init__.py delete mode 100644 00_introduction/py_project_structure/app/__main__.py delete mode 100644 00_introduction/py_project_structure/app/__version__.py delete mode 100644 00_introduction/py_project_structure/app/cli.py rename 00_introduction/py_project_structure/{MANIFEST.in => package/__init__.py} (100%) create mode 100644 00_introduction/py_project_structure/package/__pycache__/__init__.cpython-38.pyc create mode 100644 00_introduction/py_project_structure/package/__pycache__/core.cpython-38.pyc create mode 100644 00_introduction/py_project_structure/package/__pycache__/helpers.cpython-38.pyc create mode 100644 00_introduction/py_project_structure/package/core.py create mode 100644 00_introduction/py_project_structure/package/helpers.py delete mode 100644 00_introduction/py_project_structure/runner.py delete mode 100644 00_introduction/py_project_structure/setup.py create mode 100644 00_introduction/py_project_structure/tests/test_core.py create mode 100644 00_introduction/py_project_structure/tests/test_helpers.py delete mode 100644 00_introduction/py_project_structure/tests/tests.py diff --git a/00_introduction/py_project_structure/app/__init__.py b/00_introduction/py_project_structure/app/__init__.py deleted file mode 100644 index 8b13789..0000000 --- a/00_introduction/py_project_structure/app/__init__.py +++ /dev/null @@ -1 +0,0 @@ - diff --git a/00_introduction/py_project_structure/app/__main__.py b/00_introduction/py_project_structure/app/__main__.py deleted file mode 100644 index 4e28416..0000000 --- a/00_introduction/py_project_structure/app/__main__.py +++ /dev/null @@ -1,3 +0,0 @@ -from .cli import main - -main() diff --git a/00_introduction/py_project_structure/app/__version__.py b/00_introduction/py_project_structure/app/__version__.py deleted file mode 100644 index 96bfa14..0000000 --- a/00_introduction/py_project_structure/app/__version__.py +++ /dev/null @@ -1,3 +0,0 @@ -VERSION = (1, 0, 0) - -__version__ = '.'.join(map(str, VERSION)) diff --git a/00_introduction/py_project_structure/app/cli.py b/00_introduction/py_project_structure/app/cli.py deleted file mode 100644 index 861127d..0000000 --- a/00_introduction/py_project_structure/app/cli.py +++ /dev/null @@ -1,12 +0,0 @@ -from argparse import ArgumentParser - - -def main(): - parser = ArgumentParser(prog='cli') - parser.add_argument('name', help="The user's name.") - args = parser.parse_args() - print("Hello, %s!" % args.name) - - -if __name__ == '__main__': - main() diff --git a/00_introduction/py_project_structure/MANIFEST.in b/00_introduction/py_project_structure/package/__init__.py similarity index 100% rename from 00_introduction/py_project_structure/MANIFEST.in rename to 00_introduction/py_project_structure/package/__init__.py diff --git a/00_introduction/py_project_structure/package/__pycache__/__init__.cpython-38.pyc b/00_introduction/py_project_structure/package/__pycache__/__init__.cpython-38.pyc new file mode 100644 index 0000000000000000000000000000000000000000..b1151c12db81294c220b3d4a603ce134c23e62c4 GIT binary patch literal 177 zcmWIL<>g`kf?H405<&E15P=LBfgA@QE@lA|DGb33nv8xc8Hzx{2;x_mvsFxJacWU< zOkz=PVqQ!@Wk6AWR%&udaZI?2Z;XLKd}dxrQGQBka!F=>UQ9t{d;vs0zPO|aC|FvQ n8dH#%oSm4S8WRsxn^_VcuUAlci^C=ts3|Aa4rJeFAZ7pnbmTAX literal 0 HcmV?d00001 diff --git a/00_introduction/py_project_structure/package/__pycache__/core.cpython-38.pyc b/00_introduction/py_project_structure/package/__pycache__/core.cpython-38.pyc new file mode 100644 index 0000000000000000000000000000000000000000..d5c7389aaa1c082bfdc5d5a9f80e23a7531537b3 GIT binary patch literal 468 zcmYjN!AiqG5Zz504Pv3-#bZuNE~RG?5i8y-MJYm92;0pxjV7D8yQ#F)i}h#xrCh~> zzu?K)ltKq)n3;X^-t0`e-6Mkb@iXH$l#p**?3;tdHM%~~QoCQ1eUYT5K!h4wyMO{=7R421gBcYLZ2Fdv0(bU25+ dLiKjZw%e|?7d%8Z{$+tHj^EtN`9K~K_aE~R)95fSRuQYb|z3nAUz)|hs)&TbAZ-s;cz8-7Nw zp7H@+yy$ES(t$TS^M?0kl5wlm1d8A9S@OvMzI?ME0X6podqzouWbZHm#bmHy3}kHt zQ7B0FAHEI=eS#fOdLvB+c;aBE(bp9d;H6|EKdohf?a~`&0bY4W$2@xh8&*}Jug+ma z+i6>UP?9OEPxHc=!gW&HNwvrkm2jnBUiyopU|TnsYPW6Am5XQTG`8xsP+F*nO^$r8 zi{(_I{Qx{5!OysV!^f5gp5QXke7G87{z9gfKRrD1UN0s$%w-{5nrm)WvDwXI>yXF- z6*q~