Skip to content

FIX: fix wildcard support#560

Merged
bocklund merged 6 commits intopycalphad:developfrom
bocklund:fix-wildcard-support
Aug 6, 2024
Merged

FIX: fix wildcard support#560
bocklund merged 6 commits intopycalphad:developfrom
bocklund:fix-wildcard-support

Conversation

@bocklund
Copy link
Copy Markdown
Collaborator

@bocklund bocklund commented Aug 5, 2024

Fixes the following cases with a test:

  • Fixes wildcard expansion on components (for properties without a sublattice index) to expand on non-vacant pure elements. With proper component support, we would go back to using self.components, but currently self.components contain all phase constituents, including, for example, vacancies
  • Adds expand_wildcard on components for chemical potentials
  • Fixes wildcard expansion for properties where expansions are on phase constituents, such as site fractions
  • Adds support for wildcard expansion on sublattice indices (required adding sublattice index = '*' as valid).
  • Change behavior of compute_property for site fractions to return NaN if the phase is not stable (previously we were returning zero)

@bocklund bocklund requested a review from richardotis August 5, 2024 22:38
@codecov
Copy link
Copy Markdown

codecov Bot commented Aug 5, 2024

Codecov Report

Attention: Patch coverage is 97.29730% with 1 line in your changes missing coverage. Please review.

Project coverage is 91.82%. Comparing base (176909c) to head (c12d60b).

Files Patch % Lines
pycalphad/variables.py 92.30% 1 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##           develop     #560      +/-   ##
===========================================
+ Coverage    91.78%   91.82%   +0.04%     
===========================================
  Files           77       77              
  Lines        11996    12026      +30     
===========================================
+ Hits         11010    11043      +33     
+ Misses         986      983       -3     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

- Support wildcard expansion for sublattice index (required adding sublattice index = '*' as valid)
- Change behavior of compute_property for site fractions to return NaN if the phase is not stable (previously we were returning zero)
Comment thread pycalphad/core/workspace.py Outdated
@bocklund bocklund merged commit 6720377 into pycalphad:develop Aug 6, 2024
@bocklund bocklund deleted the fix-wildcard-support branch August 6, 2024 01:25
bocklund added a commit to bocklund/pycalphad that referenced this pull request Aug 6, 2024
Addresses the following cases with a test:
- Fixes wildcard expansion on components (for properties without a sublattice index) to expand on non-vacant pure elements. With proper component support, we would go back to using `self.components`, but currently `self.components` contain all phase constituents, including, for example, vacancies
- Adds `expand_wildcard` on components for chemical potentials
- Fixes wildcard expansion for properties where expansions are on phase constituents, such as site fractions
- Adds support for wildcard expansion on sublattice indices (required adding `sublattice index = '*'` as valid).
- Change behavior of compute_property for site fractions to return NaN if the phase is not stable (previously we were returning zero)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants