Skip to content

Commit dafd8f2

Browse files
committed
initial commit
0 parents  commit dafd8f2

23 files changed

+1313
-0
lines changed

.cruft.json

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
{
2+
"template": "https://github.com/iterative/py-template",
3+
"commit": "46ace5315b5c697135c690bdbc42fd4a898b259a",
4+
"checkout": null,
5+
"context": {
6+
"cookiecutter": {
7+
"project_name": "iterative-telemetry",
8+
"package_name": "iterative_telemetry",
9+
"friendly_name": "Iterative Telemetry",
10+
"author": "Iterative",
11+
"email": "support@dvc.org",
12+
"github_user": "iterative",
13+
"version": "0.0.0",
14+
"copyright_year": "2022",
15+
"license": "Apache-2.0",
16+
"short_description": "Common library for sending telemetry",
17+
"development_status": "Development Status :: 1 - Planning",
18+
"_copy_without_render": [
19+
".github/workflows/release.yaml",
20+
".github/workflows/tests.yaml",
21+
".github/workflows/update-template.yaml"
22+
],
23+
"_template": "https://github.com/iterative/py-template"
24+
}
25+
},
26+
"directory": null
27+
}

.github/dependabot.yml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
version: 2
2+
3+
updates:
4+
- directory: "/"
5+
package-ecosystem: "pip"
6+
schedule:
7+
interval: "weekly"
8+
labels:
9+
- "maintenance"
10+
11+
- directory: "/"
12+
package-ecosystem: "github-actions"
13+
schedule:
14+
interval: "weekly"
15+
labels:
16+
- "maintenance"

.github/workflows/docs.yml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
name: Documentation
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
workflow_dispatch:
8+
9+
jobs:
10+
docs:
11+
runs-on: ubuntu-latest
12+
steps:
13+
- uses: actions/checkout@v2
14+
with:
15+
fetch-depth: 0
16+
- uses: actions/setup-python@v2
17+
- run: pip install '.[docs]'
18+
- run: git config user.name 'github-actions[bot]' && git config user.email 'github-actions[bot]@users.noreply.github.com'
19+
- name: Publish docs
20+
run: mkdocs gh-deploy

.github/workflows/release.yml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
name: Release
2+
3+
on:
4+
release:
5+
types: [published]
6+
7+
jobs:
8+
release:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- name: Check out the repository
12+
uses: actions/checkout@v2
13+
14+
- name: Set up Python 3.7
15+
uses: actions/setup-python@v2
16+
with:
17+
python-version: '3.7'
18+
19+
- name: Upgrade pip and nox
20+
run: |
21+
pip install --upgrade pip nox
22+
pip --version
23+
nox --version
24+
25+
- name: Build package
26+
run: nox -s build
27+
28+
- name: Upload package
29+
uses: pypa/gh-action-pypi-publish@master
30+
with:
31+
user: __token__
32+
password: ${{ secrets.PYPI_TOKEN }}

.github/workflows/tests.yml

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
name: Tests
2+
3+
on: [push, pull_request]
4+
5+
jobs:
6+
tests:
7+
timeout-minutes: 10
8+
runs-on: ${{ matrix.os }}
9+
strategy:
10+
fail-fast: false
11+
matrix:
12+
os: [ubuntu-20.04, windows-latest, macos-latest]
13+
pyv: ['3.7', '3.8', '3.9', '3.10']
14+
15+
steps:
16+
- name: Check out the repository
17+
uses: actions/checkout@v2
18+
19+
- name: Set up Python ${{ matrix.pyv }}
20+
uses: actions/setup-python@v2
21+
with:
22+
python-version: ${{ matrix.pyv }}
23+
24+
- name: Upgrade pip and nox
25+
run: |
26+
python -m pip install --upgrade pip nox
27+
pip --version
28+
nox --version
29+
30+
- name: Lint code and check dependencies
31+
run: nox -s lint safety
32+
33+
- name: Run tests
34+
run: nox -s tests-${{ matrix.pyv }} -- --cov-report=xml
35+
36+
- name: Upload coverage report
37+
uses: codecov/codecov-action@v2.1.0
38+
39+
- name: Build package
40+
run: nox -s build
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
2+
name: Update template
3+
4+
on:
5+
schedule:
6+
- cron: '5 1 * * *' # every day at 01:05
7+
8+
workflow_dispatch:
9+
10+
jobs:
11+
update:
12+
runs-on: ubuntu-latest
13+
steps:
14+
- uses: actions/checkout@v2
15+
- name: Install deps
16+
run: pip install cruft
17+
- name: Update template
18+
id: update
19+
run: |
20+
cruft update -y
21+
echo "::set-output name=changes::$(git diff)"
22+
- name: Create PR
23+
if: ${{ steps.update.outputs.changes != '' }}
24+
uses: peter-evans/create-pull-request@v3
25+
with:
26+
commit-message: update template
27+
title: update template

