Skip to content

Commit d1e5851

Browse files
committed
Change make docs and make format to use tox so they succeed.
1 parent be7b8b6 commit d1e5851

File tree

7 files changed

+17
-11
lines changed

7 files changed

+17
-11
lines changed

AUTHORS.rst

+1
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@ Authors
5656
- Jesse Shapiro
5757
- Jihoon Baek (`jihoon796 <https://github.com/jihoon796>`_)
5858
- Jim Gomez
59+
- Jim King (`jeking3 <https://github.com/jeking3>`_)
5960
- Joao Junior (`joaojunior <https://github.com/joaojunior>`_)
6061
- Joao Pedro Francese
6162
- `jofusa <https://github.com/jofusa>`_

CHANGES.rst

+2-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@ Changes
44
Unreleased
55
----------
66

7-
- Fixed bug where serializer of djangorestframework crashed if used with ``OrderingFilter`` (gh-821)
7+
- Fixed bug where serializer of djangorestframework crashed if used with ``OrderingFilter`` (gh-821)
8+
- Fixed `make format` so it works by using tox (gh-859)
89

910
3.0.0 (2021-04-16)
1011
------------------

CONTRIBUTING.rst

+1-3
Original file line numberDiff line numberDiff line change
@@ -38,15 +38,13 @@ running tests::
3838
This will install:
3939

4040
- `tox`_: used for running the tests against all supported versions of Django
41-
and Python
41+
and Python as well as running tasks like lint, format, docs
4242
- `coverage`_: used for analyzing test coverage for tests
43-
- `Sphinx`_: used for generating documentation
4443

4544
If not using a virtualenv, the command should be prepended with ``sudo``.
4645

4746
.. _tox: http://testrun.org/tox/latest//
4847
.. _coverage: http://nedbatchelder.com/code/coverage/
49-
.. _sphinx: http://sphinx-doc.org/
5048

5149
Documentation
5250
-------------

Makefile

+3-4
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ clean-pyc:
1414
find . -name '*~' -exec rm -f {} +
1515

1616
init:
17-
pip install "tox>=1.8" coverage Sphinx
17+
pip install "tox>=1.8" coverage
1818

1919
test:
2020
coverage erase
@@ -24,7 +24,7 @@ test:
2424
docs: documentation
2525

2626
documentation:
27-
sphinx-build -b html -d docs/_build/doctrees docs docs/_build/html
27+
tox -e docs
2828

2929
dist: clean
3030
pip install -U wheel
@@ -44,5 +44,4 @@ release: dist
4444
twine upload dist/*
4545

4646
format:
47-
isort docs simple_history runtests.py setup.py
48-
black docs simple_history runtests.py setup.py
47+
tox -e format

simple_history/registry_tests/tests.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -198,7 +198,7 @@ def test_registering_with_tracked_abstract_base(self):
198198

199199

200200
class TestCustomAttrForeignKey(TestCase):
201-
""" https://github.com/jazzband/django-simple-history/issues/431 """
201+
"""https://github.com/jazzband/django-simple-history/issues/431"""
202202

203203
def test_custom_attr(self):
204204
field = ModelWithCustomAttrForeignKey.history.model._meta.get_field("poll")
@@ -219,7 +219,7 @@ def test_migrate_command(self):
219219

220220

221221
class TestModelWithHistoryInDifferentApp(TestCase):
222-
""" https://github.com/jazzband/django-simple-history/issues/485 """
222+
"""https://github.com/jazzband/django-simple-history/issues/485"""
223223

224224
def test__different_app(self):
225225
appLabel = ModelWithHistoryInDifferentApp.history.model._meta.app_label

simple_history/tests/tests/test_models.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1189,7 +1189,7 @@ def test_migrations_include_order(self):
11891189

11901190

11911191
class TestLatest(TestCase):
1192-
""""Test behavior of `latest()` without any field parameters"""
1192+
"""Test behavior of `latest()` without any field parameters"""
11931193

11941194
def setUp(self):
11951195
poll = Poll.objects.create(question="Does `latest()` work?", pub_date=yesterday)

tox.ini

+7
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,13 @@ commands =
4343
mariadb: coverage run -a runtests.py --database=mariadb
4444
coverage report
4545

46+
[testenv:format]
47+
deps = -rrequirements/lint.txt
48+
commands =
49+
isort docs simple_history runtests.py setup.py
50+
black docs simple_history runtests.py setup.py
51+
flake8 simple_history
52+
4653
[testenv:lint]
4754
deps = -rrequirements/lint.txt
4855
commands =

0 commit comments

Comments
 (0)