New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Docstring cleanup #2056

Merged
merged 31 commits into from Jul 13, 2016

Conversation

Projects
None yet
3 participants
@chaosphere2112
Contributor

chaosphere2112 commented Jul 12, 2016

Cleaned up version of #2055

Sam Fries and others added some commits Jun 10, 2016

Sam Fries
@chaosphere2112

This comment has been minimized.

Contributor

chaosphere2112 commented Jul 12, 2016

@embrown OK, I've fixed this branch up so GitHub likes it more; I also fixed some code style issues. However, there are 41 lines that are longer than our limit for code style (maximum line length is 120 characters).

Canvas.py

Line 1733 ":param color: A color name from the `X11 Color Names list <https://en.wikipedia.org/wiki/X11_color_names>`_, or an integer value from 0-255, or an RGB/RGBA tuple/list (e.g. (0,100,0), (100,100,0,50))"
Line 1739 ":param viewport: A list of 4 floats between 0 and 1. These specify the area that the X/Y values are mapped into inside of the canvas."
Line 1751 ":param projection: Lets you specify a geographic projection used to convert x/y from spherical coordinates into 2D coordinates."
Line 1857 ":param color: A color name from the `X11 Color Names list <https://en.wikipedia.org/wiki/X11_color_names>`_, or an integer value from 0-255, or an RGB/RGBA tuple/list (e.g. (0,100,0), (100,100,0,50))"
Line 1863 ":param viewport: A list of 4 floats between 0 and 1. These specify the area that the X/Y values are mapped into inside of the canvas."
Line 1979 ":param index: Specifies which `pattern <http://uvcdat.llnl.gov/gallery/fullsize/pattern_chart.png>`_ to fill the fillarea with. Accepts ints from 1-20."
Line 1982 ":param color: A color name from the `X11 Color Names list <https://en.wikipedia.org/wiki/X11_color_names>`_, or an integer value from 0-255, or an RGB/RGBA tuple/list (e.g. (0,100,0), (100,100,0,50))"
Line 1988 ":param viewport: A list of 4 floats between 0 and 1. These specify the area that the X/Y values are mapped into inside of the canvas."
Line 2000 ":param bg: Boolean value. If true, object is drawn in background (not shown on canvas). If false, object is shown on the canvas."
Line 2210 ":param index: Specifies which `pattern <http://uvcdat.llnl.gov/gallery/fullsize/pattern_chart.png>`_ to fill the fillarea with. Accepts ints from 1-20."
Line 2213 ":param color: A color name from the `X11 Color Names list <https://en.wikipedia.org/wiki/X11_color_names>`_, or an integer value from 0-255, or an RGB/RGBA tuple/list (e.g. (0,100,0), (100,100,0,50))"
Line 2219 ":param viewport: A list of 4 floats between 0 and 1. These specify the area that the X/Y values are mapped into inside of the canvas."
Line 2231 ":param bg: Boolean value. If true, object is drawn in background (not shown on canvas). If false, object is shown on the canvas."
Line 4487 ":param height: Float representing the desired height of the output, using the specified unit of measurement. Must be one of ['inches', 'in', 'cm', 'mm', None, 'pixel', 'pixels', 'dot', 'dots']."
Line 4538 ":param height: Float representing the desired height of the output png, using the specified unit of measurement. Must be one of ['inches', 'in', 'cm', 'mm', None, 'pixel', 'pixels', 'dot', 'dots']."
Line 4588 ":param units: String indicating units of measurement. Must be one of ['inches', 'in', 'cm', 'mm', 'pixel', 'pixels', 'dot', 'dots']. Default is 'inches'."
Line 4636 ":param units: Specifies units of measurement for the output image. One of ['inches', 'in', 'cm', 'mm', 'pixel', 'pixels', 'dot', 'dots']. Deafults to 'inches'."
Line 5314 ":returns: Returns a 1 if orientation is portrait. Otherwise, it will return a 0, indicating false (not in portrait mode)."
Line 1236 ":param color: A color name from the `X11 Color Names list <https://en.wikipedia.org/wiki/X11_color_names>`_, or an integer value from 0-255, or an RGB/RGBA tuple/list (e.g. (0,100,0), (100,100,0,50))"

