diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000000000000000000000000000000000000..5ceb3864c2911029f0a6010fadab352e4b8e2d07 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +venv diff --git a/{{cookiecutter.repo_name}}/.flake8 b/{{cookiecutter.repo_name}}/.flake8 new file mode 100644 index 0000000000000000000000000000000000000000..8dd399ab55bce8a4a1ddfd0c98170f771f6e5c35 --- /dev/null +++ b/{{cookiecutter.repo_name}}/.flake8 @@ -0,0 +1,3 @@ +[flake8] +max-line-length = 88 +extend-ignore = E203 diff --git a/{{cookiecutter.repo_name}}/.gitignore b/{{cookiecutter.repo_name}}/.gitignore index 5ceb3864c2911029f0a6010fadab352e4b8e2d07..3c55681cf7d20cdbdca04f90f1839de36804313f 100644 --- a/{{cookiecutter.repo_name}}/.gitignore +++ b/{{cookiecutter.repo_name}}/.gitignore @@ -1 +1,127 @@ -venv +# Data +*.zip +*.7z +*.csv +*.txt +*.svg +*.emf +*.png + +# Visual Studio Code +.vscode/* + +# 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 +.hypothesis/ +.pytest_cache/ + +# Translations +*.mo +*.pot + +# Django stuff: +*.log +local_settings.py +db.sqlite3 + +# 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 + +# celery beat schedule file +celerybeat-schedule + +# 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/ diff --git a/{{cookiecutter.repo_name}}/.pre-commit-config.yaml b/{{cookiecutter.repo_name}}/.pre-commit-config.yaml index d07833f8e16549b7f1287ee46a65782fcb6f4b8a..5875965fc71f294498d5b8c5f0c9e98e7d90fa0c 100644 --- a/{{cookiecutter.repo_name}}/.pre-commit-config.yaml +++ b/{{cookiecutter.repo_name}}/.pre-commit-config.yaml @@ -1,56 +1,20 @@ repos: - - repo: local +- repo: https://github.com/pre-commit/pre-commit-hooks + rev: v4.4.0 hooks: - - id: isort - name: isort - entry: pipenv run isort - language: system - types: [python] - - id: black - name: black - entry: black - language: system - types: [python] - require_serial: true - - id: check-added-large-files - name: Check for added large files - entry: check-added-large-files - language: system - - id: check-toml - name: Check Toml - entry: check-toml - language: system - types: [toml] - - id: check-yaml - name: Check Yaml - entry: check-yaml - language: system - types: [yaml] - - id: end-of-file-fixer - name: Fix End of Files - entry: end-of-file-fixer - language: system - types: [text] - stages: [commit, push, manual] - - id: flake8 - name: flake8 - entry: flake8 - language: system - types: [python] - require_serial: true - - id: reorder-python-imports - name: Reorder python imports - entry: reorder-python-imports - language: system - types: [python] - args: [--application-directories=src] - - id: trailing-whitespace - name: Trim Trailing Whitespace - entry: trailing-whitespace-fixer - language: system - types: [text] - stages: [commit, push, manual] - - repo: https://github.com/prettier/pre-commit - rev: v2.1.2 + - id: trailing-whitespace + - id: end-of-file-fixer + - id: check-docstring-first +- repo: https://github.com/pycqa/flake8 + rev: 6.0.0 hooks: - - id: prettier + - id: flake8 +- repo: https://github.com/pycqa/isort + rev: 5.10.1 + hooks: + - id: isort + name: isort (python) +- repo: https://github.com/ambv/black + rev: 22.10.0 + hooks: + - id: black diff --git a/{{cookiecutter.repo_name}}/pyproject.toml b/{{cookiecutter.repo_name}}/pyproject.toml index b74f8037b3800f86798bd319ce17be3f346a1926..75fd0ce10dd8c86cc4b1ae9bac229fc0c4e4ba0f 100644 --- a/{{cookiecutter.repo_name}}/pyproject.toml +++ b/{{cookiecutter.repo_name}}/pyproject.toml @@ -6,9 +6,9 @@ requires = [ build-backend = "setuptools.build_meta" [project] -name = "{{cookiecutter.project_name}}" +name = "project_name" authors = [ - {name = "{{cookiecutter.author_name}}"}, + {name = "Manu Musterperson"}, ] readme = "README.md" requires-python = ">=3.7" @@ -17,11 +17,7 @@ classifiers = [ "Programming Language :: Python :: 3", ] dependencies = [ - "flake8>=3.8.4", - "black>=20.8b1", "pre-commit>=2.8.2", - "pre-commit-hooks>=3.3.0", - "reorder-python-imports>=2.3.6", "plotly>=5.14.1", "opencv-python>=4.7.0.72", 'importlib-metadata; python_version<"3.8"',