<commit_before>(defpackage #:test-grid-blobstore
  (:use :cl)
  (:export #:submit-files
           #:submit-run-info
           #:tell-admin))

(in-package #:test-grid-blobstore)

(defgeneric submit-files (blobstore id-pathname-alist)
  (:documentation
   "Submits the files to the blobstore. Returns blob keys
for every submitted file (the blobkey is used for later
references to the file in the blobstore).

Example:
 (submit-files my-blobstore '((:flexi-streams . #P\"flexi-streams.log\")
                              (:cl-ppcre . #P\"cl-ppcre.log\")))
  => ((:flexi-streams . \"nFeUku39YtilF6s8zkXTlg\")
      (:cl-ppcre . \"nG9B8tHEquLEPhsL3t8wcA\"))

The ID in the ID-PATHNAME-ALIST may be either a string or a symbol,
and must be unique when compared case insensitively.

If the function returns without errors, it is guaranteed
that all the files are submitted and the return value
has a blobkey for every file.

Signals an ERROR in case of problems."))

(defgeneric submit-run-info (blobstore run-info))

(defgeneric tell-admin (blobstore subject body))<commit_msg>Docstrings to the test-grid-blobstore generic functions.<commit_after>(defpackage #:test-grid-blobstore
  (:use :cl)
  (:export #:submit-files
           #:submit-run-info
           #:tell-admin))

(in-package #:test-grid-blobstore)

(defgeneric submit-files (blobstore id-pathname-alist)
  (:documentation
   "Submits the files to the blobstore. Returns blob keys
for every submitted file (the blobkey is used for later
references to the file in the blobstore).

Example:
 (submit-files my-blobstore '((:flexi-streams . #P\"flexi-streams.log\")
                              (:cl-ppcre . #P\"cl-ppcre.log\")))
  => ((:flexi-streams . \"nFeUku39YtilF6s8zkXTlg\")
      (:cl-ppcre . \"nG9B8tHEquLEPhsL3t8wcA\"))

The ID in the ID-PATHNAME-ALIST may be either a string or a symbol,
and must be unique when compared case insensitively.

If the function returns without errors, it is guaranteed
that all the files are submitted and the return value
has a blobkey for every file.

Signals an ERROR in case of problems."))

(defgeneric submit-run-info (blobstore run-info)
  "Submits test run result RUN-INFO (a lisp object)
to central database.")

(defgeneric tell-admin (blobstore subject body)
  "Sends message to admin.")
{'fraction_non_alphanumeric': 0.11154684095860566, 'fraction_numerical': 0.006971677559912854, 'mean_word_length': 3.4756335282651074, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3795145', 'n_tokens_mistral': 759, 'n_tokens_neox': 732, 'n_words': 247}