Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FIX: Handle DIFFUSION and ZEROVOLUME_SPECIES Thermo-Calc commands. #397

merged 5 commits into from
Feb 21, 2022

FIX: Handle DIFFUSION and ZEROVOLUME_SPECIES Thermo-Calc commands. #397

merged 5 commits into from
Feb 21, 2022


Copy link

Minor fix to prevent errors if users have DIFFUSION or ZEROVOLUME_SPECIES commands in a database file.

No items in the checklist are relevant to this minor fix.

Copy link

codecov bot commented Feb 20, 2022

Codecov Report

Merging #397 (1418b44) into develop (6c87e40) will increase coverage by 0.00%.
The diff coverage is 100.00%.

Impacted file tree graph

@@           Coverage Diff            @@
##           develop     #397   +/-   ##
  Coverage    91.12%   91.13%           
  Files           43       43           
  Lines         4449     4454    +5     
+ Hits          4054     4059    +5     
  Misses         395      395           
Impacted Files Coverage Δ
pycalphad/io/ 100.00% <ø> (ø)
pycalphad/io/ 89.37% <100.00%> (+0.04%) ⬆️
pycalphad/tests/ 100.00% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 6c87e40...1418b44. Read the comment docs.

Copy link

richardotis commented Feb 20, 2022

Thanks for the contribution, @mfrichtl ! Can you add a test to pycalphad/tests/ that fails without your changes, but passes with them? It just needs a minimal TDB that uses the added commands, something like:

def test_database_passes_with_diffusion_commands():
    "Diffusion commands do not raise (doesn't test implementation)"
    tdb_string = """
     ELEMENT /-   ELECTRON_GAS              0.0000E+00  0.0000E+00  0.0000E+00!
     ELEMENT VA   VACUUM                    0.0000E+00  0.0000E+00  0.0000E+00!
     ELEMENT O    1/2_MOLE_O2(G)            0.0000E+00  0.0000E+00  0.0000E+00!

     DIFFUSION [something that is valid syntax] !
     ZEROVOLUME_SPECIES [something that is valid syntax] !

    dbf = Database.from_string(tdb_string, fmt='tdb')

Copy link
Contributor Author

@richardotis I believe I added an appropriate test per your example and pushed it to this PR. Also believe I resolved a conflict that popped up.

@richardotis richardotis self-requested a review February 21, 2022 17:26
@richardotis richardotis merged commit 9dc745b into pycalphad:develop Feb 21, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
None yet

Successfully merging this pull request may close these issues.

None yet

2 participants