mirror of
https://github.com/msberends/AMR.git
synced 2024-12-26 05:26:13 +01:00
(v2.1.1.9102) fix sir
This commit is contained in:
parent
11b1dc2b02
commit
da6321c504
4
.github/prehooks/pre-commit
vendored
4
.github/prehooks/pre-commit
vendored
@ -49,7 +49,6 @@ if command -v Rscript > /dev/null; then
|
|||||||
if [ "$(Rscript -e 'cat(all(c('"'pkgload'"', '"'devtools'"', '"'dplyr'"') %in% rownames(installed.packages())))')" = "TRUE" ]; then
|
if [ "$(Rscript -e 'cat(all(c('"'pkgload'"', '"'devtools'"', '"'dplyr'"') %in% rownames(installed.packages())))')" = "TRUE" ]; then
|
||||||
Rscript -e "source('data-raw/_pre_commit_checks.R')"
|
Rscript -e "source('data-raw/_pre_commit_checks.R')"
|
||||||
currentpkg=$(Rscript -e "cat(pkgload::pkg_name())")
|
currentpkg=$(Rscript -e "cat(pkgload::pkg_name())")
|
||||||
bash data-raw/AMRforRGPT.sh
|
|
||||||
echo "- Adding changed files in ./data-raw and ./man to this commit"
|
echo "- Adding changed files in ./data-raw and ./man to this commit"
|
||||||
git add data-raw/*
|
git add data-raw/*
|
||||||
git add man/*
|
git add man/*
|
||||||
@ -112,4 +111,7 @@ echo ""
|
|||||||
# Save the version number for use in the commit-msg hook
|
# Save the version number for use in the commit-msg hook
|
||||||
echo "${currentversion}" > .git/commit_version.tmp
|
echo "${currentversion}" > .git/commit_version.tmp
|
||||||
|
|
||||||
|
# Generate GPT knowledge info for our Assistant (https://chatgpt.com/g/g-M4UNLwFi5-amr-for-r-assistant)
|
||||||
|
bash data-raw/_generate_GPT_knowledge_input.sh "${currentversion}"
|
||||||
|
|
||||||
exit 0
|
exit 0
|
||||||
|
6
.github/workflows/publish-to-pypi.yml
vendored
6
.github/workflows/publish-to-pypi.yml
vendored
@ -59,9 +59,9 @@ jobs:
|
|||||||
bash _generate_python_wrapper.sh
|
bash _generate_python_wrapper.sh
|
||||||
|
|
||||||
- name: Publish to PyPI
|
- name: Publish to PyPI
|
||||||
# env:
|
env:
|
||||||
# TWINE_USERNAME: "__token__"
|
TWINE_USERNAME: "__token__"
|
||||||
# TWINE_PASSWORD: ${{ secrets.PYPI_API_TOKEN }}
|
TWINE_PASSWORD: ${{ secrets.PYPI_API_TOKEN }}
|
||||||
run: |
|
run: |
|
||||||
cd data-raw/python_wrapper/AMR
|
cd data-raw/python_wrapper/AMR
|
||||||
python -m twine upload dist/*
|
python -m twine upload dist/*
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
Package: AMR
|
Package: AMR
|
||||||
Version: 2.1.1.9100
|
Version: 2.1.1.9102
|
||||||
Date: 2024-10-17
|
Date: 2024-10-18
|
||||||
Title: Antimicrobial Resistance Data Analysis
|
Title: Antimicrobial Resistance Data Analysis
|
||||||
Description: Functions to simplify and standardise antimicrobial resistance (AMR)
|
Description: Functions to simplify and standardise antimicrobial resistance (AMR)
|
||||||
data analysis and to work with microbial and antimicrobial properties by
|
data analysis and to work with microbial and antimicrobial properties by
|
||||||
|
2
NEWS.md
2
NEWS.md
@ -1,4 +1,4 @@
|
|||||||
# AMR 2.1.1.9100
|
# AMR 2.1.1.9102
|
||||||
|
|
||||||
*(this beta version will eventually become v3.0. We're happy to reach a new major milestone soon, which will be all about the new One Health support! Install this beta using [the instructions here](https://msberends.github.io/AMR/#latest-development-version).)*
|
*(this beta version will eventually become v3.0. We're happy to reach a new major milestone soon, which will be all about the new One Health support! Install this beta using [the instructions here](https://msberends.github.io/AMR/#latest-development-version).)*
|
||||||
|
|
||||||
|
12
R/sir.R
12
R/sir.R
@ -1739,12 +1739,12 @@ summary.sir <- function(object, ...) {
|
|||||||
c.sir <- function(...) {
|
c.sir <- function(...) {
|
||||||
lst <- list(...)
|
lst <- list(...)
|
||||||
|
|
||||||
guideline <- vapply(FUN.VALUE = character(1), lst, function(x) attributes(x)$guideline %||% NA_character_)
|
guideline <- vapply(FUN.VALUE = character(1), lst, function(x) attributes(x)$guideline %or% NA_character_)
|
||||||
mo <- vapply(FUN.VALUE = character(1), lst, function(x) attributes(x)$mo %||% NA_character_)
|
mo <- vapply(FUN.VALUE = character(1), lst, function(x) attributes(x)$mo %or% NA_character_)
|
||||||
ab <- vapply(FUN.VALUE = character(1), lst, function(x) attributes(x)$ab %||% NA_character_)
|
ab <- vapply(FUN.VALUE = character(1), lst, function(x) attributes(x)$ab %or% NA_character_)
|
||||||
method <- vapply(FUN.VALUE = character(1), lst, function(x) attributes(x)$method %||% NA_character_)
|
method <- vapply(FUN.VALUE = character(1), lst, function(x) attributes(x)$method %or% NA_character_)
|
||||||
ref_tbl <- vapply(FUN.VALUE = character(1), lst, function(x) attributes(x)$ref_tbl %||% NA_character_)
|
ref_tbl <- vapply(FUN.VALUE = character(1), lst, function(x) attributes(x)$ref_tbl %or% NA_character_)
|
||||||
ref_breakpoints <- vapply(FUN.VALUE = character(1), lst, function(x) attributes(x)$ref_breakpoints %||% NA_character_)
|
ref_breakpoints <- vapply(FUN.VALUE = character(1), lst, function(x) attributes(x)$ref_breakpoints %or% NA_character_)
|
||||||
|
|
||||||
out <- as.sir(unlist(lapply(list(...), as.character)))
|
out <- as.sir(unlist(lapply(list(...), as.character)))
|
||||||
|
|
||||||
|
@ -7,10 +7,11 @@ if [ "$(basename "$PWD")" != "AMR" ]; then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
# Define the output file, located in ./data-raw
|
# Define the output file, located in ./data-raw
|
||||||
output_file="data-raw/gpt_training_text.txt"
|
version="$1"
|
||||||
|
output_file="data-raw/gpt_training_text_v${version}.txt"
|
||||||
|
|
||||||
# Clear the output file if it exists
|
# Clear the output file if it exists
|
||||||
echo "This files contains all context you must know about the AMR package for R."> "$output_file"
|
echo "This files contains all context you must know about the AMR package for R." > "$output_file"
|
||||||
echo -e "\n\n\n\n" >> "$output_file"
|
echo -e "\n\n\n\n" >> "$output_file"
|
||||||
|
|
||||||
# Function to remove header block (delimited by # ======)
|
# Function to remove header block (delimited by # ======)
|
||||||
@ -20,7 +21,7 @@ remove_header() {
|
|||||||
|
|
||||||
# Process all .R files in the 'R' folder
|
# Process all .R files in the 'R' folder
|
||||||
for file in R/*.R; do
|
for file in R/*.R; do
|
||||||
echo "THE NEXT PART CONTAINS CONTENTS FROM FILE $file" >> "$output_file"
|
echo "THE PART HEREAFTER CONTAINS CONTENTS FROM FILE $file" >> "$output_file"
|
||||||
echo -e "\n\n" >> "$output_file"
|
echo -e "\n\n" >> "$output_file"
|
||||||
remove_header "$file" >> "$output_file"
|
remove_header "$file" >> "$output_file"
|
||||||
echo -e "\n\n" >> "$output_file"
|
echo -e "\n\n" >> "$output_file"
|
||||||
@ -28,7 +29,7 @@ done
|
|||||||
|
|
||||||
# Process all .Rmd files in the 'vignettes' folder
|
# Process all .Rmd files in the 'vignettes' folder
|
||||||
for file in vignettes/*.Rmd; do
|
for file in vignettes/*.Rmd; do
|
||||||
echo "THE NEXT PART CONTAINS CONTENTS FROM FILE $file" >> "$output_file"
|
echo "THE PART HEREAFTER CONTAINS CONTENTS FROM FILE $file" >> "$output_file"
|
||||||
echo -e "\n\n" >> "$output_file"
|
echo -e "\n\n" >> "$output_file"
|
||||||
remove_header "$file" >> "$output_file"
|
remove_header "$file" >> "$output_file"
|
||||||
echo -e "\n\n" >> "$output_file"
|
echo -e "\n\n" >> "$output_file"
|
||||||
@ -37,7 +38,7 @@ done
|
|||||||
# Process important metadata files (DESCRIPTION, NAMESPACE, index.md)
|
# Process important metadata files (DESCRIPTION, NAMESPACE, index.md)
|
||||||
for file in DESCRIPTION NAMESPACE index.md; do
|
for file in DESCRIPTION NAMESPACE index.md; do
|
||||||
if [[ -f $file ]]; then
|
if [[ -f $file ]]; then
|
||||||
echo "THE NEXT PART CONTAINS CONTENTS FROM FILE $file" >> "$output_file"
|
echo "THE PART HEREAFTER CONTAINS CONTENTS FROM FILE $file" >> "$output_file"
|
||||||
echo -e "\n\n" >> "$output_file"
|
echo -e "\n\n" >> "$output_file"
|
||||||
cat "$file" >> "$output_file"
|
cat "$file" >> "$output_file"
|
||||||
echo -e "\n\n" >> "$output_file"
|
echo -e "\n\n" >> "$output_file"
|
||||||
@ -46,7 +47,7 @@ done
|
|||||||
|
|
||||||
# Process test files (if available) in the 'tests' folder
|
# Process test files (if available) in the 'tests' folder
|
||||||
for file in tests/*.R; do
|
for file in tests/*.R; do
|
||||||
echo "THE NEXT PART CONTAINS CONTENTS FROM FILE $file" >> "$output_file"
|
echo "THE PART HEREAFTER CONTAINS CONTENTS FROM FILE $file" >> "$output_file"
|
||||||
echo -e "\n\n" >> "$output_file"
|
echo -e "\n\n" >> "$output_file"
|
||||||
remove_header "$file" >> "$output_file"
|
remove_header "$file" >> "$output_file"
|
||||||
echo -e "\n\n" >> "$output_file"
|
echo -e "\n\n" >> "$output_file"
|
||||||
@ -54,7 +55,7 @@ done
|
|||||||
|
|
||||||
# Process all .Rd files from the 'man' folder
|
# Process all .Rd files from the 'man' folder
|
||||||
for file in man/*.Rd; do
|
for file in man/*.Rd; do
|
||||||
echo "THE NEXT PART CONTAINS CONTENTS FROM FILE $file" >> "$output_file"
|
echo "THE PART HEREAFTER CONTAINS CONTENTS FROM FILE $file" >> "$output_file"
|
||||||
echo -e "\n\n" >> "$output_file"
|
echo -e "\n\n" >> "$output_file"
|
||||||
remove_header "$file" >> "$output_file"
|
remove_header "$file" >> "$output_file"
|
||||||
echo -e "\n\n" >> "$output_file"
|
echo -e "\n\n" >> "$output_file"
|
Loading…
Reference in New Issue
Block a user