Skip to content

Commit 29627ce

Browse files
authored
Merge branch 'master' into issue-1463
2 parents bc9a10b + a08a7d0 commit 29627ce

File tree

12 files changed

+181
-157
lines changed

12 files changed

+181
-157
lines changed
51.2 KB
Loading
55 KB
Loading

docs/lessons/07-code-quality/index.md

Lines changed: 22 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,37 @@
11
# 07 - Code quality
22

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.
9+
Detects syntax errors, style guide violations (PEP 8), and cyclomatic complexity.
10+
Lightweight and easy to integrate into CI/CD pipelines.
11+
12+
![](./Flake8.png){ style="height:200px" }
13+
14+
If you wants to use an automatic formatter, you can try Black Formatter.
15+
16+
![](./BlackFormatter.png){ 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.
422

523
!!! 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.
725

826

927
## Deliverable
1028

1129
![](icon.svg){ style="height:150px" }
1230

1331
- 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.
1533

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.
1735

1836
> "skill_id": 11, "metadata": {"url": "pull request url", "group": ["student2"]}
1937

docs/lessons/08-automated-testing/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
<ah-external-content src="slides.html" />
44

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.
66

77
!!! warning
88
You'll need to select a different project from the last Lesson [07 - Code Quality](../07-code-quality/index.md)

docs/lessons/08-automated-testing/slides.html

Lines changed: 81 additions & 82 deletions
Large diffs are not rendered by default.
Lines changed: 60 additions & 62 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
marp: true
3-
title: Testes automatizados
3+
title: Automated Tests
44
footer: 'Igor Montagner ![License CC BY-NC-SA 4.0](../cc-by-nc-sa.png)'
55
---
66

@@ -18,139 +18,137 @@ footer: 'Igor Montagner ![License CC BY-NC-SA 4.0](../cc-by-nc-sa.png)'
1818
</style>
1919

2020

21-
Desenvolvimento Aberto
21+
Open Development
2222
===
2323

2424
![100%](capa.svg)
2525

26-
##### Testes automatizados
26+
##### Automated Testing
2727

2828
###### Igor dos Santos Montagner ( [[email protected]](mailto:[email protected]) )
2929

3030
---
3131

32-
# Projeto profissional
32+
# Professional Project
3333

34-
- Qualidade de código
35-
- Linting - formatação e erros comuns
36-
- Documentação
37-
- Usuário
38-
- Desenvolvedor
34+
- Code Quality
35+
- Linting - Formatting and Common Errors
36+
- Documentation
37+
- User
38+
- Developer
3939

4040
---
4141

42-
# Projeto profissional
42+
# Professional Project
4343

44-
- Qualidade de código
45-
- Linting - formatação e erros comuns
46-
- **O código funciona?**
47-
- Documentação
48-
- Usuário
49-
- Desenvolvedor
44+
- Code Quality
45+
- Linting - Formatting and Common Errors
46+
- **Does the code work?**
47+
- Documentation
48+
- User
49+
- Developer
5050

5151
----
5252

53-
# Meu programa funciona?
53+
# Does my program work?
5454

55-
- Sob quais condições?
56-
- Em quais plataformas?
57-
- Quais operações são suportadas?
58-
- 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?
5959

6060
---
6161

62-
# Testes automatizados
62+
# Automated Testing
6363

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.
6565

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.
6868

6969
---
70-
# Testes automatizados
70+
# Automated Testing
7171

72-
**Não ajudam**:
72+
**Doesn't help**
7373

74-
- a revelar novos bugs
75-
- a garantir que um software é livre de bugs
74+
- Reveal new bugs
75+
- Ensure software is bug-free
7676

77-
**Ajudam**
77+
**Does help**
7878

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.
8282

8383
---
8484

85-
# Testes automatizados
85+
# Automated Testing
8686

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
9090

9191
---
9292

93-
# Testes unitários
93+
# Unit Testing
9494

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
96100

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
100101

101102
---
102-
# Testes unitários - pytest
103+
# Unit tests - pytest
103104

104105
![width:900px](pytest.png)
105106

106107
---
107108

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
111110

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**.
114112

113+
- Tests interaction between objects
114+
- Possibility of creating *mocks*, which are fake objects designed to simulate the interaction between multiple objects.
115115
----
116116

117-
# Testes de interface de usuário
117+
# User interface tests
118118

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.
120120

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
123123

124124
---
125125

126-
# Testes de interface de usuário
127-
126+
# User interface tests
128127

129128
## Selenium
130129

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.
132131

133132
---
134133

135-
# O quê eu preciso testar?
134+
# What do I need to test?
136135

137136
##
138137

139138
---
140139

141140

142-
# O quê eu preciso testar?
143-
144-
## Ninguém sabe....
141+
# What do I need to test?
145142

143+
## Nobody knows...
146144

147145
----
148146

149-
# Atividade prática: Testado e aprovado
147+
# Practical activity: Tested and approved
150148

151149

152150
![width:256px](https://fonts.gstatic.com/s/i/materialicons/sentiment_very_satisfied/v4/24px.svg?download=true)
153151

154-
**Objetivo**: Primeira experiência com testes automatizado de código.
152+
**Objective**: First experience with automated code testing.
155153

156-
> "metadata": {"url": "acceppted PR", "group": ["igual", "6"]}
154+
> "metadata": {"url": "acceppted PR", "group": [ "the same of class 6" ]}

docs/lessons/09-releases/index.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,9 @@ The following guids might be useful.
2121
The following checks will be used to verify if this skill is completed:
2222

2323
- [ ] 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:
2525
- **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
2828

2929

docs/projects/2025/2/index.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# 2025/2
2+
3+
* [https://balbismo-lang.ariellev.dev.br](https://balbismo-lang.ariellev.dev.br)
4+
* [https://github.com/JoaoLucasMBC/pycube-projection](https://github.com/JoaoLucasMBC/pycube-projection)
5+
* [https://pcliquet.github.io](https://pcliquet.github.io)
6+
* [https://joaopgs4.github.io/opensource-project/](https://joaopgs4.github.io/opensource-project/)
7+
* [https://github.com/cairibep/Packages_Tracker](https://github.com/cairibep/Packages_Tracker)

mkdocs.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,9 @@ nav:
2727
- 'lessons/07-code-quality/index.md'
2828
- 'lessons/08-automated-testing/index.md'
2929
- 'lessons/09-releases/index.md'
30-
# - 'lessons/10-first-contribution/index.md'
30+
- 'lessons/10-first-contribution/index.md'
3131
- lessons/11-floss-people/index.md
32-
# - lessons/12-licenses/index.md
32+
- lessons/12-licenses/index.md
3333
- 'Impact':
3434
- '2024/2': 'impact.md'
3535
- '2023/2': 'impact-2023.md'
@@ -39,6 +39,7 @@ nav:
3939
- '2019/2': 'impact-2019.md'
4040
- 'Ongoing projects':
4141
- 'projects/2024/2/index.md'
42+
- 'projects/2025/2/index.md'
4243

4344
extra_javascript:
4445
- js/markdown-enhancer.js

students/aavan-achievements

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
gAAAAABotd37OWG8hNIuIihblOjWCgASDxgN3ES2TAncHq5n2pAvOJ8DE5rTMeaJ83yS3PNn1EVvQ45xutwUBs-ioZDdyMWHQtCJEZjk1a-0QeaoPLP9f-Sg0VTGmTbGBjxgT6BNr_QJd7LDXGFQohamLxqDH9-x3WoSPW1L_pqJM7MOBf29bJs=
1+
gAAAAABox1okp2bbfnnTWwv9RUP8ytUL3Hefz3DK9S3v_92MurH-3EbMDPj-EWN8YAfFo0VHpXiQ_m5-HsbYw0PSqCx3B5LtuRpdiZJPirXuI5pzVgsg_RDOOeKSPVRwYUVhYbbtfGA6Zm5IH2MBZZZtX0DTnKWom-Wt0zsQ3-TshdErSBO8tQ4IYIK6OLWTYOqyKVKX6BgNYNeVM2-lU1riPn-4HYRX9hk3u93Il4TJCW2QCragojYFv5WMvZMoQ_p-7UuGH4sqIbqC11v2RqiK10zHXS1vpaRbNARqBrU2r9D3yizLNAduU0C9rnMWubVFi884H034ryU_LrGmjKWTFJ1tGd2VKzBwRYzWErvMCuajY_HALQ6Txmw3eYVDMvqwbhmTT0QXUMTx7awKIA8KCOHf6aksiKFLpEDP0ts0IAgqN2NcbQDvYkOIEBEuIekNVQKnjVbxVE3m5KyG135oSl2cpMsFEazKHOX8H96YtqwhQS6ao7NWdGlki1iNnj8Hs3UwOtyaWpZJByuCx4uc_3uphd9P6F5XUObAI2ybxNzabZGGX7sgti0cCjVp5NJKprVQX8iDQGIiCiW8qE4XYtiN7vkzvqB0g2WwwpHw8NBZAAf_KMGfqYkfAf9lSN5kDHYxh7hLY77sdyxB5B86h7P2bJA6KX9Xuu8QlzcWlsvLzvW21KrwrLMfR4adYNJTyzebv-QxtSpHhuiRrzNx9lZ-wrnD7ovxyrFgps6s__UewhUrRg3ZmRc8X1Oics6MatUoP-KOXxbeUghbzThzDE7ulfvUvcXdPj7DoWcBu2tiMWX18-0x-mk4tZZMRA_TphdSQTreUdolE4mGxhvtJ0U47QORga6nQTfcvM2L-OTQhTHPlJwsSenV85e2_3mZb7jJZCcNzSvKEHUok0cZskYA4hmagksVVCH63LiGxl7eAbYR8WFEZHdel7_egscou8F1eHs8PyYY-twMvi38_81mMXwimkKeTaxhzzWhytoXq2j05EKsjEUSi0ovbJSjydtwC1fc-bcCaQuwC5grSZTYgo1BCxiTfJn2XjTe2oL7noDA5l7PeXW85jD2HNOWJ2Z-7NqysJjOEDuwwR-gcIXxccAG0ihly4ZMDWCADz7RU3kv9-_b7Cuixm0i_DxMn85MlqREheHz4KcxpGM_fidr0aL7lIpr79eawvAFEhxoH4LGqKg1a8i5NP81kAHN-1-XpKGBAGxV1gTo_aHA17uI_uhoA9IOtIHRWowCrcD-CoWXgPHYltI3ZY-yX3GpzRD5zSy1h2hSUMwgriY41i7vZUq7qMaizAcaAKjJIJb0H9-6XDzFT8zUB6MuXqdcReqGcuGU

0 commit comments

Comments
 (0)