Applika CLI refactoring and actions to auto publish on PyPI - #38
Merged
Conversation
Refactor CLI from raw argparse to Typer with Pydantic validation and restructure as the `applika` package under src/applika/ for PyPI publication as applika-cli. - Migrate all commands to Typer: login, logout, whoami, applications, skill - Add Pydantic schemas for ApplicationCreate/Update with field validation - Restructure package layout: lib/, commands/, schemas/, utils/, skills/ - Add --version/-v flag reading version from pyproject.toml via importlib.metadata - Add README.md and update CLAUDE.md to reflect new structure - Remove legacy raw Python CLI files from src/ - Add conftest.py with fake store/api-client fixtures and full test suite - Create cli-ci.yaml: linter, tests, build (no PyPI publish) on develop/PRs - Create cli-cd.yaml: linter, tests, build, publish to PyPI on main Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Reduce minimum Python version from 3.12 to 3.10 across pyproject.toml, CI/CD workflows, and documentation for broader compatibility - Bump version to 0.1.2 in pyproject.toml - Fix version flag to work without requiring a subcommand by using invoke_without_command=True instead of no_args_is_help=True - Add pipx as an alternative installation method alongside uv tool install in README
Migrate from ApplicationArgs + payloads.py to inline payload building directly in command functions. This reduces indirection and simplifies the command layer. - Create api_resolve.py module for resolve_platform_id and resolve_company_input - Add SupportSchema (supports.py) to cache platforms and companies from API - Add ClearField enum for field clearing operations in edit command - Remove ApplicationArgs pattern and payloads.py module - Remove unused dates.py utility - Update README, CLAUDE.md, and SKILL.md to reflect new structure - Update test suite and enum definitions The refactoring maintains all existing functionality while improving code organization and reducing coupling between command parsing and payload construction.
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.
Summary
Full CLI migration from raw argparse to Typer + Pydantic, restructured into the
applikapackage, with CI/CD pipelines and inline API resolution.Type of Change
Included Changes
Features
ApplicationCreate,ApplicationUpdate,ClearFieldenum) for request validation and serializationauthcommand group (login,logout,whoami) with token-based session managementskillcommand group (install,list) for installing theapplika-cliAI skill--versionflag to the root CLIapplika applications filterwith typed enum flags (--mode,--status)--clearrepeatable option toapplika applications editfor nullifying individual fieldscli-ci.yaml,cli-cd.yaml) for automated testing and publishingREADME.mdfor the CLI packageImprovements
src/intosrc/applika/with proper sub-packagespayloads.pyandargs.pyindirection with inlineapi_resolve.pypatternFakeApiClientfixture and parametrized coverage0.1.2Related Issues
Testing
Checklist