Skip to content

Commit fc70df6

Browse files
committed
Initial bootstrap
0 parents  commit fc70df6

25 files changed

+1023
-0
lines changed

.flake8

Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
[flake8]
2+
3+
# Don't even try to analyze these:
4+
exclude =
5+
# No need to traverse egg files
6+
*.egg,
7+
# No need to traverse egg info dir
8+
*.egg-info,
9+
# No need to traverse eggs directory
10+
.eggs,
11+
# No need to traverse our git directory
12+
.git,
13+
# GitHub configs
14+
.github,
15+
# Cache files of MyPy
16+
.mypy_cache,
17+
# Cache files of pytest
18+
.pytest_cache,
19+
# Temp dir of pytest-testmon
20+
.tmontmp,
21+
# Countless third-party libs in venvs
22+
.tox,
23+
# Occasional virtualenv dir
24+
.venv
25+
# VS Code
26+
.vscode,
27+
# There's no value in checking cache directories
28+
__pycache__,
29+
# Temporary build dir
30+
build,
31+
# This contains sdists and wheels that we don't want to check
32+
dist,
33+
# Occasional virtualenv dir
34+
env,
35+
# Metadata of `pip wheel` cmd is autogenerated
36+
pip-wheel-metadata,
37+
38+
# Let's not overcomplicate the code:
39+
max-complexity = 10
40+
41+
# Accessibility/large fonts and PEP8 friendly:
42+
#max-line-length = 79
43+
# Accessibility/large fonts and PEP8 unfriendly:
44+
max-line-length = 100
45+
46+
# The only allowed ignores are related to black and isort
47+
# https://black.readthedocs.io/en/stable/the_black_code_style.html#line-length
48+
# "H" are generated by hacking plugin, which is not black compatible
49+
ignore = E203,E501,W503,H
50+
51+
# Allow certain violations in certain files:
52+
# per-file-ignores =
53+
54+
# flake8-pytest-style
55+
# PT001:
56+
pytest-fixture-no-parentheses = true
57+
# PT006:
58+
pytest-parametrize-names-type = tuple
59+
# PT007:
60+
pytest-parametrize-values-type = tuple
61+
pytest-parametrize-values-row-type = tuple
62+
63+
# flake8-rst-docstrings
64+
rst-roles =
65+
class,
66+
func,

.github/CODEOWNERS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
* @ssbarnea

.github/release-drafter.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
# see https://github.com/ansible-community/devtools
2+
_extends: ansible-community/devtools

.github/workflows/ack.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
# See https://github.com/ansible-community/devtools/blob/main/.github/workflows/ack.yml
2+
name: ack
3+
on:
4+
pull_request_target:
5+
types: [opened, labeled, unlabeled, synchronize]
6+
7+
jobs:
8+
ack:
9+
uses: ansible-community/devtools/.github/workflows/ack.yml@main

.github/workflows/push.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# See https://github.com/ansible-community/devtools/blob/main/.github/workflows/push.yml
2+
name: push
3+
on:
4+
push:
5+
branches:
6+
- main
7+
- 'releases/**'
8+
- 'stable/**'
9+
10+
jobs:
11+
ack:
12+
uses: ansible-community/devtools/.github/workflows/push.yml@main

.github/workflows/release.yml

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
name: release
2+
3+
on:
4+
release:
5+
types: [published]
6+
7+
jobs:
8+
before-release:
9+
uses: ansible-community/ansible-compat/.github/workflows/tox.yml@main
10+
11+
release:
12+
name: release ${{ github.event.ref }}
13+
needs: before-release
14+
# unable to use environment with uses/with, basically cannot reuse release pipelines
15+
environment: release
16+
runs-on: ubuntu-20.04
17+
18+
env:
19+
FORCE_COLOR: 1
20+
PY_COLORS: 1
21+
TOXENV: packaging
22+
TOX_PARALLEL_NO_SPINNER: 1
23+
24+
steps:
25+
- name: Switch to using Python 3.8 by default
26+
uses: actions/setup-python@v2
27+
with:
28+
python-version: 3.8
29+
- name: Install tox
30+
run: >-
31+
python3 -m
32+
pip install
33+
--user
34+
tox
35+
- name: Check out src from Git
36+
uses: actions/checkout@v2
37+
with:
38+
fetch-depth: 0 # needed by setuptools-scm
39+
- name: Build dists
40+
run: python -m tox
41+
- name: Publish to test.pypi.org
42+
uses: pypa/gh-action-pypi-publish@master
43+
with:
44+
password: ${{ secrets.testpypi_password }}
45+
repository_url: https://test.pypi.org/legacy/
46+
- name: Publish to pypi.org
47+
uses: pypa/gh-action-pypi-publish@master
48+
with:
49+
password: ${{ secrets.pypi_password }}

