Skip to content
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

More documentation #114

Closed
wants to merge 46 commits into from
Closed
Changes from 1 commit
Commits
Show all changes
46 commits
Select commit Hold shift + click to select a range
b76a435
Fixes #2, Gfb.rename().
Sep 21, 2016
4f3d02d
Merge branch 'master' of github.com:UV-CDAT/vcs
Nov 14, 2016
f3611de
Working on vcs documentation again.
Nov 23, 2016
7e88272
Trying to fix doctest strings
Nov 23, 2016
52ace16
Trying to get testing to work
Nov 28, 2016
0aba23b
Fixing errors for tests
Nov 29, 2016
629005c
Working on a script to parse doctest output for error warnings
Nov 30, 2016
0145d63
Running individual modules through doctest and processing output
Dec 7, 2016
d6fc033
Working on doctest_vcs.py
Dec 7, 2016
d69364a
Working on doctest scripts
Dec 7, 2016
09ad094
Working on improving doctest reporting
Dec 7, 2016
357f78f
Added README.md with links to doctest logs
Dec 8, 2016
b145bc6
Fixed README to be markdown friendly
Dec 8, 2016
f5941bb
Fixed errors in manageElements. Added doctests. General formatting im…
Dec 8, 2016
3013bf8
Merge branch 'master' of github.com:UV-CDAT/vcs into more_documentation
Dec 12, 2016
6605397
Adding doctests where they are missing.
Dec 13, 2016
58e2bf2
Adding doctests/documentation where necessary.
Dec 13, 2016
56b73a6
Fixing/adding doctests
Dec 14, 2016
4d4a002
Added more examples/doctests to utils.py .
Dec 14, 2016
d384ae5
Tweaked doctest cleanup. Fixed manageElements doctests.
Dec 14, 2016
9f797d4
Organized doctest_info directory.
Dec 15, 2016
b46416d
Fixed reference to old branch in README.md
Dec 15, 2016
2c74fc1
Docstring formatting. Doctest corrections. Changed Not Yet Implemente…
Dec 15, 2016
1d4e7b4
doctest_vcs.py now filters out private functions from the missing
Dec 19, 2016
c965894
Fixed more docstring formatting issues.
Dec 20, 2016
7447eda
Fixing up template. Deleted old file in scripts/
Dec 20, 2016
532a2be
Undocumented some internal functions to template.
Dec 20, 2016
bbe545f
Updating logs.
Dec 27, 2016
87ffae3
Fixed taylordiagram examples
Dec 27, 2016
37d2a40
Added example to mtics doc
Dec 27, 2016
51cea2a
Adding doctests to xmldocs:
Dec 28, 2016
bab6725
Fixed doctests for ticlabels, exts
Dec 28, 2016
711abb6
Refactored doctest_vcs.py and re-ran tests.
Dec 28, 2016
14bed4e
Working on extracting repetetive params to xmldocs.
Dec 28, 2016
4d9efc3
Re-factored xmldocs formatting.
Jan 4, 2017
5b159e5
Added functionality to ignore certain regular expressions when
Jan 5, 2017
570ffe8
Added an Index of VCS functions for the pdf output.
Jan 5, 2017
eb08920
Added README.md to doctest_info directories briefly explaining
Jan 5, 2017
8bbbeef
Formatted :Example: sections to <=80 lines so they look better
Jan 5, 2017
b8897f1
Removed Makefile call to old function
Jan 5, 2017
11b67d9
Adds doctest_info/ to .gitignore.
Jan 10, 2017
6c75ccd
Added '.. pragma: skip-doctest' statements in some places they are
Jan 11, 2017
3b2635b
Added lots of '.. pragma: skip-doctest' and fixed some broken tests.
Jan 12, 2017
d9b1313
Added skip-doctest to some docstrings.
Jan 12, 2017
ee36e7b
Standardized print statements for .list()
Jan 12, 2017
572fba4
Added things to stop tests from breaking
Jan 12, 2017
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Re-factored xmldocs formatting.
Re-ran doctests and re-reported.
embrown committed Jan 4, 2017
commit 4d9efc36609f4cf4d88649d521c2430f4ee37d21
16 changes: 7 additions & 9 deletions docs/doctest_info/markdown/Canvas.md
Original file line number Diff line number Diff line change
@@ -8,45 +8,45 @@ Failed example:
pass
Expected nothing
Got:
<vcs.textcombined.Tc object at 0x11875d410>
<vcs.textcombined.Tc object at 0x11877a140>
```

vcs.Canvas.Canvas.get3d_dual_scalar
-----------------------------------
```python
Failed example:
a.plot(ex, slab1, slab2) # plot using specified 3d_dual_scalar object
a.plot(ex, slab1, slab2) # plot 3d_dual_scalar
Expected:
<vcs.displayplot.Dp ...>
Got:
initCamera: Camera => ((0.0, 0.0, 540.0), (0.0, 0.0, 0.0), (0.0, 1.0, 0.0))
<vcs.displayplot.Dp object at 0x11874c5c8>
<vcs.displayplot.Dp object at 0x12a60f4b0>
```

vcs.Canvas.Canvas.get3d_scalar
------------------------------
```python
Failed example:
a.plot(ex, slab1) # plot using specified 3d_scalar object
a.plot(ex, slab1) # plot 3d_scalar
Expected:
<vcs.displayplot.Dp ...>
Got:
initCamera: Camera => ((0.0, 0.0, 540.0), (0.0, 0.0, 0.0), (0.0, 1.0, 0.0))
<vcs.displayplot.Dp object at 0x154341280>
<vcs.displayplot.Dp object at 0x154c9eb40>
```

vcs.Canvas.Canvas.get3d_vector
------------------------------
```python
Failed example:
a.plot(ex, slab1, slab2) # plot using specified 3d_vector object
a.plot(ex, slab1, slab2) # plot 3d_vector
Expected:
<vcs.displayplot.Dp ...>
Got:
Sample rate: 6
Sample rate: 6
initCamera: Camera => ((0.0, 0.0, 540.0), (0.0, 0.0, 0.0), (0.0, 1.0, 0.0))
<vcs.displayplot.Dp object at 0x154372d70>
<vcs.displayplot.Dp object at 0x154c585c8>
```

vcs.Canvas.Canvas.isinfile
@@ -117,8 +117,6 @@ Missing Doctests

:x:``` vcs.Canvas.Canvas.scalar3d```

:x:``` vcs.Canvas.Canvas.scriptrun```

:x:``` vcs.Canvas.Canvas.setAnimationStepper```

:x:``` vcs.Canvas.Canvas.setdefaultfont```
4 changes: 2 additions & 2 deletions docs/doctest_info/markdown/isofill.md
Original file line number Diff line number Diff line change
@@ -2,13 +2,13 @@ vcs.isofill.Gfi.script
----------------------
```python
Failed example:
ex.script('filename.py') # Append to a Python script named 'filename.py'
ex.script('filename.py') # append to 'filename.py'
Exception raised:
Traceback (most recent call last):
File "/Users/brown308/anaconda/envs/2.8/lib/python2.7/doctest.py", line 1315, in __run
compileflags, 1) in test.globs
File "<doctest vcs.isofill.Gfi.script[2]>", line 1, in <module>
ex.script('filename.py') # Append to a Python script named 'filename.py'
ex.script('filename.py') # append to 'filename.py'
File "/Users/brown308/anaconda/envs/2.8/lib/python2.7/site-packages/vcs/isofill.py", line 856, in script
fp.write("%s.missing = %g\n" % (unique_name, self.missing))
TypeError: float argument required, not tuple
2 changes: 0 additions & 2 deletions docs/doctest_info/markdown/line.md
Original file line number Diff line number Diff line change
@@ -2,8 +2,6 @@ Missing Doctests
----------------
:x:``` vcs.line```

