AI-SDC / ACRO

Tools for the Automatic Checking of Research Outputs. These are the tools for researchers to use as drop-in replacements for commands that produce outputs in Stata Python and R

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Finalise should checker whether the user-provided folder exists to avoid confusion with outputs from existing sessions

jim-smith opened this issue · comments

and prompt for a new name if the folder does exist

Here in finalise:

try:
with open(config_filename, "w", newline="", encoding="utf-8") as file:
json.dump(self.config, file, indent=4, sort_keys=False)
except FileNotFoundError: # pragma: no cover
logger.debug(
"The config file will not be created because the "
"output folder was not created as the acro object was empty."
)
return self.results