From 103cebc6cde390d2c936803f83d3aca15e25193e Mon Sep 17 00:00:00 2001 From: Dane Hillard Date: Sun, 28 Jul 2019 23:01:39 -0400 Subject: [PATCH] Move implementation to src/ directory Also move linting under tox's purview --- .travis.yml | 5 +---- setup.cfg | 15 ++++++++++++--- {webmention => src/webmention}/__init__.py | 0 {webmention => src/webmention}/admin.py | 0 {webmention => src/webmention}/checks.py | 0 {webmention => src/webmention}/middleware.py | 0 .../webmention}/migrations/0001_initial.py | 0 .../webmention}/migrations/__init__.py | 0 {webmention => src/webmention}/models.py | 0 {webmention => src/webmention}/resolution.py | 0 {webmention => src/webmention}/urls.py | 0 {webmention => src/webmention}/views.py | 0 12 files changed, 13 insertions(+), 7 deletions(-) rename {webmention => src/webmention}/__init__.py (100%) rename {webmention => src/webmention}/admin.py (100%) rename {webmention => src/webmention}/checks.py (100%) rename {webmention => src/webmention}/middleware.py (100%) rename {webmention => src/webmention}/migrations/0001_initial.py (100%) rename {webmention => src/webmention}/migrations/__init__.py (100%) rename {webmention => src/webmention}/models.py (100%) rename {webmention => src/webmention}/resolution.py (100%) rename {webmention => src/webmention}/urls.py (100%) rename {webmention => src/webmention}/views.py (100%) 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