1
0

2 Коммитууд d69425f7e3 ... 617ee0d13e

Эзэн SHA1 Мессеж Огноо
  George C. Privon 617ee0d13e de-duplicate open calls when there are multiple telescopes for a single solicitation. fixes #15 4 сар өмнө
  George C. Privon d51f077a88 comments/guidance in configuration file example 8 сар өмнө

+ 4 - 0
CHANGELOG.md

@@ -2,6 +2,10 @@
 
 ## v0.3.x
 
+### v0.3.1 (in preparation)
+
+- Annotate example configuration file with guidance.
+
 ### v0.3.0 (20 April 2025)
 
 - Add option to specify date ranges or limits using `--start-date` and `--end-date`. This applies to `list-*` and `stats` command options.

+ 2 - 0
config.rkt.example

@@ -3,6 +3,8 @@
 (provide dbloc
          PIname)
 
+; Update this to provide the path of the proposals SQLite database file
 (define dbloc "/path/to/database")
 
+; Update this to the PI's family name
 (define PIname "Lastname")

+ 3 - 5
proposal_database.rkt

@@ -95,8 +95,6 @@
   (define have-CoI (> (- Nprop Nprop-PI) 0))
   (displayln (string-append
               (vector-ref entry 1)
-              " "
-              (vector-ref entry 2)
               " ("
               (vector-ref entry 0)
               ") - "
@@ -283,7 +281,7 @@ resultdate TEXT DEFAULT '')")
 
 ; retrieve and print proposal calls
 (define (print-open-calls conn)
-  (define call-entries (query-rows conn (string-append "SELECT DISTINCT organization,telescope,solicitation FROM proposals WHERE status='submitted'")))
+  (define call-entries (query-rows conn (string-append "SELECT DISTINCT organization,solicitation FROM proposals WHERE status='submitted'")))
   (displayln (string-append (number->string (length call-entries))
                             " pending calls found."))
   (newline)
@@ -291,12 +289,12 @@ resultdate TEXT DEFAULT '')")
   (map (lambda (call-entry)
          (define Nprop (query-value conn (string-append get_prop_count_base
                                                         "WHERE status='submitted' AND solicitation='"
-                                                        (vector-ref call-entry 2)
+                                                        (vector-ref call-entry 1)
                                                         "'")))
          (define Nprop-PI
            (query-value conn (string-append get_prop_count_base
                                             "WHERE status='submitted' AND solicitation='"
-                                            (vector-ref call-entry 2)
+                                            (vector-ref call-entry 1)
                                             "' AND PI LIKE '%"
                                             PIname
                                             "%'")))