Repository navigation
release: consolidate core refactors, security fixes, documentation overhaul, and CI/CD pipelines - #71
Merged
Merged
Conversation
… 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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
This pull request merges the cumulative development changes from
developintomaster, 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):__db_name__to__model__, centralized core exports (RouteKey,Plugin) under lazy-loaded dynamic imports at the root namespace, and resolvedDecimalJSON serialization precision loss.README.md.Consolidates and closes all associated issues:
Type of change
How Has This Been Tested?
Please describe the tests that you ran to verify your changes.
hatch run test)mypy src/)Checklist:
mypy src/generates no warnings)docs/)