:x:``` vcs.line.Tl```

:x:``` vcs.line.Tl.color```

:x:``` vcs.line.Tl.colormap```
16 changes: 8 additions & 8 deletions docs/doctest_info/markdown/manageElements.md
Original file line number Diff line number Diff line change
@@ -2,7 +2,7 @@ vcs.manageElements.createtext
-----------------------------
```python
Failed example:
vcs.show('textcombined') # show all available textcombined
vcs.show('textcombined') # available textcombineds
Expected:
*******************Textcombined Names List**********************
...
@@ -22,45 +22,45 @@ Failed example:
pass
Expected nothing
Got:
<vcs.textcombined.Tc object at 0x117fda410>
<vcs.textcombined.Tc object at 0x11810e500>
```

vcs.manageElements.get3d_dual_scalar
------------------------------------
```python
Failed example:
a.plot(ex, slab1, slab2) # plot using specified 3d_dual_scalar object
a.plot(ex, slab1, slab2) # plot 3d_dual_scalar
Expected:
<vcs.displayplot.Dp ...>
Got:
initCamera: Camera => ((0.0, 0.0, 540.0), (0.0, 0.0, 0.0), (0.0, 1.0, 0.0))
<vcs.displayplot.Dp object at 0x118548168>
<vcs.displayplot.Dp object at 0x118526c58>
```

