Resolve GH #199, #200, #203, #206 (background_tasks beat, test fixtures, dashboard docs, create-host pinning) - #209
Merged
Merged
Conversation
#206 create-host: pin simple_module_* host deps (framework + selected bundled modules) to the installed lockstep version so the generated host's first `uv sync` resolves; the template's >=1.0,<2.0 / >=0.1,<1.0 ranges match nothing against pre-1.0 dists. cli passes resolve_framework_version(); scaffolding.create_host pins (skips the '*' sentinel). Split version-pinning helpers into pins.py (file-size cap). #200 testing: ship the headline app/db/client fixtures (settings, db_state, engine, db_session, app, client, authenticated_client) from the published simple_module_test plugin instead of only the framework repo's root conftest. Root conftest slimmed; README/__init__ corrected. authenticated_client keeps a lazy users import. #199 background_tasks: modules can register Celery beat entries via a module-level tasks.BEAT_SCHEDULE dict, merged in build_celery (worker-safe, built-ins authoritative on clash). Docs document the convention and the on_after_configure pitfall. #203 dashboard: documented the bundled dashboard as intentionally non-extensible (build your own page); resolved by design, no API added.
Address code-review findings on the #199/#206 work: - celery_app: don't mask a broken module tasks.py — only swallow ModuleNotFoundError when the tasks module/package genuinely doesn't exist; a tasks.py whose own import fails now surfaces. - celery_app: warn (don't silently drop) when a module beat entry name clashes with a built-in entry; built-in still wins. - scaffolding: unify the pin-or-skip rule into _should_pin_framework_version so create_host and create_module treat the None/"*" sentinels identically (a "*" passed to create_module no longer risks the invalid `==*` pin). - tests for all three.
Deploying simple-module-python with
|
| Latest commit: |
6998136
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://f661fd77.simple-module-python.pages.dev |
| Branch Preview URL: | https://worktree-fix-issues.simple-module-python.pages.dev |
Moving the app/db/client fixtures from the root conftest into the published plugin (#200) made every 'fixtures live in conftest.py' reference stale. Updated the live docs + CLAUDE.md to attribute them to the simple_module_test plugin, and expanded the module-authoring fixtures table to list the full set module authors now get (settings/db_session/app/client/authenticated_client), noting authenticated_client needs the users module. Dated plans/specs left as historical record.
This was referenced Jun 15, 2026
Closed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Addresses four open issues found while building real consumer apps on the framework.
#206 —
smpy create-hostships unsatisfiable framework pins (bug)Standalone
create-hostrendered the template's forward-looking ranges (simple_module_*>=1.0,<2.0, module deps>=0.1,<1.0) verbatim — nothing on PyPI satisfies them pre-1.0, so the generated host's firstuv syncfailed. Thesmpy newworkspace path already rewrote these via_rewrite_pyproject; standalonecreate-hostnever did.cli.pypassesresolve_framework_version()intocreate_host;scaffolding.create_hostpins everysimple_module_*host dep (framework and selected bundled modules) to the lockstep version.pins.py(own responsibility; also keepsscaffolding.pyunder the 300-line cap), re-exported viascaffolding.__all__so callers are unchanged._should_pin_framework_versionsocreate_host/create_moduletreat theNone/"*"sentinels identically.#200 — published
simple_module_testplugin doesn't ship its headline fixtures (bug)settings/db_state/engine/db_session/app/client/authenticated_clientlived only in this repo's rootconftest.py, so consumers installing the plugin hit "fixture not found" despite the README advertising them.simple_module_test/fixtures.py, registered via thepytest11plugin. Rootconftest.pyslimmed — this repo now dogfoods the plugin like any consumer.authenticated_clientkeeps a lazyusersimport (same soft-import pattern as the existing eager-celery bootstrap). README/__init__corrected.#199 — no hook for a module to register a beat schedule (bug)
beat_schedulewas a hardcoded dict; the docs implied modules could add entries and pointed at the brokenon_after_configuresignal.tasks.pywith a module-levelBEAT_SCHEDULEdict, merged inbuild_celery(worker-safe; runs identically in web/worker). Built-in entries stay authoritative on a name clash (now with a warning). Atasks.pythat fails its own import surfaces instead of being silently dropped.on_after_configurepitfall.#203 — no way to contribute dashboard cards (enhancement)
Resolved by design (maintainer decision): the bundled dashboard is intentionally non-extensible — consumers build their own dashboard page. Documented in
docs/modules/dashboard.md.Verification
ruff format --check,ruff check,ty, file-size cap, hardcoded-strings, metadata, readmes — all clean.