Smithsonian / Smithsonian/caas-aspace-scripts
[FEATURE] Add check_log and check_data Functions to utilities.py
@crugas is already working on this.
Since Apr 26, 2025.
- Dominant language
- Python
- Stars
- 1
- Forks
- 0
- Avg merge
- 4d 5h
- Merged PRs (30d)
- 1
Description
Is your feature request related to a problem? Please describe.
When Mark tried to run a Python script, he encountered an error where he was missing the data folder and the log folder, since those paths were hard-coded into the script. We want any user to be able to pick up our scripts and run them with minimal setup required.
Describe the solution you'd like
We want to abstract these paths into a function that checks if there is a log folder and data folder within the existing directory. If so, return those folder paths and pass them to the script. If not, create a new log folder and data folder in the working directory and return the paths to the script.
These functions should be added to the utilities.py file and be included in any Python script moving forward.
Describe alternatives you've considered
Haven't researched other options to handle this. Maybe a package or another process would work better here, perhaps a more robust logging package.
Additional context
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.