Skip to content

Commit 38924a8

Browse files
committed
Initial commit
0 parents  commit 38924a8

15 files changed

+753
-0
lines changed

Diff for: .github/workflows/tests.yaml

+87
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,87 @@
1+
name: Tests
2+
3+
on:
4+
pull_request: {}
5+
push: {}
6+
schedule:
7+
- cron: '5 1 * * *' # every day at 01:05
8+
9+
env:
10+
DVC_TEST: "true"
11+
HOMEBREW_NO_AUTO_UPDATE: 1
12+
SHELL: /bin/bash
13+
14+
jobs:
15+
lint:
16+
timeout-minutes: 10
17+
runs-on: ubuntu-latest
18+
steps:
19+
- name: Cancel Previous Runs
20+
uses: styfle/[email protected]
21+
with:
22+
access_token: ${{ github.token }}
23+
- uses: actions/[email protected]
24+
with:
25+
fetch-depth: 0
26+
- name: Set up Python 3.8
27+
uses: actions/[email protected]
28+
with:
29+
python-version: 3.8
30+
- name: Install requirements
31+
run: |
32+
pip install wheel
33+
pip install -e '.[tests]'
34+
pip install git+https://github.com/iterative/dvc pre-commit
35+
- name: Check README
36+
run: python setup.py checkdocs
37+
- uses: pre-commit/[email protected]
38+
tests:
39+
timeout-minutes: 45
40+
runs-on: ${{ matrix.os }}
41+
strategy:
42+
fail-fast: false
43+
matrix:
44+
os: [ubuntu-20.04, windows-latest, macos-latest]
45+
pyv: ["3.7", "3.8", "3.9", "3.10"]
46+
exclude:
47+
# no wheels for pygit2 yet
48+
- os: windows-latest
49+
pyv: "3.10"
50+
steps:
51+
- uses: actions/[email protected]
52+
with:
53+
fetch-depth: 0
54+
- name: Set up Python
55+
uses: actions/[email protected]
56+
with:
57+
python-version: ${{ matrix.pyv }}
58+
- name: get pip cache dir
59+
id: pip-cache-dir
60+
run: |
61+
echo "::set-output name=dir::$(pip cache dir)"
62+
- name: set pip cache
63+
id: pip-cache
64+
uses: actions/[email protected]
65+
with:
66+
path: ${{ steps.pip-cache-dir.outputs.dir }}
67+
key: ${{ runner.os }}-pip-${{ hashFiles('setup.cfg') }}
68+
restore-keys: |
69+
${{ runner.os }}-pip-
70+
- name: install
71+
if: steps.cache.pip-cache-dir.cache-hit != 'true'
72+
run: |
73+
pip install --upgrade pip setuptools wheel
74+
pip install -e ".[tests]"
75+
pip install git+https://github.com/iterative/dvc
76+
- name: setup git
77+
run: |
78+
git config --global user.email "[email protected]"
79+
git config --global user.name "DVC Tester"
80+
- name: run tests
81+
timeout-minutes: 40
82+
run: pytest -n=auto --cov-report=xml --cov-report=term
83+
- name: upload coverage report
84+
uses: codecov/[email protected]
85+
with:
86+
file: ./coverage.xml
87+
fail_ci_if_error: false

Diff for: .gitignore

