Skip to content

Commit 2b5b9af

Browse files
authored
Merge branch 'code-differently:main' into Lesson07
2 parents 4d95d64 + fc54da1 commit 2b5b9af

33 files changed

+7291
-228
lines changed
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
name: Check Lesson 10 Pull Request
2+
3+
on:
4+
pull_request:
5+
branches: [ "main" ]
6+
paths:
7+
- "lesson_10/libraries/**"
8+
9+
jobs:
10+
build:
11+
12+
runs-on: ubuntu-latest
13+
permissions:
14+
contents: read
15+
16+
steps:
17+
- uses: actions/checkout@v4
18+
19+
- name: Use Node.js
20+
uses: actions/setup-node@v4
21+
with:
22+
node-version: '20.x'
23+
24+
- name: Build Lesson 10 with Node.js
25+
working-directory: ./lesson_10/libraries
26+
run: |
27+
npm ci
28+
npm run check

.github/workflows/check_push.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ on:
1010
- "lesson_06/expression/**"
1111
- "lesson_07/conditionals/**"
1212
- "lesson_09/types/**"
13+
- "lesson_10/libraries/**"
1314

1415
jobs:
1516
build:
@@ -75,4 +76,10 @@ jobs:
7576
working-directory: ./lesson_09/types
7677
run: ./gradlew check
7778

79+
- name: Build Lesson 10 with Node.js
80+
working-directory: ./lesson_10/libraries
81+
run: |
82+
npm ci
83+
npm run compile
84+
7885

lesson_10/README.md

Lines changed: 33 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,36 @@ Please review the following resources before lecture:
1010

1111
## Homework
1212

