Add pathlib support to Database reading#545
Merged
bocklund merged 2 commits intopycalphad:developfrom Jul 14, 2024
Merged
Conversation
…ests test_unspecified_format_from_string was testing from_string on a filepath, which probably makes less sense than on a Database same thing in test_unspecified_format_from_file
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## develop #545 +/- ##
========================================
Coverage 91.62% 91.62%
========================================
Files 60 60
Lines 9918 9924 +6
========================================
+ Hits 9087 9093 +6
Misses 831 831 ☔ View full report in Codecov by Sentry. |
richardotis
approved these changes
Jul 14, 2024
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.
Enables the following behavior:
Closes #544
We test this by changing the tests that usually wrap
files()output (aPosixPath) in astr()to make a string-like path. We remove this behavior in several tests.This also changes some tests (
test_unspecified_format_from_stringandtest_unspecified_format_from_file) to be more in line with what I interpreted to be the spirit of the tests: passing database strings (not strings for the paths to the databases) toDatabase.from_stringorDatabase.from_fileshould fail if a format is not specified.