Skip to content

Conversation

@VisruthSK
Copy link
Member

@VisruthSK VisruthSK commented Oct 23, 2025

Updating the theme to better match the main Stan page. This PR uses the new theme & use a GitHub Action to automatically build the dev version of the site on PRs and the release version on releases.

The action needs to be tested to see if all dependencies are properly specified.

@VisruthSK VisruthSK requested a review from jgabry October 23, 2025 00:19
@jgabry
Copy link
Member

jgabry commented Oct 23, 2025

Just started looking at this. First things I noticed looking at the GHA logs are that the new yml file needs to be in .Rbuildignore (there's an R cmd check NOTE about that) and that there are a lot of test failures. I'm thinking the test failures are unrelated since they're visual tests checking SVGs. I'll look into that.

Update: test failures are definitely unrelated to this. I'm fixing that on a separate branch: #379

@codecov-commenter
Copy link

codecov-commenter commented Oct 23, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 98.62%. Comparing base (fda764c) to head (9cee9ae).

Additional details and impacted files
@@           Coverage Diff           @@
##           master     #378   +/-   ##
=======================================
  Coverage   98.62%   98.62%           
=======================================
  Files          35       35           
  Lines        5750     5750           
=======================================
  Hits         5671     5671           
  Misses         79       79           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@VisruthSK
Copy link
Member Author

So tests seem to be ok, but I can't see the new pkgdown action, so we need to check that before merging.

@jgabry
Copy link
Member

jgabry commented Oct 23, 2025

So tests seem to be ok, but I can't see the new pkgdown action, so we need to check that before merging.

Yeah tests should be fixed by the branch that I merged in. But I also don't see the pkgdown action.

@VisruthSK
Copy link
Member Author

It seems like the action must be run on PRs before it appears--otherwise it can only be seen on main

@VisruthSK
Copy link
Member Author

VisruthSK commented Oct 23, 2025

https://mc-stan.org/bayesplot/dev/

It's up now! Looks like some plots on the main page are broken so I'll work on that.

Plots on other pages, viz. a vignette I chcked, seem to be fine.

@VisruthSK
Copy link
Member Author

VisruthSK commented Oct 23, 2025

@jgabry images in the readme aer stored in the ./images subdir--is it ok to move them into ./man/figures instead? I'm guessing the reason for having them in a separate folder is so that they're not copied in when the package is installed

Fixed without having to move things. Should be ready for review.

@jgabry
Copy link
Member

jgabry commented Oct 23, 2025

Looking good! Just a couple of things I notice in the dev site:

@jgabry
Copy link
Member

jgabry commented Oct 23, 2025

I just pushed a commit explicitly setting the theme and if that works we can just not worry about this.

Do we need to manually run the workflow to regenerate the dev site?

@VisruthSK
Copy link
Member Author

For now yes--disabled runs on PRs.

@VisruthSK
Copy link
Member Author

The badge and plots seem to be fixed.

@jgabry
Copy link
Member

jgabry commented Oct 24, 2025

For some reason the same ggplot2 theme issue is happening on the function documentation pages in the Examples sections. E.g., compare the plots at the bottom of these pages:

I guess we can manually set the theme in each examples section, but I don't understand why this needs to be done when it didn't need to be previously. I think it must have to do with some change in ggplot2 v4.0 that's preventing bayesplot's default them from being set by default, that's the only thing I can think of.

@jgabry
Copy link
Member

jgabry commented Oct 24, 2025

For some reason the same ggplot2 theme issue is happening on the function documentation pages in the Examples sections. E.g., compare the plots at the bottom of these pages:

I guess we can manually set the theme in each examples section, but I don't understand why this needs to be done when it didn't need to be previously. I think it must have to do with some change in ggplot2 v4.0 that's preventing bayesplot's default them from being set by default, that's the only thing I can think of.

I guess that can be fixed (if possible) separately and we can go ahead with the new site since it's (probably) not an issue with the site itself. Let me think about it for a min though.

@VisruthSK
Copy link
Member Author

VisruthSK commented Oct 24, 2025

Could this be a ggplot V4 thing?

Sorry reread your first comment. I'm curious if the same thing happens rendering the old site but bumping the ggplot dependency to 4.0.0

@jgabry
Copy link
Member

jgabry commented Oct 24, 2025

I think the same thing would happen. I'm 99% sure it's a ggplot v4.0 thing. I'm working on fixing it. I sort of have a fix, but there are some subtleties I'm still working out.

@jgabry
Copy link
Member

jgabry commented Oct 29, 2025

I just merged in a fix (I think) for the ggplot theme issue

@jgabry jgabry merged commit 987ef3c into master Oct 29, 2025
7 checks passed
@jgabry jgabry deleted the new-pkgdown-setup branch October 29, 2025 23:29
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.

4 participants