Change code

This commit is contained in:
Dmitry Petrov
2017-03-26 14:39:34 -07:00
parent 333ca7c0e5
commit d22ff6289b
9 changed files with 25 additions and 12 deletions
+1 -1
View File
@@ -1,3 +1,3 @@
#!/bin/bash
PYTHONPATH=$DVC_HOME python $DVC_HOME/dvc/cmd_data_import.py $@
PYTHONPATH=$DVC_HOME python $DVC_HOME/dvc/command/data_import.py $@
+1 -1
View File
@@ -1,3 +1,3 @@
#!/bin/bash
PYTHONPATH=$DVC_HOME python $DVC_HOME/dvc/cmd_data_remove.py $@
PYTHONPATH=$DVC_HOME python $DVC_HOME/dvc/command/data_remove.py $@
+1 -1
View File
@@ -1,3 +1,3 @@
#!/bin/bash
PYTHONPATH=$DVC_HOME python $DVC_HOME/dvc/cmd_data_sync.py $@
PYTHONPATH=$DVC_HOME python $DVC_HOME/dvc/command/data_sync.py $@
+1 -2
View File
@@ -1,4 +1,3 @@
#!/bin/bash
PYTHONPATH=$DVC_HOME python $DVC_HOME/dvc/cmd_init.py $@
PYTHONPATH=$DVC_HOME python $DVC_HOME/dvc/command/init.py $@
+1 -2
View File
@@ -1,4 +1,3 @@
#!/bin/bash
PYTHONPATH=$DVC_HOME python $DVC_HOME/dvc/cmd_repro.py $@
PYTHONPATH=$DVC_HOME python $DVC_HOME/dvc/command/repro.py $@
+1 -1
View File
@@ -1,3 +1,3 @@
#!/bin/bash
PYTHONPATH=$DVC_HOME python $DVC_HOME/dvc/cmd_run.py $@
PYTHONPATH=$DVC_HOME python $DVC_HOME/dvc/command/run.py $@
+2 -1
View File
@@ -2,6 +2,7 @@ import os
from dvc.exceptions import DvcException
from dvc.git_wrapper import GitWrapper
from dvc.executor import Executor
class RepositoryChangeError(DvcException):
@@ -48,7 +49,7 @@ class RepositoryChange(object):
self.config = config
self.path_factory = path_factory
GitWrapper.exec_cmd_only_success(args, stdout, stderr)
Executor.exec_cmd_only_success(args, stdout, stderr)
self._file_states = self._get_file_states()
self._changed_data_items, self._externally_created_files = path_factory.to_data_items(self.changed_files)
+12 -2
View File
@@ -8,18 +8,28 @@ TEST_REPO=repo_clean
TEST_REPO=repo_clean
function dvc_info() {
echo '=============== DVC test: $1 ==============='
}
function _init_repo() {
dvc_info 'init reporitory'
git init
dvc-init
dvc_info 'import xml files'
mkdir data/xml
dvc-data-import ../$RAW_DATA_LOCAL/* data/xml
dvc-data-import "../$RAW_DATA_LOCAL/*" data/xml
dvc_info 'copy code'
mkdir code
cp ../$CODE_LOCAL/* code/
cp "../$CODE_LOCAL/*" code/
git add code/
git commit -m 'Add code'
}
function create_repo() {
dvc_info('create reporitory')
rm -rf $TEST_REPO
mkdir $TEST_REPO
(cd $TEST_REPO && _init_repo)
+5 -1
View File
@@ -4,12 +4,16 @@ source common.rc
function run_test() {
mkdir data/tsv
dvc_info 'convert Budget.xml to tsv'
dvc-run --code code/xmltotsv.py python code/xmltotsv.py --extract row/@Id,row/@UserId,row/@Name,row/@Class,row/@TagBased,row/@Date data/xml/Badges.xml data/tsv/Badges.tsv
dvc_info 'modify code'
echo " " >> code/xmltotsv.py
git commit -am 'Change code'
dvc-repro data/tsv/Badges.tsv
dvc_info 'reproduce tsv convertion code'
dvc-repro data/tsv/Badges.tsv
}
TEST_REPO=repo_repro_test