strictcli 0.10.0__tar.gz → 0.11.0__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 (126) hide show
  1. {strictcli-0.10.0/.rlsbl/bases → strictcli-0.11.0}/.github/workflows/ci.yml +1 -0
  2. {strictcli-0.10.0 → strictcli-0.11.0}/.github/workflows/publish.yml +2 -0
  3. {strictcli-0.10.0 → strictcli-0.11.0/.rlsbl/bases}/.github/workflows/ci.yml +1 -0
  4. {strictcli-0.10.0 → strictcli-0.11.0}/.rlsbl/bases/.github/workflows/publish.yml +3 -1
  5. strictcli-0.11.0/.rlsbl/changes/.validated +1 -0
  6. strictcli-0.11.0/.rlsbl/changes/0.11.0.jsonl +7 -0
  7. strictcli-0.11.0/.rlsbl/changes/0.11.0.md +5 -0
  8. {strictcli-0.10.0 → strictcli-0.11.0}/.rlsbl/config.json +2 -1
  9. {strictcli-0.10.0 → strictcli-0.11.0}/.rlsbl/hashes.json +2 -2
  10. strictcli-0.11.0/.rlsbl/hooks/pre-checks.sh +10 -0
  11. {strictcli-0.10.0 → strictcli-0.11.0}/.rlsbl/hooks/pre-release.sh +5 -0
  12. strictcli-0.11.0/.rlsbl/releases/v0.9.0.toml +3 -0
  13. strictcli-0.11.0/.rlsbl/version +1 -0
  14. {strictcli-0.10.0 → strictcli-0.11.0}/CHANGELOG.md +6 -0
  15. {strictcli-0.10.0 → strictcli-0.11.0}/PKG-INFO +1 -1
  16. {strictcli-0.10.0 → strictcli-0.11.0}/package-lock.json +2 -2
  17. {strictcli-0.10.0 → strictcli-0.11.0}/package.json +1 -1
  18. {strictcli-0.10.0 → strictcli-0.11.0}/pyproject.toml +1 -1
  19. {strictcli-0.10.0 → strictcli-0.11.0}/strictcli/__init__.py +8 -2
  20. {strictcli-0.10.0 → strictcli-0.11.0}/tests/test_check_discovery.py +67 -0
  21. {strictcli-0.10.0 → strictcli-0.11.0}/uv.lock +1 -1
  22. strictcli-0.10.0/.rlsbl/changes/.validated +0 -1
  23. strictcli-0.10.0/.rlsbl/hooks/pre-checks.sh +0 -5
  24. strictcli-0.10.0/.rlsbl/version +0 -1
  25. {strictcli-0.10.0 → strictcli-0.11.0}/.claude/settings.json +0 -0
  26. {strictcli-0.10.0 → strictcli-0.11.0}/.gitignore +0 -0
  27. {strictcli-0.10.0 → strictcli-0.11.0}/.rlsbl/bases/.claude/settings.json +0 -0
  28. {strictcli-0.10.0 → strictcli-0.11.0}/.rlsbl/bases/.gitignore +0 -0
  29. {strictcli-0.10.0 → strictcli-0.11.0}/.rlsbl/bases/.rlsbl/hooks/post-release.sh +0 -0
  30. {strictcli-0.10.0 → strictcli-0.11.0}/.rlsbl/bases/.rlsbl/hooks/pre-checks.sh +0 -0
  31. {strictcli-0.10.0 → strictcli-0.11.0}/.rlsbl/bases/.rlsbl/hooks/pre-release.sh +0 -0
  32. {strictcli-0.10.0 → strictcli-0.11.0}/.rlsbl/bases/.rlsbl/lint/go.toml +0 -0
  33. {strictcli-0.10.0 → strictcli-0.11.0}/.rlsbl/bases/.rlsbl/lint/npm.toml +0 -0
  34. {strictcli-0.10.0 → strictcli-0.11.0}/.rlsbl/bases/.rlsbl/lint/python.toml +0 -0
  35. {strictcli-0.10.0 → strictcli-0.11.0}/.rlsbl/bases/CHANGELOG.md +0 -0
  36. {strictcli-0.10.0 → strictcli-0.11.0}/.rlsbl/bases/CLAUDE.md +0 -0
  37. {strictcli-0.10.0 → strictcli-0.11.0}/.rlsbl/bases/LICENSE +0 -0
  38. {strictcli-0.10.0 → strictcli-0.11.0}/.rlsbl/changes/0.10.0.jsonl +0 -0
  39. {strictcli-0.10.0 → strictcli-0.11.0}/.rlsbl/changes/0.10.0.md +0 -0
  40. {strictcli-0.10.0 → strictcli-0.11.0}/.rlsbl/changes/0.4.0.jsonl +0 -0
  41. {strictcli-0.10.0 → strictcli-0.11.0}/.rlsbl/changes/0.4.0.md +0 -0
  42. {strictcli-0.10.0 → strictcli-0.11.0}/.rlsbl/changes/0.4.1.jsonl +0 -0
  43. {strictcli-0.10.0 → strictcli-0.11.0}/.rlsbl/changes/0.4.1.md +0 -0
  44. {strictcli-0.10.0 → strictcli-0.11.0}/.rlsbl/changes/0.5.0.jsonl +0 -0
  45. {strictcli-0.10.0 → strictcli-0.11.0}/.rlsbl/changes/0.5.0.md +0 -0
  46. {strictcli-0.10.0 → strictcli-0.11.0}/.rlsbl/changes/0.6.0.jsonl +0 -0
  47. {strictcli-0.10.0 → strictcli-0.11.0}/.rlsbl/changes/0.6.0.md +0 -0
  48. {strictcli-0.10.0 → strictcli-0.11.0}/.rlsbl/changes/0.6.1.jsonl +0 -0
  49. {strictcli-0.10.0 → strictcli-0.11.0}/.rlsbl/changes/0.6.1.md +0 -0
  50. {strictcli-0.10.0 → strictcli-0.11.0}/.rlsbl/changes/0.7.0.jsonl +0 -0
  51. {strictcli-0.10.0 → strictcli-0.11.0}/.rlsbl/changes/0.7.0.md +0 -0
  52. {strictcli-0.10.0 → strictcli-0.11.0}/.rlsbl/changes/0.7.1.jsonl +0 -0
  53. {strictcli-0.10.0 → strictcli-0.11.0}/.rlsbl/changes/0.7.1.md +0 -0
  54. {strictcli-0.10.0 → strictcli-0.11.0}/.rlsbl/changes/0.8.0.jsonl +0 -0
  55. {strictcli-0.10.0 → strictcli-0.11.0}/.rlsbl/changes/0.8.0.md +0 -0
  56. {strictcli-0.10.0 → strictcli-0.11.0}/.rlsbl/changes/0.8.1.jsonl +0 -0
  57. {strictcli-0.10.0 → strictcli-0.11.0}/.rlsbl/changes/0.8.1.md +0 -0
  58. {strictcli-0.10.0 → strictcli-0.11.0}/.rlsbl/changes/0.8.2.jsonl +0 -0
  59. {strictcli-0.10.0 → strictcli-0.11.0}/.rlsbl/changes/0.8.2.md +0 -0
  60. {strictcli-0.10.0 → strictcli-0.11.0}/.rlsbl/changes/0.8.3.jsonl +0 -0
  61. {strictcli-0.10.0 → strictcli-0.11.0}/.rlsbl/changes/0.8.3.md +0 -0
  62. {strictcli-0.10.0 → strictcli-0.11.0}/.rlsbl/changes/0.8.4.jsonl +0 -0
  63. {strictcli-0.10.0 → strictcli-0.11.0}/.rlsbl/changes/0.8.4.md +0 -0
  64. {strictcli-0.10.0 → strictcli-0.11.0}/.rlsbl/changes/0.8.5.jsonl +0 -0
  65. {strictcli-0.10.0 → strictcli-0.11.0}/.rlsbl/changes/0.8.5.md +0 -0
  66. {strictcli-0.10.0 → strictcli-0.11.0}/.rlsbl/changes/0.8.6.jsonl +0 -0
  67. {strictcli-0.10.0 → strictcli-0.11.0}/.rlsbl/changes/0.8.6.md +0 -0
  68. {strictcli-0.10.0 → strictcli-0.11.0}/.rlsbl/changes/0.8.7.jsonl +0 -0
  69. {strictcli-0.10.0 → strictcli-0.11.0}/.rlsbl/changes/0.8.7.md +0 -0
  70. {strictcli-0.10.0 → strictcli-0.11.0}/.rlsbl/changes/0.9.0.jsonl +0 -0
  71. {strictcli-0.10.0 → strictcli-0.11.0}/.rlsbl/changes/0.9.0.md +0 -0
  72. {strictcli-0.10.0 → strictcli-0.11.0}/.rlsbl/changes/0.9.1.jsonl +0 -0
  73. {strictcli-0.10.0 → strictcli-0.11.0}/.rlsbl/changes/0.9.1.md +0 -0
  74. {strictcli-0.10.0 → strictcli-0.11.0}/.rlsbl/changes/unreleased.jsonl +0 -0
  75. {strictcli-0.10.0 → strictcli-0.11.0}/.rlsbl/hooks/post-release.sh +0 -0
  76. {strictcli-0.10.0 → strictcli-0.11.0}/.rlsbl/lint/go.toml +0 -0
  77. {strictcli-0.10.0 → strictcli-0.11.0}/.rlsbl/lint/npm.toml +0 -0
  78. {strictcli-0.10.0 → strictcli-0.11.0}/.rlsbl/lint/python.toml +0 -0
  79. {strictcli-0.10.0 → strictcli-0.11.0}/.rlsbl/releases/unreleased.toml +0 -0
  80. {strictcli-0.10.0 → strictcli-0.11.0}/.rlsbl/releases/v0.10.0.toml +0 -0
  81. /strictcli-0.10.0/.rlsbl/releases/v0.9.0.toml → /strictcli-0.11.0/.rlsbl/releases/v0.11.0.toml +0 -0
  82. {strictcli-0.10.0 → strictcli-0.11.0}/.rlsbl/releases/v0.8.5.toml +0 -0
  83. {strictcli-0.10.0 → strictcli-0.11.0}/.rlsbl/releases/v0.8.6.toml +0 -0
  84. {strictcli-0.10.0 → strictcli-0.11.0}/.rlsbl/releases/v0.8.7.toml +0 -0
  85. {strictcli-0.10.0 → strictcli-0.11.0}/.rlsbl/releases/v0.9.1.toml +0 -0
  86. {strictcli-0.10.0 → strictcli-0.11.0}/.strictcli/schema.json +0 -0
  87. {strictcli-0.10.0 → strictcli-0.11.0}/CLAUDE.md +0 -0
  88. {strictcli-0.10.0 → strictcli-0.11.0}/LICENSE +0 -0
  89. {strictcli-0.10.0 → strictcli-0.11.0}/README.md +0 -0
  90. {strictcli-0.10.0 → strictcli-0.11.0}/index.js +0 -0
  91. {strictcli-0.10.0 → strictcli-0.11.0}/postinstall.js +0 -0
  92. {strictcli-0.10.0 → strictcli-0.11.0}/tests/test_arg_default.py +0 -0
  93. {strictcli-0.10.0 → strictcli-0.11.0}/tests/test_at_prefix.py +0 -0
  94. {strictcli-0.10.0 → strictcli-0.11.0}/tests/test_auto_version.py +0 -0
  95. {strictcli-0.10.0 → strictcli-0.11.0}/tests/test_check_command.py +0 -0
  96. {strictcli-0.10.0 → strictcli-0.11.0}/tests/test_check_runner.py +0 -0
  97. {strictcli-0.10.0 → strictcli-0.11.0}/tests/test_check_schema.py +0 -0
  98. {strictcli-0.10.0 → strictcli-0.11.0}/tests/test_check_types.py +0 -0
  99. {strictcli-0.10.0 → strictcli-0.11.0}/tests/test_choices.py +0 -0
  100. {strictcli-0.10.0 → strictcli-0.11.0}/tests/test_command_help_suggestion.py +0 -0
  101. {strictcli-0.10.0 → strictcli-0.11.0}/tests/test_config.py +0 -0
  102. {strictcli-0.10.0 → strictcli-0.11.0}/tests/test_config_file_path.py +0 -0
  103. {strictcli-0.10.0 → strictcli-0.11.0}/tests/test_deep_nesting.py +0 -0
  104. {strictcli-0.10.0 → strictcli-0.11.0}/tests/test_dependencies.py +0 -0
  105. {strictcli-0.10.0 → strictcli-0.11.0}/tests/test_deprecated.py +0 -0
  106. {strictcli-0.10.0 → strictcli-0.11.0}/tests/test_dump_schema.py +0 -0
  107. {strictcli-0.10.0 → strictcli-0.11.0}/tests/test_e2e.py +0 -0
  108. {strictcli-0.10.0 → strictcli-0.11.0}/tests/test_env.py +0 -0
  109. {strictcli-0.10.0 → strictcli-0.11.0}/tests/test_exit_codes.py +0 -0
  110. {strictcli-0.10.0 → strictcli-0.11.0}/tests/test_float_type.py +0 -0
  111. {strictcli-0.10.0 → strictcli-0.11.0}/tests/test_global_flags.py +0 -0
  112. {strictcli-0.10.0 → strictcli-0.11.0}/tests/test_help.py +0 -0
  113. {strictcli-0.10.0 → strictcli-0.11.0}/tests/test_int_type.py +0 -0
  114. {strictcli-0.10.0 → strictcli-0.11.0}/tests/test_mutex.py +0 -0
  115. {strictcli-0.10.0 → strictcli-0.11.0}/tests/test_nesting.py +0 -0
  116. {strictcli-0.10.0 → strictcli-0.11.0}/tests/test_parser.py +0 -0
  117. {strictcli-0.10.0 → strictcli-0.11.0}/tests/test_passthrough.py +0 -0
  118. {strictcli-0.10.0 → strictcli-0.11.0}/tests/test_registration.py +0 -0
  119. {strictcli-0.10.0 → strictcli-0.11.0}/tests/test_repeatable.py +0 -0
  120. {strictcli-0.10.0 → strictcli-0.11.0}/tests/test_tagdsl.py +0 -0
  121. {strictcli-0.10.0 → strictcli-0.11.0}/tests/test_tags.py +0 -0
  122. {strictcli-0.10.0 → strictcli-0.11.0}/tests/test_toml_loading.py +0 -0
  123. {strictcli-0.10.0 → strictcli-0.11.0}/tests/test_validate.py +0 -0
  124. {strictcli-0.10.0 → strictcli-0.11.0}/tests/test_variadic.py +0 -0
  125. {strictcli-0.10.0 → strictcli-0.11.0}/todo/.defer/deferred.md +0 -0
  126. {strictcli-0.10.0 → strictcli-0.11.0}/todo/.done/original-idea.md +0 -0
