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

Arguments/Configuration Refactor #14

Merged
merged 2 commits into from
Feb 19, 2014
Merged

Arguments/Configuration Refactor #14

merged 2 commits into from
Feb 19, 2014

Conversation

jayclassless
Copy link
Contributor

In this PR I took the liberty to refactor how command line arguments are handled so that configuration for prospector can be specified from a .prospectorrc/setup.cfg/tox.ini file, PROSPECTOR_* environment variables, and/or command line arguments. Most of the heavy lifting in processing all these sources for configuration is handled by a library I've been working on called setoptconf. This new rig should support all the same options prospector has had (unless I missed something), with the exception of --path. It now takes paths as positional arguments (but currently only processes the first path specified).

I've also tweaked the setup.py so that the prospector script is created/installed via a console_script entry point, rather than maintaining a bin/prospector script separately.

@coveralls
Copy link

Coverage Status

Coverage remained the same when pulling e25fa88 on jayclassless:config_refactor into d99ab6a on landscapeio:master.

@carlio
Copy link
Member

carlio commented Feb 19, 2014

Awesome stuff 👍

Does this library also allow you to load from config files in ~/.config?

carlio added a commit that referenced this pull request Feb 19, 2014
@carlio carlio merged commit 5ac7772 into landscapeio:master Feb 19, 2014
@carlio carlio mentioned this pull request Feb 19, 2014
@jayclassless
Copy link
Contributor Author

Yea, it could pull from something in ~/.config. It's just matter of adding/modifying the sources used in prospector.config.build_default_sources(). Do you have a particular filename and/or format in mind?

@carlio
Copy link
Member

carlio commented Feb 19, 2014

No not particuarly, it's just something that I noticed other tools such as pep8 do - see https://github.com/jcrocholl/pep8/blob/master/pep8.py#L67

It'd probably be cool for setoptconf to abstract away the home directory expansion, but I haven't looked too hard into this idea.

@jayclassless jayclassless deleted the config_refactor branch June 29, 2014 01:24
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.

None yet

3 participants