|
From: | Mortimer Cladwell |
Subject: | Re: A test suite that use a lib |
Date: | Fri, 30 Apr 2021 01:56:57 -0400 |
Hi Mortimer!
You should put all your external module code, or 3rd party modules into "lib"
directory. And this path will be added automatically when you run `art
work'. Say, "lib/labsolns/"
Best regards.
Mortimer Cladwell writes:
> 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
--
GNU Powered it
GPL Protected it
GOD Blessed it
HFG - NalaGinrut
Fingerprint F53B 4C56 95B5 E4D5 6093 4324 8469 6772 846A 0058
[Prev in Thread] | Current Thread | [Next in Thread] |