Skip to content

Commit 612a20f

Browse files
committed
docs: generate the domain table and language note from the OpenAPI spec
sync_docs.py rewrites the domain table and the multi-language note inside BEGIN/END markers in README.md and AGENTS.md, reusing codegen.py's spec loading and tag/operation grouping. generate.py runs it after codegen.py, and CI plus the lefthook hooks assert the output still reproduces from the committed spec.
1 parent 02a5678 commit 612a20f

8 files changed

Lines changed: 337 additions & 97 deletions

File tree

.github/workflows/ci.yml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,15 +27,16 @@ jobs:
2727
- run: uv sync --locked --all-extras --dev
2828

2929
# Hermetic: regenerates from the committed spec, so this verifies that the committed
30-
# generated code still reproduces from it, with no network dependency. Refreshing the
31-
# spec itself is the release workflow's job.
30+
# generated code and docs still reproduce from it, with no network dependency.
31+
# Refreshing the spec itself is the release workflow's job. generate.py also runs
32+
# sync_docs.py, so README/AGENTS are asserted in the same diff rather than a second run.
3233
- name: Codegen drift check
3334
if: matrix.python == '3.12'
3435
env:
3536
ROXYAPI_SPEC_FILE: specs/openapi.json
3637
run: |
3738
uv run python generate.py
38-
git diff --exit-code -- specs/openapi.json src/roxy_sdk/factory.py \
39+
git diff --exit-code -- specs/openapi.json src/roxy_sdk/factory.py README.md AGENTS.md \
3940
|| { echo 'codegen drift: commit the regenerated files'; exit 1; }
4041
4142
- name: Lint

.github/workflows/release.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,8 @@ jobs:
3636
- name: Install deps
3737
run: uv sync --all-extras --dev
3838

39+
# Also runs sync_docs.py internally (generate.py), so README/AGENTS are already
40+
# refreshed by the time the commit step below stages them.
3941
- name: Regenerate SDK from live spec
4042
run: uv run python generate.py
4143

@@ -116,7 +118,7 @@ jobs:
116118
git config user.email "github-actions[bot]@users.noreply.github.com"
117119
VERSION=$(cat /tmp/new_version.txt)
118120
uv lock
119-
git add pyproject.toml uv.lock src/roxy_sdk/version.py specs/openapi.json src/roxy_sdk/factory.py
121+
git add pyproject.toml uv.lock src/roxy_sdk/version.py specs/openapi.json src/roxy_sdk/factory.py README.md AGENTS.md
120122
git commit -m "release: v$VERSION"
121123
git tag "v$VERSION"
122124
git push --follow-tags

AGENTS.md

Lines changed: 28 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -46,28 +46,30 @@ lat, lng, tz = city["latitude"], city["longitude"], city["timezone"]
4646

4747
Type `roxy.` to see all available namespaces. Type `roxy.{domain}.` in an IDE with a Python LSP to see every method.
4848

