terp-cli 0.5.2__tar.gz → 0.5.3__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,16 @@
1
+ Metadata-Version: 2.4
2
+ Name: terp-cli
3
+ Version: 0.5.3
4
+ Summary: Terp command-line tool — inspect, scaffolding, migrations, checks, api-docs.
5
+ License-Expression: Apache-2.0
6
+ Requires-Python: >=3.13
7
+ Requires-Dist: terp-arch==0.5.3
8
+ Requires-Dist: terp-core==0.5.3
9
+ Requires-Dist: terp-migrations==0.5.3
10
+ Provides-Extra: jobs
11
+ Requires-Dist: terp-cap-outbox==0.5.3; extra == 'jobs'
12
+ Requires-Dist: terp-cap-scheduler-apscheduler==0.5.3; extra == 'jobs'
13
+ Provides-Extra: scheduler
14
+ Requires-Dist: terp-cap-scheduler-apscheduler==0.5.3; extra == 'scheduler'
15
+ Provides-Extra: worker
16
+ Requires-Dist: terp-cap-outbox==0.5.3; extra == 'worker'
@@ -4,29 +4,29 @@ build-backend = "hatchling.build"
4
4
 
5
5
  [project]
6
6
  name = "terp-cli"
7
- version = "0.5.2"
7
+ version = "0.5.3"
8
8
  description = "Terp command-line tool — inspect, scaffolding, migrations, checks, api-docs."
9
9
  requires-python = ">=3.13"
10
10
  license = "Apache-2.0"
11
11
  dependencies = [
12
- "terp-core==0.5.2",
12
+ "terp-core==0.5.3",
13
13
  # `terp migrate` delegates to terp-migrations (lazily imported), keeping Alembic
14
14
  # off the path for `terp inspect` / `terp guide` while making migrations work.
15
- "terp-migrations==0.5.2",
15
+ "terp-migrations==0.5.3",
16
16
  # `terp guide rules` projects the live rule registry; terp-arch is imported lazily
17
17
  # (only when that topic is rendered), so it stays off the common `terp guide` path.
18
- "terp-arch==0.5.2",
18
+ "terp-arch==0.5.3",
19
19
  ]
20
20
 
21
21
  # Job-process adapters stay optional: the base CLI must not install the table-owning outbox
22
22
  # or a scheduler engine into apps that only use inspect/check/migrate. Deployments can select
23
23
  # one process role, while `jobs` is the convenient complete jobs-process bundle.
24
24
  [project.optional-dependencies]
25
- worker = ["terp-cap-outbox==0.5.2"]
26
- scheduler = ["terp-cap-scheduler-apscheduler==0.5.2"]
25
+ worker = ["terp-cap-outbox==0.5.3"]
26
+ scheduler = ["terp-cap-scheduler-apscheduler==0.5.3"]
27
27
  jobs = [
28
- "terp-cap-outbox==0.5.2",
29
- "terp-cap-scheduler-apscheduler==0.5.2",
28
+ "terp-cap-outbox==0.5.3",
29
+ "terp-cap-scheduler-apscheduler==0.5.3",
30
30
  ]
31
31
 
32
32
  [project.scripts]
