Skip to content

Commit 2aec812

Browse files
committed
use py-template
1 parent 16c420a commit 2aec812

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

45 files changed

+823
-1122
lines changed

.cruft.json

+23
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
{
2+
"template": "https://github.com/iterative/py-template",
3+
"commit": "9d2e2863ebeea39f1ac27523c939fc7a6743a3b4",
4+
"checkout": null,
5+
"context": {
6+
"cookiecutter": {
7+
"project_name": "dvclive",
8+
"package_name": "dvclive",
9+
"friendly_name": "dvclive",
10+
"author": "Paweł Redzyński",
11+
"email": "[email protected]",
12+
"github_user": "iterative",
13+
"version": "0.0.0",
14+
"copyright_year": "2022",
15+
"license": "Apache-2.0",
16+
"docs": "False",
17+
"short_description": "Metric logger for ML projects.",
18+
"development_status": "Development Status :: 4 - Beta",
19+
"_template": "https://github.com/iterative/py-template"
20+
}
21+
},
22+
"directory": null
23+
}

.gitattributes

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
* text=auto eol=lf

.github/dependabot.yml

+29
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
version: 2
2+
3+
updates:
4+
- directory: "/"
5+
package-ecosystem: "pip"
6+
schedule:
7+
interval: "weekly"
8+
labels:
9+
- "maintenance"
10+
# Update via cruft
11+
ignore:
12+
- dependency-name: "mkdocs*"
13+
- dependency-name: "pytest*"
14+
- dependency-name: "pylint"
15+
- dependency-name: "mypy"
16+
17+
- directory: "/"
18+
package-ecosystem: "github-actions"
19+
schedule:
20+
interval: "weekly"
21+
labels:
22+
- "maintenance"
23+
# Update via cruft
24+
ignore:
25+
- dependency-name: "actions/checkout"
26+
- dependency-name: "actions/setup-python"
27+
- dependency-name: "pypa/gh-action-pypi-publish"
28+
- dependency-name: "codecov/codecov-action"
29+
- dependency-name: "peter-evans/create-pull-request"

.github/workflows/package.yaml

-26
This file was deleted.

.github/workflows/release.yml

+38
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
name: Release
2+
3+
on:
4+
release:
5+
types: [published]
6+
workflow_dispatch:
7+
8+
env:
9+
FORCE_COLOR: "1"
10+
11+
jobs:
12+
release:
13+
runs-on: ubuntu-latest
14+
steps:
15+
- name: Check out the repository
16+
uses: actions/checkout@v3
17+
with:
18+
fetch-depth: 0
19+
20+
- name: Set up Python 3.10
21+
uses: actions/setup-python@v4
22+
with:
23+
python-version: '3.10'
24+
25+
- name: Upgrade pip and nox
26+
run: |
27+
pip install --upgrade pip nox
28+
pip --version
29+
nox --version
30+
31+
- name: Build package
32+
run: nox -s build
33+
34+
- name: Upload package
35+
if: github.event_name == 'release'
36+
uses: pypa/gh-action-pypi-publish@release/v1
37+
with:
38+
password: ${{ secrets.PYPI_TOKEN }}

.github/workflows/tests.yaml

-54
This file was deleted.

.github/workflows/tests.yml

+63
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
name: Tests
2+
3+
on:
4+
push:
5+
branches: [main]
6+
pull_request:
7+
workflow_dispatch:
8+
9+
env:
10+
FORCE_COLOR: "1"
11+
12+
concurrency:
13+
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
14+
cancel-in-progress: true
15+
16+
jobs:
17+
tests:
18+
timeout-minutes: 10
19+
runs-on: ${{ matrix.os }}
20+
strategy:
21+
fail-fast: false
22+
matrix:
23+
os: [ubuntu-20.04, windows-latest, macos-latest]
24+
pyv: ["3.8", "3.9", "3.10"]
25+
include:
26+
- { os: ubuntu-latest, pyv: "pypy3.8" }
27+
- { os: ubuntu-latest, pyv: "3.11.0-rc - 3.11", nox_pyv: "3.11" }
28+
29+
steps:
30+
- name: Check out the repository
31+
uses: actions/checkout@v3
32+
with:
33+
fetch-depth: 0
34+
35+
- name: Set up Python ${{ matrix.pyv }}
36+
uses: actions/setup-python@v4
37+
with:
38+
python-version: ${{ matrix.pyv }}
39+
40+
- name: Upgrade pip and nox
41+
run: |
42+
python -m pip install --upgrade pip nox
43+
pip --version
44+
nox --version
45+
46+
- name: install libomp
47+
# required for xgboost
48+
if: runner.os == 'macOS'
49+
run: |
50+
wget https://raw.githubusercontent.com/Homebrew/homebrew-core/679923b4eb48a8dc7ecc1f05d06063cd79b3fc00/Formula/libomp.rb -O $(find $(brew --repository) -name libomp.rb)
51+
brew install ninja libomp
52+
brew pin libomp
53+
- name: Lint code and check dependencies
54+
run: nox -s lint safety
55+
56+
- name: Run tests
57+
run: nox -s tests-${{ matrix.nox_pyv || matrix.pyv }} -- --cov-report=xml
58+
59+
- name: Upload coverage report
60+
uses: codecov/[email protected]
61+
62+
- name: Build package
63+
run: nox -s build
+16
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
name: Update template
2+
3+
on:
4+
schedule:
5+
- cron: '5 1 * * *' # every day at 01:05
6+
workflow_dispatch:
7+
8+
jobs:
9+
update:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- name: Check out the repository
13+
uses: actions/checkout@v3
14+
15+
- name: Set up Python
16+
uses: iterative/py-template@main

.gitignore

+96-4
Original file line numberDiff line numberDiff line change
@@ -26,10 +26,85 @@ share/python-wheels/
2626
*.egg
2727
MANIFEST
2828

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+
2939
# 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/
3051
.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
3184

32-
# ENV
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
33108
.env
34109
.venv
35110
env/
@@ -38,9 +113,26 @@ ENV/
38113
env.bak/
39114
venv.bak/
40115

116+
# Spyder project settings
117+
.spyderproject
118+
.spyproject
119+
120+
# Rope project settings
121+
.ropeproject
122+
123+
# mkdocs documentation
124+
/site
125+
41126
# mypy
42127
.mypy_cache/
128+
.dmypy.json
129+
dmypy.json
130+
131+
# Pyre type checker
132+
.pyre/
133+
134+
# pytype static type analyzer
135+
.pytype/
43136

44-
# Editor
45-
.vscode/
46-
.idea/
137+
# Cython debug symbols
138+
cython_debug/

0 commit comments

Comments
 (0)