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

Update execution parameter handling #154

Merged
merged 4 commits into from
Jun 13, 2024
Merged

Update execution parameter handling #154

merged 4 commits into from
Jun 13, 2024

Conversation

dimkarakostas
Copy link
Member

All Submissions:

  • Have you followed the guidelines in our Contributing documentation?
  • Have you verified that there aren't any other open Pull Requests for the same update/change?
  • Does the Pull Request pass all tests?

Description

Remove all command line arguments and move all parameters to the config file. Also creates helper functions to retrieve the params. This makes it more consistent with the tokenomics analysis execution flow.

try:
granularity = get_config_data()['granularity']
if granularity:
if granularity in ['day', 'week', 'month', 'year']:
Copy link
Member

Choose a reason for hiding this comment

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

Not a big deal, but if we inlude None in this list we wouldn't need the outside if

Copy link
Member

Choose a reason for hiding this comment

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

Also, before we used "all" instead of empty / None. I'm fine to keep the empty one but then some more docstring needs to be changed where it shows "all" as an option. Additionally, since "aggregate_by" was renamed to "granularity", it should be renamed everywhere (there are some helper functions that use it and haven't been renamed from what I can tell)

consensus_decentralization/helper.py Show resolved Hide resolved
@LadyChristina LadyChristina self-requested a review June 13, 2024 13:17
Copy link
Member

@LadyChristina LadyChristina left a comment

Choose a reason for hiding this comment

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

LGTM

@LadyChristina LadyChristina merged commit 95d757a into main Jun 13, 2024
1 check passed
@LadyChristina LadyChristina deleted the config branch June 13, 2024 13:19
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