Zulip bots with Eio

metadata

+83 -6
+53
.tangled/workflows/build.yml
··· 1 + when: 2 + - event: ["push", "pull_request"] 3 + branch: ["main"] 4 + 5 + engine: nixery 6 + 7 + dependencies: 8 + nixpkgs: 9 + - shell 10 + - stdenv 11 + - findutils 12 + - binutils 13 + - libunwind 14 + - ncurses 15 + - opam 16 + - git 17 + - gawk 18 + - gnupatch 19 + - gnum4 20 + - gnumake 21 + - gnutar 22 + - gnused 23 + - gnugrep 24 + - diffutils 25 + - gzip 26 + - bzip2 27 + - gcc 28 + - ocaml 29 + - pkg-config 30 + 31 + steps: 32 + - name: opam 33 + command: | 34 + opam init --disable-sandboxing -a -y 35 + - name: repo 36 + command: | 37 + opam repo add aoah https://tangled.org/anil.recoil.org/aoah-opam-repo.git 38 + - name: switch 39 + command: | 40 + opam install . --confirm-level=unsafe-yes --deps-only 41 + - name: build 42 + command: | 43 + opam exec -- dune build -p zulip 44 + - name: switch-test 45 + command: | 46 + opam install . --confirm-level=unsafe-yes --deps-only --with-test 47 + - name: test 48 + command: | 49 + opam exec -- dune runtest --verbose 50 + - name: doc 51 + command: | 52 + opam install -y odoc 53 + opam exec -- dune build @doc
+15
LICENSE.md
··· 1 + ISC License 2 + 3 + Copyright (c) 2025 Anil Madhavapeddy <anil@recoil.org> 4 + 5 + Permission to use, copy, modify, and distribute this software for any 6 + purpose with or without fee is hereby granted, provided that the above 7 + copyright notice and this permission notice appear in all copies. 8 + 9 + THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES 10 + WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF 11 + MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR 12 + ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES 13 + WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN 14 + ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF 15 + OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+2 -3
dune-project
··· 17 17 "High-quality OCaml bindings to the Zulip REST API using Eio for async operations. Includes a fiber-based bot framework (zulip.bot) with XDG configuration support.") 18 18 (depends 19 19 (ocaml (>= 5.1.0)) 20 - (dune (>= 3.0)) 21 20 eio 22 21 requests 23 22 uri ··· 27 26 logs 28 27 fmt 29 28 xdge 29 + eio_main 30 + cmdliner 30 31 (odoc :with-doc) 31 32 (alcotest :with-test) 32 - (eio_main :with-test) 33 - (cmdliner :with-test) 34 33 (mirage-crypto-rng :with-test)))
+10
examples/regression_test.mli
··· 1 + (*--------------------------------------------------------------------------- 2 + Copyright (c) 2025 Anil Madhavapeddy <anil@recoil.org>. All rights reserved. 3 + SPDX-License-Identifier: ISC 4 + ---------------------------------------------------------------------------*) 5 + 6 + (** Zulip API Regression Test Bot. 7 + 8 + Exercises many features of the Zulip OCaml API to verify the protocol 9 + implementation works correctly. Send a DM with "regress" to trigger 10 + the tests. *)
+3 -3
zulip.opam
··· 9 9 homepage: "https://tangled.org/@anil.recoil.org/ocaml-zulip" 10 10 bug-reports: "https://tangled.org/@anil.recoil.org/ocaml-zulip/issues" 11 11 depends: [ 12 + "dune" {>= "3.0"} 12 13 "ocaml" {>= "5.1.0"} 13 - "dune" {>= "3.0" & >= "3.0"} 14 14 "eio" 15 15 "requests" 16 16 "uri" ··· 20 20 "logs" 21 21 "fmt" 22 22 "xdge" 23 + "eio_main" 24 + "cmdliner" 23 25 "odoc" {with-doc} 24 26 "alcotest" {with-test} 25 - "eio_main" {with-test} 26 - "cmdliner" {with-test} 27 27 "mirage-crypto-rng" {with-test} 28 28 ] 29 29 build: [