@@ -372,25 +372,50 @@ Domain events (eventbus capability)
372
372
  "testing": """\
373
373
  Testing a Terp app (process-global runtime isolation)
374
374
 
375
- - create_app installs SIX process globals per app: the audit policy+sink, the event
376
- catalog+dispatcher, the job catalog+queue, the schedule catalog, the password policy,
377
- and the decrypt call site. In a test process they outlive the app that installed them.
378
- - You get isolation for free. terp-core ships a pytest plugin (terp.core.testing,
379
- registered under pytest11) whose autouse fixture SNAPSHOTS every runtime before a
380
- test and RESTORES it after. No conftest.py line, no opt-in. Without it a suite goes
381
- order-dependent: green together, red alone - the sharpest failure mode there is,
382
- because the green is the wrong answer.
383
- - Isolation does not INSTALL a runtime your test needs - that is your decision:
375
+ WHAT YOU MUST STILL DO YOURSELF. The platform UNDOES a runtime; it never INSTALLS the
376
+ one your test needs. That distinction is the whole of testing on Terp:
384
377
  * whole runtime -> compose the app in a fixture (see apps/example/tests/conftest.py,
385
378
  where db_engine + app_db are function-scoped and build() runs per test)
386
379
  * only the event bus -> the `terp_events` fixture, which installs a catalog
387
380
  (and dispatcher) for the duration of one test:
388
381
  terp_events(event_catalog, dispatcher=dispatch_in_process)
382
+ Annotate it `InstallEvents` (exported from terp.core.testing) - it carries
383
+ configure_events' real signature, so a wrong catalog is a type error.
389
384
  * asserting on what was written to a FAKE/bare session -> `terp_default_runtime`,
390
385
  which states the baseline instead of assuming it. Without it a composed app's
391
386
  durable audit sink quietly adds audit rows to the session under assertion.
392
- - If a test passes in the suite and fails alone (or vice versa), it is reading a
393
- runtime it never installed. Install it explicitly; never re-order the suite.
387
+ Deleting a conftest that INSTALLS something is not part of adopting the plugin.
388
+
389
+ WHAT YOU GET FOR FREE. terp-core ships a pytest plugin (terp.core.testing, registered
390
+ under pytest11) whose autouse fixture SNAPSHOTS every runtime before a test and
391
+ RESTORES it after. No conftest.py line, no opt-in. Without it a suite goes
392
+ order-dependent: green together, red alone - the sharpest failure mode there is,
393
+ because the green is the wrong answer.
394
+
395
+ THE SIX SEAMS. create_app installs six process globals per app; in a test process they
396
+ outlive the app that installed them. Restored automatically -- but installed by you:
397
+
398
+ seam what create_app installs who installs it in a test
399
+ audit audit policy + durable sink compose the app, else the log-only
400
+ default (terp_default_runtime)
401
+ events event catalog + dispatcher compose the app, or `terp_events`
402
+ jobs job catalog + queue compose the app
403
+ scheduling schedule catalog compose the app
404
+ passwords password policy compose the app, else the default
405
+ secrets the decrypt call site compose the app (a secrets capability)
406
+
407
+ STRICT MODE. Restoring is faithful, which is also its blind spot: a runtime installed
408
+ BEFORE the first test (a stray `import app.main` at collection time, a module-scope
409
+ create_app()) is part of the snapshot, so it is restored before every test and covers
410
+ every test equally - green together, red alone, with nothing having leaked. Strict mode
411
+ follows the snapshot with a RESET, so every test starts from the platform baseline and
412
+ a test that only ever passed on ambient state fails where it stands:
413
+ [tool.pytest.ini_options]
414
+ terp_strict_isolation = true # or: pytest --terp-strict-isolation
415
+ New projects start with it on, and the framework runs its own suites that way. Switching
416
+ it on in an existing suite can turn a green red - that red is the finding, not the
417
+ regression: the test was reading a runtime it never installed. Install it explicitly;
418
+ never re-order the suite.
394
419
  """,
395
420
  "jobs": """\
396
421
  Background jobs (terp.core.enqueue + JobCatalog)
terp_cli-0.5.2/PKG-INFO DELETED
@@ -1,16 +0,0 @@
1
- Metadata-Version: 2.4
2
- Name: terp-cli
3
- Version: 0.5.2
4
- Summary: Terp command-line tool — inspect, scaffolding, migrations, checks, api-docs.
5
- License-Expression: Apache-2.0
6
- Requires-Python: >=3.13
7
- Requires-Dist: terp-arch==0.5.2
8
- Requires-Dist: terp-core==0.5.2
9
- Requires-Dist: terp-migrations==0.5.2
10
- Provides-Extra: jobs
11
- Requires-Dist: terp-cap-outbox==0.5.2; extra == 'jobs'
12
- Requires-Dist: terp-cap-scheduler-apscheduler==0.5.2; extra == 'jobs'
13
- Provides-Extra: scheduler
14
- Requires-Dist: terp-cap-scheduler-apscheduler==0.5.2; extra == 'scheduler'
15
- Provides-Extra: worker
16
- Requires-Dist: terp-cap-outbox==0.5.2; extra == 'worker'
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes