From e4580227638cf3b045a75b25be568d8e1abe601e Mon Sep 17 00:00:00 2001 From: Sebastiano Barezzi Date: Mon, 6 Jun 2022 15:54:25 +0200 Subject: [PATCH] module_template: Initial commit Change-Id: Ie637178246b67904551fda94163a7f25afdb781b --- .github/dependabot.yml | 11 +++ .gitignore | 155 ++++++++++++++++++++++++++++++++++++ README.md | 29 +++++++ module_template/__init__.py | 13 +++ module_template/__main__.py | 10 +++ module_template/main.py | 8 ++ poetry.lock | 8 ++ pyproject.toml | 17 ++++ 8 files changed, 251 insertions(+) create mode 100644 .github/dependabot.yml create mode 100644 .gitignore create mode 100644 README.md create mode 100644 module_template/__init__.py create mode 100644 module_template/__main__.py create mode 100644 module_template/main.py create mode 100644 poetry.lock create mode 100644 pyproject.toml diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 0000000..cf7a39f --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,11 @@ +# To get started with Dependabot version updates, you'll need to specify which +# package ecosystems to update and where the package manifests are located. +# Please see the documentation for all configuration options: +# https://help.github.com/github/administering-a-repository/configuration-options-for-dependency-updates + +version: 2 +updates: + - package-ecosystem: "pip" # See documentation for possible values + directory: "/" # Location of package manifests + schedule: + interval: "daily" diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..e8c884e --- /dev/null +++ b/.gitignore @@ -0,0 +1,155 @@ +# 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 + +# 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/ + +# pytype static type analyzer +.pytype/ + +# Cython debug symbols +cython_debug/ + +# PyCharm +# JetBrains specific template is maintainted 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/ + +# Visual Studio Code +.vscode/ diff --git a/README.md b/README.md new file mode 100644 index 0000000..e84230b --- /dev/null +++ b/README.md @@ -0,0 +1,29 @@ +# module_template + +[![PyPi version](https://img.shields.io/pypi/v/module_template)](https://pypi.org/project/module_template/) + +Python module template + +Requires Python 3.8 or greater + +## Installation + +```sh +pip3 install module_template +``` + +## Instructions + +```sh +python3 -m module_template +``` + +## License + +``` +# +# Copyright (C) 2022 Sebastiano Barezzi +# +# SPDX-License-Identifier: LGPL-3.0-or-later +# +``` diff --git a/module_template/__init__.py b/module_template/__init__.py new file mode 100644 index 0000000..2ef27ba --- /dev/null +++ b/module_template/__init__.py @@ -0,0 +1,13 @@ +# +# Copyright (C) 2022 Sebastiano Barezzi +# +# SPDX-License-Identifier: LGPL-3.0-or-later +# +"""Module template.""" + +from pathlib import Path + +__version__ = "1.0.0" + +module_path = Path(__file__).parent +current_path = Path.cwd() diff --git a/module_template/__main__.py b/module_template/__main__.py new file mode 100644 index 0000000..ceb0aa9 --- /dev/null +++ b/module_template/__main__.py @@ -0,0 +1,10 @@ +# +# Copyright (C) 2022 Sebastiano Barezzi +# +# SPDX-License-Identifier: LGPL-3.0-or-later +# + +from module_template.main import main + +if __name__ == "__main__": + main() diff --git a/module_template/main.py b/module_template/main.py new file mode 100644 index 0000000..e61ebfc --- /dev/null +++ b/module_template/main.py @@ -0,0 +1,8 @@ +# +# Copyright (C) 2022 Sebastiano Barezzi +# +# SPDX-License-Identifier: LGPL-3.0-or-later +# + +def main(): + pass diff --git a/poetry.lock b/poetry.lock new file mode 100644 index 0000000..f41588b --- /dev/null +++ b/poetry.lock @@ -0,0 +1,8 @@ +package = [] + +[metadata] +lock-version = "1.1" +python-versions = "^3.8" +content-hash = "fafb334cb038533f851c23d0b63254223abf72ce4f02987e7064b0c95566699a" + +[metadata.files] diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 0000000..489b805 --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,17 @@ +[tool.poetry] +name = "module_template" +version = "1.0.0" +description = "Python module template" +authors = ["Sebastiano Barezzi "] +license = "LGPL-3.0-or-later" +readme = "README.md" +repository = "https://github.com/sebaubuntu-python/module_template" + +[tool.poetry.dependencies] +python = "^3.8" + +[tool.poetry.dev-dependencies] + +[build-system] +requires = ["poetry-core>=1.0.0"] +build-backend = "poetry.core.masonry.api"