.gitignore

Lines changed: 138 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,138 @@
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+
share/python-wheels/
24+
*.egg-info/
25+
.installed.cfg
26+
*.egg
27+
MANIFEST
28+
29+
# PyInstaller
30+
# Usually these files are written by a python script from a template
31+
# before PyInstaller builds the exe, so as to inject date/other infos into it.
32+
*.manifest
33+
*.spec
34+
35+
# Installer logs
36+
pip-log.txt
37+
pip-delete-this-directory.txt
38+
39+
# Unit test / coverage reports
40+
htmlcov/
41+
.tox/
42+
.nox/
43+
.coverage
44+
.coverage.*
45+
.cache
46+
nosetests.xml
47+
coverage.xml
48+
*.cover
49+
*.py,cover
50+
.hypothesis/
51+
.pytest_cache/
52+
cover/
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+
.pybuilder/
76+
target/
77+
78+
# Jupyter Notebook
79+
.ipynb_checkpoints
80+
81+
# IPython
82+
profile_default/
83+
ipython_config.py
84+
85+
# pyenv
86+
# For a library or package, you might want to ignore these files since the code is
87+
# intended to run in multiple environments; otherwise, check them in:
88+
# .python-version
89+
90+
# pipenv
91+
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
92+
# However, in case of collaboration, if having platform-specific dependencies or dependencies
93+
# having no cross-platform support, pipenv may install dependencies that don't work, or not
94+
# install all needed dependencies.
95+
#Pipfile.lock
96+
97+
# PEP 582; used by e.g. github.com/David-OConnor/pyflow
98+
__pypackages__/
99+
100+
# Celery stuff
101+
celerybeat-schedule
102+
celerybeat.pid
103+
104+
# SageMath parsed files
105+
*.sage.py
106+
107+
# Environments
108+
.env
109+
.venv
110+
env/
111+
venv/
112+
ENV/
113+
env.bak/
114+
venv.bak/
115+
116+
# Spyder project settings
117+
.spyderproject
118+
.spyproject
119+
120+
# Rope project settings
121+
.ropeproject
122+
123+
# mkdocs documentation
124+
/site
125+
126+
# mypy
127+
.mypy_cache/
128+
.dmypy.json
129+
dmypy.json
130+
131+
# Pyre type checker
132+
.pyre/
133+
134+
# pytype static type analyzer
135+
.pytype/
136+
137+
# Cython debug symbols
138+
cython_debug/

.pre-commit-config.yaml

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
default_language_version:
2+
python: python3
3+
repos:
4+
- repo: https://github.com/psf/black
5+
rev: 22.3.0
6+
hooks:
7+
- id: black
8+
- repo: https://github.com/pre-commit/pre-commit-hooks
9+
rev: v4.0.1
10+
hooks:
11+
- id: check-added-large-files
12+
- id: check-case-conflict
13+
- id: check-docstring-first
14+
- id: check-executables-have-shebangs
15+
- id: check-toml
16+
- id: check-merge-conflict
17+
- id: check-yaml
18+
- id: debug-statements
19+
- id: end-of-file-fixer
20+
- id: mixed-line-ending
21+
- id: sort-simple-yaml
22+
- id: trailing-whitespace
23+
- repo: https://github.com/codespell-project/codespell
24+
rev: v2.1.0
25+
hooks:
26+
- id: codespell
27+
- repo: https://github.com/asottile/pyupgrade
28+
rev: v2.31.0
29+
hooks:
30+
- id: pyupgrade
31+
- repo: https://github.com/PyCQA/isort
32+
rev: 5.10.1
33+
hooks:
34+
- id: isort
35+
- repo: https://gitlab.com/pycqa/flake8
36+
rev: 3.9.2
37+
hooks:
38+
- id: flake8
39+
additional_dependencies:
40+
- flake8-bandit
41+
- flake8-broken-line
42+
- flake8-bugbear
43+
- flake8-comprehensions
44+
- flake8-debugger
45+
- flake8-string-format
46+
- bandit<1.7.3

0 commit comments

Comments
 (0)