Skip to content

De-duplicate Application URL and author options during project conversion - #3146

Closed
abdul-karim-mia wants to merge 1 commit into
beeware:mainfrom
abdul-karim-mia:convert/deduplicate-url-author-options
Closed

abdul-karim-mia wants to merge 1 commit into
beeware:mainfrom
abdul-karim-mia:convert/deduplicate-url-author-options

Conversation

@abdul-karim-mia

Copy link
Copy Markdown

Resolves #2120

Description

When converting a project using briefcase convert, if pyproject.toml defines identical URLs across multiple metadata fields (e.g., both Homepage and Repository pointing to the same repository URL), input_url previously presented duplicate options in the selection prompt. Similarly, multiple author entries with identical names produced duplicate choices and redundant joined strings (Name & Name).

This PR:

  • De-duplicates options extracted from self.pep621_data.get("urls", {}).values() while preserving insertion order using dict.fromkeys.
  • De-duplicates author names extracted from self.pep621_data.get("authors", []) using dict.fromkeys.
  • Adds unit tests in test_input_url.py and test_input_author.py verifying that duplicate URLs and authors are filtered out from selection questions.
  • Adds newsfragment changes/2120.bugfix.md.

PR Checklist:

  • I will abide by the BeeWare Code of Conduct
  • I have read and have followed the CONTRIBUTING.md file
  • This PR was generated or assisted using an AI tool

Signed-off-by: Abdul karim mia <97598943+abdul-karim-mia@users.noreply.github.com>

@freakboy3742 freakboy3742 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the PR; however, in this case, I think the solution is what was hinted at in this comment - switch to a PEP 621 representation for authors. We have a PR in flight for that at present (see #3131), so it should be resolved in the near future.

Apologies for the confusion.

@abdul-karim-mia
abdul-karim-mia deleted the convert/deduplicate-url-author-options branch November 12, 2026 05:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

De-duplicate Application URL options during project conversion

2 participants