fix(trash): strip only trailing trash suffix in to_origin_dir_path - #2341
fix(trash): strip only trailing trash suffix in to_origin_dir_path#2341Siraryansingh wants to merge 16 commits into
Conversation
…o all CI doc steps (oscal-compass#2132) Signed-off-by: Acuspeedster <arnavrajsingh@gmail.com> Co-authored-by: Lou DeGenaro <lou.degenaro@gmail.com>
…#2336) Bumps the codeql-action group with 2 updates: [github/codeql-action/init](https://github.com/github/codeql-action) and [github/codeql-action/analyze](https://github.com/github/codeql-action). Updates `github/codeql-action/init` from 4.37.7 to 4.37.8 - [Release notes](https://github.com/github/codeql-action/releases) - [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md) - [Commits](github/codeql-action@ff2f1c6...db488dd) Updates `github/codeql-action/analyze` from 4.37.7 to 4.37.8 - [Release notes](https://github.com/github/codeql-action/releases) - [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md) - [Commits](github/codeql-action@ff2f1c6...db488dd) --- updated-dependencies: - dependency-name: github/codeql-action/init dependency-version: 4.37.8 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: codeql-action - dependency-name: github/codeql-action/analyze dependency-version: 4.37.8 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: codeql-action ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Signed-off-by: degenaro <lou.degenaro@gmail.com>
…ss#2337) * fix: agentic-agile-authoring to Learn About The Projects Signed-off-by: degenaro <lou.degenaro@gmail.com> * fix: revised text Signed-off-by: degenaro <lou.degenaro@gmail.com> --------- Signed-off-by: degenaro <lou.degenaro@gmail.com>
by_alias/by_name/extra were added to BaseModel.model_validate in pydantic 2.11.0; the lower bound now matches the version that introduced them. Signed-off-by: 谢翊凡 <xyf5432@users.noreply.github.com> Co-authored-by: 谢翊凡 <xyf5432@users.noreply.github.com> Co-authored-by: Claude <noreply@anthropic.com> Co-authored-by: Lou DeGenaro <lou.degenaro@gmail.com>
Signed-off-by: Acuspeedster <arnavrajsingh@gmail.com> Co-authored-by: Lou DeGenaro <lou.degenaro@gmail.com>
Fix to_origin_dir_path and to_origin_file_path so they strip only the trailing __bk and .bk suffix rather than splitting on all occurrences of __bk or .bk inside directory and file names. Fixes oscal-compass#2210 Signed-off-by: Aryan Singh <aryansingh.as1012@gmail.com>
…l-compass#2343) Bumps [python-semantic-release/python-semantic-release](https://github.com/python-semantic-release/python-semantic-release) from 10.6.1 to 10.6.2. - [Release notes](https://github.com/python-semantic-release/python-semantic-release/releases) - [Changelog](https://github.com/python-semantic-release/python-semantic-release/blob/master/CHANGELOG.rst) - [Commits](python-semantic-release/python-semantic-release@39dd205...9a026e9) --- updated-dependencies: - dependency-name: python-semantic-release/python-semantic-release dependency-version: 10.6.2 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
…#2342) Bumps the codeql-action group with 2 updates: [github/codeql-action/init](https://github.com/github/codeql-action) and [github/codeql-action/analyze](https://github.com/github/codeql-action). Updates `github/codeql-action/init` from 4.37.8 to 4.37.9 - [Release notes](https://github.com/github/codeql-action/releases) - [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md) - [Commits](github/codeql-action@db488dd...cdf488f) Updates `github/codeql-action/analyze` from 4.37.8 to 4.37.9 - [Release notes](https://github.com/github/codeql-action/releases) - [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md) - [Commits](github/codeql-action@db488dd...cdf488f) --- updated-dependencies: - dependency-name: github/codeql-action/init dependency-version: 4.37.9 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: codeql-action - dependency-name: github/codeql-action/analyze dependency-version: 4.37.9 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: codeql-action ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Lou DeGenaro <lou.degenaro@gmail.com>
…scal-compass#2195) * test(validate): enable component-definition port validation coverage Signed-off-by: Acuspeedster <arnavrajsingh@gmail.com> * fix: validation error Signed-off-by: degenaro <lou.degenaro@gmail.com> --------- Signed-off-by: Acuspeedster <arnavrajsingh@gmail.com> Signed-off-by: degenaro <lou.degenaro@gmail.com> Co-authored-by: Lou DeGenaro <lou.degenaro@gmail.com>
|
@Siraryansingh Thx for this PR. Are you on our slack channel #oscal-compass-trestle-agileauthoring-c2p? To join you need a LF ID, you can get one here https://identity.linuxfoundation.org/. Below is Bob's review. Please fix the DCO and missing test issues, thx! ===== PR #2341 Review —
|
| Concern | Status |
|---|---|
| DCO signature mismatch | 🚫 Blocker |
| Logic correctness | ✅ Correct |
| Test for directory case | ✅ Present |
Test for file case with .bk in name |
|
| Code style | ✅ Fine |
The fix itself is correct and ready to merge once the DCO issue is resolved.
|
Also, some tips. Run locally: make develop |
|
Some additional recommendations:
|
* fix: improve tests Signed-off-by: degenaro <lou.degenaro@gmail.com> * fix: format Signed-off-by: degenaro <lou.degenaro@gmail.com> --------- Signed-off-by: degenaro <lou.degenaro@gmail.com>
…e datetime (oscal-compass#2139) - jinja/tags.py: replace type(x is str) with isinstance(x, str). type(kwargs['format'] is str) always evaluated to <class 'bool'> (truthy), making the else branch (default format fallback) unreachable dead code and silently passing non-string values to strftime(). - catalog_merger.py: remove 7 list_utils imports that were never used (as_dict, as_filtered_list, as_list, delete_item_from_list, deep_set, get_item_from_list, none_if_empty). Only set_or_pop is actually called. - cli.py: replace exit() with sys.exit(). The built-in exit() is intended for interactive interpreter use; sys.exit() is correct for application code. Add missing 'import sys'. - cache.py: pass tz=datetime.timezone.utc to both fromtimestamp() and now() so the timedelta calculation is timezone-aware and immune to DST transitions. Signed-off-by: Acuspeedster <arnavrajsingh@gmail.com> Co-authored-by: Lou DeGenaro <lou.degenaro@gmail.com>
What this PR does / why we need it:
Fixes
to_origin_dir_path()andto_origin_file_path()intrestle/common/trash.pyso they strip only the trailing__bkand.bksuffix instead of splitting on all occurrences of__bkor.bkinside directory and file names.Previously, directory names containing
__bk(e.g.alpha__bkbeta) were incorrectly truncated toalphaduring recovery.Which issue(s) this PR fixes:
Fixes #2210
How was this tested?:
test_to_origin_dir_path_with_bk_in_nameunit test intests/trestle/utils/trash_test.pypytest(17 passed in 0.04s)ruff(all checks passed)