vcs.manageElements.get3d_scalar
-------------------------------
```python
Failed example:
a.plot(ex, slab1) # plot using specified 3d_scalar object
a.plot(ex, slab1) # plot 3d_scalar
Expected:
<vcs.displayplot.Dp ...>
Got:
initCamera: Camera => ((0.0, 0.0, 540.0), (0.0, 0.0, 0.0), (0.0, 1.0, 0.0))
<vcs.displayplot.Dp object at 0x11806f168>
<vcs.displayplot.Dp object at 0x118375e88>
```

vcs.manageElements.get3d_vector
-------------------------------
```python
Failed example:
a.plot(ex, slab1, slab2) # plot using specified 3d_vector object
a.plot(ex, slab1, slab2) # plot 3d_vector
Expected:
<vcs.displayplot.Dp ...>
Got:
Sample rate: 6
Sample rate: 6
initCamera: Camera => ((0.0, 0.0, 540.0), (0.0, 0.0, 0.0), (0.0, 1.0, 0.0))
<vcs.displayplot.Dp object at 0x12963e398>
<vcs.displayplot.Dp object at 0x119c9d910>
```

Missing Doctests
4 changes: 2 additions & 2 deletions docs/doctest_info/markdown/meshfill.md
Original file line number Diff line number Diff line change
@@ -44,13 +44,13 @@ vcs.meshfill.Gfm.script
-----------------------
```python
Failed example:
ex.script('filename.py') # Append to a Python script named 'filename.py'
ex.script('filename.py') # append to 'filename.py'
Exception raised:
Traceback (most recent call last):
File "/Users/brown308/anaconda/envs/2.8/lib/python2.7/doctest.py", line 1315, in __run
compileflags, 1) in test.globs
File "<doctest vcs.meshfill.Gfm.script[2]>", line 1, in <module>
ex.script('filename.py') # Append to a Python script named 'filename.py'
ex.script('filename.py') # append to 'filename.py'
File "/Users/brown308/anaconda/envs/2.8/lib/python2.7/site-packages/vcs/meshfill.py", line 900, in script
fp.write("%s.missing = %g\n\n" % (unique_name, self.missing))
TypeError: float argument required, not tuple
2 changes: 1 addition & 1 deletion docs/doctest_info/markdown/queries.md
Original file line number Diff line number Diff line change
@@ -8,7 +8,7 @@ Failed example:
pass
Expected nothing
Got:
<vcs.textcombined.Tc object at 0x118013d70>
<vcs.textcombined.Tc object at 0x11847b050>
```

Missing Doctests
2 changes: 1 addition & 1 deletion docs/doctest_info/markdown/template.md
Original file line number Diff line number Diff line change
@@ -5,7 +5,7 @@ Failed example:
t.drawAttributes(a,s,b) # shows attributes of s on canvas
Expected nothing
Got:
[<vcs.displayplot.Dp object at 0x11874ee88>, <vcs.displayplot.Dp object at 0x1187134b0>, <vcs.displayplot.Dp object at 0x1188887f8>, <vcs.displayplot.Dp object at 0x118888280>, <vcs.displayplot.Dp object at 0x1188886e0>]
[<vcs.displayplot.Dp object at 0x118798e88>, <vcs.displayplot.Dp object at 0x1188eb4b0>, <vcs.displayplot.Dp object at 0x118903b40>, <vcs.displayplot.Dp object at 0x11890f168>, <vcs.displayplot.Dp object at 0x11890f6e0>]
```

vcs.template.P.list
6 changes: 3 additions & 3 deletions docs/doctest_info/markdown/textcombined.md
Original file line number Diff line number Diff line change
@@ -8,20 +8,20 @@ Failed example:
pass
Expected nothing
Got:
<vcs.textcombined.Tc object at 0x117e56410>
<vcs.textcombined.Tc object at 0x117e4f500>
```

