Skip to content

docs(examples): add pyproject.toml to rasa demo project#160

Open
itsarbit wants to merge 3 commits into
mainfrom
docs/rasa-demo-pyproject
Open

docs(examples): add pyproject.toml to rasa demo project#160
itsarbit wants to merge 3 commits into
mainfrom
docs/rasa-demo-pyproject

Conversation

@itsarbit

@itsarbit itsarbit commented Apr 23, 2026

Copy link
Copy Markdown
Contributor

Summary

Ships the canonical Rasa Pro manifest alongside the bundled CALM demo at examples/integrations/rasa/rasa_project/, so users onboarding through the arksim Rasa integration get Rasa's blessed Poetry toolchain, the rasa-pro private GCP registry, and a pinned version out of the box.

  • New: examples/integrations/rasa/rasa_project/pyproject.toml: Poetry build-system, package-mode = false, pins rasa-pro = 3.14.0 from the europe-west3 registry.
  • Updated: integration README.md prerequisites now lead with poetry install, keeps uv pip / pip as standalone fallback.
  • Changelog: [Unreleased] → Added entry referencing pyproject.toml #148.

Scope

Only the Rasa example subtree is touched. The root arksim pyproject.toml (hatchling + hatch-vcs) is unchanged, and no runtime code, CI, or tests are affected.

Test plan

  • cd examples/integrations/rasa/rasa_project && poetry install resolves rasa-pro==3.14.0 from the Rasa registry (requires RASA_PRO_LICENSE / registry auth).
  • rasa train && rasa run --enable-api still launches the demo assistant after a Poetry-based install.
  • arksim simulate-evaluate config.yaml from the parent directory completes the four bundled scenarios.
  • README renders correctly on GitHub.

Closes #148.

cc @profrodai, picked up your suggestion from #148. Renamed the package to arksim-rasa-calm-demo and set package-mode = false so it doesn't try to build as a distributable, but kept the registry block and version pin as you spec'd. Let me know if you'd prefer a different version or want toml swapped for something else in the dev group.

@itsarbit itsarbit requested a review from a team as a code owner April 23, 2026 17:34
Ship the canonical Rasa Pro manifest with the bundled CALM demo so
users who install via Poetry get the rasa-pro private registry and
the pinned version out of the box, matching Rasa's recommended
developer experience.

Closes #148.
@itsarbit itsarbit force-pushed the docs/rasa-demo-pyproject branch from ff01635 to f393b8c Compare April 23, 2026 17:41
rasa-pro 3.14.0 imports language_data at validation time but does not
declare it in its dependency graph, so a fresh poetry install followed
by rasa train fails with ModuleNotFoundError. Pin language-data
explicitly and ship the lockfile so users get a reproducible install
out of the box, matching the pattern in Rasa's own rasa-calm-demo.

The lockfile (773KB) is narrowly exempted from the check-added-large-files
hook; the global 500KB policy is unchanged.

Smoke-tested end-to-end: poetry install, rasa train, rasa run, and
arksim simulate-evaluate against all four bundled scenarios.
@itsarbit

itsarbit commented Apr 23, 2026

Copy link
Copy Markdown
Contributor Author

Smoke-tested end-to-end locally ✅

Ran the full PR test plan from a clean Poetry install:

Step Result
poetry install (against rasa-pro registry) ✅ resolves rasa-pro==3.14.0, lockfile written
poetry run rasa train ✅ model trained at models/20260423-110321-exponential-taco.tar.gz
poetry run rasa run --enable-api ✅ server up on :5005
arksim simulate-evaluate config.yaml ✅ 12 conversations across 4 scenarios, 47s eval, HTML report generated

Follow-ups folded in (commit 7ea6bca)

  1. language-data explicit pin. rasa-pro 3.14.0 imports language_data during domain-config validation but does not declare it transitively; a fresh poetry install && rasa train otherwise fails with ModuleNotFoundError: No module named 'language_data'. Added language-data = "*" to the deps with an inline comment explaining why. @profrodai, worth flagging upstream; the missing declaration in rasa-pro's install graph breaks the out-of-box DX for new users.
  2. poetry.lock shipped. Matches Rasa's own rasa-calm-demo pattern and gives users reproducible installs. Narrowly exempted from the repo's 500KB check-added-large-files hook via a path-anchored regex (global policy unchanged).

- prefix rasa train/run commands with poetry run so they pick up the
  venv created by poetry install
- align advertised python range with pyproject (3.10-3.13)
- add arksim-install hint at top of prerequisites
- explain what RASA_LICENSE and OPENAI_API_KEY are each used for
- flag --cors "*" and REST-with-no-token as local-dev-only
- point at rasa's own install docs for the private-registry auth step
  rather than inventing the incantation
- expand changelog entry so grep finds the language-data workaround
@itsarbit

itsarbit commented Apr 23, 2026

Copy link
Copy Markdown
Contributor Author

Hey Rod, thanks again for #148. We smoke-tested the full install + train + serve + eval flow end-to-end and a few things surfaced that I'd love your read on before we finalize, since they're more your canon than ours.

1. Version pin. We kept rasa-pro = 3.14.0 exactly from your snippet. Is that the version Rasa currently recommends for new integration demos, or should we track something newer (3.14.x patch, 3.16.x, etc.)? Happy to follow whatever you'd tell a new customer to pin.

2. language-data workaround. On a clean poetry install against 3.14.0, rasa train fails with ModuleNotFoundError: No module named 'language_data' inside langcodes.display_name() (triggered by verify_config_language during domain validation). We added language-data = "*" as an explicit pin to unblock training. Is this a known issue on your side, or worth us filing against RasaHQ/rasa? Also curious whether it's already been patched in a later 3.14.x, since that would let us drop the workaround.

3. Shipping poetry.lock. We committed the lockfile on the assumption it matched rasa-calm-demo, but on a closer look your demo doesn't commit one. Happy to drop ours and match Rasa's convention if that's a deliberate choice. Any reason you'd prefer we keep it for this integration specifically?

4. Registry auth for the supplemental source. I linked users at Rasa's install guide for the first-time poetry config http-basic.rasa-pro ... setup rather than writing our own incantation. If there's a better page or a shorter command Rasa recommends, I'll point at that instead.

5. priority = "supplemental". We kept your exact field here. Noticed Poetry will prefer PyPI first for every non-rasa dep with supplemental; explicit would scope the index strictly to rasa-pro and avoid any typosquat risk. Worth tightening, or is supplemental intentional?

6. Framing. Package name is currently arksim-rasa-calm-demo with Arklex as sole author. Given this is a co-authored integration, happy to reframe as a joint artifact (rename the package, add a Rasa contributor to authors). Just let us know who on your side should be listed.

Everything arksim-side has been tightened on branch 8f6bb68 (README step ordering, poetry run prefixes, --cors local-only warning, expanded changelog).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

pyproject.toml

1 participant