.github/workflows/tox.yml

Lines changed: 80 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,80 @@
1+
name: tox
2+
3+
on:
4+
create: # is used for publishing to PyPI and TestPyPI
5+
tags: # any tag regardless of its name, no branches
6+
- "**"
7+
push: # only publishes pushes to the main branch to TestPyPI
8+
branches: # any integration branch but not tag
9+
- "main"
10+
pull_request:
11+
release:
12+
types:
13+
- published # It seems that you can publish directly without creating
14+
schedule:
15+
- cron: 1 0 * * * # Run daily at 0:01 UTC
16+
# Run every Friday at 18:02 UTC
17+
# https://crontab.guru/#2_18_*_*_5
18+
# - cron: 2 18 * * 5
19+
workflow_call:
20+
21+
jobs:
22+
tox:
23+
name: >-
24+
${{ matrix.env.TOXENV }}
25+
runs-on: ${{ matrix.os }}
26+
strategy:
27+
fail-fast: false
28+
matrix:
29+
python-version:
30+
- 3.9
31+
os:
32+
- ubuntu-20.04
33+
env:
34+
- TOXENV: lint
35+
- TOXENV: packaging
36+
- TOXENV: py
37+
env:
38+
TOX_PARALLEL_NO_SPINNER: 1
39+
FORCE_COLOR: 1
40+
41+
steps:
42+
- name: Check out src from Git
43+
uses: actions/checkout@v2
44+
with:
45+
fetch-depth: 0 # needed by setuptools-scm
46+
- name: Set up Python ${{ matrix.python-version }}
47+
uses: actions/setup-python@v2
48+
with:
49+
python-version: ${{ matrix.python-version }}
50+
- name: Pre-commit cache
51+
uses: actions/cache@v2
52+
with:
53+
path: ~/.cache/pre-commit
54+
key: ${{ runner.os }}-${{ matrix.env.TOXENV }}-pre-commit-${{ hashFiles('setup.cfg', 'tox.ini', 'pyproject.toml', '.pre-commit-config.yaml') }}
55+
- name: Pip cache
56+
uses: actions/cache@v2
57+
with:
58+
path: ~/.cache/pip
59+
key: ${{ runner.os }}-${{ matrix.env.TOXENV }}-pip-${{ hashFiles('setup.cfg', 'tox.ini', 'pyproject.toml', '.pre-commit-config.yaml') }}
60+
- name: Install tox
61+
run: |
62+
python3 -m pip install --upgrade tox
63+
- name: Log installed dists
64+
run: >-
65+
python -m pip freeze --all
66+
- name: >-
67+
Initialize tox envs
68+
run: >-
69+
python -m
70+
tox
71+
--parallel auto
72+
--parallel-live
73+
--notest
74+
--skip-missing-interpreters false
75+
-vv
76+
env: ${{ matrix.env }}
77+
- name: Test with tox
78+
run: |
79+
python -m tox --parallel auto --parallel-live
80+
env: ${{ matrix.env }}

.gitignore

Lines changed: 130 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,130 @@
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+
README.html

.gitmodules

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
[submodule "vendor/schemastore"]
2+
path = vendor/schemastore
3+
url = https://github.com/SchemaStore/schemastore

0 commit comments

Comments
 (0)