commit df927977bae3f0aa8cbbd872350e2574faaa552a Author: Luke Tainton Date: Fri Jul 21 19:24:30 2023 +0100 Initial commit diff --git a/.coveragerc b/.coveragerc new file mode 100644 index 0000000..fa2ee67 --- /dev/null +++ b/.coveragerc @@ -0,0 +1,3 @@ +[coverage:run] +relative_files = True +branch = True \ No newline at end of file diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..bfea3be --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,18 @@ +name: CI +on: + push: + branches: [ main ] + pull_request: + types: [opened, synchronize, reopened] + paths-ignore: + - 'README.md' + - 'LICENSE.md' + - '.gitignore' + - 'CODEOWNERS' + - 'renovate.json' + +jobs: + ci: + uses: luketainton/gha-workflows/.github/workflows/ci-python.yml@main + secrets: + SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..7f4045e --- /dev/null +++ b/.gitignore @@ -0,0 +1,135 @@ +# 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/ +pip-wheel-metadata/ +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 +lintreport.txt +testresults.xml +htmlcov/ +.tox/ +.nox/ +.coverage +.coverage.* +.cache +nosetests.xml +coverage.xml +*.cover +*.py,cover +.hypothesis/ +.pytest_cache/ + +# 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 +target/ + +# Jupyter Notebook +.ipynb_checkpoints + +# IPython +profile_default/ +ipython_config.py + +# pyenv +.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 + +# PEP 582; used by e.g. github.com/David-OConnor/pyflow +__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/ + +# IDE +.vscode +.idea diff --git a/CODEOWNERS b/CODEOWNERS new file mode 100644 index 0000000..0d35f6e --- /dev/null +++ b/CODEOWNERS @@ -0,0 +1 @@ +* @luketainton \ No newline at end of file diff --git a/README.md b/README.md new file mode 100644 index 0000000..86b71e3 --- /dev/null +++ b/README.md @@ -0,0 +1,7 @@ +# template + +## Description + +## How to install + +## How to use diff --git a/app/main.py b/app/main.py new file mode 100644 index 0000000..a6053f8 --- /dev/null +++ b/app/main.py @@ -0,0 +1,8 @@ +#!/usr/local/bin/python3 + +def main(): + # Commands here + + +if __name__ == "__main__": + main() diff --git a/renovate.json b/renovate.json new file mode 100644 index 0000000..e2cb0cc --- /dev/null +++ b/renovate.json @@ -0,0 +1,26 @@ +{ + "extends": ["config:base"], + "platformCommit": true, + "dependencyDashboardAutoclose": true, + "assignAutomerge": true, + "assigneesFromCodeOwners": true, + "rebaseWhen": "behind-base-branch", + "rollbackPrs": true, + "labels": ["dependencies"], + "packageRules": [ + { + "matchPackagePatterns": ["black", "pylint"], + "labels": ["linting"] + }, + { + "matchPackagePatterns": ["coverage", "pytest"], + "labels": ["unit-tests"] + } + ], + "vulnerabilityAlerts": { + "enabled": true, + "labels": ["security"], + "commitMessagePrefix": "[SECURITY] ", + "prCreation": "immediate" + } +} diff --git a/requirements-dev.txt b/requirements-dev.txt new file mode 100644 index 0000000..5783865 --- /dev/null +++ b/requirements-dev.txt @@ -0,0 +1,5 @@ +black +coverage +pylint +pylint-exit +pytest diff --git a/requirements.txt b/requirements.txt new file mode 100644 index 0000000..e69de29 diff --git a/sonar-project.properties b/sonar-project.properties new file mode 100644 index 0000000..c2c2f6d --- /dev/null +++ b/sonar-project.properties @@ -0,0 +1,11 @@ +sonar.organization=luketainton +sonar.projectKey=luketainton_ +sonar.projectName= +sonar.projectVersion=1.0 +sonar.python.version=3.10 +sonar.python.coverage.reportPaths=coverage.xml +sonar.python.pylint.reportPaths=lintreport.txt +sonar.python.xunit.reportPath=testresults.xml +sonar.sources=app +sonar.tests=tests +sonar.exclusions=,.github/**,.gitignore,CODEOWNERS,CHANGELOG.md,LICENSE.md,README.md,renovate.json,requirements-dev.txt,requirements.txt \ No newline at end of file diff --git a/tests/test_main.py b/tests/test_main.py new file mode 100644 index 0000000..e69de29