Skip to content

Commit

Permalink
DOCS: Improved docs on Type Validation
Browse files Browse the repository at this point in the history
  • Loading branch information
akmalsoliev committed Jan 22, 2025
1 parent 15b3ac7 commit 7e50be8
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 0 deletions.
2 changes: 2 additions & 0 deletions docs/typing.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
::: typing
handler: python
4 changes: 4 additions & 0 deletions validoopsie/typing/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ class ValidationType(DTypes):
"""ValidoopsieType represents a valid type.
It can be one of the following:
- ArrayType: Array type
- BooleanType: Boolean type
- CategoryType: Categorical type
Expand All @@ -31,6 +32,7 @@ class FloatType(ValidationType, narwhals.Float32, narwhals.Float64, narwhals.Dec
"""FloatType represents a floating-point type.
It can be one of the following:
- Float32: 32-bit floating-point number
- Float64: 64-bit floating-point number
- Decimal: Arbitrary-precision decimal number
Expand All @@ -48,6 +50,7 @@ class IntType(
"""IntType represents an integer type.
It can be one of the following:
- Int8: 8-bit signed integer
- Int16: 16-bit signed integer
- Int32: 32-bit signed integer
Expand All @@ -67,6 +70,7 @@ class UIntType(
"""UIntType represents an unsigned integer type.
It can be one of the following:
- UInt8: 8-bit unsigned integer
- UInt16: 16-bit unsigned integer
- UInt32: 32-bit unsigned integer
Expand Down
4 changes: 4 additions & 0 deletions validoopsie/validation_catalogue/TypeValidation/type_check.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,10 @@ class TypeCheck(BaseValidationParameters):
(e.g. `IntegerType`) or more specific type provided by Narwhals
(e.g. `narwhals.Int64`).
For a full list of types refer to:
* [Validoopsie Generic Types](https://akmalsoliev.github.io/Validoopsie/typing.html#typing.FloatType)
* [Narwhals Specific Types](https://narwhals-dev.github.io/narwhals/api-reference/dtypes/)
Example of the `column_type_definitions`:
Expand Down

0 comments on commit 7e50be8

Please sign in to comment.