-
Notifications
You must be signed in to change notification settings - Fork 24
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #166 from Zhaoyilunnn/master
Update document to 0.4.0
- Loading branch information
Showing
22 changed files
with
339 additions
and
129 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -23,5 +23,7 @@ src/site | |
test | ||
thirdparty | ||
wheelhouse | ||
*.zhaoyilun | ||
*.png | ||
|
||
# documents | ||
doc/build | ||
doc/pages |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,15 @@ | ||
# PyQuafu Documentation by Sphinx | ||
|
||
## Install Requirements | ||
|
||
```bash | ||
pip install -r requirements.txt | ||
``` | ||
|
||
## Build | ||
|
||
Currently, this script can only run on Unix system | ||
|
||
```bash | ||
python run.py | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
sphinx==7.3.7 | ||
sphinx-rtd-theme==2.0.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
import json | ||
import os | ||
import subprocess | ||
|
||
|
||
def build_doc(version, tag): | ||
os.environ["current_version"] = version | ||
subprocess.run("git checkout " + tag, shell=True) | ||
subprocess.run("git checkout master -- source/conf.py", shell=True) | ||
subprocess.run("git checkout master -- source/versions.json", shell=True) | ||
subprocess.run("make html", shell=True) | ||
|
||
|
||
def move_dir(src, dst): | ||
subprocess.run(["mkdir", "-p", dst]) | ||
subprocess.run("mv " + src + "* " + dst, shell=True) | ||
|
||
|
||
if __name__ == "__main__": | ||
## First clean dir | ||
subprocess.run("rm -rf build/ pages/", shell=True) | ||
|
||
os.environ["build_all_docs"] = str(True) | ||
os.environ["pages_root"] = "https://scq-cloud.github.io" | ||
|
||
build_doc("latest", "master") | ||
move_dir("./build/html/", "./pages/") | ||
|
||
with open("source/versions.json", "r") as json_file: | ||
docs = json.load(json_file) | ||
|
||
for version in docs: | ||
tag = docs[version]["tag"] | ||
build_doc(version, tag) | ||
move_dir("./build/html/", "./pages/" + version) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
<div class="rst-versions" data-toggle="rst-versions" role="note" aria-label="versions"> | ||
<span class="rst-current-version" data-toggle="rst-current-version"> | ||
Version: {{ current_version }} | ||
<span class="fa fa-caret-down"></span> | ||
</span> | ||
<div class="rst-other-versions"> | ||
{% if versions|length >= 1 %} | ||
<dl> | ||
<dt>{{ _('Versions') }}</dt> | ||
{% for the_version, url in versions %} | ||
<dd><a href="{{ url }}/index.html">{{ the_version }}</a></dd> | ||
{% endfor %} | ||
</dl> | ||
{% endif %} | ||
<br> | ||
</dl> | ||
</div> | ||
</div> |
File renamed without changes.
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.