From 61ecc6b8c22095cfd46bfd79637a68561564fab1 Mon Sep 17 00:00:00 2001
From: Bruno Guillaume <Bruno.Guillaume@loria.fr>
Date: Thu, 3 Nov 2022 08:05:30 +0100
Subject: [PATCH] remote deprecated functions

---
 src_ocaml/grewpy.ml | 40 ++++++++++++----------------------------
 1 file changed, 12 insertions(+), 28 deletions(-)

diff --git a/src_ocaml/grewpy.ml b/src_ocaml/grewpy.ml
index dfceaae..7a23d97 100644
--- a/src_ocaml/grewpy.ml
+++ b/src_ocaml/grewpy.ml
@@ -47,7 +47,7 @@ let run_command request =
       end
 
       (* ======================= load_graph ======================= *)
-    | Some "load_graph" ->
+    (* | Some "load_graph" ->
       begin
         match json |> member "filename" |> to_string_option with
         | Some filename ->
@@ -55,10 +55,10 @@ let run_command request =
           let data = Graph.to_json graph in
           Yojson.Basic.to_string (`Assoc [("status", `String "OK"); ("data", data)])
         | None -> json_error "no 'filename' in 'load_graph' command"
-      end
+      end *)
 
     (* ======================= save_graph ======================= *)
-    | Some "save_graph" ->
+    (* | Some "save_graph" ->
       begin
         match (
           json |> member "graph" |> to_string_option,
@@ -69,7 +69,7 @@ let run_command request =
           Yojson.Basic.to_file filename (Graph.to_json gr);
           Yojson.Basic.to_string (`Assoc [("status", `String "OK"); ("data", `Null)])
         | _ -> json_error "incomplete 'save_graph' command"
-      end
+      end *)
 
     (* ======================= load_grs ======================= *)
     | Some "load_grs" ->
@@ -141,14 +141,14 @@ let run_command request =
       end
 
     (* ======================= corpus_size ======================= *)
-    | Some "corpus_size" ->
+    (* | Some "corpus_size" ->
       begin
         try
           let corpus = json |> member "corpus_index" |> to_int |> Global.corpus_get in
           Yojson.Basic.to_string (`Assoc [("status", `String "OK"); ("data", `Int (Array.length corpus))])
         with
         | Error msg -> json_error msg
-      end
+      end *)
 
     (* ======================= corpus_sent_ids ======================= *)
     | Some "corpus_sent_ids" ->
@@ -209,22 +209,6 @@ let run_command request =
         | Error msg -> json_error msg
       end
 
-    (* ======================= search ======================= *)
-    | Some "search" ->
-      begin
-        match (
-          json |> member "graph" |> to_string_option,
-          json |> member "pattern" |> to_string_option
-        ) with
-        | Some graph, Some string_pattern ->
-          let gr = Graph.of_json (Yojson.Basic.from_string graph) in
-          let pattern = Pattern.parse ~config string_pattern in
-          let matching_list = Matching.search_pattern_in_graph ~config pattern gr in
-          let json_list = List.map (fun m -> Matching.to_json pattern gr m) matching_list in
-          Yojson.Basic.to_string (`Assoc [("status", `String "OK"); ("data", `List (json_list))])
-        | _ -> json_error "incomplete 'search' command"
-      end
-
     (* ======================= run ======================= *)
     | Some "run" ->
       begin
@@ -279,7 +263,7 @@ let run_command request =
       end
 
     (* ======================= dot_graph ======================= *)
-    | Some "dot_to_png" ->
+    (* | Some "dot_to_png" ->
       begin
         match json |> member "graph" |> to_string_option with
         | Some graph ->
@@ -292,10 +276,10 @@ let run_command request =
                 ("data", `String png_file)
               ])
         | _ -> json_error "incomplete 'dot_graph' command"
-      end
+      end *)
 
     (* ======================= dot_graph ======================= *)
-    | Some "dep_to_png" ->
+    (* | Some "dep_to_png" ->
       begin
         match json |> member "graph" |> to_string_option with
         | Some graph ->
@@ -308,10 +292,10 @@ let run_command request =
                 ("data", `String png_file)
               ])
         | _ -> json_error "incomplete 'dep_graph' command"
-      end
+      end *)
 
     (* ======================= graph_svg ======================= *)
-    | Some "dep_to_svg" ->
+    (* | Some "dep_to_svg" ->
       begin
         match json |> member "graph" |> to_string_option with
         | Some graph ->
@@ -323,7 +307,7 @@ let run_command request =
                 ("data", `String svg_file)
               ])
         | _ -> json_error "incomplete 'graph_svg' command"
-      end
+      end *)
 
     | Some command -> json_error (sprintf "command '%s' not found" command)
   with
-- 
GitLab