Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
CI e automação de deploys em bibliotecas Python
Search
Camila Maia
August 13, 2021
Programming
500
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
CI e automação de deploys em bibliotecas Python
DevOps Extreme 2021
Camila Maia
August 13, 2021
More Decks by Camila Maia
See All by Camila Maia
GitHub Actions - Semana DevOps LINUXTips.pdf
camilamaia
0
56
Minha Jornada em Developer Experience (DX) - DevOpsDays Salvador 2024
camilamaia
0
59
Cumbuca Dev: Ensinando com Open Source - 71º Python Floripa no MeLi
camilamaia
0
89
COMO E PORQUE ENSINAR A PROGRAMAR COM OPEN SOURCE - Python Brasil 2023
camilamaia
0
85
Como testar e manter APIs de qualidade - Codecon Digital 2023
camilamaia
0
1.2k
factory_boy: testing like a pro. DjangoCon US 2022
camilamaia
0
950
ScanAPI Workshop. DjangoCon EU 2022
camilamaia
0
830
factory_boy: testing like a pro. DjangoCon EU 2022
camilamaia
1
940
Como testar e documentar REST APIs com ScanAPI - Agile Testers Conference 2021
camilamaia
0
470
Other Decks in Programming
See All in Programming
その問い、本当に正しいですか?AI時代のエンジニアに必要な哲学と認知科学 / ai-philosophy-cognitive-science
minodriven
14
6.7k
【やさしく解説 設計編 #0】DDDのコード、読めるのに分からない人へ
panda728
PRO
2
240
The Bowling Game- From Imperative to Functional Programming - Part 1
philipschwarz
PRO
0
300
LLM本来の能力を解き放つサンドボックス技術とAI民主化への適用
yukukotani
3
4.9k
SREは、MCPとSRE Agentをこう使え!
kazumax55
0
150
地域 SRE コミュニティ最前線 - ホンマでっかSRE勉強会
tk3fftk
0
200
これからAgentCoreを触る方へトレンドはGatewayです
har1101
6
480
TypeScript+Orvalで実現する型安全かつ堅牢でスケーラブルなマルチチャネル通知基盤 / TSKaigi Night talks ~after conference~
d0riven
0
390
symfony/aiとlaravel/boost
77web
0
120
トークンをケチるな、設計しろ:GitHub Copilotを賢く使うコンテキスト戦略
ochtum
0
300
Observability in Practice:Grafana 與 Edge Device SRE 的那些事
blueswen
0
190
任せる範囲はこう広がった / How the Scope of AI Delegation Has Expanded
nrslib
1
240
Featured
See All Featured
Raft: Consensus for Rubyists
vanstee
141
7.6k
Thoughts on Productivity
jonyablonski
76
5.2k
Navigating Team Friction
lara
192
16k
What does AI have to do with Human Rights?
axbom
PRO
1
2.2k
DevOps and Value Stream Thinking: Enabling flow, efficiency and business value
helenjbeal
1
260
Information Architects: The Missing Link in Design Systems
soysaucechin
0
1k
Six Lessons from altMBA
skipperchong
29
4.3k
Bridging the Design Gap: How Collaborative Modelling removes blockers to flow between stakeholders and teams @FastFlow conf
baasie
0
610
Producing Creativity
orderedlist
PRO
348
40k
End of SEO as We Know It (SMX Advanced Version)
ipullrank
3
4.3k
Public Speaking Without Barfing On Your Shoes - THAT 2023
reverentgeek
1
460
Groundhog Day: Seeking Process in Gaming for Health
codingconduct
0
240
Transcript
CI e automação de deploys em bibliotecas Python Para deixar
qualquer DevOps orgulhoso ⭐ DevOps Extreme - Ago 2021 Camila Maia
Esta apresentação está disponível em: speakerdeck.com/cmaiacd
Quem sou eu? - Desenvolvedora Backend - 10+ anos xp
👵 - Python 🐍 e Ruby 💎 - OpenSource e Comunidades ❤ - Organização de eventos: Pyjamas, EuroPython, Python Brasil….
- Primeiro perfil aprovado no programa de Sponsors para quem
reside no Brasil Quem sou eu?
A biblioteca • Biblioteca Python • Gerenciamento de pacotes e
dependências via Poetry • Distribuída via PyPI e TestPyPI • Código no GitHub
Integração Contínua: • Testes unitários + Cobertura de Testes •
Lint: checagem de formatação do código, tipagem estática e formatação de mensagens de commit • Testes de integração Automação de deploys: • Merge no branch main: deploy no TestPyPI • Nova release: deploy no PyPI O objetivo
Ferramenta
A Aplicação Exemplo
• Framework de código aberto • Command line interface (CLI)
• Escrito em Python Objetivos: 1. Fornecer Live Documentation 2. Possibilitar a implementação de Testes de Integração
Fluxo ESPECIFICAÇÃO YAML / JSON RELATÓRIO EFETUA AS REQUESTS EXECUTA
OS TESTES
Integração Contínua
Integração Contínua Main Branch 1 Testes Unitários Lint Testes de
Integração
Makefile test: @pytest --cov=./scanapi --cov-report=xml black: @poetry run black -l
80 --check . --exclude=.venv flake8: @poetry run flake8 --ignore=E501,W501,E231,W503 mypy: @poetry run mypy scanapi gitlint: @poetry run gitlint --ignore-stdin check: black flake8 mypy gitlint
Pytest and Codecov
Lint
Testes de Integração - Run Examples
Deploys
Deploys Main Branch 1 Publish to TestPyPI New Release Publish
to PyPI
timestamp = `date -u +'%Y%m%d%H%M%S'` change-version: @poetry version `poetry version
-s | cut -f-3 -d.`.dev$(timestamp) Makefile + Setup das Chaves
Publish to TestPyPI
Publish to PyPI
👀
scanapi.dev 🌐
GitHub - https://github.com/scanapi Twitter - @ScanAPI_ Discord - discord.scanapi.dev Comunicação:
ScanAPI Bora trocar uma ideia! 🗣
MUITO OBRIGADA! @cmaiacd camilamaia cmaiacd.com