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

More documentation #114

wants to merge 46 commits into from

Conversation

ghost
Copy link

@ghost ghost commented Jan 5, 2017

There's a lot in this one!

  • After struggling with doctesting through Sphinx, I made my own scripts for doctesting
  • Added lots of :Example: sections/doctests
  • Fixed a lot of failing doctests
    • Utils passing all tests, and only missing a handful of doctests
    • Canvas passing all doctests except those where VCS needs patches, missing few relevant doctests
    • queries passing all doctests, missing no doctests at all.
  • Used xmldocs to remove some more repetition. Fully documented the functions/data structures I used to populate docstrings for queries/manageElements/other functions
  • Formatted many :Examples: to be under 80 lines so they show up better in pdf
  • Added a VCS functions Index to the sphinx build to make the PDF more user-friendly
  • Added a script that builds the VCS functions index so we don't have to
  • Probably lots of other stuff

embrown and others added 30 commits September 21, 2016 08:53
Re-wrote to change ._name and pop old name from elements
if not 'default'. Preserves original objects.
Fixing doctest errors where applicable.
General documentation formatting fixes.
Ran doctests and updated logs.
Removed some modules from run_all_doctests.sh .
Fixed xmldocs so it doesn't try to plot projections/templates.
Started dv3d descriptions.
Minor fixes in Canvas, colormap, and xmldocs.
Make html now reports (almost) no errors.
Re-ran doctests/logging.
Added more template documentation.
Working on documentation in various stages for other files.
embrown added 10 commits December 27, 2016 16:38
Re-ran doctests and re-reported.
parsing report output with doctest.py.
Regular expressions can be added via commandline or ignore file.
This will allow us to ignore 'missing' doctests for functions that
don't need documentation, or for aspects of a module/class which
are not functions that errantly get picked up by doctest.testmod.
Added docs/API/build_func_index.py to automatically check a list
of modules/classes, get their non-private functions, and write
the RST for linking to those functions in the documentation out
to API/functions/$MODULE_NAME to create the functions index.
Not all functions written out to the /rst files have been
documented.
what's in them and how to use it.
Added an ignore directory to store files for using doctest_vcs.py's --ifile
option.
in pdf. Re-ran doctest_vcs.py to check functionality after some
minor edits.
@ghost ghost requested review from chaosphere2112 and doutriaux1 January 5, 2017 21:45
@ghost ghost added this to the VCS documentation milestone Jan 5, 2017
Copy link
Contributor

@chaosphere2112 chaosphere2112 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please remove all of the automatically generated stuff, and integrate the doctests with the test suite (and upload their output to cdash).

Fixes some links.
Adds documentation for dv3d (from documentation site).
changes some xmldocs strings to use .format().
ghost pushed a commit to CDAT/cdat that referenced this pull request Jan 11, 2017
Currently only queries test is implemented.
Once CDAT/vcs#114 is merged, this test
will pass. Tests for other modules/classes will be very similar.

Already did some setup for running with vcs.Canvas. A few of the
steps in this script aren't necessary for queries, but will be
needed for others (the cleanup step is mainly for Canvas and
manageElements).

If docstring contains '.. pragma: skip-doctest', the doctest
for that docstring will not be run.
If docstring is empty and not private, and has not been skipped,
it will be printed in a "NO DOCUMENTATION" list after the tests
so we can view it on cdash, but it will not cause a failure.
@@ -0,0 +1,307 @@
Canvas
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@embrown is htis automatically generated or did you have to manually create this one?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@aashish24 I have a script in docs/API that builds this out. It checks all of VCS's modules using the inspect library, and prints out an RST-formatted link to the appropriate file (https://github.com/embrown/vcs/blob/more_more_documentation/docs/API/build_func_index.py).

@chaosphere2112
Copy link
Contributor

@doutriaux1 @embrown I'm migrating this over to a new pull request. I added one more commit, and I think we're good to go. Since @doutriaux1 is migrating the testsuite in #127, we can skip the matching UV-CDAT PR CDAT/cdat#2151 and just integrate it once we've moved over to a full unittest based suite (which doctest has built-in support for).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants