You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/lessons/07-code-quality/index.md
+22-4Lines changed: 22 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,19 +1,37 @@
1
1
# 07 - Code quality
2
2
3
-
In Lesson [04 - Professional Project](../04-professional-project) we created a repo and website for an old project developed during the course. Now we are going to improve its quality by fixing the issues each group found using a linter tool.
3
+
In Lesson [04 - Professional Project](../04-professional-project) we created a repo and website for an old project developed during the course. Now we are going to improve its quality by fixing the issues from each group by using a **linter** tool.
4
+
5
+
**Linters** analyze your code for potential errors, enforce coding standards, improve readability and security. They are useful tools to ensure high-quality of coding. Some popular Python linter tools:
6
+
7
+
1.**Flake8:**
8
+
Combines tools like PyFlakes, pycodestyle, and McCabe.
Lightweight and easy to integrate into CI/CD pipelines.
11
+
12
+
{ style="height:200px" }
13
+
14
+
If you wants to use an automatic formatter, you can try Black Formatter.
15
+
16
+
{ style="height:150px" }
17
+
18
+
2.**Pylint:**
19
+
Comprehensive linter that checks for errors, enforces coding standards, and suggests code refactoring.
20
+
Provides a detailed score for your code quality.
21
+
Highly configurable, but may require some setup to avoid excessive warnings.
4
22
5
23
!!! warning
6
-
We won't work on our own projects this time! Select a project from [ongoing projects page](../../projects/2024/2/index.md) and comment on the issue you'd like to do or create a new issue that you'd like to work on. Every project must have at least one issue with external participation.
24
+
We won't work on our **own** projects this time! Select a project from [ongoing projects page](../../projects/2025/2/index.md) and comment on the issue you'd like to do or create a new issue that you'd like to work on. Every project must have at least one issue with external participation.
7
25
8
26
9
27
## Deliverable
10
28
11
29
{ style="height:150px" }
12
30
13
31
- create a Pull/Merge request addressing a code quality issue found in another team's project.
14
-
- work with other team to get a Pull/Merge request accepted in your repository
32
+
- work with other team to get a Pull/Merge request accepted in your repository.
15
33
16
-
**Learning objective**: modify a project you are not familiar with and improve its code quality
34
+
**Learning objective**: modify a project you are not familiar with and improve its code quality.
Copy file name to clipboardExpand all lines: docs/lessons/08-automated-testing/index.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,7 +2,7 @@
2
2
3
3
<ah-external-contentsrc="slides.html" />
4
4
5
-
We will now add (some) automated testing to one of the projects from [ongoing projects page](../../projects/2024/2/index.md). Again, our objective in this activity is to get used to build and modify different projects.
5
+
We will now add (some) automated testing to one of the projects from [ongoing projects page](../../projects/2025/2/index.md). Again, our objective in this activity is to get used to build and modify different projects.
6
6
7
7
!!! warning
8
8
You'll need to select a different project from the last Lesson [07 - Code Quality](../07-code-quality/index.md)
-Consigo conferir o resultado de uma execução? Se sim, existe um valor de referência?
55
+
-Under what conditions?
56
+
-On which platforms?
57
+
-Which operations are supported?
58
+
-Can I check the result of an execution? If so, is there a reference value?
59
59
60
60
---
61
61
62
-
# Testes automatizados
62
+
# Automated Testing
63
63
64
-
**Ideia**: escrever um programa que verifica se um outro programa responde como esperado
64
+
**Idea**: Write a program that verifies whether another program responds as expected.
65
65
66
-
-Definir situações a serem testadas ...
67
-
-e o resultado esperado em cada situação
66
+
-Define situations to be tested...
67
+
-And the expected result in each situation.
68
68
69
69
---
70
-
# Testes automatizados
70
+
# Automated Testing
71
71
72
-
**Não ajudam**:
72
+
**Doesn't help**
73
73
74
-
-a revelar novos bugs
75
-
-a garantir que um software é livre de bugs
74
+
-Reveal new bugs
75
+
-Ensure software is bug-free
76
76
77
-
**Ajudam**
77
+
**Does help**
78
78
79
-
-a evitar que bugs descobertos voltem
80
-
-a evitar que mudanças não intencionais quebrem código que estava funcionando.
81
-
-a documentar em quais situações o software funciona.
79
+
-Prevent discovered bugs from returning
80
+
-Prevent unintended changes from breaking previously working code.
81
+
-Document in which situations the software works.
82
82
83
83
---
84
84
85
-
# Testes automatizados
85
+
# Automated Testing
86
86
87
-
1.Testes de unidade
88
-
2.Testes de integração
89
-
3.Testes de interface de usuário
87
+
1.Unit Testing
88
+
2.Integration Testing
89
+
3.User Interface Testing
90
90
91
91
---
92
92
93
-
# Testes unitários
93
+
# Unit Testing
94
94
95
-
**Ideia**: dada uma função, verificar se ela devolve o valor esperado para um certo conjunto de parâmetros.
95
+
**Idea**: Given a function, verify whether it returns the expected value for a given set of parameters.
96
+
97
+
- Test functions in **isolation**.
98
+
-**Coverage**: Percentage of lines of code executed during unit testing.
99
+
- Serves as function documentation
96
100
97
-
- Testa as funções de maneira **isolada**
98
-
-**Cobertura**: porcentagem das linhas de código que é executada durante os testes de unidade.
99
-
- Serve como documentação da função
100
101
101
102
---
102
-
# Testes unitários - pytest
103
+
# Unit tests - pytest
103
104
104
105

