<commit_before>module Query
  # Common code for all location queries.
  class LocationBase < Query::Base
    include Query::Initializers::ContentFilters

    def model
      Location
    end

    def parameter_declarations
      super.merge(
        created_at?: [:time],
        updated_at?: [:time],
        users?:      [User],
        north?:      :float,
        south?:      :float,
        east?:       :float,
        west?:       :float
      ).merge(content_filter_parameter_declarations(Location))
    end

    def initialize_flavor
      initialize_model_do_time(:created_at)
      initialize_model_do_time(:updated_at)
      initialize_model_do_objects_by_id(:users)
      initialize_model_do_location_bounding_box
      initialize_content_filters(Location)
      super
    end

    def default_order
      "name"
    end
  end
end
<commit_msg>Have Query::LocationBase ignore users, created_at and updated_at parameters for with_observations... queries because LocationsWithObservations will take care of those now.  That is, those three parameters apply to the *observation* not the *location* for with_observation_xxx queries.<commit_after>module Query
  # Common code for all location queries.
  class LocationBase < Query::Base
    include Query::Initializers::ContentFilters

    def model
      Location
    end

    def parameter_declarations
      super.merge(
        created_at?: [:time],
        updated_at?: [:time],
        users?:      [User],
        north?:      :float,
        south?:      :float,
        east?:       :float,
        west?:       :float
      ).merge(content_filter_parameter_declarations(Location))
    end

    def initialize_flavor
      unless is_a?(LocationWithObservations)
        initialize_model_do_time(:created_at)
        initialize_model_do_time(:updated_at)
        initialize_model_do_objects_by_id(:users)
      end
      initialize_model_do_location_bounding_box
      initialize_content_filters(Location)
      super
    end

    def default_order
      "name"
    end
  end
end

{'fraction_non_alphanumeric': 0.07135874877810362, 'fraction_numerical': 0.0, 'mean_word_length': 2.7150635208711433, 'pattern_counts': {'":': 0, '<': 5, '<?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': '4759324', 'n_tokens_mistral': 572, 'n_tokens_neox': 566, 'n_words': 138}