From 2c1087858f9e0eeeccf3eb655b1c38260a5de66f Mon Sep 17 00:00:00 2001 From: Elvira Quiroz Date: Wed, 10 Feb 2021 16:21:58 +0000 Subject: [PATCH 1/6] migrated to learnpack --- .gitpod.Dockerfile | 5 +++-- .gitpod.yml | 4 ++-- README.md | 24 ++++++++++++++++++------ bc.json | 11 ----------- 4 files changed, 23 insertions(+), 21 deletions(-) delete mode 100644 bc.json diff --git a/.gitpod.Dockerfile b/.gitpod.Dockerfile index 23b1cf22..c708f052 100644 --- a/.gitpod.Dockerfile +++ b/.gitpod.Dockerfile @@ -1,7 +1,8 @@ - FROM gitpod/workspace-full:latest USER gitpod -RUN pip3 install pytest==4.4.2 pytest-testdox mock && npm i breathecode-cli@1.2.70 -g +RUN npm i jest@24.8.0 -g +RUN npm i learnpack -g && learnpack plugins:install learnpack-html + diff --git a/.gitpod.yml b/.gitpod.yml index ab65c986..eeb1a13b 100644 --- a/.gitpod.yml +++ b/.gitpod.yml @@ -5,8 +5,8 @@ ports: - port: 3000 onOpen: open-preview tasks: - - command: > - bc run; + - command: learnpack start + github: prebuilds: # enable for the master/default branch (defaults to true) diff --git a/README.md b/README.md index 7bc52532..b697c1ef 100644 --- a/README.md +++ b/README.md @@ -38,20 +38,32 @@ These exercises were built in collaboration, we need you! If you find any bugs o ## Local Installation -1) Make sure you have the [breathecode-cli](https://github.com/breatheco-de/breathecode-cli) installed and `node.js` version 10+ and python version 3+. This is the command to install the breathecode-cli +1. Install learnpack, the package manager for learning tutorials and the html compiler plugin for learnpack, make sure you also have node.js 12+: + ``` -$ npm i breathecode-cli -g +$ npm i learnpack -g +$ learnpack plugins:install learnpack-python ``` -2) Clone or download this repository. Once you finish downloading, you will find a new folder with a subdirectory "exercises" that contains all the exercises within. +2. Download this particular exercise using learnpack and `cd` into the folder: + +``` +$ learnpack download python-beginner-programming-exercises +$ cd python-beginner-programming-exercises +``` -3) Start the tutorial/exercises by running the following command from the root of the project: +Note: Once you finish downloading, you will find a "exercises" folder that contains all the exercises within. + +3. Start the tutorial/exercises by running the following command at the same level were your bc.json file is: ```sh -$ pip install pytest==4.4.2 mock pytest-testdox -$ breathecode run +$ npm i jest@24.8.0 -g +$ learnpack start ``` +Note: The exercises have automatic grading but its very rigid and string, my recomendation is to ignore the tests and use them only as a recomendation or you can get frustrated. + + ## How are the exercises organized? Each exercise is a small react application containing the following files: diff --git a/bc.json b/bc.json deleted file mode 100644 index 31b7c454..00000000 --- a/bc.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "language": "python3", - "title": "Master Python by practice (interactive)", - "repository": "https://github.com/4GeeksAcademy/master-python-programming-exercises", - "preview": "https://github.com/4GeeksAcademy/master-python-programming-exercises/blob/master/preview.gif?raw=true", - "description": "Practice your Python programming skills with this interactive and auto-graded set of exercises.", - "duration": 10, - "difficulty": "easy", - "video-solutions": false, - "graded": true -} From c8e555a1f54442362e97429f0778837435096a37 Mon Sep 17 00:00:00 2001 From: Elvira Quiroz Date: Wed, 10 Feb 2021 16:35:38 +0000 Subject: [PATCH 2/6] forgot to add learn.json to gitignore --- .gitignore | 1 + learn.json | 11 +++++++++++ 2 files changed, 12 insertions(+) create mode 100644 learn.json diff --git a/.gitignore b/.gitignore index 667e2ad2..f3ca55f4 100644 --- a/.gitignore +++ b/.gitignore @@ -5,6 +5,7 @@ !.gitpod.yml !.gitpod.Dockerfile !bc.json +!learn.json !README.md !README.*.md diff --git a/learn.json b/learn.json new file mode 100644 index 00000000..1275399c --- /dev/null +++ b/learn.json @@ -0,0 +1,11 @@ +{ + "language": "python3", + "title": "Master Python by practice (interactive)", + "repository": "https://github.com/4GeeksAcademy/master-python-programming-exercises", + "preview": "https://github.com/4GeeksAcademy/master-python-programming-exercises/blob/master/preview.gif?raw=true", + "description": "Practice your Python programming skills with this interactive and auto-graded set of exercises.", + "duration": 10, + "difficulty": "easy", + "video-solutions": false, + "graded": true +} \ No newline at end of file From 5e6edbeb6ee29ad9ce88cb2a9fb4b1298e42e039 Mon Sep 17 00:00:00 2001 From: Elvira Quiroz Date: Wed, 10 Feb 2021 16:41:30 +0000 Subject: [PATCH 3/6] forgot to change languege --- .gitpod.Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitpod.Dockerfile b/.gitpod.Dockerfile index c708f052..d69be8b2 100644 --- a/.gitpod.Dockerfile +++ b/.gitpod.Dockerfile @@ -4,5 +4,5 @@ FROM gitpod/workspace-full:latest USER gitpod RUN npm i jest@24.8.0 -g -RUN npm i learnpack -g && learnpack plugins:install learnpack-html +RUN npm i learnpack -g && learnpack plugins:install learnpack-python From 116ca51d4769e33ef87db3874ca32f9331970dc6 Mon Sep 17 00:00:00 2001 From: Elvira Quiroz Date: Wed, 10 Feb 2021 18:02:26 +0000 Subject: [PATCH 4/6] forggot to change the ID of exercise --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index b697c1ef..da9a7ee7 100644 --- a/README.md +++ b/README.md @@ -48,8 +48,8 @@ $ learnpack plugins:install learnpack-python 2. Download this particular exercise using learnpack and `cd` into the folder: ``` -$ learnpack download python-beginner-programming-exercises -$ cd python-beginner-programming-exercises +$ learnpack download master-python-programming-exercises +$ cd master-python-programming-exercises ``` Note: Once you finish downloading, you will find a "exercises" folder that contains all the exercises within. From 4e29b20c80090439d0394e4d31e07868c9220879 Mon Sep 17 00:00:00 2001 From: Elvira Quiroz Date: Thu, 11 Feb 2021 17:27:22 +0000 Subject: [PATCH 5/6] .gitpod.Dockerfile updated with pytest --- .gitpod.Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitpod.Dockerfile b/.gitpod.Dockerfile index d69be8b2..15fb23b1 100644 --- a/.gitpod.Dockerfile +++ b/.gitpod.Dockerfile @@ -3,6 +3,6 @@ FROM gitpod/workspace-full:latest USER gitpod -RUN npm i jest@24.8.0 -g +RUN npm RUN pip3 install pytest==4.4.2 pytest-testdox mock RUN npm i learnpack -g && learnpack plugins:install learnpack-python From e2f1fb0ce150f72f3f9c9b70db0a120b783f27d5 Mon Sep 17 00:00:00 2001 From: Elvira Quiroz Date: Thu, 11 Feb 2021 17:29:56 +0000 Subject: [PATCH 6/6] README corrected --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index da9a7ee7..16a940fd 100644 --- a/README.md +++ b/README.md @@ -57,7 +57,7 @@ Note: Once you finish downloading, you will find a "exercises" folder that conta 3. Start the tutorial/exercises by running the following command at the same level were your bc.json file is: ```sh -$ npm i jest@24.8.0 -g +$ RUN pip3 install pytest==4.4.2 pytest-testdox mock $ learnpack start ```