strictcli 0.9.0__tar.gz → 0.9.1__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 (118) hide show
  1. strictcli-0.9.1/.rlsbl/changes/.validated +1 -0
  2. strictcli-0.9.1/.rlsbl/changes/0.9.1.jsonl +9 -0
  3. strictcli-0.9.1/.rlsbl/changes/0.9.1.md +9 -0
  4. strictcli-0.9.1/.rlsbl/releases/v0.9.1.toml +3 -0
  5. strictcli-0.9.1/.rlsbl/version +1 -0
  6. {strictcli-0.9.0 → strictcli-0.9.1}/CHANGELOG.md +10 -0
  7. {strictcli-0.9.0 → strictcli-0.9.1}/PKG-INFO +1 -1
  8. {strictcli-0.9.0 → strictcli-0.9.1}/package-lock.json +2 -2
  9. {strictcli-0.9.0 → strictcli-0.9.1}/package.json +1 -1
  10. {strictcli-0.9.0 → strictcli-0.9.1}/pyproject.toml +1 -1
  11. {strictcli-0.9.0 → strictcli-0.9.1}/strictcli/__init__.py +6 -1
  12. strictcli-0.9.1/tests/test_config_file_path.py +60 -0
  13. {strictcli-0.9.0 → strictcli-0.9.1}/uv.lock +1 -1
  14. strictcli-0.9.0/.rlsbl/changes/.validated +0 -1
  15. strictcli-0.9.0/.rlsbl/version +0 -1
  16. {strictcli-0.9.0 → strictcli-0.9.1}/.claude/settings.json +0 -0
  17. {strictcli-0.9.0 → strictcli-0.9.1}/.github/workflows/ci.yml +0 -0
  18. {strictcli-0.9.0 → strictcli-0.9.1}/.github/workflows/publish.yml +0 -0
  19. {strictcli-0.9.0 → strictcli-0.9.1}/.gitignore +0 -0
  20. {strictcli-0.9.0 → strictcli-0.9.1}/.rlsbl/bases/.claude/settings.json +0 -0
  21. {strictcli-0.9.0 → strictcli-0.9.1}/.rlsbl/bases/.github/workflows/ci.yml +0 -0
  22. {strictcli-0.9.0 → strictcli-0.9.1}/.rlsbl/bases/.github/workflows/publish.yml +0 -0
  23. {strictcli-0.9.0 → strictcli-0.9.1}/.rlsbl/bases/.gitignore +0 -0
  24. {strictcli-0.9.0 → strictcli-0.9.1}/.rlsbl/bases/.rlsbl/hooks/post-release.sh +0 -0
  25. {strictcli-0.9.0 → strictcli-0.9.1}/.rlsbl/bases/.rlsbl/hooks/pre-checks.sh +0 -0
  26. {strictcli-0.9.0 → strictcli-0.9.1}/.rlsbl/bases/.rlsbl/hooks/pre-release.sh +0 -0
  27. {strictcli-0.9.0 → strictcli-0.9.1}/.rlsbl/bases/.rlsbl/lint/go.toml +0 -0
  28. {strictcli-0.9.0 → strictcli-0.9.1}/.rlsbl/bases/.rlsbl/lint/npm.toml +0 -0
  29. {strictcli-0.9.0 → strictcli-0.9.1}/.rlsbl/bases/.rlsbl/lint/python.toml +0 -0
  30. {strictcli-0.9.0 → strictcli-0.9.1}/.rlsbl/bases/CHANGELOG.md +0 -0
  31. {strictcli-0.9.0 → strictcli-0.9.1}/.rlsbl/bases/CLAUDE.md +0 -0
  32. {strictcli-0.9.0 → strictcli-0.9.1}/.rlsbl/bases/LICENSE +0 -0
  33. {strictcli-0.9.0 → strictcli-0.9.1}/.rlsbl/changes/0.4.0.jsonl +0 -0
  34. {strictcli-0.9.0 → strictcli-0.9.1}/.rlsbl/changes/0.4.0.md +0 -0
  35. {strictcli-0.9.0 → strictcli-0.9.1}/.rlsbl/changes/0.4.1.jsonl +0 -0
  36. {strictcli-0.9.0 → strictcli-0.9.1}/.rlsbl/changes/0.4.1.md +0 -0
  37. {strictcli-0.9.0 → strictcli-0.9.1}/.rlsbl/changes/0.5.0.jsonl +0 -0
  38. {strictcli-0.9.0 → strictcli-0.9.1}/.rlsbl/changes/0.5.0.md +0 -0
  39. {strictcli-0.9.0 → strictcli-0.9.1}/.rlsbl/changes/0.6.0.jsonl +0 -0
  40. {strictcli-0.9.0 → strictcli-0.9.1}/.rlsbl/changes/0.6.0.md +0 -0
  41. {strictcli-0.9.0 → strictcli-0.9.1}/.rlsbl/changes/0.6.1.jsonl +0 -0
  42. {strictcli-0.9.0 → strictcli-0.9.1}/.rlsbl/changes/0.6.1.md +0 -0
  43. {strictcli-0.9.0 → strictcli-0.9.1}/.rlsbl/changes/0.7.0.jsonl +0 -0
  44. {strictcli-0.9.0 → strictcli-0.9.1}/.rlsbl/changes/0.7.0.md +0 -0
  45. {strictcli-0.9.0 → strictcli-0.9.1}/.rlsbl/changes/0.7.1.jsonl +0 -0
  46. {strictcli-0.9.0 → strictcli-0.9.1}/.rlsbl/changes/0.7.1.md +0 -0
  47. {strictcli-0.9.0 → strictcli-0.9.1}/.rlsbl/changes/0.8.0.jsonl +0 -0
  48. {strictcli-0.9.0 → strictcli-0.9.1}/.rlsbl/changes/0.8.0.md +0 -0
  49. {strictcli-0.9.0 → strictcli-0.9.1}/.rlsbl/changes/0.8.1.jsonl +0 -0
  50. {strictcli-0.9.0 → strictcli-0.9.1}/.rlsbl/changes/0.8.1.md +0 -0
  51. {strictcli-0.9.0 → strictcli-0.9.1}/.rlsbl/changes/0.8.2.jsonl +0 -0
  52. {strictcli-0.9.0 → strictcli-0.9.1}/.rlsbl/changes/0.8.2.md +0 -0
  53. {strictcli-0.9.0 → strictcli-0.9.1}/.rlsbl/changes/0.8.3.jsonl +0 -0
  54. {strictcli-0.9.0 → strictcli-0.9.1}/.rlsbl/changes/0.8.3.md +0 -0
  55. {strictcli-0.9.0 → strictcli-0.9.1}/.rlsbl/changes/0.8.4.jsonl +0 -0
  56. {strictcli-0.9.0 → strictcli-0.9.1}/.rlsbl/changes/0.8.4.md +0 -0
  57. {strictcli-0.9.0 → strictcli-0.9.1}/.rlsbl/changes/0.8.5.jsonl +0 -0
  58. {strictcli-0.9.0 → strictcli-0.9.1}/.rlsbl/changes/0.8.5.md +0 -0
  59. {strictcli-0.9.0 → strictcli-0.9.1}/.rlsbl/changes/0.8.6.jsonl +0 -0
  60. {strictcli-0.9.0 → strictcli-0.9.1}/.rlsbl/changes/0.8.6.md +0 -0
  61. {strictcli-0.9.0 → strictcli-0.9.1}/.rlsbl/changes/0.8.7.jsonl +0 -0
  62. {strictcli-0.9.0 → strictcli-0.9.1}/.rlsbl/changes/0.8.7.md +0 -0
  63. {strictcli-0.9.0 → strictcli-0.9.1}/.rlsbl/changes/0.9.0.jsonl +0 -0
  64. {strictcli-0.9.0 → strictcli-0.9.1}/.rlsbl/changes/0.9.0.md +0 -0
  65. {strictcli-0.9.0 → strictcli-0.9.1}/.rlsbl/changes/unreleased.jsonl +0 -0
  66. {strictcli-0.9.0 → strictcli-0.9.1}/.rlsbl/config.json +0 -0
  67. {strictcli-0.9.0 → strictcli-0.9.1}/.rlsbl/hashes.json +0 -0
  68. {strictcli-0.9.0 → strictcli-0.9.1}/.rlsbl/hooks/post-release.sh +0 -0
  69. {strictcli-0.9.0 → strictcli-0.9.1}/.rlsbl/hooks/pre-checks.sh +0 -0
  70. {strictcli-0.9.0 → strictcli-0.9.1}/.rlsbl/hooks/pre-release.sh +0 -0
  71. {strictcli-0.9.0 → strictcli-0.9.1}/.rlsbl/lint/go.toml +0 -0
  72. {strictcli-0.9.0 → strictcli-0.9.1}/.rlsbl/lint/npm.toml +0 -0
  73. {strictcli-0.9.0 → strictcli-0.9.1}/.rlsbl/lint/python.toml +0 -0
  74. {strictcli-0.9.0 → strictcli-0.9.1}/.rlsbl/releases/unreleased.toml +0 -0
  75. {strictcli-0.9.0 → strictcli-0.9.1}/.rlsbl/releases/v0.8.5.toml +0 -0
  76. {strictcli-0.9.0 → strictcli-0.9.1}/.rlsbl/releases/v0.8.6.toml +0 -0
  77. {strictcli-0.9.0 → strictcli-0.9.1}/.rlsbl/releases/v0.8.7.toml +0 -0
  78. {strictcli-0.9.0 → strictcli-0.9.1}/.rlsbl/releases/v0.9.0.toml +0 -0
  79. {strictcli-0.9.0 → strictcli-0.9.1}/.strictcli/schema.json +0 -0
  80. {strictcli-0.9.0 → strictcli-0.9.1}/CLAUDE.md +0 -0
  81. {strictcli-0.9.0 → strictcli-0.9.1}/LICENSE +0 -0
  82. {strictcli-0.9.0 → strictcli-0.9.1}/README.md +0 -0
  83. {strictcli-0.9.0 → strictcli-0.9.1}/index.js +0 -0
  84. {strictcli-0.9.0 → strictcli-0.9.1}/postinstall.js +0 -0
  85. {strictcli-0.9.0 → strictcli-0.9.1}/tests/test_arg_default.py +0 -0
  86. {strictcli-0.9.0 → strictcli-0.9.1}/tests/test_auto_version.py +0 -0
  87. {strictcli-0.9.0 → strictcli-0.9.1}/tests/test_check_command.py +0 -0
  88. {strictcli-0.9.0 → strictcli-0.9.1}/tests/test_check_discovery.py +0 -0
  89. {strictcli-0.9.0 → strictcli-0.9.1}/tests/test_check_runner.py +0 -0
  90. {strictcli-0.9.0 → strictcli-0.9.1}/tests/test_check_schema.py +0 -0
  91. {strictcli-0.9.0 → strictcli-0.9.1}/tests/test_check_types.py +0 -0
  92. {strictcli-0.9.0 → strictcli-0.9.1}/tests/test_choices.py +0 -0
  93. {strictcli-0.9.0 → strictcli-0.9.1}/tests/test_command_help_suggestion.py +0 -0
  94. {strictcli-0.9.0 → strictcli-0.9.1}/tests/test_config.py +0 -0
  95. {strictcli-0.9.0 → strictcli-0.9.1}/tests/test_deep_nesting.py +0 -0
  96. {strictcli-0.9.0 → strictcli-0.9.1}/tests/test_dependencies.py +0 -0
  97. {strictcli-0.9.0 → strictcli-0.9.1}/tests/test_deprecated.py +0 -0
  98. {strictcli-0.9.0 → strictcli-0.9.1}/tests/test_dump_schema.py +0 -0
  99. {strictcli-0.9.0 → strictcli-0.9.1}/tests/test_e2e.py +0 -0
  100. {strictcli-0.9.0 → strictcli-0.9.1}/tests/test_env.py +0 -0
  101. {strictcli-0.9.0 → strictcli-0.9.1}/tests/test_exit_codes.py +0 -0
  102. {strictcli-0.9.0 → strictcli-0.9.1}/tests/test_float_type.py +0 -0
  103. {strictcli-0.9.0 → strictcli-0.9.1}/tests/test_global_flags.py +0 -0
  104. {strictcli-0.9.0 → strictcli-0.9.1}/tests/test_help.py +0 -0
  105. {strictcli-0.9.0 → strictcli-0.9.1}/tests/test_int_type.py +0 -0
  106. {strictcli-0.9.0 → strictcli-0.9.1}/tests/test_mutex.py +0 -0
  107. {strictcli-0.9.0 → strictcli-0.9.1}/tests/test_nesting.py +0 -0
  108. {strictcli-0.9.0 → strictcli-0.9.1}/tests/test_parser.py +0 -0
  109. {strictcli-0.9.0 → strictcli-0.9.1}/tests/test_passthrough.py +0 -0
  110. {strictcli-0.9.0 → strictcli-0.9.1}/tests/test_registration.py +0 -0
  111. {strictcli-0.9.0 → strictcli-0.9.1}/tests/test_repeatable.py +0 -0
  112. {strictcli-0.9.0 → strictcli-0.9.1}/tests/test_tagdsl.py +0 -0
  113. {strictcli-0.9.0 → strictcli-0.9.1}/tests/test_tags.py +0 -0
  114. {strictcli-0.9.0 → strictcli-0.9.1}/tests/test_toml_loading.py +0 -0
  115. {strictcli-0.9.0 → strictcli-0.9.1}/tests/test_validate.py +0 -0
  116. {strictcli-0.9.0 → strictcli-0.9.1}/tests/test_variadic.py +0 -0
  117. {strictcli-0.9.0 → strictcli-0.9.1}/todo/.defer/deferred.md +0 -0
  118. {strictcli-0.9.0 → strictcli-0.9.1}/todo/.done/original-idea.md +0 -0
