-
-
Notifications
You must be signed in to change notification settings - Fork 73
Open
Labels
✨ goal: improvementImprovement to an existing featureImprovement to an existing feature🏁 status: ready for workReady for workReady for work💻 aspect: codeConcerns the software code in the repositoryConcerns the software code in the repository🟨 priority: mediumNot blocking but should be fixed soonNot blocking but should be fixed soon
Description
Description
The existing shared function used by process scripts:
Lines 39 to 46 in dae9e83
| def check_for_data_files(args, file_paths, QUARTER): | |
| if args.force: | |
| return | |
| for path in file_paths: | |
| if os.path.exists(path): | |
| raise QuantifyingException( | |
| f"Processed data already exists for {QUARTER}", 0 | |
| ) |
and the report functions, for example:
quantifying/scripts/3-report/gcs_report.py
Lines 78 to 92 in dae9e83
| def check_report_completion(args): | |
| """ " | |
| The function checks for the last plot and image | |
| caption created in this script. This helps to | |
| immediately know if all plots in the script have | |
| been created and should not be regenerated. | |
| """ | |
| if args.force: | |
| return | |
| last_entry = shared.path_join(PATHS["data_phase"], "gcs_free_culture.png") | |
| if os.path.exists(last_entry): | |
| raise shared.QuantifyingException( | |
| f"{last_entry} already exists. Report script completed", 0 | |
| ) |
can be combined into a single shared function that serves both needs.
- rename shared function to something like
check_completion_file_existsinstead ofcheck_for_data_files - add a docstring
- update message to be more generic
- remember you can use
args.quarterinstead of a dedicatedQUARTERargument - remember
file_pathslist can contain a single path
Implementation
- I would be interested in implementing this feature.
Metadata
Metadata
Assignees
Labels
✨ goal: improvementImprovement to an existing featureImprovement to an existing feature🏁 status: ready for workReady for workReady for work💻 aspect: codeConcerns the software code in the repositoryConcerns the software code in the repository🟨 priority: mediumNot blocking but should be fixed soonNot blocking but should be fixed soon
Type
Projects
Status
Backlog