refactor: прячем временные файлы в отдельную папку

This commit is contained in:
2026-06-15 16:18:56 +03:00
parent a0340d78e5
commit 2ececc8029
5 changed files with 28 additions and 5 deletions

1
.gitignore vendored
View File

@@ -3,7 +3,6 @@
/_devel /_devel
/all_bases /all_bases
scheme.rds
config.yml config.yml
.Renviron .Renviron

2
app.R
View File

@@ -39,7 +39,7 @@ enabled_schemes <- unlist(config::get()$form_schemes)
enabled_schemes <- setNames(names(enabled_schemes), enabled_schemes) enabled_schemes <- setNames(names(enabled_schemes), enabled_schemes)
# load schemes object: # load schemes object:
schms <- readRDS("scheme.rds") schms <- readRDS("temp/scheme.rds")
# CHECK FOR PANDOC ---------- # CHECK FOR PANDOC ----------
# rmarkdown::find_pandoc(dir = "/opt/homebrew/bin/") # rmarkdown::find_pandoc(dir = "/opt/homebrew/bin/")

View File

@@ -75,7 +75,7 @@ check_and_init_scheme = function() {
exist_hash <- tools::md5sum(c(scheme_file, files_to_watch)) exist_hash <- tools::md5sum(c(scheme_file, files_to_watch))
# если первый запуск (нет файла с кешем) инициализация схемы # если первый запуск (нет файла с кешем) инициализация схемы
if (!file.exists(hash_file) | !file.exists("scheme.rds") | !all(file.exists(db_files))) { if (!file.exists(hash_file) | !file.exists("temp/scheme.rds") | !all(file.exists(db_files))) {
init_scheme(scheme_file) init_scheme(scheme_file)
@@ -155,5 +155,5 @@ init_scheme = function(scheme_file) {
cli::cli_abort(c("В одной или нескольких схемах наименования вложенных форм совпадают:", paste("-", names(tab)[tab > 1]))) cli::cli_abort(c("В одной или нескольких схемах наименования вложенных форм совпадают:", paste("-", names(tab)[tab > 1])))
} }
saveRDS(schms, "scheme.rds") saveRDS(schms, "temp/scheme.rds")
} }

View File

@@ -1,6 +1,6 @@
{ {
"R": { "R": {
"Version": "4.3.1", "Version": "4.3.2",
"Repositories": [ "Repositories": [
{ {
"Name": "CRAN", "Name": "CRAN",
@@ -717,6 +717,19 @@
], ],
"Hash": "b8552d117e1b808b09a832f589b79035" "Hash": "b8552d117e1b808b09a832f589b79035"
}, },
"lubridate": {
"Package": "lubridate",
"Version": "1.9.5",
"Source": "Repository",
"Repository": "CRAN",
"Requirements": [
"R",
"generics",
"methods",
"timechange"
],
"Hash": "07061b348d057e8ac86771e0eff36b62"
},
"magrittr": { "magrittr": {
"Package": "magrittr", "Package": "magrittr",
"Version": "2.0.3", "Version": "2.0.3",
@@ -1203,6 +1216,17 @@
], ],
"Hash": "79540e5fcd9e0435af547d885f184fd5" "Hash": "79540e5fcd9e0435af547d885f184fd5"
}, },
"timechange": {
"Package": "timechange",
"Version": "0.4.0",
"Source": "Repository",
"Repository": "CRAN",
"Requirements": [
"R",
"cpp11"
],
"Hash": "39c40cb1ad47a4cc384a34a22a29463f"
},
"tinytex": { "tinytex": {
"Package": "tinytex", "Package": "tinytex",
"Version": "0.46", "Version": "0.46",

BIN
test.xlsx

Binary file not shown.