Merge remote-tracking branch 'origin/versions/micro' into merges/micro_to_minor

Signed-off-by: Roberto Rosario <roberto.rosario@mayan-edms.com>
This commit is contained in:
Roberto Rosario
2019-11-19 03:38:37 -04:00
10 changed files with 117 additions and 49 deletions

View File

@@ -171,7 +171,7 @@ test-mysql:
services:
- mysql:8.0.3
script:
- apt-get install -qq libmysqlclient-dev mysql-client
- apt-get install -qq libmysqlclient-dev libssl-dev mysql-client
- . venv/bin/activate
- set -a && . ./config.env && set +a
- pip install mysqlclient==$PYTHON_MYSQL_VERSION

View File

@@ -160,7 +160,7 @@
- Switch default installation to use two Redis
databases. One for the message broker, and the
other to store task results.
- Complete the prefixing of template tags with the
- Complete the prefixing of template tags with the
app name.
- Remove unused template tags.
- Add support for setting migrations.
@@ -170,9 +170,9 @@
- Change OCR API submit URL from documents/{pk}/submit
to documents/{pk}/ocr/submit.
3.2.10 (2019-XX-XX)
3.2.10 (2019-11-19)
===================
- Auto-import dependecies. No need to use:
- Auto-import dependencies. No need to use:
from .dependencies import * # NOQA
- Add makefile target to run all tests in debug mode.
This mode is more strict and sidesteps a Django bug that

View File

