mirror of
https://github.com/msberends/AMR.git
synced 2024-12-26 08:06:12 +01:00
Compare commits
2 Commits
11b1dc2b02
...
f424c39474
Author | SHA1 | Date | |
---|---|---|---|
f424c39474 | |||
da6321c504 |
5
.github/prehooks/pre-commit
vendored
5
.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
|
||||
Rscript -e "source('data-raw/_pre_commit_checks.R')"
|
||||
currentpkg=$(Rscript -e "cat(pkgload::pkg_name())")
|
||||
bash data-raw/AMRforRGPT.sh
|
||||
echo "- Adding changed files in ./data-raw and ./man to this commit"
|
||||
git add data-raw/*
|
||||
git add man/*
|
||||
@ -112,4 +111,8 @@ echo ""
|
||||
# Save the version number for use in the commit-msg hook
|
||||
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
|
||||
|
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
|
||||
|
||||
- name: Publish to PyPI
|
||||
# env:
|
||||
# TWINE_USERNAME: "__token__"
|
||||
# TWINE_PASSWORD: ${{ secrets.PYPI_API_TOKEN }}
|
||||
env:
|
||||
TWINE_USERNAME: "__token__"
|
||||
TWINE_PASSWORD: ${{ secrets.PYPI_API_TOKEN }}
|
||||
run: |
|
||||
cd data-raw/python_wrapper/AMR
|
||||
python -m twine upload dist/*
|
||||
|
@ -1,6 +1,6 @@
|
||||
Package: AMR
|
||||
Version: 2.1.1.9100
|
||||
Date: 2024-10-17
|
||||
Version: 2.1.1.9103
|
||||
Date: 2024-10-18
|
||||
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 @@
|
||||
# AMR 2.1.1.9100
|
||||
# AMR 2.1.1.9103
|
||||
|
||||
*(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(...) {
|
||||
lst <- list(...)
|
||||
|
||||
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 %||% 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 %||% 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 %||% 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 %or% 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 %or% 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 %or% NA_character_)
|
||||
|
||||
out <- as.sir(unlist(lapply(list(...), as.character)))
|
||||
|
||||
|
@ -7,7 +7,8 @@ if [ "$(basename "$PWD")" != "AMR" ]; then
|
||||
fi
|
||||
|
||||
# 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
|
||||
echo "This files contains all context you must know about the AMR package for R." > "$output_file"
|
||||
@ -20,7 +21,7 @@ remove_header() {
|
||||
|
||||
# Process all .R files in the 'R' folder
|
||||
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"
|
||||
remove_header "$file" >> "$output_file"
|
||||
echo -e "\n\n" >> "$output_file"
|
||||
@ -28,7 +29,7 @@ done
|
||||
|
||||
# Process all .Rmd files in the 'vignettes' folder
|
||||
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"
|
||||
remove_header "$file" >> "$output_file"
|
||||
echo -e "\n\n" >> "$output_file"
|
||||
@ -37,7 +38,7 @@ done
|
||||
# Process important metadata files (DESCRIPTION, NAMESPACE, index.md)
|
||||
for file in DESCRIPTION NAMESPACE index.md; do
|
||||
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"
|
||||
cat "$file" >> "$output_file"
|
||||
echo -e "\n\n" >> "$output_file"
|
||||
@ -46,7 +47,7 @@ done
|
||||
|
||||
# Process test files (if available) in the 'tests' folder
|
||||
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"
|
||||
remove_header "$file" >> "$output_file"
|
||||
echo -e "\n\n" >> "$output_file"
|
||||
@ -54,7 +55,7 @@ done
|
||||
|
||||
# Process all .Rd files from the 'man' folder
|
||||
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"
|
||||
remove_header "$file" >> "$output_file"
|
||||
echo -e "\n\n" >> "$output_file"
|
34514
data-raw/gpt_training_text_v2.1.1.9102.txt
Normal file
34514
data-raw/gpt_training_text_v2.1.1.9102.txt
Normal file
File diff suppressed because one or more lines are too long
34514
data-raw/gpt_training_text_v2.1.1.9103.txt
Normal file
34514
data-raw/gpt_training_text_v2.1.1.9103.txt
Normal file
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue
Block a user