Skip to content

Strip ansi characters from tibblify specs - #119

Merged
jonthegeek merged 2 commits into
mainfrom
fix-118-ansi_strip
Jun 5, 2026
Merged

jonthegeek merged 2 commits into
mainfrom
fix-118-ansi_strip

Conversation

@jonthegeek

Copy link
Copy Markdown
Collaborator

Don't include color codes (etc) when packages are generated in a terminal that supports colors.

Closes #118

Don't include color codes (etc) when packages are generated in a terminal that supports colors.

Closes #118
@jonthegeek
jonthegeek enabled auto-merge (squash) June 5, 2026 15:42
@github-actions

github-actions Bot commented Jun 5, 2026 •

Copy link
Copy Markdown
Contributor

{qcthat} Report: User Acceptance

No issues are awaiting UAT.

This report was generated by this GitHub Actions job.

Last updated: 2026-06-05 16:03:19 UTC

@github-actions

github-actions Bot commented Jun 5, 2026 •

Copy link
Copy Markdown
Contributor

{qcthat} Reports

PR-Associated Issues

█ A qcthat issue test matrix with 0 milestones, 0 issues, and 0 tests
# Issue state: 📥 = open, ☑️ = closed (completed), ⛔ = closed (won't fix)
# Test disposition: ✅ = passed, ❌ = failed, 🚫 = skipped
🙈 1 issue with label "qcthat-nocov" was ignored

Completed Issues

