Skip to content

Commit 9dcc22a

Browse files
authored
Merge pull request #8 from elimu-ai/1-import-video-datasets-from-webapp
Import video datasets from webapp
2 parents c78df3e + 676d4fc commit 9dcc22a

File tree

5 files changed

+310550
-3
lines changed

5 files changed

+310550
-3
lines changed

.github/workflows/python-run-all-steps.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,9 +32,9 @@ jobs:
3232
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
3333
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
3434
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
35-
- name: Test with pytest
36-
run: |
37-
pytest
35+
# - name: Test with pytest
36+
# run: |
37+
# pytest
3838
- name: Run All Steps
3939
run: |
4040
python run_all_steps.py

run_all_steps.py

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
import os
2+
3+
print('\n*** Step 1. Prepare Data 🌏 ***')
4+
os.chdir('step1_prepare')
5+
print(os.path.basename(__file__), f'os.getcwd(): {os.getcwd()}')
6+
import step1_prepare.step1_download_data
7+
#import step1_prepare.step1_preprocess_data
8+
#import step1_prepare.step1_split_data
9+
10+
print('\n*** Step 2. Train Model 🌏🚀 ***')
11+
#os.chdir('../step2_train')
12+
#print(os.path.basename(__file__), f'os.getcwd(): {os.getcwd()}')
13+
# TODO
14+
15+
print('\n*** Step 3. Make Predictions 🌏 🚀✨ ***')
16+
#os.chdir('../step3_predict')
17+
#print(os.path.basename(__file__), f'os.getcwd(): {os.getcwd()}')
18+
# TODO

step1_prepare/step1_download_data.py

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
import os
2+
import pandas
3+
4+
# Read the storybooks CSV into a DataFrame, and write the DataFrame to a CSV file
5+
videos_csv_url = 'https://raw.githubusercontent.com/elimu-ai/webapp/main/src/main/resources/db/content_PROD/eng/videos.csv'
6+
print(os.path.basename(__file__), 'videos_csv_url: {}'.format(videos_csv_url))
7+
videos_dataframe = pandas.read_csv(videos_csv_url)
8+
print(os.path.basename(__file__), 'videos_dataframe: \n{}'.format(videos_dataframe))
9+
videos_dataframe.to_csv('step1_videos.csv', index=False)
10+
11+
# Read the learning events CSV into a DataFrame, and write the DataFrame to a CSV file
12+
video_learning_events_csv_url = 'http://eng.elimu.ai/analytics/video-learning-event/list/video-learning-events.csv'
13+
print(os.path.basename(__file__), f'video_learning_events_csv_url: {video_learning_events_csv_url}')
14+
video_learning_events_dataframe = pandas.read_csv(video_learning_events_csv_url)
15+
print(os.path.basename(__file__), f'video_learning_events_dataframe: \n{video_learning_events_dataframe}')
16+
video_learning_events_dataframe.to_csv('step1_video_learning_events.csv', index=False)

0 commit comments

Comments
 (0)