base-cli 0.4.0__tar.gz → 0.4.2__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.
- {base_cli-0.4.0 → base_cli-0.4.2}/.github/workflows/compatibility.yml +25 -0
- base_cli-0.4.2/.github/workflows/docs.yml +81 -0
- {base_cli-0.4.0 → base_cli-0.4.2}/.github/workflows/tests.yml +4 -1
- {base_cli-0.4.0 → base_cli-0.4.2}/CHANGELOG.md +87 -6
- {base_cli-0.4.0 → base_cli-0.4.2}/CONTRIBUTING.md +25 -0
- {base_cli-0.4.0/lib/python/base_cli.egg-info → base_cli-0.4.2}/PKG-INFO +66 -18
- base_cli-0.4.0/PKG-INFO → base_cli-0.4.2/README.md +58 -61
- {base_cli-0.4.0 → base_cli-0.4.2}/SECURITY.md +4 -4
- base_cli-0.4.2/VERSION +1 -0
- {base_cli-0.4.0 → base_cli-0.4.2}/compatibility/README.md +4 -0
- {base_cli-0.4.0 → base_cli-0.4.2}/compatibility/consumers/atlas_click/pyproject.toml +1 -1
- {base_cli-0.4.0 → base_cli-0.4.2}/compatibility/consumers/beacon_typer/README.md +2 -1
- {base_cli-0.4.0 → base_cli-0.4.2}/compatibility/consumers/beacon_typer/pyproject.toml +1 -1
- {base_cli-0.4.0 → base_cli-0.4.2}/compatibility/consumers/cinder_automation/pyproject.toml +1 -1
- {base_cli-0.4.0 → base_cli-0.4.2}/docs/adopter-readiness.md +6 -6
- {base_cli-0.4.0 → base_cli-0.4.2}/docs/api-stability.md +5 -5
- {base_cli-0.4.0 → base_cli-0.4.2}/docs/consumer-profiles.md +57 -6
- base_cli-0.4.2/docs/index.md +77 -0
- {base_cli-0.4.0 → base_cli-0.4.2}/docs/json-contracts.md +42 -2
- {base_cli-0.4.0 → base_cli-0.4.2}/docs/releasing.md +12 -0
- {base_cli-0.4.0 → base_cli-0.4.2}/docs/typer-adapter.md +16 -5
- base_cli-0.4.2/docs/user-config-typing.md +105 -0
- {base_cli-0.4.0 → base_cli-0.4.2}/examples/automation_observability_app/src/automation_observability_app/cli.py +1 -2
- {base_cli-0.4.0 → base_cli-0.4.2}/examples/automation_observability_app/tests/test_cli.py +0 -1
- {base_cli-0.4.0 → base_cli-0.4.2}/examples/minimal_cli/src/minimal_cli/cli.py +0 -1
- {base_cli-0.4.0 → base_cli-0.4.2}/examples/minimal_cli/tests/test_cli.py +0 -1
- {base_cli-0.4.0 → base_cli-0.4.2}/examples/nested_click_app/tests/test_cli.py +0 -1
- {base_cli-0.4.0 → base_cli-0.4.2}/examples/typer_app/README.md +2 -1
- {base_cli-0.4.0 → base_cli-0.4.2}/examples/typer_app/pyproject.toml +1 -1
- {base_cli-0.4.0 → base_cli-0.4.2}/examples/typer_app/src/typer_app/cli.py +0 -1
- {base_cli-0.4.0 → base_cli-0.4.2}/examples/typer_app/tests/test_cli.py +0 -1
- {base_cli-0.4.0 → base_cli-0.4.2}/examples/typer_consumer.py +1 -3
- {base_cli-0.4.0 → base_cli-0.4.2}/lib/python/base_cli/__init__.py +34 -21
- base_cli-0.4.2/lib/python/base_cli/_click_compat.py +174 -0
- {base_cli-0.4.0 → base_cli-0.4.2}/lib/python/base_cli/_lifecycle.py +6 -11
- {base_cli-0.4.0 → base_cli-0.4.2}/lib/python/base_cli/_private_files.py +0 -1
- {base_cli-0.4.0 → base_cli-0.4.2}/lib/python/base_cli/_runtime.py +9 -13
- {base_cli-0.4.0 → base_cli-0.4.2}/lib/python/base_cli/app.py +119 -228
- {base_cli-0.4.0 → base_cli-0.4.2}/lib/python/base_cli/attachment.py +0 -1
- {base_cli-0.4.0 → base_cli-0.4.2}/lib/python/base_cli/command_filters.py +1 -4
- {base_cli-0.4.0 → base_cli-0.4.2}/lib/python/base_cli/command_protocol.py +8 -4
- {base_cli-0.4.0 → base_cli-0.4.2}/lib/python/base_cli/config.py +7 -26
- {base_cli-0.4.0 → base_cli-0.4.2}/lib/python/base_cli/context.py +7 -7
- {base_cli-0.4.0 → base_cli-0.4.2}/lib/python/base_cli/deprecations.py +0 -1
- base_cli-0.4.2/lib/python/base_cli/experimental.py +8 -0
- {base_cli-0.4.0 → base_cli-0.4.2}/lib/python/base_cli/extensions.py +2 -3
- {base_cli-0.4.0 → base_cli-0.4.2}/lib/python/base_cli/history.py +23 -6
- {base_cli-0.4.0 → base_cli-0.4.2}/lib/python/base_cli/inspection.py +1 -2
- {base_cli-0.4.0 → base_cli-0.4.2}/lib/python/base_cli/integrations.py +1 -1
- {base_cli-0.4.0 → base_cli-0.4.2}/lib/python/base_cli/json_contracts.py +13 -17
- {base_cli-0.4.0 → base_cli-0.4.2}/lib/python/base_cli/lifecycle_options.py +9 -32
- {base_cli-0.4.0 → base_cli-0.4.2}/lib/python/base_cli/logging.py +13 -3
- {base_cli-0.4.0 → base_cli-0.4.2}/lib/python/base_cli/output.py +21 -16
- {base_cli-0.4.0 → base_cli-0.4.2}/lib/python/base_cli/profile.py +7 -19
- {base_cli-0.4.0 → base_cli-0.4.2}/lib/python/base_cli/redaction.py +10 -14
- {base_cli-0.4.0 → base_cli-0.4.2}/lib/python/base_cli/runtime.py +1 -1
- {base_cli-0.4.0 → base_cli-0.4.2}/lib/python/base_cli/testing.py +7 -4
- {base_cli-0.4.0 → base_cli-0.4.2}/lib/python/base_cli/typer.py +10 -15
- base_cli-0.4.0/README.md → base_cli-0.4.2/lib/python/base_cli.egg-info/PKG-INFO +109 -15
- {base_cli-0.4.0 → base_cli-0.4.2}/lib/python/base_cli.egg-info/SOURCES.txt +6 -0
- {base_cli-0.4.0 → base_cli-0.4.2}/lib/python/base_cli.egg-info/requires.txt +5 -1
- {base_cli-0.4.0 → base_cli-0.4.2}/pyproject.toml +24 -5
- {base_cli-0.4.0 → base_cli-0.4.2}/scripts/benchmark_runtime.py +2 -2
- {base_cli-0.4.0 → base_cli-0.4.2}/scripts/validate_consumers.py +0 -1
- {base_cli-0.4.0 → base_cli-0.4.2}/scripts/validate_docs.py +0 -1
- {base_cli-0.4.0 → base_cli-0.4.2}/scripts/validate_examples.py +0 -1
- {base_cli-0.4.0 → base_cli-0.4.2}/scripts/validate_package_artifact.py +3 -1
- {base_cli-0.4.0 → base_cli-0.4.2}/tests/conftest.py +0 -1
- {base_cli-0.4.0 → base_cli-0.4.2}/tests/test_adversarial_regressions.py +4 -5
- {base_cli-0.4.0 → base_cli-0.4.2}/tests/test_api_stability.py +2 -2
- {base_cli-0.4.0 → base_cli-0.4.2}/tests/test_app_lifecycle.py +7 -4
- {base_cli-0.4.0 → base_cli-0.4.2}/tests/test_app_registration.py +16 -10
- {base_cli-0.4.0 → base_cli-0.4.2}/tests/test_app_run.py +60 -40
- {base_cli-0.4.0 → base_cli-0.4.2}/tests/test_app_run_metadata.py +72 -11
- {base_cli-0.4.0 → base_cli-0.4.2}/tests/test_app_runtime_errors.py +7 -4
- {base_cli-0.4.0 → base_cli-0.4.2}/tests/test_app_security_boundaries.py +16 -12
- {base_cli-0.4.0 → base_cli-0.4.2}/tests/test_app_startup_transaction.py +11 -8
- {base_cli-0.4.0 → base_cli-0.4.2}/tests/test_app_subcommands.py +1 -0
- base_cli-0.4.2/tests/test_benchmark_runtime.py +21 -0
- {base_cli-0.4.0 → base_cli-0.4.2}/tests/test_cleanup_security.py +7 -4
- {base_cli-0.4.0 → base_cli-0.4.2}/tests/test_click_tree_attachment.py +21 -28
- {base_cli-0.4.0 → base_cli-0.4.2}/tests/test_command_filters.py +1 -3
- {base_cli-0.4.0 → base_cli-0.4.2}/tests/test_command_protocol.py +14 -13
- {base_cli-0.4.0 → base_cli-0.4.2}/tests/test_history.py +15 -6
- {base_cli-0.4.0 → base_cli-0.4.2}/tests/test_inspection.py +1 -2
- {base_cli-0.4.0 → base_cli-0.4.2}/tests/test_invocation_parity.py +58 -1
- {base_cli-0.4.0 → base_cli-0.4.2}/tests/test_json_contracts.py +48 -0
- {base_cli-0.4.0 → base_cli-0.4.2}/tests/test_lifecycle_options.py +26 -54
- {base_cli-0.4.0 → base_cli-0.4.2}/tests/test_output.py +46 -8
- {base_cli-0.4.0 → base_cli-0.4.2}/tests/test_profile.py +6 -0
- {base_cli-0.4.0 → base_cli-0.4.2}/tests/test_public_api.py +16 -0
- {base_cli-0.4.0 → base_cli-0.4.2}/tests/test_redaction_security.py +2 -5
- {base_cli-0.4.0 → base_cli-0.4.2}/tests/test_run_bundle_retention.py +9 -1
- {base_cli-0.4.0 → base_cli-0.4.2}/tests/test_security_documentation.py +0 -1
- {base_cli-0.4.0 → base_cli-0.4.2}/tests/test_testing.py +1 -5
- {base_cli-0.4.0 → base_cli-0.4.2}/tests/test_typed_contracts.py +1 -0
- {base_cli-0.4.0 → base_cli-0.4.2}/tests/test_typer_adapter.py +27 -1
- base_cli-0.4.0/VERSION +0 -1
- {base_cli-0.4.0 → base_cli-0.4.2}/.github/ISSUE_TEMPLATE/support.md +0 -0
- {base_cli-0.4.0 → base_cli-0.4.2}/.github/base-project.yml +0 -0
- {base_cli-0.4.0 → base_cli-0.4.2}/.github/pull_request_template.md +0 -0
- {base_cli-0.4.0 → base_cli-0.4.2}/.github/workflows/examples.yml +0 -0
- {base_cli-0.4.0 → base_cli-0.4.2}/.github/workflows/issue-branch-policy.yml +0 -0
- {base_cli-0.4.0 → base_cli-0.4.2}/.github/workflows/package.yml +0 -0
- {base_cli-0.4.0 → base_cli-0.4.2}/.github/workflows/project-intake.yml +0 -0
- {base_cli-0.4.0 → base_cli-0.4.2}/LICENSE +0 -0
- {base_cli-0.4.0 → base_cli-0.4.2}/MANIFEST.in +0 -0
- {base_cli-0.4.0 → base_cli-0.4.2}/base_manifest.yaml +0 -0
- {base_cli-0.4.0 → base_cli-0.4.2}/compatibility/consumers/atlas_click/README.md +0 -0
- {base_cli-0.4.0 → base_cli-0.4.2}/compatibility/consumers/atlas_click/src/atlas_click/__init__.py +0 -0
- {base_cli-0.4.0 → base_cli-0.4.2}/compatibility/consumers/atlas_click/src/atlas_click/cli.py +0 -0
- {base_cli-0.4.0 → base_cli-0.4.2}/compatibility/consumers/atlas_click/tests/test_consumer.py +0 -0
- {base_cli-0.4.0 → base_cli-0.4.2}/compatibility/consumers/beacon_typer/src/beacon_typer/__init__.py +0 -0
- {base_cli-0.4.0 → base_cli-0.4.2}/compatibility/consumers/beacon_typer/src/beacon_typer/cli.py +0 -0
- {base_cli-0.4.0 → base_cli-0.4.2}/compatibility/consumers/beacon_typer/tests/test_consumer.py +0 -0
- {base_cli-0.4.0 → base_cli-0.4.2}/compatibility/consumers/cinder_automation/README.md +0 -0
- {base_cli-0.4.0 → base_cli-0.4.2}/compatibility/consumers/cinder_automation/src/cinder_automation/__init__.py +0 -0
- {base_cli-0.4.0 → base_cli-0.4.2}/compatibility/consumers/cinder_automation/src/cinder_automation/cli.py +0 -0
- {base_cli-0.4.0 → base_cli-0.4.2}/compatibility/consumers/cinder_automation/tests/test_consumer.py +0 -0
- {base_cli-0.4.0 → base_cli-0.4.2}/compatibility/consumers/manifest.json +0 -0
- {base_cli-0.4.0 → base_cli-0.4.2}/docs/cache-ownership-and-layout.md +0 -0
- {base_cli-0.4.0 → base_cli-0.4.2}/docs/extensions.md +0 -0
- {base_cli-0.4.0 → base_cli-0.4.2}/docs/integrations.md +0 -0
- {base_cli-0.4.0 → base_cli-0.4.2}/docs/local-config.md +0 -0
- {base_cli-0.4.0 → base_cli-0.4.2}/docs/migrations.md +0 -0
- {base_cli-0.4.0 → base_cli-0.4.2}/docs/output-contracts.md +0 -0
- {base_cli-0.4.0 → base_cli-0.4.2}/docs/performance.md +0 -0
- {base_cli-0.4.0 → base_cli-0.4.2}/docs/platform-support.md +0 -0
- {base_cli-0.4.0 → base_cli-0.4.2}/docs/security-review.md +0 -0
- {base_cli-0.4.0 → base_cli-0.4.2}/docs/security-threat-model.md +0 -0
- {base_cli-0.4.0 → base_cli-0.4.2}/examples/README.md +0 -0
- {base_cli-0.4.0 → base_cli-0.4.2}/examples/automation_observability_app/README.md +0 -0
- {base_cli-0.4.0 → base_cli-0.4.2}/examples/automation_observability_app/pyproject.toml +0 -0
- {base_cli-0.4.0 → base_cli-0.4.2}/examples/automation_observability_app/src/automation_observability_app/__init__.py +0 -0
- {base_cli-0.4.0 → base_cli-0.4.2}/examples/minimal_cli/README.md +0 -0
- {base_cli-0.4.0 → base_cli-0.4.2}/examples/minimal_cli/pyproject.toml +0 -0
- {base_cli-0.4.0 → base_cli-0.4.2}/examples/minimal_cli/src/minimal_cli/__init__.py +0 -0
- {base_cli-0.4.0 → base_cli-0.4.2}/examples/nested_click_app/README.md +0 -0
- {base_cli-0.4.0 → base_cli-0.4.2}/examples/nested_click_app/pyproject.toml +0 -0
- {base_cli-0.4.0 → base_cli-0.4.2}/examples/nested_click_app/src/nested_click_app/__init__.py +0 -0
- {base_cli-0.4.0 → base_cli-0.4.2}/examples/nested_click_app/src/nested_click_app/cli.py +1 -1
- {base_cli-0.4.0 → base_cli-0.4.2}/examples/nested_click_app/src/nested_click_app/plugin.py +0 -0
- {base_cli-0.4.0 → base_cli-0.4.2}/examples/typed_consumer.py +0 -0
- {base_cli-0.4.0 → base_cli-0.4.2}/examples/typer_app/src/typer_app/__init__.py +0 -0
- {base_cli-0.4.0 → base_cli-0.4.2}/lib/python/base_cli/_cleanup.py +0 -0
- {base_cli-0.4.0 → base_cli-0.4.2}/lib/python/base_cli/_dependencies.py +0 -0
- {base_cli-0.4.0 → base_cli-0.4.2}/lib/python/base_cli/errors.py +0 -0
- {base_cli-0.4.0 → base_cli-0.4.2}/lib/python/base_cli/exit_codes.py +0 -0
- {base_cli-0.4.0 → base_cli-0.4.2}/lib/python/base_cli/paths.py +0 -0
- {base_cli-0.4.0 → base_cli-0.4.2}/lib/python/base_cli/py.typed +0 -0
- {base_cli-0.4.0 → base_cli-0.4.2}/lib/python/base_cli.egg-info/dependency_links.txt +0 -0
- {base_cli-0.4.0 → base_cli-0.4.2}/lib/python/base_cli.egg-info/top_level.txt +0 -0
- {base_cli-0.4.0 → base_cli-0.4.2}/scripts/validate_installed_package.py +0 -0
- {base_cli-0.4.0 → base_cli-0.4.2}/setup.cfg +0 -0
- {base_cli-0.4.0 → base_cli-0.4.2}/tests/test_app_dry_run.py +0 -0
- {base_cli-0.4.0 → base_cli-0.4.2}/tests/test_app_log_retention.py +0 -0
- {base_cli-0.4.0 → base_cli-0.4.2}/tests/test_app_quiet.py +0 -0
- {base_cli-0.4.0 → base_cli-0.4.2}/tests/test_app_runtime_boundary.py +0 -0
- {base_cli-0.4.0 → base_cli-0.4.2}/tests/test_batteries_included_config.py +0 -0
- {base_cli-0.4.0 → base_cli-0.4.2}/tests/test_context_workspace.py +0 -0
- {base_cli-0.4.0 → base_cli-0.4.2}/tests/test_explicit_config_validation.py +0 -0
- {base_cli-0.4.0 → base_cli-0.4.2}/tests/test_extensions.py +0 -0
- {base_cli-0.4.0 → base_cli-0.4.2}/tests/test_generic_core.py +0 -0
- {base_cli-0.4.0 → base_cli-0.4.2}/tests/test_integrations.py +0 -0
- {base_cli-0.4.0 → base_cli-0.4.2}/tests/test_logging.py +0 -0
- {base_cli-0.4.0 → base_cli-0.4.2}/tests/test_paths.py +0 -0
|
@@ -12,6 +12,31 @@ concurrency:
|
|
|
12
12
|
cancel-in-progress: true
|
|
13
13
|
|
|
14
14
|
jobs:
|
|
15
|
+
typer-matrix:
|
|
16
|
+
name: Typer ${{ matrix.typer-version }} / Python ${{ matrix.python-version }}
|
|
17
|
+
runs-on: ubuntu-latest
|
|
18
|
+
timeout-minutes: 20
|
|
19
|
+
strategy:
|
|
20
|
+
fail-fast: false
|
|
21
|
+
matrix:
|
|
22
|
+
python-version: ["3.10", "3.11", "3.12", "3.13", "3.14"]
|
|
23
|
+
typer-version: ["0.25.1", "0.26.0", "0.27.1"]
|
|
24
|
+
steps:
|
|
25
|
+
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
|
26
|
+
- name: Set up Python
|
|
27
|
+
uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0
|
|
28
|
+
with:
|
|
29
|
+
python-version: ${{ matrix.python-version }}
|
|
30
|
+
- name: Install framework and exact Typer line
|
|
31
|
+
run: |
|
|
32
|
+
python -m pip install "setuptools<77" "wheel"
|
|
33
|
+
python -m pip install ".[dev]"
|
|
34
|
+
python -m pip install --upgrade "typer==${{ matrix.typer-version }}"
|
|
35
|
+
- name: Install Beacon fixture without dependency resolution
|
|
36
|
+
run: python -m pip install --no-deps compatibility/consumers/beacon_typer
|
|
37
|
+
- name: Run adapter and Beacon compatibility tests
|
|
38
|
+
run: python -m pytest tests/test_typer_adapter.py compatibility/consumers/beacon_typer/tests
|
|
39
|
+
|
|
15
40
|
downstream:
|
|
16
41
|
name: Install and test independent consumers
|
|
17
42
|
runs-on: ubuntu-latest
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
name: Documentation
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches:
|
|
6
|
+
- main
|
|
7
|
+
paths:
|
|
8
|
+
- "README.md"
|
|
9
|
+
- "SECURITY.md"
|
|
10
|
+
- "docs/**"
|
|
11
|
+
- "mkdocs.yml"
|
|
12
|
+
- "pyproject.toml"
|
|
13
|
+
- "scripts/validate_docs.py"
|
|
14
|
+
- "tests/validate.sh"
|
|
15
|
+
- ".github/workflows/docs.yml"
|
|
16
|
+
pull_request:
|
|
17
|
+
paths:
|
|
18
|
+
- "README.md"
|
|
19
|
+
- "SECURITY.md"
|
|
20
|
+
- "docs/**"
|
|
21
|
+
- "mkdocs.yml"
|
|
22
|
+
- "pyproject.toml"
|
|
23
|
+
- "scripts/validate_docs.py"
|
|
24
|
+
- "tests/validate.sh"
|
|
25
|
+
- ".github/workflows/docs.yml"
|
|
26
|
+
workflow_dispatch:
|
|
27
|
+
|
|
28
|
+
permissions:
|
|
29
|
+
contents: read
|
|
30
|
+
|
|
31
|
+
concurrency:
|
|
32
|
+
group: ${{ github.workflow }}-${{ github.ref }}
|
|
33
|
+
cancel-in-progress: true
|
|
34
|
+
|
|
35
|
+
jobs:
|
|
36
|
+
build:
|
|
37
|
+
name: Build and validate documentation
|
|
38
|
+
runs-on: ubuntu-latest
|
|
39
|
+
timeout-minutes: 10
|
|
40
|
+
steps:
|
|
41
|
+
- name: Check out source
|
|
42
|
+
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
|
43
|
+
|
|
44
|
+
- name: Set up Python
|
|
45
|
+
uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0
|
|
46
|
+
with:
|
|
47
|
+
python-version: "3.13"
|
|
48
|
+
|
|
49
|
+
- name: Install documentation tools
|
|
50
|
+
run: python -m pip install ".[docs]"
|
|
51
|
+
|
|
52
|
+
- name: Validate repository links and examples
|
|
53
|
+
run: python scripts/validate_docs.py
|
|
54
|
+
|
|
55
|
+
- name: Build documentation with strict warnings
|
|
56
|
+
run: python -m mkdocs build --strict --site-dir site
|
|
57
|
+
|
|
58
|
+
- name: Upload Pages artifact
|
|
59
|
+
uses: actions/upload-pages-artifact@7b1f4a764d45c48632c6b24a0339c27f5614fb0b # v4.0.0
|
|
60
|
+
with:
|
|
61
|
+
path: site
|
|
62
|
+
|
|
63
|
+
deploy:
|
|
64
|
+
name: Deploy documentation site
|
|
65
|
+
if: ${{ (github.event_name == 'push' || github.event_name == 'workflow_dispatch') && github.ref == 'refs/heads/main' }}
|
|
66
|
+
needs: build
|
|
67
|
+
runs-on: ubuntu-latest
|
|
68
|
+
timeout-minutes: 10
|
|
69
|
+
environment:
|
|
70
|
+
name: github-pages
|
|
71
|
+
url: ${{ steps.deployment.outputs.page_url }}
|
|
72
|
+
permissions:
|
|
73
|
+
pages: write
|
|
74
|
+
id-token: write
|
|
75
|
+
steps:
|
|
76
|
+
- name: Configure GitHub Pages
|
|
77
|
+
uses: actions/configure-pages@983d7736d9b0ae728b81ab479565c72886d7745b # v5.0.0
|
|
78
|
+
|
|
79
|
+
- name: Deploy to GitHub Pages
|
|
80
|
+
id: deployment
|
|
81
|
+
uses: actions/deploy-pages@f33f41b675f0ab2dc5a6863c9a170fe83af3571e # v4.0.0
|
|
@@ -41,6 +41,8 @@ jobs:
|
|
|
41
41
|
run: python -m pytest
|
|
42
42
|
- name: Type-check public contract sample
|
|
43
43
|
run: python -m mypy --strict examples/typed_consumer.py
|
|
44
|
+
- name: Type-check library
|
|
45
|
+
run: python -m mypy --strict lib/python/base_cli
|
|
44
46
|
|
|
45
47
|
quality:
|
|
46
48
|
name: Quality and security gates
|
|
@@ -56,11 +58,12 @@ jobs:
|
|
|
56
58
|
run: python -m pip install ".[dev,typer,quality]"
|
|
57
59
|
- name: Run formatting and lint checks
|
|
58
60
|
run: |
|
|
59
|
-
ruff format --check scripts examples
|
|
61
|
+
ruff format --check lib/python/base_cli scripts examples tests
|
|
60
62
|
ruff check lib/python/base_cli scripts examples tests
|
|
61
63
|
- name: Run strict typing and documentation checks
|
|
62
64
|
run: |
|
|
63
65
|
python -m mypy --strict examples/typed_consumer.py
|
|
66
|
+
python -m mypy --strict lib/python/base_cli
|
|
64
67
|
python scripts/validate_docs.py
|
|
65
68
|
python scripts/benchmark_runtime.py --check
|
|
66
69
|
python -m compileall -q examples
|
|
@@ -5,6 +5,92 @@ All notable changes to base-cli will be documented in this file.
|
|
|
5
5
|
The format follows [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
|
|
6
6
|
and versions are tracked in the repo-root `VERSION` file.
|
|
7
7
|
|
|
8
|
+
## [Unreleased]
|
|
9
|
+
|
|
10
|
+
### Planned
|
|
11
|
+
|
|
12
|
+
- Continue compatibility hardening and adoption work for the next release.
|
|
13
|
+
|
|
14
|
+
## [0.4.2] - 2026-08-08
|
|
15
|
+
|
|
16
|
+
This is a compatible pre-1.0 patch release. It contains correctness fixes,
|
|
17
|
+
security hardening, documentation improvements, and adoption polish after
|
|
18
|
+
0.4.1; it does not introduce a new API or JSON-contract compatibility
|
|
19
|
+
boundary.
|
|
20
|
+
|
|
21
|
+
### Changed
|
|
22
|
+
|
|
23
|
+
- Apply the profile-resolved display command to ambient production invocation
|
|
24
|
+
metadata so logs and history match the documented wrapper-label contract.
|
|
25
|
+
|
|
26
|
+
### Security
|
|
27
|
+
|
|
28
|
+
- Compact the launcher path in retained invocation logs so diagnostic bundles
|
|
29
|
+
do not disclose the local user's home directory or username.
|
|
30
|
+
|
|
31
|
+
### Fixed
|
|
32
|
+
|
|
33
|
+
- Fix the published documentation link to the reference applications.
|
|
34
|
+
- Classify a command that returns exit code `130` as `nonzero_return`; the
|
|
35
|
+
`interrupted` outcome remains reserved for actual interrupt exceptions.
|
|
36
|
+
|
|
37
|
+
### Documentation
|
|
38
|
+
|
|
39
|
+
- Document the exported history, command-protocol, and context APIs and enforce
|
|
40
|
+
public-symbol docstrings in the API tests.
|
|
41
|
+
|
|
42
|
+
## [0.4.1] - 2026-08-07
|
|
43
|
+
|
|
44
|
+
This is a compatible pre-1.0 patch release. It contains adoption polish,
|
|
45
|
+
security hardening, correctness fixes, and CI improvements after 0.4.0; it does
|
|
46
|
+
not introduce a new API or JSON-contract compatibility boundary.
|
|
47
|
+
|
|
48
|
+
### Added
|
|
49
|
+
|
|
50
|
+
- Add the MkDocs documentation site configuration, strict documentation checks,
|
|
51
|
+
and GitHub Pages deployment workflow.
|
|
52
|
+
- Add the importable, intentionally empty `base_cli.experimental` namespace for
|
|
53
|
+
future preview APIs without expanding the stable API surface.
|
|
54
|
+
|
|
55
|
+
### Changed
|
|
56
|
+
|
|
57
|
+
- Reclassify the project as Beta in package metadata to reflect its documented
|
|
58
|
+
API stability policy, compatibility suite, and production-adoption guidance.
|
|
59
|
+
- Add a version, license, install, and release-notes strip to the README and
|
|
60
|
+
validate it against the repository version contract.
|
|
61
|
+
- Extend the optional Typer adapter through Typer 0.27.x by selecting the
|
|
62
|
+
command tree's matching public or vendored Click dialect, with a Python 3.10
|
|
63
|
+
through 3.14 compatibility matrix covering Typer 0.25.1, 0.26.0, and 0.27.1.
|
|
64
|
+
- Document the intentional opaque `Context.user_config` boundary and the
|
|
65
|
+
compatibility requirements for any future fourth context type parameter.
|
|
66
|
+
|
|
67
|
+
- Expand CI quality gates with package-level strict mypy coverage, the full Ruff
|
|
68
|
+
format surface, and the updated benchmark percentile calculation.
|
|
69
|
+
- Improve the public documentation for inspection envelopes, delegated display
|
|
70
|
+
labels, environment configuration, typed user configuration, Typer access,
|
|
71
|
+
release guidance, and contributor setup.
|
|
72
|
+
|
|
73
|
+
### Security
|
|
74
|
+
|
|
75
|
+
- Compact home-relative paths in diagnostic `run.json` and `identity.json`
|
|
76
|
+
metadata so retained support bundles disclose less local path information.
|
|
77
|
+
|
|
78
|
+
### Fixed
|
|
79
|
+
|
|
80
|
+
- Capture command output consistently when JSON mode is supplied through Click's
|
|
81
|
+
`default_map` or combined short flags, preserving the single-envelope stdout
|
|
82
|
+
contract.
|
|
83
|
+
- Preserve every first-seen document column when rendering heterogeneous records
|
|
84
|
+
instead of silently dropping fields found only in later rows.
|
|
85
|
+
- Compute a real interpolated p95 in the runtime benchmark instead of reporting
|
|
86
|
+
the maximum under two names.
|
|
87
|
+
- Reject Unicode digit-like input that is not a decimal integer while retaining
|
|
88
|
+
the friendly positive-integer error message.
|
|
89
|
+
- Reuse one history display-command resolver across contexts, profiles, and
|
|
90
|
+
history records.
|
|
91
|
+
- Correct release-facing examples, changelog structure, API documentation,
|
|
92
|
+
contribution guidance, and package-level formatting coverage.
|
|
93
|
+
|
|
8
94
|
## [0.4.0] - 2026-08-05
|
|
9
95
|
|
|
10
96
|
This is a pre-1.0 minor release and therefore a compatibility boundary. See
|
|
@@ -53,6 +139,7 @@ the API stability policy and migration guide before upgrading from `0.3.x`.
|
|
|
53
139
|
|
|
54
140
|
### Changed
|
|
55
141
|
|
|
142
|
+
- Add README health and support badges for CI, downstream consumers, PyPI, and supported Python versions.
|
|
56
143
|
- Normalize command returns, Click errors, aborts, interrupts, `SystemExit`, and
|
|
57
144
|
unexpected exceptions through one core outcome model and clean `run_app()`
|
|
58
145
|
process boundary.
|
|
@@ -95,12 +182,6 @@ the API stability policy and migration guide before upgrading from `0.3.x`.
|
|
|
95
182
|
- Restore Click-native `--option=value` parsing, including redaction of
|
|
96
183
|
sensitive equals-form values.
|
|
97
184
|
|
|
98
|
-
## [Unreleased]
|
|
99
|
-
|
|
100
|
-
### Planned
|
|
101
|
-
|
|
102
|
-
- Continue compatibility hardening and adoption work for the next release.
|
|
103
|
-
|
|
104
185
|
## [0.3.0] - 2026-08-01
|
|
105
186
|
|
|
106
187
|
### Changed
|
|
@@ -2,6 +2,29 @@
|
|
|
2
2
|
|
|
3
3
|
Thank you for improving this project.
|
|
4
4
|
|
|
5
|
+
Please read the [Code of Conduct](CODE_OF_CONDUCT.md) before participating.
|
|
6
|
+
|
|
7
|
+
## Development setup
|
|
8
|
+
|
|
9
|
+
The `basectl` shortcuts below are optional. Contributors working outside the
|
|
10
|
+
Base workspace can run the same checks with the project’s standard Python
|
|
11
|
+
tooling:
|
|
12
|
+
|
|
13
|
+
```bash
|
|
14
|
+
python3 -m pip install -e ".[dev,typer,quality]"
|
|
15
|
+
python3 -m pytest
|
|
16
|
+
ruff format --check scripts examples
|
|
17
|
+
ruff check lib/python/base_cli scripts examples tests
|
|
18
|
+
python3 -m mypy --strict examples/typed_consumer.py
|
|
19
|
+
python3 scripts/validate_docs.py
|
|
20
|
+
python3 -m compileall -q examples
|
|
21
|
+
python3 -m build
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
Use the Python interpreter from your active virtual environment in place of
|
|
25
|
+
`python3` when necessary. The strict mypy command covers the supported typed
|
|
26
|
+
consumer fixture; the framework-wide typing gate is tracked separately.
|
|
27
|
+
|
|
5
28
|
## Workflow
|
|
6
29
|
|
|
7
30
|
1. Create or choose a GitHub issue before starting implementation work.
|
|
@@ -42,6 +65,8 @@ Thank you for improving this project.
|
|
|
42
65
|
|
|
43
66
|
Useful commands:
|
|
44
67
|
|
|
68
|
+
These shortcuts are available to contributors using the Base workspace:
|
|
69
|
+
|
|
45
70
|
```bash
|
|
46
71
|
basectl check base-cli
|
|
47
72
|
basectl doctor base-cli
|
|
@@ -1,13 +1,15 @@
|
|
|
1
1
|
Metadata-Version: 2.2
|
|
2
2
|
Name: base-cli
|
|
3
|
-
Version: 0.4.
|
|
3
|
+
Version: 0.4.2
|
|
4
4
|
Summary: A small, consumer-neutral Python CLI framework
|
|
5
5
|
Author: Base Foundry
|
|
6
6
|
License: Apache-2.0
|
|
7
7
|
Project-URL: Homepage, https://github.com/basefoundry/base-cli
|
|
8
8
|
Project-URL: Repository, https://github.com/basefoundry/base-cli
|
|
9
9
|
Project-URL: Issues, https://github.com/basefoundry/base-cli/issues
|
|
10
|
-
|
|
10
|
+
Project-URL: Documentation, https://basefoundry.github.io/base-cli/
|
|
11
|
+
Project-URL: Code of Conduct, https://github.com/basefoundry/base-cli/blob/main/CODE_OF_CONDUCT.md
|
|
12
|
+
Classifier: Development Status :: 4 - Beta
|
|
11
13
|
Classifier: Intended Audience :: Developers
|
|
12
14
|
Classifier: License :: OSI Approved :: Apache Software License
|
|
13
15
|
Classifier: Operating System :: MacOS
|
|
@@ -31,8 +33,9 @@ Requires-Dist: build>=1.2; extra == "dev"
|
|
|
31
33
|
Requires-Dist: hypothesis<7,>=6.100; extra == "dev"
|
|
32
34
|
Requires-Dist: mypy<2,>=1.17; extra == "dev"
|
|
33
35
|
Requires-Dist: pytest>=8.0; extra == "dev"
|
|
36
|
+
Requires-Dist: types-PyYAML<7,>=6.0; extra == "dev"
|
|
34
37
|
Provides-Extra: typer
|
|
35
|
-
Requires-Dist: typer<0.
|
|
38
|
+
Requires-Dist: typer<0.28,>=0.12; extra == "typer"
|
|
36
39
|
Provides-Extra: rich
|
|
37
40
|
Requires-Dist: rich<15,>=13.7; extra == "rich"
|
|
38
41
|
Provides-Extra: telemetry
|
|
@@ -43,9 +46,20 @@ Requires-Dist: coverage[toml]<8,>=7.6; extra == "quality"
|
|
|
43
46
|
Requires-Dist: pip-audit<3,>=2.7; extra == "quality"
|
|
44
47
|
Requires-Dist: pytest-cov<7,>=5; extra == "quality"
|
|
45
48
|
Requires-Dist: ruff<1,>=0.8; extra == "quality"
|
|
49
|
+
Provides-Extra: docs
|
|
50
|
+
Requires-Dist: mkdocs-material<10,>=9.5; extra == "docs"
|
|
46
51
|
|
|
47
52
|
# `base-cli`
|
|
48
53
|
|
|
54
|
+
[](https://github.com/basefoundry/base-cli/actions/workflows/tests.yml)
|
|
55
|
+
[](https://github.com/basefoundry/base-cli/actions/workflows/compatibility.yml)
|
|
56
|
+
[](https://pypi.org/project/base-cli/)
|
|
57
|
+
[](https://pypi.org/project/base-cli/)
|
|
58
|
+
|
|
59
|
+
| Version | License | Install | Release notes |
|
|
60
|
+
| --- | --- | --- | --- |
|
|
61
|
+
| `0.4.2` | [Apache-2.0](LICENSE) | `python -m pip install base-cli` | [v0.4.2](https://github.com/basefoundry/base-cli/releases/tag/v0.4.2) |
|
|
62
|
+
|
|
49
63
|
`base-cli` is the PyPI distribution; import it in Python as `base_cli`.
|
|
50
64
|
|
|
51
65
|
Install it with:
|
|
@@ -54,8 +68,40 @@ Install it with:
|
|
|
54
68
|
python -m pip install base-cli
|
|
55
69
|
```
|
|
56
70
|
|
|
71
|
+
Read the complete documentation at
|
|
72
|
+
<https://basefoundry.github.io/base-cli/>.
|
|
73
|
+
|
|
74
|
+
## Quick start
|
|
75
|
+
|
|
76
|
+
Create a small command with a consistent context, logging, and cleanup
|
|
77
|
+
lifecycle:
|
|
78
|
+
|
|
79
|
+
```python
|
|
80
|
+
from __future__ import annotations
|
|
81
|
+
|
|
82
|
+
import base_cli
|
|
83
|
+
|
|
84
|
+
|
|
85
|
+
app = base_cli.App(name="hello", version="0.1.0")
|
|
86
|
+
|
|
87
|
+
|
|
88
|
+
@app.command()
|
|
89
|
+
@base_cli.option("--name", default="world", show_default=True)
|
|
90
|
+
def hello(ctx: base_cli.Context, name: str) -> int:
|
|
91
|
+
ctx.log.info("greeting %s", name)
|
|
92
|
+
print(f"Hello, {name}!")
|
|
93
|
+
return base_cli.ExitCode.SUCCESS
|
|
94
|
+
|
|
95
|
+
|
|
96
|
+
if __name__ == "__main__":
|
|
97
|
+
raise SystemExit(base_cli.run_app(app))
|
|
98
|
+
```
|
|
99
|
+
|
|
100
|
+
Run it with `python hello.py --name Ada`. The full lifecycle and configuration
|
|
101
|
+
options are documented below.
|
|
102
|
+
|
|
57
103
|
Release builds, TestPyPI rehearsals, and protected PyPI publication are
|
|
58
|
-
documented in [`docs/releasing.md`](
|
|
104
|
+
documented in [`docs/releasing.md`](https://basefoundry.github.io/base-cli/releasing/). The package exposes
|
|
59
105
|
`base_cli.__version__`, which matches the distribution version.
|
|
60
106
|
|
|
61
107
|
The package is distributed under the Apache License 2.0. Base itself remains
|
|
@@ -79,33 +125,33 @@ execution, while `base_cli` provides reusable lifecycle behavior:
|
|
|
79
125
|
- test helpers built on Click's `CliRunner`
|
|
80
126
|
|
|
81
127
|
Typer applications can opt into the same lifecycle with the optional
|
|
82
|
-
`base-cli[typer]` extra. See [`docs/typer-adapter.md`](
|
|
128
|
+
`base-cli[typer]` extra. See [`docs/typer-adapter.md`](https://basefoundry.github.io/base-cli/typer-adapter/)
|
|
83
129
|
for the migration path; Typer remains optional and is never imported by the
|
|
84
130
|
core Click integration.
|
|
85
131
|
|
|
86
132
|
Automation-facing JSON output, errors, and logs are opt-in through the
|
|
87
|
-
versioned contracts documented in [`docs/json-contracts.md`](
|
|
133
|
+
versioned contracts documented in [`docs/json-contracts.md`](https://basefoundry.github.io/base-cli/json-contracts/).
|
|
88
134
|
Human output and Click error behavior remain the default.
|
|
89
135
|
|
|
90
136
|
The supported public facade, compatibility promises, deprecation warning
|
|
91
137
|
mechanism, and migration requirements are documented in
|
|
92
|
-
[`docs/api-stability.md`](
|
|
93
|
-
[`docs/migrations.md`](
|
|
138
|
+
[`docs/api-stability.md`](https://basefoundry.github.io/base-cli/api-stability/) and
|
|
139
|
+
[`docs/migrations.md`](https://basefoundry.github.io/base-cli/migrations/).
|
|
94
140
|
|
|
95
141
|
Security reporting, runtime trust boundaries, threat assumptions, and the
|
|
96
142
|
release security checklist are documented in [`SECURITY.md`](SECURITY.md),
|
|
97
|
-
[`docs/security-threat-model.md`](
|
|
98
|
-
[`docs/security-review.md`](
|
|
143
|
+
[`docs/security-threat-model.md`](https://basefoundry.github.io/base-cli/security-threat-model/), and
|
|
144
|
+
[`docs/security-review.md`](https://basefoundry.github.io/base-cli/security-review/).
|
|
99
145
|
|
|
100
146
|
Shared record renderers keep machine output stable: CSV and TSV stream
|
|
101
147
|
one-pass iterables without headers or footers, while terminal tables account
|
|
102
148
|
for Unicode display width and safely truncate oversized cells. See
|
|
103
|
-
[`docs/output-contracts.md`](
|
|
149
|
+
[`docs/output-contracts.md`](https://basefoundry.github.io/base-cli/output-contracts/) for the output rules and
|
|
104
150
|
deterministic width controls.
|
|
105
151
|
|
|
106
152
|
Optional Rich tables and OpenTelemetry lifecycle spans are available through
|
|
107
153
|
separate extras; they are never imported or required by the default install.
|
|
108
|
-
See [`docs/integrations.md`](
|
|
154
|
+
See [`docs/integrations.md`](https://basefoundry.github.io/base-cli/integrations/) for opt-in configuration and
|
|
109
155
|
graceful-degradation behavior.
|
|
110
156
|
|
|
111
157
|
## Design Goals
|
|
@@ -149,7 +195,7 @@ The generic profile has no manifest filename convention, no product-owned
|
|
|
149
195
|
configuration directory, and no implicit history writer. Applications can
|
|
150
196
|
provide those policies through callbacks or build their own profile. The
|
|
151
197
|
consumer-owned adapters should supply any product-specific policies. See
|
|
152
|
-
[`docs/consumer-profiles.md`](
|
|
198
|
+
[`docs/consumer-profiles.md`](https://basefoundry.github.io/base-cli/consumer-profiles/) for the boundary and
|
|
153
199
|
migration guidance.
|
|
154
200
|
|
|
155
201
|
### Typed extension contracts
|
|
@@ -198,7 +244,7 @@ can opt into `base_cli.ExtensionDiscovery`. It recognizes the documented
|
|
|
198
244
|
`base_cli.commands`, `base_cli.profiles`, and `base_cli.plugins` entry-point
|
|
199
245
|
groups. Discovery is lazy and cached, duplicate names fail explicitly, broken
|
|
200
246
|
extensions are isolated by `load_all()`, and consumers can disable discovery or
|
|
201
|
-
provide an allowlist. See [`docs/extensions.md`](
|
|
247
|
+
provide an allowlist. See [`docs/extensions.md`](https://basefoundry.github.io/base-cli/extensions/) for the
|
|
202
248
|
entry-point contracts and deterministic ordering rules.
|
|
203
249
|
|
|
204
250
|
## Public API
|
|
@@ -207,6 +253,8 @@ The supported facade is `import base_cli`. It exports the command lifecycle
|
|
|
207
253
|
(`App`, `Context`, `run_app`, decorators, and logging helpers), command filters,
|
|
208
254
|
and the structured command protocol helpers. Consumer-owned user configuration
|
|
209
255
|
is passed through `Context.user_config`; the library does not impose a schema.
|
|
256
|
+
See [`docs/user-config-typing.md`](https://basefoundry.github.io/base-cli/user-config-typing/) for the
|
|
257
|
+
intentional opaque boundary and the recommended typed accessor pattern.
|
|
210
258
|
The corresponding modules are also available as
|
|
211
259
|
`base_cli.command_filters`, `base_cli.command_protocol`, and
|
|
212
260
|
`base_cli.history`.
|
|
@@ -236,7 +284,7 @@ Typer, and automation/observability flows; each example has its own packaging,
|
|
|
236
284
|
tests, completion, release, and troubleshooting guidance.
|
|
237
285
|
|
|
238
286
|
Teams evaluating adoption can follow the [adopter readiness and migration
|
|
239
|
-
guide](
|
|
287
|
+
guide](https://basefoundry.github.io/base-cli/adopter-readiness/) and run the three independent
|
|
240
288
|
[downstream compatibility consumers](compatibility/README.md).
|
|
241
289
|
|
|
242
290
|
## Minimal Command
|
|
@@ -544,7 +592,7 @@ Every `base_cli.App` command gets these options:
|
|
|
544
592
|
- `--log-file <path>`: write the persistent log to a specific file.
|
|
545
593
|
- `--version`: shown when the `App` was created with a version.
|
|
546
594
|
- `--json`: opt-in machine output, when `LifecycleOptions.json` is enabled;
|
|
547
|
-
emits the versioned envelopes described in [`docs/json-contracts.md`](
|
|
595
|
+
emits the versioned envelopes described in [`docs/json-contracts.md`](https://basefoundry.github.io/base-cli/json-contracts/).
|
|
548
596
|
|
|
549
597
|
`LifecycleOptions()` preserves this default set. Its `debug`, `quiet`,
|
|
550
598
|
`environment`, `config`, `keep_temp`, `log_file`, and `version` fields are
|
|
@@ -865,7 +913,7 @@ available as a compatibility per-file policy; new applications should use
|
|
|
865
913
|
Logs use a stable, human-readable shape:
|
|
866
914
|
|
|
867
915
|
```text
|
|
868
|
-
2026-05-26 12:34:56 INFO path/to/file.py:42 message
|
|
916
|
+
2026-05-26 12:34:56 -0700 INFO path/to/file.py:42 message
|
|
869
917
|
```
|
|
870
918
|
|
|
871
919
|
Use either `ctx.log` directly:
|
|
@@ -992,7 +1040,7 @@ On POSIX, base-cli enforces owner-only `0600`/`0700` modes. On Windows, the
|
|
|
992
1040
|
default user-local cache root relies on inherited user-profile ACLs; consumers
|
|
993
1041
|
using a custom cache root must provide the appropriate ACL themselves.
|
|
994
1042
|
|
|
995
|
-
See [Platform support](
|
|
1043
|
+
See [Platform support](https://basefoundry.github.io/base-cli/platform-support/) for the supported Linux,
|
|
996
1044
|
WSL2, macOS, and native Windows boundaries. Native Windows support covers the
|
|
997
1045
|
generic `base-cli` framework; it does not imply native Windows support for
|
|
998
1046
|
Base or `basectl`.
|