Repository navigation
Added the additional_dependencies config parameter - #295
Conversation
Added the ability to specify additional dependencies to be installed in the pre-commit environment. Fixed broken tests.
|
I'm opening this pull request now while I add tests in order to get some feedback before going much further with it. |
There was a problem hiding this comment.
minor nit. I'd format this like:
def install_environment(
repo_cmd_runner,
version='default',
additional_dependencies=(),
):This minimizes merge conflicts slightly when adding / removing / reordering parameters
|
Looks great, don't worry too much about appveyor, their stuff is broken right now :/ |
There was a problem hiding this comment.
just thought about this, these'll need quoting in the general case:
env.run(
'cd '{{prefix}}' && '
'pip install {deps}'.format(
' '.join(pipes.quote(dep) for dep in additional_dependencies),
),
)There was a problem hiding this comment.
errr, pre_commit.util.shell_escape instead of pipes.quote
f0370e2 to
e97ff97
Compare
e97ff97 to
d6be9cd
Compare
|
Any advice on where I should be looking at for adding tests to address the coverage issue on 2.6? |
|
@blarghmatey you'll want to add a test that triggers the py26 is notably touchy due to some coverage bugs around context managers that are hard to avoid / factor out (which is why the minimum is set to 99% anyway). You can probably add the tests to I also sent a PR for you: blarghmatey#1 :) |
Some slight fixups
13898e4 to
e96e1a2
Compare
|
@asottile Can you duplicate the test failures on your machine? They run successfully on my laptop so I'm not exactly sure how to fix them. |
e96e1a2 to
0ee4c3e
Compare
|
Yep, I'll run through these :) |
|
I opened a PR against your branch: blarghmatey#2 |
Fixups + make the tests work
|
One last thing, let's add these to the json schemas (pre_commit/clientlib/validate_{manifest,config}.py And then |
|
@asottile Hope you had a good weekend! I added the |
|
@blarghmatey sounds good. I'll merge this when I get into work (I'll probably spec them in manifest anyway since I have some usecases where I'll want them there) Thanks for the awesome PR! Please add your self (if you'd like) on https://github.com/pre-commit/pre-commit.github.io |
|
@asottile Awesome! I'll also add in the new attribute to the docs on the site. |
Added the additional_dependencies config parameter
Added the ability to specify additional dependencies to be installed in
the pre-commit environment.