-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Refactor processing to support customizable modes #21
Merged
Conversation
This file contains 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
Replaced mock UI with `return_defaults` and updated tests accordingly. Enhanced the `process_overlay` return logic to re-merge the pattern context, ensuring extra context requiring answers is properly rendered. Simplified and clarified related test cases.
Previously, the `skip_when` attribute for `Choice` was mandatory, causing issues when unset. This update ensures that `skip_when` defaults to `False` if not provided, improving robustness. Additionally, a new test case was added to cover this scenario with an extra choice.
Renamed `tui.py` to `ui/terminal.py` and introduced a new `ui/defaults.py` for handling default UI behavior. Updated tests to reflect these changes, including restructuring test files and replacing `tui` references with `ui.terminal` or `ui.defaults` as appropriate. This organizes the UI logic and testing structure for better clarity and maintainability.
Replaced `use_default_ui` function with `return_defaults` for simplification and unified default handling. Adjusted imports to reflect module restructuring. Improves code maintainability and aligns with updated project structure.
Enhanced template handling by introducing `ProcessMode` and `TemplateFile` for fine-grained control over rendering and writing. Updated functions like `catalog_templates` and `catalog_inheritance` to utilize these new constructs. Adjusted tests and core logic to align with the updated template processing flow.
Introduces `rel_fnmatch` to enforce relative pattern matching and `matches_any_glob` to check paths against multiple glob patterns. These functions enhance flexibility and simplify matching logic for file and path operations.
Updated the build process to handle template paths with associated processing modes. This change lays the groundwork for incorporating `skip` and `copy_only` attributes in a future update, as noted in TODO[#20].
Version hint: minor Comment ID: Display the version hint-auto-generated |
|
Added functionality to process skip and copy_only file patterns during template rendering. Updated corresponding tests and logic in multiple modules to ensure correct skipping, copying, and rendering behavior. Improved code clarity and removed outdated TODO comments. Fixes #20
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.
Enhanced handling by introducing
ProcessMode
andTemplateFile
for fine-grained control over rendering and writing. Updated functions likecatalog_s
andcatalog_inheritance
to utilize these new constructs. Adjusted tests and core logic to align with the updated processing flow.Changes Made:
ProcessMode
andTemplateFile
for more control.catalog_s
andcatalog_inheritance
.