Repository: dataversioncontrol/dvc (python)

Issue:
dvc repro --force does not work
It looks like the flag was just ignored.

Pull request description:
repro: fix --force option
Fixes #561

Signed-off-by: Ruslan Kuprieiev <kupruser@gmail.com>

Patch:
diff --git a/.appveyor.yml b/.appveyor.yml
index ec4f0c6e3..c00ffffae 100644
--- a/.appveyor.yml
+++ b/.appveyor.yml
@@ -41,14 +41,11 @@ environment:
 #      PYTHON_ARCH: "64"
 
 install:
-  - cinst graphviz
   - cinst wget
   - cinst awscli
   - cinst gsutil
   - cinst openssl.light
-  - wget --no-check-certificate https://github.com/dpinney/omf/raw/master/omf/static/pygraphviz-1.3.1-cp27-none-win32.whl
-  - pip install --upgrade pip setuptools
-  - pip install pygraphviz-1.3.1-cp27-none-win32.whl
+  - pip install --user --upgrade pip
   - pip install -r requirements.txt
   - python setup.py install
 
diff --git a/dvc/project.py b/dvc/project.py
index 7e48eda13..0a9e3e1a4 100644
--- a/dvc/project.py
+++ b/dvc/project.py
@@ -125,7 +125,7 @@ class Project(object):
         return stage
 
     def _reproduce_stage(self, stages, node, force):
-        if not stages[node].changed():
+        if not stages[node].changed() and not force:
             return []
 
         stages[node].reproduce(force=force)


Test patch:
diff --git a/tests/test_repro.py b/tests/test_repro.py
index fc995a67d..afd58ddd5 100644
--- a/tests/test_repro.py
+++ b/tests/test_repro.py
@@ -25,6 +25,12 @@ class TestRepro(TestDvc):
                      cmd='python {} {} {}'.format(self.CODE, self.FOO, self.file1))
 
 
+class TestReproForce(TestRepro):
+    def test(self):
+        stages = self.dvc.reproduce(self.file1_stage, force=True)
+        self.assertEqual(len(stages), 2)
+
+
 class TestReproChangedCode(TestRepro):
     def test(self):
         self.swap_code()