Skip to content

Commit

Permalink
feat: Initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
trallnag committed Jul 12, 2022
0 parents commit e71dd0d
Show file tree
Hide file tree
Showing 10 changed files with 1,140 additions and 0 deletions.
33 changes: 33 additions & 0 deletions .github/workflows/primary.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# yaml-language-server: $schema=https://json.schemastore.org/github-workflow.json

name: primary

on:
workflow_dispatch:
push:
branches: [trunk]

jobs:
primary:
runs-on: ubuntu-latest
steps:
- uses: google-github-actions/release-please-action@v3
with:
release-type: python
package-name: testbench_release_please_python
version-path: testbench_release_please_python/__init__.py
bump-minor-pre-major: true
changelog-types: |
[
{ "type": "feat", "section": "Features", "hidden": false },
{ "type": "fix", "section": "Bug Fixes", "hidden": false },
{ "type": "revert", "section": "Reverts", "hidden": false },
{ "type": "perf", "section": "Performance", "hidden": false },
{ "type": "refactor", "section": "Refactor", "hidden": false },
{ "type": "test", "section": "Tests", "hidden": false },
{ "type": "docs", "section": "Docs", "hidden": false },
{ "type": "build", "section": "Build", "hidden": false },
{ "type": "ci", "section": "CI/CD", "hidden": false },
{ "type": "style", "section": "Styles", "hidden": false },
{ "type": "chore", "section": "Chores", "hidden": true }
]
174 changes: 174 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,174 @@
# ------------------------------------------------------------------------------
# Project specific part of '.gitignore'.


tmp/


# ------------------------------------------------------------------------------
# Generic part of '.gitignore' based on: <https://github.com/github/gitignore>.


# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
*$py.class

# C extensions
*.so

# Distribution / packaging
.Python
build/
develop-eggs/
dist/
downloads/
eggs/
.eggs/
lib/
lib64/
parts/
sdist/
var/
wheels/
share/python-wheels/
*.egg-info/
.installed.cfg
*.egg
MANIFEST

# PyInstaller
# Usually these files are written by a python script from a template
# before PyInstaller builds the exe, so as to inject date/other infos into it.
*.manifest
*.spec

# Installer logs
pip-log.txt
pip-delete-this-directory.txt

# Unit test / coverage reports
htmlcov/
.tox/
.nox/
.coverage
.coverage.*
.cache
nosetests.xml
coverage.xml
*.cover
*.py,cover
.hypothesis/
.pytest_cache/
cover/

# Translations
*.mo
*.pot

# Django stuff:
*.log
local_settings.py
db.sqlite3
db.sqlite3-journal

# Flask stuff:
instance/
.webassets-cache

# Scrapy stuff:
.scrapy

# Sphinx documentation
docs/_build/

# PyBuilder
.pybuilder/
target/

# Jupyter Notebook
.ipynb_checkpoints

# IPython
profile_default/
ipython_config.py

# pyenv
# For a library or package, you might want to ignore these files since the code is
# intended to run in multiple environments; otherwise, check them in:
# .python-version

# pipenv
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
# However, in case of collaboration, if having platform-specific dependencies or dependencies
# having no cross-platform support, pipenv may install dependencies that don't work, or not
# install all needed dependencies.
#Pipfile.lock

# poetry
# Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control.
# This is especially recommended for binary packages to ensure reproducibility, and is more
# commonly ignored for libraries.
# https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control
#poetry.lock

# pdm
# Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.
#pdm.lock
# pdm stores project-wide configurations in .pdm.toml, but it is recommended to not include it
# in version control.
# https://pdm.fming.dev/#use-with-ide
.pdm.toml

# PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm
__pypackages__/

# Celery stuff
celerybeat-schedule
celerybeat.pid

# SageMath parsed files
*.sage.py

# Environments
.env
.venv
env/
venv/
ENV/
env.bak/
venv.bak/

# Spyder project settings
.spyderproject
.spyproject

# Rope project settings
.ropeproject

# mkdocs documentation
/site

# mypy
.mypy_cache/
.dmypy.json
dmypy.json

# Pyre type checker
.pyre/

# pytype static type analyzer
.pytype/

# Cython debug symbols
cython_debug/

# PyCharm
# JetBrains specific template is maintained in a separate JetBrains.gitignore that can
# be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
# and can be added to the global gitignore or merged into this file. For a more nuclear
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
#.idea/


# ------------------------------------------------------------------------------
83 changes: 83 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
repos:

# ----------------------------------------------------------------------------
# Remote

- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.3.0
hooks:
- id: check-ast
- id: check-executables-have-shebangs
- id: check-merge-conflict
- id: end-of-file-fixer
- id: fix-byte-order-marker
- id: trailing-whitespace

- repo: https://github.com/alessandrojcm/commitlint-pre-commit-hook
rev: v8.0.0
hooks:
- id: commitlint
stages: [commit-msg]
additional_dependencies: ["@commitlint/config-conventional"]

- repo: https://github.com/DavidAnson/markdownlint-cli2
rev: v0.4.0
hooks:
- id: markdownlint-cli2

- repo: https://github.com/frnmst/md-toc
rev: "8.1.4"
hooks:
- id: md-toc
args: [-p, -s, "1", github]

- repo: https://github.com/pre-commit/mirrors-prettier
rev: v2.7.1
hooks:
- id: prettier
args: [--prose-wrap, always]
types_or: [markdown]

# ----------------------------------------------------------------------------
# Local

- repo: local
hooks:
- id: black
name: black
language: system
entry: poetry run black
require_serial: true
types: [python]

- id: isort
name: isort
language: system
entry: poetry run isort
require_serial: true
types: [python]

- id: flake8
name: flake8
language: system
entry: poetry run flake8 --config .flake8 --statistics
require_serial: false
types: [python]

- id: mypy
name: mypy
language: system
entry: >-
poetry run dmypy run
--timeout 3600
-- testbench_release_please_python
require_serial: false
pass_filenames: false
types: [python]

# ----------------------------------------------------------------------------

exclude: |
(?x)(
^CHANGELOG.md$
)
15 changes: 15 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
ISC License

Copyright (c) 2022 Tim Schwenke <tim.schwenke@trallnag.com>

Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted, provided that the above
copyright notice and this permission notice appear in all copies.

THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
PERFORMANCE OF THIS SOFTWARE.
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# Testbench for Release Please with Python

- <https://github.com/googleapis/release-please>
- <https://github.com/google-github-actions/release-please-action>
13 changes: 13 additions & 0 deletions commitlint.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
"use strict"

module.exports = {
extends: ["@commitlint/config-conventional"],

rules: {
"subject-case": [
2,
"always",
["sentence-case", "start-case", "pascal-case", "upper-case"],
],
},
}
Loading

0 comments on commit e71dd0d

Please sign in to comment.