Skip to content
This repository was archived by the owner on May 17, 2024. It is now read-only.

Commit 6ed2a0e

Browse files
authored
Merge pull request #118 from datafold/fix_docs_June28
Fix docs
2 parents 860e9b6 + dc383fb commit 6ed2a0e

File tree

2 files changed

+16
-14
lines changed

2 files changed

+16
-14
lines changed

data_diff/databases/database_types.py

Lines changed: 15 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ def normalize_timestamp(self, value: str, coltype: TemporalType) -> str:
111111
112112
The returned expression must accept any SQL datetime/timestamp, and return a string.
113113
114-
Date format: "YYYY-MM-DD HH:mm:SS.FFFFFF"
114+
Date format: ``YYYY-MM-DD HH:mm:SS.FFFFFF``
115115
116116
Precision of dates should be rounded up/down according to coltype.rounds
117117
"""
@@ -123,18 +123,18 @@ def normalize_number(self, value: str, coltype: FractionalType) -> str:
123123
124124
The returned expression must accept any SQL int/numeric/float, and return a string.
125125
126-
- Floats/Decimals are expected in the format
127-
"I.P"
126+
Floats/Decimals are expected in the format
127+
"I.P"
128128
129-
Where I is the integer part of the number (as many digits as necessary),
130-
and must be at least one digit (0).
131-
P is the fractional digits, the amount of which is specified with
132-
coltype.precision. Trailing zeroes may be necessary.
133-
If P is 0, the dot is omitted.
129+
Where I is the integer part of the number (as many digits as necessary),
130+
and must be at least one digit (0).
131+
P is the fractional digits, the amount of which is specified with
132+
coltype.precision. Trailing zeroes may be necessary.
133+
If P is 0, the dot is omitted.
134134
135-
Note: This precision is different than the one used by databases. For decimals,
136-
it's the same as ``numeric_scale``, and for floats, who use binary precision,
137-
it can be calculated as ``log10(2**numeric_precision)``.
135+
Note: We use 'precision' differently than most databases. For decimals,
136+
it's the same as ``numeric_scale``, and for floats, who use binary precision,
137+
it can be calculated as ``log10(2**numeric_precision)``.
138138
"""
139139
...
140140

@@ -145,9 +145,11 @@ def normalize_value_by_type(self, value: str, coltype: ColType) -> str:
145145
146146
The default implementation dispatches to a method according to `coltype`:
147147
148-
TemporalType -> normalize_timestamp()
148+
::
149+
150+
TemporalType -> normalize_timestamp()
149151
FractionalType -> normalize_number()
150-
*else* -> to_string()
152+
*else* -> to_string()
151153
152154
(`Integer` falls in the *else* category)
153155

docs/python-api.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ Python API Reference
1111
.. autoclass:: TableSegment
1212
:members: __init__, get_values, choose_checkpoints, segment_by_checkpoints, count, count_and_checksum, is_bounded, new
1313

14-
.. autoclass:: data_diff.database.Database
14+
.. autoclass:: data_diff.databases.database_types.AbstractDatabase
1515
:members:
1616

1717
.. autodata:: DbKey

0 commit comments

Comments
 (0)