← Back to issue list

create_build_plan: refactor

View original Github issue

Metadata

Project
charmcraft
Number
#837
Type
pull request
State
merged
Author
mr-cal
Labels
Created
Updated
Closed

Current evaluation

Merged refactoring of create_build_plan to a shared location, returning named tuples and adding unit tests. Placed in charmcraft/providers/providers.py for splitting into the craft-providers library. Approved and merged.

Suggested action:

No scores available.

Issue body

### Overview - `create_build_plan` is now in a common location so other commands can access it - `create_build_plan` returns a list of named tuples - Added a comprehensive set of unit tests. Previously, this function was only being tested indirectly. ### Rationale for the new file `charmcraft/providers/providers.py` As the new `craft-providers` interface is built out, the directory `charmcraft/providers/` will be split into 2 places: 1. `charmcraft/providers.py` for charmcraft-specific code 2. The `craft-providers` library The code in the `charmcraft/providers/` directory will be split piece-by-piece, in a series of small PRs. Once all the code is finally split, the file `charmcraft/providers/providers.py` will be moved to `charmcraft/providers.py`. Then, the directory will be removed. Finally, all references to the intermediate file`charmcraft/providers/providers.py` will be replaced with `charmcraft/providers.py`. (CRAFT-1272)

Evaluation history

Date Model Scores Action Summary
qwen/qwen3.6-35b-a3b Merged refactoring of create_build_plan to a shared location, returning named tuples and adding unit tests. Placed in charmcraft/providers/providers.py for splitting into the craft-providers library. Approved and merged.
qwen3.6-35b-a3b-mtp-q6 Merged refactoring of create_build_plan to a shared location, returning named tuples and adding unit tests. Added a temporary providers.py file as a stepping stone for future separation from craft-providers.
qwen3.6-35b-a3b-mtp-q6 Merged refactoring of create_build_plan to a shared location, returning named tuples and adding unit tests. Serves as an intermediate migration step for charmcraft/providers.py and the craft-providers library.

Update history

No update history recorded yet.

Related issues

Issue Project State Summary Similarity
#453 build: spin off charm builder as a separate tool (CRAFT-373) charmcraft merged Merged. Extracts charm building routines into a standalone CharmBuilder tool. Replaces PR #452 by deferring venv and pip features. Tests updated for new invocation with no behavioral changes. Approved and passed CI.
71%