Enhancement: Make check_resource_dir a general data folder routine#791
Open
RHammond2 wants to merge 7 commits into
Open
Enhancement: Make check_resource_dir a general data folder routine#791RHammond2 wants to merge 7 commits into
check_resource_dir a general data folder routine#791RHammond2 wants to merge 7 commits into
Conversation
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.
Enhancement: Make
check_resource_dira general data folder routineThis PR is in service of #777 to enable the usage of the functionality in
h2integrate/resource/utilities/file_tools.py::check_resource_dirmore broadly applicable to other data types (e.g. feedstocks). By creating the generalcheck_data_dirwith a thin wrapper forcheck_resource_dirthat populates thedata_typearg with "resource" much of the same usage is maintained through the resource data classes. Similarly the existing tests are able to be used with comparable test coverage and minimal changed code.Section 1: Type of Contribution
Section 3: General PR Checklist
docs/files are up-to-date, or added when necessaryCHANGELOG.md"A complete thought. [PR XYZ]((https://github.com/NatLabRockies/H2Integrate/pull/XYZ)", where
XYZshould be replaced with the actual number.Section 4: Related Issues
N/A
Section 5: Impacted Areas of the Software
Section 5.1: New Files
N/A
Section 5.2: Modified Files
h2integrate/resource/utilities/file_tools.py: removed in favor of movingcheck_resource_dirto the below modified file.h2integrate/core/utilities/file_utils.py:check_data_dir: Generaldata_typechecking data directory checking with default handling, exactly as prescribed from the previouscheck_resource_dir, except with the flexibility of working with multipledata_type, e.g. "resource", "feedstock", or whatever types of data might be used later.check_resource_dir:partialfunction ofcheck_data_dirwithdata_type="resource"pre-populated.check_feedstock_dir: Same as above, but for "feedstock".Section 6: Additional Supporting Information
This PR stems from a tangential issue in #777 where there is a need to reuse existing functionality, but is hard-coded for a specific use case making this work worthy of its own PR.
Section 7: Test Results, if applicable