mirror of
https://github.com/msberends/AMR.git
synced 2024-12-27 12:06:14 +01:00
Compare commits
No commits in common. "f424c39474f9a247bc5e27057837fba4cd772347" and "11b1dc2b02ddc87f60e99b17e14839577630a0df" have entirely different histories.
f424c39474
...
11b1dc2b02
5
.github/prehooks/pre-commit
vendored
5
.github/prehooks/pre-commit
vendored
@ -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
|
||||
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/*
|
||||
@ -111,8 +112,4 @@ 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.9103
|
||||
Date: 2024-10-18
|
||||
Version: 2.1.1.9100
|
||||
Date: 2024-10-17
|
||||
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.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).)*
|
||||
|
||||
|
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 %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_)
|
||||
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_)
|
||||
|
||||
out <- as.sir(unlist(lapply(list(...), as.character)))
|
||||
|
||||
|
@ -7,11 +7,10 @@ if [ "$(basename "$PWD")" != "AMR" ]; then
|
||||
fi
|
||||
|
||||
# Define the output file, located in ./data-raw
|
||||
version="$1"
|
||||
output_file="data-raw/gpt_training_text_v${version}.txt"
|
||||
output_file="data-raw/gpt_training_text.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"
|
||||
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"
|
||||
|
||||
# Function to remove header block (delimited by # ======)
|
||||
@ -21,7 +20,7 @@ remove_header() {
|
||||
|
||||
# Process all .R files in the 'R' folder
|
||||
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"
|
||||
remove_header "$file" >> "$output_file"
|
||||
echo -e "\n\n" >> "$output_file"
|
||||
@ -29,7 +28,7 @@ done
|
||||
|
||||
# Process all .Rmd files in the 'vignettes' folder
|
||||
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"
|
||||
remove_header "$file" >> "$output_file"
|
||||
echo -e "\n\n" >> "$output_file"
|
||||
@ -38,7 +37,7 @@ done
|
||||
# Process important metadata files (DESCRIPTION, NAMESPACE, index.md)
|
||||
for file in DESCRIPTION NAMESPACE index.md; do
|
||||
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"
|
||||
cat "$file" >> "$output_file"
|
||||
echo -e "\n\n" >> "$output_file"
|
||||
@ -47,7 +46,7 @@ done
|
||||
|
||||
# Process test files (if available) in the 'tests' folder
|
||||
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"
|
||||
remove_header "$file" >> "$output_file"
|
||||
echo -e "\n\n" >> "$output_file"
|
||||
@ -55,7 +54,7 @@ done
|
||||
|
||||
# Process all .Rd files from the 'man' folder
|
||||
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"
|
||||
remove_header "$file" >> "$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
Loading…
Reference in New Issue
Block a user