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

[doc] [workflow] Update hello and matrix section of the docs and add a workflow to check doc builds #1157

Merged
merged 24 commits into from
Jun 10, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
e2adbe2
[skip ci] Update docs.
rexwangcc Jun 6, 2020
2c033e6
How do I know if the docs still build?
rexwangcc Jun 6, 2020
977bd7c
[skip ci] Update the action.
rexwangcc Jun 6, 2020
fe4ab81
Fix the format.
rexwangcc Jun 6, 2020
a515d5e
[skip ci] needs sphinx_rtd_theme?
rexwangcc Jun 6, 2020
ae64ee4
[skip ci] Remove the external dependency.
rexwangcc Jun 6, 2020
1760bba
[skip ci] Fix again.
rexwangcc Jun 6, 2020
7980268
Test updates to other dirs won't trigger docs build action.
rexwangcc Jun 6, 2020
5d13163
[skip ci] Revert the changes to docs for testing.
rexwangcc Jun 6, 2020
5b77f86
[skip ci] Test updates to other dirs won't trigger docs build action.
rexwangcc Jun 6, 2020
8f5f4ea
[skip ci] Revert the change for testing.
rexwangcc Jun 6, 2020
9cee5be
[skip ci] Bring back the updates to docs.
rexwangcc Jun 6, 2020
acceb9a
Fix a typo in workflow name.
rexwangcc Jun 6, 2020
73d39db
[skip ci] English.
rexwangcc Jun 6, 2020
a55cc36
[skip ci] Revert the hello to avoid confusion.
rexwangcc Jun 6, 2020
65616dc
[skip ci] Rename utilities to dev_ and add a new utilities section to…
rexwangcc Jun 6, 2020
f024907
[skip ci] Lint and format.
rexwangcc Jun 6, 2020
c5b94aa
[skip ci] Update docs/matrix.rst
rexwangcc Jun 7, 2020
d6d70f1
[skip ci] Update docs/index.rst
rexwangcc Jun 7, 2020
7651338
[skip ci] Update docs/index.rst
rexwangcc Jun 7, 2020
3dd3f80
[skip ci] Update docs/utilities.rst
rexwangcc Jun 7, 2020
d8e1894
[skip ci] Update docs/utilities.rst
rexwangcc Jun 7, 2020
f3a189a
Revert the names of utilities docs to avoid destruction to zh-cn docs…
rexwangcc Jun 7, 2020
e450fd0
Merge branch 'master' into minor-updates-to-docs
rexwangcc Jun 7, 2020
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
22 changes: 22 additions & 0 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: Documentation Build Check
on:
pull_request:
types: [opened, synchronize, reopened]
paths:
- "docs/**"

jobs:
check_docs_build:
name: Check Docs Build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
with:
python-version: 3.7
- name: Install dependencies
run: |
pip install sphinx sphinx_rtd_theme
- name: Try to build docs
run: |
cd docs && sphinx-build -b html . build
19 changes: 19 additions & 0 deletions docs/cli_utilities.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
Command line utilities
======================

A successful installation of Taichi should add a CLI (Command-Line Interface) to your system,
which is helpful to perform several rountine tasks quickly. To invoke the CLI, please
run ``ti`` or ``python3 -m taichi``.

Examples
--------
Taichi provides a set of bundled examples. You could run ``ti example -h`` to print the help
message and get a list of available example names. For instance, to run the basic `fractal`
example, try: ``ti example fractal`` from your shell. (``ti example fractal.py`` should also
work)


Changelog
---------
Sometimes it's convenient to view the changelog of the current version of Taichi, to do so from
your shell, you could run ``ti changelog``.
2 changes: 1 addition & 1 deletion docs/dev_install.rst
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ Prebuilt LLVM for Windows CI

cmake .. -G"Visual Studio 15 2017 Win64" -DLLVM_ENABLE_RTTI:BOOL=ON -DBUILD_SHARED_LIBS:BOOL=OFF -DCMAKE_BUILD_TYPE=Release -DLLVM_TARGETS_TO_BUILD="X86;NVPTX" -DLLVM_ENABLE_ASSERTIONS=ON -Thost=x64 -DLLVM_BUILD_TESTS:BOOL=OFF -DCMAKE_INSTALL_PREFIX=installed

Then use Visual Studio to build. After building the ``INSTALL`` project (under folder "CMakePredefinedTargets"). After build completes, find your LLVM binaries/headers in `build/include`.
Then use Visual Studio (Build Tools) to build, after which build the ``INSTALL`` project (under folder "CMakePredefinedTargets"). Once the build completes, find your LLVM binaries/headers in `build/include`.

Troubleshooting
---------------
Expand Down
2 changes: 1 addition & 1 deletion docs/hello.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ Hello, world!

We introduce the Taichi programming language through a very basic `fractal` example.

Running the Taichi code below (``python3 fractal.py``) will give you an animation of
Running the Taichi code below (``python3 fractal.py`` or ``ti example fractal``) will give you an animation of
`Julia set <https://en.wikipedia.org/wiki/Julia_set>`_:

.. image:: https://github.com/yuanming-hu/public_files/raw/master/graphics/taichi/fractal.gif
Expand Down
1 change: 1 addition & 0 deletions docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ The Taichi Programming Language
:maxdepth: 3

gui
cli_utilities
export_results
global_settings
faq
Expand Down
1 change: 1 addition & 0 deletions docs/matrix.rst
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ Matrices
- ``U, sigma, V = ti.svd(A, ti.f32)`` (Note that ``sigma`` is a ``3x3`` diagonal matrix)
- ``any(A)``
- ``all(A)``
- Currently, only ``+, -, @`` Matrix operations have experimental support in Python-scope. An exception will be raised if you try to apply other operations in Python-scope, use them in Taichi-scope (`@ti.kernel`) instead.

TODO: doc here better like Vector. WIP

Expand Down
2 changes: 1 addition & 1 deletion misc/minimal_timed.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@ def p():
p()

print(f'{time.time() - t:.3f} s')
ti.core.print_profile_info()
ti.core.print_profile_info()