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 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/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/leeteasy/assets/__init__.py b/leeteasy/assets/__init__.py new file mode 100644 index 0000000..e69de29 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..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 = 'assets/leetcoin.png' + resource_path = Path(__file__).parent.parent / 'assets/leetcoin.png' + notification.icon = resource_path notification.send() 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/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 c33b5fa..38ee6f3 100644 --- a/setup.cfg +++ b/setup.cfg @@ -1,6 +1,6 @@ [metadata] -name = leet-easy -version = 0.1.0 +name = leeteasy +version = 0.1.3 author = Sudipto Baral author_email = sudiptobaral.me@gmail.com description = Desktop notification of easy daily challenge of leetcode. @@ -9,49 +9,32 @@ 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 + Programming Language :: Python :: 3.8 + Topic :: Software Development + Topic :: Terminals [options] package_dir = - app=app + leeteasy=leeteasy packages = find_namespace: -python_requires = >=3.10 +python_requires = >=3.8 +include_package_data = True install_requires = + requests~=2.28.1 + click~=8.1.3 + schedule~=1.1.0 + notify-py==0.3.3 [options.packages.find] where = - 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 - 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 exclude = tests