1
0
mirror of https://github.com/msberends/AMR.git synced 2024-12-28 04:46:11 +01:00

Compare commits

..

No commits in common. "f424c39474f9a247bc5e27057837fba4cd772347" and "11b1dc2b02ddc87f60e99b17e14839577630a0df" have entirely different histories.

8 changed files with 20 additions and 69052 deletions

View File

@ -49,6 +49,7 @@ 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/*
@ -111,8 +112,4 @@ 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}"
git add data-raw/*
exit 0 exit 0

View File

@ -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/*

View File

@ -1,6 +1,6 @@
Package: AMR Package: AMR
Version: 2.1.1.9103 Version: 2.1.1.9100
Date: 2024-10-18 Date: 2024-10-17
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

View File

@ -1,4 +1,4 @@
# AMR 2.1.1.9103 # AMR 2.1.1.9100
*(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
View File

@ -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 %or% NA_character_) guideline <- vapply(FUN.VALUE = character(1), lst, function(x) attributes(x)$guideline %||% NA_character_)
mo <- vapply(FUN.VALUE = character(1), lst, function(x) attributes(x)$mo %or% NA_character_) mo <- vapply(FUN.VALUE = character(1), lst, function(x) attributes(x)$mo %||% NA_character_)
ab <- vapply(FUN.VALUE = character(1), lst, function(x) attributes(x)$ab %or% NA_character_) ab <- vapply(FUN.VALUE = character(1), lst, function(x) attributes(x)$ab %||% NA_character_)
method <- vapply(FUN.VALUE = character(1), lst, function(x) attributes(x)$method %or% NA_character_) method <- vapply(FUN.VALUE = character(1), lst, function(x) attributes(x)$method %||% NA_character_)
ref_tbl <- vapply(FUN.VALUE = character(1), lst, function(x) attributes(x)$ref_tbl %or% NA_character_) ref_tbl <- vapply(FUN.VALUE = character(1), lst, function(x) attributes(x)$ref_tbl %||% NA_character_)
ref_breakpoints <- vapply(FUN.VALUE = character(1), lst, function(x) attributes(x)$ref_breakpoints %or% NA_character_) ref_breakpoints <- vapply(FUN.VALUE = character(1), lst, function(x) attributes(x)$ref_breakpoints %||% NA_character_)
out <- as.sir(unlist(lapply(list(...), as.character))) out <- as.sir(unlist(lapply(list(...), as.character)))

View File

@ -7,11 +7,10 @@ if [ "$(basename "$PWD")" != "AMR" ]; then
fi fi
# Define the output file, located in ./data-raw # Define the output file, located in ./data-raw
version="$1" output_file="data-raw/gpt_training_text.txt"
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 # ======)
@ -21,7 +20,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 PART HEREAFTER CONTAINS CONTENTS FROM FILE $file" >> "$output_file" echo "THE NEXT PART 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"
@ -29,7 +28,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 PART HEREAFTER CONTAINS CONTENTS FROM FILE $file" >> "$output_file" echo "THE NEXT PART 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"
@ -38,7 +37,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 PART HEREAFTER CONTAINS CONTENTS FROM FILE $file" >> "$output_file" echo "THE NEXT PART 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"
@ -47,7 +46,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 PART HEREAFTER CONTAINS CONTENTS FROM FILE $file" >> "$output_file" echo "THE NEXT PART 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"
@ -55,7 +54,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 PART HEREAFTER CONTAINS CONTENTS FROM FILE $file" >> "$output_file" echo "THE NEXT PART 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"

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long