Skip to content

release: consolidate core refactors, security fixes, documentation overhaul, and CI/CD pipelines - #71

Merged
alialfostovar merged 4 commits into
masterfrom
develop
Jul 16, 2026
Merged

alialfostovar merged 4 commits into
masterfrom
develop

Conversation

@alialfostovar

Copy link
Copy Markdown
Contributor

Description

This pull request merges the cumulative development changes from develop into master, stabilizing the core framework and establishing enterprise-grade documentation and repository governance. This release consolidates four major feature branches (PRs #67, #68, #69, and #70):

  1. Core Architecture & Precision (refactor(schema): rename __db_name__ to __model__ and centralize core exports #67): Decoupled DTO schemas from database terminologies by renaming __db_name__ to __model__, centralized core exports (RouteKey, Plugin) under lazy-loaded dynamic imports at the root namespace, and resolved Decimal JSON serialization precision loss.
  2. Database & Security Fixes (fix(db): improve datetime timezone handling and remove legacy resource prefix #68): Implemented timezone-aware cursor encoding for robust multi-region pagination, migrated ISO datetime parsing to native Python 3.11+ capabilities, and eliminated overzealous string path normalization bugs in nested relation checks.
  3. Documentation Overhaul (docs: complete documentation overhaul, homepage redesign, and quickstart guide #69): Completely redesigned the documentation homepage with interactive comparison tables and flowcharts, added a comprehensive 10-minute Quickstart tutorial, and overhauled the repository's README.md.
  4. CI/CD & Governance Automation (ci(github): add CI workflows, community templates, and release configuration #70): Deployed automated pull-request testing via Hatch and linting using Ruff, introduced structured Issue/PR templates, and integrated OIDC-ready automated release changelog configurations.

Consolidates and closes all associated issues:


Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Refactoring (architectural or code cleanup with no functional changes)
  • Documentation update

How Has This Been Tested?

Please describe the tests that you ran to verify your changes.

  • Unit/Integration tests (hatch run test)
  • Static type check passing (mypy src/)

Checklist:

  • My code follows the style guidelines and architectural rules of this project
  • I have performed a self-review of my own code
  • My changes pass strict static type analysis (mypy src/ generates no warnings)
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation (under docs/)
  • My changes generate no new runtime warnings
  • I have added tests that prove my fix is effective or that my feature works

… exports (#67)

### Summary

* **Decimal JSON Serialization**: Changed the `CustomJSONEncoder`
decimal serialization from `float` to `str` within
`zcore/utils/helpers.py`. This preserves exact precision during JSON
serialization, resolving critical precision loss risks in high-precision
and financial API scenarios.
* **Zchema Semantic Attribute Rename**: Renamed the `__db_name__` class
variable to `__model__` in `Zchema` (`zcore/web/projection.py`) to
decouple the presentation schemas from database-specific nomenclature,
updating all internal resolution methods and templates.
* **Expose Core Constructs at Root Namespace**: Added `RouteKey` and
`Plugin` exports to the dynamic `__getattr__` and `__all__` blocks in
`src/zcore/__init__.py`. This enables lazy-loaded, clean root imports
(e.g., `from zcore import RouteKey, Plugin`) instead of requiring deep
internal import paths.
* **CLI & Test Alignment**: Updated CLI templates
(`src/zcore/cli/templates.py`), project tests (`tests/test_utils.py`,
`tests/test_web.py`), and code generation blueprints to properly use the
new `__model__` attribute and the centralized imports.

### Impact

This PR enhances ZCore's overall developer experience (DX) by exposing
highly utilized constructs directly at the root module namespace,
corrects an architectural naming coupling in `Zchema`, and safeguards
data integrity by eliminating decimal serialization precision loss.

---
Closes #61
Closes #63
Closes #64
…e prefix (#68)

### Summary

* **Timezone-Aware Cursor Encoding**: Refactored `_encode_cursor` inside
`zcore/db/pagination.py` to normalize naive `datetime` objects to UTC
timezone before ISO formatting, preventing cursor misalignment issues
across multi-region deployments.
* **Native Python 3.11+ ISO Datetime Parsing**: Eliminated the redundant
`.replace("Z", "+00:00")` string replacement workaround in
`_coerce_value` (`zcore/db/search.py`), shifting database datetime
coercion to use Python 3.11's out-of-the-box support for native ISO
formats.
* **Eliminated Legacy Prefix Stripping**: Removed the buggy global
string replacement `.replace("resource.", "")` from
`_is_path_restricted` (`zcore/db/search.py`) and
`_get_relative_restricted_paths` (`zcore/web/projection.py`).
Normalization now strictly checks matching paths without corrupting
valid relation paths containing the word `"resource"` (e.g.,
`project.resource.status`).
* **Zchema Docstring Cleanup**: Cleaned up repetitive metadata in
validation and serialization levels within `Zchema`'s docstrings to
improve readability and code quality.

### Impact

This PR safeguards security and data integrity by correcting a critical
vulnerability where valid nested security paths could be misaligned
during prefix normalization. It also introduces proper timezone
normalization for pagination states and cleans up redundant, outdated
datetime parsing logic to benefit from modern Python 3.11 native
capabilities.

---
Closes #62
Closes #65
…art guide (#69)

### Summary

* **Redesigned Homepage**: Completely overhauled `index.md` with a
modern, clean hero section, descriptive feature cards, and interactive
side-by-side comparisons highlighting ZCore's boilerplate reduction (35
lines, 7 endpoints in ZCore vs. 100+ lines, 3 endpoints in raw FastAPI).
* **Added 10-Minute Quickstart**: Introduced a comprehensive tutorial
(`quickstart.md`) focused on building a task manager API to quickly
onboard new developers. Reorganized `mkdocs.yml` navigation to feature
this guide prominently.
* **Overhauled README.md**: Upgraded the repository's main `README.md`
with professional badges (PyPI, License, CI, Python versions), clean
collapsible details for each architectural pillar, and an actionable
local installation guide.
* **Interactive Request Lifecycle Flow**: Integrated modern Mermaid
flowcharts and clean diagrams to map out the exact request lifecycle
across ZCore's middleware and DB routing layers.
* **Introduced Community Meta Files**: Formally introduced
`CONTRIBUTING.md` (covering local setup with Hatch, testing, and
semantic commit guidelines) and `SECURITY.md` (defining vulnerability
reporting procedures) to establish repo standards.
* **Theme & Configuration Cleanups**: Switched MkDocs configuration for
a sleek visual design, removed the heavy `mkdocstrings` plugin to
simplify build environments, and cleaned up navigation comments in
`mkdocs.yml`.

### Impact

This PR elevates ZCore's onboarding and developer experience (DX) to
professional standards. By providing comparative code examples, visual
flowcharts, a hands-on tutorial, and standardized community guidelines,
it drastically lowers the barrier to entry for new users and prepares
the project for healthy open-source contributions.
…uration (#70)

### Summary

* **Hatch & Ruff CI Automation**: Added `.github/workflows/test.yml` to
automatically execute the `hatch test` suite and enforce style linting
through `ruff check` on every push or pull request to key branches.
* **Structured Issue Templates**: Introduced custom, highly-detailed
issue templates (`bug_report.md` and `feature_request.md`) to capture
critical environment variables (Python, FastAPI, SQLAlchemy, Redis, and
Database Engine) and ensure new features align with ZCore's core design
principles.
* **Pull Request Blueprint**: Established a comprehensive
`PULL_REQUEST_TEMPLATE.md` featuring strict checklists for semantic
quality, architectural alignment, unit tests, and `mypy` static
analysis.
* **Automated Changelog Configuration**: Deployed `.github/release.yml`
to automatically organize pull requests into semantic categories
(Features, Bug Fixes, Refactoring, Docs, Maintenance) based on PR labels
during release builds.
* **Docs & Build Maintenance**: Included `mkdocs-shadcn` in the
development dependencies (`pyproject.toml`) to prepare for modern visual
theme updates.
* **Code Cleanups & Formatting**: Removed an unused `SearchEngine` type
import inside `zcore/db/repository.py` to keep namespaces clean, and
refactored single-line conditional evaluation blocks in
`zcore/db/search.py` into standard, readable multi-line constructs.

### Impact

This PR completes ZCore's development pipeline and repository
governance. By introducing automated CI testing, pre-commit validation,
structured issue templates, and automated release generation config, it
ensures that all future code modifications remain robust, type-safe, and
standardized before landing on target branches.
@alialfostovar
alialfostovar merged commit 0f4dfbf into master Jul 16, 2026
2 checks passed
@alialfostovar
alialfostovar deleted the develop branch July 16, 2026 09:56
@alialfostovar
alialfostovar restored the develop branch July 16, 2026 10:19
@alialfostovar
alialfostovar deleted the develop branch July 27, 2026 06:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

bug(utils): prevent precision loss by serializing Decimal to string instead of float

1 participant