feat: add dynamic rules update mechanism to decouple rules from packa…#34
Open
xiao201208 wants to merge 1 commit intoaliyun:mainfrom
Open
feat: add dynamic rules update mechanism to decouple rules from packa…#34xiao201208 wants to merge 1 commit intoaliyun:mainfrom
xiao201208 wants to merge 1 commit intoaliyun:mainfrom
Conversation
…ge releases Allow users to update transform rules without upgrading the package by pulling the latest rules directly from the GitHub repository. Core changes: - Add rostran/core/rules_updater.py: downloads rules from GitHub, caches them at ~/.rostran/rules/, and manages semantic versioning via rostran/rules/VERSION and VERSIONS.json (version-to-commit mapping). - Modify RuleManager.load() to support dual-source loading: user-level cache takes precedence over built-in rules shipped with the package. - Add CLI commands: - `rostran update-rules` with --version, --list, --force, --clean - `rostran rules-version` to show active rules source and version - Move tools/tf_ali_ros_generate_mappings.json into rostran/rules/ so it is included in dynamic rules updates. CI automation: - Add auto_rules_version.yml: when rule files change on push/PR to main, automatically bump the patch version in VERSION and record the new version with commit SHA in VERSIONS.json. - Add auto_version_bump.yml: when non-rules code changes on push/PR to main, automatically bump the patch version in rostran/__init__.py. - Both workflows include loop-prevention guards. Also: - Add English and Chinese documentation for the new commands in docs/. - Add 18 unit tests covering the updater, version management, and RuleManager fallback behavior. Made-with: Cursor
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.
[…ge releases](feat: add dynamic rules update mechanism to decouple rules from package releases)
Allow users to update transform rules without upgrading the package by pulling the latest rules directly from the GitHub repository.
Core changes:
rostran update-ruleswith --version, --list, --force, --cleanrostran rules-versionto show active rules source and versionCI automation:
Also:
Made-with: Cursor