From 7222678e235a0b9ac2390c630147980855180438 Mon Sep 17 00:00:00 2001 From: Dansilllva Date: Tue, 29 Mar 2022 23:17:43 -0300 Subject: [PATCH 1/7] =?UTF-8?q?Adicionada=20flake=208=20de=20depend=C3=AAn?= =?UTF-8?q?cia?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 7 ++++--- libpythonpro/github_api.py | 3 +++ 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 676c14d7f..47b1a6d58 100644 --- a/README.md +++ b/README.md @@ -16,14 +16,15 @@ Suportada versão 3 de Python Para instalar: ```console -pip install pipenv -pipenv install --dev +python3 -m venv .venv +.venv\Scripts\activate +pip install -r requirements-dev.txt ``` Para conferir qualidade de código: ```console -pipenv run flake8 +flake8 ``` Tópicos a serem abordados: diff --git a/libpythonpro/github_api.py b/libpythonpro/github_api.py index 8b0fbafb9..156c2db3a 100644 --- a/libpythonpro/github_api.py +++ b/libpythonpro/github_api.py @@ -11,3 +11,6 @@ def buscar_avatar(usuario): url = f'https://api.github.com/users/{usuario}' resp = requests.get(url) return resp.json()['avatar_url'] + +if __name__ == '__main__': + print(buscar_avatar('Dansilllva')) From dabd414496968c7f5dd62797f67b7a55d446badd Mon Sep 17 00:00:00 2001 From: Dansilllva Date: Tue, 29 Mar 2022 23:23:26 -0300 Subject: [PATCH 2/7] Arquivos requiriments --- .idea/.gitignore | 3 +++ .idea/Projeto.iml | 17 +++++++++++++++++ .idea/inspectionProfiles/profiles_settings.xml | 6 ++++++ .idea/misc.xml | 4 ++++ .idea/modules.xml | 8 ++++++++ .idea/vcs.xml | 6 ++++++ requirements-dev.txt | Bin 0 -> 176 bytes requirements.txt | Bin 0 -> 190 bytes 8 files changed, 44 insertions(+) create mode 100644 .idea/.gitignore create mode 100644 .idea/Projeto.iml create mode 100644 .idea/inspectionProfiles/profiles_settings.xml create mode 100644 .idea/misc.xml create mode 100644 .idea/modules.xml create mode 100644 .idea/vcs.xml create mode 100644 requirements-dev.txt create mode 100644 requirements.txt diff --git a/.idea/.gitignore b/.idea/.gitignore new file mode 100644 index 000000000..26d33521a --- /dev/null +++ b/.idea/.gitignore @@ -0,0 +1,3 @@ +# Default ignored files +/shelf/ +/workspace.xml diff --git a/.idea/Projeto.iml b/.idea/Projeto.iml new file mode 100644 index 000000000..e85cfa870 --- /dev/null +++ b/.idea/Projeto.iml @@ -0,0 +1,17 @@ + + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/inspectionProfiles/profiles_settings.xml b/.idea/inspectionProfiles/profiles_settings.xml new file mode 100644 index 000000000..105ce2da2 --- /dev/null +++ b/.idea/inspectionProfiles/profiles_settings.xml @@ -0,0 +1,6 @@ + + + + \ No newline at end of file diff --git a/.idea/misc.xml b/.idea/misc.xml new file mode 100644 index 000000000..ca4672524 --- /dev/null +++ b/.idea/misc.xml @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/.idea/modules.xml b/.idea/modules.xml new file mode 100644 index 000000000..99da9f5c3 --- /dev/null +++ b/.idea/modules.xml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/.idea/vcs.xml b/.idea/vcs.xml new file mode 100644 index 000000000..94a25f7f4 --- /dev/null +++ b/.idea/vcs.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/requirements-dev.txt b/requirements-dev.txt new file mode 100644 index 0000000000000000000000000000000000000000..63452185b624b48a50e09c1b510737794bc60629 GIT binary patch literal 176 zcmYL?OA3QP5JcZv$Q^P4gGvxLIgBPFgpBz(3d!Zw>QM|$Et>bJnx_^|%>zfpMR(>z zrsNz*=(y@?8gZjW%ALOXiN3gr1_ph8^9nhYlEoJD{yQNynXzu!PRfx!#_?g~uFq-R L@l`6r8g(l-6?CYfE_ U&E%qg2zx7)-T6-yTl*m_U+(c7tpET3 literal 0 HcmV?d00001 From 9a322fe73541d52c000e73974e591e43d37e898f Mon Sep 17 00:00:00 2001 From: Daniel Silva Date: Fri, 1 Apr 2022 00:33:24 -0300 Subject: [PATCH 3/7] Arquivos requiriments --- .travis.yml | 10 +++------- README.md | 2 +- 2 files changed, 4 insertions(+), 8 deletions(-) diff --git a/.travis.yml b/.travis.yml index 6694375b7..04bd3d484 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,11 +1,7 @@ language: python python: - - 3.7 + - 3.9 install: - - pip install -q pipenv codecov - - pipenv sync --dev + - pip install -r requiriments-dev.txt script: - - flake8 - - pytest libpythonpro --cov=libpythonpro -after_success: - - codecov \ No newline at end of file + - flake8 \ No newline at end of file diff --git a/README.md b/README.md index 47b1a6d58..6b76d15b4 100644 --- a/README.md +++ b/README.md @@ -6,7 +6,7 @@ Nesse curso é ensinado como contribuir com projetos de código aberto Link para o curso [Python Pro](https://www.python.pro.br/) -[![Build Status](https://travis-ci.org/pythonprobr/libpythonpro.svg?branch=master)](https://travis-ci.org/pythonprobr/libpythonpro) +[![Build Status](https://app.travis-ci.com/Dansilllva/libpythonpro.svg?branch=master)](https://app.travis-ci.com/Dansilllva/libpythonpro) [![Updates](https://pyup.io/repos/github/pythonprobr/libpythonpro/shield.svg)](https://pyup.io/repos/github/pythonprobr/libpythonpro/) [![Python 3](https://pyup.io/repos/github/pythonprobr/libpythonpro/python-3-shield.svg)](https://pyup.io/repos/github/pythonprobr/libpythonpro/) [![codecov](https://codecov.io/gh/pythonprobr/libpythonpro/branch/master/graph/badge.svg)](https://codecov.io/gh/pythonprobr/libpythonpro) From 70b059ada41e3c97b320f002903ca4b5f3c906ef Mon Sep 17 00:00:00 2001 From: Daniel Silva Date: Fri, 1 Apr 2022 00:40:15 -0300 Subject: [PATCH 4/7] Configurado Travis CI --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 04bd3d484..9e620d543 100644 --- a/.travis.yml +++ b/.travis.yml @@ -2,6 +2,6 @@ language: python python: - 3.9 install: - - pip install -r requiriments-dev.txt + - pip install -r requirements-dev.txt script: - flake8 \ No newline at end of file From 4b7cf05a799c118d27cbdae58b272e06930548eb Mon Sep 17 00:00:00 2001 From: Daniel Silva Date: Mon, 4 Apr 2022 23:13:44 -0300 Subject: [PATCH 5/7] =?UTF-8?q?Corrigindo=20itens=20para=20o=20padr=C3=A3o?= =?UTF-8?q?=20flake8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit close #13 --- libpythonpro/github_api.py | 1 + 1 file changed, 1 insertion(+) diff --git a/libpythonpro/github_api.py b/libpythonpro/github_api.py index 156c2db3a..93d98d1cf 100644 --- a/libpythonpro/github_api.py +++ b/libpythonpro/github_api.py @@ -12,5 +12,6 @@ def buscar_avatar(usuario): resp = requests.get(url) return resp.json()['avatar_url'] + if __name__ == '__main__': print(buscar_avatar('Dansilllva')) From dc2db716eaa1d6ba951e828f24dc705471d9b04d Mon Sep 17 00:00:00 2001 From: Daniel Silva Date: Tue, 12 Apr 2022 23:13:27 -0300 Subject: [PATCH 6/7] Corrigido bug pypi --- Pipfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Pipfile b/Pipfile index af5c7333d..3677ac1af 100644 --- a/Pipfile +++ b/Pipfile @@ -14,4 +14,4 @@ pytest-mock = "*" requests = "*" [requires] -python_version = "3.7" +python_version = "3.9" From f48418e810e96c9dabb93d51cd0c04b86ba5c501 Mon Sep 17 00:00:00 2001 From: Daniel Silva Date: Tue, 12 Apr 2022 23:51:23 -0300 Subject: [PATCH 7/7] inserido teste com pytest --- .travis.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 9e620d543..2c9fe5a17 100644 --- a/.travis.yml +++ b/.travis.yml @@ -4,4 +4,5 @@ python: install: - pip install -r requirements-dev.txt script: - - flake8 \ No newline at end of file + - flake8 + - pytest libpythonpro \ No newline at end of file