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

Reduce the config file #325

Closed
3 of 8 tasks
iamdefinitelyahuman opened this issue Jan 13, 2020 · 2 comments · Fixed by #408
Closed
3 of 8 tasks

Reduce the config file #325

iamdefinitelyahuman opened this issue Jan 13, 2020 · 2 comments · Fixed by #408
Labels
Discussion Under discussion - not yet ready for implementation
Milestone

Comments

@iamdefinitelyahuman
Copy link
Member

iamdefinitelyahuman commented Jan 13, 2020

Overview

There are a lot of options in brownie-config.yaml. This could be bad because:

  1. It can be overwhelming / confusing for new users
  2. There is a lot of potential variance in Brownie's behavior

Specification

  • Remove the networks field and create a new CLI section, brownie networks, where these settings are defined.
    • Share network settings across all projects. Allow new networks to be added manually, imported and exported to JSON
    • Default to automatic gas price and gas limit for non-local networks, 0 gas and block-gas-limit for test networks.
  • Make all pytest-specific settings optional. Include them in the documentation but do not require them in the config file.
  • Make compiler settings optional. Default to the latest EVM and determine the solc version from the pragma statement. Document possible config settings and allow the default behavior to be over-ridden.
  • Remove options for customizing colors
    • add single (optional) setting to toggle all color use
  • Remove the option to minify source and perform this action by default.

Related to this, there can be some significant refactoring of how CONFIG and ARGV are handled internally.

Dependencies

Most of these changes can be made without breaking anything, so long as the configuration fields are made optional without changing their structure.

Some changes, particularly to network, probably should eventually break things, so this may not be complete until Brownie 2.0.0.

@iamdefinitelyahuman iamdefinitelyahuman added the Discussion Under discussion - not yet ready for implementation label Jan 13, 2020
@iamdefinitelyahuman iamdefinitelyahuman added this to the Brownie 2.0.0 milestone Jan 13, 2020
@fubuloubu
Copy link
Contributor

This could be done in two stages:

  1. Add sensible defaults to everything; Allow users to not specify config fields with defaults (next minor release)
  2. Remove certain fields entirely that are too verbose (next major release)

Allowing more defaults isn't a breaking change, just needs to be documented.

@iamdefinitelyahuman
Copy link
Member Author

Custom color options removed in #350

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Discussion Under discussion - not yet ready for implementation
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants