Conversation
Co-authored-by: ChingEnLin <50169422+ChingEnLin@users.noreply.github.com>
Co-authored-by: ChingEnLin <50169422+ChingEnLin@users.noreply.github.com>
- Read existing Releases.md before overwriting to preserve all history - Convert current "Latest Release" to "Previous Release" format - Remove faulty backup approach that only kept one previous release - Ensure cumulative release history is maintained across all updates Co-authored-by: ChingEnLin <50169422+ChingEnLin@users.noreply.github.com>
…93cf-4b269c74beda feat: Add semantic versioning workflow with conventional commits and fix wiki history preservation
Update README
…oper document replacement
Fix/update doc
There was a problem hiding this comment.
Pull Request Overview
This is a major release update that transforms QueryPal from a basic MongoDB query tool into a comprehensive enterprise-ready database assistant. The PR introduces semantic versioning, extensive documentation updates, comprehensive test coverage, and improved MongoDB operations with proper timestamp handling.
- Updated all documentation to reflect enterprise-grade features and modern deployment practices
- Introduced semantic versioning workflow with automated releases and changelog generation
- Added comprehensive MongoDB operations test suite with mongomock for reliable testing
- Enhanced document update operations to properly handle datetime creation and modification timestamps
Reviewed Changes
Copilot reviewed 9 out of 9 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| frontend/README.md | Complete rewrite positioning as enterprise React application with detailed tech stack and deployment guides |
| docs/SEMANTIC_VERSIONING.md | New comprehensive guide for conventional commits and automated versioning workflow |
| backend/tests/test_mongo_operations.py | Extensive new test suite covering all MongoDB operations with 816 lines of comprehensive testing |
| backend/services/data_documents_service.py | Enhanced update_document function with proper datetime handling and replace_one operation |
| backend/requirements.txt | Added testing dependencies (mongomock, pytest-mock, freezegun) |
| backend/README.md | Major documentation overhaul with detailed API reference, testing guide, and deployment instructions |
| README.md | Complete rewrite as enterprise-grade project documentation with comprehensive feature descriptions |
| CHANGELOG.md | New changelog file following Keep a Changelog format |
| .github/workflows/semantic-release.yml | New automated semantic release workflow with wiki integration |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
| if not before_doc: | ||
| return None | ||
|
|
||
| # Preserve datetime_creation from the existing document | ||
| if "datetime_creation" in before_doc: | ||
| content["datetime_creation"] = before_doc["datetime_creation"] | ||
|
|
||
| # Always update datetime_last_modified to current time | ||
| content["datetime_last_modified"] = datetime.now(timezone.utc) | ||
|
|
||
| # Use replace_one to completely replace the document while preserving system fields | ||
| result = collection.replace_one({"_id": ObjectId(document_id)}, content) |
There was a problem hiding this comment.
The logic incorrectly assumes before_doc has datetime_creation but then unconditionally overwrites it in content. If the original document doesn't have datetime_creation, this creates an inconsistent state where some documents have creation timestamps and others don't. Consider adding a fallback to set datetime_creation to the current time if it doesn't exist in the original document.
|
🎉 This PR is included in version 2.1.0 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
No description provided.