You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
How to keep all packages synchronized with the evolving skeleton? #1
The hyperSpec.skeleton will be a 'template' for several packages. Do we have a plan how we are going to synchronize them with each other?
I can imagine the following situation: we make four derived packages named A, B, C and D. Some time later, we decide to change the build system, or contrinuous integration, or vignette style, whatever. The purpose of the skeleton is to simplify this, so it should be possible to make a change only once in the skeleton package and propagate it to the derived packages.
Once we have this clarified, it should also go into the contributor's guide :)
Maybe there should be a hy_update_packages() similar to utils::update.package()...
# Install hyperSpec.skeleton package from githubremotes::install_github("eoduniyi/hyperSpec.skeleton")
library(hyperSpec.skeleton)
# Update all the packages
hy_update_packages()
...
But yeah, that's just the interface...I'm not entirely sure what hy_update_packages() would do in order to ensure all of the users' currently installed hyperSpec CRAN packages are "updated"
Perhaps a user (contributor) would call hy_update_packages() from within R and the function would go find all the hyperSpec packages and update them appropriately (update .yml, .md, etc.)
Note: But if hyperSpec.skeleton has a function that can modify the user's file system, then I'm not sure it will pass through CRAN's requirements, so maybe hyperSpec.skeleton doesn't go on CRAN, but its derived packages can/will.
Well, it appears that being able to propagate changes from the template repository is only possible if we make the template repository a remote of its derived repositories. So if we happen to make changes to the hyperSpec.skeleton repository, the derived repositories would need to fetch those changes from hyperSpec.skeleton.
..seems like a solid solution assuming we change hyperSpec.skeleton rarely.
E.g., Script + GitHub (GH) actions.
Eric, can you find out how to use GH Actions to copy files from one
repository in to the other? Maybe you can create two repos on your account
and experiment with them?
2020 birž. 24, tr 22:16, Erick Oduniyi <[email protected]> rašė:
Activity
eoduniyi commentedon May 14, 2020
That's interesting...
Maybe there should be a
hy_update_packages()similar toutils::update.package()...But yeah, that's just the interface...I'm not entirely sure what
hy_update_packages()would do in order to ensure all of the users' currently installed hyperSpec CRAN packages are "updated"Perhaps a user (contributor) would call
hy_update_packages()from within R and the function would go find all the hyperSpec packages and update them appropriately (update .yml, .md, etc.)Note: But if hyperSpec.skeleton has a function that can modify the user's file system, then I'm not sure it will pass through CRAN's requirements, so maybe hyperSpec.skeleton doesn't go on CRAN, but its derived packages can/will.
ximeg commentedon May 14, 2020
I did a bit of research... Apparently one can create template repositories in GitHub and create new repos from this template. I'm not sure whether it is what we need, and that one can pull the upstream changes from the template to the derived repo. I think we need to investigate this.
There is also a corresponding discussion on StackOverflow.
bryanhanson commentedon May 16, 2020
Good find @ximeg I think this is worth a try. Probably safer if the template branch has a single branch.
eoduniyi commentedon May 18, 2020
Hmmm,
Well, it appears that being able to propagate changes from the template repository is only possible if we make the template repository a remote of its derived repositories. So if we happen to make changes to the hyperSpec.skeleton repository, the derived repositories would need to fetch those changes from hyperSpec.skeleton.
..seems like a solid solution assuming we change hyperSpec.skeleton rarely.
GegznaV commentedon Jun 23, 2020
We can create a test on CI system, that checks if we need to update certain files from the "skeleton" repo.
cbeleites commentedon Jun 24, 2020
... and then maybe use patches to propagate relevant changes to the derived repositories.
eoduniyi commentedon Jun 24, 2020
How would you recommend us/me going about this?
GegznaV commentedon Jun 24, 2020
eoduniyi commentedon Jun 24, 2020
Sounds good! On it
bryanhanson commentedon Jul 26, 2021
Closed in favor of r-hyperspec/r-hyperspec.github.io#13