Skip to content

remove datasets and products modules, reset migrations - #96

Merged
antosubash merged 2 commits into
mainfrom
feature/intelligent-dewdney-542f89
Apr 30, 2026
Merged

remove datasets and products modules, reset migrations#96
antosubash merged 2 commits into
mainfrom
feature/intelligent-dewdney-542f89

Conversation

@antosubash

Copy link
Copy Markdown
Owner

Summary

  • Removes the datasets and products example modules from the workspace, along with all host/CLI/dashboard wiring and the integration + e2e tests that used products as their CRUD subject.
  • Resets host/migrations/versions/ — every existing migration is deleted and replaced by a single autogenerated 77162e7b184b_initial_schema.py covering the remaining 8 modules.
  • Dashboard's home page loses the product-count tile (4-tile grid → 3-tile) and the workspace dep on simple_module_products.

Why

datasets and products were demo modules whose names collide with custom modules users typically register themselves. Removing them simplifies the default surface and eliminates frozen migrations referencing modules that no longer exist.

What changed

Deleted

  • modules/datasets/, modules/products/ (full packages)
  • tests/integration/test_products_journey.py, test_inertia_views.py, test_permission_boundaries.py, test_soft_delete_api.py
  • tests/e2e/test_smoke.py, tests/loadtest/locustfile.py
  • All previous files under host/migrations/versions/ (replaced by one fresh migration)

Wiring

  • host/pyproject.toml, root pyproject.toml — drop simple_module_datasets / simple_module_products deps + workspace entries + ty extra-paths + pytest testpaths.
  • framework/cli/simple_module_cli/catalog.py — remove datasets and products from CATALOG, drop now-empty _EXAMPLE_MODULES, drop the examples preset, change dashboard.requires from ("users", "products") to ("users",).
  • framework/cli/simple_module_cli/new.py — drop Preset.examples.

Dashboard

  • Drop product workspace dep, Products from depends_on, _count_products + total_products from stats.py, products tile + Package icon + unused primary accent from Home.tsx, stats.products key from en.json/es.json.

Tests adapted

  • framework/db/tests/test_db_logging.py — drop TestEntityListenerLogging (used products.models.Product).
  • framework/db/tests/test_migrations.py — assertion now checks for a user table instead of a product one.
  • framework/hosting/tests/test_app.py — drop products route + permission tests.
  • framework/cli/tests/test_scaffolding_host.py — uses Dashboard/Auth instead of Products/Auth.
  • framework/cli/tests/test_cli_catalog.py, test_cli_wizard.py — adjusted for new catalog shape.
  • framework/core/tests/test_discovery.py — replaced Products assertions with Users.
  • modules/feature_flags/tests/products.bulk_importfile_storage.public_uploads (the same registry behavior, but registered by file_storage instead of products).
  • tests/integration/conftest.py — drop create_product factory.

Docs

  • README.md, docs/release.md, docs/guide/quickstart.md, docs/guide/project-structure.md, docs/e2e-testing.md updated.

Reviewer notes

  • Migration reset is destructive for existing deployments. Anyone with an existing DB needs to recreate it (or hand-stamp 77162e7b184b) — there's no upgrade path from the prior multi-revision graph to this single one.
  • The e3ce9754e6dc_seed_users_roles.py data migration is gone, but the users module already seeds the admin/user roles via bootstrap.py and on_startup, so a fresh boot still ends up with the same role rows.
  • Many remaining test files mention "products" or "Products" — those are deliberate: they're generic permission-key strings (products.view), placeholder fixture names in unit tests, or doc/comment examples. None imports the products module.

Test plan

  • uv sync --all-packages
  • make test — 943 passed, 0 failed, 2 deselected (e2e marker)
  • make test-js — 8 passed
  • make lint — ruff format/check, ty, biome, all per-workspace tsc, file-size cap, hardcoded-strings, metadata, READMEs all clean
  • make doctor (python -m simple_module_core) — exit 0
  • alembic upgrade head on fresh sqlite DB → applies cleanly to revision 77162e7b184b
  • alembic check → "No new upgrade operations detected"
  • Host boots: 8 modules discovered, /health reports is_current: true, /openapi.json shows no /api/products/* routes

antosubash added 2 commits May 1, 2026 00:09
The datasets and products example modules are removed from the workspace
along with all wiring (host pyproject, root pyproject, CLI catalog) and
the integration/e2e tests that exercised them as their CRUD subject.
Dashboard's product-count tile and the workspace dep on simple_module_products
are also dropped.

To avoid leaving frozen migrations referencing deleted modules, every file
under host/migrations/versions/ is replaced by a single autogenerated
77162e7b184b_initial_schema.py. The fresh schema contains tables for the
remaining 8 modules (auth/users/permissions/dashboard/settings/feature_flags/
file_storage/background_tasks) and `alembic check` reports no drift.

Verified: 943 Python tests pass, 8 JS tests pass, make lint clean, doctor
exits 0, host boots and /health reports the new revision as current.
Alembic autogen rolls every installed module's tables into a single
initial migration. The current 77162e7b184b lands at 382 lines and
growing the schema will only push it higher. Migrations aren't
hand-authored, so the cap doesn't add value here.
@antosubash
antosubash merged commit 95c9fa4 into main Apr 30, 2026
10 checks passed
antosubash added a commit that referenced this pull request May 2, 2026
The datasets module was removed in #96 but its name was still listed in
the release pipeline's publish-pypi matrix and in the 0.0.1 changelog
entry. Remove the matrix row (which would otherwise fail the publish job
with no matching artifacts) and update the historical package list +
count to match what actually ships.
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.

1 participant