manageElements.py

Line 1242 ":param viewport: A list of 4 floats between 0 and 1. These specify the area that the X/Y values are mapped into inside of the canvas."
Line 1254 ":param projection: Lets you specify a geographic projection used to convert x/y from spherical coordinates into 2D coordinates."
Line 1327 ":param color: A color name from the `X11 Color Names list <https://en.wikipedia.org/wiki/X11_color_names>`_, or an integer value from 0-255, or an RGB/RGBA tuple/list (e.g. (0,100,0), (100,100,0,50))"
Line 1333 ":param viewport: A list of 4 floats between 0 and 1. These specify the area that the X/Y values are mapped into inside of the canvas."
Line 1423 ":param color: A color name from the `X11 Color Names list <https://en.wikipedia.org/wiki/X11_color_names>`_, or an integer value from 0-255, or an RGB/RGBA tuple/list (e.g. (0,100,0), (100,100,0,50))"
Line 1429 ":param viewport: A list of 4 floats between 0 and 1. These specify the area that the X/Y values are mapped into inside of the canvas."
Line 1515 ":param color: A color name from the `X11 Color Names list <https://en.wikipedia.org/wiki/X11_color_names>`_, or an integer value from 0-255, or an RGB/RGBA tuple/list (e.g. (0,100,0), (100,100,0,50))"
Line 1521 ":param viewport: A list of 4 floats between 0 and 1. These specify the area that the X/Y values are mapped into inside of the canvas."
Line 1605 ":param index: Specifies which `pattern <http://uvcdat.llnl.gov/gallery/fullsize/pattern_chart.png>`_ to fill the fillarea with. Accepts ints from 1-20."
Line 1608 ":param color: A color name from the `X11 Color Names list <https://en.wikipedia.org/wiki/X11_color_names>`_, or an integer value from 0-255, or an RGB/RGBA tuple/list (e.g. (0,100,0), (100,100,0,50))"
Line 1614 ":param viewport: A list of 4 floats between 0 and 1. These specify the area that the X/Y values are mapped into inside of the canvas."
Line 1691 ":param index: Specifies which `pattern <http://uvcdat.llnl.gov/gallery/fullsize/pattern_chart.png>`_ to fill the fillarea with. Accepts ints from 1-20."
Line 1694 ":param color: A color name from the `X11 Color Names list <https://en.wikipedia.org/wiki/X11_color_names>`_, or an integer value from 0-255, or an RGB/RGBA tuple/list (e.g. (0,100,0), (100,100,0,50))"
Line 1700 ":param viewport: A list of 4 floats between 0 and 1. These specify the area that the X/Y values are mapped into inside of the canvas."
Line 1789 ":param color: A color name from the `X11 Color Names list <https://en.wikipedia.org/wiki/X11_color_names>`_, or an integer value from 0-255, or an RGB/RGBA tuple/list (e.g. (0,100,0), (100,100,0,50))"
Line 1795 ":param viewport: A list of 4 floats between 0 and 1. These specify the area that the X/Y values are mapped into inside of the canvas."
Line 1882 ":param color: A color name from the `X11 Color Names list <https://en.wikipedia.org/wiki/X11_color_names>`_, or an integer value from 0-255, or an RGB/RGBA tuple/list (e.g. (0,100,0), (100,100,0,50))"
Line 1888 ":param viewport: A list of 4 floats between 0 and 1. These specify the area that the X/Y values are mapped into inside of the canvas."
Line 2038 ":param color: A color name from the `X11 Color Names list <https://en.wikipedia.org/wiki/X11_color_names>`_, or an integer value from 0-255, or an RGB/RGBA tuple/list (e.g. (0,100,0), (100,100,0,50))"
Line 2044 ":param viewport: A list of 4 floats between 0 and 1. These specify the area that the X/Y values are mapped into inside of the canvas."
Line 2174 ":param color: A color name from the `X11 Color Names list <https://en.wikipedia.org/wiki/X11_color_names>`_, or an integer value from 0-255, or an RGB/RGBA tuple/list (e.g. (0,100,0), (100,100,0,50))"
Line 2180 ":param viewport: A list of 4 floats between 0 and 1. These specify the area that the X/Y values are mapped into inside of the canvas."

To get this current version of docstring_cleanup, you should do git reset --hard upstream/docstring_cleanup. Once you've got that, you can start making changes (which you should submit as a PR to this branch and I'll review).

@@ -1553,3 +1553,9 @@ def png_dimensions(self, path):
img = reader.GetOutput()
size = img.GetDimensions()
return size[0], size[1]
def canvasraised(self):

This comment has been minimized.

@doutriaux1

doutriaux1 Jul 12, 2016

Member

@chaosphere2112 what is this? The name almost suggest this is a query I would expect it to return True/False shouldn't this be called raiseCanvas ?

This comment has been minimized.

@chaosphere2112

chaosphere2112 Jul 12, 2016

Contributor

It is the VTK implementation of this function, which previously said this:

    #############################################################################
    #                                                                           #
    # Raise VCS Canvas to the top of all its siblings.                          #
    #                                                                           #
    #############################################################################
    def canvasraised(self, *args):
        """
 Function: canvasraised                         # Raise the VCS Canvas to the top
 Description of Function:
    This function marks a VCS Canvas as eligible to be displayed and  
    positions the window at the top of the stack of its siblings.
 Example of Use:
    a=vcs.init()
    ...
    a.canvasraised()
"""

        return  apply(self.canvas.canvasraised, args)

https://github.com/UV-CDAT/uvcdat/blob/303c02a32095aa328b5aeba53ef20267e49a63c4/Packages/vcs/Lib/Canvas.py#L7819-L7839

This comment has been minimized.

@chaosphere2112

chaosphere2112 Jul 12, 2016

Contributor

It seemed handy, so I actually implemented it.

@doutriaux1

This comment has been minimized.

Member

doutriaux1 commented Jul 12, 2016

@chaosphere2112 I have one little question.

Ed Brown and others added some commits Jul 12, 2016

Sam Fries added some commits Jul 13, 2016

Sam Fries
Sam Fries
@chaosphere2112

This comment has been minimized.

Contributor

chaosphere2112 commented Jul 13, 2016

@doutriaux1 I'm running the test suite on the branch just to double check, then I'll merge.

@aashish24

This comment has been minimized.

Contributor

aashish24 commented Jul 13, 2016

@chaosphere2112 is this reviewed by @doutriaux1 and someone else?

Sam Fries
@chaosphere2112

This comment has been minimized.

Contributor

chaosphere2112 commented Jul 13, 2016

@aashish24 It's @embrown's (our intern, Ed) PR, I just cleaned it up a little. It's been reviewed by @doutriaux1 and myself.

@chaosphere2112

This comment has been minimized.

Contributor

chaosphere2112 commented Jul 13, 2016

@aashish24 I just want to get this merged into master so Ed can start a new branch and continue working ASAP

@chaosphere2112

This comment has been minimized.

Contributor

chaosphere2112 commented Jul 13, 2016

@aashish24 Feel free to give it a quick perusal as well 😄

@aashish24

This comment has been minimized.

Contributor

aashish24 commented Jul 13, 2016

Sounds good @chaosphere2112 I did a quick pass, and it looks good to me.

@chaosphere2112 chaosphere2112 merged commit dedace8 into master Jul 13, 2016

0 of 2 checks passed

continuous-integration/travis-ci/pr The Travis CI build is in progress
Details
continuous-integration/travis-ci/push The Travis CI build is in progress
Details
@doutriaux1

This comment has been minimized.

Member

doutriaux1 commented on 6778612 Jul 13, 2016

thanks @chaosphere2112 !

@chaosphere2112 chaosphere2112 deleted the docstring_cleanup branch Aug 22, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment