From dbd035e85aae314466b14444cbc7bf68876a8835 Mon Sep 17 00:00:00 2001 From: gomesmarcos Date: Tue, 28 Feb 2023 23:19:32 -0300 Subject: [PATCH 1/7] update gitignore --- .gitignore | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.gitignore b/.gitignore index b67e93a..0f581b9 100644 --- a/.gitignore +++ b/.gitignore @@ -172,3 +172,5 @@ poetry.toml # Generated using ignr.py - github.com/Antrikshy/ignr.py +# Please dont judge me 🥲 +.vscode/ \ No newline at end of file From f169d6087bdb4119dc97a9a6af3e114430284b36 Mon Sep 17 00:00:00 2001 From: gomesmarcos Date: Tue, 28 Feb 2023 23:27:24 -0300 Subject: [PATCH 2/7] create script file to automate some commands --- Makefile | 99 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 99 insertions(+) create mode 100644 Makefile diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..9350801 --- /dev/null +++ b/Makefile @@ -0,0 +1,99 @@ +# USAGE: make +# Example: make cover +# It will run the unit tests and report the testing coverage's code + + +# Terminal Colors +Color_Off=\033[0m +Black=\033[1;30m +Red=\033[1;31m +Green=\033[1;32m +Yellow=\033[1;33m + +# Use guard for make commands that have required arguments +guard-%: + @ if [ "${${*}}" = "" ]; then \ + echo "Informe a variável \"$*\" "; \ + exit 1; \ + fi + +clean: + find . -type d -name __pycache__ -exec rm -r {} \+ + +# ================================================================= +# TESTING +# ================================================================= + +collect-tests: + pytest --collect-only + +cover: + coverage run --source=src/ -m pytest -vv tests/ && coverage report -m + +test-verbose-with-print: + pytest -svv tests/ + +cover-html: + coverage html + +delete-local-branch: guard-name + git branch -D ${name} + +delete-remote-origin-branch: guard-name + git push origin --delete ${name} + +# ================================================================= +# GITFLOW SUGESTIONS +# ================================================================= + +new-feature: guard-name + git checkout -b feature/${name} dev + git pull origin dev + git push -u origin feature/${name} + git branch + +new-hotfix: guard-name + git checkout -b hotfix/${name} master + git pull origin master + git branch + +new-release: guard-name + git checkout -b release/${name} dev + git pull origin dev + git push -u origin release/${name} + git branch + +new-release-by-current-branch: guard-name + git checkout -b release/${name} $(git symbolic-ref --short HEAD) + git push -u origin release/${name} + git branch + +new-tag: guard-name guard-text + git checkout master + git pull origin master + git tag -a ${name} -m"${text}" master + git push origin ${name} + git tag + +solve-conflict: guard-destiny guard-working + git checkout -b conflict/${destiny}-${working} ${destiny} + git push -u origin conflict/${destiny}-${working} + git pull origin ${working} + git branch + +# ================================================================= +# Installation and configuration +# ================================================================= + +install: + echo -e "${Green}Installing Python 3.11.1${Color_Off}"; + pyenv install 3.11.1 ; + echo -e "${Green}Activating local environment${Color_Off}"; + pyenv local 3.11.1 ; + echo -e "${Green}Installing poetry on pyenv version${Color_Off}"; + pip3 install poetry; + echo -e "${Green}Installing dependencies${Color_Off}"; + poetry install; + echo -e "${Green}Spawning poetry shell${Color_Off}"; + poetry shell; + From ef336257ca8f36621efbf8160487382c0f87b9a8 Mon Sep 17 00:00:00 2001 From: gomesmarcos Date: Tue, 28 Feb 2023 23:34:13 -0300 Subject: [PATCH 3/7] update makefile logs --- Makefile | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/Makefile b/Makefile index 9350801..0982316 100644 --- a/Makefile +++ b/Makefile @@ -86,14 +86,15 @@ solve-conflict: guard-destiny guard-working # ================================================================= install: - echo -e "${Green}Installing Python 3.11.1${Color_Off}"; - pyenv install 3.11.1 ; - echo -e "${Green}Activating local environment${Color_Off}"; - pyenv local 3.11.1 ; - echo -e "${Green}Installing poetry on pyenv version${Color_Off}"; + echo -e "${Green}🐍🐍 Installing Python 3.11.1 🐍🐍${Color_Off}"; + pyenv install 3.11.1; + echo -e "${Green}⏯️⏯️ Activating local environment ⏯️⏯️${Color_Off}"; + pyenv local 3.11.1; + echo -e "${Green}📜📜 Installing poetry with pyenv version 📜📜${Color_Off}"; pip3 install poetry; - echo -e "${Green}Installing dependencies${Color_Off}"; + echo -e "${Green}🚸🚸 Installing dependencies 🚸🚸${Color_Off}"; poetry install; - echo -e "${Green}Spawning poetry shell${Color_Off}"; + echo -e "${Green}🐚🐚 Spawning poetry shell 🐚🐚${Color_Off}"; poetry shell; + echo -e "${Green}✨✨ All Done ✨✨${Color_Off}"; From b5581409a9dfe19c46c33850148a6fcbc64a219e Mon Sep 17 00:00:00 2001 From: gomesmarcos Date: Tue, 28 Feb 2023 23:45:34 -0300 Subject: [PATCH 4/7] fixing acentuation mistakes --- docs/02_contribua.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/02_contribua.md b/docs/02_contribua.md index 8a59de9..0f66723 100644 --- a/docs/02_contribua.md +++ b/docs/02_contribua.md @@ -184,4 +184,4 @@ Caso não tenha encontrado o que precisa, você pode abrir uma [issue no projeto ## Melhoria contínua -Esse documento pode ser melhorado por qualquer pessoa que tenha interesse em melhora-lo. Então, sinta-se a vontade para fornecer mais dicas as pessoas que desejam contribuir também :heart: +Esse documento pode ser melhorado por qualquer pessoa que tenha interesse em melhorá-lo. Então, sinta-se à vontade para fornecer mais dicas às pessoas que desejam contribuir também ❤️❤️ From dfbaf28b261291e5bf6f189bab8b497ef8f7651a Mon Sep 17 00:00:00 2001 From: gomesmarcos Date: Tue, 28 Feb 2023 23:46:02 -0300 Subject: [PATCH 5/7] create run command on makefile --- Makefile | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 0982316..f00d9eb 100644 --- a/Makefile +++ b/Makefile @@ -82,7 +82,7 @@ solve-conflict: guard-destiny guard-working git branch # ================================================================= -# Installation and configuration +# Installation, configuration and running # ================================================================= install: @@ -98,3 +98,5 @@ install: poetry shell; echo -e "${Green}✨✨ All Done ✨✨${Color_Off}"; +run: guard-arg + poetry run notas-musicais ${arg} \ No newline at end of file From e3465a291a1bc003f57642066664123e5337c75b Mon Sep 17 00:00:00 2001 From: gomesmarcos Date: Tue, 28 Feb 2023 23:46:43 -0300 Subject: [PATCH 6/7] sugestions for installing using make --- docs/03_tutorial_tecnico.md | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 docs/03_tutorial_tecnico.md diff --git a/docs/03_tutorial_tecnico.md b/docs/03_tutorial_tecnico.md new file mode 100644 index 0000000..8cec4c8 --- /dev/null +++ b/docs/03_tutorial_tecnico.md @@ -0,0 +1,16 @@ +# Tutorial + +Se você chegou até aqui, significa que quer ajudar tecnicamente de alguma forma com o `notas-musicais`. + +## Dependências de desenvolvimento + +O `notas-musicais`, atualmente, se fundamenta em algumas ferramentas: +* `pyenv` - gerenciador de versões do python +* `python 3.11.1` - linguagem principal do `notas-musicais` +* `poetry` - gerenciador de dependencias + +## Instalação + +Após verificar as +Execute o comando `make install` para instalação e configuração do projeto +Para verificar que tudo está ok, execute os teste unitários com `make cover`. \ No newline at end of file From f1759f92383f1c87f611e402aa4c9830be896dd0 Mon Sep 17 00:00:00 2001 From: gomesmarcos Date: Tue, 28 Feb 2023 23:55:12 -0300 Subject: [PATCH 7/7] add blank line --- .gitignore | 2 +- Makefile | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index 0f581b9..18fa1b9 100644 --- a/.gitignore +++ b/.gitignore @@ -173,4 +173,4 @@ poetry.toml # Generated using ignr.py - github.com/Antrikshy/ignr.py # Please dont judge me 🥲 -.vscode/ \ No newline at end of file +.vscode/ diff --git a/Makefile b/Makefile index f00d9eb..105591c 100644 --- a/Makefile +++ b/Makefile @@ -99,4 +99,4 @@ install: echo -e "${Green}✨✨ All Done ✨✨${Color_Off}"; run: guard-arg - poetry run notas-musicais ${arg} \ No newline at end of file + poetry run notas-musicais ${arg}