From 4037cef6f21888c9742b33e3451648aae2f67c56 Mon Sep 17 00:00:00 2001 From: Ghislain Vaillant Date: Tue, 28 Nov 2023 18:42:32 +0100 Subject: [PATCH 1/2] CI: Do not treat warnings as errors in RTD Since the last release, Sphinx produces some warnings of the likes: `WARNING: Inline interpreted text or phrase reference start-string without end-string.` Since the content of the affected docstrings has not changed, this is likely a regression in Sphinx or one of its plugins. In the intrest of moving forward, just disable `fail_on_warning` to allow for the next release to happen. --- .readthedocs.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.readthedocs.yaml b/.readthedocs.yaml index cf5432fd..bf861ea2 100644 --- a/.readthedocs.yaml +++ b/.readthedocs.yaml @@ -20,5 +20,5 @@ build: - jupyter-book config sphinx docs/ sphinx: - builder: html - fail_on_warning: true + configuration: docs/conf.py + fail_on_warning: false From b496c328cd2cbdff4f4b4379880c2909b8a4ab82 Mon Sep 17 00:00:00 2001 From: Ghislain Vaillant Date: Tue, 28 Nov 2023 18:50:39 +0100 Subject: [PATCH 2/2] STY: Fix docstring of CustomTextOpType enum --- medkit/core/text/operation.py | 16 ++++------------ 1 file changed, 4 insertions(+), 12 deletions(-) diff --git a/medkit/core/text/operation.py b/medkit/core/text/operation.py index 6470afe6..83bc0dbd 100644 --- a/medkit/core/text/operation.py +++ b/medkit/core/text/operation.py @@ -51,22 +51,14 @@ def run(self, segments: List[Segment]) -> List[Segment]: class CustomTextOpType(IntEnum): - """ - Enum class listing all supported function types for creating custom text operations - - Attributes - ---------- - CREATE_ONE_TO_N - Takes 1 data item, Return N new data items - EXTRACT_ONE_TO_N - Takes 1 data item, Return N existing data items - FILTER - Takes 1 data item, Returns True/False - """ + """Supported function types for creating custom text operations.""" CREATE_ONE_TO_N = 1 + """Take 1 data item, return N new data items.""" EXTRACT_ONE_TO_N = 2 + """Take 1 data item, return N existing data items""" FILTER = 3 + """Take 1 data item, return True or False.""" class _CustomTextOperation(Operation):