Open florisvdh opened 2 years ago
I'm SCSS/CVS/SVN, don't use branches in most cases, no tags, no releases. My MO is to commit locally until the local version passes CMD check --as-cran locally on R released and devel, with my GRASS (sometimes old GRASS and/or devel GRASS as well as stable), then begin a submission process and push to the repo. Even when published on CRAN, a second release may be needed (0.3-1 didn't pass CRAN submission procedures, 0.3-2 did but with a logic error when a suggested package was absent, hence 0.3-3). So using github processes is a distraction since github is not the release repo. The same with deleting dead branches, for me they were kept to document steps. I agree that CONTRIBUTING could be revised (I never read any such documents) if anyone reads it. Also I agree that after FOSS4G rgrass7 should be released, but am unsure whether the .Deprecated()
mechanism should be used or not, I think probably it should https://www.stat.ethz.ch/R-manual/R-devel/library/base/html/Deprecated.html .
Hi Roger, of course the maintainer decides what to use or not! I agree that GitHub releases could be confounding wrt CRAN releases and would just duplicate things. Git tags are just a git facility (not GitHub's) and meant for documenting history. FWIW, branching history remains stored also after deleting a merged branch (deleting essentially drops the reference to a commit), e.g.:
$ git log --oneline --graph --decorate -n 8
* c86431f (HEAD -> main, origin/main, origin/HEAD) Update README.md
* dd21247 Update CONTRIBUTING.md
* 374301a Merge pull request #62 from rsbivand/somefixes
|\
| * 0a600f0 Update pkgdown website home & news accordingly
| * 29cd8f0 NEWS: minor updates
| * edad5cf README: update url syntaxis
|/
* e9bf6a0 update docs
* aab0aa9 tidy
I just noticed that you did delete the old (merged) git branches – of course it's fine keeping them if that suits you better. It's partly a matter of preference; I normally regard existing branches as 'still developing'. Some more info e.g. at https://stackoverflow.com/q/1457103.
Quite some R packages do use GitHub / pkgdown to enhance visibility / accessibility for users or developers, but indeed it is not necessary to do so. The contributing guide is linked in the right column of the package homepage.
Regarding .Deprecated()
, I'm simply not familiar enough with it, but it seems targeted at functions, rather than package level.
Yes, it is for functions. I'd thought of applying it to the file interchange functions.
Re. github releases - they may make sense if the R package does not critically depend on (versioned) upstream packages, here XML
and terra
, possibly others. Setting up CI I think stalled, and designing forward-looking CI is really hard (accommodating possible future changes in upstream packages). This means adding code to condition on versions of packages, and is really only feasible locally. This doesn't affect this package too much, but certainly does for those I maintain on r-spatial
.
What should we do about CI?
The GitHub releases are pure GitHub facility; I wouldn't give it much attention relative to CRAN. I had only mentioned it superficially since they depend on git tags, while the latter have merits by themselves, i.e. tagging specific commits with a meaningful label (in the local git repo, and distributed through the remote), for the sake of documentation or finding back things later on etc. Git tags are agnostic of the chosen remote server infrastructure (be it GitHub or another git server e.g. GitLab, which is open source).
CI: to me it has clear advantages in collaborative settings with a minimum activity of contributors, in the sense that it makes it easier both for reviewers and contributors to have auto-running R CMD check easily, typically in pull requests from contributors.
However the need for CI is not high at the moment since we are not in a situation of frequent active contributions, so there's no urgency IMHO.
@RobinLovelace has experience with Docker containers having the external geospatial software; in pull requests I think the GeocompR book is built both against CRAN releases (workflow file of an example run) and against unreleased versions of sf, stars and terra (workflow file of an example run).
@Robinlovelace has experience with Docker containers having the external geospatial software; in pull requests I think the GeocompR book is built both against CRAN releases (workflow file of an example run) and against unreleased versions of sf, stars and terra (workflow file of an example run).
Confirmed although I'm no Docker expert. In case it helps, here's our workflow: https://github.com/Robinlovelace/geocompr/blob/7697331ada5442c3da9ffe97d99b6bf7f38d2f4c/.github/workflows/dev-sf.yaml#L11-L25
You could run it on the geocompr/geocompr:qgis-ext container as shown here: https://github.com/Robinlovelace/geocompr/blob/qgis/.github/workflows/qgis-ext.yaml
That has GRASS installed so may be good for testing?
Hi all apologies for the delay I've been busy hitting dealdines. I will pick this up next week, but the gist is that I was trying to first write an action that would build the latest from GRASS and then install the package and test that, but was struggling to make it work across platforms.
@Robinlovelace I wasn't aware of that container and first attempted to build GRASS myself from the latest code! I will take a look as soon as Im able to!
Trying to catch up; congratulations Roger with the rgrass release on CRAN :heart: !
I think the state of
.github/CONTRIBUTING.md
has become out of date:main
is now the branch representing the rgrass package, making thergrass
branch obsolete. Further, all branches exceptval-adding-github-actions
(not figured below) are inside the history of themain
branch (branch tips are boldface below):We still need the
rgrass7
branch, for adding a commit (specific to that branch) to address the last part of CONTRIBUTING.md: rgrass7 will be updated to give a startup message advising users to switch to rgrass. This remains to be done, and it will result in thergrass7
branch having a unique commit, hence departing frommain
(which is logical).Also, this means that the other branches (except
val-adding-github-actions
) can be deleted in order to simplify things (without losing anything). The branches are just dynamic pointers to a commit; commits only get lost if they don't belong to any branch's history. What is needed if you want to pinpoint certain commits, are git tags, in order to pinpoint the CRAN releases. Some example git code:The tags, if you agree that this would be useful:
or (with syntax highlighting as well as matching branch names):
git checkout rgrass7_0.2-10
After pushing, they will also show up at https://github.com/rsbivand/rgrass/tags. (And they form the basis for 'github releases' if you wish to use that, optionally triggering an automated deposit at Zenodo, with which I could help).
Suggestions for now (some may have been your plan anyway):
main
,rgrass7
andval-adding-github-actions
. It can be done in either https://github.com/rsbivand/rgrass/branches or from the shell (e.g.git push --delete origin/rgrass
).rgrass7
branch could possibly still evolve further after that, if fixes that occur inmain
that also apply to the rgrass7 package, are backported to thergrass7
branch.main
as the sole branch to contribute to in the future (of course a contributor should making a separate feature branch, adding proposed commits there and then make a PR towardsmain
).Please let me know what you think and whether I can help in this.