diff --git a/.github/workflows/markdown-validation.yml b/.github/workflows/markdown-validation.yml index 1d80805..c1c29ae 100644 --- a/.github/workflows/markdown-validation.yml +++ b/.github/workflows/markdown-validation.yml @@ -8,8 +8,6 @@ on: jobs: none-shall-pass: - runs-on: - - self-hosted - - Ubuntu + runs-on: thevickypedia-default steps: - uses: thevickypedia/none-shall-pass@v5 diff --git a/.github/workflows/python-publish.yml b/.github/workflows/python-publish.yml index 360a055..d9d4a8b 100644 --- a/.github/workflows/python-publish.yml +++ b/.github/workflows/python-publish.yml @@ -1,32 +1,14 @@ -# This workflow will upload a Python Package using Twine when a release is created - name: pypi-publish -# Controls when the workflow will run on: - workflow_dispatch: {} + workflow_dispatch: release: types: [ published ] jobs: - deploy: - runs-on: self-hosted + pypi-publisher: + runs-on: thevickypedia-default steps: - - uses: actions/checkout@v4 - - name: Set up Python - uses: actions/setup-python@v5 - with: - python-version: '3.x' - - name: Install dependencies - run: | - python -m pip install --upgrade pip - pip install build twine - - name: Create packages - run: python -m build - - name: Run twine check - run: twine check dist/* - - name: Upload to pypi - env: - TWINE_USERNAME: ${{ secrets.PYPI_USER }} - TWINE_PASSWORD: ${{ secrets.PYPI_TOKEN }} - run: twine upload dist/*.whl + - uses: thevickypedia/pypi-publisher@v3 + env: + token: ${{ secrets.PYPI_TOKEN }} diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index d908356..fce71e0 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,42 +1,56 @@ +--- fail_fast: true -exclude: ^docs/ +exclude: ^(notebooks/|scripts/|.github/|docs/) repos: - - repo: https://github.com/pre-commit/pre-commit-hooks - rev: v4.4.0 - hooks: - - id: check-added-large-files - - id: check-ast - - id: check-byte-order-marker - - id: check-builtin-literals - - id: check-case-conflict - - id: check-docstring-first - - id: check-executables-have-shebangs - - id: check-shebang-scripts-are-executable - - id: check-merge-conflict - - id: check-toml - - id: check-vcs-permalinks - - id: check-xml - - id: debug-statements - - id: destroyed-symlinks - - id: detect-aws-credentials - - id: detect-private-key - - id: end-of-file-fixer - - id: fix-byte-order-marker - - id: mixed-line-ending - - id: name-tests-test - - id: requirements-txt-fixer - - id: trailing-whitespace + - repo: https://github.com/pre-commit/pre-commit-hooks + rev: v4.4.0 + hooks: + - id: check-yaml + - id: check-json + - id: check-added-large-files + - id: check-ast + - id: check-byte-order-marker + - id: check-builtin-literals + - id: check-case-conflict + - id: check-docstring-first + - id: check-executables-have-shebangs + - id: check-shebang-scripts-are-executable + - id: check-merge-conflict + - id: check-toml + - id: check-vcs-permalinks + - id: check-xml + - id: debug-statements + - id: destroyed-symlinks + - id: detect-aws-credentials + - id: detect-private-key + - id: end-of-file-fixer + - id: fix-byte-order-marker + - id: mixed-line-ending + - id: name-tests-test + - id: requirements-txt-fixer + - id: trailing-whitespace - - repo: https://github.com/PyCQA/isort - rev: 5.12.0 - hooks: - - id: isort + - repo: https://github.com/PyCQA/isort + rev: 5.12.0 + hooks: + - id: isort - - repo: local - hooks: - - id: runbook - name: runbook - entry: /bin/bash gen_docs.sh - language: system - pass_filenames: false - always_run: true + - repo: https://github.com/PyCQA/flake8 + rev: 7.0.0 + hooks: + - id: flake8 + args: [-j8, '--ignore=F401,W503,E203,E501,F821,E306,E722,N812'] + + - repo: https://github.com/jumanjihouse/pre-commit-hook-yamlfmt + rev: 0.2.3 + hooks: + - id: yamlfmt + + - repo: local + hooks: + - id: runbook + name: runbook + entry: /bin/bash gen_docs.sh + language: system + pass_filenames: false + always_run: true diff --git a/doc_generator/conf.py b/doc_generator/conf.py index 8a0d7e7..7f973d5 100644 --- a/doc_generator/conf.py +++ b/doc_generator/conf.py @@ -13,13 +13,13 @@ import os import sys -sys.path.insert(0, os.path.abspath('..')) +sys.path.insert(0, os.path.abspath("..")) # -- Project information ----------------------------------------------------- -project = 'Gmail Connector' -copyright = '2021, Vignesh Rao' -author = 'Vignesh Rao' +project = "Gmail Connector" +copyright = "2021, Vignesh Rao" +author = "Vignesh Rao" # -- General configuration --------------------------------------------------- @@ -27,50 +27,52 @@ # extensions coming with Sphinx (named 'sphinx.ext.*') or your custom # ones. extensions = [ - 'sphinx.ext.napoleon', # certain styles of doc strings - 'sphinx.ext.autodoc', # generates from doc strings - 'recommonmark', # supports markdown integration + "sphinx.ext.napoleon", # certain styles of doc strings + "sphinx.ext.autodoc", # generates from doc strings + "recommonmark", # supports markdown integration ] # Exclude private members in the docs # https://www.sphinx-doc.org/en/master/usage/extensions/autodoc.html#confval-autodoc_default_options -autodoc_default_options = {"members": True, "undoc-members": True, "private-members": False} +autodoc_default_options = { + "members": True, + "undoc-members": True, + "private-members": False, +} # https://www.sphinx-doc.org/en/master/usage/extensions/napoleon.html#configuration napoleon_google_docstring = True napoleon_use_param = False # Add any paths that contain templates here, relative to this directory. -templates_path = ['_templates'] +templates_path = ["_templates"] # List of patterns, relative to source directory, that match files and # directories to ignore when looking for source files. # This pattern also affects html_static_path and html_extra_path. -exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store'] +exclude_patterns = ["_build", "Thumbs.db", ".DS_Store"] # -- Options for HTML output ------------------------------------------------- # The theme to use for HTML and HTML Help pages. See the documentation for # a list of builtin themes. # https://www.sphinx-doc.org/en/master/usage/theming.html#builtin-themes -html_theme = 'classic' -html_theme_options = { - "body_max_width": "80%" -} +html_theme = "classic" +html_theme_options = {"body_max_width": "80%"} # Add any paths that contain custom static files (such as style sheets) here, # relative to this directory. They are copied after the builtin static files, # so a file named "default.css" will overwrite the builtin "default.css". -html_static_path = ['_static'] +html_static_path = ["_static"] # Add docstrings from __init__ method # Reference: https://www.sphinx-doc.org/en/master/usage/extensions/autodoc.html#confval-autoclass_content -autoclass_content = 'both' +autoclass_content = "both" # Add support to mark down files in sphinx documentation # Reference: https://www.sphinx-doc.org/en/1.5.3/markdown.html source_suffix = { - '.rst': 'restructuredtext', - '.txt': 'markdown', - '.md': 'markdown', + ".rst": "restructuredtext", + ".txt": "markdown", + ".md": "markdown", } diff --git a/docs/genindex.html b/docs/genindex.html index be678e0..ecc5a80 100644 --- a/docs/genindex.html +++ b/docs/genindex.html @@ -107,6 +107,8 @@
Initiates Messenger object to send an SMS to a phone number using SMS gateway provided by the mobile carrier.
>>> SendSMS
Initiates Emailer object to send an email.
>>> SendEmail
Creates SSL/TLS connection based on the request parameter.
+Initiates a TLS connection and sends the email.
Initiates Emailer object to authenticate and yield the emails according the conditions/filters.
>>> ReadEmail
Creates an SSL connection to gmail’s SSL server.
Validates email address deliver-ability using SMTP.
Enum wrapper for TLS and SSL encryption.
>>> Encryption
Wrapper for folders to choose emails from.