+131
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,131 @@
1+
# Byte-compiled / optimized / DLL files
2+
__pycache__/
3+
*.py[cod]
4+
*$py.class
5+
6+
# C extensions
7+
*.so
8+
9+
# Distribution / packaging
10+
.Python
11+
build/
12+
develop-eggs/
13+
dist/
14+
downloads/
15+
eggs/
16+
.eggs/
17+
lib/
18+
lib64/
19+
parts/
20+
sdist/
21+
var/
22+
wheels/
23+
pip-wheel-metadata/
24+
share/python-wheels/
25+
*.egg-info/
26+
.installed.cfg
27+
*.egg
28+
MANIFEST
29+
30+
# PyInstaller
31+
# Usually these files are written by a python script from a template
32+
# before PyInstaller builds the exe, so as to inject date/other infos into it.
33+
*.manifest
34+
*.spec
35+
36+
# Installer logs
37+
pip-log.txt
38+
pip-delete-this-directory.txt
39+
40+
# Unit test / coverage reports
41+
htmlcov/
42+
.tox/
43+
.nox/
44+
.coverage
45+
.coverage.*
46+
.cache
47+
nosetests.xml
48+
coverage.xml
49+
*.cover
50+
*.py,cover
51+
.hypothesis/
52+
.pytest_cache/
53+
54+
# Translations
55+
*.mo
56+
*.pot
57+
58+
# Django stuff:
59+
*.log
60+
local_settings.py
61+
db.sqlite3
62+
db.sqlite3-journal
63+
64+
# Flask stuff:
65+
instance/
66+
.webassets-cache
67+
68+
# Scrapy stuff:
69+
.scrapy
70+
71+
# Sphinx documentation
72+
docs/_build/
73+
74+
# PyBuilder
75+
target/
76+
77+
# Jupyter Notebook
78+
.ipynb_checkpoints
79+
80+
# IPython
81+
profile_default/
82+
ipython_config.py
83+
84+
# pyenv
85+
.python-version
86+
87+
# pipenv
88+
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
89+
# However, in case of collaboration, if having platform-specific dependencies or dependencies
90+
# having no cross-platform support, pipenv may install dependencies that don't work, or not
91+
# install all needed dependencies.
92+
#Pipfile.lock
93+
94+
# PEP 582; used by e.g. github.com/David-OConnor/pyflow
95+
__pypackages__/
96+
97+
# Celery stuff
98+
celerybeat-schedule
99+
celerybeat.pid
100+
101+
# SageMath parsed files
102+
*.sage.py
103+
104+
# Environments
105+
.env
106+
.venv
107+
env/
108+
venv/
109+
ENV/
110+
env.bak/
111+
venv.bak/
112+
113+
# Spyder project settings
114+
.spyderproject
115+
.spyproject
116+
117+
# Rope project settings
118+
.ropeproject
119+
120+
# mkdocs documentation
121+
/site
122+
123+
# mypy
124+
.mypy_cache/
125+
.dmypy.json
126+
dmypy.json
127+
128+
# Pyre type checker
129+
.pyre/
130+
131+
/dvc_ssh/_dvc_ssh_version.py

Diff for: .pre-commit-config.yaml

+57
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
ci:
2+
skip: [mypy, pylint]
3+
4+
repos:
5+
- hooks:
6+
- id: black
7+
language_version: python3
8+
repo: https://github.com/ambv/black
9+
rev: 21.10b0
10+
- repo: https://github.com/pre-commit/pre-commit-hooks
11+
rev: v4.0.1
12+
hooks:
13+
- id: check-toml
14+
- id: check-yaml
15+
- hooks:
16+
- id: codespell
17+
args:
18+
- --ignore-words-list
19+
- ba,datas,fo,uptodate
20+
repo: https://github.com/codespell-project/codespell
21+
rev: v2.1.0
22+
- hooks:
23+
- id: isort
24+
language_version: python3
25+
repo: https://github.com/timothycrosley/isort
26+
rev: 5.9.3
27+
- hooks:
28+
- id: flake8
29+
language_version: python3
30+
additional_dependencies:
31+
- flake8-bugbear
32+
- flake8-comprehensions
33+
- flake8-debugger
34+
- flake8-string-format
35+
repo: https://gitlab.com/pycqa/flake8
36+
rev: 3.9.2
37+
- repo: local
38+
hooks:
39+
- id: mypy
40+
name: mypy
41+
entry: mypy
42+
files: ^dvc_ssh/
43+
language: system
44+
types: [python]
45+
- id: pylint
46+
name: pylint
47+
entry: pylint
48+
language: system
49+
types: [python]
50+
- hooks:
51+
- args:
52+
- -i
53+
- "2"
54+
id: beautysh
55+
language_version: python3
56+
repo: https://github.com/lovesegfault/beautysh
57+
rev: v6.2.1

0 commit comments

Comments
 (0)