Add logs and metadata directories for centralized file organization (Fixes #308)#776
Open
abuzarmahmood wants to merge 2 commits into
Open
Add logs and metadata directories for centralized file organization (Fixes #308)#776abuzarmahmood wants to merge 2 commits into
abuzarmahmood wants to merge 2 commits into
Conversation
- Created logs/ directory for all log files: - output.log (Tee class) - results.log (blech_init.py) - ram_usage.log (ram_monitor.py) - blech_process.log (blech_process.py) - umap_results.log (umap_plots.py) - execution_log.json (pipeline_graph_check) - Created metadata/ directory for all metadata files: - electrode_layout_frame.csv - trial_info_frame.csv - dig_in_frame.csv - *.info file - *.params file - aggregated_characteristics.csv - unit_descriptor.csv - unit_profile.csv - waveform_classifier_recommendations.csv - Added backward compatibility to check old locations if files don't exist in new directories - Added helper functions: - ensure_dir(data_dir, subdir) - get_metadata_dir(data_dir) - get_logs_dir(data_dir) - find_file_in_dir(data_dir, filename_pattern) Co-authored-by: openhands <openhands@all-hands.dev>
for more information, see https://pre-commit.ci
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR addresses issue #308 by reorganizing log and metadata file storage in the blech_clust project:
Changes Made
1. Created centralized
logs/directory for all log files:output.log(via Tee class)results.log(blech_init.py)ram_usage.log(ram_monitor.py)blech_process.log(blech_process.py)umap_results.log(umap_plots.py)execution_log.json(pipeline_graph_check in blech_utils.py)2. Created centralized
metadata/directory for all metadata files:electrode_layout_frame.csv(blech_exp_info.py)trial_info_frame.csv(blech_make_arrays.py, ephys_data.py, and others)dig_in_frame.csv(read_file.py)*.infofile (blech_utils.py - imp_metadata class)*.paramsfile (blech_utils.py - imp_metadata class)aggregated_characteristics.csv(blech_units_characteristics.py)unit_descriptor.csv(blech_post_process.py)unit_profile.csv(ephys_data.py)waveform_classifier_recommendations.csv(blech_process_utils.py)3. Added helper functions in
blech_utils.py:ensure_dir(data_dir, subdir)- Creates a subdirectory if it doesn't existget_metadata_dir(data_dir)- Returns path to metadata directoryget_logs_dir(data_dir)- Returns path to logs directoryfind_file_in_dir(data_dir, filename_pattern)- Helper for backward compatibility4. Maintained backward compatibility:
Files Modified
Tests Added
Fixes #308
@abuzarmahmood can click here to continue refining the PR