Skip to content

Commit

Permalink
use sphinx-design directives instead of sphinx-panels (flyteorg#2364)
Browse files Browse the repository at this point in the history
* update docs to use sphinx design, custom rst template

Signed-off-by: cosmicBboy <[email protected]>

* fix docstring formatting

Signed-off-by: cosmicBboy <[email protected]>

* update autosummary for accelerators

Signed-off-by: cosmicBboy <[email protected]>

---------

Signed-off-by: cosmicBboy <[email protected]>
  • Loading branch information
cosmicBboy authored Apr 21, 2024
1 parent f116831 commit 9d94c83
Show file tree
Hide file tree
Showing 14 changed files with 31 additions and 6 deletions.
6 changes: 3 additions & 3 deletions docs/source/extras.accelerators.rst
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
.. automodule:: flytekit.extras.accelerators
:members:
:undoc-members:
:show-inheritance:
:no-members:
:no-inherited-members:
:no-special-members:
4 changes: 2 additions & 2 deletions flytekit/configuration/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
``~/.flyte/config.yaml`` file, and ``flytectl --help`` to learn about all of the configuration yaml options.
.. dropdown:: See example ``config.yaml`` file
:title: text-muted
:color: muted
:animate: fade-in-slide-down
.. literalinclude:: ../../tests/flytekit/unit/configuration/configs/sample.yaml
Expand All @@ -49,7 +49,7 @@
2. A file in ``~/.flyte/config`` in the home directory as detected by Python.
.. dropdown:: See example ``flytekit.config`` file
:title: text-muted
:color: muted
:animate: fade-in-slide-down
.. literalinclude:: ../../tests/flytekit/unit/configuration/configs/images.config
Expand Down
2 changes: 2 additions & 0 deletions flytekit/core/base_task.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@
.. currentmodule:: flytekit.core.base_task
.. autosummary::
:nosignatures:
:template: custom.rst
:toctree: generated/
kwtypes
Expand Down
4 changes: 3 additions & 1 deletion flytekit/core/promise.py
Original file line number Diff line number Diff line change
Expand Up @@ -390,7 +390,9 @@ def with_var(self, new_var: str) -> Promise:
def is_ready(self) -> bool:
"""
Returns if the Promise is READY (is not a reference and the val is actually ready)
Usage:
Usage ::
p = Promise(...)
...
if p.is_ready():
Expand Down
2 changes: 2 additions & 0 deletions flytekit/core/python_function_task.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@
.. currentmodule:: flytekit.core.python_function_task
.. autosummary::
:nosignatures:
:template: custom.rst
:toctree: generated/
PythonFunctionTask
Expand Down
1 change: 1 addition & 0 deletions flytekit/core/type_engine.py
Original file line number Diff line number Diff line change
Expand Up @@ -957,6 +957,7 @@ def get_transformer(cls, python_type: Type) -> TypeTransformer[T]:
d = dictionary of registered transformers, where is a python `type`
v = lookup type
Step 1:
If the type is annotated with a TypeTransformer instance, use that.
Expand Down
2 changes: 2 additions & 0 deletions flytekit/deck/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@
Contains deck renderers provided by flytekit.
.. autosummary::
:nosignatures:
:template: custom.rst
:toctree: generated/
Deck
Expand Down
2 changes: 2 additions & 0 deletions flytekit/extend/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@
This package contains things that are useful when extending Flytekit.
.. autosummary::
:nosignatures:
:template: custom.rst
:toctree: generated/
get_serializable
Expand Down
5 changes: 5 additions & 0 deletions flytekit/extras/accelerators.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,9 @@ def my_task() -> None:
.. currentmodule:: flytekit.extras.accelerators
.. autosummary::
:template: custom.rst
:toctree: generated/
:nosignatures:
BaseAccelerator
GPUAccelerator
Expand Down Expand Up @@ -75,6 +78,8 @@ def my_task() -> None:
.. currentmodule:: flytekit.extras.accelerators
.. autosummary::
:toctree: generated/
:nosignatures:
A10G
L4
Expand Down
2 changes: 2 additions & 0 deletions flytekit/image_spec/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@
This module contains the ImageSpec class parameters and methods.
.. autosummary::
:nosignatures:
:template: custom.rst
:toctree: generated/
ImageSpec
Expand Down
1 change: 1 addition & 0 deletions flytekit/testing/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
testing workflows that contain tasks that cannot run locally (a Hive task for instance).
.. autosummary::
:template: custom.rst
:toctree: generated/
patch - A decorator similar to the regular one you're probably used to
Expand Down
2 changes: 2 additions & 0 deletions flytekit/types/error/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
.. currentmodule:: flytekit.types.error
.. autosummary::
:nosignatures:
:template: custom.rst
:toctree: generated/
FlyteError
Expand Down
3 changes: 3 additions & 0 deletions flytekit/types/iterator/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,11 @@
Flytekit Iterator Type
==========================================================
.. currentmodule:: flytekit.types.iterator
.. autosummary::
:nosignatures:
:toctree: generated/
FlyteIterator
"""

Expand Down
1 change: 1 addition & 0 deletions flytekit/types/pickle/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
.. currentmodule:: flytekit.types.pickle
.. autosummary::
:template: custom.rst
:toctree: generated/
FlytePickle
Expand Down

0 comments on commit 9d94c83

Please sign in to comment.