Skip to content

Releases: gemmology-dev/cdl-parser

v2.0.0 - CDL v2.0

16 Feb 00:57

Choose a tag to compare

CDL v2.0 - Major Release

New Features

  • Amorphous materials: amorphous[subtype]:{shapes} syntax for non-crystalline materials (opal, obsidian, pearl, etc.)
  • Nested growth: > operator for overgrowth/phantom relationships (right-associative)
  • Aggregates: ~ operator for crystal clusters, druse linings, parallel growth (6 arrangement types)
  • Group-level twins: | twin(law) on individual form groups within expressions
  • Feature definitions: Edge case handling for @feat = [feature:value] definitions

New Models

  • AmorphousDescription - for non-crystalline materials
  • NestedGrowth - overgrowth relationships
  • AggregateSpec - crystal aggregate arrangements

New Constants

  • AMORPHOUS_SUBTYPES: opalescent, glassy, waxy, resinous, cryptocrystalline
  • AMORPHOUS_SHAPES: massive, botryoidal, reniform, stalactitic, mammillary, nodular, conchoidal
  • AGGREGATE_ARRANGEMENTS: parallel, random, radial, epitaxial, druse, cluster
  • AGGREGATE_ORIENTATIONS: aligned, random, planar, spherical

Breaking Changes

  • parse_cdl() now returns CrystalDescription | AmorphousDescription (union type)
  • FormNode type expanded: CrystalForm | FormGroup | NestedGrowth | AggregateSpec
  • FormGroup gains optional twin: TwinSpec | None field

Tests

  • 239 tests (was 163, +76 new)

v1.3.0

14 Feb 17:20
5100138

Choose a tag to compare

CDL Parser v1.3.0 - Composition & Structure

New Features

  • Form grouping with parenthesized expressions: ({111} + {100})[phantom:3]
  • Form labels for documenting form purpose: prism:{10-10}@1.0
  • Named definitions with @name = expression and $name references
  • flat_forms() method for backwards-compatible flat form list extraction
  • FormGroup and FormNode types for tree-structured AST

Breaking Changes

  • CrystalDescription.forms type changed from list[CrystalForm] to list[FormNode]
  • Use desc.flat_forms() for backwards-compatible access

Bug Fixes

  • Fixed ruff lint errors (UP007, F401)
  • Fixed mypy type errors in parser and CLI
  • Applied ruff formatting

v1.0.1

26 Jan 08:32

Choose a tag to compare

Bug fixes and CI improvements

v1.0.0

21 Jan 04:16

Choose a tag to compare

Initial release of gemmology-cdl-parser.

Features

  • Crystal Description Language (CDL) parser with zero dependencies
  • Support for all 7 crystal systems and 32 point groups
  • Miller index notation (3-index {hkl} and 4-index {hkil})
  • Form combinations with scaling factors
  • Modifications (truncation, beveling, etc.)