13-
TODO(anthonydmays): Complete this
13+
- [ ] Complete [Loading the Media Collection](#loading-the-media-collection) assignment.
14+
- [ ] Do pre-work for [lesson 11](/lesson_11/).
15+
16+
### Loading The Media Collection
17+
18+
For this assignment, you are tasked with writing code to load data from a set of CSV files.
19+
20+
* Use the example loader file at [libraries/src/loaders/anthony_mays_loader.ts][example-loader-file] to make your own unique copy of the loader.
21+
* Implement the `loadMediaItems` method by loading the data from the [data/media_items.csv][media-items-file] file.
22+
23+
To try out the app with your loader, you can run the following command.
24+
25+
```bash
26+
npm run compile
27+
npm start -- --loader yourLoaderNameHere
28+
```
29+
30+
Before submitting your work, be sure to run the tests.
31+
32+
```bash
33+
npm run test
34+
```
35+
36+
### Extra credit
37+
38+
For additional credit on this assignment, combine the credits with the media items you loaded by modifying the `loadData` method. You can test that you've loaded everything correctly by using this special command:
39+
40+
```bash
41+
LOADER_NAME=yourLoaderNameHere npm run test
42+
```
43+
44+
[example-loader-file]: ./libraries/src/loaders/anthony_mays_loader.ts
45+
[media-items-file]: ./libraries/data/media_items.csv

lesson_10/libraries/.editorconfig

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
root = true
2+
3+
[*]
4+
indent_style = space
5+
indent_size = 2
6+
end_of_line = lf
7+
charset = utf-8
8+
insert_final_newline = true
9+
quote_type = single

lesson_10/libraries/.eslintignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
build/

lesson_10/libraries/.prettierignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# Ignore artifacts:
2+
build
3+
coverage

lesson_10/libraries/.prettierrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
{}

lesson_10/libraries/data/credits.csv

Lines changed: 201 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,201 @@
1+
id,media_item_id,role,name
2+
1,1,Director,John Doe
3+
2,1,Producer,Jane Smith
4+
3,2,Actor,Chris Evans
5+
4,2,Actor,Scarlett Johansson
6+
5,3,Writer,Mark Twain
7+
6,3,Composer,Hans Zimmer
8+
7,4,Director,Steven Spielberg
9+
8,4,Producer,Kathleen Kennedy
10+
9,5,Actor,Robert Downey Jr.
11+
10,5,Actor,Chris Hemsworth
12+
11,6,Writer,George R.R. Martin
13+
12,6,Composer,John Williams
14+
13,7,Director,Christopher Nolan
15+
14,7,Producer,Emma Thomas
16+
15,8,Actor,Leonardo DiCaprio
17+
16,8,Actor,Brad Pitt
18+
17,9,Writer,J.K. Rowling
19+
18,9,Composer,Howard Shore
20+
19,10,Director,Quentin Tarantino
21+
20,10,Producer,Lawrence Bender
22+
21,11,Actor,Tom Hanks
23+
22,11,Actor,Robin Wright
24+
23,12,Writer,Stephen King
25+
24,12,Composer,Danny Elfman
26+
25,13,Director,Martin Scorsese
27+
26,13,Producer,Irwin Winkler
28+
27,14,Actor,Matt Damon
29+
28,14,Actor,Ben Affleck
30+
29,15,Writer,Agatha Christie
31+
30,15,Composer,Ennio Morricone
32+
31,16,Director,James Cameron
33+
32,16,Producer,Gale Anne Hurd
34+
33,17,Actor,Will Smith
35+
34,17,Actor,Tommy Lee Jones
36+
35,18,Writer,Arthur Conan Doyle
37+
36,18,Composer,James Horner
38+
37,19,Director,Peter Jackson
39+
38,19,Producer,Fran Walsh
40+
39,20,Actor,Daniel Radcliffe
41+
40,20,Actor,Emma Watson
42+
41,21,Writer,Isaac Asimov
43+
42,21,Composer,Alan Silvestri
44+
43,22,Director,Tim Burton
45+
44,22,Producer,Denise Di Novi
46+
45,23,Actor,Johnny Depp
47+
46,23,Actor,Helena Bonham Carter
48+
47,24,Writer,Ray Bradbury
49+
48,24,Composer,Michael Giacchino
50+
49,25,Director,Alfred Hitchcock
51+
50,25,Producer,David O. Selznick
52+
51,26,Actor,Humphrey Bogart
53+
52,26,Actor,Ingrid Bergman
54+
53,27,Writer,Ernest Hemingway
55+
54,27,Composer,Max Steiner
56+
55,28,Director,Stanley Kubrick
57+
56,28,Producer,Jan Harlan
58+
57,29,Actor,Marlon Brando
59+
58,29,Actor,Al Pacino
60+
59,30,Writer,F. Scott Fitzgerald
61+
60,30,Composer,Alexandre Desplat
62+
61,31,Director,Francis Ford Coppola
63+
62,31,Producer,Gray Frederickson
64+
63,32,Actor,Clint Eastwood
65+
64,32,Actor,Morgan Freeman
66+
65,33,Writer,William Shakespeare
67+
66,33,Composer,John Barry
68+
67,34,Director,Ridley Scott
69+
68,34,Producer,David Giler
70+
69,35,Actor,Harrison Ford
71+
70,35,Actor,Carrie Fisher
72+
71,36,Writer,Charles Dickens
73+
72,36,Composer,Elmer Bernstein
74+
73,37,Director,David Fincher
75+
74,37,Producer,Cean Chaffin
76+
75,38,Actor,Edward Norton
77+
76,38,Actor,Brad Pitt
78+
77,39,Writer,Jane Austen
79+
78,39,Composer,Thomas Newman
80+
79,40,Director,Clint Eastwood
81+
80,40,Producer,Robert Lorenz
82+
81,41,Actor,Christian Bale
83+
82,41,Actor,Heath Ledger
84+
83,42,Writer,Leo Tolstoy
85+
84,42,Composer,James Newton Howard
86+
85,43,Director,George Lucas
87+
86,43,Producer,Gary Kurtz
88+
87,44,Actor,Mark Hamill
89+
88,44,Actor,Harrison Ford
90+
89,45,Writer,Victor Hugo
91+
90,45,Composer,Patrick Doyle
92+
91,46,Director,Michael Bay
93+
92,46,Producer,Jerry Bruckheimer
94+
93,47,Actor,Shia LaBeouf
95+
94,47,Actor,Megan Fox
96+
95,48,Writer,Edgar Allan Poe
97+
96,48,Composer,John Ottman
98+
97,49,Director,James Wan
99+
98,49,Producer,Rob Cowan
100+
99,50,Actor,Patrick Wilson
101+
100,50,Actor,Vera Farmiga
102+
101,51,Writer,H.G. Wells
103+
102,51,Composer,Marco Beltrami
104+
103,52,Director,Guillermo del Toro
105+
104,52,Producer,J. Miles Dale
106+
105,53,Actor,Sally Hawkins
107+
106,53,Actor,Michael Shannon
108+
107,54,Writer,George Orwell
109+
108,54,Composer,Clint Mansell
110+
109,55,Director,Denis Villeneuve
111+
110,55,Producer,Andrew Kosove
112+
111,56,Actor,Ryan Gosling
113+
112,56,Actor,Harrison Ford
114+
113,57,Writer,Philip K. Dick
115+
114,57,Composer,Hans Zimmer
116+
115,58,Director,Paul Thomas Anderson
117+
116,58,Producer,JoAnne Sellar
118+
117,59,Actor,Daniel Day-Lewis
119+
118,59,Actor,Paul Dano
120+
119,60,Writer,John Steinbeck
121+
120,60,Composer,Jonny Greenwood
122+
121,61,Director,David Lynch
123+
122,61,Producer,Mark Frost
124+
123,62,Actor,Kyle MacLachlan
125+
124,62,Actor,Laura Dern
126+
125,63,Writer,Franz Kafka
127+
126,63,Composer,Angelo Badalamenti
128+
127,64,Director,Joel Coen
129+
128,64,Producer,Ethan Coen
130+
129,65,Actor,Jeff Bridges
131+
130,65,Actor,John Goodman
132+
131,66,Writer,William Faulkner
133+
132,66,Composer,Carter Burwell
134+
133,67,Director,Spike Lee
135+
134,67,Producer,Jon Kilik
136+
135,68,Actor,Denzel Washington
137+
136,68,Actor,Spike Lee
138+
137,69,Writer,James Joyce
139+
138,69,Composer,Terence Blanchard
140+
139,70,Director,Woody Allen
141+
140,70,Producer,Letty Aronson
142+
141,71,Actor,Diane Keaton
143+
142,71,Actor,Mia Farrow
144+
143,72,Writer,Marcel Proust
145+
144,72,Composer,Philip Glass
146+
145,73,Director,Jean-Luc Godard
147+
146,73,Producer,Georges de Beauregard
148+
147,74,Actor,Jean-Paul Belmondo
149+
148,74,Actor,Anna Karina
150+
149,75,Writer,James Baldwin
151+
150,75,Composer,Michel Legrand
152+
151,76,Director,Akira Kurosawa
153+
152,76,Producer,Sôjirô Motoki
154+
153,77,Actor,Toshirô Mifune
155+
154,77,Actor,Takashi Shimura
156+
155,78,Writer,Yukio Mishima
157+
156,78,Composer,Fumio Hayasaka
158+
157,79,Director,Ingmar Bergman
159+
158,79,Producer,Allan Ekelund
160+
159,80,Actor,Max von Sydow
161+
160,80,Actor,Liv Ullmann
162+
161,81,Writer,Henrik Ibsen
163+
162,81,Composer,Erik Nordgren
164+
163,82,Director,Federico Fellini
165+
164,82,Producer,Angelo Rizzoli
166+
165,83,Actor,Marcello Mastroianni
167+
166,83,Actor,Anita Ekberg
168+
167,84,Writer,Italo Calvino
169+
168,84,Composer,Nino Rota
170+
169,85,Director,Roberto Rossellini
171+
170,85,Producer,Salvo D'Angelo
172+
171,86,Actor,Anna Magnani
173+
172,86,Actor,Aldo Fabrizi
174+
173,87,Writer,Umberto Eco
175+
174,87,Composer,Ennio Morricone
176+
175,88,Director,Michelangelo Antonioni
177+
176,88,Producer,Carlo Ponti
178+
177,89,Actor,Monica Vitti
179+
178,89,Actor,Alain Delon
180+
179,90,Writer,Giuseppe Tomasi di Lampedusa
181+
180,90,Composer,Giovanni Fusco
182+
181,91,Director,Luchino Visconti
183+
182,91,Producer,Goffredo Lombardo
184+
183,92,Actor,Burt Lancaster
185+
184,92,Actor,Claudia Cardinale
186+
185,93,Writer,Primo Levi
187+
186,93,Composer,Franco Mannino
188+
187,94,Director,Pier Paolo Pasolini
189+
188,94,Producer,Alfredo Bini
190+
189,95,Actor,Franco Citti
191+
190,95,Actor,Silvana Mangano
192+
191,96,Writer,Alberto Moravia
193+
192,96,Composer,Carlo Rustichelli
194+
193,97,Director,Sergio Leone
195+
194,97,Producer,Claudio Mancini
196+
195,98,Actor,Clint Eastwood
197+
196,98,Actor,Lee Van Cleef
198+
197,99,Writer,Giovanni Verga
199+
198,99,Composer,Ennio Morricone
200+
199,100,Director,Franco Zeffirelli
201+
200,100,Producer,John Brabourne

0 commit comments

Comments
 (0)