In data_pipeline.main() we were configuring the root logger to log to results_folder(f"{year}/data_quality_metrics/data_pipeline.log") as one of the first lines of code. However, in the next block of code we remove the results folder if it already exists:
if os.path.exists(results_folder(f"{path_prefix}")):
shutil.rmtree(results_folder(f"{path_prefix}"))
However, this was raising the following error:
PermissionError: [WinError 32] The process cannot access the file because it is being used by another process: 'A:\\GitHub\\open-grid-emissions\\data\\results\\2019/data_quality_metrics\\data_pipeline.log'
This PR moves the logging configuration after the block of code that sets up the directory structure to avoid this error.
I have also tacked on a small update to the CITATION.CFF file for the most recent version.
NOTE: I am proposing that we merge this directly into main instead of dev since this is a bug fix that does not affect any of the outputs. I would merge this into main without doing another versioned release for now.
In
data_pipeline.main()
we were configuring the root logger to log toresults_folder(f"{year}/data_quality_metrics/data_pipeline.log")
as one of the first lines of code. However, in the next block of code we remove the results folder if it already exists:However, this was raising the following error:
This PR moves the logging configuration after the block of code that sets up the directory structure to avoid this error.
I have also tacked on a small update to the
CITATION.CFF
file for the most recent version.NOTE: I am proposing that we merge this directly into
main
instead ofdev
since this is a bug fix that does not affect any of the outputs. I would merge this into main without doing another versioned release for now.