v5.0.0 #165
g-battaglia
announced in
Announcements
v5.0.0
#165
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Kerykeion v5.0.0 🚀
Executive summary
AstrologicalSubjectFactory,ChartDataFactory, andChartDrawer, with strongly typed models inkerykeion.schemas.site-docs/, snippet verification viascripts/test_markdown_snippets.py, and runnable examples inexamples/.kerykeion.backwordmodule keeps the legacy classes alive with deprecation warnings for a gradual migration from v4.Headline features
Factory-centred architecture
kerykeion.astrological_subject_factoryreplaces the oldAstrologicalSubjectclass and handles tropical/sidereal zodiacs, multiple house systems, geocentric/heliocentric/topocentric perspectives, cached GeoNames lookup, and active point preselection.kerykeion.schemas: Pydantic 2 models (AstrologicalSubjectModel,ChartDataModel,SingleChartAspectsModel,DualChartAspectsModel,PlanetReturnModel, etc.) with literals consolidated inkr_literals.Next-generation chart renderer
ChartDataFactoryproduces data enriched with element/quality distributions, relationship scores, house comparison, and convenience helpers for each chart type (natal, synastry, transit, composite, returns).ChartDrawernow focuses solely on SVG rendering: it supports minification, CSS inlining, and wheel/aspect-only exports (save_svg,save_wheel_only_svg_file,save_aspect_grid_only_svg_file).classic,dark,dark-high-contrast,light,strawberry), polished XML templates, and a refreshed fixed stars dataset (sweph/sefstars.txt).Upgraded astrological analysis
AspectsFactoryunifies single- and dual-chart aspects, keeps legacy aliases (NatalAspectsModel,SynastryAspectsModel) for compatibility, and introduces theaxis_orb_limitkeyword to optionally reintroduce traditional axis orbs while defaulting to modern practice (axes share the same orb as planets).HouseComparisonFactory,RelationshipScoreFactory, and the newChartDataFactoryintegrate house overlays, affinity scoring, and elemental statistics.PlanetaryReturnFactorycomputes Solar and Lunar returns via Swiss Ephemeris (methodsnext_return_from_year,next_return_from_month_and_year,next_return_from_iso_formatted_time).EphemerisDataFactory+TransitsTimeRangeFactorybuild subject time series and transit snapshots with safeguards on step size and range.distribution_method/custom_distribution_weightshooks for equal counts or bespoke weighting across single and dual charts.Documentation, examples, and tooling
site-docs/*.md, with each factory owning a detailed guide and example outputs.scripts/test_markdown_snippets.pyvalidates documentation snippets.examples/folder now ships runnable scripts (see Quickstart examples below) aligned with the docs.DEVELOPMENT.md,IMPROVE.md) have been updated with the modern workflow.Compatibility & migration from v4
from kerykeion import AstrologicalSubjectFactory, ChartDataFactory, ChartDrawer, ...).kerykeion.backwordprovides deprecated wrappers (AstrologicalSubject,KerykeionChartSVG,NatalAspects,SynastryAspects) so existing code keeps running while pointing to the new APIs.kr_typesmodule path still works but shows deprecation warnings; update tokerykeion.schemas.PlanetandAxialCuspsunified asAstrologicalPoint; legacy aliases available in v5 without warnings when imported fromschemas.kr_typesmodule and legacy wrappers) will be removed in v6.0.RelationshipScoreFactoryand the models returned byChartDataFactory.scripts/regenerate_*) realign fixtures and custom SVG assets with the new pipeline.Breaking changes
AstrologicalSubject,NatalAspects,SynastryAspects,KerykeionChartSVG,relationship_score,transits_time_range,ephemeris_data) have been removed in favour of their factory-based counterparts.kerykeion/enums.py, the entirekr_types/tree, and scattered config files were removed; everything is now centralised inschemasandsettings.pyproject.toml), with dependency locking handled viauv.lockand dependency groups.DEFAULT_ACTIVE_POINTSandDEFAULT_ACTIVE_ASPECTSare more restrictive; chart axes no longer have a forced 1° orb—use the newaxis_orb_limitkeyword argument when you need a traditional axis threshold.Migration Guide: Lunar Nodes Naming
Breaking Changes Summary
In version 5.0, we have renamed all lunar node-related fields and constants to be more explicit and consistent:
Mean_NodeMean_North_Lunar_NodeTrue_NodeTrue_North_Lunar_NodeMean_South_NodeMean_South_Lunar_NodeTrue_South_NodeTrue_South_Lunar_NodeWhy This Change?
The previous naming was ambiguous:
Mean_NodeandTrue_Nodedidn't specify they were North nodesMigration Steps
1. Update Model Field Access
Old Code:
New Code:
2. Update Active Points Lists
Old Code:
New Code:
3. Update Type Hints and Literals
Old Code:
New Code:
4. Update Custom Settings/Translations
If you ship a custom
LANGUAGE_SETTINGSdictionary (or pass overrides toChartDrawer), update lunar node keys to the new names:Custom packs can be supplied at runtime via:
Backward Compatibility
For backward compatibility, the legacy
AstrologicalSubjectwrapper inkerykeion.backwordprovides deprecated properties:Automated Migration
You can use the following sed commands to update your codebase:
Note: Always review automated changes and test thoroughly before committing.
Testing Your Migration
After migrating, ensure your tests pass:
If you encounter any issues, please:
Need Help?
If you encounter migration issues:
Other notable changes
kerykeion/settingsconsolidates chart presets insettings/chart_defaults.pyand caches configuration merges viafunctools.lru_cache.utilities.pynow hosts helpers for distributing percentages, inlining CSS, computing element/quality stats, and normalising active points.Quickstart examples (verified)
Each snippet lives in
examples/and was executed while preparing the release.Tooling for developers
scripts/regenerate_expected_aspects.py,scripts/regenerate_test_charts.py,scripts/regenerate_synastry_*.py) keep fixtures and outputs aligned with the latest algorithms.scripts/test_markdown_snippets.pyintegrates Markdown snippet verification into CI.tests/folder now includes complete coverage for every factory and the compatibility layer (tests/test_backword.py).Quality & verification
--cov; regenerated SVG snapshots and aspect fixtures reflect the tighter orb defaults.examples/scripts were executed while drafting these notes to ensure the published documentation remains runnable.Useful resources
site-docs/README.mdMany thanks to the community for the steady v5 beta feedback: this release is production-ready and lays the groundwork for advanced modules (web APIs, automation, AI integration) powered by a modern, data-first core.
This discussion was created from the release v5.0.0.
Beta Was this translation helpful? Give feedback.
All reactions