diff --git a/.woodpecker.yml b/.woodpecker.yml new file mode 100644 index 0000000..8a72835 --- /dev/null +++ b/.woodpecker.yml @@ -0,0 +1,35 @@ +pipeline: + flake8: + group: lint + image: python:3.9 + commands: + - pip3 install flake8 + - flake8 glowtables/ + pylint: + group: lint + image: cytopia/pylint + commands: + - pylint glowtables/ + + black: + group: lint + image: pyfound/black:22.8.0 + commands: + - black --check glowtables/ + + test-py3.9: + group: test + image: python:3.9 + commands: &test_commands + - apt-get update + - pip3 install mypy .[testing] + - make mypy + - make pytest + test-py3.10: + group: test + image: python:3.10 + commands: *test_commands + test-py3.11: + group: test + image: python:3.11 + commands: *test_commands diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..19174e0 --- /dev/null +++ b/Makefile @@ -0,0 +1,31 @@ +all: test + +test: lint pytest + +lint: black flake8 pylint isort mypy + +black-check: + black --check glowtables/ + +black: + black glowtables/ + +flake8: black + flake8 glowtables/ + +pylint: + pylint glowtables/ + +isort-check: + isort --check-only glowtables/ + +isort: + isort glowtables/ + +mypy: + mypy --show-error-codes glowtables + +pytest: + pytest --doctest-modules + +.PHONY: black black-check isort isort-check mypy pytest test diff --git a/glowtables/__init__.py b/glowtables/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 0000000..f00d917 --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,57 @@ +[build-system] +requires = ["setuptools"] +build-backend = "setuptools.build_meta" + +[project] +name = "globtables" +version = "0.0.1" +requires-python = ">=3.9" +dependencies = [ + "flask == 2.*", +] + +[project.optional-dependencies] +testing = [ + "pytest", + "pytest-mock", + "requests-mock", + "types-requests", + "types-setuptools", +] + +[tool.isort] +profile = "black" + +[tool.mypy] +python_version = "3.9" + +[[tool.mypy.overrides]] +module = [ + "requests_mock", +] +ignore_missing_imports = true + +[tool.pylint.format] +max-line-length = "88" +py-version = "3.9" +disable = [ + # too annoying: + "fixme", + "invalid-name", + "no-else-return", + "no-else-continue", + "too-few-public-methods", + "too-many-instance-attributes", + # false positives: + "unreachable", + "assignment-from-no-return", + # mypy does it better: + "no-member", + "unsupported-membership-test", + "import-error", + # flake8 does it already: + "line-too-long", +] + +[tool.pytest.ini_options] +python_files = "*_test.py" diff --git a/setup.cfg b/setup.cfg new file mode 100644 index 0000000..8dd399a --- /dev/null +++ b/setup.cfg @@ -0,0 +1,3 @@ +[flake8] +max-line-length = 88 +extend-ignore = E203 diff --git a/tests/placeholder_test.py b/tests/placeholder_test.py new file mode 100644 index 0000000..a3e981b --- /dev/null +++ b/tests/placeholder_test.py @@ -0,0 +1,2 @@ +def test_nothing(): + pass