@@ -0,0 +1 @@
1
+ 4a6d209ab6bd677356d90300dcb5d073d2d73935
@@ -0,0 +1,9 @@
1
+ {"commits":["034d46ccdb83e2e6abdfb27d50553128e8b194da"],"user_facing":true,"description":"**New feature.** Public `config_file_path` property on App.","type":"feature"}
2
+ {"commits":["0eacbbb26047b737ac9ff5a05ccc25f381c6917f"],"user_facing":true,"description":"**Fix.** Config format validation errors now have parity between Python and Go.","type":"fix"}
3
+ {"commits":["a40e7421f7e51240f51c4a8ce9ed72e73af2dd94","3d0745ec3da5d124465ae62a6edda1ba9c586909","e1512089774da17d8e1b50b38af9e00f2b04f401","06ff387b1cf6e867e5cf926ad02c646f4020cd4d","f53fa79fb38d1d7ace07305c06030800fe8173bc"],"user_facing":false}
4
+ {"commits":["052392699e08e4edf48d688f244241c461d7eef7","4c64feea9c5efed933f46950a66985707d287c2c","a3058311994565626d720afb34f95f9230828500","2732196f195b787c8c1785c1d054e31d81be73f6","76e89079ca555173f31e16868a8f0e9da8dd86e9"],"user_facing":false}
5
+ {"commits":["81cfebb6de9674be9fafc0756c19d0dd8a6a29c1","b2317bcce29fdeabb0726e7db6865a917d596d91","0bc0c1f80c5252846a685954052690451676815d","905a378a3360abb1fd00fb009862a2d1875f388c"],"user_facing":false}
6
+ {"commits":["77050e3cdb3cdd396bf83fee87768342903157f7"],"user_facing":false}
7
+ {"commits":["2eb65bb7d36320cf1e398e42fa43a63e2d771042","9276de627df40c14d0a0f7f4cd6f934323d7ee47"],"user_facing":false}
8
+ {"commits":["7ccae37d21414a46c87167f726c2279e61db6b09"],"user_facing":false}
9
+ {"commits":["1179ab585f13a63254148ef67705df81ff07b99d"],"user_facing":false}
@@ -0,0 +1,9 @@
1
+ ## 0.9.1
2
+
3
+ ### Features
4
+
5
+ - **New feature.** Public `config_file_path` property on App.
6
+
7
+ ### Fixes
8
+
9
+ - **Fix.** Config format validation errors now have parity between Python and Go.
@@ -0,0 +1,3 @@
1
+ bump = "patch"
2
+ include = ["pypi", "npm"]
3
+ exclude = []
@@ -0,0 +1 @@
1
+ 0.41.5
@@ -2,6 +2,16 @@
2
2
 
