Skip to content

Production readiness: README, license, CI, and code cleanup - #1

Merged
digantadatta merged 3 commits into
mainfrom
production-readiness
Nov 30, 2026
Merged

digantadatta merged 3 commits into
mainfrom
production-readiness

Conversation

@digantadatta

@digantadatta digantadatta commented Nov 30, 2026 •

Copy link
Copy Markdown
Owner

Summary

  • README rewritten (kept the original project description and goal): features, how the algorithm works, setup, run, usage example (output verified by running the code), project structure, and an explicit note that this is obfuscation, not strong encryption
  • Added LICENSE (MIT, copyright 2026 Diganta Datta), Python .gitignore, .flake8 and requirements.txt (no third-party packages are used; the file documents that and how to get tkinter on Linux)
  • .github/workflows/ci.yml: runs py_compile and flake8 on Python 3.9 and 3.12 (runner pinned to ubuntu-24.04 because ubuntu-latest no longer provides Python 3.9). It runs on this PR and passes.
  • MessageEncodeDecode.py: the GUI is now built inside main() behind if __name__ == '__main__':, so Encode and Decode can be imported without opening a window. The from tkinter import * import is replaced by import tkinter as tk, which also removes the shadowing of tkinter.Text by a variable. Window layout, widget positions, labels and algorithm are unchanged.
  • Error handling: an empty key (previously a ZeroDivisionError), an unknown mode, and text that cannot be decoded now show a message in the result field instead of raising an error in the callback. Mode input is trimmed and case-insensitive.
  • Docstrings added.

Verification

  • python -m py_compile and flake8 pass locally (Python 3.12) and in CI (3.9 and 3.12).
  • Compared Encode/Decode against the original implementation for several inputs: identical output and round trip OK.
  • Built the Tkinter window headlessly in a smoke test (constructs without error). Not clicked through manually.

Things the owner must check

  1. License holder: LICENSE says "Copyright (c) 2026 Diganta Datta". Change if you want a different name or license.
  2. Known limitation (documented in the README, unchanged): characters with code points above 255 do not round-trip because the shift is taken modulo 256.

- Rewrite README with features, setup, usage and limitations
- Add MIT LICENSE, .gitignore, flake8 config and requirements.txt
- Move the GUI into main() behind a __main__ guard so Encode/Decode can be imported
- Replace star import with explicit tkinter import
- Handle missing key, invalid mode and undecodable input instead of raising
- Add docstrings
@digantadatta
digantadatta merged commit 42ba777 into main Nov 30, 2026
2 checks passed
@digantadatta
digantadatta deleted the production-readiness branch November 30, 2026 05:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant