Skip to content

Package MaplePy and Hopper as maplepy 1.4.0 (MaplePy 1.3.6, Hopper 1.2.9) - #2

Open
SuperBladesman wants to merge 9 commits into
stopgap-correct-recordfrom
package-1.4.0
Open

SuperBladesman wants to merge 9 commits into
stopgap-correct-recordfrom
package-1.4.0

Conversation

@SuperBladesman

@SuperBladesman SuperBladesman commented Nov 12, 2026 •

Copy link
Copy Markdown
Owner

Packages MaplePy and Hopper. Stacked on #1; not to be merged until the owner says so. Nothing here is tagged or released.

What this is

  • maplepy 1.4.0, one package with two commands: maplepy FOLDER (or FILE.cif, or --validate) and hopper RESULTS. Python: maplepy.compute(), run_folder(), additivity(), validate().
  • Engines: MaplePy 1.3.6 (no code change) and Hopper 1.2.9 (one new column, estimated_binaries). The notebooks are the source; tools/build_engine.py copies their cells into src/maplepy/_cells/, and --check fails CI on drift. The four edits it makes are listed in the script and in docs/PACKAGE.md.
  • data/: the binary oxide table (1.1.1, CC-BY 4.0; values unchanged), with maple_library.json and common_oxidation_states.json, which the oxidation-state chain reads and the May upload lacked.
  • Tests: run under pandas 2 and 3, from an editable install and from the built wheel. The three sourced targets are asserted independently of the notebook's own checks. CI: Linux, Python 3.11 to 3.13 under pandas 2 and 3; Windows and macOS with Python 3.13.
  • Examples: constructed CIFs, none from the ICSD.
  • Corrections from an independent review: prose in both notebooks that described earlier versions (comments and documentation only); Cu₂O's recorded reference value does not reproduce (MaplePy gives 797.9 kcal/mol, not 730.0), so the table marks it unsourced and Hopper names it where used; the study is cited with its authors in the manuscript's order; software authorship lists one author until the second has agreed.

How it was checked

  • maplepy --validate: NaCl partial Madelung constants 0.8738 and Madelung factor 1.7476; rutile 3255.8 and anatase 3262.7 kcal/mol (Hoppe: 3254.6, 3260.7); BaTiO₃ additive to 0.348%.
  • tools/equivalence.py examples: both notebooks run headless against the package; every CSV identical.
  • pytest: 49 tests, under pandas 2 and 3.
  • Run on the MaplePy 1.3.6 results of the study, Hopper 1.2.9 gives all 938 perovskites and 472 pyrochlores the classification Hopper 1.2.8 gave them, with identical residuals.

https://claude.ai/code/session_01HS1S6h63219gUbA2Y8mqhb


Generated by Claude Code

The notebooks are the versions behind the J. Appl. Cryst. manuscript,
normalised for release: outputs and execution counts cleared, cell metadata
removed, notebook metadata reduced to a standard Python 3 kernel.

MaplePy 1.3.6: no code changes. The notes cell said that mixed-occupancy
sites were not handled (they have been since 1.1) and cited Eir and the
WAGII paper out of date; it is corrected. A local path in a comment is
generalised.

Hopper 1.2.9: every decomposition that uses an estimated reference value
names it, in a new column, estimated_binaries; the inline labels
'Estimated, to be updated' read 'Estimated, unsourced'; a local path in a
comment is generalised. No classification changes.

data/: the binary oxide table moves here, where Hopper looks for it, as
1.1.1 (the citation names J. Appl. Cryst.; each entry says whether it has a
source; no value changes), with maple_library.json and
common_oxidation_states.json, which the oxidation-state chain reads and
the May upload lacked.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01HS1S6h63219gUbA2Y8mqhb
tools/build_engine.py copies each notebook's code cells into
src/maplepy/_cells/, one file per cell, with every cell left out and every
edit listed and matched exactly once; --check fails if they drift. Each
engine is a module whose namespace plays the part of the notebook's kernel.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01HS1S6h63219gUbA2Y8mqhb
maplepy FOLDER runs batch_maple() on a folder; maplepy FILE.cif prints one
structure; maplepy --validate runs the notebook's three known answers;
hopper RESULTS runs Hopper on a MaplePy run. From Python: compute(),
run_folder(), additivity(), validate(), and the engines themselves.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01HS1S6h63219gUbA2Y8mqhb
Nothing here comes from the ICSD. The tests assert the three sourced
targets independently of the notebook, test each of MaplePy's decisions on
constructed structures and Hopper's classification of the examples, and
check that the package's cells are the notebooks'. CI: Linux with Python
3.11 to 3.13 under pandas 2 and 3, and Windows and macOS.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01HS1S6h63219gUbA2Y8mqhb
README, CHANGELOG (every engine version, from the version records in the
code), CONTRIBUTING, docs/PACKAGE.md, data/README.md, an issue template,
CITATION.cff and .zenodo.json for maplepy 1.4.0, and the Open Journals
draft-PDF workflow.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01HS1S6h63219gUbA2Y8mqhb
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01HS1S6h63219gUbA2Y8mqhb
… with the paper

CI on Windows found it: the notebook's batch prints check marks, and a
Windows console redirected to a file or a pipe encodes as cp1252, so
'maplepy FOLDER > log.txt' stopped on its first progress line. The command
lines now write UTF-8. A test runs them under cp1252.

The draft-PDF workflow fails on a branch without paper/, so it moves to
the branch that adds the paper.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01HS1S6h63219gUbA2Y8mqhb
Prose in both notebooks that still described earlier versions: Hopper's
table of codes, their order and a usage example naming a function that
does not exist; MaplePy's validation tolerance, batch cell and
`disordered` definition. Comments and documentation only: MaplePy keeps
1.3.6, and Hopper 1.2.9 gives every study structure the same code.

Cu2O's recorded validation value does not reproduce (MaplePy gives
797.9 kcal/mol, not 730.0), so the table marks it unsourced and Hopper
names it wherever it is used; no study structure uses it.

The paper citation names its authors in the manuscript's order. Software
authorship in CITATION.cff and .zenodo.json lists Nik alone until Peter
has agreed. Development status Beta. README: install from the tag,
subsets by space group, lower-case .cif only, CI coverage stated as run.
Tests for the _atom_type level and the single-state level of the
oxidation-state chain, and for the Cu2O value.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01HS1S6h63219gUbA2Y8mqhb
The package's README and CITATION.cff already carry both corrections, so
they are kept as they are.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01HS1S6h63219gUbA2Y8mqhb
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