Skip to content

Save projects in the new Edi format with simpler data downloads#203

Merged
AndrewSazonov merged 135 commits into
developfrom
edstar-project-persistence
Jun 15, 2026
Merged

Save projects in the new Edi format with simpler data downloads#203
AndrewSazonov merged 135 commits into
developfrom
edstar-project-persistence

Conversation

@AndrewSazonov

@AndrewSazonov AndrewSazonov commented Jun 14, 2026

Copy link
Copy Markdown
Member

EasyDiffraction now saves your projects in the new Edi format — a customised CIF-based format (with the .edi extension) for structures, experiments, and analysis — while report CIF output stays strict for publication and exchange.

Downloading example data and tutorials is simpler too. Datasets now have short, descriptive names grouped by kind (structures, experiments, measured data, and whole projects), and you can list and fetch them by name from the command line or interactively. The tutorial listing shows each tutorial's name, title, and a short description so it is easier to find the one you need.

Split open.md/closed.md into one Markdown file per issue under
issues/open/ (named <priority>_<title>.md) and issues/closed/
(<title>.md). Re-tier priorities across the five [priority] labels,
generate issues/index.md (open ordered by priority + closed tables),
move per-issue rationale into the issue files, and repoint references
that pointed at the removed open.md/closed.md.
Re-verified all open issues against the codebase and moved nine to
closed/: #3 (joint-fit weight rebuild via _prepare_joint_fit), #16
(serial benchmarks), #24 (CrysFML default fallbacks removed), #43
(summary module relocated), #56 (terminal-derived ASCII width), #58
(project_info_to_cif moved), #84 (None serialised as CIF '?'), #105
(fit-result reset helper now has a caller), and #137 (re-verified as a
false positive — fit() already auto-saves). Regenerated index.md.
Add the anisotropic beta-tensor ADP row and flip Uiso/Bani/Uani to done
(shipped via beta-tensor support), add one-call automatic background
estimation, and mark the basic March-Dollase preferred-orientation model
implemented in the library.
Give the isotropic and anisotropic ADP CIF handlers a stable
project_name (_atom_site.adp_iso, _atom_site_aniso.adp_NN) so EdSTAR
persistence uses the type-neutral tag for every row regardless of the
atom's adp_type. Without it, a structure mixing Biso/Uiso (or
Bani/Uani) atoms reordered per-row CIF names and crashed serialization
with a false "CIF tag mismatch in loop column" error, so such projects
could not be saved.

Derive the report ADP column label from the owning atom's adp_type
instead of the reordered CIF name, so the strict B/U report label is
correct for the type-neutral default direction too.
@AndrewSazonov AndrewSazonov changed the title Save projects in the new Edifa format with simpler data downloads Save projects in the new Edi format with simpler data downloads Jun 15, 2026
Move the table cell spacing into shared TABLE_CELL_* constants in the
tabler base module so the pandas (<table>) and Rich (<pre>) backends
apply the same compact values inline, and the JupyterLab notebook and
the built docs site render the same way.

Collapse the Rich _to_html transform to a single replace that merges
the spacing into Rich's own <pre> style attribute, preserving the
emitted font-family instead of dropping it via a duplicate attribute.

Add one scoped site rule so MkDocs-Material honours the inline spacing
on rendered HTML output tables, which its default table typography
(line-height 2.35 on .md-typeset cells) otherwise inflates. Markdown
prose tables and code-input cells are left unchanged.
Cap the `list-tutorials` table at 100 columns: it shrinks to fit
narrower terminals and stops widening past 100 on very wide ones.

Let `download-tutorial` choose the file format with composable flags:
no flag downloads the notebook (.ipynb), `--py` the plain-Python
script, and passing both downloads both. The Python API gains a
`file_format` argument validated against a new TutorialFormat enum.

The notebook is published nested (tutorials/<name>/<name>.ipynb) while
the script is a flat static copy (tutorials/<name>.py), so the script
URL is derived from the notebook URL accordingly.
The width test replaced the global shutil.get_terminal_size with a
no-argument lambda, so pytest's own get_terminal_size(fallback=...)
call during progress reporting raised TypeError and aborted the run
with an INTERNALERROR.

Extract a _list_table_width() helper and test it directly with a
signature-compatible stub, so the cap logic is verified without
disturbing pytest's terminal-size lookups.
Resolve the conflicts from merging origin/develop (cylindrical sample
absorption, PR #202) into the Edi-persistence branch:

- Port develop's absorption category to this branch's renamed
  descriptor API (TagSpec / edi_names / cif_names) and to the
  experiment_type accessor; the old CifHandler/`self.type` usages no
  longer exist here.
- Add `_absorption` to the experiment category-attach list and keep our
  `_linked_structure` rename alongside develop's new entry.
- Move the absorption parameter page under parameters/experiment/ and
  register it in the docs-blocks map; keep the ADR index, ci_skip, and
  the open-issue link pointing at the now-accepted ADR.
- Update develop's absorption tests/stubs to the renamed API.

Also fix the show_as_text table header, which still read "CIF"; the
rendered text is the Edi representation, so the column is now "Edi".
Port the merged absorption page to the project's current
parameter-page format: front-matter title, material-icon headings with
stable anchors, and per-parameter Access/Source tables (code / Edi /
coreCIF), matching the sibling extinction page.
@AndrewSazonov AndrewSazonov merged commit c0ae81f into develop Jun 15, 2026
31 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

[scope] enhancement Adds/improves features (major.MINOR.patch)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant