gliquid 0.2.0__tar.gz → 0.3.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {gliquid-0.2.0 → gliquid-0.3.0}/.gitattributes +3 -0
- gliquid-0.3.0/.githooks/pre-commit +74 -0
- {gliquid-0.2.0 → gliquid-0.3.0}/.github/workflows/tests.yml +9 -11
- {gliquid-0.2.0 → gliquid-0.3.0}/.gitignore +3 -0
- gliquid-0.3.0/CHANGELOG.md +631 -0
- {gliquid-0.2.0 → gliquid-0.3.0}/CITATION.cff +2 -2
- gliquid-0.3.0/CONTRIBUTING.md +197 -0
- gliquid-0.3.0/PKG-INFO +163 -0
- gliquid-0.3.0/README.md +106 -0
- gliquid-0.3.0/assets/ru_si_assessed_pd.png +0 -0
- gliquid-0.3.0/conftest.py +346 -0
- {gliquid-0.2.0 → gliquid-0.3.0}/notebooks/GaRu_adjustment.ipynb +3166 -831
- {gliquid-0.2.0 → gliquid-0.3.0}/notebooks/PbTb_adjustment.ipynb +3155 -1034
- gliquid-0.3.0/notebooks/colab_demo.ipynb +389 -0
- gliquid-0.3.0/notebooks/fitting_demo.ipynb +18603 -0
- gliquid-0.3.0/notebooks/interpolation_demo.ipynb +324 -0
- {gliquid-0.2.0 → gliquid-0.3.0}/pyproject.toml +27 -73
- {gliquid-0.2.0 → gliquid-0.3.0}/requirements/min-constraints.txt +2 -2
- gliquid-0.3.0/scripts/run_colab_notebook.py +1931 -0
- {gliquid-0.2.0 → gliquid-0.3.0}/scripts/run_notebooks.py +2 -1
- {gliquid-0.2.0 → gliquid-0.3.0}/src/gliquid/__init__.py +3 -18
- {gliquid-0.2.0 → gliquid-0.3.0}/src/gliquid/_version.py +2 -2
- {gliquid-0.2.0 → gliquid-0.3.0}/src/gliquid/api.py +354 -219
- gliquid-0.3.0/src/gliquid/binary.py +3019 -0
- {gliquid-0.2.0 → gliquid-0.3.0}/src/gliquid/cache.py +778 -211
- gliquid-0.3.0/src/gliquid/config.py +726 -0
- {gliquid-0.2.0 → gliquid-0.3.0}/src/gliquid/hsx.py +142 -44
- {gliquid-0.2.0 → gliquid-0.3.0}/src/gliquid/hull_editor.py +240 -154
- gliquid-0.3.0/src/gliquid/imputation/__init__.py +39 -0
- gliquid-0.3.0/src/gliquid/imputation/ablation.py +180 -0
- gliquid-0.3.0/src/gliquid/imputation/binary_imputation.py +1000 -0
- gliquid-0.3.0/src/gliquid/imputation/core.py +669 -0
- gliquid-0.3.0/src/gliquid/imputation/lifecycle.py +351 -0
- gliquid-0.3.0/src/gliquid/imputation/ternary_imputation.py +532 -0
- gliquid-0.3.0/src/gliquid/liquidus_sheets.py +478 -0
- gliquid-0.3.0/src/gliquid/models/20261013_191431/L0_a.ubj +0 -0
- gliquid-0.3.0/src/gliquid/models/20261013_191431/L0_b.ubj +0 -0
- gliquid-0.3.0/src/gliquid/models/20261013_191431/L1_a.ubj +0 -0
- gliquid-0.3.0/src/gliquid/models/20261013_191431/best_params.json +26 -0
- {gliquid-0.2.0/src/gliquid/models/20260817_112204 → gliquid-0.3.0/src/gliquid/models/20261013_191431}/feature_names.json +87 -91
- gliquid-0.3.0/src/gliquid/models/20261013_191431/features_antisymmetric.json +1 -0
- gliquid-0.3.0/src/gliquid/models/20261013_191431/features_symmetric.json +1 -0
- gliquid-0.3.0/src/gliquid/models/20261013_191431/manifest.json +164 -0
- {gliquid-0.2.0/src/gliquid/models/20260817_112204 → gliquid-0.3.0/src/gliquid/models/20261013_191431}/metadata.json +37 -37
- gliquid-0.3.0/src/gliquid/models/20261013_191431/model_summary.txt +53 -0
- gliquid-0.3.0/src/gliquid/models/20261013_191431/preprocess.json +323 -0
- gliquid-0.3.0/src/gliquid/mpds.py +2767 -0
- {gliquid-0.2.0 → gliquid-0.3.0}/src/gliquid/phase.py +51 -29
- {gliquid-0.2.0 → gliquid-0.3.0}/src/gliquid/plotting/binary_figs.py +378 -57
- {gliquid-0.2.0 → gliquid-0.3.0}/src/gliquid/plotting/binary_tx.py +1026 -788
- {gliquid-0.2.0 → gliquid-0.3.0}/src/gliquid/plotting/export.py +64 -6
- gliquid-0.3.0/src/gliquid/plotting/liquidus_fields.py +857 -0
- gliquid-0.3.0/src/gliquid/plotting/phase_highlight.py +262 -0
- gliquid-0.3.0/src/gliquid/plotting/style.py +494 -0
- gliquid-0.3.0/src/gliquid/plotting/ternary_labels.py +520 -0
- gliquid-0.3.0/src/gliquid/plotting/ternary_projection.py +1274 -0
- gliquid-0.3.0/src/gliquid/plotting/ternary_surface.py +742 -0
- {gliquid-0.2.0 → gliquid-0.3.0}/src/gliquid/production_model_runner.py +183 -384
- {gliquid-0.2.0 → gliquid-0.3.0}/src/gliquid/reference/phase_transitions.json +265 -265
- gliquid-0.3.0/src/gliquid/reference/spurious_structures.json +328 -0
- {gliquid-0.2.0 → gliquid-0.3.0}/src/gliquid/shap_compat.py +6 -16
- gliquid-0.3.0/src/gliquid/solid_coverage.py +1239 -0
- {gliquid-0.2.0 → gliquid-0.3.0}/src/gliquid/solution.py +110 -151
- gliquid-0.3.0/src/gliquid/ternary.py +1847 -0
- {gliquid-0.2.0 → gliquid-0.3.0}/tox.ini +11 -13
- gliquid-0.2.0/CHANGELOG.md +0 -186
- gliquid-0.2.0/CONTRIBUTING.md +0 -130
- gliquid-0.2.0/PKG-INFO +0 -380
- gliquid-0.2.0/README.md +0 -311
- gliquid-0.2.0/conftest.py +0 -72
- gliquid-0.2.0/notebooks/colab_demo.ipynb +0 -164
- gliquid-0.2.0/notebooks/fitting_demo.ipynb +0 -20010
- gliquid-0.2.0/notebooks/interpolation_demo.ipynb +0 -251
- gliquid-0.2.0/src/gliquid/binary.py +0 -2533
- gliquid-0.2.0/src/gliquid/config.py +0 -594
- gliquid-0.2.0/src/gliquid/models/20260817_112204/L0_a.ubj +0 -0
- gliquid-0.2.0/src/gliquid/models/20260817_112204/L0_b.ubj +0 -0
- gliquid-0.2.0/src/gliquid/models/20260817_112204/L1_a.ubj +0 -0
- gliquid-0.2.0/src/gliquid/models/20260817_112204/best_params.json +0 -26
- gliquid-0.2.0/src/gliquid/models/20260817_112204/manifest.json +0 -151
- gliquid-0.2.0/src/gliquid/models/20260817_112204/model_summary.txt +0 -55
- gliquid-0.2.0/src/gliquid/models/20260817_112204/preprocess.json +0 -329
- gliquid-0.2.0/src/gliquid/mpds.py +0 -2083
- gliquid-0.2.0/src/gliquid/plotting/style.py +0 -112
- gliquid-0.2.0/src/gliquid/plotting/ternary_surface.py +0 -441
- gliquid-0.2.0/src/gliquid/reference/spurious_structures.json +0 -234
- gliquid-0.2.0/src/gliquid/ternary.py +0 -1118
- {gliquid-0.2.0 → gliquid-0.3.0}/.github/CODEOWNERS +0 -0
- {gliquid-0.2.0 → gliquid-0.3.0}/.github/dependabot.yml +0 -0
- {gliquid-0.2.0 → gliquid-0.3.0}/.github/workflows/release.yml +0 -0
- {gliquid-0.2.0 → gliquid-0.3.0}/LICENSE +0 -0
- {gliquid-0.2.0 → gliquid-0.3.0}/assets/digitized_pd_anatomy.png +0 -0
- {gliquid-0.2.0 → gliquid-0.3.0}/assets/gliq_logo_tall.png +0 -0
- {gliquid-0.2.0 → gliquid-0.3.0}/assets/invariant_points_and_reactions.png +0 -0
- {gliquid-0.2.0 → gliquid-0.3.0}/src/gliquid/models/.gitkeep +0 -0
- {gliquid-0.2.0 → gliquid-0.3.0}/src/gliquid/plotting/__init__.py +0 -0
- {gliquid-0.2.0 → gliquid-0.3.0}/src/gliquid/reference/omegas_hcp.json +0 -0
|
@@ -2,3 +2,6 @@
|
|
|
2
2
|
# them back byte-for-byte on every platform. Without this, end-of-line normalization
|
|
3
3
|
# rewrites the JSON and txt members on checkout and the manifest no longer verifies.
|
|
4
4
|
src/gliquid/models/** -text
|
|
5
|
+
|
|
6
|
+
# The pre-commit hook is run by sh; CRLF in it fails at the shebang line.
|
|
7
|
+
.githooks/** text eol=lf
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
#!/bin/sh
|
|
2
|
+
# ruff format gate for staged Python, over the same three paths the CI lint job checks.
|
|
3
|
+
#
|
|
4
|
+
# Reformats the staged files and re-stages them, so the commit records formatted code. A file
|
|
5
|
+
# with unstaged changes alongside its staged ones is left alone and the commit aborts: `git add`
|
|
6
|
+
# on a partially staged file would sweep the unstaged hunks into the commit too.
|
|
7
|
+
#
|
|
8
|
+
# Activate: git config core.hooksPath .githooks
|
|
9
|
+
# Skip once: git commit --no-verify
|
|
10
|
+
# `ruff check` is not run here; the CI lint job runs it and fails on any finding.
|
|
11
|
+
|
|
12
|
+
ruff_bin=""
|
|
13
|
+
if [ -n "$GLIQUID_RUFF" ] && [ -x "$GLIQUID_RUFF" ]; then
|
|
14
|
+
ruff_bin="env"
|
|
15
|
+
elif command -v ruff >/dev/null 2>&1; then
|
|
16
|
+
ruff_bin="path"
|
|
17
|
+
elif command -v python >/dev/null 2>&1 && python -m ruff --version >/dev/null 2>&1; then
|
|
18
|
+
ruff_bin="module"
|
|
19
|
+
else
|
|
20
|
+
echo "pre-commit: ruff not found on PATH, in \$GLIQUID_RUFF, or as \`python -m ruff\`." >&2
|
|
21
|
+
echo "pre-commit: committing unformatted -- install ruff or set GLIQUID_RUFF." >&2
|
|
22
|
+
exit 0
|
|
23
|
+
fi
|
|
24
|
+
|
|
25
|
+
run_ruff() {
|
|
26
|
+
case "$ruff_bin" in
|
|
27
|
+
env) "$GLIQUID_RUFF" "$@" ;;
|
|
28
|
+
module) python -m ruff "$@" ;;
|
|
29
|
+
*) ruff "$@" ;;
|
|
30
|
+
esac
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
staged=$(git diff --cached --name-only --diff-filter=ACM \
|
|
34
|
+
| grep -E '^(src/gliquid|tests|tests_internal)/.*\.py$')
|
|
35
|
+
[ -n "$staged" ] || exit 0
|
|
36
|
+
|
|
37
|
+
unstaged=$(git diff --name-only)
|
|
38
|
+
partial=""
|
|
39
|
+
full=""
|
|
40
|
+
for f in $staged; do
|
|
41
|
+
if printf '%s\n' "$unstaged" | grep -qxF "$f"; then
|
|
42
|
+
partial="$partial $f"
|
|
43
|
+
else
|
|
44
|
+
full="$full $f"
|
|
45
|
+
fi
|
|
46
|
+
done
|
|
47
|
+
|
|
48
|
+
# Partially staged files that ruff would rewrite: report, write nothing, stop the commit.
|
|
49
|
+
blocked=""
|
|
50
|
+
for f in $partial; do
|
|
51
|
+
run_ruff format --check --quiet "$f" >/dev/null 2>&1 || blocked="$blocked $f"
|
|
52
|
+
done
|
|
53
|
+
if [ -n "$blocked" ]; then
|
|
54
|
+
echo "pre-commit: these files are staged with unstaged changes alongside and are unformatted:" >&2
|
|
55
|
+
for f in $blocked; do echo " $f" >&2; done
|
|
56
|
+
echo "pre-commit: stage or discard the rest of each file, then run:" >&2
|
|
57
|
+
echo " ruff format$blocked" >&2
|
|
58
|
+
exit 1
|
|
59
|
+
fi
|
|
60
|
+
|
|
61
|
+
[ -n "$full" ] || exit 0
|
|
62
|
+
# shellcheck disable=SC2086
|
|
63
|
+
set -- $full
|
|
64
|
+
run_ruff format --quiet "$@" || exit 1
|
|
65
|
+
|
|
66
|
+
# Anything differing from the index now is ruff's work: these files had no unstaged changes.
|
|
67
|
+
changed=$(git diff --name-only -- "$@")
|
|
68
|
+
if [ -n "$changed" ]; then
|
|
69
|
+
# shellcheck disable=SC2086
|
|
70
|
+
git add -- $changed
|
|
71
|
+
echo "pre-commit: ruff formatted and re-staged:"
|
|
72
|
+
for f in $changed; do echo " $f"; done
|
|
73
|
+
fi
|
|
74
|
+
exit 0
|
|
@@ -13,6 +13,10 @@ jobs:
|
|
|
13
13
|
test-cached:
|
|
14
14
|
name: Cached Tests (Python ${{ matrix.python-version }})
|
|
15
15
|
runs-on: ubuntu-latest
|
|
16
|
+
env:
|
|
17
|
+
# The corpus lookup walks up to a directory named gliquid_python, which a checkout
|
|
18
|
+
# under another repository name does not have.
|
|
19
|
+
GLIQUID_CACHE_DIR: ${{ github.workspace }}/cache
|
|
16
20
|
|
|
17
21
|
strategy:
|
|
18
22
|
# One version failing must not hide the state of the other three.
|
|
@@ -52,16 +56,17 @@ jobs:
|
|
|
52
56
|
pip install -e '.[test]'
|
|
53
57
|
|
|
54
58
|
- name: Run cached tests
|
|
55
|
-
#
|
|
56
|
-
#
|
|
57
|
-
|
|
58
|
-
run: pytest tests tests_internal -v --tb=short -m "not needs_network"
|
|
59
|
+
# Both tiers, in parallel. The live Materials Project fetches are deselected by marker;
|
|
60
|
+
# the API job below runs the one in tests_internal.
|
|
61
|
+
run: pytest tests tests_internal -n auto --dist worksteal -m "not needs_network" --tb=short --durations=25
|
|
59
62
|
|
|
60
63
|
test-api:
|
|
61
64
|
name: API Tests
|
|
62
65
|
runs-on: ubuntu-latest
|
|
63
66
|
needs: test-cached
|
|
64
67
|
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
|
|
68
|
+
env:
|
|
69
|
+
GLIQUID_CACHE_DIR: ${{ github.workspace }}/cache # see the cached job
|
|
65
70
|
|
|
66
71
|
steps:
|
|
67
72
|
- uses: actions/checkout@v4
|
|
@@ -96,13 +101,6 @@ jobs:
|
|
|
96
101
|
name: Lint and Format
|
|
97
102
|
runs-on: ubuntu-latest
|
|
98
103
|
|
|
99
|
-
# NON-BLOCKING ON PURPOSE, for one cycle. `ruff format` landed in spec 04 but
|
|
100
|
-
# `ruff check` still has a backlog of findings; failing every push on it would
|
|
101
|
-
# red-wall the repo before anyone could read the list. The job exists so the backlog
|
|
102
|
-
# is VISIBLE in the checks tab. Flip this to false (or just delete the line) once the
|
|
103
|
-
# backlog is burned down -- leaving it here permanently makes the job decorative.
|
|
104
|
-
continue-on-error: true
|
|
105
|
-
|
|
106
104
|
steps:
|
|
107
105
|
- uses: actions/checkout@v4
|
|
108
106
|
with:
|