@@ -5,6 +5,7 @@ on:
5
5
  branches: [main]
6
6
  pull_request:
7
7
  branches: [main]
8
+ workflow_dispatch:
8
9
 
9
10
  jobs:
10
11
  test:
@@ -3,6 +3,8 @@ name: Publish
3
3
  on:
4
4
  release:
5
5
  types: [published]
6
+ workflow_dispatch:
7
+
6
8
 
7
9
  permissions:
8
10
  contents: read
@@ -5,6 +5,7 @@ on:
5
5
  branches: [main]
6
6
  pull_request:
7
7
  branches: [main]
8
+ workflow_dispatch:
8
9
 
9
10
  jobs:
10
11
  test:
@@ -3,6 +3,8 @@ name: Publish
3
3
  on:
4
4
  release:
5
5
  types: [published]
6
+ workflow_dispatch:
7
+
6
8
 
7
9
  permissions:
8
10
  contents: read
@@ -24,7 +26,7 @@ jobs:
24
26
  - uses: actions/setup-node@v6
25
27
  with:
26
28
  node-version: 24
27
- registry-url: {{registryUrl}}
29
+ registry-url: https://registry.npmjs.org
28
30
  - run: npm publish --provenance --access public
29
31
  env:
30
32
  NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
@@ -0,0 +1 @@
1
+ 228f7f6e4e51965e7f3cc19ea1d112e915b585c8
@@ -0,0 +1,7 @@
1
+ {"commits":["feae73fae6f1e08f1355bc7c1b9beae842397517"],"user_facing":false}
2
+ {"commits":["087bd6cb358bf6ebf99e2635e93a2fdc59ac5517"],"user_facing":false}
3
+ {"commits":["f7e07e1d5ce69895df1a95da9c51ab686300e0b3"],"user_facing":false}
4
+ {"commits":["f96d157204a50c577f78b99667be81472e23bfe7"],"user_facing":false}
5
+ {"commits":["c7ee8c1401de38d9e086c38284388497c54cca0a"],"user_facing":true,"description":"**New feature.** `checks_path` parameter on `App` for explicit checks.toml location, replacing CWD-based discovery.","type":"feature"}
6
+ {"commits":["dd7a103769db5bccfaabb2636fce0ef5082e2159","df35fbde862721ef8b01a483abf6b33e5387afa8"],"user_facing":false}
7
+ {"commits":["f94f50bad6401756ca75ee82b31fbfc7e85edc83"],"user_facing":false}
@@ -0,0 +1,5 @@
1
+ ## 0.11.0
2
+
3
+ ### Features
4
+
5
+ - **New feature.** `checks_path` parameter on `App` for explicit checks.toml location, replacing CWD-based discovery.
@@ -3,5 +3,6 @@
3
3
  "pypi",
