Skip to content
This repository has been archived by the owner on Apr 4, 2023. It is now read-only.

Commit

Permalink
Separate notice_comment dependencies, add to tests.
Browse files Browse the repository at this point in the history
This will significantly reduce the number of transitive dependencies needed by
ATF, FEC, etc.
  • Loading branch information
cmc333333 committed Jul 18, 2017
1 parent 43783d1 commit 531d3e9
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 10 deletions.
1 change: 1 addition & 0 deletions regulations/settings/dev.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
CACHES['api_cache']['TIMEOUT'] = 5 # roughly per request

ROOT_URLCONF = 'regulations.test_urls'
INSTALLED_APPS = INSTALLED_APPS + ('notice_comment',)

try:
from local_settings import *
Expand Down
6 changes: 3 additions & 3 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,16 @@
packages=find_packages(),
include_package_data=True,
install_requires=[
'boto3',
'cached-property',
'celery',
'django>=1.8,<1.12',
'enum34',
'futures',
'requests',
'six',
'requests-toolbelt',
],
extras_require={
'notice_comment': ['boto3', 'celery', 'requests-toolbelt'],
},
classifiers=[
'License :: Public Domain',
'License :: CC0 1.0 Universal (CC0 1.0) Public Domain Dedication'
Expand Down
16 changes: 9 additions & 7 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ deps =
pytest~=3.0
pytest_cov~=2.4
pytest_django~=3.1
extras = notice_comment

commands = pytest --cov

Expand All @@ -24,15 +25,16 @@ deps =
bandit==1.4.0
flake8==2.5.4
commands =
flake8 fr_notices regulations
bandit -r --ini tox.ini fr_notices regulations manage.py setup.py
flake8 fr_notices notice_comment regulations
bandit -r --ini tox.ini fr_notices notice_comment regulations manage.py setup.py

[testenv:docs]
deps = sphinx
commands =
# Tox won't do wildcard expansion, so run in a shell
sh -c "rm -f docs/regulations*.rst docs/fr_notices*.rst"
sh -c "rm -f docs/regulations*.rst docs/fr_notices*.rst docs/notice_comment*.rst"
sphinx-apidoc -F -o docs fr_notices
sphinx-apidoc -F -o docs notice_comment
sphinx-apidoc -F -o docs regulations
sphinx-build -b dirhtml -d docs/_build/doctrees/ docs/ docs/_build/dirhtml/
whitelist_externals = sh
Expand All @@ -55,19 +57,19 @@ passenv =
commands = py.test regulations/uitests -s

[bandit]
exclude = fr_notices/tests,regulations/tests,regulations/uitests
exclude = fr_notices/tests,notice_comment/tests,regulations/tests,regulations/uitests

[coverage:run]
source = regulations,fr_notices
omit = regulations/uitests/*,regulations/tests/*,fr_notices/tests/*
source = regulations,fr_notices,notice_comment
omit = regulations/uitests/*,regulations/tests/*,fr_notices/tests/*,notice_comment/tests/*

[flake8]
exclude = regulations/settings/*.py

[isort]

[pytest]
testpaths = regulations/tests fr_notices/tests
testpaths = regulations/tests fr_notices/tests notice_comment/tests
python_files = tests_*.py *_test.py *_tests.py
DJANGO_SETTINGS_MODULE = regulations.settings.dev

Expand Down

0 comments on commit 531d3e9

Please sign in to comment.