Skip to content
This repository has been archived by the owner on Apr 25, 2024. It is now read-only.

add toml support for pyk options #1008

Closed
wants to merge 26 commits into from
Closed

add toml support for pyk options #1008

wants to merge 26 commits into from

Conversation

ovatman
Copy link
Contributor

@ovatman ovatman commented Mar 20, 2024

this pr adds toml config support for pyk.

  • First it introduces an Options class to handle config file (--config-file) and config profile (--confişg-profile) parameters. This argument set is added to all the pyk related commands as base arguments.
  • Later, toml file is processed to return a dictionary of option-value pairs. Afterwards, this dictionary is updated from the arguments coming from the command line.
  • During toml handling, we need mapping between the option strings in the tomlş file and actual option destinations. To perform this mapping from_option_string() method is added whenever there's a mapping that involves a transformation other than dash-to-underscore transformation. These mappings are unified in get_option_string_destination() functions to form a lookup table related to the command being issued.
  • Finally, for better testability some methods (most importantly create_argument_parser()) in the main module is moved to the cli.pyk module

@ovatman ovatman self-assigned this Mar 20, 2024
@ovatman ovatman marked this pull request as ready for review March 21, 2024 07:44
@ovatman ovatman changed the title Tolga/toml options add toml support for pyk options Mar 21, 2024
@ehildenb
Copy link
Member

Please open a branch on KEVM and Kontrol demonstrating the changes that are needed there for this to work, and link to those branches here. Check that their test-suites are also passing on at least a handful of examples. Also, add an example in Kontrol of using this TOML parsing.

@Baltoli
Copy link
Contributor

Baltoli commented Apr 16, 2024

@Baltoli Baltoli closed this Apr 16, 2024
@Baltoli Baltoli deleted the tolga/toml-options branch April 16, 2024 16:35
rv-jenkins added a commit to runtimeverification/k that referenced this pull request Apr 24, 2024
Transfer of: runtimeverification/pyk#1008

---------

Co-authored-by: Tolga Ovatman <[email protected]>
Co-authored-by: Tolga Ovatman <[email protected]>
Co-authored-by: Georgy Lukyanov <[email protected]>
Co-authored-by: gtrepta <[email protected]>
Co-authored-by: rv-jenkins <[email protected]>
Co-authored-by: devops <[email protected]>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants