mirror of
https://github.com/msberends/AMR.git
synced 2024-12-25 20:06:12 +01:00
(v2.1.1.9099) fix generating GPT training test
This commit is contained in:
parent
a9e753b1dc
commit
cfd31f0f0c
@ -1,5 +1,5 @@
|
||||
Package: AMR
|
||||
Version: 2.1.1.9098
|
||||
Version: 2.1.1.9099
|
||||
Date: 2024-10-17
|
||||
Title: Antimicrobial Resistance Data Analysis
|
||||
Description: Functions to simplify and standardise antimicrobial resistance (AMR)
|
||||
|
2
NEWS.md
2
NEWS.md
@ -1,4 +1,4 @@
|
||||
# AMR 2.1.1.9098
|
||||
# AMR 2.1.1.9099
|
||||
|
||||
*(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).)*
|
||||
|
||||
|
@ -1,7 +1,13 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Check if the current directory is named 'AMR'
|
||||
if [ "$(basename "$PWD")" != "AMR" ]; then
|
||||
echo "Error: The script must be run from the 'AMR' directory."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Define the output file, located in ./data-raw
|
||||
output_file="gpt_training_text.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"
|
||||
@ -12,16 +18,16 @@ remove_header() {
|
||||
sed '/# =\{6,\}/,/# =\{6,\}/d' "$1"
|
||||
}
|
||||
|
||||
# Process all .R files in the '../R' folder
|
||||
for file in ../R/*.R; do
|
||||
# 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 -e "\n\n" >> "$output_file"
|
||||
remove_header "$file" >> "$output_file"
|
||||
echo -e "\n\n" >> "$output_file"
|
||||
done
|
||||
|
||||
# Process all .Rmd files in the '../vignettes' folder
|
||||
for file in ../vignettes/*.Rmd; do
|
||||
# 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 -e "\n\n" >> "$output_file"
|
||||
remove_header "$file" >> "$output_file"
|
||||
@ -29,7 +35,7 @@ for file in ../vignettes/*.Rmd; do
|
||||
done
|
||||
|
||||
# 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
|
||||
echo "THE NEXT PART CONTAINS CONTENTS FROM FILE $file" >> "$output_file"
|
||||
echo -e "\n\n" >> "$output_file"
|
||||
@ -38,16 +44,16 @@ for file in ../DESCRIPTION ../NAMESPACE ../index.md; do
|
||||
fi
|
||||
done
|
||||
|
||||
# Process test files (if available) in the '../tests' folder
|
||||
for file in ../tests/*.R; do
|
||||
# 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 -e "\n\n" >> "$output_file"
|
||||
remove_header "$file" >> "$output_file"
|
||||
echo -e "\n\n" >> "$output_file"
|
||||
done
|
||||
|
||||
# Process all .Rd files from the '../man' folder
|
||||
for file in ../man/*.Rd; do
|
||||
# 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 -e "\n\n" >> "$output_file"
|
||||
remove_header "$file" >> "$output_file"
|
||||
|
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user