Skip to content

Stellium v0.17.0: Docs Infra and Fixes and Component Access

Choose a tag to compare

@katelouie katelouie released this 02 Apr 02:24
· 27 commits to main since this release

Stellium 0.17.0

Released: 2026-04-01

get_component_result() gives a central API for accessing component data. A new testing infrastructure means the docs and cookbooks actually stay accurate.


New Features

get_component_result(): Unified Component Access

Previously, getting results back out of a calculated component required knowing which storage pattern it used internally: position-based, metadata-based, dual-storage, or analyzer. Different components, different access patterns, no single answer to "how do I get this?"

That's fixed. (Fixes #25)

# Works for all components — one pattern to remember
arabic_parts = chart.get_component_result("Arabic Parts")
midpoints = chart.get_component_result("Midpoints")
dignities = chart.get_component_result("dignities")          # alias lookup works too
patterns = chart.get_component_result("Aspect Patterns")
zr = chart.get_component_result("Zodiacal Releasing")

# Don't know what's available?
print(chart.available_components())
# ['Arabic Parts', 'Aspect Patterns', 'Dignities', 'Midpoints', ...]

available_components() returns a sorted list of everything on the chart. get_component_result() raises a KeyError with a helpful message listing available names if you ask for something that isn't there.

New components automatically work with get_component_result() via a component manifest. No changes to CalculatedChart are required as the library grows.

20 new tests in test_get_component_result.py.


Infrastructure

Documentation and Cookbooks Are Now Tested

The short version: most code examples in the docs and cookbooks now run as part of CI. If a future change breaks a README example or a cookbook recipe, it'll fail loudly instead of quietly rotting.

What's tested:

  • Cookbook smoke tests (test_cookbooks.py): 17 subprocess tests covering every .py cookbook, plus opt-in notebook execution. Typst-dependent cookbooks gracefully skip when Typst isn't installed.
  • Doc code block tests (test_doc_codeblocks.py): extracts and executes Python code blocks from 11 markdown files (README, CONTRIBUTING, CLAUDE.md, docs/REPORTS, docs/VISUALIZATION, docs/options_list, and more). Blocks marked <!--pytest.mark.skip--> are excluded.
  • CI split: "library tests" and "documentation validation" now run as separate steps so doc drift is caught on every push and PR.

Setting this up found and fixed 40+ broken examples across docs and cookbooks. This was due to a mix of API drift, stale patterns, and a handful of genuine crashes in the cookbook examples. All cleaned up.

Three-Tier Test Architecture

pytest -m "not slow"    # ~2.4s: TDD inner loop
pytest                  # ~32s: full library suite (~1,938 tests)
pytest -m docs          # ~4 min: documentation validation
pytest -m notebooks     # opt-in: notebook execution (very expensive)

pytest-codeblocks, nbconvert, and ipykernel added to [dev] dependencies.


Bug Fixes

part.house in README Arabic Parts example: CelestialPosition has no .house attribute. Fixed to use chart.get_house(part.name).

polymaths.yml renamed to polymaths.yaml: the notable births registry glob (*.yaml) wasn't picking it up.

TraditionalAspectEngine removed from engines/__init__.py docstring: class doesn't exist; replaced by HarmonicAspectEngine some time ago.

add_component(AspectPatternAnalyzer()) -> add_analyzer() in preset_full() docstring.

GraphicEphemeris.draw() signature now accepts str | Path (was str only).


Upgrade Notes

pip install --upgrade stellium

get_component_result() and available_components() are purely additive. Existing component access patterns continue to work. This is just a more convenient, centralized method of access.

If you're a contributor: pip install stellium[dev] now pulls in the doc testing dependencies.