<commit_before>require 'dry-container'
require 'dry-auto_inject'

%w[markdown http_request].each { |file| require_relative "ossboard/core/#{file}" }

%w[
  analytic_reporter github_issue_requester url_shortener
  gitlab_issue_requester points_calculator task_tweeter
].each { |file| require_relative "ossboard/services/#{file}" }

require_relative 'ossboard/matchers/git_host_matcher'

class Container
  extend Dry::Container::Mixin

  register('core.markdown', Core::Markdown.new)
  register('core.http_request', Core::HttpRequest.new)

  register('services.analytic_reporter', Services::AnalyticReporter.new)
  register('services.github_issue_requester', Services::GithubIssueRequester.new)
  register('services.gitlab_issue_requester', Services::GitlabIssueRequester.new)
  register('services.points_calculator', Services::PointsCalculator.new)
  register('services.task_twitter', Services::TaskTwitter.new)
  register('services.url_shortener', Services::UrlShortener.new)

  register('matchers.git_host', Matchers::GitHost::Matcher)

  register('tasks.interactors.create') { Tasks::Interactors::Create }
  register('tasks.interactors.update_status') { Tasks::Interactors::UpdateStatus }
  register('tasks.interactors.issue_information') { Tasks::Interactors::IssueInformation }
end

Import = Dry::AutoInject(Container)<commit_msg>Use namspaces in container<commit_after>require 'dry-container'
require 'dry-auto_inject'

%w[markdown http_request].each { |file| require_relative "ossboard/core/#{file}" }

%w[
  analytic_reporter github_issue_requester url_shortener
  gitlab_issue_requester points_calculator task_tweeter
].each { |file| require_relative "ossboard/services/#{file}" }

require_relative 'ossboard/matchers/git_host_matcher'

class Container
  extend Dry::Container::Mixin

  register('core.markdown', Core::Markdown.new)
  register('core.http_request', Core::HttpRequest.new)

  namespace('services') do
    register('analytic_reporter', Services::AnalyticReporter.new)
    register('github_issue_requester', Services::GithubIssueRequester.new)
    register('gitlab_issue_requester', Services::GitlabIssueRequester.new)
    register('points_calculator', Services::PointsCalculator.new)
    register('task_twitter', Services::TaskTwitter.new)
    register('url_shortener', Services::UrlShortener.new)
  end

  register('matchers.git_host', Matchers::GitHost::Matcher)

  namespace('tasks') do
    namespace('interactors') do
      register('create') { Tasks::Interactors::Create }
      register('update_status') { Tasks::Interactors::UpdateStatus }
      register('issue_information') { Tasks::Interactors::IssueInformation }
    end
  end
end

Import = Dry::AutoInject(Container)
{'fraction_non_alphanumeric': 0.1259259259259259, 'fraction_numerical': 0.0, 'mean_word_length': 7.684887459807074, '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': '2683343', 'n_tokens_mistral': 852, 'n_tokens_neox': 801, 'n_words': 117}