fix: register config command in lazy loading map and add CI workflow#265
Merged
fix: register config command in lazy loading map and add CI workflow#265
Conversation
6d82e0f to
6623cea
Compare
- Add config_cmd to _COMMAND_MODULE_MAP in cli.py (missing after #257 and #261 were merged independently) - Add config to EXPECTED_TOP_LEVEL_COMMANDS, EXPECTED_MODULE_MAP, and EXPECTED_SUBCOMMANDS in regression tests - Fix test_cli_import_does_not_load_output to handle third-party deps already loaded by other tests in the same pytest process - Add ci.yml GHA workflow that runs unit tests and dist checks on every push and PR Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
6623cea to
abb9f88
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Details
Fixes CI failures (both GHA and Cloud Build) caused by PR #257 (config directory consolidation) and PR #261 (lazy command loading) being merged independently - the
configcommand was not registered in the lazy loading map.Also adds a CI workflow and upgrades both workflows with latest action versions, minimum permissions, and Python version matrix testing.
I will take the liberty to merge these fixes directly so I can publish a new release.
Fixes
config_cmdmissing from_COMMAND_MODULE_MAP- PR feat: consolidate config files into ~/.limacharlie.d/ directory #257 addedconfig_cmd.pybut PR feat: lazy command loading for faster CLI startup #261 replaced auto-discovery with a static map that didn't include it. Alltest_config_cmd.pytests failed with "No such command 'config'". Fixed by adding"config": ("config_cmd", "group")to the map.Regression test snapshots out of date -
EXPECTED_TOP_LEVEL_COMMANDS,EXPECTED_MODULE_MAP, andEXPECTED_SUBCOMMANDSintest_cli_lazy_loading_regression.pywere missing theconfigcommand.test_cli_import_does_not_load_outputflaky in shared process - The test assertedjmespath not in sys.modulesafter a freshlimacharlie.cliimport, butjmespathcould already be loaded by other tests earlier in the same pytest process. Fixed by tracking pre-existing modules and only asserting on newly imported ones.CI improvements
New
ci.ymlworkflow - Runs unit tests on PRs targetingmaster/cli-v2and pushes to those branches. Tests across all supported Python versions (3.9-3.14) withfail-fast: false. Includes minimum permissions (contents: read) and concurrency withcancel-in-progress: true. Uses concurrency group keyed on PR number to avoid duplicate runs for push + pull_request events.Publish workflow matrix tests -
publish-to-pypi.ymlnow runs unit tests across all supported Python versions (3.9-3.14) before building and publishing. Added workflow-levelpermissions: contents: readwith job-level overrides only for the publish job.Latest GHA action versions - Updated both workflows to use latest action versions:
actions/checkoutv4 -> v6actions/setup-pythonv5 -> v6actions/upload-artifactv4 -> v7actions/download-artifactv4 -> v8Blast radius / isolation
limacharlie/cli.py- one line added to static maptests/unit/test_cli_lazy_loading_regression.py- snapshot updates onlytests/microbenchmarks/test_cli_startup_microbenchmark.py- test isolation fix.github/workflows/ci.yml- new workflow file.github/workflows/publish-to-pypi.yml- matrix tests, permissions, action version upgradesPerformance characteristics
No impact.
Notable contracts / APIs
None.
Related PRs
config_cmd.py)_COMMAND_MODULE_MAP)