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

To print version #4931

Open
wants to merge 7 commits into
base: main
Choose a base branch
from
Open

To print version #4931

wants to merge 7 commits into from

Conversation

alanwilter
Copy link

Just add flwr -V | --version option to get the app version.

Copy link
Contributor

@mohammadnaseri mohammadnaseri left a comment

Choose a reason for hiding this comment

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

Hi @alanwilter , Thank you for creating the PR. I left my review. Please let me know if you have any comments about them.

src/py/flwr/cli/app.py Outdated Show resolved Hide resolved
src/py/flwr/cli/app.py Outdated Show resolved Hide resolved
@alanwilter
Copy link
Author

@mohammadnaseri, flwr -h shows:

 Usage: flwr [OPTIONS] COMMAND [ARGS]...                                                                               
                                                                                                                       
 flwr is the Flower command line interface.                                                                  
                                                                                                                       
╭─ Options ───────────────────────────────────────────────────────────────────────────────────────────────────────────╮
│ --version             -V        Show the version and exit.                                                          │
│ --install-completion            Install completion for the current shell.                                           │
│ --show-completion               Show completion for the current shell, to copy it or customize the installation.    │
│ --help                -h        Show this message and exit.                                                         │
╰─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
╭─ Commands ──────────────────────────────────────────────────────────────────────────────────────────────────────────╮
│ build     Build a Flower App into a Flower App Bundle (FAB).                                                        │
│ install   Install a Flower App Bundle.                                                                              │
│ log       Get logs from a Flower project run.                                                                       │
│ login     Login to Flower SuperLink.                                                                                │
│ ls        List the details of one provided run ID or all runs in a Flower federation.                               │
│ new       Create new Flower App.                                                                                    │
│ run       Run Flower App.                                                                                           │
│ stop      Stop a run.                                                                                               │
│ version   Show the version and exit.                                                                                │
╰─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯

and all three options work:

$ flwr --version
Flower version: 1.16.0

$ flwr -V
Flower version: 1.16.0

$ flwr version
Flower version: 1.16.0

Now let me know if keeping 3 options or removing the flwr version.

I've also added the -h option and @charlesbvll, I "fixed" src/py/flwr_tool/check_copyright.py since heavens know how you guys were adding new files.

@mohammadnaseri
Copy link
Contributor

@alanwilter Thanks for the changes. Let's remove flwr version. Would you mind keeping only the changes related to version printing in this PR and moving everything else to a separate PR? That would be great for keeping each PR self-contained.

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