Skip to content

Commit

Permalink
remove shared class implementation
Browse files Browse the repository at this point in the history
  • Loading branch information
Tooyosi committed Nov 5, 2024
1 parent f666b78 commit 148e2b6
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 70 deletions.
8 changes: 6 additions & 2 deletions app/modules/label_extractors/galaxy_zoo/base_extractor.rb
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,13 @@ def self.data_labels
self::TASK_KEY_DATA_LABELS
end

# Base version of question_answers_schema method to be customized by subclasses
# provide a flat task question and answers list for the decals mission catalogues
def self.question_answers_schema
raise NotImplementedError, "Subclass must define `question_answers_schema`"
label_prefixes.map do |task_key, question_prefix|
data_labels[task_key].values.map do |answer_suffix|
"#{question_prefix}-#{data_release_suffix}_#{answer_suffix}"
end
end.flatten
end

private
Expand Down
2 changes: 1 addition & 1 deletion app/modules/label_extractors/galaxy_zoo/cosmic_dawn.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

module LabelExtractors
module GalaxyZoo
class CosmicDawn < LabelExtractors::Shared::CosmicDawnAndEuclid
class CosmicDawn < BaseExtractor

# GZ decision tree task schema and lable tables
#
Expand Down
2 changes: 1 addition & 1 deletion app/modules/label_extractors/galaxy_zoo/euclid.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

module LabelExtractors
module GalaxyZoo
class Euclid < LabelExtractors::Shared::CosmicDawnAndEuclid
class Euclid < BaseExtractor

attr_reader :task_lookup_key, :task_prefix_label

Expand Down
22 changes: 0 additions & 22 deletions app/modules/label_extractors/shared/cosmic_dawn_and_euclid.rb

This file was deleted.

This file was deleted.

0 comments on commit 148e2b6

Please sign in to comment.