diff --git a/.appveyor.yml b/.appveyor.yml index c00ffffae..a061d5548 100644 --- a/.appveyor.yml +++ b/.appveyor.yml @@ -1,6 +1,7 @@ branches: only: - master + - devel platform: x86 @@ -12,6 +13,8 @@ environment: GOOGLE_APPLICATION_CREDENTIALS: gcp-creds.json GCP_CREDS: secure: 96fJ3r2i2GohbXHwnSs5N4EplQ7q8YmLpPWM0AC+f4s= + CODECOV_TOKEN: + secure: Hp3+vwZzsh1i2qjitm/hujpXA475YNhUSgrdpQ7dliCVQC+1lVcQMiDWQ0K4DEH4 matrix: @@ -61,6 +64,7 @@ test_script: - nosetests --cover-inclusive --cover-erase --cover-package=dvc --with-coverage after_test: + - codecov - if "%APPVEYOR_REPO_TAG%"=="true" .\scripts\build_windows.cmd artifacts: diff --git a/dvc/system.py b/dvc/system.py index 7ad86f541..7a00dfa31 100644 --- a/dvc/system.py +++ b/dvc/system.py @@ -6,7 +6,7 @@ from builtins import str if os.name == 'nt': import ntfsutils.hardlink as winlink - from ntfsutils.fs import * + from ntfsutils.fs import getdirinfo class System(object): @@ -24,27 +24,13 @@ class System(object): return winlink.create(source, link_name) - @staticmethod - def _getfileinfo(path): - # FIXME: current implementation from ntfsutils doesn't support dirs, - # and until https://github.com/sid0/ntfs/pull/10 is not merged and - # pip package not updated, we have to use our own version. - hfile = CreateFile(path, GENERIC_READ, FILE_SHARE_READ, None, OPEN_EXISTING, FILE_FLAG_BACKUP_SEMANTICS, None) - if hfile is None: - raise WinError() - info = BY_HANDLE_FILE_INFORMATION() - rv = GetFileInformationByHandle(hfile, info) - CloseHandle(hfile) - if rv == 0: - raise WinError() - return info - @staticmethod def inode(path): if System.is_unix(): return os.stat(path).st_ino - info = System._getfileinfo(path) + # getdirinfo from ntfsutils works on both files and dirs + info = getdirinfo(path) return hash((info.dwVolumeSerialNumber, info.nFileIndexHigh, info.nFileIndexLow)) @staticmethod diff --git a/requirements.txt b/requirements.txt index 3ac6c3e0b..a74e6217a 100644 --- a/requirements.txt +++ b/requirements.txt @@ -10,7 +10,7 @@ configobj>=5.0.6 networkx>=1.11 pyyaml>=3.12 gitpython>=2.1.8 -ntfsutils>=0.1.3 +ntfsutils>=0.1.4 checksumdir>=1.1.4 setuptools>=34.0.0 nanotime>=0.5.2 diff --git a/scripts/ci/script.sh b/scripts/ci/script.sh index d7bde0aba..faf7b0d6f 100644 --- a/scripts/ci/script.sh +++ b/scripts/ci/script.sh @@ -5,14 +5,7 @@ set -e ./unittests.sh -if [[ "$TRAVIS_OS_NAME" == "linux" && \ - "$(python -c 'import sys; print(sys.version_info[0])')" == "2" && \ - "$TRAVIS_PULL_REQUEST" == "false" && \ - "$TRAVIS_BRANCH" == "master" && \ - "$TRAVIS_SECURE_ENV_VARS" == "true" ]]; then - cat .coverage - codeclimate-test-reporter --file .coverage --debug --token $CC_TEST_REPORTER_ID -fi +codecov if [[ ! -z "$TRAVIS_TAG" ]]; then if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then diff --git a/setup.py b/setup.py index bd5433af4..6331ddcf8 100644 --- a/setup.py +++ b/setup.py @@ -16,7 +16,7 @@ install_requires = [ "networkx>=1.11", "pyyaml>=3.12", "gitpython>=2.1.8", - "ntfsutils>=0.1.3", + "ntfsutils>=0.1.4", "checksumdir>=1.1.4", "setuptools>=34.0.0", "nanotime>=0.5.2", diff --git a/test-requirements.txt b/test-requirements.txt index ff358c712..9be2f383f 100644 --- a/test-requirements.txt +++ b/test-requirements.txt @@ -1,7 +1,7 @@ nose>=1.3.7 mock>=2.0.0 -coverage==4.3.1 -codeclimate-test-reporter==0.2.3 -xmltodict==0.11.0 -awscli==1.14.18 +coverage +codecov +xmltodict>=0.11.0 +awscli>=1.14.18 pywin32; sys_platform == 'nt'