FIX/CI: Support installing from Git URLs#287
Merged
Merged
Conversation
This was referenced Jun 3, 2026
LookupError when installing from git using package managers
nury12n
approved these changes
Jun 3, 2026
bocklund
added a commit
to pycalphad/scheil
that referenced
this pull request
Jun 3, 2026
See PhasesResearchLab/ESPEI#287 for a detailed description. - Adds smoke test GitHub Action - Incorporates fix to `__init__.py`
bocklund
added a commit
to pycalphad/pycalphad
that referenced
this pull request
Jun 3, 2026
See PhasesResearchLab/ESPEI#287 for a detailed description. - Adds smoke test GitHub Action - Incorporates fix to `__init__.py`
disouzam
added a commit
to disouzam/pycalphad
that referenced
this pull request
Jun 6, 2026
…28d6f39e` from branch develop into branch `work-in-progress-issue-674` commit 2d4c744 Author: Brandon Bocklund <bocklund1@llnl.gov> Date: Fri Jun 5 10:04:53 2026 -0700 REL: 0.11.2 commit 303c50b Author: nury12n <48889915+nury12n@users.noreply.github.com> Date: Wed Jun 3 19:54:02 2026 -0700 FIX: phase filtering for order/disorder models with unmatched consituents (pycalphad#548) Fix pycalphad#345, updating the behavior of `Model` to handle ordered phase constituents as follows: | user gives: | `phases = ["disordered"]` | `phases = ["ordered"]` | `phases = ["disordered", "ordered"]` | | ------------- | ------------- | ------------- | ------------- | | `D == O` (happy path) | disordered | ordered | ordered | | `D is strict superset of O` | disordered | ordered (phase constituents are extended to include those in the disordered model) | ordered (phase constituents are extended to include those in the disordered model) | | `O is strict superset of D` | disordered | `Model` `ValueError`* | `Model` `ValueError`* | commit 1407c3b Author: Brandon Bocklund <bocklund1@llnl.gov> Date: Wed Jun 3 15:23:59 2026 -0700 FIX/CI: Support installing from Git URLs (pycalphad#683) See PhasesResearchLab/ESPEI#287 for a detailed description. - Adds smoke test GitHub Action - Incorporates fix to `__init__.py` commit 4a81c89 Author: Brandon Bocklund <bocklund1@llnl.gov> Date: Tue Jun 2 07:36:46 2026 -0700 FIX: raise `ConditionError` in `calculate()` when there are missing state variables (pycalphad#681) In `calculate()` state variables are passed as keyword arguments. It's currently possible to call `calculate()` without providing all the state variables that are used by `Model` instances, and this creates mismatches in the expected vs. actual shapes of arguements passed to the phase record callable functions. This PR fixes the flaky test introduced by pycalphad#679 that exhibited this behavior by not including `T` as a state variable argument. It also includes a check (with a corresponding test) that the state variables passed to `calculate()` are a superset of those required and recorded by the `PhaseRecordFactory` and raise if any required variables are not present. commit 28d6f39 Author: Brandon Bocklund <bocklund1@llnl.gov> Date: Mon Jun 1 18:08:01 2026 -0700 ENH/FIX: Unit handling for mapping (pycalphad#678) - Adds unit support to mapping by doing JIT conversion. Updates the charged phases example to show use of Celsius unit rather than doing the conversion by-hand for mapping. - Refactors the unit conversion API to pull the functionality out of Workspace, fixing a bug where the context contained all the phases, not just the active ones requested in the property.
disouzam
added a commit
to disouzam/pycalphad
that referenced
this pull request
Jun 8, 2026
…evelop` into `issue-674-documentation-reorganization`: commit 2d4c744 Author: Brandon Bocklund <bocklund1@llnl.gov> Date: Fri Jun 5 10:04:53 2026 -0700 REL: 0.11.2 commit 303c50b Author: nury12n <48889915+nury12n@users.noreply.github.com> Date: Wed Jun 3 19:54:02 2026 -0700 FIX: phase filtering for order/disorder models with unmatched consituents (pycalphad#548) Fix pycalphad#345, updating the behavior of `Model` to handle ordered phase constituents as follows: | user gives: | `phases = ["disordered"]` | `phases = ["ordered"]` | `phases = ["disordered", "ordered"]` | | ------------- | ------------- | ------------- | ------------- | | `D == O` (happy path) | disordered | ordered | ordered | | `D is strict superset of O` | disordered | ordered (phase constituents are extended to include those in the disordered model) | ordered (phase constituents are extended to include those in the disordered model) | | `O is strict superset of D` | disordered | `Model` `ValueError`* | `Model` `ValueError`* | commit 1407c3b Author: Brandon Bocklund <bocklund1@llnl.gov> Date: Wed Jun 3 15:23:59 2026 -0700 FIX/CI: Support installing from Git URLs (pycalphad#683) See PhasesResearchLab/ESPEI#287 for a detailed description. - Adds smoke test GitHub Action - Incorporates fix to `__init__.py`
disouzam
added a commit
to disouzam/pycalphad
that referenced
this pull request
Jun 11, 2026
…evelop` into `issue-674-documentation-reorganization`: commit 2d4c744 Author: Brandon Bocklund <bocklund1@llnl.gov> Date: Fri Jun 5 10:04:53 2026 -0700 REL: 0.11.2 commit 303c50b Author: nury12n <48889915+nury12n@users.noreply.github.com> Date: Wed Jun 3 19:54:02 2026 -0700 FIX: phase filtering for order/disorder models with unmatched consituents (pycalphad#548) Fix pycalphad#345, updating the behavior of `Model` to handle ordered phase constituents as follows: | user gives: | `phases = ["disordered"]` | `phases = ["ordered"]` | `phases = ["disordered", "ordered"]` | | ------------- | ------------- | ------------- | ------------- | | `D == O` (happy path) | disordered | ordered | ordered | | `D is strict superset of O` | disordered | ordered (phase constituents are extended to include those in the disordered model) | ordered (phase constituents are extended to include those in the disordered model) | | `O is strict superset of D` | disordered | `Model` `ValueError`* | `Model` `ValueError`* | commit 1407c3b Author: Brandon Bocklund <bocklund1@llnl.gov> Date: Wed Jun 3 15:23:59 2026 -0700 FIX/CI: Support installing from Git URLs (pycalphad#683) See PhasesResearchLab/ESPEI#287 for a detailed description. - Adds smoke test GitHub Action - Incorporates fix to `__init__.py`
disouzam
added a commit
to disouzam/pycalphad
that referenced
this pull request
Jun 11, 2026
…28d6f39e` from branch `develop` into `issue-674-documentation-reorganization`: commit 2d4c744 Author: Brandon Bocklund <bocklund1@llnl.gov> Date: Fri Jun 5 10:04:53 2026 -0700 REL: 0.11.2 commit 303c50b Author: nury12n <48889915+nury12n@users.noreply.github.com> Date: Wed Jun 3 19:54:02 2026 -0700 FIX: phase filtering for order/disorder models with unmatched consituents (pycalphad#548) Fix pycalphad#345, updating the behavior of `Model` to handle ordered phase constituents as follows: | user gives: | `phases = ["disordered"]` | `phases = ["ordered"]` | `phases = ["disordered", "ordered"]` | | ------------- | ------------- | ------------- | ------------- | | `D == O` (happy path) | disordered | ordered | ordered | | `D is strict superset of O` | disordered | ordered (phase constituents are extended to include those in the disordered model) | ordered (phase constituents are extended to include those in the disordered model) | | `O is strict superset of D` | disordered | `Model` `ValueError`* | `Model` `ValueError`* | commit 1407c3b Author: Brandon Bocklund <bocklund1@llnl.gov> Date: Wed Jun 3 15:23:59 2026 -0700 FIX/CI: Support installing from Git URLs (pycalphad#683) See PhasesResearchLab/ESPEI#287 for a detailed description. - Adds smoke test GitHub Action - Incorporates fix to `__init__.py` commit 4a81c89 Author: Brandon Bocklund <bocklund1@llnl.gov> Date: Tue Jun 2 07:36:46 2026 -0700 FIX: raise `ConditionError` in `calculate()` when there are missing state variables (pycalphad#681) In `calculate()` state variables are passed as keyword arguments. It's currently possible to call `calculate()` without providing all the state variables that are used by `Model` instances, and this creates mismatches in the expected vs. actual shapes of arguements passed to the phase record callable functions. This PR fixes the flaky test introduced by pycalphad#679 that exhibited this behavior by not including `T` as a state variable argument. It also includes a check (with a corresponding test) that the state variables passed to `calculate()` are a superset of those required and recorded by the `PhaseRecordFactory` and raise if any required variables are not present. commit 28d6f39 Author: Brandon Bocklund <bocklund1@llnl.gov> Date: Mon Jun 1 18:08:01 2026 -0700 ENH/FIX: Unit handling for mapping (pycalphad#678) - Adds unit support to mapping by doing JIT conversion. Updates the charged phases example to show use of Celsius unit rather than doing the conversion by-hand for mapping. - Refactors the unit conversion API to pull the functionality out of Workspace, fixing a bug where the context contained all the phases, not just the active ones requested in the property.
disouzam
added a commit
to disouzam/pycalphad
that referenced
this pull request
Jun 11, 2026
…28d6f39e` from branch `develop` into `issue-674-documentation-reorganization`: commit 2d4c744 Author: Brandon Bocklund <bocklund1@llnl.gov> Date: Fri Jun 5 10:04:53 2026 -0700 REL: 0.11.2 commit 303c50b Author: nury12n <48889915+nury12n@users.noreply.github.com> Date: Wed Jun 3 19:54:02 2026 -0700 FIX: phase filtering for order/disorder models with unmatched consituents (pycalphad#548) Fix pycalphad#345, updating the behavior of `Model` to handle ordered phase constituents as follows: | user gives: | `phases = ["disordered"]` | `phases = ["ordered"]` | `phases = ["disordered", "ordered"]` | | ------------- | ------------- | ------------- | ------------- | | `D == O` (happy path) | disordered | ordered | ordered | | `D is strict superset of O` | disordered | ordered (phase constituents are extended to include those in the disordered model) | ordered (phase constituents are extended to include those in the disordered model) | | `O is strict superset of D` | disordered | `Model` `ValueError`* | `Model` `ValueError`* | commit 1407c3b Author: Brandon Bocklund <bocklund1@llnl.gov> Date: Wed Jun 3 15:23:59 2026 -0700 FIX/CI: Support installing from Git URLs (pycalphad#683) See PhasesResearchLab/ESPEI#287 for a detailed description. - Adds smoke test GitHub Action - Incorporates fix to `__init__.py` commit 4a81c89 Author: Brandon Bocklund <bocklund1@llnl.gov> Date: Tue Jun 2 07:36:46 2026 -0700 FIX: raise `ConditionError` in `calculate()` when there are missing state variables (pycalphad#681) In `calculate()` state variables are passed as keyword arguments. It's currently possible to call `calculate()` without providing all the state variables that are used by `Model` instances, and this creates mismatches in the expected vs. actual shapes of arguements passed to the phase record callable functions. This PR fixes the flaky test introduced by pycalphad#679 that exhibited this behavior by not including `T` as a state variable argument. It also includes a check (with a corresponding test) that the state variables passed to `calculate()` are a superset of those required and recorded by the `PhaseRecordFactory` and raise if any required variables are not present. commit 28d6f39 Author: Brandon Bocklund <bocklund1@llnl.gov> Date: Mon Jun 1 18:08:01 2026 -0700 ENH/FIX: Unit handling for mapping (pycalphad#678) - Adds unit support to mapping by doing JIT conversion. Updates the charged phases example to show use of Celsius unit rather than doing the conversion by-hand for mapping. - Refactors the unit conversion API to pull the functionality out of Workspace, fixing a bug where the context contained all the phases, not just the active ones requested in the property.
disouzam
added a commit
to disouzam/pycalphad
that referenced
this pull request
Jun 11, 2026
…28d6f39e` from branch `develop` into `issue-674-documentation-reorganization`: commit 2d4c744 Author: Brandon Bocklund <bocklund1@llnl.gov> Date: Fri Jun 5 10:04:53 2026 -0700 REL: 0.11.2 commit 303c50b Author: nury12n <48889915+nury12n@users.noreply.github.com> Date: Wed Jun 3 19:54:02 2026 -0700 FIX: phase filtering for order/disorder models with unmatched consituents (pycalphad#548) Fix pycalphad#345, updating the behavior of `Model` to handle ordered phase constituents as follows: | user gives: | `phases = ["disordered"]` | `phases = ["ordered"]` | `phases = ["disordered", "ordered"]` | | ------------- | ------------- | ------------- | ------------- | | `D == O` (happy path) | disordered | ordered | ordered | | `D is strict superset of O` | disordered | ordered (phase constituents are extended to include those in the disordered model) | ordered (phase constituents are extended to include those in the disordered model) | | `O is strict superset of D` | disordered | `Model` `ValueError`* | `Model` `ValueError`* | commit 1407c3b Author: Brandon Bocklund <bocklund1@llnl.gov> Date: Wed Jun 3 15:23:59 2026 -0700 FIX/CI: Support installing from Git URLs (pycalphad#683) See PhasesResearchLab/ESPEI#287 for a detailed description. - Adds smoke test GitHub Action - Incorporates fix to `__init__.py` commit 4a81c89 Author: Brandon Bocklund <bocklund1@llnl.gov> Date: Tue Jun 2 07:36:46 2026 -0700 FIX: raise `ConditionError` in `calculate()` when there are missing state variables (pycalphad#681) In `calculate()` state variables are passed as keyword arguments. It's currently possible to call `calculate()` without providing all the state variables that are used by `Model` instances, and this creates mismatches in the expected vs. actual shapes of arguements passed to the phase record callable functions. This PR fixes the flaky test introduced by pycalphad#679 that exhibited this behavior by not including `T` as a state variable argument. It also includes a check (with a corresponding test) that the state variables passed to `calculate()` are a superset of those required and recorded by the `PhaseRecordFactory` and raise if any required variables are not present. commit 28d6f39 Author: Brandon Bocklund <bocklund1@llnl.gov> Date: Mon Jun 1 18:08:01 2026 -0700 ENH/FIX: Unit handling for mapping (pycalphad#678) - Adds unit support to mapping by doing JIT conversion. Updates the charged phases example to show use of Celsius unit rather than doing the conversion by-hand for mapping. - Refactors the unit conversion API to pull the functionality out of Workspace, fixing a bug where the context contained all the phases, not just the active ones requested in the property.
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.
When installing ESPEI from a git source using package managers, e.g.
or entirely from a fresh env using
uv:uv init --bare uv add "espei @ git+https://github.com/phasesresearchlab/espei.git@master"the code can successfully install, but give errors like this when you try to use it:
Looking at
There current behavior of
__init__.pyexpects one of the following cases:MANIFEST.indoesprune espei/_devand therefore._devdoesn't exist and we hit theImportErrorfallback toimportlib.metadataget_versionfromsetuptools_scmdetects the git tag and can set the versions correctly.However, when installing on one of the failure modes above, you get an in between case where
a) you get all the files, which includes
_dev/__init__.py, andb) you don't get the full git repo with the full git version history
and thus you don't get the
ImportError, but you havesetuptools_scm.get_versionraise aLookupErrorwhen it fails.This PR catches that
LookupErrorand falls back onto theimportlib.metadataversion which does work on installs using thegit+mechanism above onpipanduv. It also adds a new GitHub Action file for doing smoke tests, where in this case we add a single test that installing ESPEI to a bare repo and then importing works.This should fix issues in getting CI working in downstream packages like here: materialsgenomefoundation/kawin#19