From cce845d4f9045069593ddebd448466c902b9846d Mon Sep 17 00:00:00 2001 From: kklein Date: Thu, 11 Aug 2022 21:09:05 +0200 Subject: [PATCH 1/2] Fix errors due to rst reference via |. --- src/datajudge/requirements.py | 26 +++++++++++++++----------- 1 file changed, 15 insertions(+), 11 deletions(-) diff --git a/src/datajudge/requirements.py b/src/datajudge/requirements.py index 39f81205..d86a9376 100644 --- a/src/datajudge/requirements.py +++ b/src/datajudge/requirements.py @@ -1216,10 +1216,11 @@ def add_row_equality_constraint( condition1: Condition = None, condition2: Condition = None, ): - """At most max_missing_fraction of rows in T1 and T2 are absent in either. + """At most ``max_missing_fraction`` of rows in T1 and T2 are absent in either. - I.e. (|T1 - T2| + |T2 - T1|) / |T1 U T2| <= max_missing_fraction. - Rows from T1 are indexed in columns1, rows from T2 are indexed in columns2. + In other words, + :math:`\\frac{|T1 - T2| + |T2 - T1|}{|T1 \\cup T2|} \\leq` ``max_missing_fraction``. + Rows from T1 are indexed in ``columns1``, rows from T2 are indexed in ``columns2``. """ ref = DataReference(self.data_source, columns1, condition1) ref2 = DataReference(self.data_source2, columns2, condition2) @@ -1236,13 +1237,14 @@ def add_row_subset_constraint( condition1: Condition = None, condition2: Condition = None, ): - """At most max_missing_fraction of rows in T1 are not in T2. + """At most ``max_missing_fraction`` of rows in T1 are not in T2. - I.e. |T1-T2|/|T1| <= max_missing_fraction. - Rows from T1 are indexed in columns1, rows from T2 are indexed in columns2. + In other words, + :math:`\\frac{|T1-T2|}{|T1|} \\leq` ``max_missing_fraction``. + Rows from T1 are indexed in columns1, rows from T2 are indexed in ``columns2``. - In particular, the operation |T1-T2| relies on a sql EXCEPT statement. In - constrast to EXCEPT ALL, this should lead to a set subtraction instead of + In particular, the operation ``|T1-T2|`` relies on a sql ``EXCEPT`` statement. In + constrast to ``EXCEPT ALL``, this should lead to a set subtraction instead of a multiset subtraction. In other words, duplicates in T1 are treated as single occurrences. """ @@ -1264,10 +1266,12 @@ def add_row_superset_constraint( condition1: Condition = None, condition2: Condition = None, ): - """At most max_missing_fraction of rows in T2 are not in T1. + """At most ``max_missing_fraction`` of rows in T2 are not in T1. - I.e. |T2-T1|/|T2| <= max_missing_fraction. - Rows from T1 are indexed in columns1, rows from T2 are indexed in columns2. + In other words, + :math:`\\frac{|T2-T1|}{|T2|} \\leq` ``max_missing_fraction``. + Rows from T1 are indexed in ``columns1``, rows from T2 are indexed in + ``columns2``. """ max_missing_fraction_getter = self.get_deviation_getter( constant_max_missing_fraction, date_range_loss_fraction From 2ae93aff23b0a8857dc3851b03195672455fb2b3 Mon Sep 17 00:00:00 2001 From: kklein Date: Thu, 11 Aug 2022 21:12:13 +0200 Subject: [PATCH 2/2] Fix warning by adapting length of underline. --- docs/source/getting_started.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/source/getting_started.rst b/docs/source/getting_started.rst index 6d6a449a..3c6da6d5 100644 --- a/docs/source/getting_started.rst +++ b/docs/source/getting_started.rst @@ -1,5 +1,5 @@ Getting Started -============ +=============== Glossary