artanis
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

re: A test suite that use a lib


From: Mortimer Cladwell
Subject: re: A test suite that use a lib
Date: Thu, 29 Apr 2021 06:23:49 -0400

Hi Jeremy,
I will answer the question 'How do I incorporate a lib module into my Artanis project?' which I am not sure is exactly what you are asking but since there are no other responses I will give it a go.

Consider this file layout:

myproject
├── labsolns  [some modules I will want to use]
│   ├── artass.scm
│   ├── gplot.scm
│   └── gplot.scm~
├── limsn   [the artanis project]
│   ├── app
│   │   ├── api
│   │   │   └── v1.scm
│   │   ├── controllers
│   │   │   ├── assayrun.scm
│   │   │   ├── .gitkeep
│   │   │   ├── hitlist.scm
│   │   │   ├── layout.scm


so the top of a controller e.g. assayrun.scm would look like


(define-artanis-controller assayrun) ; DO NOT REMOVE THIS LINE!!!

(use-modules (artanis utils)(artanis irregex)(srfi srfi-1)(dbi dbi)
    (labsolns artass)(rnrs bytevectors)(ice-9 popen)
    (ice-9 textual-ports)(ice-9 rdelim)(web uri)
    (labsolns gplot))

Note that assayrun.scm is using the artanis assistant module (labsolns artass) and the gnuplot assistant module (labsolns gplot)

The top of artass.scm looks like:

(define-module (labsolns artass)
  #:export (get-rand-file-name
   sid
   get-salt
   my-hmac
   dropdown-contents-with-id
   dropdown-contents-no-id
   prep-ar-rows
   white-chars
   addquotes
   get-key
   validate-key
   get-redirect-uri
   ))

(use-modules (artanis artanis)(artanis utils)(artanis config) (ice-9 local-eval) (srfi srfi-1)
             (artanis irregex)(dbi dbi) (ice-9 textual-ports)(ice-9 rdelim)
    (rnrs bytevectors)(web uri))


to make it work you need to get ~/myproject on your path either with add-to-load-path, or -L on the command line, or in an environment variable.
Mortimer

reply via email to

[Prev in Thread] Current Thread [Next in Thread]