<commit_before>(ns grafter.tabular
  "Functions for processing tabular data."
  (:require [clojure.set :as set]
            [clojure.string :as str]
            [grafter.pipeline :refer [graft-form->Pipeline]]
            [grafter.tabular.common :refer [lift->vector map-keys] :as tabc]
            [grafter.tabular.csv]
            [grafter.tabular.excel]
            [grafter.tabular.melt]
            [clojure.tools.logging :refer [spy]]
            [incanter.core :as inc]
            [potemkin.namespaces :refer [import-vars]]
            [grafter.common :refer [build-defgraft-docstring]]))

(import-vars
 [grafter.tabular.common
  dataset?
  column-names
  make-dataset
  move-first-row-to-header
  read-dataset
  read-datasets
  write-dataset
  with-metadata-columns
  without-metadata-columns
  resolve-column-id]
 [grafter.tabular.melt
  melt])

(defn test-dataset
  "Constructs a test dataset of r rows by c cols e.g.
<commit_msg>Tidy up namespace definition<commit_after>(ns ^{:doc "Functions for processing tabular data."}
  grafter.tabular
  "Functions for processing tabular data."
  (:require [clojure
             [set :as set]
             [string :as str]]
            [grafter
             [common :refer [build-defgraft-docstring]]
             [pipeline :refer [graft-form->Pipeline]]]
            [grafter.tabular.common :as tabc :refer [lift->vector map-keys]]
            [incanter.core :as inc]
            [potemkin.namespaces :refer [import-vars]]
            [grafter.tabular.melt]))

(import-vars
 [grafter.tabular.common
  dataset?
  column-names
  make-dataset
  move-first-row-to-header
  read-dataset
  read-datasets
  write-dataset
  with-metadata-columns
  without-metadata-columns
  resolve-column-id]
 [grafter.tabular.melt
  melt])

(defn test-dataset
  "Constructs a test dataset of r rows by c cols e.g.

{'fraction_non_alphanumeric': 0.11490514905149052, 'fraction_numerical': 0.0, 'mean_word_length': 2.5363984674329503, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 7, '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': '6415670', 'n_tokens_mistral': 588, 'n_tokens_neox': 610, 'n_words': 136}