Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add project name validation to flwr new #3241

Merged
merged 4 commits into from
Apr 11, 2024
Merged

Conversation

charlesbvll
Copy link
Member

Issue

Description

Currently, we can successfully create an invalid project with flwr new if we use a name that isn't a valid Python module string.

Related issues/PRs

N/A

Proposal

Explanation

Check if project_name contains characters other than a-zA-Z0-9_, if so, prompt the user for a new name (with the initial project_name sanitized as default).

Checklist

  • Implement proposed change
  • Update the changelog entry below
  • Make CI checks pass
  • Ping maintainers on Slack (channel #contributions)

Changelog entry

Any other comments?

N/A

@charlesbvll charlesbvll marked this pull request as ready for review April 10, 2024 17:28
@tanertopal tanertopal merged commit 7fdc309 into main Apr 11, 2024
28 checks passed
@tanertopal tanertopal deleted the flwr-new-validate-name branch April 11, 2024 07:03
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.

2 participants