Draft
Conversation
…ojects and adjust type hints for better compatibility
… alias with validation
|
Important Review skippedDraft detected. Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the
✨ Finishing touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
…om rows and columns
…on to file_parser_test
…-conversion during serialization
Set both input and output on prompt_toolkit Application before sending any text in question_patcher. Previously, output was set but the Application may have already sent cursor position queries to the real terminal, causing ";1R" responses to appear in the shell after tests.
…test options in configuration (pytest-model-lib already a dependency)
- Header format: `{comment_char} path-sync copy -n {config_name}`
- Uses regex matching for has_header() to match any config name
- Threads config_name through copy functions
- Breaking: old headers treated as opted-out
- Removed the extension parameter from has_header and remove_header functions for cleaner usage. - Updated related tests to reflect the changes in function signatures.
- Add sections.py with SECTION_START_PATTERN and SECTION_END_PATTERN - Section dataclass: id, content, start_line, end_line - parse_sections() extracts DO_NOT_EDIT sections with validation - has_sections() checks for marker presence - wrap_in_default_section() wraps marker-less content - Standalone OK_EDIT markers are valid (ignored, not an error)
- extract_sections() returns {id: content} from parsed sections
- replace_sections() updates dest sections with src content
- Skipped and dest-only sections preserve original content
- New src sections appended at end
- OK_EDIT regions always preserved
- Deleted cmd_clean.py as its functionality is no longer needed. - Updated imports in __main__.py to reflect the removal of cmd_clean. - Adjusted tests in cmd_copy_test.py to use new sync functions and added a test for orphan cleanup.
- _copy_with_header detects section markers and delegates to _copy_with_sections - Section sync replaces only managed sections, preserves OK_EDIT content - skip_sections from Destination config honored via dest_key lookup - Files without markers use existing full-file replacement behavior
- Added comments to clarify the purpose of test files in the orphan cleanup test. - Ensured that the synced set is explicitly noted as empty for better understanding of the test's intent.
- Compare only DO_NOT_EDIT sections instead of full files - Add --skip-sections CLI option for intentional section removal - Return path:section_id format for precise error reporting - Fall back to full-file comparison for files without sections
- Delete workflow_gen.py - Remove ToolsUpdate, SrcToolsUpdate models - Remove tools_update from Destination, src_tools_update from SrcConfig - Remove --force-tools-pr flag - Remove _sync_tools_update, _sync_wheel, _build_wheel functions - Fix cmd_boot.py: always_paths -> paths, remove extra arg - Simplify SyncResult (remove tools_changes) Workflows are now synced as regular files via `paths`.
- Rename --force-no-header-updates → --force-overwrite - Rename --skip-dest-checkout → --no-checkout - Add -y/--no-prompt flag for CI (skip confirmations) - Add --local flag (no git operations after sync) - Remove --no-commit, --no-push, --force-push/--no-force-push - Add interactive prompts for checkout/commit/push/PR - Fix dry-run to error if dest repo not found - Update CopyOptions dataclass and tests
- Simplified the _commit_and_pr function by removing unnecessary return values. - Enhanced interactive prompts for commit, push, and PR creation. - Updated tests in cmd_copy_test.py to clarify orphan cleanup logic and ensure accurate assertions.
- Update copy options: --force-overwrite, --local, -y/--no-prompt - Add Section Markers, Design Principles, Usage Scenarios sections - Remove deprecated config fields (always_paths, scaffold_paths, tools_update) - Replace wheel-based validation with uvx path-sync - Simplify GitHub Actions examples
Code: - cmd_validate.py: skip if current branch equals compare branch Docs: - Add workflow branch filters (exclude main, sync/**) - Document automatic skip behavior - Add Overview with terminology (SRC/DEST/Header/Section) - Update copy flags, remove deprecated config fields - Replace wheel-based validation with uvx Config: - cursor.src.yaml: use paths instead of always_paths - Workflow: use uvx with --checkout-from-default -y
… orphaned files - Introduced a new command-line option `--skip-orphan-cleanup` to the copy command. - Updated the CopyOptions dataclass to include the new option. - Modified the orphan cleanup logic to respect the new flag, allowing users to skip orphan file deletion during sync.
…ches When force_overwrite=True and dest file has no header, write the file to restore the header even when content is unchanged.
- Introduced functions to determine the release version of symbols and fields based on changelog actions. - Updated rendering functions to include "Since" version information in field tables and inline symbols. - Enhanced `render_field_table()` and `should_show_field_table()` to conditionally display field version data. - Added tests for new version tracking functionality and rendering behavior in documentation generation.
- Updated `_compare_defaults` to use `Literal` for item_type, improving type safety. - Introduced `create_release_action` to streamline changelog updates and ensure correct versioning during documentation generation. - Enhanced `post_merge_commit_workflow` to include the new release action, ensuring accurate version tagging. - Improved inline symbol rendering to include source links and better integration with documentation generation. - Added tests for new rendering features and ensured robust handling of documentation paths.
…reconciliation logic. Auto-generated changelog actions are now properly managed across `pre-commit` runs.
## Changes
- `api_diff.py`: Added `reconcile_auto_actions()` and `_action_key()` functions for timestamp-preserving reconciliation
- `workflows.py`: Implemented `run_api_diff()` with baseline/dev comparison and changelog writing
- `workflow_cmds.py`: Updated `pre_change --full` and `pre_commit` to pass PR number for changelog writes
- `git_usage/__init__.py`: Exported `find_pr_info_or_none` for PR detection
- `api_diff_test.py`: Added reconciliation test covering timestamp preservation and stale action removal
## Key Behaviors
- Compares `{pkg}.api.yaml` (baseline) against `{pkg}.api-dev.yaml` (dev)
- Skips diff gracefully when no baseline exists (first release)
- Reconciles auto-generated actions: preserves timestamps for unchanged keys, removes stale
- Interactive actions (from `pre-change`) are never modified or replaced
- When no PR detected (e.g., `pre-change --full` without branch), returns diff results without writing changelog
…ules following the "split by responsibility" approach, improving maintainability and reducing file size.
…e rendering to derive from changelog actions instead of static model fields. ## Breaking Changes - `SymbolDumpBase.since_version` removed (was never populated) - `SymbolDumpBase.stability` removed (was never populated) - `GroupDump.stability` removed (always defaulted to `ga`) - `dump_public_api()` no longer accepts `state: PkgExtState` parameter Existing `.api.yaml` files with `stability` fields will still parse but the field is ignored.
…nd new command descriptions - Updated `CONTRIBUTING.md` to include `diff-api` command for manual API comparison and clarified file outputs. - Expanded `README.md` with detailed explanations of API diff actions, detected change types, and auto-generated action behavior. - Added information on version bump overrides for pre-1.0.0 packages and limitations of the API diff process.
…oject.toml` to eliminate the need for adding `MaxBumpTypeAction` to every PR's changelog file for pre-1.0.0 packages.
…rkflows - Added a new `chore` command to create `ChoreAction` for internal changes that warrant a release but do not affect the public API. - Updated `post-merge` command to support a `--force-reason` option, allowing forced releases when no changelog entries exist. - Enhanced documentation in `CONTRIBUTING.md` and `README.md` to include details about the new `chore` command and its usage. - Refactored logging levels in `file_parser.py` for improved debugging information.
…to remove unused `indent` parameter, simplifying the function signatures and improving code clarity.
…nd `UtcDatetimeMs` for improved clarity and consistency across the codebase. Update related tests and usages to reflect the new naming conventions.
…d related tests - Introduced logic to differentiate between TypeVars and TypeAliases, ensuring accurate symbol capture. - Updated tests to reflect changes in type alias handling and added new tests for TypeAlias annotations. - Refactored symbol parsing methods to improve clarity and maintainability.
…flict check to allow established groups
- Changed `model-lib` and `zero-3rdparty` paths to editable mode for local development. - Updated workspace members and excluded items in `pyproject.toml`. - Adjusted test paths and included necessary dependencies in `uv.lock`. - Updated versions for several packages, including `certifi`, `pydantic`, and `ruff`, to ensure compatibility and access to the latest features. - Refactored import statements in `ask-shell` to align with new module structure.
…onents - Updated import paths for various modules to directly reference `model_lib`, enhancing clarity and maintainability. - Adjusted related code to ensure compatibility with the new import structure.
…reference states with improved choice handling - Added a new helper function `_as_choice_ref_state_only` to create choice representations for `RefState`. - Updated `select_multiple_ref_state` to generate choices from the provided reference states, enhancing the multi-select functionality.
…ents - Added a new method `_is_typevar_call` to identify TypeVar calls. - Implemented `visit_Assign` to handle assignments of TypeVars, allowing for better type alias management. - Updated symbol parsing logic to improve clarity and maintainability.
…ase_cmds.py` - Introduced `_collect_refs_to_remove` to gather references marked for deletion or privacy. - Updated `dump_groups` to remove these references from groups, enhancing the integrity of the changelog. - Improved handling of `MakePublicAction` to ensure public references are correctly added to groups.
- Implemented handling for DeleteAction in `as_changelog_line`, allowing the changelog to reflect removed items. - Enhanced the clarity of changelog entries by including a specific message format for deletions.
…ll changelog action types that should generate output. Previously only 3 of 14 action types were handled.
…iguration and including anchor IDs in rendered symbols. This improves the structure and navigability of generated documentation.
…dating MkDocs navigation structure. The `generate_mkdocs_nav` function now accepts complex symbols for improved organization, and new tests have been added to validate the extraction and navigation functionalities.
…ars as type aliases. Updated tests in `file_parser_test.py` to reflect this change, ensuring that TypeVars are now included in the symbol extraction process. Additionally, refined the handling of global variables and type aliases in the symbol parsing logic.
…k to raw string annotations when `get_type_hints` raises a `NameError`. This improves compatibility with classes using `TYPE_CHECKING` imports.
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.
No description provided.