<commit_before>(defpackage #:meta-info-from-quicklisp
  (:use :cl)
  (:export #:extract-and-save-asdf-system-dependencies
           #:get-dependencies
           #:get-system->project))

(in-package #:meta-info-from-quicklisp)

#|
;;;; To extract the meta info from your
;;;; quicklisp and save it into an intermediate file
;;;; (needs to be done only only once, as we have the intermediate
;;;; file commited):

  (extract-and-save-meta-info-from-quicklisp "C:\\Users\\anton\\quicklisp\\dists\\quicklisp\\systems.txt")
  => NIL

;;;; To use the meta info from the intermediate file:

  (get-dependencies)
  => #<hash-table {system-name: (dependency-system-names...),
                   ...}> 

  (get-system->project)
  => #<hash-table {system-name: project-name,
                   system-name: project-name,
                   ...}> 
|#

(defparameter +persistence-file+ (test-grid-reporting::src-file "meta-info-quicklisp-2013-01-28.lisp")
  "This is where dependencies are save to and loaded from.")

(defun skip-header (stream file-pathname)
  (let ((header (read-line stream)))
    (unless (and (plusp (length header))
                 (char= (char header 0) #\#))
      (error "Bad header line in ~A -- ~S"
             file-pathname header))))

(defun extract-meta-info (quicklisp-index-file)
  "Returns an alist mapping each ASDF system name in Quicklisp
to a list of it's dependencies. QUICKLISP-INDEX-FILLE
is a pathname of a quicklisp/dists/quicklisp/systems.txt."
  (let (system->dependencies<commit_msg>reporting: use projects interdependency information from Quicklisp 2013-08-13<commit_after>(defpackage #:meta-info-from-quicklisp
  (:use :cl)
  (:export #:extract-and-save-asdf-system-dependencies
           #:get-dependencies
           #:get-system->project))

(in-package #:meta-info-from-quicklisp)

#|
;;;; To extract the meta info from your
;;;; quicklisp and save it into an intermediate file
;;;; (needs to be done only only once, as we have the intermediate
;;;; file commited):

  (extract-and-save-meta-info-from-quicklisp "C:\\Users\\anton\\quicklisp\\dists\\quicklisp\\systems.txt")
  => NIL

;;;; To use the meta info from the intermediate file:

  (get-dependencies)
  => #<hash-table {system-name: (dependency-system-names...),
                   ...}> 

  (get-system->project)
  => #<hash-table {system-name: project-name,
                   system-name: project-name,
                   ...}> 
|#

(defparameter +persistence-file+ (test-grid-reporting::src-file "meta-info-quicklisp-2013-08-13.lisp")
  "This is where dependencies are save to and loaded from.")

(defun skip-header (stream file-pathname)
  (let ((header (read-line stream)))
    (unless (and (plusp (length header))
                 (char= (char header 0) #\#))
      (error "Bad header line in ~A -- ~S"
             file-pathname header))))

(defun extract-meta-info (quicklisp-index-file)
  "Returns an alist mapping each ASDF system name in Quicklisp
to a list of it's dependencies. QUICKLISP-INDEX-FILLE
is a pathname of a quicklisp/dists/quicklisp/systems.txt."
  (let (system->dependencies
{'fraction_non_alphanumeric': 0.14796905222437137, 'fraction_numerical': 0.008381689232753063, 'mean_word_length': 3.009043927648579, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 19, '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': '3091835', 'n_tokens_mistral': 1044, 'n_tokens_neox': 963, 'n_words': 264}