Skip to content

Commit

Permalink
add MANIFEST.in, update setup.py, update getting_started.md
Browse files Browse the repository at this point in the history
  • Loading branch information
monitor1379 committed Nov 23, 2016
1 parent 407b7b9 commit 51ca41e
Show file tree
Hide file tree
Showing 26 changed files with 566 additions and 41 deletions.
1 change: 1 addition & 0 deletions MANIFEST.in
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
recursive-include sophon *
6 changes: 6 additions & 0 deletions docs/about/contributing/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,12 @@



<li >
<a href="../../user_guide/sophon_style_python_docstrings/">Sophon Style Python Docstrings</a>
</li>



<li >
<a href="../../user_guide/configuration/">Configuration</a>
</li>
Expand Down
6 changes: 6 additions & 0 deletions docs/about/license/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,12 @@



<li >
<a href="../../user_guide/sophon_style_python_docstrings/">Sophon Style Python Docstrings</a>
</li>



<li >
<a href="../../user_guide/configuration/">Configuration</a>
</li>
Expand Down
6 changes: 6 additions & 0 deletions docs/about/release_notes/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,12 @@



<li >
<a href="../../user_guide/sophon_style_python_docstrings/">Sophon Style Python Docstrings</a>
</li>



<li >
<a href="../../user_guide/configuration/">Configuration</a>
</li>
Expand Down
6 changes: 6 additions & 0 deletions docs/api/sophon/API/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,12 @@



<li >
<a href="../../../user_guide/sophon_style_python_docstrings/">Sophon Style Python Docstrings</a>
</li>



<li >
<a href="../../../user_guide/configuration/">Configuration</a>
</li>
Expand Down
10 changes: 8 additions & 2 deletions docs/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,12 @@



<li >
<a href="user_guide/sophon_style_python_docstrings/">Sophon Style Python Docstrings</a>
</li>



<li >
<a href="user_guide/configuration/">Configuration</a>
</li>
Expand Down Expand Up @@ -170,7 +176,7 @@ <h2 id="what-is-sophon">What is Sophon?</h2>
</code></pre>

<p>reStructuredText is great, but docstring written in reST creates visually dense, and hard to read.
Compare the jumble above to the same thing rewritten according to the [Sophon Style Guide][TODO]:</p>
Compare the jumble above to the same thing rewritten according to the <a href="./user_guide/sophon_style_python_docstrings">Sophon Style Python Docstring</a>:</p>
<pre><code>def dump(obj, filename, encrypy=False):
&quot;&quot;&quot;Dump a object into file.

Expand Down Expand Up @@ -216,7 +222,7 @@ <h2 id="what-is-sophon">What is Sophon?</h2>
just like <strong>Epydoc</strong> (supports reStructuredText, Javadoc, plaintext)
and <strong>Napoleon</strong> (Sphinx extension that enables Sphinx to parse both NumPy and Google
style docstrings to reStructuredText).</p>
<p>Sophon is written by <a href="http://www.monitor1379.com">Zhenpeng Deng(monitor1379)</a> and licensed under the MIT license.</p>
<p>Sophon is written by <a href="https://github.com/monitor1379">Zhenpeng Deng(monitor1379)</a> and licensed under the MIT license.</p>
<h2 id="why-sophon">Why Sophon?</h2>
<p>Features:</p>
<ul>
Expand Down
24 changes: 17 additions & 7 deletions docs/mkdocs/search_index.json

Large diffs are not rendered by default.

20 changes: 13 additions & 7 deletions docs/sitemap.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

<url>
<loc>None/</loc>
<lastmod>2016-11-23</lastmod>
<lastmod>2016-11-24</lastmod>
<changefreq>daily</changefreq>
</url>

Expand All @@ -13,13 +13,19 @@

<url>
<loc>None/user_guide/getting_started/</loc>
<lastmod>2016-11-23</lastmod>
<lastmod>2016-11-24</lastmod>
<changefreq>daily</changefreq>
</url>

<url>
<loc>None/user_guide/sophon_style_python_docstrings/</loc>
<lastmod>2016-11-24</lastmod>
<changefreq>daily</changefreq>
</url>

<url>
<loc>None/user_guide/configuration/</loc>
<lastmod>2016-11-23</lastmod>
<lastmod>2016-11-24</lastmod>
<changefreq>daily</changefreq>
</url>

Expand All @@ -29,19 +35,19 @@

<url>
<loc>None/about/release_notes/</loc>
<lastmod>2016-11-23</lastmod>
<lastmod>2016-11-24</lastmod>
<changefreq>daily</changefreq>
</url>

