From efe3aaccd4ba6d7bd3430628b064a81d3cb62837 Mon Sep 17 00:00:00 2001 From: val Date: Wed, 14 Sep 2022 16:33:41 +0000 Subject: [PATCH] Initialize boilerplate (#1) Co-authored-by: Val Lorentz Reviewed-on: https://git.tf/opdb/opdb/pulls/1 --- .woodpecker.yml | 28 ++++++++++++++++++++++++++++ Makefile | 18 ++++++++++++++++++ opdb/__init__.py | 0 opdb/foo_test.py | 2 ++ pyproject.toml | 14 ++++++++++++++ 5 files changed, 62 insertions(+) create mode 100644 .woodpecker.yml create mode 100644 Makefile create mode 100644 opdb/__init__.py create mode 100644 opdb/foo_test.py create mode 100644 pyproject.toml diff --git a/.woodpecker.yml b/.woodpecker.yml new file mode 100644 index 0000000..6c3c2f0 --- /dev/null +++ b/.woodpecker.yml @@ -0,0 +1,28 @@ +pipeline: + flake8: + group: lint + image: python:${PYTHON_VERSION} + commands: + - pip3 install flake8 + - make flake8 + mypy: + group: lint + image: python:${PYTHON_VERSION} + commands: + - pip3 install mypy + - make mypy + black: + group: lint + image: pyfound/black:22.8.0 + commands: + - black --check opdb/ + test: + image: python:${PYTHON_VERSION} + commands: + - pip3 install . pytest + - make pytest + +matrix: + PYTHON_VERSION: + - 3.7 + - 3.10 diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..abaaf8c --- /dev/null +++ b/Makefile @@ -0,0 +1,18 @@ +black-check: + black --check opdb/ + +black: + black opdb/ + +flake8: + flake8 opdb/ + +mypy: + mypy opdb + +pytest: + pytest + +test: black flake8 mypy pytest + +.PHONY: black black-check flake8 mypy pytest test diff --git a/opdb/__init__.py b/opdb/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/opdb/foo_test.py b/opdb/foo_test.py new file mode 100644 index 0000000..8f2d73c --- /dev/null +++ b/opdb/foo_test.py @@ -0,0 +1,2 @@ +def test_foo(): + pass diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 0000000..169f4dc --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,14 @@ +[build-system] +requires = ["setuptools"] +build-backend = "setuptools.build_meta" + +[project] +name = "opdb" +version = "0.0.1" +dependencies = [ + "requests", + "luigi", +] + +[tool.pytest.ini_options] +python_files = "*_test.py"