Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cleanup installs happening in the github workflows #409

Merged
merged 2 commits into from
Jan 24, 2024

Conversation

bsweger
Copy link
Collaborator

@bsweger bsweger commented Jan 16, 2024

resolves #404, resolves #405

The scope of these commits is making sure that all required dependencies are in the package's DESCRIPTION instead of being explicitly installed as a workflow step (for example, DT is required to build the vignettes).

Additionally, there's some cleanup to remove workflow-based installs if they aren't being used and/or reducing the footprint (e.g., explicitly use ggplot2 in the vignette rather than pull in the entire tidyverse).

Longer term, we have a goal to make these workflows better align to the newer ones used in the hubverse (#406 )

note: there are several smaller commits so it's easier to revert any breaking changes...happy to squash after approval to tidy up the commit history

@bsweger bsweger requested review from nickreich and elray1 January 16, 2024 22:13
Since pre-commit isn't part of the team workflow, don't clutter the
repo with any related config files
@bsweger bsweger force-pushed the bsweger/cleanup-workflow-and-dependencies branch from 33ce2b8 to ba20046 Compare January 16, 2024 22:20
@bsweger bsweger changed the title Cleanup installs happening in the github workflows [WIP] Cleanup installs happening in the github workflows Jan 16, 2024
@bsweger bsweger force-pushed the bsweger/cleanup-workflow-and-dependencies branch 5 times, most recently from 0298443 to 5c3d1b3 Compare January 18, 2024 18:37
@nickreich
Copy link
Member

@bsweger I'm assuming you will ping me when this is ready for a full review, and am holding off on a review until then.

devtools::install_github("epiforecasts/scoringutils")
remotes::install_deps(dependencies = NA)
install.packages(c("devtools","pkgdown"))
devtools::install_github("eepiforecasts/[email protected]")
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I assumed the scoringutils version here should match the changes made in #400

@bsweger bsweger changed the title [WIP] Cleanup installs happening in the github workflows Cleanup installs happening in the github workflows Jan 18, 2024
@bsweger
Copy link
Collaborator Author

bsweger commented Jan 18, 2024

@nickreich ready for review!

Copy link
Collaborator

@elray1 elray1 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just a couple of minor changes in comments.

A bigger point is that although the github action definition updates looked plausible to me, I don't know of a way to test that they work without actually merging the changes in and giving them a run... do you?

.github/workflows/pkgdown.yaml Outdated Show resolved Hide resolved
DESCRIPTION Outdated Show resolved Hide resolved
@bsweger
Copy link
Collaborator Author

bsweger commented Jan 19, 2024

A bigger point is that although the github action definition updates looked plausible to me, I don't know of a way to test that they work without actually merging the changes in and giving them a run... do you?

@elray1 r_cmd_check.yaml and pr_unittest.yaml run when a PR opens, so I made sure they worked before opening the PR for review (however, the tests started failing after I committed your suggested changes, so I'll look at that).

is pkgdown.yaml something we can run on a PR and then again on merge to main?

I recall that github actions have some capacity for ad-hoc runs, but I haven't looked into it yet.

Copy link
Member

@nickreich nickreich left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It feels like I'm breaking some GitHub code of conduct to give an approving review to a PR that is not passing a check, but I did get a few minutes to look at this and it the changes look good to me. So once the checks are passing I don't have other concerns.

@bsweger bsweger force-pushed the bsweger/cleanup-workflow-and-dependencies branch 2 times, most recently from 40efe2b to 6e69a9c Compare January 22, 2024 20:33
The vignette should use the scoringutils package made available
via covidHubUtils, rather than trying to install it again (which
can cause an "unload" error).

First pass at removing some the explicit dependency install in the R CHECK workflow

Also removed tidyverse dependency in align.R as part of this cleanup.

Remove RSocrata install

I don't *think* we're downloading anything from Socrata in this package

remove here and textshaping installs from the github workflows

Remove the extraneous "remotes" install in the github workflows

We still have #406 to get the covidHubUtils workflows in better alignment
with those in the hubverse, but for now we're focused on cleaning up workflow installs
per # 404 by either moving them to DESCRIPTION (if they're used) or
deleting them (if they're not).

Fixup to reinstate the specific version for scoringutils

Move covidData to a first-class dependency (rather than 'suggests')

Removing some of the explicit dependency installs from github
workflows broke things, because covidData wasn't being installed
with the command install_deps(NA). Since covidData is used by
covidHubUtils, let's make sure it's always installed and try to
avoid ad-hoc package installation in CI.

Fix vignette errors by making sure the packages in "suggests" are
installed

Remove explicit installs of zoltr and covidData

Let's see what happens when we remove the build steps that install
zoltr and covidData (since these two packages are already listed
as dependencies in covidHubUtils)

fixup PR feedback

Try making sure the package itself is installed

Streamline dependency installs in pkgdown.yaml
@bsweger bsweger force-pushed the bsweger/cleanup-workflow-and-dependencies branch from 1d55cb1 to 878367f Compare January 22, 2024 21:45
@bsweger bsweger requested a review from elray1 January 22, 2024 22:19
@bsweger
Copy link
Collaborator Author

bsweger commented Jan 22, 2024

@elray1 I believe I found and fixed the issue that was causing the tests to fail (that said, I'm not sure why they were passing before merging in your requested changes (which seem unrelated..and I reverted them to just see if the tests would start passing again, and they did! :tableflip:)

Anyway, everything is green now, and I squashed the commits so the history is a bit cleaner. Can you re-review when you have a chance? Thanks!

@bsweger bsweger merged commit a637a50 into master Jan 24, 2024
2 checks passed
@bsweger bsweger deleted the bsweger/cleanup-workflow-and-dependencies branch January 24, 2024 18:57
@bsweger bsweger mentioned this pull request Jan 26, 2024
2 tasks
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.

clean up R CMD CHECK workflow add all dependencies to package suggests (for example: DT, mockery)
3 participants