105
106
106
107
---
107
108
108
-
# Testes de integração
109
-
110
-
**Ideia**: dados um conjunto de classes com interdependências, verificar se elas funcionam bem **em conjunto**.
109
+
# Integration tests
111
110
112
-
- Testa interação entre em objetos
113
-
- Possibilidade de criar *mocks*, que são objetos falsos feitos para simular a interação entre vários objetos.
111
+
**Idea**: Given a set of classes with interdependencies, verify that they work well **together**.
114
112
113
+
- Tests interaction between objects
114
+
- Possibility of creating *mocks*, which are fake objects designed to simulate the interaction between multiple objects.
115
115
----
116
116
117
-
# Testes de interface de usuário
117
+
# User interface tests
118
118
119
-
**Ideia**: simula ações do usuário (cliques, entrada de dados, etc) e confere se a saída esperada é mostrada na tela
119
+
**Idea**: Simulates user actions (clicks, data entry, etc.) and checks if the expected output is displayed on the screen.
120
120
121
-
-Menos específico possível
122
-
-Mais fiel ao uso real de um usuário
121
+
-Must be designed as minimally specific as possible
122
+
-Most faithful to a user's actual use
123
123
124
124
---
125
125
126
-
# Testes de interface de usuário
127
-
126
+
# User interface tests
128
127
129
128
## Selenium
130
129
131
-
Permite fazer scripts que interagem com uma página web, realizando entrada de dados, rolagem de tela e cliques. Cada`assert`pode ser feito com o conteúdo de um objeto da página.
130
+
Allows you to create scripts that interact with a web page, performing data entry, scrolling, and clicks. Each`assert`can be made with the content of a page object.
Copy file name to clipboardExpand all lines: docs/lessons/09-releases/index.md
+3-3Lines changed: 3 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -21,9 +21,9 @@ The following guids might be useful.
21
21
The following checks will be used to verify if this skill is completed:
22
22
23
23
-[ ] there is a release in the repo's *Releases* tab containing the description of the release and the source code
24
-
-[ ] the release includes either an installer or a direccly executable file in one of the following formats:
24
+
-[ ] the release includes either an installer or a directly executable file in one of the following formats:
25
25
-**Linux**: *.deb, .rpm* for installers, **AppImage** for executables
26
-
-**Windows**: *.msi* installer or single *.exe* (plus asses, if necessary)
27
-
-**Other**: if the project is an extension, plugin or any other type of stoftware, the release must include a redistributable package in the official format
26
+
-**Windows**: *.msi* installer or single *.exe* (plus files, if necessary)
27
+
-**Other**: if the project is an extension, plugin or any other type of software, the release must include a redistributable package in the official format
0 commit comments