<url>
<loc>None/about/contributing/</loc>
<lastmod>2016-11-23</lastmod>
<lastmod>2016-11-24</lastmod>
<changefreq>daily</changefreq>
</url>

<url>
<loc>None/about/license/</loc>
<lastmod>2016-11-23</lastmod>
<lastmod>2016-11-24</lastmod>
<changefreq>daily</changefreq>
</url>

Expand All @@ -50,7 +56,7 @@

<url>
<loc>None/api/sophon/API/</loc>
<lastmod>2016-11-23</lastmod>
<lastmod>2016-11-24</lastmod>
<changefreq>daily</changefreq>
</url>

Expand Down
2 changes: 1 addition & 1 deletion docs/sophon_build.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import sophon

def run():
sophon.build.build_from_yaml('sophon.yml')
sophon.cmd.build.build_from_yaml('sophon.yml')


if __name__ == '__main__':
Expand Down
8 changes: 7 additions & 1 deletion docs/user_guide/configuration/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,12 @@



<li >
<a href="../sophon_style_python_docstrings/">Sophon Style Python Docstrings</a>
</li>



<li class="active">
<a href="./">Configuration</a>
</li>
Expand Down Expand Up @@ -119,7 +125,7 @@
</a>
</li>
<li >
<a rel="next" href="../getting_started/">
<a rel="next" href="../sophon_style_python_docstrings/">
<i class="fa fa-arrow-left"></i> Previous
</a>
</li>
Expand Down
82 changes: 79 additions & 3 deletions docs/user_guide/getting_started/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,12 @@



<li >
<a href="../sophon_style_python_docstrings/">Sophon Style Python Docstrings</a>
</li>



<li >
<a href="../configuration/">Configuration</a>
</li>
Expand Down Expand Up @@ -124,7 +130,7 @@
</a>
</li>
<li >
<a rel="prev" href="../configuration/">
<a rel="prev" href="../sophon_style_python_docstrings/">
Next <i class="fa fa-arrow-right"></i>
</a>
</li>
Expand All @@ -141,7 +147,7 @@
<li class="main active"><a href="#installation">Installation</a></li>


<li class="main "><a href="#usage">Usage</a></li>
<li class="main "><a href="#create-your-first-api-documentation">Create your first API documentation</a></li>


<li class="main "><a href="#todo">TODO</a></li>
Expand All @@ -152,7 +158,77 @@
<div class="col-md-9" role="main">

<h1 id="installation">Installation</h1>
<h1 id="usage">Usage</h1>
<p>Download Sophon from GitHub:</p>
<pre><code class="bash">$ git clone git@github.com:monitor1379/sophon.git
</code></pre>

<p>Install Sophon using <code>pip</code>:</p>
<pre><code class="bash">$ cd sophon
$ pip install .
</code></pre>

<h1 id="create-your-first-api-documentation">Create your first API documentation</h1>
<p>Now let's create your first API documentation. </p>
<p>Assuming the path of your Python module is <code>/home/batsy/mycode.py</code>,
and the code is:</p>
<pre><code># encoding: utf-8


class Person(object):
&quot;&quot;&quot;This is a class of Person.

# Arguments
name: `str`. The name of the Person instance.
age: `int`. Defaults to 18. The age of the Person instance.

# Attributes
name: `str`. The name of the Person instance.
age: `int`. Defaults to 18. The age of the Person instance.
sex: `str`. Defaults to 'male'. The sex of the Person instance.

# Note
This is Note.

# Examples
You could create a Person instance in this way:
```python
batman = Person('Bruce Wayne')
elder = Person('you-know-who`, 99)
```
&quot;&quot;&quot;

def __init__(self, name, age=18):
self.name = name
self.age = age
self.sex = 'male'

def speak(self, message):
&quot;&quot;&quot;Speak something.

# Argument:
message: `str`. Something to speak.

# Return:
`None`.
&quot;&quot;&quot;
print('[{}]: {}'.format(self.name, message))


def show_info(person):
&quot;&quot;&quot;Show the personal information of the given person.

# Argument
person: `Person`. The person.
&quot;&quot;&quot;
print('name:{}, age:{}'.format(person.name, person.age))


if __name__ == '__main__':
p = Person('monitor1379')
p.speak('Are you OK?')
show_info(p)
</code></pre>

<p>Example Sophon Style Python Docstrings</p>
<h1 id="todo">TODO</h1>
<p>ref:</p>
Expand Down

0 comments on commit 51ca41e

Please sign in to comment.