Closed
Description
This is a follow-up from discussion in issue #2, related discussion in PR #21 and conversations with several collaborators.
It is still open for discussion, but the current plan is as below. The main points, splitting the repo and renaming the package, will be implemented in rather near future, probably in a stage with no pending pull requests.
package repository + name
- while it has some advantages, keeping the package and the preprocessing workflow together has already proven to confuse several people. To prevent this, the package will move to its own repository.
- the package retains its scope, that is: functions useful to a lot of projects dealing with Natura 2000 habitat (and RIBs) in Flanders, but not meant for too project-specific functionality.
- the package's name (currently
n2khabutils
) will be shortened to n2khab. The 'n2k' prefix follows the style of existing n2k-packages at inbo. - existing code to reproduce the textdata delivered with the package, will be put into a build-ignored folder inside the package repo.
related n2khab repositories
- what will be left in the 'n2khab-inputs' repo, at that stage, are two quite different things:
- preprocessing of data sources, again useful to a lot of projects dealing with Natura 2000 habitat in Flanders (not involving very project-specific stuff)
- information on intended and existing workflows in monitoring design & analysis and how this is to be organised as repositories. It provides task definitions in the context of monitoring (functionality.md + issues) which also involve work on the n2khab package and the preprocessing workflow - often side-to-side with work on other repos.
- the above will be split into two repositories, respectively:
- n2khab-preprocessing
- n2khab-monitoring --> this one will serve as the specific starting point on monitoring, with information on the several involved repositories + package. It serves both MNE and MHQ, and it will contain nothing more than 'meta-information'. It would best present general information on the related repositories (not the involved tasks) as a website (using the gh-pages branch).
Activity
florisvdh commentedon Jun 12, 2019
Warning: starting to implement this. Now is a bad time to make commits (even locally).
florisvdh commentedon Jun 14, 2019
The following is now ready:
n2khab-inputs
: n2khab-monitoring - i.e. this repo. It lays out purposes and workflows regarding several repositories, with a specific interest in Natura 2000 habitat monitoring. It's also the place where the related tasks and discussions are hosted, as before inn2khab-inputs
.The README files and other documentation in all three repositories have been updated to reflect each repo's respective contents. Minor updates of remaining obsolete pieces may still occur in the future. Main functionality should be OK.
The
n2khab-monitoring
repo has kept the complete git history of the former hybrid repon2khab-inputs
. As a convenience, the other two repositories still hold a rewritten (shrinked) git history, as defined by the selected files and folders. However full reproducibility of older workflows can only be guaranteed by the versions provided by then2khab-monitoring
repo.In the
n2khab-monitoring
repo, the discarding of migrated files occurred in commit be6be8e, and some further related updates occurred thereafter.How to move to the new
n2khab
R package as a user?In R, uninstall
n2khabutils
:remove.packages("n2khabutils")
Install
n2khab
:Have a look at the vignettes to quickly find your way!
Help, I want to keep contributing!
Of course! Migration of local git repositories can be done super-easily.
You clone the new repositories n2khab and n2khab-preprocessing in the usual way, with
git clone
.Supposing you still have a local
n2khab-inputs
repo, you have several options of migrating to then2khab-monitoring
repo:The super-easy way
If you have no 'git-ignored' files to loose (such as data, bookdown reports) and no original work like unpushed branches, just delete the local
n2khab-inputs
folder and make a new clone of n2khab-monitoring. Done!The geeky way
In the other case, you can decide to stay with your existing local repo. This means discarding obsolete branches, updating the remote reference, updating the local
master
branch and transferring previously git-ignored stuff to the repositories where they belong. (Note that a variant of this is to make a new clone of n2khab-monitoring and moving some git-ignored files from your old foldern2khab-inputs
to the other repos (step 3). Less elegant, but it may be convenient to you.)It goes as follows:
n2khab-inputs
asn2khab-monitoring
(this is a matter of convenience)data
andsrc
. The remaining files therein are not longer ignored by git, but they don't belong here anymore: the current remotemaster
does not have these folders! Except forsrc/generating_textdata
, the html and other local files of which you can move to your localn2khab
repo into the same folder, all other stuff should be moved to your localn2khab-preprocessing
repo.git status
that all is clean now. Done!florisvdh commentedon Jun 14, 2019
Note to self: how were some things done?
Regarding git, most ideas come from the manual of
git filter-branch
(see the examples); some inspiration is from github.find . -type f -exec sed -i 's/n2khabutils/n2khab/g' {} \;
find . -type f -exec sed -i 's/..\/..\/n2khab\/inst/..\/..\/inst/g' {} \;
find . -type f -name "*.R*" -exec grep -nH 'inbo.github.com/git2rdata' {} --colour \;