49-
| Namespace | What it covers |
50-
|-----------|----------------|
51-
| `roxy.astrology` | Western astrology: natal charts, daily / weekly / monthly horoscopes, synastry, compatibility score, transits, moon phases |
52-
| `roxy.vedic_astrology` | Vedic / Jyotish: kundli, panchang, Vimshottari dasha, nakshatras, Mangal / Kaal Sarp / Sade Sati doshas, Guna Milan, navamsa, KP chart and ruling planets |
53-
| `roxy.forecast` | Cross-domain timeline: transits, ingresses, retrograde stations, dasha changes, biorhythm critical days |
54-
| `roxy.human_design` | Full bodygraph: type, strategy, authority, profile, definition, centers, channels, gates. No coordinates needed |
55-
| `roxy.chinese_astrology` | BaZi Four Pillars, Day Master strength, luck pillars, annual forecast, Chinese zodiac and compatibility, lunisolar calendar, the 24 solar terms, Tong Shu almanac and date selection |
56-
| `roxy.feng_shui` | Kua number, Eight Mansions map, Xuan Kong flying star charts, annual and monthly overlays, annual afflictions, Bagua sectors, the nine periods |
57-
| `roxy.mesoamerican_astrology` | Tzolkin day signs, the Mayan chart with Haab and Long Count, Long Count conversion, nawal compatibility, trecenas, the Aztec tonalpohualli |
58-
| `roxy.vastu` | Entrance pada, the Vastu Purusha Mandala, plot analysis, Ayadi shadvarga, room compliance, griha pravesh muhurta, directions and devatas |
59-
| `roxy.numerology` | Life path, expression, soul urge, personal year, full chart, compatibility, karmic lessons |
60-
| `roxy.kabbalah` | Gematria with every Hebrew spelling shown, name and birth profiles, the 72 names, the Tree of Life, the Hebrew letters |
61-
| `roxy.tarot` | Daily card, custom draws, three-card, Celtic Cross, yes / no, love spread, 78-card catalog |
62-
| `roxy.biorhythm` | Daily check-in, multi-day forecast, critical days, couples compatibility, phases |
63-
| `roxy.ayurveda` | Constitution from the birth chart, dinacharya, ritucharya, daily reading, the three doshas, the six tastes, the twenty qualities |
64-
| `roxy.iching` | Daily hexagram, three-coin cast, 64 hexagrams, trigrams |
65-
| `roxy.crystals` | By zodiac, by chakra, birthstone, search, daily, pairings |
66-
| `roxy.dreams` | Dream symbol dictionary (3,000+ interpretations), daily prompt |
67-
| `roxy.angel_numbers` | Number meanings, universal digit-root lookup, daily |
68-
| `roxy.location` | City search with coordinates and timezone, countries |
69-
| `roxy.usage` | API usage stats and subscription info |
70-
| `roxy.languages` | Supported response languages for the `lang` kwarg (code, English name, native name) |
49+
<!-- BEGIN:DOMAINS -->
50+
| Namespace | Methods | What it covers |
51+
|-----------|---------|----------------|
52+
| `roxy.astrology` | 39 | Western astrology API for natal birth charts, daily, weekly, monthly, and yearly horoscopes with unique content per s... |
53+
| `roxy.vedic_astrology` | 55 | Vedic astrology (Jyotish) and KP API for kundli generation with 15 divisional charts (D1-D60), Ashtakoot Gun Milan ku... |
54+
| `roxy.forecast` | 5 | Forecast API that merges upcoming transit aspects, sign ingresses, retrograde stations, new and full moons, biorhythm... |
55+
| `roxy.human_design` | 12 | Generate the full Human Design bodygraph from a birth moment: type, strategy, inner authority, profile, definition, i... |
56+
| `roxy.chinese_astrology` | 16 | Calculate BaZi Four Pillars charts, Chinese zodiac signs, and the Chinese lunisolar calendar from any birth moment: y... |
57+
| `roxy.feng_shui` | 11 | Compute classical feng shui from one API: Xuan Kong flying star natal charts for any of the nine periods and 24 mount... |
58+
| `roxy.mesoamerican_astrology` | 18 | Calculate Mayan astrology day signs, the Tzolkin sacred round, the Haab year, the full Long Count and the Aztec tonal... |
59+
| `roxy.vastu` | 10 | Vastu Shastra API for directional home and plot analysis: entrance padas with the classical effect of each of the 32... |
60+
| `roxy.numerology` | 20 | Numerology API to calculate life path, expression, soul urge, personality, and maturity numbers, with Pinnacle and Ch... |
61+
| `roxy.kabbalah` | 12 | Kabbalah API for gematria, the 72 names, the Tree of Life and the Hebrew birthday, from one key |
62+
| `roxy.tarot` | 10 | Tarot reading API with the complete 78-card Rider-Waite-Smith deck and card meanings for love, career, health, and sp... |
63+
| `roxy.biorhythm` | 6 | The most complete biorhythm API: 10 cycle types across 3 primary (physical, emotional, intellectual), 4 secondary (in... |
64+
| `roxy.ayurveda` | 8 | Ayurveda API for dosha profiles, the dinacharya daily routine and the ritucharya seasonal regimen, with a verse cited... |
65+
| `roxy.iching` | 9 | I-Ching oracle API with all 64 hexagrams, 384 changing lines, 8 trigrams, and modern interpretations for love, career... |
66+
| `roxy.crystals` | 12 | Crystal healing API covering the most popular and widely-searched healing crystals and gemstones, from Amethyst and R... |
67+
| `roxy.dreams` | 5 | Dream interpretation API with a 2,000+ symbol dream dictionary and psychological meanings covering animals, objects,... |
68+
| `roxy.angel_numbers` | 4 | Angel numbers API with meanings for 111, 222, 333, 444, 555, 666, 777, 888, 999, 1111, and 75+ sequences covering eve... |
69+
| `roxy.location` | 3 | Location and timezone API with city search and geocoding across 235,000+ cities in 240+ countries, returning latitude... |
70+
| `roxy.usage` | 1 | Monitor your API usage, check rate limits, and track request consumption |
71+
| `roxy.languages` | 2 | List the response languages accepted by the `lang` query parameter on every i18n-aware endpoint |
72+
<!-- END:DOMAINS -->
7173

7274
## Critical patterns
7375

@@ -125,14 +127,16 @@ numerology = roxy.numerology.generate_numerology_chart(
125127

126128
### Multi-language via `lang` kwarg
127129

128-
Ten languages: `en`, `tr`, `de`, `es`, `fr`, `hi`, `pt`, `ru`, `zh-Hans`, `zh-Hant`. Defaults to `en`.
130+
<!-- BEGIN:LANGS -->
131+
10 languages: `en`, `tr`, `de`, `es`, `hi`, `pt`, `fr`, `ru`, `zh-Hans`, `zh-Hant`. Defaults to `en`. Supported: `astrology`, `vedic_astrology`, `forecast`, `human_design`, `chinese_astrology`, `feng_shui`, `mesoamerican_astrology`, `vastu`, `numerology`, `kabbalah`, `tarot`, `biorhythm`, `ayurveda`, `iching`, `crystals`, `angel_numbers`, `languages`. English-only: `dreams`, `location`, `usage`.
132+
<!-- END:LANGS -->
129133

130134
```python
131135
card = roxy.tarot.get_daily_card(date="2026-04-22", lang="es")
132136
life_path = roxy.numerology.calculate_life_path(year=1990, month=1, day=15, lang="hi")
133137
```
134138

135-
Supported: `astrology`, `vedic_astrology`, `forecast`, `human_design`, `chinese_astrology`, `feng_shui`, `mesoamerican_astrology`, `vastu`, `numerology`, `kabbalah`, `tarot`, `biorhythm`, `ayurveda`, `iching`, `crystals`, `angel_numbers`. English-only: `dreams`, `location`, `usage`, `languages`. The two Chinese scripts (`zh-Hans`, `zh-Hant`) currently ship on Chinese astrology and feng shui; every other domain answers those codes in English per field. To list supported codes at runtime, call `roxy.languages.list_languages()`.
139+
The two Chinese scripts (`zh-Hans`, `zh-Hant`) currently ship on Chinese astrology and feng shui; every other domain answers those codes in English per field. To list supported codes at runtime, call `roxy.languages.list_languages()`.
136140

137141
### Error handling
138142

README.md

Lines changed: 28 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -88,27 +88,30 @@ lat, lng, tz = city["latitude"], city["longitude"], city["timezone"]
8888

8989
## Domain reference
9090

91-
| Domain | Property | What it covers |
92-
|--------|----------|----------------|
93-
| Western Astrology | `roxy.astrology` | Natal charts, daily / weekly / monthly horoscopes, synastry, compatibility score, transits, moon phases |
94-
| Vedic Astrology | `roxy.vedic_astrology` | Kundli, panchang, Vimshottari dasha, nakshatras, Mangal / Kaal Sarp / Sade Sati doshas, Guna Milan, navamsa, KP chart and ruling planets |
95-
| Forecast | `roxy.forecast` | Cross-domain timeline: transits, ingresses, stations, dasha changes, critical days |
96-
| Human Design | `roxy.human_design` | Full bodygraph: type, strategy, authority, profile, definition, centers, channels, gates |
97-
| Chinese Astrology | `roxy.chinese_astrology` | BaZi Four Pillars, Chinese zodiac, lunisolar calendar, hidden stems, Na Yin, Ten Gods, luck pillars, animal compatibility |
98-
| Feng Shui | `roxy.feng_shui` | Xuan Kong flying star charts, Kua number, Eight Mansions, annual and monthly plates, afflictions, Bagua map |
99-
| Mesoamerican Astrology | `roxy.mesoamerican_astrology` | Tzolkin day signs, the Mayan chart with Haab and Long Count, Long Count conversion, nawal compatibility, trecenas, the Aztec tonalpohualli |
100-
| Vastu | `roxy.vastu` | Entrance pada, the Vastu Purusha Mandala, plot analysis, Ayadi shadvarga, room compliance, griha pravesh muhurta, directions and devatas |
101-
| Numerology | `roxy.numerology` | Life path, expression, soul urge, personal year, full chart, compatibility, karmic lessons |
102-
| Kabbalah | `roxy.kabbalah` | Gematria with every Hebrew spelling shown, name and birth profiles, the 72 names, the Tree of Life, the Hebrew letters |
103-
| Tarot | `roxy.tarot` | Daily card, custom draws, three-card, Celtic Cross, yes / no, love spread, 78-card catalog |
104-
| Biorhythm | `roxy.biorhythm` | Daily check-in, multi-day forecast, critical days, couples compatibility, phases |
105-
| Ayurveda | `roxy.ayurveda` | Constitution from the birth chart, dinacharya, ritucharya, daily reading, the three doshas, the six tastes, the twenty qualities |
106-
| I Ching | `roxy.iching` | Daily hexagram, three-coin cast, 64 hexagrams, trigrams |
107-
| Crystals | `roxy.crystals` | By zodiac, by chakra, birthstone, search, daily, pairings |
108-
| Dreams | `roxy.dreams` | Dream symbol dictionary (3,000+ interpretations), daily prompt |
109-
| Angel Numbers | `roxy.angel_numbers` | Number meanings, universal digit-root lookup, daily |
110-
| Location | `roxy.location` | City search with coordinates and timezone, countries |
111-
| Usage | `roxy.usage` | API usage stats and subscription info |
91+
<!-- BEGIN:DOMAINS -->
92+
| Domain | Property | Methods | What it covers |
93+
|--------|----------|---------|----------------|
94+
| Western Astrology | `roxy.astrology` | 39 | Western astrology API for natal birth charts, daily, weekly, monthly, and yearly horoscopes with unique content per s... |
95+
| Vedic Astrology | `roxy.vedic_astrology` | 55 | Vedic astrology (Jyotish) and KP API for kundli generation with 15 divisional charts (D1-D60), Ashtakoot Gun Milan ku... |
96+
| Forecast | `roxy.forecast` | 5 | Forecast API that merges upcoming transit aspects, sign ingresses, retrograde stations, new and full moons, biorhythm... |
97+
| Human Design | `roxy.human_design` | 12 | Generate the full Human Design bodygraph from a birth moment: type, strategy, inner authority, profile, definition, i... |
98+
| Chinese Astrology | `roxy.chinese_astrology` | 16 | Calculate BaZi Four Pillars charts, Chinese zodiac signs, and the Chinese lunisolar calendar from any birth moment: y... |
99+
| Feng Shui | `roxy.feng_shui` | 11 | Compute classical feng shui from one API: Xuan Kong flying star natal charts for any of the nine periods and 24 mount... |
100+
| Mesoamerican Astrology | `roxy.mesoamerican_astrology` | 18 | Calculate Mayan astrology day signs, the Tzolkin sacred round, the Haab year, the full Long Count and the Aztec tonal... |
101+
| Vastu | `roxy.vastu` | 10 | Vastu Shastra API for directional home and plot analysis: entrance padas with the classical effect of each of the 32... |
102+
| Numerology | `roxy.numerology` | 20 | Numerology API to calculate life path, expression, soul urge, personality, and maturity numbers, with Pinnacle and Ch... |
103+
| Kabbalah | `roxy.kabbalah` | 12 | Kabbalah API for gematria, the 72 names, the Tree of Life and the Hebrew birthday, from one key |
104+
| Tarot | `roxy.tarot` | 10 | Tarot reading API with the complete 78-card Rider-Waite-Smith deck and card meanings for love, career, health, and sp... |
105+
| Biorhythm | `roxy.biorhythm` | 6 | The most complete biorhythm API: 10 cycle types across 3 primary (physical, emotional, intellectual), 4 secondary (in... |
106+
| Ayurveda | `roxy.ayurveda` | 8 | Ayurveda API for dosha profiles, the dinacharya daily routine and the ritucharya seasonal regimen, with a verse cited... |
107+
| I Ching | `roxy.iching` | 9 | I-Ching oracle API with all 64 hexagrams, 384 changing lines, 8 trigrams, and modern interpretations for love, career... |
108+
| Crystals | `roxy.crystals` | 12 | Crystal healing API covering the most popular and widely-searched healing crystals and gemstones, from Amethyst and R... |
109+
| Dreams | `roxy.dreams` | 5 | Dream interpretation API with a 2,000+ symbol dream dictionary and psychological meanings covering animals, objects,... |
110+
| Angel Numbers | `roxy.angel_numbers` | 4 | Angel numbers API with meanings for 111, 222, 333, 444, 555, 666, 777, 888, 999, 1111, and 75+ sequences covering eve... |
111+
| Location | `roxy.location` | 3 | Location and timezone API with city search and geocoding across 235,000+ cities in 240+ countries, returning latitude... |
112+
| Usage | `roxy.usage` | 1 | Monitor your API usage, check rate limits, and track request consumption |
113+
| Languages | `roxy.languages` | 2 | List the response languages accepted by the `lang` query parameter on every i18n-aware endpoint |
114+
<!-- END:DOMAINS -->
112115

113116
## Most-used endpoints
114117

@@ -400,14 +403,16 @@ asyncio.run(main())
400403

401404
## Multi-language responses
402405

403-
Interpretations and editorial text are available in 10 languages: English (`en`), Turkish (`tr`), German (`de`), Spanish (`es`), French (`fr`), Hindi (`hi`), Portuguese (`pt`), Russian (`ru`), Chinese Simplified (`zh-Hans`), Chinese Traditional (`zh-Hant`). Pass `lang` as a keyword argument on any supported method:
406+
<!-- BEGIN:LANGS -->
407+
Interpretations and editorial text are available in 10 languages: `en`, `tr`, `de`, `es`, `hi`, `pt`, `fr`, `ru`, `zh-Hans`, `zh-Hant`. Pass `lang` as a keyword argument on any supported method. Defaults to `en`. Supported: `astrology`, `vedic_astrology`, `forecast`, `human_design`, `chinese_astrology`, `feng_shui`, `mesoamerican_astrology`, `vastu`, `numerology`, `kabbalah`, `tarot`, `biorhythm`, `ayurveda`, `iching`, `crystals`, `angel_numbers`, `languages`. English-only: `dreams`, `location`, `usage`. Languages without translations yet fall back to English.
408+
<!-- END:LANGS -->
404409

405410
```python
406411
card = roxy.tarot.get_daily_card(date="2026-04-22", lang="es")
407412
life_path = roxy.numerology.calculate_life_path(year=1990, month=1, day=15, lang="hi")
408413
```
409414

410-
Supported: `astrology`, `vedic_astrology`, `forecast`, `human_design`, `chinese_astrology`, `feng_shui`, `mesoamerican_astrology`, `vastu`, `numerology`, `kabbalah`, `tarot`, `biorhythm`, `ayurveda`, `iching`, `crystals`, `angel_numbers`. English-only: `dreams`, `location`, `usage`. The two Chinese scripts (`zh-Hans`, `zh-Hant`) currently ship on Chinese astrology and feng shui; every other domain answers those codes in English per field. Untranslated fields fall back to English.
415+
The two Chinese scripts (`zh-Hans`, `zh-Hant`) currently ship on Chinese astrology and feng shui; every other domain answers those codes in English per field.
411416

412417
## Framework examples
413418

0 commit comments

Comments
 (0)