<commit_before>module DataHygiene
  # Can be used to republish a bunch of models to the Publishing API.
  #
  # Usage:
  #
  #   scope = CaseStudy.published
  #   publisher = DataHygiene::PublishingApiRepublisher.new(scope)
  #   publisher.perform
  #
  class PublishingApiRepublisher
    attr_reader :logger, :scope, :republished, :skipped

    def initialize(scope, logger=Logger.new(STDOUT))
      @scope = scope
      @logger = logger<commit_msg>Add additional notes around skipping of editions<commit_after>module DataHygiene
  # Can be used to republish a bunch of models to the Publishing API.
  #
  # Usage:
  #
  #   scope = CaseStudy.published
  #   publisher = DataHygiene::PublishingApiRepublisher.new(scope)
  #   publisher.perform
  #
  # Note: when the scope passed in is for Editions, this will skip over any
  # that are not in a publically visible state (i.e. not published or archived).
  # Once the Publishing API has support for handling draft content, this should
  # be updated so that draft content can be pushed to the draft stack.
  class PublishingApiRepublisher
    attr_reader :logger, :scope, :republished, :skipped

    def initialize(scope, logger=Logger.new(STDOUT))
      @scope = scope
      @logger = logger
{'fraction_non_alphanumeric': 0.07481898632341111, 'fraction_numerical': 0.0, 'mean_word_length': 3.6591760299625467, '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': '4661075', 'n_tokens_mistral': 373, 'n_tokens_neox': 360, 'n_words': 127}