mirror of
https://github.com/msberends/AMR.git
synced 2024-12-24 18:06:11 +01:00
set up Git LFS for large files
This commit is contained in:
parent
e05d0365a9
commit
4da32e3d40
6
.gitattributes
vendored
Normal file
6
.gitattributes
vendored
Normal file
@ -0,0 +1,6 @@
|
||||
*.dta filter=lfs diff=lfs merge=lfs -text
|
||||
*.sas filter=lfs diff=lfs merge=lfs -text
|
||||
*.sav filter=lfs diff=lfs merge=lfs -text
|
||||
data-raw/*.dta filter=lfs diff=lfs merge=lfs -text
|
||||
data-raw/*.sas filter=lfs diff=lfs merge=lfs -text
|
||||
data-raw/*.sav filter=lfs diff=lfs merge=lfs -text
|
3
.github/prehooks/post-checkout
vendored
Executable file
3
.github/prehooks/post-checkout
vendored
Executable file
@ -0,0 +1,3 @@
|
||||
#!/bin/sh
|
||||
command -v git-lfs >/dev/null 2>&1 || { echo >&2 "\nThis repository is configured for Git LFS but 'git-lfs' was not found on your path. If you no longer wish to use Git LFS, remove this hook by deleting .git/hooks/post-checkout.\n"; exit 2; }
|
||||
git lfs post-checkout "$@"
|
3
.github/prehooks/post-commit
vendored
Executable file
3
.github/prehooks/post-commit
vendored
Executable file
@ -0,0 +1,3 @@
|
||||
#!/bin/sh
|
||||
command -v git-lfs >/dev/null 2>&1 || { echo >&2 "\nThis repository is configured for Git LFS but 'git-lfs' was not found on your path. If you no longer wish to use Git LFS, remove this hook by deleting .git/hooks/post-commit.\n"; exit 2; }
|
||||
git lfs post-commit "$@"
|
3
.github/prehooks/post-merge
vendored
Executable file
3
.github/prehooks/post-merge
vendored
Executable file
@ -0,0 +1,3 @@
|
||||
#!/bin/sh
|
||||
command -v git-lfs >/dev/null 2>&1 || { echo >&2 "\nThis repository is configured for Git LFS but 'git-lfs' was not found on your path. If you no longer wish to use Git LFS, remove this hook by deleting .git/hooks/post-merge.\n"; exit 2; }
|
||||
git lfs post-merge "$@"
|
5
.github/prehooks/pre-commit
vendored
5
.github/prehooks/pre-commit
vendored
@ -5,7 +5,7 @@ echo "Running pre-commit hook..."
|
||||
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
echo ">> Updating R documentation..."
|
||||
if command -v Rscript > /dev/null; then
|
||||
if "$(Rscript -e 'cat(all(c('"'roxygen2'"', '"'pkgload'"') %in% rownames(installed.packages())))')" == "TRUE"; then
|
||||
if [ "$(Rscript -e 'cat(all(c('"'roxygen2'"', '"'pkgload'"') %in% rownames(installed.packages())))')" = "TRUE" ]; then
|
||||
Rscript -e "suppressMessages(roxygen2::roxygenise())"
|
||||
currentpkg=`Rscript -e "cat(pkgload::pkg_name())"`
|
||||
git add man/*
|
||||
@ -59,6 +59,9 @@ git add DESCRIPTION
|
||||
|
||||
# set version number to NEWS file
|
||||
if [ -e "NEWS.md" ]; then
|
||||
if [ "$currentpkg" = "your" ]; then
|
||||
currentpkg=""
|
||||
fi
|
||||
sed -i -- "1s/.*/# ${currentpkg} ${currentversion}/" NEWS.md
|
||||
echo ">> - updated NEWS.md"
|
||||
# remove leftover on macOS
|
||||
|
71
.github/prehooks/pre-commit.save
vendored
Executable file
71
.github/prehooks/pre-commit.save
vendored
Executable file
@ -0,0 +1,71 @@
|
||||
#!/bin/sh
|
||||
|
||||
echo "Running pre-commit hook..."
|
||||
|
||||
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
echo ">> Updating R documentation..."
|
||||
if command -v Rscript > /dev/null; then
|
||||
if [ "$(Rscript -e 'cat(all(c('"'roxygen2'"', '"'pkgload'"') %in% rownames(installed.packages())))')" = "TRUE" ]; then
|
||||
Rscript -e "suppressMessages(roxygen2::roxygenise())"
|
||||
currentpkg=`Rscript -e "cat(pkgload::pkg_name())"`
|
||||
git add man/*
|
||||
echo ">> done."
|
||||
else
|
||||
echo ">> R packages 'roxygen2' and 'pkgload' are not installed!"
|
||||
currentpkg="your"
|
||||
fi
|
||||
else
|
||||
echo ">> R is not available on your system!"
|
||||
currentpkg="your"
|
||||
fi
|
||||
echo ">> "
|
||||
|
||||
|
||||
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
echo ">> Updating semantic versioning and date..."
|
||||
|
||||
# get tags from remote, and remove tags not on remote:
|
||||
git fetch origin --prune --prune-tags --quiet
|
||||
currenttagfull=`git describe --tags --abbrev=0`
|
||||
currenttag=`git describe --tags --abbrev=0 | sed 's/v//'`
|
||||
if [ "$currenttag" = "" ]; then
|
||||
# there is no tag, so set tag to 0.0.1 and commit index to current count
|
||||
echo ">> - no git tags found, create some using v(x).(y).(z)"
|
||||
currenttag="0.0.1"
|
||||
currentcommit=`git rev-list --count HEAD`
|
||||
else
|
||||
# there is a tag, so base version number on that
|
||||
currentcommit=`git rev-list --count ${currenttagfull}..HEAD`
|
||||
if (( "$currentcommit" == 0 )); then
|
||||
# tag is new, so this must become the version number
|
||||
currentversion="$currenttag"
|
||||
fi
|
||||
echo ">> - latest tag is '${currenttagfull}', with ${currentcommit} previous commits"
|
||||
fi
|
||||
if [ "$currentversion" = "" ]; then
|
||||
# combine tag (e.g. 1.2.3) and commit number (like 5) increased by 9000 to indicate beta version
|
||||
currentversion="$currenttag.$((currentcommit + 9001))" # results in e.g. 1.2.3.9005
|
||||
fi
|
||||
echo ">> - ${currentpkg} pkg version set to ${currentversion}"
|
||||
|
||||
# set version number and date to DESCRIPTION file
|
||||
sed -i -- "s/^Version: .*/Version: ${currentversion}/" DESCRIPTION
|
||||
sed -i -- "s/^Date: .*/Date: $(date '+%Y-%m-%d')/" DESCRIPTION
|
||||
echo ">> - updated DESCRIPTION"
|
||||
# remove leftover on macOS
|
||||
rm -f DESCRIPTION--
|
||||
# add to commit
|
||||
git add DESCRIPTION
|
||||
|
||||
# set version number to NEWS file
|
||||
if [ -e "NEWS.md" ]; then
|
||||
sed -i -- "1s/.*/# ${currentpkg} ${currentversion}/" NEWS.md
|
||||
echo ">> - updated NEWS.md"
|
||||
# remove leftover on macOS
|
||||
rm -f NEWS.md--
|
||||
# add to commit
|
||||
git add NEWS.md
|
||||
else
|
||||
echo ">> - no NEWS.md found!"
|
||||
fi
|
||||
echo ">> "
|
3
.github/prehooks/pre-push
vendored
Executable file
3
.github/prehooks/pre-push
vendored
Executable file
@ -0,0 +1,3 @@
|
||||
#!/bin/sh
|
||||
command -v git-lfs >/dev/null 2>&1 || { echo >&2 "\nThis repository is configured for Git LFS but 'git-lfs' was not found on your path. If you no longer wish to use Git LFS, remove this hook by deleting .git/hooks/pre-push.\n"; exit 2; }
|
||||
git lfs pre-push "$@"
|
@ -1,6 +1,6 @@
|
||||
Package: AMR
|
||||
Version: 1.8.1.9026
|
||||
Date: 2022-08-25
|
||||
Version: 1.8.1.9027
|
||||
Date: 2022-08-26
|
||||
Title: Antimicrobial Resistance Data Analysis
|
||||
Description: Functions to simplify and standardise antimicrobial resistance (AMR)
|
||||
data analysis and to work with microbial and antimicrobial properties by
|
||||
|
2
NEWS.md
2
NEWS.md
@ -1,4 +1,4 @@
|
||||
# your 1.8.1.9026
|
||||
# AMR 1.8.1.9027
|
||||
|
||||
### New
|
||||
* EUCAST 2022 and CLSI 2022 guidelines have been added for `as.rsi()`. EUCAST 2022 is now the new default guideline for all MIC and disks diffusion interpretations.
|
||||
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -25,7 +25,7 @@ knitr::opts_chunk$set(
|
||||
library(AMR)
|
||||
library(dplyr)
|
||||
|
||||
options(knitr.kable.NA = '')
|
||||
options(knitr.kable.NA = "")
|
||||
|
||||
structure_txt <- function(dataset) {
|
||||
paste0("A data set with ",
|
||||
@ -94,8 +94,6 @@ All reference data (about microorganisms, antibiotics, R/SI interpretation, EUCA
|
||||
|
||||
On this page, we explain how to download them and how the structure of the data sets look like.
|
||||
|
||||
<p class="dataset-within-r">If you are reading this page from within R, please <a href="https://msberends.github.io/AMR/articles/datasets.html">visit our website</a>, which is automatically updated with every code change.</p>
|
||||
|
||||
## Microorganisms (currently accepted names)
|
||||
|
||||
`r structure_txt(microorganisms)`
|
||||
@ -104,8 +102,6 @@ This data set is in R available as `microorganisms`, after you load the `AMR` pa
|
||||
|
||||
`r download_txt("microorganisms")`
|
||||
|
||||
**NOTE: The exported files for SAS, SPSS and Stata do not contain SNOMED codes, as their file size would exceed 100 MB; the file size limit of GitHub.** Advice? Use R instead.
|
||||
|
||||
### Source
|
||||
|
||||
Our full taxonomy of microorganisms is based on the authoritative and comprehensive:
|
||||
|
Loading…
Reference in New Issue
Block a user