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

feat: add default yaml config #1157

Closed
wants to merge 4 commits into from
Closed

feat: add default yaml config #1157

wants to merge 4 commits into from

Conversation

wakamex
Copy link
Contributor

@wakamex wakamex commented Nov 28, 2022

What I did

attempt to pull out all the defaults from code into a single yaml

Why I did it

this can be used to transparently add more detailed parameters, like in ApeWorX/ape-alchemy#35. also allows non-coder users to understand what the default settings are, and to easily override them.

How I did it

removed parameters and hard-coded them into the standard yaml. maybe a separate default-config.yaml would be better than ape-config.yaml.
replaced the context-based test_config with an overload to the default config that executes additional overrides (I bet this is causing lots of test failures):
= 195 failed, 512 passed, 3 skipped, 7 xfailed, 15 warnings, 31 errors in 1125.89s (0:18:45) =

How to verify it

possibly additional tests should be needed, though i got it working with test_config.py

Checklist

  • All changes are completed
  • finish testing (possibly go back to context-based test_config)
  • possibly rename to default-config.yaml, distinct from ape-config.yaml
  • New test cases have been added
  • Documentation has been updated

@wakamex wakamex changed the title default config in yaml feat: add default yaml config Nov 28, 2022
@antazoey
Copy link
Member

ape --config was supposed to have similar intent here, and not require any source code.
You should be able to do ape --config and see the default config

Comment on lines +14 to +19
# alchemy:
# min_retry_delay: 1_000 # 1 second delay on fail
# retry_backoff_factor: 2 # explonential backoff
# max_retry_delay: 30_000 # 30 seconds
# max_retries: 3
# retry_jitter: 250 # 250 milliseconds
Copy link
Contributor Author

Choose a reason for hiding this comment

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

like this @fubuloubu? 😉 (re: getting provider settings from Config)

@github-actions
Copy link

This pull request is considered stale because it has been open 30 days with no activity. Remove stale label, add a comment, or make a new commit, otherwise this PR will be closed in 5 days.

@github-actions github-actions bot added the stale No activity for 30 days label Dec 29, 2022
@github-actions
Copy link

github-actions bot commented Jan 4, 2023

This PR was closed because it has been inactive for 35 days.

@github-actions github-actions bot added the inactive no recent activity, closed label Jan 4, 2023
@github-actions github-actions bot closed this Jan 4, 2023
@wakamex wakamex mentioned this pull request Jan 14, 2023
27 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
inactive no recent activity, closed stale No activity for 30 days
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants