<commit_before>(in-package #:tinaa)

(defgeneric document-part-p (name-holder part)
  (:documentation ""))

(defgeneric subpart-kinds (assembly)
  (:documentation "Returns a list of the kinds of the subparts of assembly.
This is a list of instances of subpart-kind."))

(defgeneric index-kinds (part)
  (:documentation "Returns a list describing what indexes to generate for this part. This list is a list of lists of subpart kinds. Each item in the list generates one index and the index will include all of these part kinds.")
  (:method ((part t)) nil))

(defgeneric partname-list (part part-kind)
  (:documentation "Returns a list of the names of the subparts of part of type 'part-kind'. Usually, these will be symbols but they could be strings too.")
  (:method :around (part part-kind)
       (declare (ignore part part-kind))
	   (handler-case (call-next-method)
	     (error () (princ ".") nil))))


(defgeneric display-part (page-writer part mode &key &allow-other-keys)
  (:documentation "Output information about a part. Example modes are 
:subpart-list, :detail, :summary.")
  (:method :around ((writer simple-page-writer) part mode &key &allow-other-keys)
           (when (documentation-exists-p part mode)
             (call-next-method)))) 


(defgeneric document-system-part (system part stream)
  (:documentation ""))


(defgeneric make-system-part (system part-kind part-name &key)
  (:documentation ""))


(defgeneric part-name (part)
  (:documentation "Returns the name of the part as a string"))


(defgeneric part-documentation (part)
  (:documentation "Returns whatever documentation is available for part using the Common Lisp documentation function."))


(defgeneric short-documentation (part)
  (:documentation "Returns the first bit of the documentation for part.
Change *short-documentation-length* to determine how much is returned."))


(defgeneric document-part-to-file (page-writer part)
  (:documentation ""))


(defgeneric url-for-part (part)
  (:documentation "Returns the url for the part, creating it if necessary."))


(defgeneric find-part (ancester kind name)
  (:documentation "Returns a existing part if it can be found.")
  (:method (parent kind name)
           (declare (ignore parent kind name))
           (values nil)))


(defgeneric grovel-part (part)
  (:documentation ""))


(defgeneric finish-grovel (part)
  (:documentation ""))


(defgeneric documentation-exists-p (part mode)
  (:documentation "")
  (:method (part mode)
           ;; one around method -- oh vey!
           (length-at-least-p 
            (compute-applicable-methods 
             #'display-part 
             (list (page-writer (root-parent part))  part mode))
            2)))


(defgeneric make-part (parent kind name &key)
  (:documentation "Make a part named 'name' of kind 'kind' whose parent is 'parent'."))


(defgeneric include-kind-in-index-p (part kind)
  (:documentation "Returns true if part should include kind in it's index."))


(defgeneric span-class-for-part-name (name-holder part)
  (:documentation "Returns the class to be used when displaying the part's name."))


(defgeneric show-part-parents (part)
  (:documentation "Generate HTML to show the parents of a part. Called for a part only when it actually has parents \(using an around method\)."))


(defgeneric output-table-summary-of-parts (writer part subpart-name heading)
  (:documentation ""))


(defgeneric build-index-links (for-part index-part current-index)
  (:documentation ""))<commit_msg>de-kruft api.lisp<commit_after>(in-package #:tinaa)

(defgeneric document-part-p (name-holder part)
  (:documentation ""))

(defgeneric subpart-kinds (assembly)
  (:documentation "Returns a list of the kinds of the subparts of assembly.
This is a list of instances of subpart-kind."))

(defgeneric index-kinds (part)
  (:documentation "Returns a list describing what indexes to generate for this part. This list is a list of lists of subpart kinds. Each item in the list generates one index and the index will include all of these part kinds.")
  (:method ((part t)) nil))

(defgeneric partname-list (part part-kind)
  (:documentation "Returns a list of the names of the subparts of part of type 'part-kind'. Usually, these will be symbols but they could be strings too."))

(defgeneric display-part (page-writer part mode &key &allow-other-keys)
  (:documentation "Output information about a part. Example modes are 
:subpart-list, :detail, :summary.")) 

(defgeneric document-system-part (system part stream)
  (:documentation ""))

(defgeneric make-system-part (system part-kind part-name &key)
  (:documentation ""))

(defgeneric part-name (part)
  (:documentation "Returns the name of the part as a string"))

(defgeneric part-documentation (part)
  (:documentation "Returns whatever documentation is available for part using the Common Lisp documentation function."))


(defgeneric short-documentation (part)
  (:documentation "Returns the first bit of the documentation for part.
Change *short-documentation-length* to determine how much is returned."))


(defgeneric document-part-to-file (page-writer part)
  (:documentation ""))

(defgeneric url-for-part (part)
  (:documentation "Returns the url for the part, creating it if necessary."))

(defgeneric find-part (ancester kind name)
  (:documentation "Returns a existing part if it can be found."))

(defgeneric grovel-part (part)
  (:documentation ""))

(defgeneric finish-grovel (part)
  (:documentation ""))

(defgeneric documentation-exists-p (part mode)
  (:documentation ""))

(defgeneric make-part (parent kind name &key)
  (:documentation
   "Make a part named 'name' of kind 'kind' whose parent is 'parent'."))

(defgeneric include-kind-in-index-p (part kind)
  (:documentation "Returns true if part should include kind in it's index."))


(defgeneric span-class-for-part-name (name-holder part)
  (:documentation "Returns the class to be used when displaying the part's name."))


(defgeneric show-part-parents (part)
  (:documentation "Generate HTML to show the parents of a part. Called for a part only when it actually has parents \(using an around method\)."))


(defgeneric output-table-summary-of-parts (writer part subpart-name heading)
  (:documentation ""))


(defgeneric build-index-links (for-part index-part current-index)
  (:documentation ""))

{'fraction_non_alphanumeric': 0.11518407331331965, 'fraction_numerical': 0.00015800284405119292, 'mean_word_length': 4.137987012987013, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '3980984', 'n_tokens_mistral': 1874, 'n_tokens_neox': 1721, 'n_words': 710}