Comments (15)
@gold2718 suggested:
"Sphinx (http://www.sphinx-doc.org/en/stable/) uses reStructuredText
(rst) and github understands (can render) this format. It also produces
HTML, PDF (rst => LaTeX => PDF), ePub and other formats.
It's free, stable, and installable from python (it started as a python
documentation project)."
from cime.
More on Sphinx and ReST:
ReST is a markup language. Some sites I use to learn/use the language are:
https://wiki.typo3.org/ReST_Syntax
https://github.com/kiith-sa/RestructuredText-tutorial
http://thomas-cokelaer.info/tutorials/sphinx/rest_syntax.html
Sphinx is a tool for rendering many formats from ReST documents. On my mac, I simply did:
sudo port install py27-sphinx
This gives you (among other things) a command called sphinx-quickstart. This handy tool sets up a directory structure, template document, and a makefile.
You can then create different formats with commands like:
make latexpdf
make html
make singlehtml
and many others. I don't think github pages does all that. In addition, ReST is a commonly used standard apart from github (e.g., all the Python documentation).
I'm working on a tool to do most of a translation of our current docbook documentation into ReST ('most of' means some hand editing will still be desired).
from cime.
Does this workflow mean you could not edit the wiki through the web interface and have the source ReST documents updated? We would have to stick to the one-way: edit source -> push -> render in wiki.
edit in wiki -> pull to get changes would not work?
from cime.
No, a github-development workflow works fine.
The point of ReST and Sphinx and the makefile (over, e.g., markdown), is that while we can easily edit and view documents on github, we can, with very little extra effort, also publish single and multi-page HTML as well as PDF versions of our documents.
To have both, set up a documentation source directory with sphinx-quickstart. Then, the source documents can be edited with any tool, including github. Sphinx only needs to be used when producing other formats (e.g., PDF). I have tested this combined workflow, it is really easy.
from cime.
I see, and according to this we can mix markdown languages, you just have to get the file extension correct: https://help.github.com/articles/adding-and-editing-wiki-pages-locally/
from cime.
One more thing: how do we include figures? Adding binary files to git is usually a bad idea.
from cime.
Small binary files are not a problem, especially if they don't change often. Including a few jpegs (.JPG) should not affect things too much (and github renders those as well as PNG, GIF, PSD, and SVG formats). Github doesn't seem to mind images, they even provide tools for comparing image diffs.
https://help.github.com/articles/rendering-and-diffing-images/
I think the rule of thumb for documentation figures should be that they should be uploaded when they are finished or close-to-finished. Larger image files (MB size) should be handled more carefully in terms of uploading more than one version.
from cime.
I propose we go with Sphinx and mark this as done. Thoughts?
from cime.
Fine with me.
from cime.
You can check out the cime wiki with:
git clone [email protected]:ESMCI/cime.wiki.git
I propose we then add our Sphinx-markdown-written documentation to that repo. There are examples of how github wikis are organized:
https://github.com/showcases/projects-with-great-wikis
And you can clone those to see how they did it.
One limitation of the github wiki is all the filenames have to be unique even if they're separated by subdirectories.
from cime.
This wiki shows how to use multiple directories.
git clone https://github.com/snowplow/snowplow.wiki.git
from cime.
Forget the wiki. Sphinx and github pages might be the way to go:
https://daler.github.io/sphinxdoc-test/includeme.html
http://datadesk.latimes.com/posts/2012/01/sphinx-on-github/
http://raxcloud.blogspot.com/2013/02/documenting-python-code-using-sphinx.html
from cime.
I'm following directions from github (https://help.github.com/articles/creating-project-pages-manually/)
After creating the orphan branch per the link above, I Created the Sphinx setup with:
sphinx-quickstart CIME-Users-Guide --sep y --dot _ --project "CIME User's Guide" --author 'Rob Jacob' -v 1.0.0 --release 1.0.0 --language en --suffix .rst --master CIME-Users-Guide --epub n --ext-autodoc y --ext-doctest n --ext-intersphinx n --ext-todo n --ext-coverage n --ext-pngmath n --ext-mathjax n --ext-ifconfig n --ext-viewcode n --makefile y --no-batchfile y
I committed the files and pushed the gh-pages branch back to ESMCI but I can't get things working smoothly. The pages site is: http://esmci.github.io/cime/
from cime.
I'm not a fan of the github pages approach. Since github pages only displays HTML, someone has to do a publish step (clone, run sphinx, push) for that site to get updated. At least with the wiki, the documentation is real time. The extra step is to develop a publish script that will turn the wiki repo into other formats (e.g., HTML, PDF). We could still maintain a github pages repo (separate from CIME) if we want to use that site for our published docs.
from cime.
I think there is a relatively stable -- if not trivial -- workflow for documentation. Wiki pages can be edited either directly on github or via a cloned repo. I have added some tips for working with the wiki.
I have a proof-of-concept github pages document at http://esmci.github.io/cime/ The process of updating this page from a clone of the wiki repo can easily be scripted but I would like for us to get some real documentation produced before I put much time into it. One nice feature of this approach is that the github.io page can be tagged as the cime gh-pages branch (to match CIME releases) even if we decide to include documentation for multiple versions on that site.
from cime.
Related Issues (20)
- create_test --srcroot problem HOT 5
- Upgrade pFUnit support to version 4
- github workflow e3sm tests failing HOT 5
- CIME does not always download all the necessary input files for test cases that modify case2 HOT 6
- Proposal to auto close old issues HOT 13
- feature request - manually change test status HOT 2
- Enable writing of coupler auxiliary history files for 6 hour forecasts HOT 7
- Doc workflow running unexpectedly
- confusing cprnc output HOT 13
- bug in customize_module_spec HOT 22
- cprnc should flag if fields are identically 0 HOT 1
- Documentation needs to be rebuilt HOT 11
- How to use case env variables during shell_commands testmods? HOT 7
- Fix for `get_all_hist_files` breaks some tests HOT 4
- Appending Arguments to `BATCH_COMMAND_FLAGS` Overwrites Existing PBS Batch Arguments in CESM Scripts HOT 3
- Lengthen time for stale-bot to 3-months and don't trigger it if "Low Priority" label is set HOT 6
- Fix name of testlist for SLIM
- CIME error in wave watch archiving HOT 12
- Error message could be in simpler English for incorrect syntax in test names HOT 2
- Need a complete set of files to test st_archive HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cime.