Skip to content

Commit de84773

Browse files
committed
render: Extract from dvc
1 parent 8792b17 commit de84773

34 files changed

+1725
-693
lines changed

.cookiecutter.json

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
{
2+
"_template": "gh:iterative/py-template",
3+
"author": "Iterative",
4+
"copyright_year": "2022",
5+
"development_status": "Development Status :: 1 - Planning",
6+
"email": "[email protected]",
7+
"friendly_name": "DVC render",
8+
"github_user": "iterative",
9+
"license": "Apache-2.0",
10+
"package_name": "dvc_render",
11+
"project_name": "dvc-render",
12+
"short_description": "",
13+
"version": "0.0.0"
14+
}

.github/dependabot.yml

+16
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/release.yml

+32
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

+40
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+
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/[email protected]
38+
39+
- name: Build package
40+
run: nox -s build

.gitignore

+138
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

+45
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
default_language_version:
2+
python: python3
3+
repos:
4+
- repo: https://github.com/psf/black
5+
rev: 21.11b1
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

CODE_OF_CONDUCT.rst

+105
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,105 @@
1+
Contributor Covenant Code of Conduct
2+
====================================
3+
4+
Our Pledge
5+
----------
6+
7+
We as members, contributors, and leaders pledge to make participation in our community a harassment-free experience for everyone, regardless of age, body size, visible or invisible disability, ethnicity, sex characteristics, gender identity and expression, level of experience, education, socio-economic status, nationality, personal appearance, race, religion, or sexual identity and orientation.
8+
9+
We pledge to act and interact in ways that contribute to an open, welcoming, diverse, inclusive, and healthy community.
10+
11+
12+
Our Standards
13+
-------------
14+
15+
Examples of behavior that contributes to a positive environment for our community include:
16+
17+
- Demonstrating empathy and kindness toward other people
18+
- Being respectful of differing opinions, viewpoints, and experiences
19+
- Giving and gracefully accepting constructive feedback
20+
- Accepting responsibility and apologizing to those affected by our mistakes, and learning from the experience
21+
- Focusing on what is best not just for us as individuals, but for the overall community
22+
23+
Examples of unacceptable behavior include:
24+
25+
- The use of sexualized language or imagery, and sexual attention or
26+
advances of any kind
27+
- Trolling, insulting or derogatory comments, and personal or political attacks
28+
- Public or private harassment
29+
- Publishing others' private information, such as a physical or email
30+
address, without their explicit permission
31+
- Other conduct which could reasonably be considered inappropriate in a
32+
professional setting
33+
34+
Enforcement Responsibilities
35+
----------------------------
36+
37+
Community leaders are responsible for clarifying and enforcing our standards of acceptable behavior and will take appropriate and fair corrective action in response to any behavior that they deem inappropriate, threatening, offensive, or harmful.
38+
39+
Community leaders have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, and will communicate reasons for moderation decisions when appropriate.
40+
41+
42+
Scope
43+
-----
44+
45+
This Code of Conduct applies within all community spaces, and also applies when an individual is officially representing the community in public spaces. Examples of representing our community include using an official e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event.
46+
47+
48+
Enforcement
49+
-----------
50+
51+
Instances of abusive, harassing, or otherwise unacceptable behavior may be reported to the community leaders responsible for enforcement at [email protected]. All complaints will be reviewed and investigated promptly and fairly.
52+
53+
All community leaders are obligated to respect the privacy and security of the reporter of any incident.
54+
55+
56+
Enforcement Guidelines
57+
----------------------
58+
59+
Community leaders will follow these Community Impact Guidelines in determining the consequences for any action they deem in violation of this Code of Conduct:
60+
61+
62+
1. Correction
63+
~~~~~~~~~~~~~
64+
65+
**Community Impact**: Use of inappropriate language or other behavior deemed unprofessional or unwelcome in the community.
66+
67+
**Consequence**: A private, written warning from community leaders, providing clarity around the nature of the violation and an explanation of why the behavior was inappropriate. A public apology may be requested.
68+
69+
70+
2. Warning
71+
~~~~~~~~~~
72+
73+
**Community Impact**: A violation through a single incident or series of actions.
74+
75+
**Consequence**: A warning with consequences for continued behavior. No interaction with the people involved, including unsolicited interaction with those enforcing the Code of Conduct, for a specified period of time. This includes avoiding interactions in community spaces as well as external channels like social media. Violating these terms may lead to a temporary or permanent ban.
76+
77+
78+
3. Temporary Ban
79+
~~~~~~~~~~~~~~~~
80+
81+
**Community Impact**: A serious violation of community standards, including sustained inappropriate behavior.
82+
83+
**Consequence**: A temporary ban from any sort of interaction or public communication with the community for a specified period of time. No public or private interaction with the people involved, including unsolicited interaction with those enforcing the Code of Conduct, is allowed during this period. Violating these terms may lead to a permanent ban.
84+
85+
86+
4. Permanent Ban
87+
~~~~~~~~~~~~~~~~
88+
89+
**Community Impact**: Demonstrating a pattern of violation of community standards, including sustained inappropriate behavior, harassment of an individual, or aggression toward or disparagement of classes of individuals.
90+
91+
**Consequence**: A permanent ban from any sort of public interaction within the community.
92+
93+
94+
Attribution
95+
-----------
96+
97+
This Code of Conduct is adapted from the `Contributor Covenant <homepage_>`__, version 2.0,
98+
available at https://www.contributor-covenant.org/version/2/0/code_of_conduct/.
99+
100+
Community Impact Guidelines were inspired by `Mozilla’s code of conduct enforcement ladder <https://github.com/mozilla/inclusion>`__.
101+
102+
.. _homepage: https://www.contributor-covenant.org
103+
104+
For answers to common questions about this code of conduct, see the FAQ at
105+
https://www.contributor-covenant.org/faq. Translations are available at https://www.contributor-covenant.org/translations.

0 commit comments

Comments
 (0)