<commit_before>
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  languages: this should know its own path, and that path
  is retrieved from it in linux_paas.rb not like this
        when Languages
        root(obj.dojo) + 'languages/'
  but like this
        when Languages
        obj.path
  Indeed, perhaps each object should know its own path
  so the whole case disappears, and path(obj) becomes obj.path

  This opens up possibility of Languages being selectable
  from different folders.
  Same for exercises.
  Same for katas.
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  max-duration could be a ctor parameter for DockerRunner
  and not for test()?
  Or is it feasible that the duration could become a parameter
  in a language manifest for example?
  What about tests? Is it simpler to substitute a different
  max-duration as a parameter? I think so.
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  test/app_models/avatar_tests.rb
  has some tests that need reviving.
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  OutputParser could be another object hung of Thread.current
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  languages/ and exercises/ need Stubs - these are read from only
  katas/ needs FakeDisk/Dir - these are read-write
  A mock-Disk could be comprised of three separate delegated to Disks
       - one for languages/
       - one for exercises/
       - one for katas/
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  now LinuxPaas.create_dojo() has only one argument I could do this...
     paas.dojos[root_path].katas[id]
     where paas.dojos[root_path] gives you a dojo object
     which may or may not exist (just like katas[id])
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  kata.animals['lion'].tag[4]
    handy shortcut for this could be
  kata.lion.tag[4]
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  test/app_models/languages_tests.rb
    has spy_read that should be spy_exists
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  There should be a dependency on the language manifest file
  only for startup. Once started a kata should have a *copy* of
  the manifest. Eg, I edit the manifest's highlight_filenames settings
  it should affects only those katas started after the edit.
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  add in example of each primitive useable in the unit-test-framework
  chosen. As an example see the starting test code for James' cpputest.
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  is make_manifest in test_helper.rb used anywhere anymore?
  move app/lib/Choose.language into app/models/Languages?
  move app/lib/Choose.exercise into app/models/Exercises?
  move app/lib/Folders.id_complete into app/models/Katas.complete(id) ?
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -<commit_msg>refactoring notes<commit_after>
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  put fake/mock/stub/spy classes into same folder as the real things.
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  languages: this should know its own path, and that path
  is retrieved from it in linux_paas.rb not like this
        when Languages
        root(obj.dojo) + 'languages/'
  but like this
        when Languages
        obj.path
  Indeed, perhaps each object should know its own path
  so the whole case disappears, and path(obj) becomes obj.path
  And then there will be no need to go back to the paas to
  read/write files (for example).
    raw = paas.read(self, manifest_filename)
  can become
    raw = paas.read(path, manifest_filename)
  So paas is constructed with
     3 object pre-constructed: git, disk, runner
     3 object paths: languages/, exercises/, katas/
  and the paas ctor does
     Languages.new(self, languages_root)
  or
  abstract the path and the paas ctor is passed in factory
  class Paas
    def initialize(config)
      @languages = config[:languages].create(self)
    end
  end
  class LanguagesFactory
    def initialize(path)
      @path = path
    end
    def create(paas)
      Languages.new(paas, @path)
    end
  end
  paas = Paas.new({
    :languages => LanguagesFactory.new(languages_root),
    :exercises => ExercisesFactory.new(exercises_root),
    :katas     => KatasFactory.new(katas_root),
    :disk   => Disk.new
    :git    => Git.new,
    :runner => DockerRunner.new
  })
  or would plain 'blocks' be simpler?
  paas = Paas.new({
    :languages => ->{ Languages.new(self,'.../languages/') }
    :exercises => ->{ Exercises.new(self,'.../exercises/') }
    :katas     => ->{     Katas.new(self,'.../katas/') }
    :disk   => Disk.new
    :git    => Git.new,
    :runner => DockerRunner.new
  })
  What is self in context here? Don't think it will be paas.


  I think this would mean model objects do not need to store their
  parent (eg kata -> dojo)

  Check language interaction with Choose.language()
  Check exercise interaction with Choose.exercise()

  This opens up possibility of Languages being selectable
  from different folders.
  Same for exercises.
  Same for katas.
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  max-duration could be a ctor parameter for DockerRunner
  and not for test()?
  Or is it feasible that the duration could become a parameter
  in a language manifest for example?
  What about tests? Is it simpler to substitute a different
  max-duration as a parameter? I think so.
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  test/app_models/avatar_tests.rb
  has some tests that need reviving.
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  OutputParser could be another object hung of Thread.current
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  languages/ and exercises/ need Stubs - these are read from only
  katas/ needs FakeDisk/Dir - these are read-write
  A mock-Disk could be comprised of three separate delegated to Disks
       - one for languages/
       - one for exercises/
       - one for katas/
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  now LinuxPaas.create_dojo() has only one argument I could do this...
     paas.dojos[root_path].katas[id]
     where paas.dojos[root_path] gives you a dojo object
     which may or may not exist (just like katas[id])
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  kata.avatars['lion'].tag[4]
    handy shortcut for this could be
  kata.lion.tag[4]
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  test/app_models/languages_tests.rb
    has spy_read that should be spy_exists
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  There should be a dependency on the language manifest file
  only for startup. Once started a kata should have a *copy* of
  the manifest. Eg, I edit the manifest's highlight_filenames settings
  it should affects only those katas started after the edit.
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  add in example of each primitive useable in the unit-test-framework
  chosen. As an example see the starting test code for James' cpputest.
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  is make_manifest in test_helper.rb used anywhere anymore?
  move app/lib/Choose.language into app/models/Languages?
  move app/lib/Choose.exercise into app/models/Exercises?
  move app/lib/Folders.id_complete into app/models/Katas.complete(id) ?
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
{'fraction_non_alphanumeric': 0.15926892950391644, 'fraction_numerical': 0.000783289817232376, 'mean_word_length': 1.5184089414858646, 'pattern_counts': {'":': 0, '<': 3, '<?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': 100, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7284631', 'n_tokens_mistral': 2642, 'n_tokens_neox': 2601, 'n_words': 739}