makea-cli 0.2.12__tar.gz → 0.2.13__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.
Files changed (68) hide show
  1. {makea_cli-0.2.12 → makea_cli-0.2.13}/CHANGELOG.md +11 -0
  2. {makea_cli-0.2.12 → makea_cli-0.2.13}/PKG-INFO +1 -1
  3. makea_cli-0.2.13/makea_cli/__init__.py +1 -0
  4. {makea_cli-0.2.12 → makea_cli-0.2.13}/makea_cli/api_client.py +12 -0
  5. {makea_cli-0.2.12 → makea_cli-0.2.13}/makea_cli/commands/brand/cmd.py +21 -0
  6. {makea_cli-0.2.12 → makea_cli-0.2.13}/pyproject.toml +1 -1
  7. {makea_cli-0.2.12 → makea_cli-0.2.13}/tests/golden_manifest.json +31 -0
  8. makea_cli-0.2.13/tests/test_supplier_scorecard.py +48 -0
  9. makea_cli-0.2.12/makea_cli/__init__.py +0 -1
  10. {makea_cli-0.2.12 → makea_cli-0.2.13}/.claude/skills/create-supplier-profile/SKILL.md +0 -0
  11. {makea_cli-0.2.12 → makea_cli-0.2.13}/.claude/skills/lark-cli-setup/SKILL.md +0 -0
  12. {makea_cli-0.2.12 → makea_cli-0.2.13}/.claude/skills/link-supplier-user/SKILL.md +0 -0
  13. {makea_cli-0.2.12 → makea_cli-0.2.13}/.claude/skills/makea-cli-setup/SKILL.md +0 -0
  14. {makea_cli-0.2.12 → makea_cli-0.2.13}/.claude/skills/payment-revenue-report/SKILL.md +0 -0
  15. {makea_cli-0.2.12 → makea_cli-0.2.13}/.claude/skills/supplier-user-id-migration/SKILL.md +0 -0
  16. {makea_cli-0.2.12 → makea_cli-0.2.13}/.gitignore +0 -0
  17. {makea_cli-0.2.12 → makea_cli-0.2.13}/README.md +0 -0
  18. {makea_cli-0.2.12 → makea_cli-0.2.13}/makea-collection-upload/SKILL.md +0 -0
  19. {makea_cli-0.2.12 → makea_cli-0.2.13}/makea-collection-upload/scripts/create_products.py +0 -0
  20. {makea_cli-0.2.12 → makea_cli-0.2.13}/makea_cli/__main__.py +0 -0
  21. {makea_cli-0.2.12 → makea_cli-0.2.13}/makea_cli/auth_pkce.py +0 -0
  22. {makea_cli-0.2.12 → makea_cli-0.2.13}/makea_cli/broker.py +0 -0
  23. {makea_cli-0.2.12 → makea_cli-0.2.13}/makea_cli/commands/__init__.py +0 -0
  24. {makea_cli-0.2.12 → makea_cli-0.2.13}/makea_cli/commands/_util.py +0 -0
  25. {makea_cli-0.2.12 → makea_cli-0.2.13}/makea_cli/commands/analytics/__init__.py +0 -0
  26. {makea_cli-0.2.12 → makea_cli-0.2.13}/makea_cli/commands/analytics/cmd.py +0 -0
  27. {makea_cli-0.2.12 → makea_cli-0.2.13}/makea_cli/commands/auth/__init__.py +0 -0
  28. {makea_cli-0.2.12 → makea_cli-0.2.13}/makea_cli/commands/auth/cmd.py +0 -0
  29. {makea_cli-0.2.12 → makea_cli-0.2.13}/makea_cli/commands/brand/__init__.py +0 -0
  30. {makea_cli-0.2.12 → makea_cli-0.2.13}/makea_cli/commands/designer/__init__.py +0 -0
  31. {makea_cli-0.2.12 → makea_cli-0.2.13}/makea_cli/commands/designer/cmd.py +0 -0
  32. {makea_cli-0.2.12 → makea_cli-0.2.13}/makea_cli/commands/directory/__init__.py +0 -0
  33. {makea_cli-0.2.12 → makea_cli-0.2.13}/makea_cli/commands/directory/cmd.py +0 -0
  34. {makea_cli-0.2.12 → makea_cli-0.2.13}/makea_cli/commands/document/__init__.py +0 -0
  35. {makea_cli-0.2.12 → makea_cli-0.2.13}/makea_cli/commands/document/cmd.py +0 -0
  36. {makea_cli-0.2.12 → makea_cli-0.2.13}/makea_cli/commands/email/__init__.py +0 -0
  37. {makea_cli-0.2.12 → makea_cli-0.2.13}/makea_cli/commands/email/cmd.py +0 -0
  38. {makea_cli-0.2.12 → makea_cli-0.2.13}/makea_cli/commands/factory/__init__.py +0 -0
  39. {makea_cli-0.2.12 → makea_cli-0.2.13}/makea_cli/commands/factory/cmd.py +0 -0
  40. {makea_cli-0.2.12 → makea_cli-0.2.13}/makea_cli/commands/library/__init__.py +0 -0
  41. {makea_cli-0.2.12 → makea_cli-0.2.13}/makea_cli/commands/library/cmd.py +0 -0
  42. {makea_cli-0.2.12 → makea_cli-0.2.13}/makea_cli/commands/metrics/__init__.py +0 -0
  43. {makea_cli-0.2.12 → makea_cli-0.2.13}/makea_cli/commands/metrics/cmd.py +0 -0
  44. {makea_cli-0.2.12 → makea_cli-0.2.13}/makea_cli/commands/orders/__init__.py +0 -0
  45. {makea_cli-0.2.12 → makea_cli-0.2.13}/makea_cli/commands/orders/cmd.py +0 -0
  46. {makea_cli-0.2.12 → makea_cli-0.2.13}/makea_cli/commands/product/__init__.py +0 -0
  47. {makea_cli-0.2.12 → makea_cli-0.2.13}/makea_cli/commands/product/cmd.py +0 -0
  48. {makea_cli-0.2.12 → makea_cli-0.2.13}/makea_cli/commands/production/__init__.py +0 -0
  49. {makea_cli-0.2.12 → makea_cli-0.2.13}/makea_cli/commands/production/cmd.py +0 -0
  50. {makea_cli-0.2.12 → makea_cli-0.2.13}/makea_cli/commands/production/pricing_spec.py +0 -0
  51. {makea_cli-0.2.12 → makea_cli-0.2.13}/makea_cli/commands/supplier/__init__.py +0 -0
  52. {makea_cli-0.2.12 → makea_cli-0.2.13}/makea_cli/commands/supplier/cmd.py +0 -0
  53. {makea_cli-0.2.12 → makea_cli-0.2.13}/makea_cli/config.py +0 -0
  54. {makea_cli-0.2.12 → makea_cli-0.2.13}/makea_cli/errors.py +0 -0
  55. {makea_cli-0.2.12 → makea_cli-0.2.13}/makea_cli/identity.py +0 -0
  56. {makea_cli-0.2.12 → makea_cli-0.2.13}/makea_cli/main.py +0 -0
  57. {makea_cli-0.2.12 → makea_cli-0.2.13}/makea_cli/output.py +0 -0
  58. {makea_cli-0.2.12 → makea_cli-0.2.13}/makea_cli/posthog_client.py +0 -0
  59. {makea_cli-0.2.12 → makea_cli-0.2.13}/makea_cli/registry.py +0 -0
  60. {makea_cli-0.2.12 → makea_cli-0.2.13}/npm/makea-cli/README.md +0 -0
  61. {makea_cli-0.2.12 → makea_cli-0.2.13}/npm/makea-cli/makea-cli.mjs +0 -0
  62. {makea_cli-0.2.12 → makea_cli-0.2.13}/npm/makea-cli/package.json +0 -0
  63. {makea_cli-0.2.12 → makea_cli-0.2.13}/tests/test_broker.py +0 -0
  64. {makea_cli-0.2.12 → makea_cli-0.2.13}/tests/test_output_contract.py +0 -0
  65. {makea_cli-0.2.12 → makea_cli-0.2.13}/tests/test_persona_commands.py +0 -0
  66. {makea_cli-0.2.12 → makea_cli-0.2.13}/tests/test_pm_reads.py +0 -0
  67. {makea_cli-0.2.12 → makea_cli-0.2.13}/tests/test_registry.py +0 -0
  68. {makea_cli-0.2.12 → makea_cli-0.2.13}/uv.lock +0 -0