vcs.textcombined.Tc.script
--------------------------
```python
Failed example:
ex.script('filename.py') # Append to a Python script named 'filename.py'
ex.script('filename.py') # append to 'filename.py'
Exception raised:
Traceback (most recent call last):
File "/Users/brown308/anaconda/envs/2.8/lib/python2.7/doctest.py", line 1315, in __run
compileflags, 1) in test.globs
File "<doctest vcs.textcombined.Tc.script[3]>", line 1, in <module>
ex.script('filename.py') # Append to a Python script named 'filename.py'
ex.script('filename.py') # append to 'filename.py'
File "/Users/brown308/anaconda/envs/2.8/lib/python2.7/site-packages/vcs/textcombined.py", line 503, in script
fp.write("%s.color = %g\n\n" % (unique_name, self.color))
TypeError: float argument required, not list
4 changes: 2 additions & 2 deletions docs/doctest_info/markdown/texttable.md
Original file line number Diff line number Diff line change
@@ -2,13 +2,13 @@ vcs.texttable.Tt.script
-----------------------
```python
Failed example:
ex.script('filename.py') # Append to a Python script named 'filename.py'
ex.script('filename.py') # append to 'filename.py'
Exception raised:
Traceback (most recent call last):
File "/Users/brown308/anaconda/envs/2.8/lib/python2.7/doctest.py", line 1315, in __run
compileflags, 1) in test.globs
File "<doctest vcs.texttable.Tt.script[2]>", line 1, in <module>
ex.script('filename.py') # Append to a Python script named 'filename.py'
ex.script('filename.py') # append to 'filename.py'
File "/Users/brown308/anaconda/envs/2.8/lib/python2.7/site-packages/vcs/texttable.py", line 558, in script
fp.write("%s.color = %g\n\n" % (unique_name, self.color))
TypeError: float argument required, not tuple
24 changes: 13 additions & 11 deletions docs/doctest_info/markdown/vcshelp.md
Original file line number Diff line number Diff line change
@@ -5,31 +5,33 @@ Failed example:
vcs.help('getboxfill')
Expected nothing
Got:
VCS contains a list of graphics methods. This function will create a
boxfill class object from an existing VCS boxfill graphics method. If
no boxfill name is given, then default boxfill will be used.
VCS contains a list of graphics methods. This function
will create a boxfill object from an existing
VCS boxfill graphics method. If no boxfill name is given,
then default boxfill will be used.
<BLANKLINE>
.. note::
<BLANKLINE>
VCS does not allow the modification of 'default' attribute sets.
However, a 'default' attribute set that has been copied under a
different name can be modified. (See the :py:func:`vcs.manageElements.createboxfill` function.)
different name can be modified.
(See the :py:func:`vcs.manageElements.createboxfill` function.)
<BLANKLINE>
:Example:
<BLANKLINE>
.. doctest:: manageElements_get
<BLANKLINE>
>>> a=vcs.init()
>>> vcs.listelements('boxfill') # Show all the existing boxfill graphics methods
>>> vcs.listelements('boxfill') # list all boxfills
[...]
>>> ex=vcs.getboxfill() # instance of 'default' boxfill graphics method
>>> ex=vcs.getboxfill() # 'default' boxfill
>>> import cdms2 # Need cdms2 to create a slab
>>> f = cdms2.open(vcs.sample_data+'/clt.nc') # use cdms2 to open a data file
>>> slab1 = f('u') # use the data file to create a cdms2 slab
>>> a.boxfill(ex, slab1) # plot using specified boxfill object
>>> f = cdms2.open(vcs.sample_data+'/clt.nc') # get data with cdms2
>>> slab1 = f('u') # take a slab from the data
>>> a.boxfill(ex, slab1) # plot boxfill
<vcs.displayplot.Dp ...>
>>> ex2=vcs.getboxfill('polar') # instance of 'polar' boxfill graphics method
>>> a.boxfill(ex2, slab1) # plot using specified boxfill object
>>> ex2=vcs.getboxfill('polar') # boxfill #2
>>> a.boxfill(ex2, slab1) # plot boxfill
<vcs.displayplot.Dp ...>
<BLANKLINE>
<BLANKLINE>
2 changes: 1 addition & 1 deletion docs/doctest_info/markdown/vector.md
Original file line number Diff line number Diff line change
@@ -2,7 +2,7 @@ vcs.vector.Gv.script
--------------------
```python
Failed example:
ex.script('filename.py') # Append to a Python script named 'filename.py'
ex.script('filename.py') # append to 'filename.py'
Expected nothing
Got:
DEPRECATED: Use linetype or setLineAttributes instead.
Loading