@@ -1,6 +1,5 @@
[![Donation](https://img.shields.io/badge/donation-PayPal-brightgreen)](https://paypal.me/MayanEDMS)
[![pypi][pypi]][pypi-url]
[![builds][builds]][builds-url]
![python][python]
![license][license]
[![Docker pulls](https://img.shields.io/docker/pulls/mayanedms/mayanedms.svg?maxAge=3600)](https://hub.docker.com/r/mayanedms/mayanedms/)

View File

@@ -1,4 +1,4 @@
|donation| |pypi| |builds| |coverage| |python| |license| |docker_pulls| |docker_stars| |docker_layers|
|donation| |pypi| |coverage| |python| |license| |docker_pulls| |docker_stars| |docker_layers|
.. image:: https://gitlab.com/mayan-edms/mayan-edms/raw/master/docs/_static/mayan_logo.png

View File

@@ -535,6 +535,13 @@ Release using GitLab CI
git push
#. Push the new tags:
::
git push --tags
#. Delete the corresponding ``releases/`` branch:
::
@@ -546,12 +553,6 @@ Release using GitLab CI
git push origin <local branch>:releases/<branch>
#. Push the new tags:
::
git push --tags
Manual release
--------------

View File

@@ -1,13 +1,79 @@
Version 3.2.10
==============
Released: November XX, 2019
Released: November 19, 2019
Changes
-------
Dependencies
^^^^^^^^^^^^
App dependencies are now automatically imported ensuring there are no missing
dependencies when installing or upgrading.
For developers this means that the line::
from .dependencies import * # NOQA
is no longer needed.
Documentation
^^^^^^^^^^^^^
Improvements in the settings chapter.
The file paths in the documentation are now inserted programmatically.
This ensures consistency and avoid human error when copying and pasting path
when writing documentation chapters.
Testing
^^^^^^^
New targets for the makefile to run all tests in debug mode. This mode is
more strict and sidesteps a Django bug that causes errors in the template
code that to be silent during tests.
Renamed the ``expected_content_type`` to ``expected_content_types`` and
allow a list of content types to be specified.
Added missing ``Event`` class cache invalidation when calling the
``refresh()`` method.
Python 3
^^^^^^^^
Fixed an issue with the NamedMultiWidget class on Python 3. This issue
affected the document checkout form. This closes GitLab issue #683. Thanks
to John Bentley (@johnbentleyii) for the report.
Statistics
^^^^^^^^^^
Statistics code were updated to use timezone aware date. This solves a few
off-by-one-day results.
Workflows
^^^^^^^^^
When renaming custom workflow state actions, the workflow system would
error out when trying to show the label of the deleted or removed class. A
placeholder label will now be shown on invalid action classes reading
"Unknown action type".
The help text for workflows was improved.
Indexing
^^^^^^^^
The missing label for document metadata and file metadata model
properties entries were added. No functional changes were made just visual.
Removals

View File

@@ -3,7 +3,7 @@ from __future__ import unicode_literals
from django.urls import reverse
from mayan.apps.documents.tests.base import GenericDocumentViewTestCase
from mayan.apps.documents.tests.literals import TEST_DOCUMENT_PATH
from mayan.apps.documents.tests.literals import TEST_SMALL_DOCUMENT_PATH
from ..links import (
link_document_version_signature_delete,
@@ -61,7 +61,7 @@ class DocumentSignatureLinksTestCase(
)
def test_document_version_signature_delete_link_no_permission(self):
self.test_document_path = TEST_DOCUMENT_PATH
self.test_document_path = TEST_SMALL_DOCUMENT_PATH
self.upload_document()
self._create_test_detached_signature()
@@ -76,7 +76,7 @@ class DocumentSignatureLinksTestCase(
self.assertEqual(resolved_link, None)
def test_document_version_signature_delete_link_with_permission(self):
self.test_document_path = TEST_DOCUMENT_PATH
self.test_document_path = TEST_SMALL_DOCUMENT_PATH
self.upload_document()
self._create_test_detached_signature()

View File

@@ -7,7 +7,9 @@ from mayan.apps.django_gpg.tests.literals import TEST_KEY_PRIVATE_PASSPHRASE
from mayan.apps.django_gpg.tests.mixins import KeyTestMixin
from mayan.apps.documents.models import DocumentVersion
from mayan.apps.documents.tests.base import GenericDocumentTestCase
from mayan.apps.documents.tests.literals import TEST_DOCUMENT_PATH
from mayan.apps.documents.tests.literals import (
TEST_DOCUMENT_PATH, TEST_SMALL_DOCUMENT_PATH
)
from ..models import DetachedSignature, EmbeddedSignature
from ..tasks import task_verify_missing_embedded_signature
@@ -94,7 +96,7 @@ class DocumentSignaturesTestCase(SignatureTestMixin, GenericDocumentTestCase):
self.assertEqual(signature.signature_id, TEST_SIGNATURE_ID)
def test_detached_signature_no_key(self):
self.test_document_path = TEST_DOCUMENT_PATH
self.test_document_path = TEST_SMALL_DOCUMENT_PATH
self.upload_document()
self._create_test_detached_signature()
@@ -176,13 +178,13 @@ class DocumentSignaturesTestCase(SignatureTestMixin, GenericDocumentTestCase):
self.assertEqual(signature.public_key_fingerprint, None)
def test_document_no_signature(self):
self.test_document_path = TEST_DOCUMENT_PATH
self.test_document_path = TEST_SMALL_DOCUMENT_PATH
self.upload_document()
self.assertEqual(EmbeddedSignature.objects.count(), 0)
def test_new_signed_version(self):
self.test_document_path = TEST_DOCUMENT_PATH
self.test_document_path = TEST_SMALL_DOCUMENT_PATH
self.upload_document()
with open(TEST_SIGNED_DOCUMENT_PATH, mode='rb') as file_object:
@@ -210,7 +212,7 @@ class EmbeddedSignaturesTestCase(KeyTestMixin, GenericDocumentTestCase):
TEST_UNSIGNED_DOCUMENT_COUNT = 2
TEST_SIGNED_DOCUMENT_COUNT = 2
self.test_document_path = TEST_DOCUMENT_PATH
self.test_document_path = TEST_SMALL_DOCUMENT_PATH
for count in range(TEST_UNSIGNED_DOCUMENT_COUNT):
self.upload_document()
@@ -234,7 +236,7 @@ class EmbeddedSignaturesTestCase(KeyTestMixin, GenericDocumentTestCase):
TEST_UNSIGNED_DOCUMENT_COUNT = 2
TEST_SIGNED_DOCUMENT_COUNT = 2
self.test_document_path = TEST_DOCUMENT_PATH
self.test_document_path = TEST_SMALL_DOCUMENT_PATH
for count in range(TEST_UNSIGNED_DOCUMENT_COUNT):
self.upload_document()

View File

@@ -6,7 +6,9 @@ from mayan.apps.django_gpg.permissions import permission_key_sign
from mayan.apps.django_gpg.tests.mixins import KeyTestMixin
from mayan.apps.documents.models import DocumentVersion
from mayan.apps.documents.tests.base import GenericDocumentViewTestCase
from mayan.apps.documents.tests.literals import TEST_DOCUMENT_PATH
from mayan.apps.documents.tests.literals import (
TEST_DOCUMENT_PATH, TEST_SMALL_DOCUMENT_PATH
)
from ..models import DetachedSignature, EmbeddedSignature
from ..permissions import (
@@ -35,9 +37,7 @@ class SignaturesViewTestCase(
auto_upload_document = False
def test_signature_delete_view_no_permission(self):
self._create_test_key_public()
self.test_document_path = TEST_DOCUMENT_PATH
self.test_document_path = TEST_SMALL_DOCUMENT_PATH
self.upload_document()
self._create_test_detached_signature()
@@ -52,9 +52,7 @@ class SignaturesViewTestCase(
self.assertEqual(DetachedSignature.objects.count(), 1)
def test_signature_delete_view_with_access(self):
self._create_test_key_public()
self.test_document_path = TEST_DOCUMENT_PATH
self.test_document_path = TEST_SMALL_DOCUMENT_PATH
self.upload_document()
self._create_test_detached_signature()
@@ -73,9 +71,7 @@ class SignaturesViewTestCase(
self.assertEqual(DetachedSignature.objects.count(), 0)
def test_signature_detail_view_no_permission(self):
self._create_test_key_public()
self.test_document_path = TEST_DOCUMENT_PATH
self.test_document_path = TEST_SMALL_DOCUMENT_PATH
self.upload_document()
self._create_test_detached_signature()
@@ -84,9 +80,7 @@ class SignaturesViewTestCase(
self.assertEqual(response.status_code, 404)
def test_signature_detail_view_with_access(self):
self._create_test_key_public()
self.test_document_path = TEST_DOCUMENT_PATH
self.test_document_path = TEST_SMALL_DOCUMENT_PATH
self.upload_document()
self._create_test_detached_signature()
@@ -103,8 +97,7 @@ class SignaturesViewTestCase(
)
def test_signature_list_view_no_permission(self):
self._create_test_key_public()
self.test_document_path = TEST_DOCUMENT_PATH
self.test_document_path = TEST_SMALL_DOCUMENT_PATH
self.upload_document()
self._create_test_detached_signature()
@@ -115,9 +108,7 @@ class SignaturesViewTestCase(
self.assertEqual(response.status_code, 404)
def test_signature_list_view_with_access(self):
self._create_test_key_public()
self.test_document_path = TEST_DOCUMENT_PATH
self.test_document_path = TEST_SMALL_DOCUMENT_PATH
self.upload_document()
self._create_test_detached_signature()
@@ -143,7 +134,7 @@ class SignaturesViewTestCase(
old_hooks = DocumentVersion._post_save_hooks
DocumentVersion._post_save_hooks = {}
self.test_document_path = TEST_DOCUMENT_PATH
self.test_document_path = TEST_SMALL_DOCUMENT_PATH
for count in range(TEST_UNSIGNED_DOCUMENT_COUNT):
self.upload_document()
@@ -176,7 +167,7 @@ class SignaturesViewTestCase(
old_hooks = DocumentVersion._post_save_hooks
DocumentVersion._post_save_hooks = {}
self.test_document_path = TEST_DOCUMENT_PATH
self.test_document_path = TEST_SMALL_DOCUMENT_PATH
for count in range(TEST_UNSIGNED_DOCUMENT_COUNT):
self.upload_document()
@@ -211,6 +202,7 @@ class DetachedSignaturesViewTestCase(
auto_upload_document = False
def test_detached_signature_create_view_with_no_permission(self):
self.test_document_path = TEST_SMALL_DOCUMENT_PATH
self.upload_document()
self._create_test_key_private()
@@ -225,6 +217,7 @@ class DetachedSignaturesViewTestCase(
)
def test_detached_signature_create_view_with_document_access(self):
self.test_document_path = TEST_SMALL_DOCUMENT_PATH
self.upload_document()
self._create_test_key_private()
@@ -244,6 +237,7 @@ class DetachedSignaturesViewTestCase(
)
def test_detached_signature_create_view_with_key_access(self):
self.test_document_path = TEST_SMALL_DOCUMENT_PATH
self.upload_document()
self._create_test_key_private()
@@ -263,6 +257,7 @@ class DetachedSignaturesViewTestCase(
)
def test_detached_signature_create_view_with_full_access(self):
self.test_document_path = TEST_SMALL_DOCUMENT_PATH
self.upload_document()
self._create_test_key_private()
@@ -286,7 +281,7 @@ class DetachedSignaturesViewTestCase(
)
def test_signature_download_view_no_permission(self):
self.test_document_path = TEST_DOCUMENT_PATH
self.test_document_path = TEST_SMALL_DOCUMENT_PATH
self.upload_document()
self._create_test_detached_signature()
@@ -295,7 +290,7 @@ class DetachedSignaturesViewTestCase(
self.assertEqual(response.status_code, 403)
def test_signature_download_view_with_access(self):
self.test_document_path = TEST_DOCUMENT_PATH
self.test_document_path = TEST_SMALL_DOCUMENT_PATH
self.upload_document()
self._create_test_detached_signature()
@@ -316,6 +311,7 @@ class DetachedSignaturesViewTestCase(
def test_signature_upload_view_no_permission(self):
self.test_document_path = TEST_DOCUMENT_PATH
self.upload_document()
response = self._request_test_document_version_signature_upload_view()
@@ -344,6 +340,7 @@ class EmbeddedSignaturesViewTestCase(
auto_upload_document = False
def test_embedded_signature_create_view_with_no_permission(self):
self.test_document_path = TEST_SMALL_DOCUMENT_PATH
self.upload_document()
self._create_test_key_private()
@@ -358,6 +355,7 @@ class EmbeddedSignaturesViewTestCase(
)
def test_embedded_signature_create_view_with_document_access(self):
self.test_document_path = TEST_SMALL_DOCUMENT_PATH
self.upload_document()
self._create_test_key_private()
@@ -377,6 +375,7 @@ class EmbeddedSignaturesViewTestCase(
)
def test_embedded_signature_create_view_with_key_access(self):
self.test_document_path = TEST_SMALL_DOCUMENT_PATH
self.upload_document()
self._create_test_key_private()
@@ -396,6 +395,7 @@ class EmbeddedSignaturesViewTestCase(
)
def test_embedded_signature_create_view_with_full_access(self):
self.test_document_path = TEST_SMALL_DOCUMENT_PATH
self.upload_document()
self._create_test_key_private()

View File

@@ -12,7 +12,7 @@ from ..models import (
from .base import GenericDocumentTestCase
from .literals import (
TEST_DOCUMENT_TYPE_LABEL, TEST_DOCUMENT_PATH, TEST_MULTI_PAGE_TIFF_PATH,
TEST_DOCUMENT_TYPE_LABEL, TEST_MULTI_PAGE_TIFF_PATH,
TEST_PDF_INDIRECT_ROTATE_PATH, TEST_OFFICE_DOCUMENT_PATH,
TEST_SMALL_DOCUMENT_CHECKSUM, TEST_SMALL_DOCUMENT_FILENAME,
TEST_SMALL_DOCUMENT_MIMETYPE, TEST_SMALL_DOCUMENT_PATH,
@@ -200,7 +200,7 @@ class DocumentVersionTestCase(GenericDocumentTestCase):
def test_add_new_version(self):
self.assertEqual(self.test_document.versions.count(), 1)
with open(TEST_DOCUMENT_PATH, mode='rb') as file_object:
with open(TEST_SMALL_DOCUMENT_PATH, mode='rb') as file_object:
self.test_document.new_version(
file_object=file_object
)
@@ -209,7 +209,7 @@ class DocumentVersionTestCase(GenericDocumentTestCase):
self.assertEqual(
self.test_document.checksum,
'c637ffab6b8bb026ed3784afdb07663fddc60099853fae2be93890852a69ecf3'
TEST_SMALL_DOCUMENT_CHECKSUM
)
def test_revert_version(self):
@@ -219,7 +219,7 @@ class DocumentVersionTestCase(GenericDocumentTestCase):
# field
time.sleep(1.01)
with open(TEST_DOCUMENT_PATH, mode='rb') as file_object:
with open(TEST_SMALL_DOCUMENT_PATH, mode='rb') as file_object:
self.test_document.new_version(
file_object=file_object
)