diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index fe3e4d2..8956249 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,7 +1,7 @@ repos: - - repo: https://gitlab.com/pycqa/flake8 - rev: '3.9.2' + repo: https://github.com/pycqa/flake8 + rev: '6.1.0' hooks: - id: flake8 @@ -11,8 +11,8 @@ repos: args: [--max-line-length=120, --extend-ignore=SFS101] - - repo: https://github.com/pre-commit/mirrors-isort - rev: 'v5.8.0' + repo: https://github.com/PyCQA/isort + rev: '5.12.0' hooks: - id: isort diff --git a/README.md b/README.md index 85eab6b..1ff24d1 100644 --- a/README.md +++ b/README.md @@ -40,12 +40,12 @@ Clean code with pre-commit hooks: [`flake8`](https://flake8.pycqa.org/en/latest/ ## [Release Notes](https://github.com/thevickypedia/pynotification/blob/main/release_notes.rst) **Requirement** ```shell -python -m pip install changelog-generator +python -m pip install gitverse ``` **Usage** ```shell -changelog reverse -f release_notes.rst -t 'Release Notes' +gitverse-release reverse -f release_notes.rst -t 'Release Notes' ``` ## Linting diff --git a/docs/README.html b/docs/README.html index 259531b..5214a0a 100644 --- a/docs/README.html +++ b/docs/README.html @@ -89,11 +89,11 @@
Requirement
-python -m pip install changelog-generator
+python -m pip install gitverse
Usage
-changelog reverse -f release_notes.rst -t 'Release Notes'
+gitverse-release reverse -f release_notes.rst -t 'Release Notes'
diff --git a/docs/_sources/README.md.txt b/docs/_sources/README.md.txt
index 85eab6b..1ff24d1 100644
--- a/docs/_sources/README.md.txt
+++ b/docs/_sources/README.md.txt
@@ -40,12 +40,12 @@ Clean code with pre-commit hooks: [`flake8`](https://flake8.pycqa.org/en/latest/
## [Release Notes](https://github.com/thevickypedia/pynotification/blob/main/release_notes.rst)
**Requirement**
```shell
-python -m pip install changelog-generator
+python -m pip install gitverse
```
**Usage**
```shell
-changelog reverse -f release_notes.rst -t 'Release Notes'
+gitverse-release reverse -f release_notes.rst -t 'Release Notes'
```
## Linting
diff --git a/docs/_static/pygments.css b/docs/_static/pygments.css
index 691aeb8..0d49244 100644
--- a/docs/_static/pygments.css
+++ b/docs/_static/pygments.css
@@ -17,6 +17,7 @@ span.linenos.special { color: #000000; background-color: #ffffc0; padding-left:
.highlight .cs { color: #408090; background-color: #fff0f0 } /* Comment.Special */
.highlight .gd { color: #A00000 } /* Generic.Deleted */
.highlight .ge { font-style: italic } /* Generic.Emph */
+.highlight .ges { font-weight: bold; font-style: italic } /* Generic.EmphStrong */
.highlight .gr { color: #FF0000 } /* Generic.Error */
.highlight .gh { color: #000080; font-weight: bold } /* Generic.Heading */
.highlight .gi { color: #00A000 } /* Generic.Inserted */
diff --git a/docs/index.html b/docs/index.html
index 5712482..ebd5ac0 100644
--- a/docs/index.html
+++ b/docs/index.html
@@ -81,7 +81,7 @@ Welcome to pynotification’s documentation!
-pynotification.pynotifier.pynotifier(title: AnyStr, message: AnyStr, dialog: bool = False, icon: Optional[Union[str, PathLike]] = None, debug: bool = False, logger: Optional[Logger] = None, destroy: bool = False) NoReturn ¶
+pynotification.pynotifier.pynotifier(title: AnyStr, message: AnyStr, dialog: bool = False, icon: Optional[Union[str, PathLike]] = None, debug: bool = False, logger: Optional[Logger] = None, destroy: bool = False) None ¶
Triggers a system notification.
- Parameters:
@@ -143,7 +143,7 @@ Welcome to pynotification’s documentation!
-
-run() NoReturn ¶
+run() None ¶
Create a window class and sends a notification.
@@ -163,7 +163,7 @@ Welcome to pynotification’s documentation!
-on_destroy(*args, **kwargs) NoReturn ¶
+on_destroy(*args, **kwargs) None ¶
Destroys the notification window created.
- Parameters:
diff --git a/docs/searchindex.js b/docs/searchindex.js
index 2299c45..d200ca6 100644
--- a/docs/searchindex.js
+++ b/docs/searchindex.js
@@ -1 +1 @@
-Search.setIndex({"docnames": ["README", "index"], "filenames": ["README.md", "index.rst"], "titles": ["PyNotification", "Welcome to pynotification\u2019s documentation!"], "terms": {"platform": 0, "support": [0, 1], "deploy": 0, "python": 0, "modul": 0, "trigger": [0, 1], "o": [0, 1], "agnost": [0, 1], "notif": [0, 1], "messagebox": 0, "m": 0, "pip": 0, "from": 0, "import": 0, "pynotifi": [0, 1], "titl": [0, 1], "test": 0, "messag": [0, 1], "dialog": [0, 1], "boolean": [0, 1], "flag": [0, 1], "popup": 0, "window": 0, "block": [0, 1], "process": [0, 1], "until": [0, 1], "user": 0, "ha": [0, 1], "press": 0, "ok": 0, "icon": [0, 1], "custom": [0, 1], "us": [0, 1], "linux": [0, 1], "oper": 0, "system": [0, 1], "choos": 0, "ani": [0, 1], "pre": 0, "defin": 0, "png": [0, 1], "file": [0, 1], "ico": [0, 1], "default": [0, 1], "destroi": [0, 1], "valu": [0, 1], "box": [0, 1], "after": 0, "notifi": [0, 1], "debug": [0, 1], "displai": [0, 1], "log": [0, 1], "form": 0, "info": 0, "warn": 0, "error": [0, 1], "logger": [0, 1], "bring": [0, 1], "your": [0, 1], "own": [0, 1], "docstr": 0, "format": 0, "googl": 0, "style": 0, "convent": 0, "pep": 0, "8": 0, "clean": 0, "commit": 0, "hook": 0, "flake8": 0, "isort": 0, "requir": [0, 1], "changelog": 0, "gener": 0, "revers": 0, "f": 0, "release_not": 0, "rst": 0, "t": [0, 1], "precommit": 0, "ensur": 0, "doc": 0, "creation": 0, "ar": 0, "run": [0, 1], "everi": 0, "sphinx": 0, "5": 0, "1": 0, "recommonmark": 0, "all": [0, 1], "http": 0, "org": 0, "project": 0, "thevickypedia": 0, "github": 0, "io": 0, "vignesh": 0, "rao": 0, "under": 0, "mit": 0, "instal": 1, "usag": 1, "option": 1, "argument": 1, "code": 1, "standard": 1, "releas": 1, "note": 1, "lint": 1, "pypi": 1, "packag": 1, "runbook": 1, "licens": 1, "copyright": 1, "default_logg": 1, "configur": 1, "return": 1, "object": 1, "an": 1, "type": 1, "anystr": 1, "bool": 1, "fals": 1, "union": 1, "str": 1, "pathlik": 1, "none": 1, "noreturn": 1, "paramet": 1, "go": 1, "show": 1, "thi": 1, "add": 1, "output": 1, "balloon": 1, "immedi": 1, "person": 1, "both": 1, "pleas": 1, "doesn": 1, "guarante": 1, "pop": 1, "up": 1, "built": 1, "tool": 1, "how": 1, "i": 1, "sole": 1, "reli": 1, "set": 1, "windowso": 1, "binari": 1, "api": 1, "gui": 1, "windowsnotif": 1, "class": 1, "mod": 1, "windowsballoontip": 1, "msg": 1, "instanti": 1, "dedic": 1, "initi": 1, "assign": 1, "creat": 1, "member": 1, "receiv": 1, "fashion": 1, "send": 1, "tip": 1, "wa": 1, "success": 1, "otherwis": 1, "string": 1, "on_destroi": 1, "arg": 1, "kwarg": 1, "keyword": 1, "lparam": 1, "hwnd": 1, "wparam": 1, "dialogwindow": 1, "button": 1, "click": 1, "mac_dialog": 1, "handl": 1, "maco": 1, "win_dialog": 1, "lin_dialog": 1, "index": 1, "search": 1, "page": 1}, "objects": {"pynotification": [[1, 0, 0, "-", "mod"], [1, 0, 0, "-", "pynotifier"], [1, 0, 0, "-", "window"]], "pynotification.mod": [[1, 1, 1, "", "WindowsBalloonTip"]], "pynotification.mod.WindowsBalloonTip": [[1, 2, 1, "", "notify"], [1, 2, 1, "", "on_destroy"], [1, 2, 1, "", "run"]], "pynotification.pynotifier": [[1, 3, 1, "", "default_logger"], [1, 3, 1, "", "pynotifier"]], "pynotification.window": [[1, 1, 1, "", "DialogWindow"]], "pynotification.window.DialogWindow": [[1, 2, 1, "", "lin_dialog"], [1, 2, 1, "", "mac_dialog"], [1, 2, 1, "", "win_dialog"]]}, "objtypes": {"0": "py:module", "1": "py:class", "2": "py:method", "3": "py:function"}, "objnames": {"0": ["py", "module", "Python module"], "1": ["py", "class", "Python class"], "2": ["py", "method", "Python method"], "3": ["py", "function", "Python function"]}, "titleterms": {"pynotif": [0, 1], "instal": 0, "usag": 0, "option": 0, "argument": 0, "code": 0, "standard": 0, "releas": 0, "note": 0, "lint": 0, "pypi": 0, "packag": 0, "runbook": 0, "licens": 0, "copyright": 0, "welcom": 1, "": 1, "document": 1, "read": 1, "me": 1, "modul": 1, "window": 1, "indic": 1, "tabl": 1}, "envversion": {"sphinx.domains.c": 2, "sphinx.domains.changeset": 1, "sphinx.domains.citation": 1, "sphinx.domains.cpp": 6, "sphinx.domains.index": 1, "sphinx.domains.javascript": 2, "sphinx.domains.math": 2, "sphinx.domains.python": 3, "sphinx.domains.rst": 2, "sphinx.domains.std": 2, "sphinx": 56}})
\ No newline at end of file
+Search.setIndex({"docnames": ["README", "index"], "filenames": ["README.md", "index.rst"], "titles": ["PyNotification", "Welcome to pynotification\u2019s documentation!"], "terms": {"platform": 0, "support": [0, 1], "deploy": 0, "python": 0, "modul": 0, "trigger": [0, 1], "o": [0, 1], "agnost": [0, 1], "notif": [0, 1], "messagebox": 0, "m": 0, "pip": 0, "from": 0, "import": 0, "pynotifi": [0, 1], "titl": [0, 1], "test": 0, "messag": [0, 1], "dialog": [0, 1], "boolean": [0, 1], "flag": [0, 1], "popup": 0, "window": 0, "block": [0, 1], "process": [0, 1], "until": [0, 1], "user": 0, "ha": [0, 1], "press": 0, "ok": 0, "icon": [0, 1], "custom": [0, 1], "us": [0, 1], "linux": [0, 1], "oper": 0, "system": [0, 1], "choos": 0, "ani": [0, 1], "pre": 0, "defin": 0, "png": [0, 1], "file": [0, 1], "ico": [0, 1], "default": [0, 1], "destroi": [0, 1], "valu": [0, 1], "box": [0, 1], "after": 0, "notifi": [0, 1], "debug": [0, 1], "displai": [0, 1], "log": [0, 1], "form": 0, "info": 0, "warn": 0, "error": [0, 1], "logger": [0, 1], "bring": [0, 1], "your": [0, 1], "own": [0, 1], "docstr": 0, "format": 0, "googl": 0, "style": 0, "convent": 0, "pep": 0, "8": 0, "clean": 0, "commit": 0, "hook": 0, "flake8": 0, "isort": 0, "requir": [0, 1], "gitvers": 0, "revers": 0, "f": 0, "release_not": 0, "rst": 0, "t": [0, 1], "precommit": 0, "ensur": 0, "doc": 0, "creation": 0, "ar": 0, "run": [0, 1], "everi": 0, "sphinx": 0, "5": 0, "1": 0, "recommonmark": 0, "all": [0, 1], "http": 0, "org": 0, "project": 0, "thevickypedia": 0, "github": 0, "io": 0, "vignesh": 0, "rao": 0, "under": 0, "mit": 0, "instal": 1, "usag": 1, "option": 1, "argument": 1, "code": 1, "standard": 1, "releas": 1, "note": 1, "lint": 1, "pypi": 1, "packag": 1, "runbook": 1, "licens": 1, "copyright": 1, "default_logg": 1, "configur": 1, "return": 1, "object": 1, "an": 1, "type": 1, "anystr": 1, "bool": 1, "fals": 1, "union": 1, "str": 1, "pathlik": 1, "none": 1, "paramet": 1, "go": 1, "show": 1, "thi": 1, "add": 1, "output": 1, "balloon": 1, "immedi": 1, "person": 1, "both": 1, "pleas": 1, "doesn": 1, "guarante": 1, "pop": 1, "up": 1, "built": 1, "tool": 1, "how": 1, "i": 1, "sole": 1, "reli": 1, "set": 1, "windowso": 1, "binari": 1, "api": 1, "gui": 1, "windowsnotif": 1, "class": 1, "mod": 1, "windowsballoontip": 1, "msg": 1, "instanti": 1, "dedic": 1, "initi": 1, "assign": 1, "creat": 1, "member": 1, "receiv": 1, "fashion": 1, "send": 1, "tip": 1, "wa": 1, "success": 1, "otherwis": 1, "string": 1, "on_destroi": 1, "arg": 1, "kwarg": 1, "keyword": 1, "lparam": 1, "hwnd": 1, "wparam": 1, "dialogwindow": 1, "button": 1, "click": 1, "mac_dialog": 1, "handl": 1, "maco": 1, "win_dialog": 1, "lin_dialog": 1, "index": 1, "search": 1, "page": 1}, "objects": {"pynotification": [[1, 0, 0, "-", "mod"], [1, 0, 0, "-", "pynotifier"], [1, 0, 0, "-", "window"]], "pynotification.mod": [[1, 1, 1, "", "WindowsBalloonTip"]], "pynotification.mod.WindowsBalloonTip": [[1, 2, 1, "", "notify"], [1, 2, 1, "", "on_destroy"], [1, 2, 1, "", "run"]], "pynotification.pynotifier": [[1, 3, 1, "", "default_logger"], [1, 3, 1, "", "pynotifier"]], "pynotification.window": [[1, 1, 1, "", "DialogWindow"]], "pynotification.window.DialogWindow": [[1, 2, 1, "", "lin_dialog"], [1, 2, 1, "", "mac_dialog"], [1, 2, 1, "", "win_dialog"]]}, "objtypes": {"0": "py:module", "1": "py:class", "2": "py:method", "3": "py:function"}, "objnames": {"0": ["py", "module", "Python module"], "1": ["py", "class", "Python class"], "2": ["py", "method", "Python method"], "3": ["py", "function", "Python function"]}, "titleterms": {"pynotif": [0, 1], "instal": 0, "usag": 0, "option": 0, "argument": 0, "code": 0, "standard": 0, "releas": 0, "note": 0, "lint": 0, "pypi": 0, "packag": 0, "runbook": 0, "licens": 0, "copyright": 0, "welcom": 1, "": 1, "document": 1, "read": 1, "me": 1, "modul": 1, "window": 1, "indic": 1, "tabl": 1}, "envversion": {"sphinx.domains.c": 2, "sphinx.domains.changeset": 1, "sphinx.domains.citation": 1, "sphinx.domains.cpp": 6, "sphinx.domains.index": 1, "sphinx.domains.javascript": 2, "sphinx.domains.math": 2, "sphinx.domains.python": 3, "sphinx.domains.rst": 2, "sphinx.domains.std": 2, "sphinx": 56}})
\ No newline at end of file
diff --git a/pynotification/__init__.py b/pynotification/__init__.py
index 493f9aa..6df8559 100644
--- a/pynotification/__init__.py
+++ b/pynotification/__init__.py
@@ -2,4 +2,4 @@
from .pynotifier import pynotifier # noqa: F401
-version = "0.1.2"
+version = "0.1.3"
diff --git a/pynotification/mod.py b/pynotification/mod.py
index 881b68d..0a7a1bb 100644
--- a/pynotification/mod.py
+++ b/pynotification/mod.py
@@ -10,7 +10,7 @@
import pathlib
import platform
import time
-from typing import NoReturn, Union
+from typing import Union
_SYSTEM = platform.system()
@@ -55,7 +55,7 @@ def __init__(self, title: str, msg: str, icon: Union[str, os.PathLike],
self.icon = os.path.join(pathlib.Path(__file__).parent, "notification.ico")
self.hwnd: int = 0
- def run(self) -> NoReturn:
+ def run(self) -> None:
"""Create a window class and sends a notification."""
message_map = {
win32con.WM_DESTROY: self.on_destroy,
@@ -103,7 +103,7 @@ def notify(self) -> Union[bool, str]:
except Exception as error:
return error.__str__()
- def on_destroy(self, *args, **kwargs) -> NoReturn:
+ def on_destroy(self, *args, **kwargs) -> None:
"""Destroys the notification window created.
Args:
diff --git a/pynotification/pynotifier.py b/pynotification/pynotifier.py
index 3965d46..9a28ff2 100644
--- a/pynotification/pynotifier.py
+++ b/pynotification/pynotifier.py
@@ -2,7 +2,7 @@
import logging
import os
-from typing import AnyStr, NoReturn, Union
+from typing import AnyStr, Union
from . import mod, window
@@ -27,7 +27,7 @@ def default_logger() -> logging.Logger:
# noinspection PyProtectedMember
def pynotifier(title: AnyStr, message: AnyStr, dialog: bool = False, icon: Union[str, os.PathLike] = None,
- debug: bool = False, logger: logging.Logger = None, destroy: bool = False) -> NoReturn:
+ debug: bool = False, logger: logging.Logger = None, destroy: bool = False) -> None:
"""Triggers a system notification.
Args:
diff --git a/pypi_upload.sh b/pypi_upload.sh
deleted file mode 100644
index e365b06..0000000
--- a/pypi_upload.sh
+++ /dev/null
@@ -1,28 +0,0 @@
-#!/usr/bin/env bash
-# 'set -e' stops the execution of a script if a command or pipeline has an error.
-# This is the opposite of the default shell behaviour, which is to ignore errors in scripts.
-set -e
-
-echo -e "\nCleaning up existing pieces"
-rm -rf dist pynotification.egg-info
-
-echo -e "\nUpgrading pip"
-python -m pip install --upgrade pip
-
-echo -e "\nInstalling dependencies"
-pip install build twine
-
-echo -e "\nCreating package"
-python -m build
-
-echo -e "\nRunning twine check"
-twine check dist/*
-
-read -p "Are you sure you want to proceed uploading to pypi? " prompt
-if [[ $prompt =~ [yY](es)* ]]
- then
- echo -e "\nUploading to pypi"
- twine upload dist/*.whl
- else
- echo -e "BUILD PROCESS TERMINATED\n"
-fi
diff --git a/release_notes.rst b/release_notes.rst
index 2e7ce56..8df37b5 100644
--- a/release_notes.rst
+++ b/release_notes.rst
@@ -20,16 +20,14 @@ Release Notes
- Add OS specific dependencies in pyproject.toml
- Bump version, update README.md and release_notes.rst
+0.0.7 (01/09/2023)
+------------------
+- test commit
+
0.0.8 (01/09/2023)
------------------
- Fix interchanged title and message for `macOS`
- Update module to production ready
-- Set tool package in pyproject.toml
-
-0.0.7 (01/09/2023)
-------------------
-- Create sphinx docs and run it as part of pre-commit
-- Bump version
0.0.6 (01/09/2023)
------------------
@@ -42,21 +40,3 @@ Release Notes
- Add release_notes.rst, update README.md and .gitignore
- Add more project urls in pyproject.toml
- Bump version
-
-0.0.4 (01/09/2023)
-------------------
-- Write test cases and add `.pre-commit-config.yaml`
-- Add pyproject.toml
-- Refactor code
-
-0.0.3 (01/09/2023)
-------------------
-- Create a base script
-
-0.0.2 (01/09/2023)
-------------------
-- Update README.md and .gitignore
-
-0.0.1 (01/09/2023)
-------------------
-- Initial commit
diff --git a/requirements.txt b/requirements.txt
deleted file mode 100644
index 28311ef..0000000
--- a/requirements.txt
+++ /dev/null
@@ -1,3 +0,0 @@
--e .
-pre-commit
-pytest