This repository has been archived by the owner on Apr 25, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2
Conversation
This file contains 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
…fication/pyk into noah/default-options
nwatson22
commented
Feb 27, 2024
nwatson22
commented
Feb 27, 2024
Going to merge this, and get it pushed through to all downstream repos, then can work on next batch of refactorings. Mostly because I have other CLI changes that I want to go through, and want ot try out the new interface for making those changes. After we get this pushed through, we can discuss the next refactoring/design that we'd like to pursue here: runtimeverification/k#4188 |
ehildenb
approved these changes
Mar 7, 2024
This was referenced Mar 7, 2024
rv-jenkins
pushed a commit
that referenced
this pull request
Mar 8, 2024
Two changes to options are reverted, which weren't able to be pushed through KEVM: - #955 - #916 --------- Co-authored-by: devops <[email protected]>
ehildenb
pushed a commit
that referenced
this pull request
Mar 11, 2024
Changes from: - #916 - #955 --------- Co-authored-by: devops <[email protected]> Co-authored-by: Tamás Tóth <[email protected]>
Baltoli
pushed a commit
to runtimeverification/k
that referenced
this pull request
Apr 9, 2024
Two changes to options are reverted, which weren't able to be pushed through KEVM: - runtimeverification/pyk#955 - runtimeverification/pyk#916 --------- Co-authored-by: devops <[email protected]>
Baltoli
pushed a commit
to runtimeverification/k
that referenced
this pull request
Apr 9, 2024
Changes from: - runtimeverification/pyk#916 - runtimeverification/pyk#955 --------- Co-authored-by: devops <[email protected]> Co-authored-by: Tamás Tóth <[email protected]>
Baltoli
pushed a commit
to runtimeverification/k
that referenced
this pull request
Apr 9, 2024
Closes runtimeverification/pyk#885. Overhauls the way command line argument parsing and parameter passing is done. When building a pyk-based command-line tool, for each subcommand of the tool, extend `class Command` . This subclass should contain all information about what arguments are accepted by that command (through providing its own arguments or inheriting from other `Options` classes), the default values of those arguments, the name of the command, and the help string for the command, as static fields. The values of those options for a specific invocation of that command are stored as non-static fields of a `Command`. The `Command` subclass contains the code that runs when that command is called in `exec()`. In addition, default values of arguments inherited from other `Options` classes can be overridden in the subclass. The `CLI` class manages the tool's CLI options. It is constructed by passing in the name of every command subclass to be included in the tool. It can then build the whole `ArgumentParser` for the tool and process the arguments to instantiate a new `*Command` of the correct type and with the correct arguments. Advantages: - All information about a subcommand is consolidated into one place - Default values specified in only one place - Commands only have to be listed once, when instantiating `CLI` - Setting up an argument parser with all subcommands is done automatically. - Routing of requested command to its associated execution function is done automatically. --------- Co-authored-by: devops <[email protected]> Co-authored-by: Tamás Tóth <[email protected]>
Baltoli
pushed a commit
to runtimeverification/k
that referenced
this pull request
Apr 9, 2024
Two changes to options are reverted, which weren't able to be pushed through KEVM: - runtimeverification/pyk#955 - runtimeverification/pyk#916 --------- Co-authored-by: devops <[email protected]>
Baltoli
pushed a commit
to runtimeverification/k
that referenced
this pull request
Apr 9, 2024
Changes from: - runtimeverification/pyk#916 - runtimeverification/pyk#955 --------- Co-authored-by: devops <[email protected]> Co-authored-by: Tamás Tóth <[email protected]>
Baltoli
pushed a commit
to runtimeverification/k
that referenced
this pull request
Apr 9, 2024
Closes runtimeverification/pyk#885. Overhauls the way command line argument parsing and parameter passing is done. When building a pyk-based command-line tool, for each subcommand of the tool, extend `class Command` . This subclass should contain all information about what arguments are accepted by that command (through providing its own arguments or inheriting from other `Options` classes), the default values of those arguments, the name of the command, and the help string for the command, as static fields. The values of those options for a specific invocation of that command are stored as non-static fields of a `Command`. The `Command` subclass contains the code that runs when that command is called in `exec()`. In addition, default values of arguments inherited from other `Options` classes can be overridden in the subclass. The `CLI` class manages the tool's CLI options. It is constructed by passing in the name of every command subclass to be included in the tool. It can then build the whole `ArgumentParser` for the tool and process the arguments to instantiate a new `*Command` of the correct type and with the correct arguments. Advantages: - All information about a subcommand is consolidated into one place - Default values specified in only one place - Commands only have to be listed once, when instantiating `CLI` - Setting up an argument parser with all subcommands is done automatically. - Routing of requested command to its associated execution function is done automatically. --------- Co-authored-by: devops <[email protected]> Co-authored-by: Tamás Tóth <[email protected]>
Baltoli
pushed a commit
to runtimeverification/k
that referenced
this pull request
Apr 9, 2024
Two changes to options are reverted, which weren't able to be pushed through KEVM: - runtimeverification/pyk#955 - runtimeverification/pyk#916 --------- Co-authored-by: devops <[email protected]>
Baltoli
pushed a commit
to runtimeverification/k
that referenced
this pull request
Apr 9, 2024
Changes from: - runtimeverification/pyk#916 - runtimeverification/pyk#955 --------- Co-authored-by: devops <[email protected]> Co-authored-by: Tamás Tóth <[email protected]>
Baltoli
pushed a commit
to runtimeverification/k
that referenced
this pull request
Apr 10, 2024
Closes runtimeverification/pyk#885. Overhauls the way command line argument parsing and parameter passing is done. When building a pyk-based command-line tool, for each subcommand of the tool, extend `class Command` . This subclass should contain all information about what arguments are accepted by that command (through providing its own arguments or inheriting from other `Options` classes), the default values of those arguments, the name of the command, and the help string for the command, as static fields. The values of those options for a specific invocation of that command are stored as non-static fields of a `Command`. The `Command` subclass contains the code that runs when that command is called in `exec()`. In addition, default values of arguments inherited from other `Options` classes can be overridden in the subclass. The `CLI` class manages the tool's CLI options. It is constructed by passing in the name of every command subclass to be included in the tool. It can then build the whole `ArgumentParser` for the tool and process the arguments to instantiate a new `*Command` of the correct type and with the correct arguments. Advantages: - All information about a subcommand is consolidated into one place - Default values specified in only one place - Commands only have to be listed once, when instantiating `CLI` - Setting up an argument parser with all subcommands is done automatically. - Routing of requested command to its associated execution function is done automatically. --------- Co-authored-by: devops <[email protected]> Co-authored-by: Tamás Tóth <[email protected]>
Baltoli
pushed a commit
to runtimeverification/k
that referenced
this pull request
Apr 10, 2024
Two changes to options are reverted, which weren't able to be pushed through KEVM: - runtimeverification/pyk#955 - runtimeverification/pyk#916 --------- Co-authored-by: devops <[email protected]>
Baltoli
pushed a commit
to runtimeverification/k
that referenced
this pull request
Apr 10, 2024
Changes from: - runtimeverification/pyk#916 - runtimeverification/pyk#955 --------- Co-authored-by: devops <[email protected]> Co-authored-by: Tamás Tóth <[email protected]>
Baltoli
pushed a commit
to runtimeverification/k
that referenced
this pull request
Apr 10, 2024
Closes runtimeverification/pyk#885. Overhauls the way command line argument parsing and parameter passing is done. When building a pyk-based command-line tool, for each subcommand of the tool, extend `class Command` . This subclass should contain all information about what arguments are accepted by that command (through providing its own arguments or inheriting from other `Options` classes), the default values of those arguments, the name of the command, and the help string for the command, as static fields. The values of those options for a specific invocation of that command are stored as non-static fields of a `Command`. The `Command` subclass contains the code that runs when that command is called in `exec()`. In addition, default values of arguments inherited from other `Options` classes can be overridden in the subclass. The `CLI` class manages the tool's CLI options. It is constructed by passing in the name of every command subclass to be included in the tool. It can then build the whole `ArgumentParser` for the tool and process the arguments to instantiate a new `*Command` of the correct type and with the correct arguments. Advantages: - All information about a subcommand is consolidated into one place - Default values specified in only one place - Commands only have to be listed once, when instantiating `CLI` - Setting up an argument parser with all subcommands is done automatically. - Routing of requested command to its associated execution function is done automatically. --------- Co-authored-by: devops <[email protected]> Co-authored-by: Tamás Tóth <[email protected]>
Baltoli
pushed a commit
to runtimeverification/k
that referenced
this pull request
Apr 10, 2024
Two changes to options are reverted, which weren't able to be pushed through KEVM: - runtimeverification/pyk#955 - runtimeverification/pyk#916 --------- Co-authored-by: devops <[email protected]>
Baltoli
pushed a commit
to runtimeverification/k
that referenced
this pull request
Apr 10, 2024
Changes from: - runtimeverification/pyk#916 - runtimeverification/pyk#955 --------- Co-authored-by: devops <[email protected]> Co-authored-by: Tamás Tóth <[email protected]>
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Closes #885.
Overhauls the way command line argument parsing and parameter passing is done.
When building a pyk-based command-line tool, for each subcommand of the tool, extend
class Command
. This subclass should contain all information about what arguments are accepted by that command (through providing its own arguments or inheriting from otherOptions
classes), the default values of those arguments, the name of the command, and the help string for the command, as static fields. The values of those options for a specific invocation of that command are stored as non-static fields of aCommand
. TheCommand
subclass contains the code that runs when that command is called inexec()
. In addition, default values of arguments inherited from otherOptions
classes can be overridden in the subclass.The
CLI
class manages the tool's CLI options. It is constructed by passing in the name of every command subclass to be included in the tool. It can then build the wholeArgumentParser
for the tool and process the arguments to instantiate a new*Command
of the correct type and with the correct arguments.Advantages:
CLI