@@ -1,5 +1,16 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.2.13
4
+
5
+ - `designer get supplier-scorecard [SUPPLIER_ID]`: a factory's track record
6
+ with the brand's team: orders on time against the factory's confirmed date,
7
+ milestone proofs rejected, inspections with High/Critical defects, fit
8
+ rounds that needed a new sample, confirmed dates moved later, median time to
9
+ first quote and to answer the brand's asks, chases, and orders, units and
10
+ styles. Every figure carries its n and period; "too few to judge" below the
11
+ minimum. No id: every factory the brand works with. A read (auto), and
12
+ brand-private: Makea refuses it in a factory's thread.
13
+
3
14
  ## 0.2.12
4
15
 
5
16
  Fixes from a live exam of Beeboo (2026-10-10):
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.5
2
2
  Name: makea-cli
3
- Version: 0.2.12
3
+ Version: 0.2.13
4
4
  Summary: Makea admin CLI (browser login + Makea admin HTTP API)
5
5
  Requires-Python: >=3.10
6
6
  Requires-Dist: click<9,>=8.1
@@ -0,0 +1 @@
1
+ __version__ = "0.2.13"
@@ -1674,6 +1674,18 @@ def designer_get_costing(style_id: str | None = None, *, product_id: str | None
1674
1674
  return {"style_id": style_id, "packs": packs}
1675
1675
 
1676
1676
 
1677
+ def designer_get_supplier_scorecard(supplier_id: str | None = None) -> Any:
1678
+ """A factory's track record with the brand's team: on time against its
1679
+ confirmed dates, quality, responsiveness, volume. Each figure has its n and
1680
+ period; "too few to judge" below the minimum. No id: every factory the
1681
+ brand works with. Brand-private."""
1682
+ if supplier_id:
1683
+ raw = get_json(f"/designer/suppliers/{supplier_id}/scorecard")
1684
+ return raw.get("scorecard") if isinstance(raw, dict) else raw
1685
+ raw = get_json("/designer/suppliers/scorecards")
1686
+ return {"scorecards": raw.get("scorecards") if isinstance(raw, dict) else raw}
1687
+
1688
+
1677
1689
  def designer_list_actions(*, product_id: str | None = None) -> Any:
1678
1690
  """GET /designer/actions — the brand's pending actions, optionally for one product."""
1679
1691
  params = {"product_id": product_id} if product_id else None
@@ -348,6 +348,27 @@ def register(app: typer.Typer) -> None:
348
348
  console, lambda: api_client.designer_get_costing(style, product_id=product)
349
349
  )
