diff --git a/.travis.yml b/.travis.yml index 45869fc..1c635c9 100644 --- a/.travis.yml +++ b/.travis.yml @@ -21,8 +21,5 @@ stages: jobs: include: - stage: lint - install: - - pip install black pyflakes script: - - pyflakes webmention tests - - black --check webmention tests + - tox -e lint diff --git a/setup.cfg b/setup.cfg index 66c88e5..480804a 100644 --- a/setup.cfg +++ b/setup.cfg @@ -29,14 +29,14 @@ classifiers = Programming Language :: Python :: 3.7 [options] +package_dir = =src packages = find: install_requires = Django>=1.8.2 requests>=2.7.0 [options.packages.find] -exclude = - tests* +where = src [options.extras_require] test = @@ -44,6 +44,9 @@ test = pytest pytest-cov pytest-django +lint = + pyflakes + black [coverage:run] branch = True @@ -75,8 +78,14 @@ envlist = {py35,py36,py37,py38}-django{1.11,2.1,2.2} [testenv] extras = test commands = - pytest + pytest {posargs} deps = django1.11: Django>=1.11,<2 django2.1: Django>=2.1,<2.2 django2.2: Django>=2.2,<2.3 + +[testenv:lint] +extras = lint +commands = + pyflakes src/webmention tests + black --check src/webmention tests diff --git a/webmention/__init__.py b/src/webmention/__init__.py similarity index 100% rename from webmention/__init__.py rename to src/webmention/__init__.py diff --git a/webmention/admin.py b/src/webmention/admin.py similarity index 100% rename from webmention/admin.py rename to src/webmention/admin.py diff --git a/webmention/checks.py b/src/webmention/checks.py similarity index 100% rename from webmention/checks.py rename to src/webmention/checks.py diff --git a/webmention/middleware.py b/src/webmention/middleware.py similarity index 100% rename from webmention/middleware.py rename to src/webmention/middleware.py diff --git a/webmention/migrations/0001_initial.py b/src/webmention/migrations/0001_initial.py similarity index 100% rename from webmention/migrations/0001_initial.py rename to src/webmention/migrations/0001_initial.py diff --git a/webmention/migrations/__init__.py b/src/webmention/migrations/__init__.py similarity index 100% rename from webmention/migrations/__init__.py rename to src/webmention/migrations/__init__.py diff --git a/webmention/models.py b/src/webmention/models.py similarity index 100% rename from webmention/models.py rename to src/webmention/models.py diff --git a/webmention/resolution.py b/src/webmention/resolution.py similarity index 100% rename from webmention/resolution.py rename to src/webmention/resolution.py diff --git a/webmention/urls.py b/src/webmention/urls.py similarity index 100% rename from webmention/urls.py rename to src/webmention/urls.py diff --git a/webmention/views.py b/src/webmention/views.py similarity index 100% rename from webmention/views.py rename to src/webmention/views.py