Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,6 @@ jobs:
strategy:
matrix:
python-version: ["3.11", "3.12", "3.13", "3.14"]
continue-on-error: ${{ matrix.python-version == '3.14' }}

steps:
- name: Copia os arquivos do repo
Expand Down
4 changes: 4 additions & 0 deletions aulas/01.md
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,10 @@ Após a instalação do Poetry, podemos utilizá-lo para gerenciar e instalar ve

Você pode, no entanto, instalar qualquer versão mais nova. Minha recomendação é **sempre que possível**, use a versão mais atualizada possível:

=== "Versão 3.14"
{%set full_version = "3.14.0" %}
{%set short_version = 3.14 %}
{% include "templates/poetry_python.md" %}
=== "Versão 3.13"
{%set full_version = "3.13.2" %}
{%set short_version = 3.13 %}
Expand Down
3 changes: 3 additions & 0 deletions aulas/08.md
Original file line number Diff line number Diff line change
Expand Up @@ -876,9 +876,12 @@ A solução para isso é dizer ao coverage que nosso código usa determinado tip

```toml title="pyproject.toml"
[tool.coverage.run]
core = "ctrace"#(1)!
concurrency = ["thread", "{++greenlet++}"]
```

1. Existem diversas formas de executar o coverage. O `sysmon` é o runner padrão, mas atualmente ele não suporta o greenlet. [Fonte para se aprofundar mais](https://coverage.readthedocs.io/en/latest/config.html#run-core).

Precisamos ativar a concorrência no coverage em dois casos, para threads (conversamos sobre isso [na aula 05](05.md#threads-e-conexoes){:target="_blank"}) e para o [greenlet](#configuracao-para-o-sqlalchemy-assincrono){:target="_blank"} adicionado pela conexão assíncrona do SQLAlchemy.

Com essa pequena alteração, podemos executar os testes novamente e olhar a cobertura:
Expand Down
4 changes: 4 additions & 0 deletions aulas/11.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,10 @@ Uma das coisas interessantes sobre Docker é que existe um [Hub de containers](h

Aqui está um exemplo de `Dockerfile` para executar nossa aplicação:

=== "Versão 3.14"
{%set full_version = "3.14.0" %}
{%set short_version = 3.14 %}
{% include "templates/dockerfile.md" %}
=== "Versão 3.13"
{%set full_version = "3.13.0" %}
{%set short_version = 3.13 %}
Expand Down
1 change: 1 addition & 0 deletions changelogs/+0d887e32.adicionado.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Aula 08: nota sobre a execução do `coverage` e a escolha fixada no `ctrace`
1 change: 1 addition & 0 deletions codigo_das_aulas/08/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ addopts = '-p no:warnings'
asyncio_default_fixture_loop_scope = 'function'

[tool.coverage.run]
core = "ctrace"
concurrency = ["thread", "greenlet"]

[tool.taskipy.tasks]
Expand Down
1 change: 1 addition & 0 deletions codigo_das_aulas/09/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ addopts = '-p no:warnings'
asyncio_default_fixture_loop_scope = 'function'

[tool.coverage.run]
core = "ctrace"
concurrency = ["thread", "greenlet"]

[tool.taskipy.tasks]
Expand Down
1 change: 1 addition & 0 deletions codigo_das_aulas/10/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ addopts = '-p no:warnings'
asyncio_default_fixture_loop_scope = 'function'

[tool.coverage.run]
core = "ctrace"
concurrency = ["thread", "greenlet"]

[tool.taskipy.tasks]
Expand Down
4 changes: 4 additions & 0 deletions codigo_das_aulas/11/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,10 @@ quote-style = 'single'
pythonpath = "."
addopts = '-p no:warnings'

[tool.coverage.run]
core = "ctrace"
concurrency = ["thread", "greenlet"]

[tool.taskipy.tasks]
lint = 'ruff check'
pre_format = 'ruff check --fix'
Expand Down
1 change: 1 addition & 0 deletions codigo_das_aulas/12/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ addopts = '-p no:warnings'
asyncio_default_fixture_loop_scope = 'function'

[tool.coverage.run]
core = "ctrace"
concurrency = ["thread", "greenlet"]

[tool.taskipy.tasks]
Expand Down
1 change: 1 addition & 0 deletions codigo_das_aulas/13/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ addopts = '-p no:warnings'
asyncio_default_fixture_loop_scope = 'function'

[tool.coverage.run]
core = "ctrace"
concurrency = ["thread", "greenlet"]

[tool.taskipy.tasks]
Expand Down
2 changes: 1 addition & 1 deletion mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ extra:
provider: mike
default: estavel
current_tag: v4.2.0
python_supported_version: 3.9
python_supported_version: "3.10"

hooks:
- hooks/quiz_hook.py