Normalize project name - #3012
Open
kaminimangal wants to merge 13 commits into
Open
Conversation
…t wizards The project name should default to the app name (machine-readable), not the formal name, matching PEP 621 conventions. Updates both the 'briefcase new' and 'briefcase convert' wizards, plus adds test coverage for the convert command's default (previously untested). Assisted-by: Claude
…ards Per the issue, project_name in the interactive wizard should be validated with the same PEP508 rules as app_name, not accepted as arbitrary text. Updates existing tests to use valid app-name-style values for project_name fixtures. Assisted-by: Claude
Implements the remaining parts of the project_name normalization: - merge_pep621_config now maps PEP621 'name' to Briefcase's project_name (canonicalized), when no legacy project_name is set. - A legacy project_name in [tool.briefcase] still takes priority, but is checked for PEP621 compliance; a non-compliant value triggers a warning rather than an error, with a note that this may become an error in future. - parse_config runs the merge step even when there's no [project] table, so the legacy-name warning still fires in that case. Assisted-by: Claude
Assisted-by: Claude
Assisted-by: Claude
Assisted-by: Claude
Assisted-by: Claude
Assisted-by: Claude
Assisted-by: Claude
Covers the case where neither a legacy project_name nor a PEP621 name is present, ensuring 100% branch coverage. Assisted-by: Claude
Assisted-by: Claude
Covers the case where a legacy project_name is present and valid, so no warning is raised. Should resolve the remaining branch coverage gap (1316->1325). Assisted-by: Claude
Assisted-by: Claude
Member
|
Thanks for the PR; just checking that you've noticed the CI failure. Briefcase's contribution guide contains full details on how to set up a development environment and run the test suite so you can avoid CI surprises like the ones you've had in submitting this PR. |
Member
|
Are you planning to address these CI failures, or should we close this PR so someone else can pick up the issue? |
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.
Fixes #3011
This PR normalizes how
project_nameis handled in Briefcase, per the issue:In the
newandconvertwizards, the project name now defaults tothe app name instead of the formal name, and is validated using the
same rules as app name.
If a project defines a PEP 621
namein[project], it's now usedas the
project_name(normalized), as part of the PEP 621 merge step.If a legacy
project_nameis set in[tool.briefcase]and it isn'tPEP 621 compliant, Briefcase now warns instead of erroring, since this
may become an error in a future version.
Tests were added/updated to cover all three changes.
PR Checklist:
Assisted-by: Claude