Package Name: parsikit
ParsiKit v3.3.1 — Final Release Audit, Packaging & Quality Report #
Package Name: parsikit
Target Version: 3.3.1
Author & Maintainer: Ali Kamrani (MRThugh)
Audit Date: 2026-10-10
Environment: Linux x86_64, Python 3.10.12 & Python 3.11.2, Node.js v22.23.2
Final Verdict: APPROVED FOR PRODUCTION RELEASE (RELEASE-READY)
1. Executive Summary #
This final release audit documents the stabilization, quality hardening, security review, documentation completion, and packaging verification of ParsiKit v3.3.1.
All planned audit phases have been completed without breaking backwards compatibility or altering the established public API:
- Automated Test Integrity: 100% of all unit, integration, regression, and security tests pass across both Python 3.10 and Python 3.11.
- Secret Hygiene: Zero hardcoded credentials or API keys exist in the codebase. Safe template
.env.examplecreated. Distributable packages strictly exclude local environment files. - Artifact Hygiene: All
__pycache__directories and.pycfiles have been purged and excluded via.gitignoreandMANIFEST.in. Redundant files (README-fa.md,docs/examples/) were consolidated into canonical sources. - Documentation: All 74 internal Markdown documentation links have been validated (0 broken links). Standalone bilingual API reference pages have been authored for
parsikit.cacheandparsikit.reshaper. Stale version references to 3.3.0 have been updated to 3.3.1. - Distribution Packaging: Both binary wheel (
.whl) and source distribution (.tar.gz) were built, inspected, and verified. The wheel was installed into a clean, isolated environment and verified to import exclusively from site-packages. - Executable Examples: All 4 canonical examples in
examples/were executed against the isolated installed package with exit code 0.
2. Test Execution & Verification #
Initial Test Results #
- Discovery in
tests/: 95 passed, 0 failed, 0 skipped. - Legacy regression suite (
test.py): 23 passed, 0 failed, 0 skipped.
Final Test Results #
- Modular Test Suite (
pytest -v tests):- Total tests executed: 95
- Passed: 95
- Failed: 0
- Skipped: 0
- Execution time: 0.22s
- Legacy Regression Suite (
python3 test.py):- Total tests executed: 23
- Passed: 23
- Failed: 0
- Skipped: 0
- Execution time: 0.01s
- Combined Test Count: 118 tests executed with 100% success rate.
Test Categories Covered #
tests/unit/test_text.py: Standardization, diacritics, ZWNJ, sort keys, slugify, masking, words-to-number.tests/unit/test_validators.py: National code, mobile, landline, card Luhn, Sheba, postal code, bills, plates, detector.tests/unit/test_models.py: Domain models (PersianText,NationalCode,MobileNumber,FixedLine,BankCard,Sheba,VehiclePlate).tests/unit/test_number.py: Digit translations, number-to-words for negative, small, and multi-billion values.tests/unit/test_currency.py: Rial/Toman conversions, VAT calculations, loan installment amortization.tests/unit/test_datetime.py: Gregorian-Jalali conversions, astronomical leap years, month names, relative time.tests/unit/test_reshaper.py: Persian cursive letter shaping, Lam-Alef ligatures, BiDi block preservation.tests/unit/test_cache.py:ThreadSafeLRUCacheoperations and@memoizedecorator.tests/unit/test_dev.py:pformatvisual alignment,inspect_text,validate_batch,persian_repr.tests/unit/test_gui.py: GUI event bindings and live input formatters.tests/integration/test_batch_validation.py: High-volume data validation pipelines.tests/integration/test_oop_workflow.py: End-to-end domain model instantiation and serialization.tests/regression/test_v331_regressions.py: Protection against all v3.3.1 identified regressions.tests/security/test_security.py: PII masking, exception sanitization, and checksum verification bounds.
3. Secret Hygiene & Security Review #
Audit Findings #
- An automated recursive credential search was performed across all source files, test fixtures, documentation, examples, and configuration.
- No active API keys, secrets, or credentials were found committed to the source tree.
- The supplied development archive contained references to local environment variables.
Remediation Actions Taken #
- Repository Containment:
- Created
/.gitignoreexplicitly ignoring.env,.env.*,*.env, and.env.local. - Created
/MANIFEST.inexplicitly excludingexclude .env*. - Verified that neither the binary wheel nor the source distribution includes any
.envfile.
- Created
- Safe Placeholder Configuration:
- Authored
/.env.examplecontaining only generic placeholders:PARSIKIT_ENV=development PARSIKIT_DEFAULT_TAX_RATE=0.10 PARSIKIT_DEFAULT_CURRENCY=toman PARSIKIT_ENABLE_CACHE=true GEMINI_API_KEY=your_gemini_api_key_here
- Authored
- Sensitive Data Protection within Library:
BankCard,MobileNumber, andNationalCodeexpose a.maskedproperty for safe display.- Exception messages in
InvalidCardNumberErrorandInvalidNationalCodeErrorsanitize raw inputs to prevent leaking PII into application error logs.
- Maintainer Notice Regarding Credentials:
- Security advisory for repository owner (Ali Kamrani): Any API key or secret that was previously stored in local development archives or past git commits must be revoked or rotated immediately through the service provider's console (e.g., Google AI Studio / Google Cloud Console). Deleting a local file does not invalidate an active key.
4. Project Structure & Artifact Cleanup #
Consolidated Duplicates #
- Persian README:
README-fa.mdandREADME.fa.mdwere compared and confirmed byte-for-byte identical.README.fa.mdis the canonical file referenced byREADME.md.README-fa.mdwas removed to eliminate redundant maintenance overhead.
- Examples Directory:
docs/examples/andexamples/contained identical scripts with minor relative import differences.examples/was established as the single canonical directory for runnable examples (consistent with CI workflows).- Redundant directory
docs/examples/was removed.
- Caches and Build Residue:
- Purged all
__pycache__/directories and.pycbytecode files. - Added ignore rules to prevent future tracking.
- Purged all
5. Documentation & Link Validation #
Markdown Link Validation #
An automated script scanned all Markdown files in the repository:
- Total internal links checked: 74
- Broken links before remediation: 3
docs/README.md->fa/api/overview.mddocs/README.md->en/api/overview.mddocs/fa/index.md->api/overview.md
- Broken links after remediation: 0 (100% valid)
New & Improved API Documentation #
parsikit.cache:- Created
docs/en/api/cache.mdanddocs/fa/api/cache.md. - Fully documents
ThreadSafeLRUCache,@memoize, thread-safety guarantees, cache invalidation, and integration withparsikit.config.enable_cache.
- Created
parsikit.reshaper:- Created
docs/en/api/reshaper.mdanddocs/fa/api/reshaper.md. - Documents
reshape_for_graphics,reshape_paragraph_for_graphics, Lam-Alef ligatures, diacritics handling, and Bidirectional (BiDi) block preservation for graphic engines.
- Created
- API Indexes:
- Updated
docs/en/api/index.mdanddocs/fa/api/index.mdto reference both modules.
- Updated
- Version Alignment:
- Updated stale references in
test.py,README.md, andREADME.fa.mdfrom3.3.0to3.3.1.
- Updated stale references in
6. Distribution Artifacts & Build Verification #
The distribution packages were built using python3 -m build (setuptools build backend):
1. Binary Wheel (dist/parsikit-3.3.1-py3-none-any.whl) #
- Uncompressed Size: 154,049 bytes
- File Count: 18 files
- Contents Verification (
unzip -l):parsikit/__init__.pyparsikit/cache.pyparsikit/config.pyparsikit/currency.pyparsikit/datetime.pyparsikit/dev.pyparsikit/exceptions.pyparsikit/gui.pyparsikit/models.pyparsikit/number.pyparsikit/reshaper.pyparsikit/text.pyparsikit/validators.pyparsikit-3.3.1.dist-info/licenses/LICENSEparsikit-3.3.1.dist-info/METADATAparsikit-3.3.1.dist-info/WHEELparsikit-3.3.1.dist-info/top_level.txtparsikit-3.3.1.dist-info/RECORD
- Exclusion Check: Strictly excludes tests, documentation, examples, environment files,
.pyc, and dev tooling.
2. Source Distribution (dist/parsikit-3.3.1.tar.gz) #
- Compressed Size: ~60 KB
- Contents Verification (
tar -ztvf):- Contains only root project metadata (
CHANGELOG.md,LICENSE,MANIFEST.in,README.fa.md,README.md,pyproject.toml,setup.py) and runtime packageparsikit/.
- Contains only root project metadata (
3. Isolated Wheel Installation & Smoke Testing #
- Installed the wheel into a completely isolated environment (
/tmp/test-parsikit-env) with--no-index. - Verified import from outside the repository directory:
Imported parsikit from: /tmp/test-parsikit-env/lib/python3.11/site-packages/parsikit/__init__.py Version: 3.3.1 Confirmed: Loaded exclusively from isolated site-packages! - Tested all core modules (text standardization, national code, mobile operator, bank card Luhn check, number to words, Jalali astronomical calendar, font reshaper). All returned accurate outputs.
7. Example Script Executions #
All scripts in examples/ were executed against the isolated installed wheel:
| Script | Description | Result | Exit Code |
|---|---|---|---|
examples/quickstart_demo.py |
Basic text, validation, currency, and date demonstration | PASS | 0 |
examples/form_validation_demo.py |
User registration pipeline with NationalCode, Mobile, and Card | PASS | 0 |
examples/invoice_currency_demo.py |
Financial invoicing, VAT, and words-to-number transformation | PASS | 0 |
examples/datetime_humanize_demo.py |
Jalali calendar formatting and relative-time humanization | PASS | 0 |
8. Python Version Compatibility & CI Configuration #
Locally Verified Environments #
- Python 3.10.12 (GCC 11.4.0): 100% of tests passed.
- Python 3.11.2: 100% of tests passed.
Continuous Integration (.github/workflows/ci.yml) #
Updated GitHub Actions workflow to run across:
- Matrix: Python
3.10,3.11,3.12,3.13 - Pipeline Steps:
actions/checkout@v4&actions/setup-python@v5- Install build tools, pytest, and package
- Execute legacy regression suite (
python test.py) - Execute comprehensive test suite (
pytest -v tests) - Execute discovery unit tests (
python -m unittest discover -s tests) - Execute runnable examples (
examples/*.py) - Build source distribution and wheel (
python -m build) - Force reinstall from built wheel and verify package version
- Run automated Markdown link validation
9. Remaining Risks and Limitations #
- Python 3.12 and 3.13 Local Testing: The local testing environment contained Python 3.10.12 and 3.11.2. Python 3.12 and 3.13 will be tested automatically by GitHub Actions CI upon push.
- External Key Rotation: The maintainer must verify and rotate any third-party credentials that may have been present in pre-import archives or local
.envfiles outside this repository.
10. Release Verdict #
VERDICT: APPROVED FOR PRODUCTION RELEASE (v3.3.1)
ParsiKit v3.3.1 satisfies all release engineering requirements:
- Clean and consistent versioning across all package metadata files.
- Zero broken documentation links across both Persian and English docs.
- 100% pass rate across all 118 automated tests.
- High-quality, clean distribution wheel and source tarball containing zero unintended artifacts.
- Safe secret hygiene and verified privacy masking utilities.