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

docs: add api ref using mkdocstrings #231

Merged
merged 3 commits into from
Dec 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
2 changes: 1 addition & 1 deletion deployer/pipeline_checks.py
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ def _convert_artifact_type_to_str(annotation: type) -> type:
"""Convert a kfp.dsl.Artifact type to a string.

This is mandatory for type checking, as kfp.dsl.Artifact types should be passed as strings
to VertexAI. See https://cloud.google.com/python/docs/reference/aiplatform/latest/google.cloud.aiplatform.PipelineJob
to VertexAI. See <https://cloud.google.com/python/docs/reference/aiplatform/latest/google.cloud.aiplatform.PipelineJob>
for details.
"""
if isinstance(annotation, _AnnotatedAlias):
Expand Down
File renamed without changes.
File renamed without changes.
11 changes: 11 additions & 0 deletions docs/api/pipeline_checks.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
::: deployer.pipeline_checks
options:
allow_inspection: false
merge_init_into_class: false
group_by_category: false
members:
- Pipelines
- Pipeline
- ConfigsDynamicModel
- ConfigDynamicModel
- _convert_artifact_type_to_str
26 changes: 26 additions & 0 deletions docs/api/utils.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
::: deployer.utils.models
options:
show_root_heading: true
members:
- create_model_from_func

::: deployer.utils.utils
options:
show_root_heading: true
members:
- make_enum_from_python_package_dir
- import_pipeline_from_dir

::: deployer.utils.config
options:
show_root_heading: true
merge_init_into_class: false
allow_inspection: true
members:
- VertexPipelinesSettings
- load_vertex_settings
- list_config_filepaths
- load_config
- _load_config_python
- _load_config_yaml
- _load_config_toml
6 changes: 6 additions & 0 deletions docs/api/vertex_deployer.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
::: deployer.pipeline_deployer.VertexPipelineDeployer
options:
show_root_heading: true
allow_inspection: true
merge_init_into_class: false
group_by_category: false
22 changes: 20 additions & 2 deletions mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,20 @@ theme:

plugins:
- search
- mkdocstrings:
handlers:
python:
paths: [.]
options:
members_order: source
separate_signature: true
filters: ["!^_"]
docstring_options:
ignore_init_summary: true
merge_init_into_class: true
show_signature_annotations: true
signature_crossrefs: true
show_symbol_type_heading: true

markdown_extensions:
- admonition
Expand Down Expand Up @@ -81,8 +95,12 @@ nav:
- Folder Structure: folder_structure.md
- Basic Usage: usage.md
- Advanced User Guide:
- Vertex DevOps: advanced_user_guide.md
- Understand settings and configurations: configuration.md
- Vertex DevOps: advanced/advanced_user_guide.md
- Understand settings and configurations: advanced/configuration.md
- CLI Reference: CLI_REFERENCE.md
- API Documentation:
- VertexPipelineDeployer: api/vertex_deployer.md
- pipeline_checks: api/pipeline_checks.md
- utils: api/utils.md
- Contributing: contributing.md
- Changelog: changelog.md
1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ codespell = "^2.2"
[tool.poetry.group.docs.dependencies]
mkdocs = "^1.5"
mkdocs-material = {extras = ["pygments"], version = "^9.5.17"}
mkdocstrings = "^0.26"

[tool.poetry.extras]
profiling = ["pyinstrument"]
Expand Down
Loading