350
350
 
351
+ @command(
352
+ app,
353
+ "designer",
354
+ "get",
355
+ "supplier-scorecard",
356
+ api="GET /designer/suppliers/{supplier_id}/scorecard",
357
+ help=(
358
+ "GET /designer/suppliers/{id}/scorecard — a factory's track record with the "
359
+ "brand's team (on time vs confirmed dates, quality, responsiveness, volume; "
360
+ "each figure with its n and period). No id: every factory the brand works "
361
+ "with. Brand-private: never shared with the factory."
362
+ ),
363
+ )
364
+ def get_supplier_scorecard(
365
+ supplier_id: str | None = typer.Argument(
366
+ None, help="Supplier id; omit for every factory the brand works with."
367
+ ),
368
+ ) -> None:
369
+ """A factory's track record with this brand."""
370
+ print_json_or_exit(console, lambda: api_client.designer_get_supplier_scorecard(supplier_id))
371
+
351
372
  @command(
352
373
  app,
353
374
  "designer",
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
4
4
 
5
5
  [project]
6
6
  name = "makea-cli"
7
- version = "0.2.12"
7
+ version = "0.2.13"
8
8
  description = "Makea admin CLI (browser login + Makea admin HTTP API)"
9
9
  readme = "README.md"
10
10
  requires-python = ">=3.10"
@@ -5477,6 +5477,37 @@
5477
5477
  }
