Skip to content

Commit

Permalink
Doc/auto build and issue template (#37)
Browse files Browse the repository at this point in the history
* + update version information of pypi and docker image
+ refine the issue templates

* + update version information of pypi and docker image
+ refine the issue templates

* + update version information of pypi and docker image
+ refine the issue templates

* - modify some descriptions

* Create deploy_spinx_docs.yml

* * fix the checkout step

* * fix the checkout step

* * fix wrong doc source path

* * install data-juicer before building docs

* * auto update rst
* build more beautiful docs

* * fix installation

* * fix installation

* - remove rst generation

* * refine docs

* * refine docs

* * refine docs

* * refine docs
  • Loading branch information
HYLcool authored Oct 16, 2023
1 parent 4f88131 commit 95b292b
Show file tree
Hide file tree
Showing 18 changed files with 282 additions and 265 deletions.
8 changes: 6 additions & 2 deletions .github/workflows/deploy_spinx_docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,19 @@ jobs:
runs-on: ubuntu-20.04
steps:
- name: Checkout
uses: actions/checkout@4
uses: actions/checkout@v4
- name: Setup Python ${{ matrix.python-version }}
uses: actions/setup-python@master
with:
python_version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -v -e .[dev]
- id: deployment
uses: sphinx-notes/pages@v3
with:
documentation_path: ./docs/spinx_doc/source
documentation_path: ./docs/sphinx_doc/source
python_version: ${{ matrix.python-version }}
publish: false
requirements_path: ./environments/dev_requires.txt
Expand Down
9 changes: 9 additions & 0 deletions docs/sphinx_doc/_templates/module.rst_t
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{%- if show_headings %}
{{- [basename, "module"] | join(' ') | e | heading }}

{% endif -%}
.. automodule:: {{ qualname }}
{%- for option in automodule_options %}
:{{ option }}:
{%- endfor %}

45 changes: 45 additions & 0 deletions docs/sphinx_doc/_templates/package.rst_t
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
{%- macro automodule(modname, options) -%}
.. automodule:: {{ modname }}
{%- for option in options %}
:{{ option }}:
{%- endfor %}
{%- endmacro %}

{%- macro toctree(docnames) -%}
.. toctree::
:maxdepth: {{ maxdepth }}
{% for docname in docnames %}
{{ docname }}
{%- endfor %}
{%- endmacro %}

{%- if is_namespace %}
{{- [pkgname, "namespace"] | join(" ") | e | heading }}
{% else %}
{{- pkgname | e | heading }}
{% endif %}

{%- if is_namespace %}
.. py:module:: {{ pkgname }}
{% endif %}

{%- if modulefirst and not is_namespace %}
{{ automodule(pkgname, automodule_options) }}
{% endif %}

{%- if subpackages %}
{{ toctree(subpackages) }}
{% endif %}

{%- if submodules %}
{% if separatemodules %}
{{ toctree(submodules) }}
{% else %}
{%- for submodule in submodules %}
{% if show_headings %}
{{- submodule | e | heading(2) }}
{% endif %}
{{ automodule(submodule, automodule_options) }}
{% endfor %}
{%- endif %}
{%- endif %}
8 changes: 8 additions & 0 deletions docs/sphinx_doc/_templates/toc.rst_t
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{{ header | heading }}

.. toctree::
:maxdepth: {{ maxdepth }}
{% for docname in docnames %}
{{ docname }}
{%- endfor %}

8 changes: 8 additions & 0 deletions docs/sphinx_doc/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,3 +40,11 @@
# relative to this directory. They are copied after the builtin static files,
# so a file named "default.css" will overwrite the builtin "default.css".
html_static_path = ['_static']

def skip(app, what, name, obj, would_skip, options):
if name == "__init__":
return False
return would_skip

def setup(app):
app.connect("autodoc-skip-member", skip)
26 changes: 8 additions & 18 deletions docs/sphinx_doc/source/data_juicer.analysis.rst
Original file line number Diff line number Diff line change
@@ -1,37 +1,27 @@
data\_juicer.analysis package
=============================
data\_juicer.analysis
=====================

Submodules
----------

data\_juicer.analysis.column\_wise\_analysis module
---------------------------------------------------
data\_juicer.analysis.column\_wise\_analysis
--------------------------------------------

.. automodule:: data_juicer.analysis.column_wise_analysis
:members:
:undoc-members:
:show-inheritance:

data\_juicer.analysis.diversity\_analysis module
------------------------------------------------
data\_juicer.analysis.diversity\_analysis
-----------------------------------------

.. automodule:: data_juicer.analysis.diversity_analysis
:members:
:undoc-members:
:show-inheritance:

data\_juicer.analysis.overall\_analysis module
----------------------------------------------
data\_juicer.analysis.overall\_analysis
---------------------------------------

.. automodule:: data_juicer.analysis.overall_analysis
:members:
:undoc-members:
:show-inheritance:

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

.. automodule:: data_juicer.analysis
:members:
:undoc-members:
:show-inheritance:
18 changes: 4 additions & 14 deletions docs/sphinx_doc/source/data_juicer.config.rst
Original file line number Diff line number Diff line change
@@ -1,21 +1,11 @@
data\_juicer.config package
===========================
data\_juicer.config
===================

Submodules
----------

data\_juicer.config.config module
---------------------------------
data\_juicer.config.config
--------------------------

.. automodule:: data_juicer.config.config
:members:
:undoc-members:
:show-inheritance:

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

.. automodule:: data_juicer.config
:members:
:undoc-members:
:show-inheritance:
32 changes: 15 additions & 17 deletions docs/sphinx_doc/source/data_juicer.core.rst
Original file line number Diff line number Diff line change
@@ -1,53 +1,51 @@
data\_juicer.core package
=========================
data\_juicer.core
=================

Submodules
----------

data\_juicer.core.analyser module
---------------------------------
data\_juicer.core.analyser
--------------------------

.. automodule:: data_juicer.core.analyser
:members:
:undoc-members:
:show-inheritance:

data\_juicer.core.data module
-----------------------------
data\_juicer.core.data
----------------------

.. automodule:: data_juicer.core.data
:members:
:undoc-members:
:show-inheritance:

data\_juicer.core.executor module
---------------------------------
data\_juicer.core.executor
--------------------------

.. automodule:: data_juicer.core.executor
:members:
:undoc-members:
:show-inheritance:

data\_juicer.core.exporter module
---------------------------------
data\_juicer.core.exporter
--------------------------

.. automodule:: data_juicer.core.exporter
:members:
:undoc-members:
:show-inheritance:

data\_juicer.core.tracer module
data\_juicer.core.ray\_executor
-------------------------------

.. automodule:: data_juicer.core.tracer
.. automodule:: data_juicer.core.ray_executor
:members:
:undoc-members:
:show-inheritance:

Module contents
---------------
data\_juicer.core.tracer
------------------------

.. automodule:: data_juicer.core
.. automodule:: data_juicer.core.tracer
:members:
:undoc-members:
:show-inheritance:
46 changes: 18 additions & 28 deletions docs/sphinx_doc/source/data_juicer.format.rst
Original file line number Diff line number Diff line change
@@ -1,77 +1,67 @@
data\_juicer.format package
===========================
data\_juicer.format
===================

Submodules
----------

data\_juicer.format.csv\_formatter module
-----------------------------------------
data\_juicer.format.csv\_formatter
----------------------------------

.. automodule:: data_juicer.format.csv_formatter
:members:
:undoc-members:
:show-inheritance:

data\_juicer.format.formatter module
------------------------------------
data\_juicer.format.formatter
-----------------------------

.. automodule:: data_juicer.format.formatter
:members:
:undoc-members:
:show-inheritance:

data\_juicer.format.json\_formatter module
------------------------------------------
data\_juicer.format.json\_formatter
-----------------------------------

.. automodule:: data_juicer.format.json_formatter
:members:
:undoc-members:
:show-inheritance:

data\_juicer.format.load module
-------------------------------
data\_juicer.format.load
------------------------

.. automodule:: data_juicer.format.load
:members:
:undoc-members:
:show-inheritance:

data\_juicer.format.mixture\_formatter module
---------------------------------------------
data\_juicer.format.mixture\_formatter
--------------------------------------

.. automodule:: data_juicer.format.mixture_formatter
:members:
:undoc-members:
:show-inheritance:

data\_juicer.format.parquet\_formatter module
---------------------------------------------
data\_juicer.format.parquet\_formatter
--------------------------------------

.. automodule:: data_juicer.format.parquet_formatter
:members:
:undoc-members:
:show-inheritance:

data\_juicer.format.text\_formatter module
------------------------------------------
data\_juicer.format.text\_formatter
-----------------------------------

.. automodule:: data_juicer.format.text_formatter
:members:
:undoc-members:
:show-inheritance:

data\_juicer.format.tsv\_formatter module
-----------------------------------------
data\_juicer.format.tsv\_formatter
----------------------------------

.. automodule:: data_juicer.format.tsv_formatter
:members:
:undoc-members:
:show-inheritance:

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

.. automodule:: data_juicer.format
:members:
:undoc-members:
:show-inheritance:
22 changes: 6 additions & 16 deletions docs/sphinx_doc/source/data_juicer.ops.common.rst
Original file line number Diff line number Diff line change
@@ -1,29 +1,19 @@
data\_juicer.ops.common package
===============================
data\_juicer.ops.common
=======================

Submodules
----------

data\_juicer.ops.common.helper\_func module
-------------------------------------------
data\_juicer.ops.common.helper\_func
------------------------------------

.. automodule:: data_juicer.ops.common.helper_func
:members:
:undoc-members:
:show-inheritance:

data\_juicer.ops.common.special\_characters module
--------------------------------------------------
data\_juicer.ops.common.special\_characters
-------------------------------------------

.. automodule:: data_juicer.ops.common.special_characters
:members:
:undoc-members:
:show-inheritance:

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

.. automodule:: data_juicer.ops.common
:members:
:undoc-members:
:show-inheritance:
Loading

0 comments on commit 95b292b

Please sign in to comment.