Repository: plotly/plotly.py
Pull request #866 (2017-10-26 20:22:40)

Presentation setup.py fix
is adding `presentation_objs` file to setup.

Do I need to update version number to 2.2.1?

cc @cldougl @chriddyp 


Patch:
diff --git a/CHANGELOG.md b/CHANGELOG.md
index ab5616dd5..930060dc5 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -2,7 +2,11 @@
 All notable changes to this project will be documented in this file.
 This project adheres to [Semantic Versioning](http://semver.org/).
 
-## [2.2.0] - 2017-10-20
+## [2.2.1] - 2017-10-26
+### Fixed
+- presentation objects now added to setup.py
+
+## [2.2.0] - 2017-10-26
 ### Added
 - NEW Presentations API for Python! Run `help(plotly.presentation_objs.Presentations)` for help or check out the new [documentation](https://plot.ly/python/presentations-api/)
 
diff --git a/plotly/presentation_objs/presentation_objs.py b/plotly/presentation_objs/presentation_objs.py
index b1e5a8c54..5f91c2e51 100644
--- a/plotly/presentation_objs/presentation_objs.py
+++ b/plotly/presentation_objs/presentation_objs.py
@@ -48,7 +48,6 @@ fontWeight_dict = {
 }
 
 
-
 def list_of_options(iterable, conj='and', period=True):
     """
     Returns an English listing of objects seperated by commas ','
@@ -886,16 +885,16 @@ class Presentation(dict):
     :param (str) style: the theme that the presentation will take on. The
         themes that are available now are 'martik' and 'moods'.
         Default = 'moods'.
-    :param (bool) imgStretch: if set to True, all images in the presentation
+    :param (bool) imgStretch: if set to False, all images in the presentation
         will not have heights and widths that will not exceed the parent
         container they belong to. In other words, images will keep their
         original aspect ratios.
-        Default = False.
+        Default = True.
 
     For examples see the documentation:\n
     https://plot.ly/python/presentations-api/
     """
-    def __init__(self, markdown_string=None, style='moods', imgStretch=False):
+    def __init__(self, markdown_string=None, style='moods', imgStretch=True):
         self['presentation'] = {
             'slides': [],
             'slidePreviews': [None for _ in range(496)],
@@ -1090,9 +1089,9 @@ class Presentation(dict):
                                  height=specs[2], width=specs[3],
                                  slide=slide_num)
 
-        if imgStretch:
-            for slide in self['presentation']['slides']:
-                for child in slide['children']:
+        if not imgStretch:
+            for s, slide in enumerate(self['presentation']['slides']):
+                for c, child in enumerate(slide['children']):
                     if child['type'] in ['Image', 'Plotly']:
                         deep_child = child['props']['style']
                         width = deep_child['width']
diff --git a/plotly/version.py b/plotly/version.py
index 04188a16d..36a511eca 100644
--- a/plotly/version.py
+++ b/plotly/version.py
@@ -1,1 +1,1 @@
-__version__ = '2.2.0'
+__version__ = '2.2.1'
diff --git a/setup.py b/setup.py
index 0012d87d9..d12b3c759 100644
--- a/setup.py
+++ b/setup.py
@@ -35,6 +35,7 @@ setup(name='plotly',
                 'plotly/api/v1',
                 'plotly/api/v2',
                 'plotly/dashboard_objs',
+                'plotly/presentation_objs',
                 'plotly/plotly',
                 'plotly/plotly/chunked_requests',
                 'plotly/figure_factory',


Test patch:
diff --git a/plotly/tests/test_core/test_spectacle_presentation/test_spectacle_presentation.py b/plotly/tests/test_core/test_spectacle_presentation/test_spectacle_presentation.py
index b5294f838..1f0392acb 100644
--- a/plotly/tests/test_core/test_spectacle_presentation/test_spectacle_presentation.py
+++ b/plotly/tests/test_core/test_spectacle_presentation/test_spectacle_presentation.py
@@ -51,12 +51,11 @@ class TestPresentation(TestCase):
             markdown_string, style='moods'
         )
 
-
     def test_expected_pres(self):
         markdown_string = "# title\n---\ntransition: zoom, fade, fade\n# Colors\nColors are everywhere around us.\nPlotly(https://plot.ly/~AdamKulidjian/3564/)\nImage(https://raw.githubusercontent.com/jackparmer/gradient-backgrounds/master/moods1.png)\n```python\nx=1\n```\n---\nPlotly(https://plot.ly/~AdamKulidjian/3564/)\nPlotly(https://plot.ly/~AdamKulidjian/3564/)\nPlotly(https://plot.ly/~AdamKulidjian/3564/)\nPlotly(https://plot.ly/~AdamKulidjian/3564/)\nPlotly(https://plot.ly/~AdamKulidjian/3564/)\nPlotly(https://plot.ly/~AdamKulidjian/3564/)\nPlotly(https://plot.ly/~AdamKulidjian/3564/)\n---\n"
 
         my_pres = pres.Presentation(
-            markdown_string, style='moods', imgStretch=False
+            markdown_string, style='moods', imgStretch=True
         )
 
         exp_pres = {'presentation': {'paragraphStyles': {'Body': {'color': '#000016',