scitex-notification 0.1.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (49) hide show
  1. scitex_notification-0.1.0/.env.example +16 -0
  2. scitex_notification-0.1.0/.github/workflows/cla.yml +33 -0
  3. scitex_notification-0.1.0/.github/workflows/publish-pypi.yml +27 -0
  4. scitex_notification-0.1.0/.github/workflows/test.yml +26 -0
  5. scitex_notification-0.1.0/.gitignore +662 -0
  6. scitex_notification-0.1.0/.readthedocs.yaml +31 -0
  7. scitex_notification-0.1.0/CLA.md +80 -0
  8. scitex_notification-0.1.0/CONTRIBUTING.md +69 -0
  9. scitex_notification-0.1.0/LICENSE +20 -0
  10. scitex_notification-0.1.0/PKG-INFO +247 -0
  11. scitex_notification-0.1.0/README.md +187 -0
  12. scitex_notification-0.1.0/docs/sphinx/conf.py +71 -0
  13. scitex_notification-0.1.0/docs/sphinx/index.rst +86 -0
  14. scitex_notification-0.1.0/examples/00_run_all.sh +14 -0
  15. scitex_notification-0.1.0/examples/01_alert_demo.py +38 -0
  16. scitex_notification-0.1.0/examples/02_level_alerts.py +27 -0
  17. scitex_notification-0.1.0/examples/03_webhook_demo.py +42 -0
  18. scitex_notification-0.1.0/pyproject.toml +100 -0
  19. scitex_notification-0.1.0/src/scitex_notification/__init__.py +321 -0
  20. scitex_notification-0.1.0/src/scitex_notification/__main__.py +7 -0
  21. scitex_notification-0.1.0/src/scitex_notification/_backends/__init__.py +69 -0
  22. scitex_notification-0.1.0/src/scitex_notification/_backends/_audio.py +100 -0
  23. scitex_notification-0.1.0/src/scitex_notification/_backends/_config.py +320 -0
  24. scitex_notification-0.1.0/src/scitex_notification/_backends/_desktop.py +184 -0
  25. scitex_notification-0.1.0/src/scitex_notification/_backends/_emacs.py +210 -0
  26. scitex_notification-0.1.0/src/scitex_notification/_backends/_email.py +204 -0
  27. scitex_notification-0.1.0/src/scitex_notification/_backends/_matplotlib.py +118 -0
  28. scitex_notification-0.1.0/src/scitex_notification/_backends/_playwright.py +109 -0
  29. scitex_notification-0.1.0/src/scitex_notification/_backends/_twilio.py +359 -0
  30. scitex_notification-0.1.0/src/scitex_notification/_backends/_types.py +58 -0
  31. scitex_notification-0.1.0/src/scitex_notification/_backends/_webhook.py +81 -0
  32. scitex_notification-0.1.0/src/scitex_notification/_backends.py +37 -0
  33. scitex_notification-0.1.0/src/scitex_notification/_cli/__init__.py +11 -0
  34. scitex_notification-0.1.0/src/scitex_notification/_cli/_helpers.py +54 -0
  35. scitex_notification-0.1.0/src/scitex_notification/_cli/_main.py +133 -0
  36. scitex_notification-0.1.0/src/scitex_notification/_cli/_mcp_cmds.py +171 -0
  37. scitex_notification-0.1.0/src/scitex_notification/_cli/_notify_cmds.py +334 -0
  38. scitex_notification-0.1.0/src/scitex_notification/_env_loader.py +146 -0
  39. scitex_notification-0.1.0/src/scitex_notification/_linter_plugin.py +27 -0
  40. scitex_notification-0.1.0/src/scitex_notification/_mcp/__init__.py +23 -0
  41. scitex_notification-0.1.0/src/scitex_notification/_mcp/handlers.py +262 -0
  42. scitex_notification-0.1.0/src/scitex_notification/_mcp/tool_schemas.py +107 -0
  43. scitex_notification-0.1.0/src/scitex_notification/mcp_server.py +159 -0
  44. scitex_notification-0.1.0/tests/__init__.py +2 -0
  45. scitex_notification-0.1.0/tests/test_api.py +189 -0
  46. scitex_notification-0.1.0/tests/test_backends.py +179 -0
  47. scitex_notification-0.1.0/tests/test_cli.py +208 -0
  48. scitex_notification-0.1.0/tests/test_config.py +192 -0
  49. scitex_notification-0.1.0/tests/test_env_loader.py +204 -0
