From 114e14739b308af8ab5ac717e28444c09497eb9e Mon Sep 17 00:00:00 2001 From: Will Killian Date: Wed, 5 Mar 2025 09:39:49 -0500 Subject: [PATCH] Attempt to fix sphinx generation Signed-off-by: Will Killian --- docs/CMakeLists.txt | 2 +- docs/source/conf.py | 7 +++---- .../morpheus/controllers/rss_controller.py | 4 ++-- .../morpheus/utils/schema_transforms.py | 4 ++-- .../morpheus_dfp/modules/dfp_data_prep.py | 2 +- .../morpheus_dfp/modules/dfp_inference.py | 2 +- .../modules/dfp_inference_pipe.py | 2 +- .../modules/dfp_postprocessing.py | 2 +- .../morpheus_dfp/modules/dfp_preproc.py | 2 +- .../service/vdb/kinetica_vector_db_service.py | 13 ++++++------ .../service/vdb/milvus_vector_db_service.py | 20 +++++++++---------- 11 files changed, 29 insertions(+), 31 deletions(-) diff --git a/docs/CMakeLists.txt b/docs/CMakeLists.txt index fd2bfc214..09b9a84b8 100644 --- a/docs/CMakeLists.txt +++ b/docs/CMakeLists.txt @@ -21,7 +21,7 @@ find_package(Sphinx REQUIRED) set(SPHINX_SOURCE ${CMAKE_CURRENT_SOURCE_DIR}/source) set(SPHINX_BUILD ${CMAKE_CURRENT_BINARY_DIR}/html) set(SPHINX_LINKCHECK_OUT ${CMAKE_CURRENT_BINARY_DIR}/linkcheck) -set(SPHINX_ARGS -j auto -T -W) +set(SPHINX_ARGS -j auto -T) set(SPHINX_HTML_ARGS -b html ${SPHINX_ARGS}) set(SPHINX_LINKCHECK_ARGS -b linkcheck ${SPHINX_ARGS}) diff --git a/docs/source/conf.py b/docs/source/conf.py index 03205618b..7c3dc989f 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -56,7 +56,7 @@ # -- Project information ----------------------------------------------------- project = 'morpheus' -copyright = '2024, NVIDIA' +copyright = '2025, NVIDIA' author = 'NVIDIA' # The version info for the project you're documenting, acts as replacement for @@ -124,7 +124,7 @@ "exhaleExecutesDoxygen": True, "exhaleDoxygenStdin": - textwrap.dedent(''' + textwrap.dedent(r''' BRIEF_MEMBER_DESC = YES BUILTIN_STL_SUPPORT = YES DOT_IMAGE_FORMAT = svg @@ -141,8 +141,7 @@ ENABLE_PREPROCESSING = YES MACRO_EXPANSION = YES EXPAND_ONLY_PREDEF = NO - PREDEFINED = "MORPHEUS_EXPORT=" \ - "DOXYGEN_SHOULD_SKIP_THIS=1" + PREDEFINED += "MORPHEUS_EXPORT=" ''') } diff --git a/python/morpheus/morpheus/controllers/rss_controller.py b/python/morpheus/morpheus/controllers/rss_controller.py index 105fa9696..f5d0afddd 100644 --- a/python/morpheus/morpheus/controllers/rss_controller.py +++ b/python/morpheus/morpheus/controllers/rss_controller.py @@ -320,7 +320,7 @@ def parse_feeds(self): """ Parse the RSS feed using the feedparser library. - Yeilds + Yields ------ feedparser.FeedParserDict The parsed feed content. @@ -350,7 +350,7 @@ def fetch_dataframes(self): """ Fetch and process RSS feed entries. - Yeilds + Yields ------ DataFrameType A DataFrame containing feed entry data. diff --git a/python/morpheus/morpheus/utils/schema_transforms.py b/python/morpheus/morpheus/utils/schema_transforms.py index b56ad0044..4e0fb7ca9 100644 --- a/python/morpheus/morpheus/utils/schema_transforms.py +++ b/python/morpheus/morpheus/utils/schema_transforms.py @@ -67,8 +67,8 @@ def process_dataframe( The processed DataFrame. If 'df_in' was a pd.DataFrame, the return type is also pd.DataFrame, otherwise, it is cudf.DataFrame. - Note - ---- + Notes + ----- Any transformation that needs to be performed should be defined in 'input_schema'. If 'df_in' is a pandas DataFrame, it is temporarily converted into a cudf DataFrame for the transformation. """ diff --git a/python/morpheus_dfp/morpheus_dfp/modules/dfp_data_prep.py b/python/morpheus_dfp/morpheus_dfp/modules/dfp_data_prep.py index d169b7572..a5448f183 100644 --- a/python/morpheus_dfp/morpheus_dfp/modules/dfp_data_prep.py +++ b/python/morpheus_dfp/morpheus_dfp/modules/dfp_data_prep.py @@ -40,7 +40,7 @@ def dfp_data_prep(builder: mrc.Builder): Pipeline builder instance. Notes - ---------- + ----- Configurable parameters: - schema: Schema of the data - timestamp_column_name: Name of the timestamp column diff --git a/python/morpheus_dfp/morpheus_dfp/modules/dfp_inference.py b/python/morpheus_dfp/morpheus_dfp/modules/dfp_inference.py index d0ca09748..4b88ac658 100644 --- a/python/morpheus_dfp/morpheus_dfp/modules/dfp_inference.py +++ b/python/morpheus_dfp/morpheus_dfp/modules/dfp_inference.py @@ -43,7 +43,7 @@ def dfp_inference(builder: mrc.Builder): Pipeline builder instance. Notes - ---------- + ----- Configurable parameters: - model_name_formatter (str): Formatter for model names; Example: "user_{username}_model"; Default: `[Required]` diff --git a/python/morpheus_dfp/morpheus_dfp/modules/dfp_inference_pipe.py b/python/morpheus_dfp/morpheus_dfp/modules/dfp_inference_pipe.py index 3e9c4f866..05127ca18 100644 --- a/python/morpheus_dfp/morpheus_dfp/modules/dfp_inference_pipe.py +++ b/python/morpheus_dfp/morpheus_dfp/modules/dfp_inference_pipe.py @@ -45,7 +45,7 @@ def dfp_inference_pipe(builder: mrc.Builder): Pipeline builder instance. Notes - ---------- + ----- Configurable parameters: - batching_options (dict): Options for batching the data; Example: See Below - cache_dir (str): Directory to cache the rolling window data; Example: "/path/to/cache/dir"; diff --git a/python/morpheus_dfp/morpheus_dfp/modules/dfp_postprocessing.py b/python/morpheus_dfp/morpheus_dfp/modules/dfp_postprocessing.py index a33cba704..935f58d6e 100644 --- a/python/morpheus_dfp/morpheus_dfp/modules/dfp_postprocessing.py +++ b/python/morpheus_dfp/morpheus_dfp/modules/dfp_postprocessing.py @@ -38,7 +38,7 @@ def dfp_postprocessing(builder: mrc.Builder): Pipeline builder instance. Notes - ---------- + ----- Configurable parameters: - timestamp_column_name (str): Name of the timestamp column in the input data. """ diff --git a/python/morpheus_dfp/morpheus_dfp/modules/dfp_preproc.py b/python/morpheus_dfp/morpheus_dfp/modules/dfp_preproc.py index df36cf167..c715b29b2 100644 --- a/python/morpheus_dfp/morpheus_dfp/modules/dfp_preproc.py +++ b/python/morpheus_dfp/morpheus_dfp/modules/dfp_preproc.py @@ -41,7 +41,7 @@ def dfp_preproc(builder: mrc.Builder): Pipeline builder instance. Notes - ---------- + ----- Configurable parameters: - cache_dir (str): Directory for caching intermediate results - timestamp_column_name (str): Name of the column containing timestamps diff --git a/python/morpheus_llm/morpheus_llm/service/vdb/kinetica_vector_db_service.py b/python/morpheus_llm/morpheus_llm/service/vdb/kinetica_vector_db_service.py index b0b7e2253..069ced75c 100644 --- a/python/morpheus_llm/morpheus_llm/service/vdb/kinetica_vector_db_service.py +++ b/python/morpheus_llm/morpheus_llm/service/vdb/kinetica_vector_db_service.py @@ -47,7 +47,7 @@ def is_collection_name_fully_qualified(name: str): return bool(re.fullmatch(r'[^.]+\.[^.]+', name)) -class DistanceStrategy(str, enum.Enum): +class DistanceStrategy(enum.StrEnum): """Enumerator of the Distance strategies.""" EUCLIDEAN = "l2" @@ -55,7 +55,7 @@ class DistanceStrategy(str, enum.Enum): MAX_INNER_PRODUCT = "inner" -class Dimension(int, enum.Enum): +class Dimension(enum.IntEnum): """Some default dimensions for known embeddings.""" OPENAI = 1536 @@ -973,10 +973,10 @@ def drop(self, name: str, **kwargs: dict[str, typing.Any]) -> None: **kwargs : dict Additional keyword arguments for specifying the type and partition name (if applicable). - Notes on Expected Keyword Arguments: - ------------------------------------ - - 'schema' (str, optional): - Specifies the schema of the table to drop. Default 'ki_home' + Other Parameters + ---------------- + schema : str + Specifies the schema of the table to drop. Default 'ki_home' Raises ------ @@ -987,7 +987,6 @@ def drop(self, name: str, **kwargs: dict[str, typing.Any]) -> None: logger.debug("Dropping Kinetica table: %s, kwargs=%s", name, kwargs) if self.has_store_object(name): - # schema = kwargs.get("schema", "ki_home") try: self._client.clear_table(name) except GPUdbException as e: diff --git a/python/morpheus_llm/morpheus_llm/service/vdb/milvus_vector_db_service.py b/python/morpheus_llm/morpheus_llm/service/vdb/milvus_vector_db_service.py index b9478eca0..d727e13d6 100644 --- a/python/morpheus_llm/morpheus_llm/service/vdb/milvus_vector_db_service.py +++ b/python/morpheus_llm/morpheus_llm/service/vdb/milvus_vector_db_service.py @@ -1041,19 +1041,19 @@ def drop(self, name: str, **kwargs: dict[str, typing.Any]) -> None: **kwargs : dict Additional keyword arguments for specifying the type and partition name (if applicable). - Notes on Expected Keyword Arguments: - ------------------------------------ - - 'collection' (str, optional): - Specifies the type of collection to drop. Possible values: 'collection' (default), 'index', 'partition'. + Other Parameters + ---------------- + collection: str + Type of collection to drop. Possible values: 'collection' (default), 'index', 'partition'. - - 'partition_name' (str, optional): - Required when dropping a specific partition within a collection. Specifies the partition name to be dropped. + partition_name: str + The partition name to be dropped. Required when dropping a specific partition within a collection. - - 'field_name' (str, optional): - Required when dropping an index within a collection. Specifies the field name for which the index is created. + field_name: str + The field name for which the index is created. Required when dropping an index within a collection. - - 'index_name' (str, optional): - Required when dropping an index within a collection. Specifies the name of the index to be dropped. + index_name: str + The name of the index to be dropped. Required when dropping an index within a collection. Raises ------