Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Add Experiment Filters for Invitations #258

Merged
merged 11 commits into from
Nov 24, 2023
Merged
8 changes: 5 additions & 3 deletions esy.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,12 @@
"@opam/containers": "3.12",
"@opam/containers-data": "3.12",
"@opam/cstruct": "*",
"@opam/dune": "*",
"@opam/guardian": "*",
"@opam/logs": "0.7.0",
"@opam/lwt": "5.7.0",
"@opam/lwt_ppx": "2.1.0",
"@opam/lwt_ssl": "1.2.0",
"@opam/mariadb": "*",
"@opam/ocaml-lsp-server": "*",
"@opam/ocamlformat": "0.26.1",
"@opam/mirage-crypto": "*",
"@opam/mirage-crypto-rng": "*",
"@opam/mirage-crypto-rng-lwt": "*",
Expand All @@ -40,6 +37,11 @@
"esy-openssl": "*",
"ocaml": "4.14.0"
},
"devDependencies": {
"@opam/dune": "*",
"@opam/ocamlformat": "*",
"@opam/ocaml-lsp-server": "*"
},
"resolutions": {
"@opam/canary": "uzh/canary#02cf40e029268560e160ca032850426e387aa598",
"@opam/comformist": "oxidizing/conformist#aa7b95d1f39215cdaab8cf96d765d63e41d5f8a6",
Expand Down
75 changes: 38 additions & 37 deletions esy.lock/index.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion pool.opam
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ depends: [
"containers-data" {>= "3.6"}
"mariadb" {>= "1.1.6" & < "2.0.0"}
"caqti-driver-mariadb" {>= "2.0.1"}
"caqti-lwt" {>= "2.0.1" }
"caqti-lwt" {>= "2.0.1"}
"caqti" {>= "2.0.1"}
"ocamlformat" {>= "0.18.0"}
"ppx_deriving" {>= "5.2.1"}
Expand Down
8 changes: 4 additions & 4 deletions pool/app/filter/entity.ml
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,7 @@ module Key = struct
[@name "num_participations"]
| NumShowUps [@printer print "num_show_ups"] [@name "num_show_ups"]
| Participation [@printer print "participation"] [@name "participation"]
| Invitation [@printer print "invitation"] [@name "invitation"]
| Tag [@printer print "tag"] [@name "tag"]
[@@deriving show { with_path = false }, eq, yojson, variants, enum]

Expand Down Expand Up @@ -205,7 +206,7 @@ module Key = struct
| NumNoShows -> Ok "pool_contacts.num_no_shows"
| NumParticipations -> Ok "pool_contacts.num_participations"
| NumShowUps -> Ok "pool_contacts.num_show_ups"
| Participation | Tag ->
| Invitation | Participation | Tag ->
Error Pool_common.Message.(QueryNotCompatible (Field.Key, Field.Value))
;;

Expand All @@ -219,7 +220,7 @@ module Key = struct
| NumNoShows
| NumParticipations
| NumShowUps -> Nr
| Participation -> QueryExperiments
| Invitation | Participation -> QueryExperiments
| Tag -> QueryTags
;;

Expand Down Expand Up @@ -531,8 +532,7 @@ module Operator = struct
| NumNoShows
| NumParticipations
| NumShowUps -> all_equality_operators @ all_size_operators
| Participation -> all_list_operators
| Tag -> all_list_operators
| Participation | Tag | Invitation -> all_list_operators
;;

let input_type_to_operator (key : Key.input_type) =
Expand Down
1 change: 1 addition & 0 deletions pool/app/filter/filter.mli
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ module Key : sig
| NumParticipations
| NumShowUps
| Participation
| Invitation
| Tag

type t =
Expand Down
Loading