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

Config file support #20

Closed
CleanCut opened this issue Jul 9, 2014 · 4 comments
Closed

Config file support #20

CleanCut opened this issue Jul 9, 2014 · 4 comments
Assignees

Comments

@CleanCut
Copy link
Owner

CleanCut commented Jul 9, 2014

It would be nice to support a .green config file.

@tbarron
Copy link
Contributor

tbarron commented Jul 12, 2014

Hi, Nathan,

I sent you a pull request with a first stab at config file support a little while ago. It just adds the ability to for green to read $HOME/.green if it exists, or $GREEN_CONF if it’s set in the environment, or -c/—config if specified on the command line.

The update doesn’t include any attempt to actually use any configuration data. Other parts of the program can get the configuration by doing

from green import config

cfg = config.get_config()

This will return a ConfigParser.ConfigParser object. So if the config contained, say:

[green]
output_format = pytest

the call cfg.get(‘green’, ‘output_format’) would return ‘pytest’.

I’ll be interested to hear what you think…

Tom

On 2014 Jul 09, at 14:18 , Nathan Stocks notifications@github.com wrote:

It would be nice to support a .green config file.


Reply to this email directly or view it on GitHub.

@CleanCut CleanCut self-assigned this Jul 17, 2014
@CleanCut
Copy link
Owner Author

Done and released in version 1.1.0!

@tbarron
Copy link
Contributor

tbarron commented Jul 18, 2014

Woohoo! Congratulations, Nathan!
:)

On 2014 Jul 17, at 19:53 , Nathan Stocks notifications@github.com wrote:

Done and released in version 1.1.0!


Reply to this email directly or view it on GitHub.

@CleanCut
Copy link
Owner Author

Thanks! And congratulations to you for getting this feature started!

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

No branches or pull requests

2 participants