diff --git a/docs/_templates/layout.html b/docs/_templates/layout.html new file mode 100644 index 000000000000..8e020eb7a07e --- /dev/null +++ b/docs/_templates/layout.html @@ -0,0 +1,58 @@ +{%- extends "!layout.html" %} + +{# + +This template exists as a way to implement a language menu just as what +"Read The Docs" does. + +#} + +{% block navigation %} + +{% endblock %} + +{% block footer %} + {{ footer }} + +
+ + Read the Docs + v: latest + + +
+
+
{{ _('Languages') }}
+
en
+
zh_CN
+
+
+
+{% endblock %} diff --git a/docs/conf.py b/docs/conf.py index 098f132c9788..bba763f55eb5 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -36,6 +36,7 @@ 'sphinx.ext.napoleon', 'sphinx.ext.viewcode', 'sphinx.ext.autosectionlabel', + 'sphinx_ext', ] breathe_projects = { diff --git a/docs/index.rst b/docs/index.rst index 323d0c367173..2c4000e6c938 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -42,3 +42,8 @@ Indices and tables * :ref:`genindex` * :ref:`modindex` * :ref:`search` + +.. toctree:: + :hidden: + + zh/index.rst diff --git a/docs/sphinx_ext.py b/docs/sphinx_ext.py new file mode 100644 index 000000000000..14af7ac5cbb2 --- /dev/null +++ b/docs/sphinx_ext.py @@ -0,0 +1,67 @@ +#!/usr/bin/env python3 +# -*- coding: utf-8 -*- +# +# Copyright 2020 Alibaba Group Holding Limited. All Rights Reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +import sphinx +from sphinx import addnodes +from sphinx.builders.html import StandaloneHTMLBuilder +from sphinx.environment.adapters.toctree import TocTree + +class TocTreeExt(TocTree): + def get_local_toctree_for(self, docname, builder, collapse, **kwargs): + ''' Like `get_local_toctree` in `TocTree`, but don't generate + toctree for master_doc, rather, generate toctree for the + given doc. + ''' + """Return the global TOC nodetree.""" + doctree = self.env.get_doctree(docname) + toctrees = [] # type: List[Element] + if 'includehidden' not in kwargs: + kwargs['includehidden'] = True + if 'maxdepth' not in kwargs: + kwargs['maxdepth'] = 0 + kwargs['collapse'] = collapse + for toctreenode in doctree.traverse(addnodes.toctree): + toctree = self.resolve(docname, builder, toctreenode, prune=True, **kwargs) + if toctree: + toctrees.append(toctree) + if not toctrees: + return None + result = toctrees[0] + for toctree in toctrees[1:]: + result.extend(toctree.children) + return result + +class StandaloneHTMLBuilderExt(StandaloneHTMLBuilder): + ''' Extend the standard `StandaloneHTMLBuilder` with a `toctree_for` derivate in + context to creating toctrees for zh_CN documentations. + ''' + def _get_local_toctree_ext(self, docname, collapse, **kwargs): + if 'includehidden' not in kwargs: + kwargs['includehidden'] = False + if kwargs.get('maxdepth') == '': + kwargs.pop('maxdepth') + return self.render_partial(TocTreeExt(self.env).get_local_toctree_for( + docname, self, collapse, **kwargs))['fragment'] + + def handle_page(self, *args, **kwargs): + self.globalcontext['toctree_for'] = lambda pagename, **kwargs: self._get_local_toctree_ext(pagename, **kwargs) + return super(StandaloneHTMLBuilderExt, self).handle_page(*args, **kwargs) + +def setup(app): + app.add_builder(StandaloneHTMLBuilderExt, override=True) + return {'version': sphinx.__display_version__, 'parallel_read_safe': True} diff --git a/docs/zh/analytics_engine.rst b/docs/zh/analytics_engine.rst new file mode 100644 index 000000000000..27d0d37d6c30 --- /dev/null +++ b/docs/zh/analytics_engine.rst @@ -0,0 +1,2 @@ +GraphScope Analytical Engine +============================ diff --git a/docs/zh/deployment.rst b/docs/zh/deployment.rst new file mode 100644 index 000000000000..5c8d26ba208b --- /dev/null +++ b/docs/zh/deployment.rst @@ -0,0 +1,2 @@ +部署 +==== diff --git a/docs/zh/developer_guide.rst b/docs/zh/developer_guide.rst new file mode 100644 index 000000000000..f2bd519eb64e --- /dev/null +++ b/docs/zh/developer_guide.rst @@ -0,0 +1,2 @@ +开发者指南 +========== diff --git a/docs/zh/getting_started.rst b/docs/zh/getting_started.rst new file mode 100644 index 000000000000..d5d898a32744 --- /dev/null +++ b/docs/zh/getting_started.rst @@ -0,0 +1,2 @@ +快速上手 +======== diff --git a/docs/zh/index.rst b/docs/zh/index.rst new file mode 100644 index 000000000000..9241bbe77760 --- /dev/null +++ b/docs/zh/index.rst @@ -0,0 +1,48 @@ +.. graphscope documentation master file, created by + sphinx-quickstart on Tue Aug 27 10:19:05 2019. + You can adapt this file completely to your liking, but it should at least + contain the root `toctree` directive. + +GraphScope: 一站式图计算系统 +========================= + +GraphScope 是阿里巴巴达摩院智能计算实验室研发并开源的一站式图计算平台。 +依托于阿里海量数据和丰富场景,与达摩院的高水平研究,GraphScope致力于针对 +实际生产中图计算的上述挑战,提供一站式高效的解决方案。 + +GraphScope 提供Python客户端,能十分方便的对接上下游工作流,具有一站式、 +开发便捷、性能极致等特点。它具有高效的跨引擎内存管理,在业界首次支持Gremlin +分布式编译优化,同时支持算法的自动并行化和支持自动增量化处理动态图更新, +提供了企业级场景的极致性能。在阿里巴巴内部和外部的应用中,GraphScope已经 +证明在多个关键互联网领域(如风控,电商推荐,广告,网络安全,知识图谱等) +实现重要的业务新价值。 + +GraphScope集合了达摩院的多项学术研究成果,其中的核心技术曾获得数据库领域 +顶级学术会议 SIGMOD2017 最佳论文奖、VLDB2017 最佳演示奖、VLDB2020 +最佳论文提名奖、世界人工智能创新大赛SAIL奖。GraphScope的交互查询引擎的 +论文也已被 NSDI 2021录用,即将发表。还有其它围绕 GraphScope 的十多项 +研究成果发表在领域顶级的学术会议或期刊上,如TODS、SIGMOD、VLDB、KDD等。 + +.. toctree:: + :maxdepth: 2 + :caption: Contents + + installation + getting_started + deployment + loading_graph + interactive_engine + analytics_engine + learning_engine + developer_guide + +.. toctree:: + :maxdepth: 2 + :caption: Reference + +索引 +==== + +* :ref:`genindex` +* :ref:`modindex` +* :ref:`search` diff --git a/docs/zh/installation.rst b/docs/zh/installation.rst new file mode 100644 index 000000000000..8cb6ae979f2f --- /dev/null +++ b/docs/zh/installation.rst @@ -0,0 +1,2 @@ +安装 +==== diff --git a/docs/zh/interactive_engine.rst b/docs/zh/interactive_engine.rst new file mode 100644 index 000000000000..5c8a9400075d --- /dev/null +++ b/docs/zh/interactive_engine.rst @@ -0,0 +1,2 @@ +GraphScope Interactive Engine +============================ diff --git a/docs/zh/learning_engine.rst b/docs/zh/learning_engine.rst new file mode 100644 index 000000000000..895c7b55b67f --- /dev/null +++ b/docs/zh/learning_engine.rst @@ -0,0 +1,2 @@ +GraphScope Learning Engine +========================== diff --git a/docs/zh/loading_graph.rst b/docs/zh/loading_graph.rst new file mode 100644 index 000000000000..cdbb6516be94 --- /dev/null +++ b/docs/zh/loading_graph.rst @@ -0,0 +1,4 @@ +.. _loading_graphs: + +载图 +====