diff --git a/docs/source/changelog.rst b/docs/source/changelog.rst index c3a8d5d9..285f5598 100644 --- a/docs/source/changelog.rst +++ b/docs/source/changelog.rst @@ -1,6 +1,14 @@ Changelog ####################################### +0.6.1 +======================================= + +Fixes: + + - Adds all interactives to required files. + - Typo in Interactive documentation. + 0.6.0 ======================================= diff --git a/docs/source/processors/interactive.rst b/docs/source/processors/interactive.rst index 7382d7e3..a029332d 100644 --- a/docs/source/processors/interactive.rst +++ b/docs/source/processors/interactive.rst @@ -74,7 +74,7 @@ Optional Tag Parameters The set of filepaths can be accessed after conversion, see :ref:`accessing_verto_data`. -The default HTML for button links is: +The default HTML for an interactive is: .. literalinclude:: ../../../verto/html-templates/interactive.html :language: css+jinja diff --git a/requirements.txt b/requirements.txt index 1251f000..49eaeb7c 100644 --- a/requirements.txt +++ b/requirements.txt @@ -2,8 +2,8 @@ markdown==2.6.8 Jinja2==2.9.6 python-slugify==1.2.4 -setuptools==35.0.2 +setuptools==36.0.1 # Required dependencies for building documentation -sphinx==1.6.1 +sphinx==1.6.2 sphinx_rtd_theme==0.2.4 diff --git a/verto/__init__.py b/verto/__init__.py index 7e3917ef..f08b4bf9 100644 --- a/verto/__init__.py +++ b/verto/__init__.py @@ -1,4 +1,4 @@ # flake8: noqa from .Verto import Verto -__version__ = '0.6.0' +__version__ = '0.6.1' diff --git a/verto/processors/InteractiveBlockProcessor.py b/verto/processors/InteractiveBlockProcessor.py index 71ec87b3..37a295fa 100644 --- a/verto/processors/InteractiveBlockProcessor.py +++ b/verto/processors/InteractiveBlockProcessor.py @@ -62,10 +62,11 @@ def run(self, parent, blocks): text = argument_values.get('text', None) parameters = argument_values.get('parameters', None) + # add to list of interactives + self.required.add(name) + if interactive_type == 'in-page': self.scripts.add('interactive/{}/scripts.html'.format(name)) - if interactive_type != 'whole-page': - self.required.add(name) context = dict() context['type'] = interactive_type diff --git a/verto/tests/InteractiveTest.py b/verto/tests/InteractiveTest.py index 77f464ad..375e56b4 100644 --- a/verto/tests/InteractiveTest.py +++ b/verto/tests/InteractiveTest.py @@ -6,6 +6,7 @@ from verto.processors.InteractiveBlockProcessor import InteractiveBlockProcessor from verto.tests.ProcessorTest import ProcessorTest + class InteractiveTest(ProcessorTest): '''The interactive processor is a simple tag with a complex output that relies on external systems. @@ -37,7 +38,7 @@ def test_doc_example_in_page(self): expected_string = self.read_test_file(self.processor_name, 'doc_example_in_page_usage_expected.html', strip=True) self.assertEqual(expected_string, converted_test_string) - required_files={ + required_files = { 'interactives': { 'binary-cards' }, @@ -50,7 +51,7 @@ def test_doc_example_in_page(self): self.assertEqual(self.verto_extension.required_files, required_files) def test_doc_example_whole_page(self): - '''Example of an whole-page interactive. + '''Example of a whole-page interactive. ''' test_string = self.read_test_file(self.processor_name, 'doc_example_whole_page_usage.md') blocks = self.to_blocks(test_string) @@ -61,8 +62,8 @@ def test_doc_example_whole_page(self): expected_string = self.read_test_file(self.processor_name, 'doc_example_whole_page_usage_expected.html', strip=True) self.assertEqual(expected_string, converted_test_string) - required_files={ - 'interactives': set(), + required_files = { + 'interactives': {"binary-cards"}, 'images': { 'binary-cards/thumbnail.png' }, @@ -83,7 +84,7 @@ def test_doc_example_iframe(self): expected_string = self.read_test_file(self.processor_name, 'doc_example_iframe_usage_expected.html', strip=True) self.assertEqual(expected_string, converted_test_string) - required_files={ + required_files = { 'interactives': { 'binary-cards' },