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.
- strictcli-0.9.1/.rlsbl/changes/.validated +1 -0
- strictcli-0.9.1/.rlsbl/changes/0.9.1.jsonl +9 -0
- strictcli-0.9.1/.rlsbl/changes/0.9.1.md +9 -0
- strictcli-0.9.1/.rlsbl/releases/v0.9.1.toml +3 -0
- strictcli-0.9.1/.rlsbl/version +1 -0
- {strictcli-0.9.0 → strictcli-0.9.1}/CHANGELOG.md +10 -0
- {strictcli-0.9.0 → strictcli-0.9.1}/PKG-INFO +1 -1
- {strictcli-0.9.0 → strictcli-0.9.1}/package-lock.json +2 -2
- {strictcli-0.9.0 → strictcli-0.9.1}/package.json +1 -1
- {strictcli-0.9.0 → strictcli-0.9.1}/pyproject.toml +1 -1
- {strictcli-0.9.0 → strictcli-0.9.1}/strictcli/__init__.py +6 -1
- strictcli-0.9.1/tests/test_config_file_path.py +60 -0
- {strictcli-0.9.0 → strictcli-0.9.1}/uv.lock +1 -1
- strictcli-0.9.0/.rlsbl/changes/.validated +0 -1
- strictcli-0.9.0/.rlsbl/version +0 -1
- {strictcli-0.9.0 → strictcli-0.9.1}/.claude/settings.json +0 -0
- {strictcli-0.9.0 → strictcli-0.9.1}/.github/workflows/ci.yml +0 -0
- {strictcli-0.9.0 → strictcli-0.9.1}/.github/workflows/publish.yml +0 -0
- {strictcli-0.9.0 → strictcli-0.9.1}/.gitignore +0 -0
- {strictcli-0.9.0 → strictcli-0.9.1}/.rlsbl/bases/.claude/settings.json +0 -0
- {strictcli-0.9.0 → strictcli-0.9.1}/.rlsbl/bases/.github/workflows/ci.yml +0 -0
- {strictcli-0.9.0 → strictcli-0.9.1}/.rlsbl/bases/.github/workflows/publish.yml +0 -0
- {strictcli-0.9.0 → strictcli-0.9.1}/.rlsbl/bases/.gitignore +0 -0
- {strictcli-0.9.0 → strictcli-0.9.1}/.rlsbl/bases/.rlsbl/hooks/post-release.sh +0 -0
- {strictcli-0.9.0 → strictcli-0.9.1}/.rlsbl/bases/.rlsbl/hooks/pre-checks.sh +0 -0
- {strictcli-0.9.0 → strictcli-0.9.1}/.rlsbl/bases/.rlsbl/hooks/pre-release.sh +0 -0
- {strictcli-0.9.0 → strictcli-0.9.1}/.rlsbl/bases/.rlsbl/lint/go.toml +0 -0
- {strictcli-0.9.0 → strictcli-0.9.1}/.rlsbl/bases/.rlsbl/lint/npm.toml +0 -0
- {strictcli-0.9.0 → strictcli-0.9.1}/.rlsbl/bases/.rlsbl/lint/python.toml +0 -0
- {strictcli-0.9.0 → strictcli-0.9.1}/.rlsbl/bases/CHANGELOG.md +0 -0
- {strictcli-0.9.0 → strictcli-0.9.1}/.rlsbl/bases/CLAUDE.md +0 -0
- {strictcli-0.9.0 → strictcli-0.9.1}/.rlsbl/bases/LICENSE +0 -0
- {strictcli-0.9.0 → strictcli-0.9.1}/.rlsbl/changes/0.4.0.jsonl +0 -0
- {strictcli-0.9.0 → strictcli-0.9.1}/.rlsbl/changes/0.4.0.md +0 -0
- {strictcli-0.9.0 → strictcli-0.9.1}/.rlsbl/changes/0.4.1.jsonl +0 -0
- {strictcli-0.9.0 → strictcli-0.9.1}/.rlsbl/changes/0.4.1.md +0 -0
- {strictcli-0.9.0 → strictcli-0.9.1}/.rlsbl/changes/0.5.0.jsonl +0 -0
- {strictcli-0.9.0 → strictcli-0.9.1}/.rlsbl/changes/0.5.0.md +0 -0
- {strictcli-0.9.0 → strictcli-0.9.1}/.rlsbl/changes/0.6.0.jsonl +0 -0
- {strictcli-0.9.0 → strictcli-0.9.1}/.rlsbl/changes/0.6.0.md +0 -0
- {strictcli-0.9.0 → strictcli-0.9.1}/.rlsbl/changes/0.6.1.jsonl +0 -0
- {strictcli-0.9.0 → strictcli-0.9.1}/.rlsbl/changes/0.6.1.md +0 -0
- {strictcli-0.9.0 → strictcli-0.9.1}/.rlsbl/changes/0.7.0.jsonl +0 -0
- {strictcli-0.9.0 → strictcli-0.9.1}/.rlsbl/changes/0.7.0.md +0 -0
- {strictcli-0.9.0 → strictcli-0.9.1}/.rlsbl/changes/0.7.1.jsonl +0 -0
- {strictcli-0.9.0 → strictcli-0.9.1}/.rlsbl/changes/0.7.1.md +0 -0
- {strictcli-0.9.0 → strictcli-0.9.1}/.rlsbl/changes/0.8.0.jsonl +0 -0
- {strictcli-0.9.0 → strictcli-0.9.1}/.rlsbl/changes/0.8.0.md +0 -0
- {strictcli-0.9.0 → strictcli-0.9.1}/.rlsbl/changes/0.8.1.jsonl +0 -0
- {strictcli-0.9.0 → strictcli-0.9.1}/.rlsbl/changes/0.8.1.md +0 -0
- {strictcli-0.9.0 → strictcli-0.9.1}/.rlsbl/changes/0.8.2.jsonl +0 -0
- {strictcli-0.9.0 → strictcli-0.9.1}/.rlsbl/changes/0.8.2.md +0 -0
- {strictcli-0.9.0 → strictcli-0.9.1}/.rlsbl/changes/0.8.3.jsonl +0 -0
- {strictcli-0.9.0 → strictcli-0.9.1}/.rlsbl/changes/0.8.3.md +0 -0
- {strictcli-0.9.0 → strictcli-0.9.1}/.rlsbl/changes/0.8.4.jsonl +0 -0
- {strictcli-0.9.0 → strictcli-0.9.1}/.rlsbl/changes/0.8.4.md +0 -0
- {strictcli-0.9.0 → strictcli-0.9.1}/.rlsbl/changes/0.8.5.jsonl +0 -0
- {strictcli-0.9.0 → strictcli-0.9.1}/.rlsbl/changes/0.8.5.md +0 -0
- {strictcli-0.9.0 → strictcli-0.9.1}/.rlsbl/changes/0.8.6.jsonl +0 -0
- {strictcli-0.9.0 → strictcli-0.9.1}/.rlsbl/changes/0.8.6.md +0 -0
- {strictcli-0.9.0 → strictcli-0.9.1}/.rlsbl/changes/0.8.7.jsonl +0 -0
- {strictcli-0.9.0 → strictcli-0.9.1}/.rlsbl/changes/0.8.7.md +0 -0
- {strictcli-0.9.0 → strictcli-0.9.1}/.rlsbl/changes/0.9.0.jsonl +0 -0
- {strictcli-0.9.0 → strictcli-0.9.1}/.rlsbl/changes/0.9.0.md +0 -0
- {strictcli-0.9.0 → strictcli-0.9.1}/.rlsbl/changes/unreleased.jsonl +0 -0
- {strictcli-0.9.0 → strictcli-0.9.1}/.rlsbl/config.json +0 -0
- {strictcli-0.9.0 → strictcli-0.9.1}/.rlsbl/hashes.json +0 -0
- {strictcli-0.9.0 → strictcli-0.9.1}/.rlsbl/hooks/post-release.sh +0 -0
- {strictcli-0.9.0 → strictcli-0.9.1}/.rlsbl/hooks/pre-checks.sh +0 -0
- {strictcli-0.9.0 → strictcli-0.9.1}/.rlsbl/hooks/pre-release.sh +0 -0
- {strictcli-0.9.0 → strictcli-0.9.1}/.rlsbl/lint/go.toml +0 -0
- {strictcli-0.9.0 → strictcli-0.9.1}/.rlsbl/lint/npm.toml +0 -0
- {strictcli-0.9.0 → strictcli-0.9.1}/.rlsbl/lint/python.toml +0 -0
- {strictcli-0.9.0 → strictcli-0.9.1}/.rlsbl/releases/unreleased.toml +0 -0
- {strictcli-0.9.0 → strictcli-0.9.1}/.rlsbl/releases/v0.8.5.toml +0 -0
- {strictcli-0.9.0 → strictcli-0.9.1}/.rlsbl/releases/v0.8.6.toml +0 -0
- {strictcli-0.9.0 → strictcli-0.9.1}/.rlsbl/releases/v0.8.7.toml +0 -0
- {strictcli-0.9.0 → strictcli-0.9.1}/.rlsbl/releases/v0.9.0.toml +0 -0
- {strictcli-0.9.0 → strictcli-0.9.1}/.strictcli/schema.json +0 -0
- {strictcli-0.9.0 → strictcli-0.9.1}/CLAUDE.md +0 -0
- {strictcli-0.9.0 → strictcli-0.9.1}/LICENSE +0 -0
- {strictcli-0.9.0 → strictcli-0.9.1}/README.md +0 -0
- {strictcli-0.9.0 → strictcli-0.9.1}/index.js +0 -0
- {strictcli-0.9.0 → strictcli-0.9.1}/postinstall.js +0 -0
- {strictcli-0.9.0 → strictcli-0.9.1}/tests/test_arg_default.py +0 -0
- {strictcli-0.9.0 → strictcli-0.9.1}/tests/test_auto_version.py +0 -0
- {strictcli-0.9.0 → strictcli-0.9.1}/tests/test_check_command.py +0 -0
- {strictcli-0.9.0 → strictcli-0.9.1}/tests/test_check_discovery.py +0 -0
- {strictcli-0.9.0 → strictcli-0.9.1}/tests/test_check_runner.py +0 -0
- {strictcli-0.9.0 → strictcli-0.9.1}/tests/test_check_schema.py +0 -0
- {strictcli-0.9.0 → strictcli-0.9.1}/tests/test_check_types.py +0 -0
- {strictcli-0.9.0 → strictcli-0.9.1}/tests/test_choices.py +0 -0
- {strictcli-0.9.0 → strictcli-0.9.1}/tests/test_command_help_suggestion.py +0 -0
- {strictcli-0.9.0 → strictcli-0.9.1}/tests/test_config.py +0 -0
- {strictcli-0.9.0 → strictcli-0.9.1}/tests/test_deep_nesting.py +0 -0
- {strictcli-0.9.0 → strictcli-0.9.1}/tests/test_dependencies.py +0 -0
- {strictcli-0.9.0 → strictcli-0.9.1}/tests/test_deprecated.py +0 -0
- {strictcli-0.9.0 → strictcli-0.9.1}/tests/test_dump_schema.py +0 -0
- {strictcli-0.9.0 → strictcli-0.9.1}/tests/test_e2e.py +0 -0
- {strictcli-0.9.0 → strictcli-0.9.1}/tests/test_env.py +0 -0
- {strictcli-0.9.0 → strictcli-0.9.1}/tests/test_exit_codes.py +0 -0
- {strictcli-0.9.0 → strictcli-0.9.1}/tests/test_float_type.py +0 -0
- {strictcli-0.9.0 → strictcli-0.9.1}/tests/test_global_flags.py +0 -0
- {strictcli-0.9.0 → strictcli-0.9.1}/tests/test_help.py +0 -0
- {strictcli-0.9.0 → strictcli-0.9.1}/tests/test_int_type.py +0 -0
- {strictcli-0.9.0 → strictcli-0.9.1}/tests/test_mutex.py +0 -0
- {strictcli-0.9.0 → strictcli-0.9.1}/tests/test_nesting.py +0 -0
- {strictcli-0.9.0 → strictcli-0.9.1}/tests/test_parser.py +0 -0
- {strictcli-0.9.0 → strictcli-0.9.1}/tests/test_passthrough.py +0 -0
- {strictcli-0.9.0 → strictcli-0.9.1}/tests/test_registration.py +0 -0
- {strictcli-0.9.0 → strictcli-0.9.1}/tests/test_repeatable.py +0 -0
- {strictcli-0.9.0 → strictcli-0.9.1}/tests/test_tagdsl.py +0 -0
- {strictcli-0.9.0 → strictcli-0.9.1}/tests/test_tags.py +0 -0
- {strictcli-0.9.0 → strictcli-0.9.1}/tests/test_toml_loading.py +0 -0
- {strictcli-0.9.0 → strictcli-0.9.1}/tests/test_validate.py +0 -0
- {strictcli-0.9.0 → strictcli-0.9.1}/tests/test_variadic.py +0 -0
- {strictcli-0.9.0 → strictcli-0.9.1}/todo/.defer/deferred.md +0 -0
- {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 @@
|
|
|
1
|
+
0.41.5
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "strictcli",
|
|
3
|
-
"version": "0.9.
|
|
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.
|
|
9
|
+
"version": "0.9.1",
|
|
10
10
|
"hasInstallScript": true,
|
|
11
11
|
"license": "MIT"
|
|
12
12
|
}
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
from __future__ import annotations
|
|
4
4
|
|
|
5
|
-
__version__ = "0.9.
|
|
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
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
aeaf4155c6c810b0aff48faa3574b04897413861
|
strictcli-0.9.0/.rlsbl/version
DELETED
|
@@ -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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|