Skip to content

Commit df0770b

Browse files
committed
Fix linting
1 parent 137356c commit df0770b

File tree

7 files changed

+141
-17
lines changed

7 files changed

+141
-17
lines changed

bin/lint-flight-plans

Lines changed: 15 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -12,27 +12,28 @@ require_relative '../validations/block_structure'
1212
require_relative '../validations/flight_plan_length'
1313
# require_relative '../validations/note_spelling'
1414

15-
require_relative '../experience_course'
15+
# Load all courses
16+
require_relative '../source/experience-course/course'
17+
require_relative '../source/bc-ai-course/course'
1618

1719
validations = Validations.constants.map do |validator|
1820
puts "Loading validator: #{validator}"
1921
klass = Validations.const_get(validator)
2022
klass.new
2123
end
2224

23-
validator = BCF::FlightPlans::Validator.new(
24-
EXPERIENCE_COURSE,
25-
validations,
26-
)
27-
28-
unless validator.is_valid?
29-
warn "Course is invalid"
30-
31-
validator.errors.each do |error|
32-
warn error
25+
# Validate each course
26+
[EXPERIENCE_COURSE, BC_AI_COURSE].each do |course|
27+
puts "\nValidating #{course.title}..."
28+
validator = BCF::FlightPlans::Validator.new(course, validations)
29+
30+
unless validator.is_valid?
31+
warn "#{course.title} is invalid"
32+
validator.errors.each do |error|
33+
warn error
34+
end
35+
exit 1
3336
end
3437

35-
exit 1
38+
puts "#{course.title} is valid"
3639
end
37-
38-
puts "Course is valid"

source/bc-ai-course/bc-ai-module-1.rb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
require 'bcf/flightplans'
2-
require_relative './common_blocks'
3-
require_relative './common_resources'
2+
require_relative '../shared/common_blocks'
3+
require_relative '../shared/common_resources'
44

5-
BCWAI_MODULE_1 = BCF::FlightPlans::ConventionalFlightPlan.build do
5+
BC_AI_MODULE_1 = BCF::FlightPlans::ConventionalFlightPlan.build do
66
module_title "Human-AI Interaction"
77
module_number 1
88

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
require 'bcf/flightplans'
2+
require_relative '../shared/common_blocks'
3+
require_relative '../shared/common_resources'
4+
5+
BC_AI_MODULE_2 = BCF::FlightPlans::ConventionalFlightPlan.build do
6+
module_title "Goal-setting"
7+
module_number 2
8+
9+
learning_outcomes <<~MD
10+
Learners will be able to:
11+
12+
- [To be defined]
13+
14+
Suggested learning outcomes for further trainings/interventions
15+
16+
- [To be defined]
17+
MD
18+
19+
demo <<~MD
20+
tbc
21+
MD
22+
23+
block(BCF::FlightPlans::CommonBlocks::PRE_FLIGHT)
24+
block(BCF::FlightPlans::CommonBlocks::GREETING)
25+
instruction_starts
26+
instruction_ends
27+
end
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
require 'bcf/flightplans'
2+
require_relative '../shared/common_blocks'
3+
require_relative '../shared/common_resources'
4+
5+
BC_AI_MODULE_3 = BCF::FlightPlans::ConventionalFlightPlan.build do
6+
module_title "Oversight"
7+
module_number 3
8+
9+
learning_outcomes <<~MD
10+
Learners will be able to:
11+
12+
- [To be defined]
13+
14+
Suggested learning outcomes for further trainings/interventions
15+
16+
- [To be defined]
17+
MD
18+
19+
demo <<~MD
20+
tbc
21+
MD
22+
23+
block(BCF::FlightPlans::CommonBlocks::PRE_FLIGHT)
24+
block(BCF::FlightPlans::CommonBlocks::GREETING)
25+
instruction_starts
26+
instruction_ends
27+
end
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
require 'bcf/flightplans'
2+
require_relative '../shared/common_blocks'
3+
require_relative '../shared/common_resources'
4+
5+
BC_AI_MODULE_4 = BCF::FlightPlans::ConventionalFlightPlan.build do
6+
module_title "Feedback"
7+
module_number 4
8+
9+
learning_outcomes <<~MD
10+
Learners will be able to:
11+
12+
- [To be defined]
13+
14+
Suggested learning outcomes for further trainings/interventions
15+
16+
- [To be defined]
17+
MD
18+
19+
demo <<~MD
20+
tbc
21+
MD
22+
23+
block(BCF::FlightPlans::CommonBlocks::PRE_FLIGHT)
24+
block(BCF::FlightPlans::CommonBlocks::GREETING)
25+
instruction_starts
26+
instruction_ends
27+
end
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
require 'bcf/flightplans'
2+
require_relative '../shared/common_blocks'
3+
require_relative '../shared/common_resources'
4+
5+
BC_AI_MODULE_5 = BCF::FlightPlans::ConventionalFlightPlan.build do
6+
module_title "Ethical Use of AIs"
7+
module_number 5
8+
9+
learning_outcomes <<~MD
10+
Learners will be able to:
11+
12+
- [To be defined]
13+
14+
Suggested learning outcomes for further trainings/interventions
15+
16+
- [To be defined]
17+
MD
18+
19+
demo <<~MD
20+
tbc
21+
MD
22+
23+
block(BCF::FlightPlans::CommonBlocks::PRE_FLIGHT)
24+
block(BCF::FlightPlans::CommonBlocks::GREETING)
25+
instruction_starts
26+
instruction_ends
27+
end

source/bc-ai-course/course.rb

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
require 'bcf/flightplans'
2+
3+
require_relative 'bc-ai-module-1'
4+
require_relative 'bc-ai-module-2'
5+
require_relative 'bc-ai-module-3'
6+
require_relative 'bc-ai-module-4'
7+
require_relative 'bc-ai-module-5'
8+
9+
BC_AI_COURSE = BCF::FlightPlans::define_course "Better Conversations with AI", [
10+
BC_AI_MODULE_1,
11+
BC_AI_MODULE_2,
12+
BC_AI_MODULE_3,
13+
BC_AI_MODULE_4,
14+
BC_AI_MODULE_5,
15+
]

0 commit comments

Comments
 (0)