@@ -0,0 +1,16 @@
1
+ # scitex-notification environment variables
2
+ SCITEX_NOTIFICATION_DEBUG_MODE=0
3
+ SCITEX_NOTIFICATION_DEFAULT_BACKEND=audio
4
+ SCITEX_NOTIFICATION_TWILIO_SID=
5
+ SCITEX_NOTIFICATION_TWILIO_TOKEN=
6
+ SCITEX_NOTIFICATION_TWILIO_FROM=
7
+ SCITEX_NOTIFICATION_TWILIO_TO=
8
+ SCITEX_NOTIFICATION_TWILIO_FLOW=
9
+ SCITEX_NOTIFICATION_EMAIL_TO=
10
+ SCITEX_NOTIFICATION_EMAIL_FROM=no-reply@scitex.ai
11
+ SCITEX_NOTIFICATION_EMAIL_PASSWORD=
12
+ SCITEX_NOTIFICATION_EMAIL_SMTP_HOST=smtp.gmail.com
13
+ SCITEX_NOTIFICATION_EMAIL_SMTP_PORT=587
14
+ SCITEX_NOTIFICATION_WEBHOOK_URL=
15
+ SCITEX_NOTIFICATION_CONFIG=
16
+ SCITEX_NOTIFICATION_ENV_SRC=
@@ -0,0 +1,33 @@
1
+ name: CLA Assistant
2
+
3
+ on:
4
+ issue_comment:
5
+ types: [created]
6
+ pull_request_target:
7
+ types: [opened, closed, synchronize]
8
+
9
+ permissions:
10
+ actions: write
11
+ contents: write
12
+ pull-requests: write
13
+ statuses: write
14
+
15
+ jobs:
16
+ CLAssistant:
17
+ runs-on: ubuntu-latest
18
+ steps:
19
+ - name: CLA Assistant
20
+ uses: contributor-assistant/github-action@v2.6.1
21
+ env:
22
+ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
23
+ PERSONAL_ACCESS_TOKEN: ${{ secrets.PERSONAL_ACCESS_TOKEN }}
24
+ with:
25
+ path-to-signatures: "signatures/cla.json"
26
+ path-to-document: "https://github.com/ywatanabe1989/scitex-notification/blob/main/CLA.md"
27
+ branch: "cla-signatures"
28
+ allowlist: bot*
29
+ custom-allsigned-prcomment: |
30
+ Thank you for signing the SciTeX CLA. Your contribution can now be reviewed.
31
+ custom-notsigned-prcomment: |
32
+ Please sign the [SciTeX CLA](https://github.com/ywatanabe1989/scitex-notification/blob/main/CLA.md) before your contribution can be merged.
33
+ Comment `I have read and agree to the SciTeX CLA.` to sign.
@@ -0,0 +1,27 @@
1
+ name: Publish to PyPI
2
+
3
+ on:
4
+ push:
5
+ tags:
6
+ - 'v*'
7
+
8
+ jobs:
9
+ publish:
10
+ runs-on: ubuntu-latest
11
+ environment:
12
+ name: pypi
13
+ url: https://pypi.org/p/scitex-notification
14
+ permissions:
15
+ id-token: write
16
+ steps:
17
+ - uses: actions/checkout@v4
18
+ - name: Set up Python
19
+ uses: actions/setup-python@v5
20
+ with:
21
+ python-version: "3.12"
22
+ - name: Install build tools
23
+ run: pip install build
24
+ - name: Build distribution
25
+ run: python -m build
26
+ - name: Publish to PyPI
27
+ uses: pypa/gh-action-pypi-publish@release/v1
@@ -0,0 +1,26 @@
1
+ name: Test
2
+
3
+ on:
4
+ push:
5
+ branches: [main, develop]
6
+ pull_request:
7
+ branches: [main, develop]
8
+
9
+ jobs:
10
+ test:
11
+ runs-on: ubuntu-latest
12
+ strategy:
13
+ matrix:
14
+ python-version: ["3.10", "3.11", "3.12"]
15
+ steps:
16
+ - uses: actions/checkout@v4
17
+ - name: Set up Python ${{ matrix.python-version }}
18
+ uses: actions/setup-python@v5
19
+ with:
20
+ python-version: ${{ matrix.python-version }}
21
+ - name: Install dependencies
22
+ run: |
23
+ python -m pip install --upgrade pip
24
+ pip install -e ".[dev]"
25
+ - name: Run tests
26
+ run: pytest tests/ -v --cov=src/scitex_notification --tb=short