5478
5478
  ]
5479
5479
  },
5480
+ {
5481
+ "name": "designer get supplier-scorecard",
5482
+ "persona": "designer",
5483
+ "verb": "get",
5484
+ "noun": "supplier-scorecard",
5485
+ "access": "read",
5486
+ "api": "GET /designer/suppliers/{supplier_id}/scorecard",
5487
+ "external": null,
5488
+ "side_effects": [],
5489
+ "approval": "auto",
5490
+ "reversible": null,
5491
+ "idempotent": null,
5492
+ "limit": null,
5493
+ "legacy": [],
5494
+ "help": "GET /designer/suppliers/{id}/scorecard — a factory's track record with the brand's team (on time vs confirmed dates, quality, responsiveness, volume; each figure with its n and period). No id: every factory the brand works with. Brand-private: never shared with the factory.",
5495
+ "function": "makea_cli.commands.brand.cmd.register.<locals>.get_supplier_scorecard",
5496
+ "flags": [
5497
+ {
5498
+ "name": "supplier_id",
5499
+ "kind": "argument",
5500
+ "opts": [
5501
+ "supplier_id"
5502
+ ],
5503
+ "type": "text",
5504
+ "required": false,
5505
+ "multiple": false,
5506
+ "default": null,
5507
+ "help": "Supplier id; omit for every factory the brand works with."
5508
+ }
5509
+ ]
5510
+ },
5480
5511
  {
5481
5512
  "name": "designer get tech-pack",
5482
5513
  "persona": "designer",
@@ -0,0 +1,48 @@
1
+ """`designer get supplier-scorecard`: one factory, or every factory the
2
+ brand works with.
3
+
4
+ Run with ``.venv/bin/python -m unittest tests.test_supplier_scorecard``.
5
+ """
6
+
7
+ import unittest
8
+ from unittest import mock
9
+
10
+ from makea_cli import api_client, registry
11
+
12
+
13
+ class SupplierScorecardTest(unittest.TestCase):
14
+ def test_one_factory(self):
15
+ card = {"supplier_id": "s1", "on_time": {"text": "3 of 4 on time", "n": 4}}
16
+ with mock.patch.object(
17
+ api_client, "get_json", return_value={"success": True, "scorecard": card}
18
+ ) as get:
19
+ out = api_client.designer_get_supplier_scorecard("s1")
20
+ get.assert_called_once_with("/designer/suppliers/s1/scorecard")
21
+ self.assertEqual(out, card)
22
+
23
+ def test_every_factory(self):
24
+ with mock.patch.object(
25
+ api_client,
26
+ "get_json",
27
+ return_value={"success": True, "scorecards": [{"supplier_id": "s1"}]},
28
+ ) as get:
29
+ out = api_client.designer_get_supplier_scorecard()
30
+ get.assert_called_once_with("/designer/suppliers/scorecards")
31
+ self.assertEqual(out, {"scorecards": [{"supplier_id": "s1"}]})
32
+
33
+ def test_it_is_an_automatic_read(self):
34
+ from makea_cli import __version__
35
+ from makea_cli.main import build_cli
36
+
37
+ build_cli()
38
+ entry = next(
39
+ c
40
+ for c in registry.manifest(__version__)["commands"]
41
+ if c["name"] == "designer get supplier-scorecard"
42
+ )
43
+ self.assertEqual(entry["access"], "read")
44
+ self.assertEqual(entry["approval"], "auto")
45
+
46
+
47
+ if __name__ == "__main__":
48
+ unittest.main()
@@ -1 +0,0 @@
1
- __version__ = "0.2.12"
File without changes
File without changes
File without changes
File without changes