Skip to content

Commit 7e2afd7

Browse files
authored
Merge branch 'master' into learnpack
2 parents 709cbd1 + 36c5db8 commit 7e2afd7

File tree

8 files changed

+68
-17
lines changed

8 files changed

+68
-17
lines changed

.github/workflows/learnpack-audit.yml

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
# This workflow will do a clean install of node dependencies, cache/restore them, build the source code and run tests across different versions of node
2+
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions
3+
4+
name: Learnpack audit
5+
6+
on:
7+
push:
8+
branches: [ master ]
9+
pull_request:
10+
branches: [ master ]
11+
12+
jobs:
13+
build:
14+
15+
runs-on: ubuntu-latest
16+
17+
strategy:
18+
matrix:
19+
node-version: [14.x]
20+
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/
21+
22+
steps:
23+
- uses: actions/checkout@v2
24+
- name: Use Node.js ${{ matrix.node-version }}
25+
uses: actions/setup-node@v2
26+
with:
27+
node-version: ${{ matrix.node-version }}
28+
- run: npm install learnpack -g
29+
- run: learnpack audit

.gitpod.Dockerfile

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,6 @@ FROM gitpod/workspace-full
22

33
USER gitpod
44

5-
RUN npm pip install pytest==4.4.2 mock pytest-testdox
6-
RUN npm i learnpack -g && learnpack plugins:install learnpack-python
5+
RUN pip3 install pytest==4.4.2 pytest-testdox mock
6+
RUN npm i learnpack@0.1.19 -g && learnpack plugins:install learnpack-python@0.0.35
7+

.gitpod.yml

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,19 @@
11
image:
22
file: .gitpod.Dockerfile
33

4-
# List the ports you want to expose and what to do when they are served. See https://www.gitpod.io/docs/config-ports/
54
ports:
6-
- port: 3000
7-
onOpen: open-preview
5+
- port: 3000
6+
onOpen: ignore
87

9-
# List the start up tasks. You can start them in parallel in multiple terminals. See https://www.gitpod.io/docs/config-start-tasks/
10-
tasks:
11-
- command: learnpack start
8+
vscode:
9+
extensions:
10+
- learnpack.learnpack-vscode
11+
12+
github:
13+
prebuilds:
14+
# enable for the master/default branch (defaults to true)
15+
master: true
16+
# enable for pull requests coming from this repo (defaults to true)
17+
pullRequests: false
18+
# add a "Review in Gitpod" button as a comment to pull requests (defaults to true)
19+
addComment: false

assets/preview.png

18 KB
Loading

exercises/02-random-status/test.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ def test_url_call(capsys, app):
88
mock_request.assert_called_once_with("https://assets.breatheco.de/apis/fake/sample/random-status.php")
99

1010

11-
@pytest.mark.it("Testing for 200: Everythign went perfect")
11+
@pytest.mark.it("Testing for 200: Everything went perfect")
1212
def test_url_200(capsys, app):
1313
with patch('requests.get') as mock_request:
1414
mock_request.return_value.status_code = 200

exercises/09-array-of-blog-titles/README.es.md

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,14 @@ Usando el mismo endpoint del ejercicio anterior, crea una función `get_titles`
77
## 💡Pista
88

99
1. Crea una función `get_titles`.
10-
2. realiza un bucle (Loop).
11-
3. Agregue cada título de publicación al nuevo arreglo.
12-
4. Retorna el arreglo
10+
2. Declara un array vacío llamado `titles`.
11+
3. Haz el request del API adentro de la función.
12+
4. realiza un bucle (Loop) que itere para cada publicación.
13+
5. Agregue cada título de publicación al nuevo arreglo.
14+
6. Retorna el arreglo.
1315

16+
La salida de la consola debería verse parecido a esto:
17+
18+
```python
19+
['title 1','title 2', 'title 3']
20+
```

exercises/09-array-of-blog-titles/README.md

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,11 @@ Using the same endpoint from the previous exercise, create a function `get_title
88

99
1. Create the function `get_titles`.
1010
2. Declare a new empty array called `titles`.
11-
2. Loop each post from the list of posts.
12-
3. Get the title of each post.
13-
3. Add that title to the new array.
14-
4. Return the titles array
11+
3. Do the request to the endpoint inside of the function.
12+
4. Loop each post from the list of posts.
13+
5. Get the title of each post.
14+
6. Add that title to the new array.
15+
7. Return the titles array.
1516

1617
The console output should be something similar to this:
1718

learn.json

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,9 @@
11
{
22
"language": "python3",
3-
"repository": "https://github.com/4GeeksAcademy/python-http-requests-api-tutorial-exercises"
3+
"repository": "https://github.com/4GeeksAcademy/python-http-requests-api-tutorial-exercises",
4+
"config": {
5+
"editor": {
6+
"version": "1.0.70"
7+
}
8+
}
49
}

0 commit comments

Comments
 (0)