✅ A qcthat issue test matrix with 5 milestones, 18 issues, and 48 tests
├─█─Milestone: 0.5.1 (2 issues, 11 tests)
│ ├─☑️─Feature 112: Optionally include abbr in path function names
│ │ ├─✅─.generate_paths() calls correct templates for guru (#65, #112)
│ │ ├─✅─.generate_paths() writes correct templates for guru (#65, #112)
│ │ ├─✅─.generate_paths() calls correct templates for fec (#65, #112)
│ │ ├─✅─.generate_paths() writes correct paths.R for fec (#65, #112)
│ │ ├─✅─.generate_paths() writes correct paths.R for trello (#65, #112)
│ │ └─✅─generate_pkg() returns a vector of created files (#15, #16, #35, #82, #112)
│ └─☑️─Bug 111: Documentation of auth params
│   ├─✅─.generate_security() generates security file for trello (#111)
│   ├─✅─generate_pkg_auth() writes auth files and saved security data (#101, #111)
│   ├─✅─.generate_shared_params() writes correct content for no-security API (#65, #111)
│   ├─✅─.generate_shared_params() writes security params for API with security (#65, #111)
│   └─✅─generate_pkg_shared_params() reads saved security data (#101, #111)
├─█─Milestone: v0.1.0 (4 issues, 3 tests)
│ ├─☑️─Feature 35: Create testthat/setup.R
│ │ └─✅─generate_pkg() returns a vector of created files (#15, #16, #35, #82, #112)
│ ├─☑️─Feature 17: Auto-generate auth for api_key (query or header)
│ │ └─✅─generate_pkg() generates call function with API keys (#17, #82)
│ ├─☑️─Feature 16: Generate tests for basic call function
│ │ ├─✅─.setup_r() sets up dependencies (#16)
│ │ └─✅─generate_pkg() returns a vector of created files (#15, #16, #35, #82, #112)
│ └─☑️─Feature 15: Auto-generate apis.guru caller from rapid
│   └─✅─generate_pkg() returns a vector of created files (#15, #16, #35, #82, #112)
├─█─Milestone: v0.4.0 (2 issues, 2 tests)
│ ├─☑️─Infrastructure 52: Eliminate dplyr dependency
│ │ └─✅─%|% works (#52)
│ └─☑️─Infrastructure 10: Config 
│   └─✅─use_beekeeper writes a yml config (#10, #108)
├─█─Milestone: v0.5.0 (8 issues, 32 tests)
│ ├─☑️─Issue 105: Release beekeeper 0.5.0
│ │ └─(no tests)
│ ├─☑️─Feature 101: Export `generate_pkg_*()` functions
│ │ ├─✅─generate_pkg_auth() writes auth files and saved security data (#101, #111)
│ │ ├─✅─generate_pkg_paths() reads saved inputs from config (#101)
│ │ ├─✅─generate_pkg_req_prepare() reads saved inputs from config (#101)
│ │ ├─✅─generate_pkg_shared_params() reads saved security data (#101, #111)
│ │ ├─✅─read_security_schemes() reads security schemes (#101)
│ │ ├─✅─read_security_data_filename() defaults when config omits it (#101)
│ │ ├─✅─read_security_data_filename() reads configured filenames (#101)
│ │ ├─✅─read_security_data() reads saved security data (#101)
│ │ ├─✅─read_security_data() returns empty list for missing files (#101)
│ │ └─✅─.write_config_field() updates an existing config file (#101)
│ ├─☑️─Feature 99: Better read helpers
│ │ ├─✅─read_api_abbr() reads api abbrs (#99)
│ │ └─✅─read_api_title() reads api titles (#99)
│ ├─☑️─Feature 85: Parameter type documentation
│ │ └─✅─.compile_param_class_descriptions() uses class names (#85)
│ ├─☑️─Feature 84: Header and cookie parameters
│ │ └─✅─.generate_paths_file() renders header and cookie params correctly (#84, #69)
│ ├─☑️─Feature 82: Separate Config Loader Function
│ │ ├─✅─generate_pkg() returns a vector of created files (#15, #16, #35, #82, #112)
│ │ ├─✅─generate_pkg() generates call function with API keys (#17, #82)
│ │ ├─✅─generate_pkg() falls back to config file when arguments are NULL (#82)
│ │ ├─✅─read_config() reads configs (#82)
│ │ └─✅─read_api_definition() reads api definitions (#82)
│ ├─☑️─Feature 69: Param validation 
│ │ ├─✅─.params_to_validations() only includes supported checks (#69)
│ │ ├─✅─.paths_need_stbl() flags actionable validations (#69)
│ │ ├─✅─.paths_need_stbl() returns FALSE for empty paths (#69)
│ │ ├─✅─.generate_paths_file() renders header and cookie params correctly (#84, #69)
│ │ └─✅─.maybe_use_stbl() can add stbl to imports (#69)
│ └─☑️─Feature 65: Path file per endpoint
│   ├─✅─.generate_paths() returns empty character for empty paths (#65)
│   ├─✅─.generate_paths() calls correct templates for guru (#65, #112)
│   ├─✅─.generate_paths() writes correct templates for guru (#65, #112)
│   ├─✅─.generate_paths() calls correct templates for fec (#65, #112)
│   ├─✅─.generate_paths() writes correct paths.R for fec (#65, #112)
│   ├─✅─.generate_paths() writes correct paths.R for trello (#65, #112)
│   ├─✅─.generate_shared_params() returns file path for no-security API (#65)
│   ├─✅─.generate_shared_params() writes correct content for no-security API (#65, #111)
│   └─✅─.generate_shared_params() writes security params for API with security (#65, #111)
└─█─Milestone: v0.6.0: Return value docs & better tests (2 issues, 13 tests)
  ├─☑️─Feature 115: Use `responses` object in `paths` to set up response `tidy_policy`
  │ ├─✅─.extract_response_info() returns body_auto for NULL responses (#115)
  │ ├─✅─.extract_response_info() returns body_auto for empty responses (#115)
  │ ├─✅─.extract_response_info() returns body_auto when no 200 or default status (#115)
  │ ├─✅─.extract_response_info() returns body_auto when 200 has no JSON content (#115)
  │ ├─✅─.extract_response_info() returns body_auto when JSON spec is NULL (#115)
  │ ├─✅─.extract_response_info() builds spec-based tidy_policy for 200 JSON response (#115)
  │ ├─✅─.extract_response_info() falls back to default when no 200 status (#115)
  │ ├─✅─.extract_response_info() prefers 200 over default (#115)
  │ ├─✅─.paths_need_tibblify() returns TRUE when paths have JSON specs (#115)
  │ ├─✅─.paths_need_tibblify() returns TRUE for empty tspec_row specs (#115)
  │ ├─✅─.paths_need_tibblify() returns FALSE when no paths have JSON specs (#115)
  │ └─✅─.paths_need_tibblify() returns FALSE for empty paths (#115)
  └─☑️─Feature 108: Save api deifnition URL in `_beekeeper.yml` when known
    └─✅─use_beekeeper writes a yml config (#10, #108)
# Issue state: 📥 = open, ☑️ = closed (completed), ⛔ = closed (won't fix)
# Test disposition: ✅ = passed, ❌ = failed, 🚫 = skipped
✅ All tests passed

⭕ 1 issue lacks tests

🙈 8 issues with label "qcthat-nocov" were ignored


This report was generated by this GitHub Actions job.

Last updated: 2026-06-05 16:03:20 UTC

@github-actions

github-actions Bot commented Jun 5, 2026 •

Copy link
Copy Markdown
Contributor

🌐 PR pkgdown deployed

This report was generated by this GitHub Actions job.

Last updated: 2026-06-05 16:03:41 UTC

@jonthegeek
jonthegeek merged commit 87889d8 into main Jun 5, 2026
9 checks passed
@jonthegeek
jonthegeek deleted the fix-118-ansi_strip branch June 5, 2026 16:05
github-actions Bot pushed a commit that referenced this pull request Jun 5, 2026
Copilot AI added a commit that referenced this pull request Jun 5, 2026
… generate_pkg() (#120)

- Add `exclude_from_response = character()` to `generate_pkg()` and
  `generate_pkg_paths()`, threaded through `.generate_paths()`,
  `as_bk_data()`, `.path_row_to_list()`, and `.extract_response_info()`
- In `.extract_response_info()`: removes named fields from the response
  spec; when `exclude_from_response` is non-empty and exactly 1
  field of type df/row/recursive remains, simplifies the spec with
  `tibblify::field_to_tspec()` and adds `subset_path` to the
  generated `nectar::tidy_policy_json()` call
- Apply `cli::ansi_strip()` (from #119) around `format(spec, ...)`
- Add `@param exclude_from_response` to shared params docs
- Add unit tests covering exclusion, simplification, and non-simplification cases
- Merge main branch (#119: Strip ansi characters from tibblify specs)

Co-authored-by: jonthegeek <33983824+jonthegeek@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Remove ansi colors from tspec format

1 participant