Skip to content

Tags: bjmorgan/hofmann

Tags

v0.21.1

Toggle v0.21.1's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
Bump version to 0.21.1 (#98)

Version bump and changelog header for the 0.21.1 release.

v0.21.0

Toggle v0.21.0's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
Add set_oblique setter and finalise oblique projection docs (#94)

Adds a set_oblique(angle, foreshortening) setter matching set_orthographic/set_perspective, and finalises the oblique projection docs with a three-panel perovskite comparison.

v0.19.0

Toggle v0.19.0's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
Bump version to 0.19.0 (#74)

Version bump and add Python 3.14 classifier.

v0.18.0

Toggle v0.18.0's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
Retire AtomData range/labels caches (closes #68)

AtomData computes global_range and global_labels eagerly in
__setitem__. The global_range() and global_labels() methods are
replaced by read-only ad.ranges and ad.labels mapping attributes
backed by MappingProxyType via @Property. Callers substitute
ad.global_range(key) with ad.ranges[key] and ad.global_labels(key)
with ad.labels[key].

AtomData.__setitem__ rejects unsupported dtypes at assignment
time with a clear ValueError. Supported dtypes are bool, integer,
float, string, and object; complex, datetime, bytes, and other
dtypes previously stored successfully but failed later in the
rendering pipeline with opaque numpy errors. _resolve_numerical
also gained a local precondition check at its values.astype(float)
site to catch any future regression in the validation chain.

resolve_atom_colours is no longer part of the public API. Colour
resolution goes through StructureScene rendering methods.

Additional correctness fixes: labels stored as immutable tuples
(previously mutable lists); empty 2-D arrays return None for
ranges instead of raising; __setitem__ computes derived metadata
into locals before mutating state.

Version bumped to 0.18.0.

v0.17.0

Toggle v0.17.0's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
Freeze AtomData entries on assignment (closes #64)

AtomData.__setitem__ now copies incoming values via numpy.array and
sets writeable=False on the stored copy. In-place mutation of a
returned array (e.g. scene.atom_data["charge"][0] = 99) raises
ValueError: assignment destination is read-only instead of silently
bypassing shape validation and cache invalidation. Callers update
values by building a new array and reassigning the key.

This is a breaking change for any code that was mutating atom_data
arrays in place, so the version is bumped to 0.17.0.

v0.16.0

Toggle v0.16.0's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
Add configurable light direction for polyhedra shading (closes #49)

New light_direction parameter on RenderStyle controls the virtual
light source for polyhedra face shading. Specified in screen space
(x=right, y=up, z=towards viewer) so users can set it in terms of
figure aesthetics ("light from the upper-left") without doing 3D
geometry in their heads.

The default changes from the viewing axis (0, 0, 1) to the upper-
left (-1, 1, 1), giving visible face brightness variation from all
viewing angles -- including top-down views of layered structures
that previously produced flat, uniform shading. The previous
behaviour can be restored with light_direction=(0, 0, 1).

Legend polyhedron icons use the same light direction as the scene
for visual consistency. render_legend() also accepts light_direction
for standalone legend rendering.

Closes #49. Bumps version to 0.16.0.

v0.15.1

Toggle v0.15.1's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
Warn when rendering species with no AtomStyle

A new _warn_missing_atom_styles helper in precompute.py emits a
single batched UserWarning per render call, listing all species in
the rendering set that lack an AtomStyle. Called once from
_precompute_scene after species resolution and before any per-atom
work, so both the radius and colour fallbacks are covered by one
upstream check.

Python's default warning filter handles deduplication: identical
messages from the same call site are shown once per process.

Bumps version to 0.15.1 since this is new user-visible behaviour
that could affect downstream CI with strict warning filters.

v0.15.0

Toggle v0.15.0's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
Per-frame colouring and validated AtomData container

Introduce per-frame colourmap-based colouring for animations and
the interactive viewer.  set_atom_data now accepts 2-D arrays of
shape (n_frames, n_atoms); the rendering pipeline slices per frame
and uses cached global ranges (numeric) and global label sets
(categorical) for consistent colour scaling across frames.
Polyhedra inherit per-frame colours from their centre atoms.

Replace the plain dict backing atom_data with a validated AtomData
container (MutableMapping) that checks array shapes on assignment.
Convert StructureScene from a dataclass to a plain class with an
explicit __init__, view property with validating setter, and
atom_data property that prevents replacement with a non-AtomData
value.  The constructor API is unchanged.

Closes #44.

v0.14.2

Toggle v0.14.2's commit message
v0.14.2: Fix bond completion for padding image atoms (#38)