From 8667cb3176e99186547f19f14820a5b8af620696 Mon Sep 17 00:00:00 2001 From: Sudipto Baral Date: Sun, 25 Sep 2022 23:33:08 +0600 Subject: [PATCH 1/8] [#13] refactor: assets folder moved inside source code --- {assets => leeteasy/assets}/leetcoin.png | Bin leeteasy/services/notification_service.py | 2 +- 2 files changed, 1 insertion(+), 1 deletion(-) rename {assets => leeteasy/assets}/leetcoin.png (100%) diff --git a/assets/leetcoin.png b/leeteasy/assets/leetcoin.png similarity index 100% rename from assets/leetcoin.png rename to leeteasy/assets/leetcoin.png diff --git a/leeteasy/services/notification_service.py b/leeteasy/services/notification_service.py index e284076..c0a75e6 100644 --- a/leeteasy/services/notification_service.py +++ b/leeteasy/services/notification_service.py @@ -28,5 +28,5 @@ def notify(cls): notification.message = cls.prepare_notification() notification.title = f'{cls.app_name} - {cls.challenge.difficulty} ' \ f'Problem Alert \U0001F514' - notification.icon = 'assets/leetcoin.png' + notification.icon = 'leeteasy/assets/leetcoin.png' notification.send() From 64d30ea433a7266f405318be082fa8776a1c4a09 Mon Sep 17 00:00:00 2001 From: Sudipto Baral Date: Sun, 25 Sep 2022 23:47:02 +0600 Subject: [PATCH 2/8] [#13] refactor: buildtools script updated --- pyproject.toml | 5 +++++ setup.cfg | 10 +++++----- 2 files changed, 10 insertions(+), 5 deletions(-) create mode 100644 pyproject.toml diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 0000000..80e7c8c --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,5 @@ +[build-system] +requires = [ + "setuptools>=45", +] +build-backend = "setuptools.build_meta" diff --git a/setup.cfg b/setup.cfg index c33b5fa..5c5dfb2 100644 --- a/setup.cfg +++ b/setup.cfg @@ -1,5 +1,5 @@ [metadata] -name = leet-easy +name = leeteasy version = 0.1.0 author = Sudipto Baral author_email = sudiptobaral.me@gmail.com @@ -24,14 +24,11 @@ classifiers = [options] package_dir = - app=app + leeteasy=leeteasy packages = find_namespace: python_requires = >=3.10 install_requires = - -[options.packages.find] -where = attrs==22.1.0 certifi==2022.9.24 charset-normalizer==2.1.1 @@ -53,6 +50,9 @@ where = tomli==2.0.1 urllib3==1.26.12 +[options.packages.find] +where = + exclude = tests tests.* From 66b3d4576eebf1e437f943375f6c93206bb4fb65 Mon Sep 17 00:00:00 2001 From: Sudipto Baral Date: Mon, 26 Sep 2022 01:06:24 +0600 Subject: [PATCH 3/8] [#13] refactor: manifest.in file added to add datafiles with distributions --- MANIFEST.in | 1 + setup.cfg | 11 +++++------ 2 files changed, 6 insertions(+), 6 deletions(-) create mode 100644 MANIFEST.in diff --git a/MANIFEST.in b/MANIFEST.in new file mode 100644 index 0000000..209a183 --- /dev/null +++ b/MANIFEST.in @@ -0,0 +1 @@ +recursive-include leeteasy *.png diff --git a/setup.cfg b/setup.cfg index 5c5dfb2..72a52d3 100644 --- a/setup.cfg +++ b/setup.cfg @@ -9,24 +9,23 @@ long_description_content_type = text/markdown url = https://github.com/sudiptob2/leet-easy classifiers = - Development Status :: 0 - Alpha + Development Status :: 2 - Pre-Alpha Environment :: Console Intended Audience :: Information Technology - License :: GNU General Public License v3.0 + License :: OSI Approved :: GNU General Public License v3 (GPLv3) Operating System :: MacOS Operating System :: Microsoft Operating System :: POSIX :: Linux Programming Language :: Python :: 3.10 - Topic :: notification :: Leetcode - Topic :: Problem solving - Topic :: easy problem - Topic :: Desktop Notification + Topic :: Software Development + Topic :: Terminals [options] package_dir = leeteasy=leeteasy packages = find_namespace: python_requires = >=3.10 +include_package_data = True install_requires = attrs==22.1.0 From be9fc79c3532784ccde2bcd419f26545dc50ab35 Mon Sep 17 00:00:00 2001 From: Sudipto Baral Date: Mon, 26 Sep 2022 11:23:53 +0600 Subject: [PATCH 4/8] [#13] feature: implemented pathlib to access static assets --- leeteasy/assets/__init__.py | 0 leeteasy/services/notification_service.py | 5 ++++- 2 files changed, 4 insertions(+), 1 deletion(-) create mode 100644 leeteasy/assets/__init__.py diff --git a/leeteasy/assets/__init__.py b/leeteasy/assets/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/leeteasy/services/notification_service.py b/leeteasy/services/notification_service.py index c0a75e6..c951df5 100644 --- a/leeteasy/services/notification_service.py +++ b/leeteasy/services/notification_service.py @@ -1,3 +1,5 @@ +from pathlib import Path + from notifypy import Notify from leeteasy.services.request_handler import RequestHandler @@ -28,5 +30,6 @@ def notify(cls): notification.message = cls.prepare_notification() notification.title = f'{cls.app_name} - {cls.challenge.difficulty} ' \ f'Problem Alert \U0001F514' - notification.icon = 'leeteasy/assets/leetcoin.png' + resource_path = Path(__file__).parent.parent / 'assets/leetcoin.png' + notification.icon = resource_path notification.send() From 23a20937aae99bc717c5fdf3ad5b852680edf99c Mon Sep 17 00:00:00 2001 From: Sudipto Baral Date: Mon, 26 Sep 2022 11:24:31 +0600 Subject: [PATCH 5/8] [#13] patch: icon path fixed --- setup.cfg | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.cfg b/setup.cfg index 72a52d3..9ecaf1f 100644 --- a/setup.cfg +++ b/setup.cfg @@ -1,6 +1,6 @@ [metadata] name = leeteasy -version = 0.1.0 +version = 0.1.2 author = Sudipto Baral author_email = sudiptobaral.me@gmail.com description = Desktop notification of easy daily challenge of leetcode. From b4e0d290d52b83def11fa2264e3cdbccd730aa6d Mon Sep 17 00:00:00 2001 From: Sudipto Baral Date: Mon, 26 Sep 2022 11:37:27 +0600 Subject: [PATCH 6/8] [#13] patch: python 3.8 support --- setup.cfg | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/setup.cfg b/setup.cfg index 9ecaf1f..d1f6182 100644 --- a/setup.cfg +++ b/setup.cfg @@ -1,6 +1,6 @@ [metadata] name = leeteasy -version = 0.1.2 +version = 0.1.3 author = Sudipto Baral author_email = sudiptobaral.me@gmail.com description = Desktop notification of easy daily challenge of leetcode. @@ -16,7 +16,7 @@ classifiers = Operating System :: MacOS Operating System :: Microsoft Operating System :: POSIX :: Linux - Programming Language :: Python :: 3.10 + Programming Language :: Python :: 3.8 Topic :: Software Development Topic :: Terminals @@ -24,7 +24,7 @@ classifiers = package_dir = leeteasy=leeteasy packages = find_namespace: -python_requires = >=3.10 +python_requires = >=3.8 include_package_data = True install_requires = From 895b3b3501325857ef73b15dfe8c1c1fb0109aad Mon Sep 17 00:00:00 2001 From: Sudipto Baral Date: Mon, 26 Sep 2022 12:45:09 +0600 Subject: [PATCH 7/8] [#13] patch: setup files updated for python 3.8 --- Pipfile | 2 +- Pipfile.lock | 6 +++--- requirements.txt | 22 +++------------------- setup.cfg | 22 +++------------------- 4 files changed, 10 insertions(+), 42 deletions(-) diff --git a/Pipfile b/Pipfile index c65be00..b02d641 100644 --- a/Pipfile +++ b/Pipfile @@ -15,4 +15,4 @@ pytest = "*" pytest-mock = "*" [requires] -python_version = "3.10" +python_version = "3.8" diff --git a/Pipfile.lock b/Pipfile.lock index d0e98bc..cf15dca 100644 --- a/Pipfile.lock +++ b/Pipfile.lock @@ -1,11 +1,11 @@ { "_meta": { "hash": { - "sha256": "b1f7443b0ef383b55df1e84167df1ab9b100229a9bc577446cfb968d3f85f5d7" + "sha256": "64e11253c57c51a0d6a0ae423b649c0b13449cc0acea3bd1a5c05b903942004e" }, "pipfile-spec": 6, "requires": { - "python_version": "3.10" + "python_version": "3.8" }, "sources": [ { @@ -93,7 +93,7 @@ "sha256:3fa96cf423e6987997fc326ae8df396db2a8b7c667747d47ddd8ecba91f4a74e", "sha256:b930dd878d5a8afb066a637fbb35144fe7901e3b209d1cd4f524bd0e9deee997" ], - "markers": "python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3, 3.4, 3.5' and python_version < '4'", + "markers": "python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3, 3.4, 3.5' and python_version < '4.0'", "version": "==1.26.12" } }, diff --git a/requirements.txt b/requirements.txt index 07e08ac..9632171 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,20 +1,4 @@ -attrs==22.1.0 -certifi==2022.9.24 -charset-normalizer==2.1.1 -click==8.1.3 -idna==3.4 -iniconfig==1.1.1 -jeepney==0.8.0 -loguru==0.5.3 -mccabe==0.7.0 +requests~=2.28.1 +click~=8.1.3 +schedule~=1.1.0 notify-py==0.3.3 -packaging==21.3 -pluggy==1.0.0 -py==1.11.0 -pycodestyle==2.9.1 -pyflakes==2.5.0 -pyparsing==3.0.9 -requests==2.28.1 -schedule==1.1.0 -tomli==2.0.1 -urllib3==1.26.12 diff --git a/setup.cfg b/setup.cfg index d1f6182..38ee6f3 100644 --- a/setup.cfg +++ b/setup.cfg @@ -28,26 +28,10 @@ python_requires = >=3.8 include_package_data = True install_requires = - attrs==22.1.0 - certifi==2022.9.24 - charset-normalizer==2.1.1 - click==8.1.3 - idna==3.4 - iniconfig==1.1.1 - jeepney==0.8.0 - loguru==0.5.3 - mccabe==0.7.0 + requests~=2.28.1 + click~=8.1.3 + schedule~=1.1.0 notify-py==0.3.3 - packaging==21.3 - pluggy==1.0.0 - py==1.11.0 - pycodestyle==2.9.1 - pyflakes==2.5.0 - pyparsing==3.0.9 - requests==2.28.1 - schedule==1.1.0 - tomli==2.0.1 - urllib3==1.26.12 [options.packages.find] where = From 8e2221fc300e1b1ffbeffce5da50c752e2bed4e2 Mon Sep 17 00:00:00 2001 From: Sudipto Baral Date: Mon, 26 Sep 2022 12:49:48 +0600 Subject: [PATCH 8/8] [#13] docs: changelog updated --- CHANGELOG.md | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 CHANGELOG.md diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 0000000..52e9316 --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1,9 @@ +# CHANGELOG.md + +## 0.1.3 (Pre-Alpha) + +Features: + + - schedule for 2 problem difficulty + - python 3.8 support + - notification icon support \ No newline at end of file