mirror of
https://github.com/msberends/AMR.git
synced 2025-04-22 06:43:45 +02:00
(v2.1.1.9244) automated GPT training data
This commit is contained in:
parent
ca00ed468e
commit
492fe6872f
2
.github/prehooks/pre-commit
vendored
2
.github/prehooks/pre-commit
vendored
@ -111,8 +111,6 @@ 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://chat.amr-for-r.org)
|
|
||||||
bash data-raw/_generate_GPT_knowledge_input.sh "${currentversion}"
|
|
||||||
git add data-raw/*
|
git add data-raw/*
|
||||||
git add -u
|
git add -u
|
||||||
|
|
||||||
|
1
.github/workflows/publish-to-pypi.yml
vendored
1
.github/workflows/publish-to-pypi.yml
vendored
@ -93,5 +93,4 @@ jobs:
|
|||||||
git rm -rf . || true
|
git rm -rf . || true
|
||||||
git add .
|
git add .
|
||||||
git commit -m "Python wrapper update"
|
git commit -m "Python wrapper update"
|
||||||
# git push origin python-wrapper --force
|
|
||||||
git push https://$PYPI_PAT@github.com/msberends/AMR.git python-wrapper --force
|
git push https://$PYPI_PAT@github.com/msberends/AMR.git python-wrapper --force
|
||||||
|
67
.github/workflows/renew-gpt-training-data.yml
vendored
Normal file
67
.github/workflows/renew-gpt-training-data.yml
vendored
Normal file
@ -0,0 +1,67 @@
|
|||||||
|
# ==================================================================== #
|
||||||
|
# TITLE: #
|
||||||
|
# AMR: An R Package for Working with Antimicrobial Resistance Data #
|
||||||
|
# #
|
||||||
|
# SOURCE CODE: #
|
||||||
|
# https://github.com/msberends/AMR #
|
||||||
|
# #
|
||||||
|
# PLEASE CITE THIS SOFTWARE AS: #
|
||||||
|
# Berends MS, Luz CF, Friedrich AW, et al. (2022). #
|
||||||
|
# AMR: An R Package for Working with Antimicrobial Resistance Data. #
|
||||||
|
# Journal of Statistical Software, 104(3), 1-31. #
|
||||||
|
# https://doi.org/10.18637/jss.v104.i03 #
|
||||||
|
# #
|
||||||
|
# Developed at the University of Groningen and the University Medical #
|
||||||
|
# Center Groningen in The Netherlands, in collaboration with many #
|
||||||
|
# colleagues from around the world, see our website. #
|
||||||
|
# #
|
||||||
|
# This R package is free software; you can freely use and distribute #
|
||||||
|
# it for both personal and commercial purposes under the terms of the #
|
||||||
|
# GNU General Public License version 2.0 (GNU GPL-2), as published by #
|
||||||
|
# the Free Software Foundation. #
|
||||||
|
# We created this package for both routine data analysis and academic #
|
||||||
|
# research and it was publicly released in the hope that it will be #
|
||||||
|
# useful, but it comes WITHOUT ANY WARRANTY OR LIABILITY. #
|
||||||
|
# #
|
||||||
|
# Visit our website for the full manual and a complete tutorial about #
|
||||||
|
# how to conduct AMR data analysis: https://amr-for-r.org #
|
||||||
|
# ==================================================================== #
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
# only on main
|
||||||
|
branches: "main"
|
||||||
|
|
||||||
|
name: Publish GPT Training Data to GitHub
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
update-pypi:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
|
env:
|
||||||
|
PYPI_PAT: ${{ secrets.PYPI_PAT }}
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: Checkout code
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
|
- name: Build the training data
|
||||||
|
run: |
|
||||||
|
cd data-raw/
|
||||||
|
bash _generate_GPT_knowledge_input.sh
|
||||||
|
|
||||||
|
- name: Git push to amr-for-r-assistant repo
|
||||||
|
run: |
|
||||||
|
mkdir ~/other
|
||||||
|
# to also mv hidden files:
|
||||||
|
shopt -s dotglob
|
||||||
|
mv ./* ~/other/
|
||||||
|
git clone https://github.com/msberends/amr-for-r-assistant
|
||||||
|
cd amr-for-r-assistant
|
||||||
|
mv ~/other/data-raw/latest_training_data.txt ./
|
||||||
|
|
||||||
|
git config user.name "github-actions[bot]"
|
||||||
|
git config user.email "github-actions[bot]@users.noreply.github.com"
|
||||||
|
git add latest_training_data.txt
|
||||||
|
git commit -m "GPT training data update"
|
||||||
|
git push https://$PYPI_PAT@github.com/msberends/amr-for-r-assistant.git main --force
|
@ -1,6 +1,6 @@
|
|||||||
Package: AMR
|
Package: AMR
|
||||||
Version: 2.1.1.9243
|
Version: 2.1.1.9244
|
||||||
Date: 2025-04-18
|
Date: 2025-04-19
|
||||||
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.9243
|
# AMR 2.1.1.9244
|
||||||
|
|
||||||
*(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://amr-for-r.org/#get-this-package).)*
|
*(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://amr-for-r.org/#get-this-package).)*
|
||||||
|
|
||||||
|
@ -6,11 +6,11 @@ if [ "$(basename "$PWD")" != "AMR" ]; then
|
|||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
rm -rf data-raw/gpt_training_text_v*
|
rm data-raw/latest_training_data.txt
|
||||||
|
|
||||||
# Define the output file, located in ./data-raw
|
# Define the output file, located in ./data-raw
|
||||||
version="$1"
|
version="$1"
|
||||||
output_file="data-raw/gpt_training_text_v${version}.txt"
|
output_file="data-raw/latest_training_data.txt"
|
||||||
|
|
||||||
# Clear the output file if it exists
|
# Clear the output file if it exists
|
||||||
echo "This knowledge base contains all context you must know about the AMR package for R. You are a GPT trained to be an assistant for the AMR package in R. You are an incredible R specialist, especially trained in this package and in the tidyverse." > "$output_file"
|
echo "This knowledge base contains all context you must know about the AMR package for R. You are a GPT trained to be an assistant for the AMR package in R. You are an incredible R specialist, especially trained in this package and in the tidyverse." > "$output_file"
|
||||||
|
File diff suppressed because one or more lines are too long
@ -75,7 +75,7 @@ test_that("test-sir.R", {
|
|||||||
)
|
)
|
||||||
expect_error(as.sir.mic(as.mic(16)))
|
expect_error(as.sir.mic(as.mic(16)))
|
||||||
expect_error(as.sir.disk(as.disk(16)))
|
expect_error(as.sir.disk(as.disk(16)))
|
||||||
expect_error(get_guideline("this one does not exist"))
|
expect_error(AMR:::get_guideline("this one does not exist"))
|
||||||
|
|
||||||
if (AMR:::pkg_is_available("dplyr", min_version = "1.0.0", also_load = TRUE)) {
|
if (AMR:::pkg_is_available("dplyr", min_version = "1.0.0", also_load = TRUE)) {
|
||||||
# 40 sir columns
|
# 40 sir columns
|
||||||
@ -128,7 +128,7 @@ test_that("test-sir.R", {
|
|||||||
|
|
||||||
# allow for guideline length > 1
|
# allow for guideline length > 1
|
||||||
expect_equal(
|
expect_equal(
|
||||||
get_guideline(c("CLSI", "CLSI", "CLSI2023", "EUCAST", "EUCAST2020"), AMR::clinical_breakpoints),
|
AMR:::get_guideline(c("CLSI", "CLSI", "CLSI2023", "EUCAST", "EUCAST2020"), AMR::clinical_breakpoints),
|
||||||
c("CLSI 2024", "CLSI 2024", "CLSI 2023", "EUCAST 2024", "EUCAST 2020")
|
c("CLSI 2024", "CLSI 2024", "CLSI 2023", "EUCAST 2024", "EUCAST 2020")
|
||||||
)
|
)
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user