Repository navigation
sheets: list parameters and filter sheets by them (--where/--params/--csv) - #248
Merged
Merged
Conversation
…-csv) Port rvt-prt list --params/--where (Unreleased after 0.1.0): SheetRecord.Parameters (text/integer project/shared params, SHEET_SCHEDULED as Appears In Sheet List Yes/No), SheetFilter (NAME=VALUE/!=/~, wildcards, Yes/No aliases), SheetsCommand --where/--params/--csv/--json, docs + SheetFilterTests.
Verified against racadvancedsampleproject.rvt 2027 (2 real sheets): built-in integers such as ELEM_CATEGORY_PARAM leaked into Parameters/CSV. Keep positive-id (user) params plus Appears In Sheet List, as documented. Adds SkipsBuiltinNonSheetParams test.
Review #248: Sheet Number 1 matched =true, Sheet Name true matched =1. SheetRecord.YesNoParameters now marks Yes/No params (Appears In Sheet List, user params of Yes/No kind via IsYesNo definition, boolean Forge spec, or boolean value); SheetFilter applies true/false/1/0 aliases only to those, every other field compares literally. Tests cover literal behavior on number/name/text params, bool-spec user params, and builtin non-sheet exclusion.
Recheck #248: Yes/No aliases failed when the filter named the parameter in another case than the plain YesNoParameters array (Issued=true worked, issued=true and ISSUED=1 did not). The record now stores the names in an OrdinalIgnoreCase set and IsYesNoParameter compares explicitly, matching Lookup and the filter contract. Regression test builds a record from a plain array and filters it in mixed case.
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.
Port rvt-prt list --params/--where (Unreleased after 0.1.0).\n\n- SheetRecord.Parameters: text and whole-number project/shared params as display strings (units stay out); SHEET_SCHEDULED as Appears In Sheet List Yes/No.\n- SheetFilter: NAME=VALUE / NAME!=VALUE / NAME~TEXT, wildcards * ?, case-insensitive, Yes/No aliases true/false/1/0.\n- rvtio sheets --where (repeatable, AND), --params (stderr listing), --csv (CSV output), --json (default). Misspelt name or empty match exits 1.\n- Docs: docs/sheets.md, docs/public-api.md, README. Tests: SheetFilterTests (5). Build + SheetCatalogTests/SheetsCommandTests/SheetFilterTests green on net8/net10.\n\nSource: https://github.com/puzzbobb/rvt-prt (CHANGELOG Unreleased, docs/usage.md#choosing-sheets-by-their-parameters, docs/how-it-works.md model/sheetparams.py). No Autodesk code.