4
4
  "npm"
5
5
  ],
6
- "private": false
6
+ "private": false,
7
+ "push_timeout": 300
7
8
  }
@@ -1,6 +1,6 @@
1
1
  {
2
- ".github/workflows/ci.yml": "d1da13d13914be16b2ecafe67afc62d611dc8dcc4ebc9db2befd84c2d6296ab2",
3
- ".github/workflows/publish.yml": "5f4ac1bf0bdd4c70041e3d2502efaae28d29eca7575e8ff12fdaad0d3af5b17a",
2
+ ".github/workflows/ci.yml": "b4e075171b131d25f9cce55a3e3a30732e95a2a794af00f354ee3200626d6a04",
3
+ ".github/workflows/publish.yml": "8befe0164321eb68e9465c634aa15d6ccb30d46fa669f7d30bf3ed064ad258ba",
4
4
  "CHANGELOG.md": "7a6ec46141007c18090a0ff325e2dd68cd51588c4e0b5af7b580365e5eaaca85",
5
5
  ".gitignore": "c89d76c6c43e7f0897b3472a15b7c0103e0be5b3a04c2b44e585fa48bdcda2bb",
6
6
  "LICENSE": "e958892abc1dd5d991fca6d528e695d335f25773d373d2e0be5f4a9507d8f8d5",
@@ -0,0 +1,10 @@
1
+ #!/usr/bin/env bash
2
+ set -euo pipefail
3
+ # This hook runs BEFORE built-in pre-release checks (tests, lint).
4
+ # Use it for setup tasks: starting services, setting env vars, etc.
5
+ # Built-in checks run after this hook. Custom validation goes in pre-release.sh.
6
+
7
+ # Ensure strictcli and conformance tool are installed (editable)
8
+ REPO_ROOT="$(git rev-parse --show-toplevel)"
9
+ pip install -e "$REPO_ROOT/python" --break-system-packages --quiet 2>/dev/null || true
10
+ pip install -e "$REPO_ROOT/conformance" --break-system-packages --quiet 2>/dev/null || true
@@ -6,3 +6,8 @@ set -euo pipefail
6
6
  # - Check for uncommitted documentation
7
7
  # - Verify external service connectivity
8
8
  # - Run integration tests not covered by the test suite
9
+
10
+ # Run conformance checks before release
11
+ REPO_ROOT="$(git rev-parse --show-toplevel)"
12
+ cd "$REPO_ROOT/conformance"
13
+ conformance check --tag pre-release
@@ -0,0 +1,3 @@
1
+ bump = "minor"
2
+ include = ["pypi", "npm"]
3
+ exclude = []
@@ -0,0 +1 @@
1
+ 0.45.0
@@ -2,6 +2,12 @@
2
2
 
3
3
  # Changelog
4
4
 
5
+ ## 0.11.0
6
+
7
+ ### Features
8
+
9
+ - **New feature.** `checks_path` parameter on `App` for explicit checks.toml location, replacing CWD-based discovery.
10
+
5
11
  ## 0.10.0
6
12
 
7
13
  ### Features
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: strictcli
3
- Version: 0.10.0
3
+ Version: 0.11.0
4
4
  Summary: A strict, zero-dependency CLI framework for Python
5
5
  Project-URL: Homepage, https://github.com/smm-h/strictcli
6
6
  Project-URL: Repository, https://github.com/smm-h/strictcli
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "strictcli",
3
- "version": "0.10.0",
3
+ "version": "0.11.0",
4
4
  "lockfileVersion": 3,
5
5
  "requires": true,
6
6
  "packages": {
7
7
  "": {
8
8
  "name": "strictcli",
9
- "version": "0.10.0",
9
+ "version": "0.11.0",
10
10
  "hasInstallScript": true,
11
11
  "license": "MIT"
12
12
  }
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "strictcli",
3
- "version": "0.10.0",
3
+ "version": "0.11.0",
4
4
  "description": "A strict, zero-dependency CLI framework for Python (npm wrapper)",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
4
4
 
5
5
  [project]
6
6
  name = "strictcli"
7
- version = "0.10.0"
7
+ version = "0.11.0"
8
8
  description = "A strict, zero-dependency CLI framework for Python"
9
9
  readme = "README.md"
10
10
  license = "MIT"
@@ -2,7 +2,7 @@
2
2
 
3
3
  from __future__ import annotations
4
4
 
5
- __version__ = "0.10.0"
5
+ __version__ = "0.11.0"
6
6
 
7
7
  __all__ = [
8
8
  "App", "Flag", "Arg", "Tag", "MutexGroup", "CoRequired", "Requires",
@@ -667,6 +667,7 @@ class App:
667
667
  config: bool = False
668
668
  config_path: str | None = None
669
669
  config_format: str = "json"
670
+ checks_path: str | Path | None = None
670
671
  flags: list[Flag] = field(default_factory=list)
671
672
  _commands: dict[str, Command] = field(default_factory=dict)
672
673
  _groups: dict[str, Group] = field(default_factory=dict)
@@ -704,7 +705,12 @@ class App:
704
705
  self._register_config_group()
705
706
  # Discover checks TOML
706
707
  self._check_context_factory: Callable | None = None
707
- checks_toml_path = Path.cwd() / ".strictcli" / "checks.toml"
708
+ if self.checks_path is not None:
709
+ checks_toml_path = Path(self.checks_path).resolve()
710
+ if not checks_toml_path.is_file():
711
+ raise ValueError(f"checks_path does not exist: {self.checks_path}")
712
+ else:
713
+ checks_toml_path = Path.cwd() / ".strictcli" / "checks.toml"
708
714
  if checks_toml_path.is_file():
709
715
  self._check_defs: dict[str, _CheckDef] = _load_checks_toml(checks_toml_path)
710
716
  self._checks_enabled = True
@@ -63,6 +63,73 @@ class TestDiscovery:
63
63
  strictcli.App(name="testapp", version="1.0.0", help="test app")
64
64
 
65
65
 
66
+ class TestChecksPath:
67
+ def test_explicit_path_discovers_checks(self, tmp_path, monkeypatch):
68
+ """checks_path points to a valid TOML in a non-CWD directory."""
69
+ # Put checks.toml somewhere that is NOT CWD/.strictcli/
70
+ custom_dir = tmp_path / "custom"
71
+ custom_dir.mkdir()
72
+ toml_file = custom_dir / "checks.toml"
73
+ toml_file.write_text(VALID_TOML)
74
+
75
+ # chdir to a directory with NO .strictcli/
76
+ empty_dir = tmp_path / "empty"
77
+ empty_dir.mkdir()
78
+ monkeypatch.chdir(empty_dir)
79
+
80
+ app = strictcli.App(
81
+ name="testapp", version="1.0.0", help="test app",
82
+ checks_path=str(toml_file),
83
+ )
84
+ assert app._checks_enabled is True
85
+ assert "lint-code" in app._check_defs
86
+ assert "check-deps" in app._check_defs
87
+
88
+ def test_explicit_path_as_pathlib(self, tmp_path, monkeypatch):
89
+ """checks_path accepts a Path object."""
90
+ custom_dir = tmp_path / "custom"
91
+ custom_dir.mkdir()
92
+ toml_file = custom_dir / "checks.toml"
93
+ toml_file.write_text(VALID_TOML)
94
+
95
+ empty_dir = tmp_path / "empty"
96
+ empty_dir.mkdir()
97
+ monkeypatch.chdir(empty_dir)
98
+
99
+ from pathlib import Path
100
+
101
+ app = strictcli.App(
102
+ name="testapp", version="1.0.0", help="test app",
103
+ checks_path=Path(str(toml_file)),
104
+ )
105
+ assert app._checks_enabled is True
106
+ assert "lint-code" in app._check_defs
107
+
108
+ def test_nonexistent_path_raises(self, tmp_path, monkeypatch):
109
+ """checks_path pointing to a missing file raises ValueError."""
110
+ monkeypatch.chdir(tmp_path)
111
+ bad_path = tmp_path / "nope" / "checks.toml"
112
+
113
+ with pytest.raises(ValueError, match="checks_path does not exist"):
114
+ strictcli.App(
115
+ name="testapp", version="1.0.0", help="test app",
116
+ checks_path=str(bad_path),
117
+ )
118
+
119
+ def test_none_uses_cwd_discovery(self, tmp_path, monkeypatch):
120
+ """checks_path=None (default) falls back to CWD-based discovery."""
121
+ (tmp_path / ".strictcli").mkdir()
122
+ (tmp_path / ".strictcli" / "checks.toml").write_text(VALID_TOML)
123
+ monkeypatch.chdir(tmp_path)
124
+
125
+ app = strictcli.App(
126
+ name="testapp", version="1.0.0", help="test app",
127
+ checks_path=None,
128
+ )
129
+ assert app._checks_enabled is True
130
+ assert "lint-code" in app._check_defs
131
+
132
+
66
133
  class TestCheckDecorator:
67
134
  def test_registers_implementation(self, tmp_path, monkeypatch):
68
135
  (tmp_path / ".strictcli").mkdir()
@@ -232,7 +232,7 @@ wheels = [
232
232
 
233
233
  [[package]]
234
234
  name = "strictcli"
235
- version = "0.10.0"
235
+ version = "0.11.0"
236
236
  source = { editable = "." }
237
237
 
238
238
  [package.dev-dependencies]
@@ -1 +0,0 @@
1
- 241a0b1102d02359dc80c640d8c8a17697f05a9b
@@ -1,5 +0,0 @@
1
- #!/usr/bin/env bash
2
- set -euo pipefail
3
- # This hook runs BEFORE built-in pre-release checks (tests, lint).
4
- # Use it for setup tasks: starting services, setting env vars, etc.
5
- # Built-in checks run after this hook. Custom validation goes in pre-release.sh.
@@ -1 +0,0 @@
1
- 0.42.0
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes