Skip to content

Commit

Permalink
Merge pull request #686 from Hopiu/master
Browse files Browse the repository at this point in the history
Updated testing instructions in contribution and installation guides
  • Loading branch information
last-partizan committed Jun 3, 2023
2 parents 5297e15 + a3e3c51 commit 4d577a5
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 26 deletions.
3 changes: 0 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,3 @@ publish: clean

clean:
rm -rf dist

test:
poetry run python ./runtests.py
24 changes: 15 additions & 9 deletions docs/modeltranslation/contribute.rst
Original file line number Diff line number Diff line change
Expand Up @@ -56,12 +56,17 @@ Python 3 is supported since 0.7 release. Although 0.6 release supported Django 1
Unittests
*********

Modeltranslation has a comprehensive test suite. A test runner is provided which
allows to run the tests outside of a Django project:
To test Modeltranslation, you can use the comprehensive test suite that comes
with the package. First, make sure you have installed the project's requirements
using Poetry. Once the requirements are installed,
you can run the tests using pytest. This will run all of the tests in the test
suite and report any failures or errors.

.. code-block:: console
$ python runtests.py
$ pip install poetry
$ poetry install
$ poetry run pytest
Non trivial changes and new features should always be accompanied by a unittest.
Pull requests which add unittests for uncovered code or rare edge cases are also
Expand All @@ -71,10 +76,11 @@ appreciated.
Continuous Integration
**********************

The project uses `Travis CI`_ for continuous integration tests. Hooks provided
by Github are active, so that each push and pull request is automatically run
against our `Travis CI config`_, checking code against different databases,
Python and Django versions. This includes automatic tracking of test coverage
The project uses `Github Actions`_ for continuous integration tests. Hooks
provided by Github are active, so that each push and pull request is
automatically run against our `Github Actions Workflows`_, checking code
against different databases, Python and Django versions.
This includes automatic tracking of test coverage
through `Coveralls`_.

.. image:: http://img.shields.io/coveralls/deschler/django-modeltranslation.png?style=flat
Expand Down Expand Up @@ -117,8 +123,8 @@ Please do not use the issue tracker for general questions, we run a dedicated
.. _pyflakes: https://pypi.python.org/pypi/pyflakes
.. _flake8: https://pypi.python.org/pypi/flake8
.. _Github: https://github.com/deschler/django-modeltranslation
.. _Travis CI: https://travis-ci.org/deschler/django-modeltranslation
.. _Travis CI config: https://github.com/deschler/django-modeltranslation/blob/master/.travis.yml
.. _Github Actions: https://travis-ci.org/deschler/django-modeltranslation
.. _Github Actions Workflows: https://github.com/deschler/django-modeltranslation/blob/master/.github/workflows
.. _Coveralls: https://coveralls.io/r/deschler/django-modeltranslation
.. _reStructuredText: http://docutils.sourceforge.net/rst.html
.. _Sphinx: http://sphinx-doc.org/
Expand Down
25 changes: 12 additions & 13 deletions docs/modeltranslation/installation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -8,21 +8,23 @@ Requirements

Which Modeltranslation version is required for given Django-Python combination to work?

======= ==== ==== ==== ==== ==== ==== ==== ==== ====
======= ==== ==== ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
Python Django
------- --------------------------------------- ----
version 1.8 1.9 1.10 1.11 2.0 2.1 2.2 3.0 3.2
======= ==== ==== ==== ==== ==== ==== ==== ==== ====
------- -----------------------------------------------------------
version 1.8 1.9 1.10 1.11 2.0 2.1 2.2 3.0 3.2 4.0 4.1 4.2
======= ==== ==== ==== ==== ==== ==== ==== ==== ==== ==== ==== ====
2.7 |9| |11| |12| |13|
3.2 |9|
3.3 |9|
3.4 |9| |11| |12| |13| |13|
3.5 |9| |11| |12| |13| |13| |13|
3.6 |13| |13| |13| |15| |15| |17|
3.7 |13| |13| |15| |15| |17|
3.8 |13| |13| |15| |15| |17|
3.9 |13| |13| |15| |15| |17|
======= ==== ==== ==== ==== ==== ==== ==== ==== ====
3.6 |13| |13| |13| |15| |15| |17| |17| |17| |18|
3.7 |13| |13| |15| |15| |17| |17| |17| |18|
3.8 |13| |13| |15| |15| |17| |17| |17| |18|
3.9 |13| |13| |15| |15| |17| |17| |17| |18|
3.10 |13| |13| |15| |15| |17| |17| |17| |18|
3.11 |13| |13| |15| |15| |17| |17| |17| |18|
======= ==== ==== ==== ==== ==== ==== ==== ==== ==== ==== ==== ====

(``-X`` denotes "up to version X", whereas ``X+`` means "from version X upwards")

Expand All @@ -32,6 +34,7 @@ version 1.8 1.9 1.10 1.11 2.0 2.1 2.2 3.0 3.2
.. |13| replace:: 0.13+
.. |15| replace:: 0.15+
.. |17| replace:: 0.17+
.. |18| replace:: 0.18+

Using Pip
---------
Expand Down Expand Up @@ -78,10 +81,6 @@ in detail in the following sections:
.. note:: This only applies if the models registered in ``translation.py`` haven't been
synced to the database before. If they have, please read :ref:`db-fields`.

.. note:: If you are using Django 1.7 and its internal migration system, run
``python manage.py makemigrations``, followed by
``python manage.py migrate`` instead. See :ref:`migrations` for details.


Configuration
=============
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "django-modeltranslation"
version = "0.16.1"
version = "0.18.10"
description = "Translates Django models using a registration approach."
authors = ["Peter Eschler <peschler@gmail.com>"]
maintainers = ["Serhii Tereshchenko <serg.partizan@gmail.com>"]
Expand Down

0 comments on commit 4d577a5

Please sign in to comment.