r-hyperspec / r-hyperspec.github.io

Homepage for r-hyperspec ecosystem
https://r-hyperspec.github.io
0 stars 0 forks source link

Automating the Propagation of Updates #13

Open bryanhanson opened 3 years ago

bryanhanson commented 3 years ago

This is related to #11. Also, see discussion in comments to https://github.com/r-hyperspec/pkg-skeleton/issues/1 .

In addition to automating the GHA workflows, we could also automate the updating of the vignette helper files and files like the .gitignore (which could use some standardization across packages).

bryanhanson commented 3 years ago

I will (soon) start a list of files that could be subject to automated updating.

bryanhanson commented 3 years ago

Here's an incomplete list of files that could be subject to some sort of automatic updating. To be included here, the file should be:

  1. Used by most or all packages in r-hyperspec.
  2. Be usable as is w/o local modifications.
  3. Probably reside in pkg-skeleton, and any modifications should be made there and deployed from there.

In addition, these files should be marked at the top with language like this (would need to comment the message in a an appropriate way depending upon the language/use):

# Original file resides in r-hyperspec/pkg-skelton Edit there and it will be automatically deployed.


Finally, here is a recursive directory listing of all the files currently in pkg-skeleton other than the items in .git. . .. .Rbuildignore .git .github .gitignore CONTRIBUTING.md DESCRIPTION LICENSE NEWS.md R README.md _pkgdown.yml codecov.yml github-helpers pkgdown project.Rproj (can be deleted) tests

./.github: . .. .gitignore (can be deleted) workflows

./.github/workflows: . .. R-CMD-check.yaml pkgdown.yaml test-coverage.yaml

./R: . .. demo_function.R package.R unittestdata.R

./github-helpers (note: VG had updated these files which I missed, but the new ones still need go be copied): . .. get-skeleton-labels.sh hySpc.skeleton.labels.json (can be deleted) put-skeleton-labels.sh

./pkgdown: . .. extra.css

./tests: . .. testthat testthat.R

./tests/testthat: . .. test_attached.R

GegznaV commented 3 years ago

@bryanhanson, Nice work preparing the list of files :)

bryanhanson commented 3 years ago

Some thoughts about how to actually do this (notes to self, not final).

Note that upon push to pkg-skeleton it would be ideal to test if any of the files of interest are changed (a la make) and only then do the subsequent steps. Changes to other files would not trigger the deployment.

bryanhanson commented 3 years ago

There is a working implementation of this idea on branch auto-update in pkg-skeleton. Needs a bit of refinement yet. Look at .github/workflows/auto-update.yaml.

bryanhanson commented 3 years ago

@GegznaV and @cbeleites I believe I have this task accomplished, via https://github.com/r-hyperspec/pkg-skeleton/commit/d9de99a2642e12a3bf3e8f6fd424e94850c9c933 It seems to work under all the conditions I can think of, but before going further perhaps you could take a look and see if there are any flaws in my logic. In the meantime I'm going to think of 1) any additional testing that might be wise and 2) the best way to start using this in a safe manner (I have a tentative plan for this).

bryanhanson commented 3 years ago

A plan to roll out the auto updating of static files:

Note: the working auto-update.yaml is on branch auto-update in pkg-skeleton. Work from there.

Warning: once all the repos are listed in the package matrix in pkg-skeleton auto-update.yaml we might hit the GH limit on simultaneous jobs. This needs more investigation.