From 1538b81b44b71e73d30c29c5cc0c6179b1694a7e Mon Sep 17 00:00:00 2001 From: Moasib-Arif Date: Wed, 20 Dec 2023 14:24:13 +0000 Subject: [PATCH 1/5] All imports working --- README.md | 17 ++++++- dpytools/Pipfile | 15 ++++++ dpytools/Pipfile.lock | 59 ++++++++++++++++++++++++ dpytools/__init__.py | 2 +- dpytools/config/config.py | 3 +- dpytools/config/properties/__init__.py | 2 +- dpytools/config/properties/base.py | 2 +- dpytools/config/properties/string.py | 2 +- dpytools/{http => http_client}/README.md | 0 dpytools/{http => http_client}/http.py | 0 10 files changed, 95 insertions(+), 7 deletions(-) create mode 100644 dpytools/Pipfile create mode 100644 dpytools/Pipfile.lock rename dpytools/{http => http_client}/README.md (100%) rename dpytools/{http => http_client}/http.py (100%) diff --git a/README.md b/README.md index 76e3fb4..e35135c 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,22 @@ Simple reusable python resources for digital publishing. ## Installation -**TODO** +Follow these steps to install the package on your local machine: + +1. **Clone the repository** + + Open your terminal and run the following command: + + ```bash + git clone https://github.com/GSS-Cogs/dp-python-tools.git + +2. **Navigate to the cloned repositry** +| cd dp-python-tools + +3. **Install all the packages** + +| pip install + ## Usage diff --git a/dpytools/Pipfile b/dpytools/Pipfile new file mode 100644 index 0000000..2bd4271 --- /dev/null +++ b/dpytools/Pipfile @@ -0,0 +1,15 @@ +[[source]] +url = "https://pypi.org/simple" +verify_ssl = true +name = "pypi" + +[packages] +config = "*" +logger = "*" +slack = "*" +sns = "*" + +[dev-packages] + +[requires] +python_version = "2.7" diff --git a/dpytools/Pipfile.lock b/dpytools/Pipfile.lock new file mode 100644 index 0000000..a13d574 --- /dev/null +++ b/dpytools/Pipfile.lock @@ -0,0 +1,59 @@ +{ + "_meta": { + "hash": { + "sha256": "93db113234d7ef12258fcefd66bbe8f88abada307b11ad353ef1d6005a636901" + }, + "pipfile-spec": 6, + "requires": { + "python_version": "2.7" + }, + "sources": [ + { + "name": "pypi", + "url": "https://pypi.org/simple", + "verify_ssl": true + } + ] + }, + "default": { + "config": { + "hashes": [ + "sha256:2dd4a03aa383d30711d5a3325a1858de225328d61950a85be5b74c100f63016d", + "sha256:79ffa009ff2663cc8ca29e56bcec031c044609d4bafaa4f884132a413101ce84" + ], + "index": "pypi", + "version": "==0.5.1" + }, + "logger": { + "hashes": [ + "sha256:4ecac57133c6376fa215f0fe6b4dc4d60e4d1ad8be005cab4e8a702df682f8b3" + ], + "index": "pypi", + "version": "==1.4" + }, + "python-http-client": { + "hashes": [ + "sha256:ad371d2bbedc6ea15c26179c6222a78bc9308d272435ddf1d5c84f068f249a36", + "sha256:bf841ee45262747e00dec7ee9971dfb8c7d83083f5713596488d67739170cea0" + ], + "index": "pypi", + "markers": "python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3'", + "version": "==3.3.7" + }, + "slack": { + "hashes": [ + "sha256:e0b0cd3ba730e81aa82eef0973a7970652b99f6445cb71a6dde1d29e6d13b051" + ], + "index": "pypi", + "version": "==0.0.2" + }, + "sns": { + "hashes": [ + "sha256:2d847d23eb8e0ea20054dbadabdecfafc529e4c7a16a6ce70205c4bf8ebc6cf4" + ], + "index": "pypi", + "version": "==0.1" + } + }, + "develop": {} +} diff --git a/dpytools/__init__.py b/dpytools/__init__.py index bff3af3..cdb0a7c 100644 --- a/dpytools/__init__.py +++ b/dpytools/__init__.py @@ -1,4 +1,4 @@ -from http.http import HttpClient +from http_client.http import HttpClient from config.config import Config from logger.logger import logger from slack.slack import SlackNotifier diff --git a/dpytools/config/config.py b/dpytools/config/config.py index c8b8daf..efc38e3 100644 --- a/dpytools/config/config.py +++ b/dpytools/config/config.py @@ -1,7 +1,6 @@ from typing import Dict -from properties.base import BaseProperty - +from .properties.base import BaseProperty class Config: diff --git a/dpytools/config/properties/__init__.py b/dpytools/config/properties/__init__.py index c7e4bfb..d6eca2d 100644 --- a/dpytools/config/properties/__init__.py +++ b/dpytools/config/properties/__init__.py @@ -1 +1 @@ -from string import StringProperty \ No newline at end of file +from .string import StringProperty \ No newline at end of file diff --git a/dpytools/config/properties/base.py b/dpytools/config/properties/base.py index 7a1dd4d..02dd34c 100644 --- a/dpytools/config/properties/base.py +++ b/dpytools/config/properties/base.py @@ -3,7 +3,7 @@ from typing import Any, Union, Tuple, Optional @dataclass -class BaseProperty(meta=ABCMeta): +class BaseProperty(metaclass=ABCMeta): name: str value: Any diff --git a/dpytools/config/properties/string.py b/dpytools/config/properties/string.py index adf5bee..74aa102 100644 --- a/dpytools/config/properties/string.py +++ b/dpytools/config/properties/string.py @@ -1,6 +1,6 @@ from typing import Optional -from base import BaseProperty +from .base import BaseProperty class StringProperty(BaseProperty): diff --git a/dpytools/http/README.md b/dpytools/http_client/README.md similarity index 100% rename from dpytools/http/README.md rename to dpytools/http_client/README.md diff --git a/dpytools/http/http.py b/dpytools/http_client/http.py similarity index 100% rename from dpytools/http/http.py rename to dpytools/http_client/http.py From ac96694e81127d19bbc784742e2302d180d72e41 Mon Sep 17 00:00:00 2001 From: Moasib-Arif Date: Wed, 20 Dec 2023 14:25:30 +0000 Subject: [PATCH 2/5] Minor changes --- README.md | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index e35135c..cd61df7 100644 --- a/README.md +++ b/README.md @@ -14,11 +14,12 @@ Follow these steps to install the package on your local machine: git clone https://github.com/GSS-Cogs/dp-python-tools.git 2. **Navigate to the cloned repositry** -| cd dp-python-tools + ```bash + cd dp-python-tools 3. **Install all the packages** - -| pip install + ```bash + pip install ## Usage From 06d8300f31fa7d1801538c6e99cfc0cc068c8d27 Mon Sep 17 00:00:00 2001 From: Moasib-Arif Date: Wed, 20 Dec 2023 14:44:25 +0000 Subject: [PATCH 3/5] movedd pipfiles --- dpytools/Pipfile | 15 ----------- dpytools/Pipfile.lock | 59 ------------------------------------------- 2 files changed, 74 deletions(-) delete mode 100644 dpytools/Pipfile delete mode 100644 dpytools/Pipfile.lock diff --git a/dpytools/Pipfile b/dpytools/Pipfile deleted file mode 100644 index 2bd4271..0000000 --- a/dpytools/Pipfile +++ /dev/null @@ -1,15 +0,0 @@ -[[source]] -url = "https://pypi.org/simple" -verify_ssl = true -name = "pypi" - -[packages] -config = "*" -logger = "*" -slack = "*" -sns = "*" - -[dev-packages] - -[requires] -python_version = "2.7" diff --git a/dpytools/Pipfile.lock b/dpytools/Pipfile.lock deleted file mode 100644 index a13d574..0000000 --- a/dpytools/Pipfile.lock +++ /dev/null @@ -1,59 +0,0 @@ -{ - "_meta": { - "hash": { - "sha256": "93db113234d7ef12258fcefd66bbe8f88abada307b11ad353ef1d6005a636901" - }, - "pipfile-spec": 6, - "requires": { - "python_version": "2.7" - }, - "sources": [ - { - "name": "pypi", - "url": "https://pypi.org/simple", - "verify_ssl": true - } - ] - }, - "default": { - "config": { - "hashes": [ - "sha256:2dd4a03aa383d30711d5a3325a1858de225328d61950a85be5b74c100f63016d", - "sha256:79ffa009ff2663cc8ca29e56bcec031c044609d4bafaa4f884132a413101ce84" - ], - "index": "pypi", - "version": "==0.5.1" - }, - "logger": { - "hashes": [ - "sha256:4ecac57133c6376fa215f0fe6b4dc4d60e4d1ad8be005cab4e8a702df682f8b3" - ], - "index": "pypi", - "version": "==1.4" - }, - "python-http-client": { - "hashes": [ - "sha256:ad371d2bbedc6ea15c26179c6222a78bc9308d272435ddf1d5c84f068f249a36", - "sha256:bf841ee45262747e00dec7ee9971dfb8c7d83083f5713596488d67739170cea0" - ], - "index": "pypi", - "markers": "python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3'", - "version": "==3.3.7" - }, - "slack": { - "hashes": [ - "sha256:e0b0cd3ba730e81aa82eef0973a7970652b99f6445cb71a6dde1d29e6d13b051" - ], - "index": "pypi", - "version": "==0.0.2" - }, - "sns": { - "hashes": [ - "sha256:2d847d23eb8e0ea20054dbadabdecfafc529e4c7a16a6ce70205c4bf8ebc6cf4" - ], - "index": "pypi", - "version": "==0.1" - } - }, - "develop": {} -} From 01f94232c7153de179f2e22f95d6f33d4816500f Mon Sep 17 00:00:00 2001 From: Moasib-Arif Date: Wed, 20 Dec 2023 14:45:21 +0000 Subject: [PATCH 4/5] moved pipfiles --- Pipfile | 15 +++++++++++++ Pipfile.lock | 59 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 74 insertions(+) create mode 100644 Pipfile create mode 100644 Pipfile.lock diff --git a/Pipfile b/Pipfile new file mode 100644 index 0000000..2bd4271 --- /dev/null +++ b/Pipfile @@ -0,0 +1,15 @@ +[[source]] +url = "https://pypi.org/simple" +verify_ssl = true +name = "pypi" + +[packages] +config = "*" +logger = "*" +slack = "*" +sns = "*" + +[dev-packages] + +[requires] +python_version = "2.7" diff --git a/Pipfile.lock b/Pipfile.lock new file mode 100644 index 0000000..a13d574 --- /dev/null +++ b/Pipfile.lock @@ -0,0 +1,59 @@ +{ + "_meta": { + "hash": { + "sha256": "93db113234d7ef12258fcefd66bbe8f88abada307b11ad353ef1d6005a636901" + }, + "pipfile-spec": 6, + "requires": { + "python_version": "2.7" + }, + "sources": [ + { + "name": "pypi", + "url": "https://pypi.org/simple", + "verify_ssl": true + } + ] + }, + "default": { + "config": { + "hashes": [ + "sha256:2dd4a03aa383d30711d5a3325a1858de225328d61950a85be5b74c100f63016d", + "sha256:79ffa009ff2663cc8ca29e56bcec031c044609d4bafaa4f884132a413101ce84" + ], + "index": "pypi", + "version": "==0.5.1" + }, + "logger": { + "hashes": [ + "sha256:4ecac57133c6376fa215f0fe6b4dc4d60e4d1ad8be005cab4e8a702df682f8b3" + ], + "index": "pypi", + "version": "==1.4" + }, + "python-http-client": { + "hashes": [ + "sha256:ad371d2bbedc6ea15c26179c6222a78bc9308d272435ddf1d5c84f068f249a36", + "sha256:bf841ee45262747e00dec7ee9971dfb8c7d83083f5713596488d67739170cea0" + ], + "index": "pypi", + "markers": "python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3'", + "version": "==3.3.7" + }, + "slack": { + "hashes": [ + "sha256:e0b0cd3ba730e81aa82eef0973a7970652b99f6445cb71a6dde1d29e6d13b051" + ], + "index": "pypi", + "version": "==0.0.2" + }, + "sns": { + "hashes": [ + "sha256:2d847d23eb8e0ea20054dbadabdecfafc529e4c7a16a6ce70205c4bf8ebc6cf4" + ], + "index": "pypi", + "version": "==0.1" + } + }, + "develop": {} +} From c6e435e3453ff7925641dab5eb62f3a6550767e9 Mon Sep 17 00:00:00 2001 From: Moasib-Arif Date: Wed, 3 Jan 2024 13:04:44 +0000 Subject: [PATCH 5/5] Minor changes Signed-off-by: Moasib-Arif --- Pipfile | 15 ----- Pipfile.lock | 59 ------------------- README.md | 13 +--- dpytools/__init__.py | 6 +- .../{http_client => http_clients}/README.md | 0 .../{http_client => http_clients}/http.py | 0 tests/test_nothing.py | 7 +++ 7 files changed, 13 insertions(+), 87 deletions(-) delete mode 100644 Pipfile delete mode 100644 Pipfile.lock rename dpytools/{http_client => http_clients}/README.md (100%) rename dpytools/{http_client => http_clients}/http.py (100%) create mode 100644 tests/test_nothing.py diff --git a/Pipfile b/Pipfile deleted file mode 100644 index 2bd4271..0000000 --- a/Pipfile +++ /dev/null @@ -1,15 +0,0 @@ -[[source]] -url = "https://pypi.org/simple" -verify_ssl = true -name = "pypi" - -[packages] -config = "*" -logger = "*" -slack = "*" -sns = "*" - -[dev-packages] - -[requires] -python_version = "2.7" diff --git a/Pipfile.lock b/Pipfile.lock deleted file mode 100644 index a13d574..0000000 --- a/Pipfile.lock +++ /dev/null @@ -1,59 +0,0 @@ -{ - "_meta": { - "hash": { - "sha256": "93db113234d7ef12258fcefd66bbe8f88abada307b11ad353ef1d6005a636901" - }, - "pipfile-spec": 6, - "requires": { - "python_version": "2.7" - }, - "sources": [ - { - "name": "pypi", - "url": "https://pypi.org/simple", - "verify_ssl": true - } - ] - }, - "default": { - "config": { - "hashes": [ - "sha256:2dd4a03aa383d30711d5a3325a1858de225328d61950a85be5b74c100f63016d", - "sha256:79ffa009ff2663cc8ca29e56bcec031c044609d4bafaa4f884132a413101ce84" - ], - "index": "pypi", - "version": "==0.5.1" - }, - "logger": { - "hashes": [ - "sha256:4ecac57133c6376fa215f0fe6b4dc4d60e4d1ad8be005cab4e8a702df682f8b3" - ], - "index": "pypi", - "version": "==1.4" - }, - "python-http-client": { - "hashes": [ - "sha256:ad371d2bbedc6ea15c26179c6222a78bc9308d272435ddf1d5c84f068f249a36", - "sha256:bf841ee45262747e00dec7ee9971dfb8c7d83083f5713596488d67739170cea0" - ], - "index": "pypi", - "markers": "python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3'", - "version": "==3.3.7" - }, - "slack": { - "hashes": [ - "sha256:e0b0cd3ba730e81aa82eef0973a7970652b99f6445cb71a6dde1d29e6d13b051" - ], - "index": "pypi", - "version": "==0.0.2" - }, - "sns": { - "hashes": [ - "sha256:2d847d23eb8e0ea20054dbadabdecfafc529e4c7a16a6ce70205c4bf8ebc6cf4" - ], - "index": "pypi", - "version": "==0.1" - } - }, - "develop": {} -} diff --git a/README.md b/README.md index cd61df7..902bc87 100644 --- a/README.md +++ b/README.md @@ -6,20 +6,13 @@ Simple reusable python resources for digital publishing. Follow these steps to install the package on your local machine: -1. **Clone the repository** +1. **Install the package** Open your terminal and run the following command: ```bash - git clone https://github.com/GSS-Cogs/dp-python-tools.git - -2. **Navigate to the cloned repositry** - ```bash - cd dp-python-tools - -3. **Install all the packages** - ```bash - pip install + pip install git+https://github.com/GSS-Cogs/dp-python-tools.git + ``` ## Usage diff --git a/dpytools/__init__.py b/dpytools/__init__.py index cdb0a7c..048de67 100644 --- a/dpytools/__init__.py +++ b/dpytools/__init__.py @@ -1,5 +1,5 @@ -from http_client.http import HttpClient -from config.config import Config +from http_clients.http import HttpClient +from config.config import Config from logger.logger import logger from slack.slack import SlackNotifier -from sns.sns import Subscription, publish \ No newline at end of file +from sns.sns import Subscription, publish diff --git a/dpytools/http_client/README.md b/dpytools/http_clients/README.md similarity index 100% rename from dpytools/http_client/README.md rename to dpytools/http_clients/README.md diff --git a/dpytools/http_client/http.py b/dpytools/http_clients/http.py similarity index 100% rename from dpytools/http_client/http.py rename to dpytools/http_clients/http.py diff --git a/tests/test_nothing.py b/tests/test_nothing.py new file mode 100644 index 0000000..e483b19 --- /dev/null +++ b/tests/test_nothing.py @@ -0,0 +1,7 @@ + +# TODO - remove as soon as we add our first test. +def test_nothing(): + """ + Empty test to stop failures for 0 coverage + """ + ... \ No newline at end of file