Saving TDB with A*(B+C) expressions#522
Merged
Merged
Conversation
added 7 commits
June 20, 2023 13:20
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## develop #522 +/- ##
===========================================
+ Coverage 90.46% 90.48% +0.01%
===========================================
Files 50 50
Lines 7868 7880 +12
===========================================
+ Hits 7118 7130 +12
Misses 750 750 ☔ View full report in Codecov by Sentry. |
richardotis
approved these changes
Mar 26, 2024
ricardonpa
added a commit
to ricardonpa/pycalphad
that referenced
this pull request
Jun 24, 2024
richardotis
pushed a commit
that referenced
this pull request
Jun 24, 2024
…516) * Fix float exponents when writing a TDB file (TC ERROR DatabaseUtils) * Update previous exponent float fix + Fix line breaks causing TC reading function ERROR * Generalized the line-break rules to accept a break before any number addition/subtraction that is not part of an EXP or LN/LOG operation. Updated the test in test_database.py to reflect changes made in tdb.py. * Update #522 expressions and by removing extra spaces to resolve conflicts * Add comment to clarify usage of regex expression. * Update tdb.py to account for errors when trying to use int() on exponents with nested functions, i.e., non-numeric values. * Updated `test_tc_printer_exp` to test if exponents are being written as integers * Create `test_reflow_text_for_line_breaks` function to test if lines are being broken at correct positions
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.
This is a minor fix to an issue I was having when saving a Database to a TDB file.
If the TDB had a parameter with the expression A*(B+C) it would get saved as A*B+C, removing the parenthesis around the Add expression.
Changes