3
3
  # Changelog
4
4
 
5
+ ## 0.9.1
6
+
7
+ ### Features
8
+
9
+ - **New feature.** Public `config_file_path` property on App.
10
+
11
+ ### Fixes
12
+
13
+ - **Fix.** Config format validation errors now have parity between Python and Go.
14
+
5
15
  ## 0.9.0
6
16
 
7
17
  ### Features
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: strictcli
3
- Version: 0.9.0
3
+ Version: 0.9.1
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.9.0",
3
+ "version": "0.9.1",
4
4
  "lockfileVersion": 3,
5
5
  "requires": true,
6
6
  "packages": {
7
7
  "": {
8
8
  "name": "strictcli",
9
- "version": "0.9.0",
9
+ "version": "0.9.1",
10
10
  "hasInstallScript": true,
11
11
  "license": "MIT"
12
12
  }
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "strictcli",
3
- "version": "0.9.0",
3
+ "version": "0.9.1",
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.9.0"
7
+ version = "0.9.1"
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.9.0"
5
+ __version__ = "0.9.1"
6
6
 
7
7
  __all__ = [
8
8
  "App", "Flag", "Arg", "Tag", "MutexGroup", "CoRequired", "Requires",
@@ -669,6 +669,11 @@ class App:
669
669
  self._check_defs = {}
670
670
  self._checks_enabled = False
671
671
 
672
+ @property
673
+ def config_file_path(self) -> str:
674
+ """Return the resolved config file path for this app."""
675
+ return _config_path(self.name, override=self.config_path, config_format=self.config_format)
676
+
672
677
  def check(self, name: str):
673
678
  """Decorator to register a check implementation."""
674
679
  def decorator(fn):
@@ -0,0 +1,60 @@
1
+ """Tests for App.config_file_path property."""
2
+
3
+ import os
4
+
5
+ import strictcli
6
+
7
+
8
+ def test_default_xdg_path_json(tmp_path, monkeypatch):
9
+ """Default config_file_path uses XDG_CONFIG_HOME with .json extension."""
10
+ monkeypatch.setenv("XDG_CONFIG_HOME", str(tmp_path))
11
+ app = strictcli.App(name="testapp", version="1.0.0", help="test app")
12
+ expected = os.path.join(str(tmp_path), "testapp", "config.json")
13
+ assert app.config_file_path == expected
14
+
15
+
16
+ def test_default_xdg_path_toml(tmp_path, monkeypatch):
17
+ """config_file_path uses .toml extension when config_format='toml'."""
18
+ monkeypatch.setenv("XDG_CONFIG_HOME", str(tmp_path))
19
+ app = strictcli.App(
20
+ name="testapp", version="1.0.0", help="test app", config_format="toml",
21
+ )
22
+ expected = os.path.join(str(tmp_path), "testapp", "config.toml")
23
+ assert app.config_file_path == expected
24
+
25
+
26
+ def test_custom_config_path_override(tmp_path):
27
+ """config_file_path returns the override path when config_path is set."""
28
+ custom = str(tmp_path / "custom" / "settings.json")
29
+ app = strictcli.App(
30
+ name="testapp", version="1.0.0", help="test app",
31
+ config_path=custom,
32
+ )
33
+ assert app.config_file_path == custom
34
+
35
+
36
+ def test_tilde_expansion(tmp_path, monkeypatch):
37
+ """config_file_path expands ~ in config_path."""
38
+ monkeypatch.setenv("HOME", str(tmp_path))
39
+ app = strictcli.App(
40
+ name="testapp", version="1.0.0", help="test app",
41
+ config_path="~/.myapp/config.json",
42
+ )
43
+ expected = os.path.join(str(tmp_path), ".myapp", "config.json")
44
+ assert app.config_file_path == expected
45
+
46
+
47
+ def test_matches_config_path_command(tmp_path, monkeypatch):
48
+ """config_file_path matches what 'config path' command prints."""
49
+ monkeypatch.setenv("XDG_CONFIG_HOME", str(tmp_path))
50
+ app = strictcli.App(
51
+ name="testapp", version="1.0.0", help="test app", config=True,
52
+ )
53
+
54
+ @app.command("run", help="run something")
55
+ def run():
56
+ pass
57
+
58
+ r = app.test(["config", "path"])
59
+ assert r.exit_code == 0
60
+ assert app.config_file_path in r.stdout
@@ -232,7 +232,7 @@ wheels = [
232
232
 
233
233
  [[package]]
234
234
  name = "strictcli"
235
- version = "0.9.0"
235
+ version = "0.9.1"
236
236
  source = { editable = "." }
237
237
 
238
238
  [package.dev-dependencies]
@@ -1 +0,0 @@
1
- aeaf4155c6c810b0aff48faa3574b04897413861
@@ -1 +0,0 @@
1
- 0.41.4
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes