Skip to content

Add foodwebr article demonstrating package function dependencies#100

Open
Copilot wants to merge 10 commits intomainfrom
copilot/add-graphs-package-functions
Open

Add foodwebr article demonstrating package function dependencies#100
Copilot wants to merge 10 commits intomainfrom
copilot/add-graphs-package-functions

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Feb 2, 2026

Description

Adds documentation article using foodwebr to visualize package function dependencies and call graphs.

Changes

  • Documentation: New article vignettes/articles/package-structure.qmd demonstrates:

    • Function dependency visualization with foodwebr
    • Architecture analysis (leaf/root/hub functions)
    • Integration with tidygraph for advanced graph operations
    • Practical workflows for code review and refactoring
    • Conditional rendering to support HTML, RevealJS, and DOCX output formats
  • Demo functions: Created layered architecture for meaningful visualizations:

    # 3-layer hierarchy demonstrating clean separation
    validate_input() → clean_data() → calculate_statistic() → example_function()
                                                             ↘
                     → clean_data() ────────────────────────→ calculate_summary()
  • Dependencies:

    • Added foodwebr to Suggests in DESCRIPTION
    • Added cli to Imports for improved error handling with cli::cli_abort()
  • Tests: Added 11 tests for new calculate_summary() function and updated existing tests

  • Website integration:

    • Added package-structure article to website navigation (navbar and sidebar)
    • Article accessible under "Articles" menu and "Advanced" section in sidebar
  • Workflow fixes:

    • Incremented package version to 0.0.0.9011
    • Added NEWS.md entry documenting changes
    • Updated error handling to use cli::cli_abort() instead of stop() to satisfy linter requirements
    • Implemented conditional rendering with knitr::is_html_output() to suppress interactive plots in DOCX format while maintaining all output formats
    • Added foodwebr-related terms to spellcheck WORDLIST
    • Added tests/testthat/_snaps/ to .gitignore to prevent empty directory build issues

Example Output

Article renders in HTML, RevealJS, and DOCX formats:


Checklist

  • The title of your PR should briefly describe the change.
  • Commit/merge messages to be included in NEWS.md should begin with -.
  • Code should follow the tidyverse style guide.
  • Documentation should use roxygen2, with Markdown syntax.
  • Contributions should include unit tests (using testthat).

For more information see Contributing.

Original prompt

This section details on the original issue you should resolve

<issue_title>use https://lewinfox.com/foodwebr/</issue_title>
<issue_description>include graphs of the structure of the package functions in a dedicated article on the topic</issue_description>

Comments on the Issue (you are @copilot in this section)


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

Copilot AI and others added 4 commits February 2, 2026 07:32
Co-authored-by: d-morrison <2474437+d-morrison@users.noreply.github.com>
…ests

Co-authored-by: d-morrison <2474437+d-morrison@users.noreply.github.com>
Co-authored-by: d-morrison <2474437+d-morrison@users.noreply.github.com>
…idation

Co-authored-by: d-morrison <2474437+d-morrison@users.noreply.github.com>
Copilot AI changed the title [WIP] Add graphs of package functions structure in dedicated article Add foodwebr article demonstrating package function dependencies Feb 2, 2026
Copilot AI requested a review from d-morrison February 2, 2026 07:47
@d-morrison d-morrison marked this pull request as ready for review February 2, 2026 09:34
@codecov-commenter
Copy link
Copy Markdown

codecov-commenter commented Feb 2, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ All tests successful. No failed tests found.

Files with missing lines Coverage Δ
R/calculate_statistic.R 100.00% <100.00%> (ø)
R/calculate_summary.R 100.00% <100.00%> (ø)
R/clean_data.R 100.00% <100.00%> (ø)
R/example_function.R 100.00% <100.00%> (ø)
R/format_result.R 100.00% <100.00%> (ø)
R/validate_input.R 100.00% <100.00%> (ø)

@d-morrison
Copy link
Copy Markdown
Member

@copilot fix issues in failing workflows

…d docs

Co-authored-by: d-morrison <2474437+d-morrison@users.noreply.github.com>
Copy link
Copy Markdown
Contributor Author

Copilot AI commented Feb 2, 2026

@copilot fix issues in failing workflows

Fixed all failing workflows in commit b251d70:

  1. lint-changed-files - Replaced stop() with cli::cli_abort() in validation functions
  2. version-check - Incremented version from 0.0.0.9010 to 0.0.0.9011
  3. Spellcheck - Added foodwebr-related terms to WORDLIST
  4. docs - Added prefer-html: true to article YAML for DOCX compatibility
  5. Check Changelog - Added NEWS.md entry describing the changes

Co-authored-by: d-morrison <2474437+d-morrison@users.noreply.github.com>
Comment thread vignettes/_metadata.yml
Comment thread vignettes/articles/package-structure.qmd
Co-authored-by: d-morrison <2474437+d-morrison@users.noreply.github.com>
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Feb 3, 2026

PR Preview Action v1.8.1

QR code for preview link

🚀 View preview at
https://UCD-SERG.github.io/rpt/pr-preview/pr-100/

Built to branch gh-pages at 2026-02-03 19:02 UTC.
Preview will be ready when the GitHub Pages deployment is complete.

@d-morrison
Copy link
Copy Markdown
Member

@d-morrison d-morrison enabled auto-merge April 8, 2026 22:04
Agent-Logs-Url: https://github.com/UCD-SERG/rpt/sessions/5481ca55-3b4b-4b97-ac1a-f32a17d5e289

Co-authored-by: d-morrison <2474437+d-morrison@users.noreply.github.com>
auto-merge was automatically disabled April 8, 2026 22:19

Head branch was pushed to by a user without write access

Copy link
Copy Markdown
Contributor Author

Copilot AI commented Apr 8, 2026

@copilot fix https://github.com/UCD-SERG/rpt/actions/runs/21629385642/job/62389726217?pr=100

Fixed macOS build failure in commit 699e450. The issue was an empty tests/testthat/_snaps/ directory that was being created during testing but causing package build errors. Added this directory to .gitignore to prevent it from being included in the package build.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

use https://lewinfox.com/foodwebr/

3 participants