Skip to content

Commit

Permalink
feat: support publish docs to readthedocs (#292)
Browse files Browse the repository at this point in the history
* feat: add readthedocs conf

* chore: update readthedocs conf

* feat: add requirements.txt for docs build

* fix: source conf path

* fix: sys path

* fix: sys path

* fix

* fix

* fix

* fix

* fix

* fix

* feat: publish

* fix: add dep

* feat: add preview CI

* update

* exclude

---------

Co-authored-by: Anqi <[email protected]>
  • Loading branch information
liuxiaocs7 and Nicole00 authored Oct 17, 2023
1 parent cae784f commit f3a42e6
Show file tree
Hide file tree
Showing 9 changed files with 200 additions and 1 deletion.
22 changes: 22 additions & 0 deletions .github/workflows/pull-request-links.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# .github/workflows/pull-request-links.yaml

name: readthedocs/actions
on:
pull_request_target:
types:
- opened
# Execute this action only on PRs that touch
# documentation files.
paths:
- "docs/**"

permissions:
pull-requests: write

jobs:
pull-request-links:
runs-on: ubuntu-latest
steps:
- uses: readthedocs/actions/preview@v1
with:
project-slug: "nebula-python"
19 changes: 19 additions & 0 deletions .readthedocs.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# .readthedocs.yaml
# Read the Docs configuration file
# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details

version: 2

build:
os: ubuntu-22.04
tools:
python: "3.11"

# Build documentation in the "docs/" directory with Sphinx
sphinx:
configuration: docs/source/conf.py

# See https://docs.readthedocs.io/en/stable/guides/reproducible-builds.html
python:
install:
- requirements: docs/requirements.txt
10 changes: 9 additions & 1 deletion docs/build.sh
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,4 +1,12 @@
pip install --user sphinx furo
sphinx-apidoc -o source ../nebula3
sphinx-apidoc -f -o source ../nebula3 \
../nebula3/common/* \
../nebula3/data/* \
../nebula3/fbthrift/* \
../nebula3/graph/* \
../nebula3/mclient/* \
../nebula3/meta/* \
../nebula3/sclient/* \
../nebula3/storage/*
make clean
make html
4 changes: 4 additions & 0 deletions docs/requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
sphinx==7.2.6
furo==2023.9.10
six==1.16.0
pytz==2023.3.post1
23 changes: 23 additions & 0 deletions docs/source/_autosummary/nebula3.gclient.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
nebula3.gclient
===============

.. automodule:: nebula3.gclient



















7 changes: 7 additions & 0 deletions docs/source/modules.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
nebula3
=======

.. toctree::
:maxdepth: 4

nebula3
53 changes: 53 additions & 0 deletions docs/source/nebula3.gclient.net.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
nebula3.gclient.net package
===========================

Submodules
----------

nebula3.gclient.net.AuthResult module
-------------------------------------

.. automodule:: nebula3.gclient.net.AuthResult
:members:
:undoc-members:
:show-inheritance:

nebula3.gclient.net.Connection module
-------------------------------------

.. automodule:: nebula3.gclient.net.Connection
:members:
:undoc-members:
:show-inheritance:

nebula3.gclient.net.ConnectionPool module
-----------------------------------------

.. automodule:: nebula3.gclient.net.ConnectionPool
:members:
:undoc-members:
:show-inheritance:

nebula3.gclient.net.Session module
----------------------------------

.. automodule:: nebula3.gclient.net.Session
:members:
:undoc-members:
:show-inheritance:

nebula3.gclient.net.SessionPool module
--------------------------------------

.. automodule:: nebula3.gclient.net.SessionPool
:members:
:undoc-members:
:show-inheritance:

Module contents
---------------

.. automodule:: nebula3.gclient.net
:members:
:undoc-members:
:show-inheritance:
18 changes: 18 additions & 0 deletions docs/source/nebula3.gclient.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
nebula3.gclient package
=======================

Subpackages
-----------

.. toctree::
:maxdepth: 4

nebula3.gclient.net

Module contents
---------------

.. automodule:: nebula3.gclient
:members:
:undoc-members:
:show-inheritance:
45 changes: 45 additions & 0 deletions docs/source/nebula3.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
nebula3 package
===============

Subpackages
-----------

.. toctree::
:maxdepth: 4

nebula3.gclient

Submodules
----------

nebula3.Config module
---------------------

.. automodule:: nebula3.Config
:members:
:undoc-members:
:show-inheritance:

nebula3.Exception module
------------------------

.. automodule:: nebula3.Exception
:members:
:undoc-members:
:show-inheritance:

nebula3.logger module
---------------------

.. automodule:: nebula3.logger
:members:
:undoc-members:
:show-inheritance:

Module contents
---------------

.. automodule:: nebula3
:members:
:undoc-members:
:show-inheritance:

0 comments on commit f3a42e6

Please sign in to comment.