diff --git a/lib/codecs/array_to_array.ml b/lib/codecs/array_to_array.ml index 8de6b960..0dfe6887 100644 --- a/lib/codecs/array_to_array.ml +++ b/lib/codecs/array_to_array.ml @@ -1,10 +1,9 @@ module Ndarray = Owl.Dense.Ndarray.Generic -type dimension_order = int array [@@deriving show] +type dimension_order = int array type array_to_array = | Transpose of dimension_order - [@@deriving show] type error = [ `Transpose_order of dimension_order * string ] diff --git a/lib/codecs/array_to_array.mli b/lib/codecs/array_to_array.mli index fcdb5871..a80817e4 100644 --- a/lib/codecs/array_to_array.mli +++ b/lib/codecs/array_to_array.mli @@ -8,9 +8,6 @@ type array_to_array = type error = [ `Transpose_order of dimension_order * string ] -val pp_array_to_array : Format.formatter -> array_to_array -> unit -val show_array_to_array : array_to_array -> string - module ArrayToArray : sig val parse : ('a, 'b) Util.array_repr -> diff --git a/lib/codecs/array_to_bytes.ml b/lib/codecs/array_to_bytes.ml index ca9192ee..27d4c286 100644 --- a/lib/codecs/array_to_bytes.ml +++ b/lib/codecs/array_to_bytes.ml @@ -7,17 +7,14 @@ module Ndarray = Owl.Dense.Ndarray.Generic type endianness = | Little | Big - [@@deriving show] type loc = | Start | End - [@@deriving show] type array_to_bytes = | Bytes of endianness | ShardingIndexed of shard_config - [@@deriving show] and shard_config = {chunk_shape : int array @@ -29,7 +26,6 @@ and chain = {a2a: array_to_array list ;a2b: array_to_bytes ;b2b: bytes_to_bytes list} - [@@deriving show] type error = [ Extensions.error diff --git a/lib/codecs/array_to_bytes.mli b/lib/codecs/array_to_bytes.mli index 8a854583..30368cd1 100644 --- a/lib/codecs/array_to_bytes.mli +++ b/lib/codecs/array_to_bytes.mli @@ -20,9 +20,6 @@ and chain = { b2b: Bytes_to_bytes.bytes_to_bytes list; } -val pp_chain : Format.formatter -> chain -> unit -val show_chain : chain -> string - type error = [ Extensions.error | Array_to_array.error diff --git a/lib/codecs/bytes_to_bytes.ml b/lib/codecs/bytes_to_bytes.ml index 83bd5e15..05bc440a 100644 --- a/lib/codecs/bytes_to_bytes.ml +++ b/lib/codecs/bytes_to_bytes.ml @@ -2,12 +2,10 @@ module Ndarray = Owl.Dense.Ndarray.Generic type compression_level = | L0 | L1 | L2 | L3 | L4 | L5 | L6 | L7 | L8 | L9 - [@@deriving show] type bytes_to_bytes = | Crc32c | Gzip of compression_level - [@@deriving show] type error = [ `Gzip of Ezgzip.error ] diff --git a/lib/codecs/bytes_to_bytes.mli b/lib/codecs/bytes_to_bytes.mli index bb9e5683..fa5a0f54 100644 --- a/lib/codecs/bytes_to_bytes.mli +++ b/lib/codecs/bytes_to_bytes.mli @@ -10,9 +10,6 @@ type bytes_to_bytes = type error = [ `Gzip of Ezgzip.error ] -val pp_bytes_to_bytes : Format.formatter -> bytes_to_bytes -> unit -val show_bytes_to_bytes : bytes_to_bytes -> string - module BytesToBytes : sig val compute_encoded_size : int -> bytes_to_bytes -> int val encode : bytes_to_bytes -> string -> (string, [> error]) result diff --git a/lib/codecs/codecs.ml b/lib/codecs/codecs.ml index 9679c21b..1b023817 100644 --- a/lib/codecs/codecs.ml +++ b/lib/codecs/codecs.ml @@ -77,10 +77,6 @@ and variable_to_internal_b2b b2b = module Chain = struct type t = chain - let pp = pp_chain - - let show = show_chain - let create : type a b. (a, b) Util.array_repr -> codec_chain -> (t, [> error ]) result = fun repr cc -> diff --git a/lib/codecs/codecs.mli b/lib/codecs/codecs.mli index 5d138046..134806cc 100644 --- a/lib/codecs/codecs.mli +++ b/lib/codecs/codecs.mli @@ -39,34 +39,31 @@ type codec_chain = { b2b: bytestobytes list; } -type error = Array_to_bytes.error +type error = + [ `Extension of string + | `Gzip of Ezgzip.error + | `Transpose_order of int array * string + | `Sharding of int array * int array * string ] module Chain : sig type t - val create - : ('a, 'b) Util.array_repr -> codec_chain -> (t, [> error]) result + val create : + ('a, 'b) Util.array_repr -> codec_chain -> (t, [> error ]) result val default : t val compute_encoded_size : int -> t -> int - val encode - : t -> ('a, 'b) Ndarray.t -> (string, [> error]) result + val encode : + t -> ('a, 'b) Ndarray.t -> (string, [> error ]) result - val decode - : t -> - ('a, 'b) Util.array_repr -> - string -> - (('a, 'b) Ndarray.t, [> error]) result + val decode : + t -> ('a, 'b) Util.array_repr -> string -> (('a, 'b) Ndarray.t, [> error]) result val ( = ) : t -> t -> bool val of_yojson : Yojson.Safe.t -> (t, string) result val to_yojson : t -> Yojson.Safe.t - - val pp : Format.formatter -> t -> unit - - val show : t -> string end diff --git a/test/test_codecs.ml b/test/test_codecs.ml index b03a7855..c853d194 100644 --- a/test/test_codecs.ml +++ b/test/test_codecs.ml @@ -114,8 +114,7 @@ let tests = [ let str = Chain.to_yojson c |> Yojson.Safe.to_string in (match Chain.of_yojson @@ Yojson.Safe.from_string str with - | Ok v -> - assert_equal ~printer:Chain.show v c; + | Ok v -> assert_equal v c; | Error _ -> assert_failure "a serialized chain should successfully deserialize")) diff --git a/test/test_metadata.ml b/test/test_metadata.ml index e1d6dfc8..dba075b8 100644 --- a/test/test_metadata.ml +++ b/test/test_metadata.ml @@ -80,7 +80,6 @@ let test_array_metadata ~printer:show_int_array shape @@ ArrayMetadata.shape meta; assert_equal - ~printer:Codecs.Chain.show Codecs.Chain.default @@ ArrayMetadata.codecs meta;