verifica 1.0.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- verifica-1.0.0/LICENSE +21 -0
- verifica-1.0.0/PKG-INFO +78 -0
- verifica-1.0.0/README.md +61 -0
- verifica-1.0.0/pyproject.toml +30 -0
- verifica-1.0.0/setup.cfg +4 -0
- verifica-1.0.0/src/verifica/__init__.py +0 -0
- verifica-1.0.0/src/verifica/__main__.py +85 -0
- verifica-1.0.0/src/verifica/builder.py +431 -0
- verifica-1.0.0/src/verifica/check.py +218 -0
- verifica-1.0.0/src/verifica/config.py +80 -0
- verifica-1.0.0/src/verifica/fetcher.py +75 -0
- verifica-1.0.0/src/verifica/imports_tester.py +146 -0
- verifica-1.0.0/src/verifica/tui.py +102 -0
- verifica-1.0.0/src/verifica.egg-info/PKG-INFO +78 -0
- verifica-1.0.0/src/verifica.egg-info/SOURCES.txt +17 -0
- verifica-1.0.0/src/verifica.egg-info/dependency_links.txt +1 -0
- verifica-1.0.0/src/verifica.egg-info/entry_points.txt +2 -0
- verifica-1.0.0/src/verifica.egg-info/requires.txt +2 -0
- verifica-1.0.0/src/verifica.egg-info/top_level.txt +1 -0
verifica-1.0.0/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Théo Modeneis Ruela
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
verifica-1.0.0/PKG-INFO
ADDED
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: verifica
|
|
3
|
+
Version: 1.0.0
|
|
4
|
+
Summary: Uma ferramenta simples para correção de atividades em python via CLI.
|
|
5
|
+
Author-email: Théo Modeneis Ruela <theo.ruela@gmail.com>
|
|
6
|
+
License-Expression: MIT
|
|
7
|
+
Project-URL: Homepage, https://github.com/espinafr/Verifica
|
|
8
|
+
Project-URL: Issues, https://github.com/espinafr/Verifica/issues
|
|
9
|
+
Classifier: Programming Language :: Python :: 3
|
|
10
|
+
Classifier: Operating System :: OS Independent
|
|
11
|
+
Requires-Python: >=3.9
|
|
12
|
+
Description-Content-Type: text/markdown
|
|
13
|
+
License-File: LICENSE
|
|
14
|
+
Requires-Dist: colorama>=0.4.6
|
|
15
|
+
Requires-Dist: platformdirs>=2.5.2
|
|
16
|
+
Dynamic: license-file
|
|
17
|
+
|
|
18
|
+
<div align="center">
|
|
19
|
+
<h1 align="center">Verifica</h1>
|
|
20
|
+
<p align="center">Uma ferramenta simples para correção de atividades em python via CLI.<br>
|
|
21
|
+
<table>
|
|
22
|
+
<tbody>
|
|
23
|
+
<tr>
|
|
24
|
+
<td><a href="https://pypi.org/project/verifica/">Página no Pypi</a></td>
|
|
25
|
+
<td align="right"><a href="https://github.com/espinafr/verifica/issues/new?template=denúncia-de-bug.yml">Reportar bug</a></td>
|
|
26
|
+
</tr>
|
|
27
|
+
<tr>
|
|
28
|
+
<td colspan="2" align="center"><a href="https://github.com/espinafr/verifica/tree/master/docs">Como configurar</a></td>
|
|
29
|
+
</tr>
|
|
30
|
+
</tbody>
|
|
31
|
+
</table>
|
|
32
|
+
</div>
|
|
33
|
+
|
|
34
|
+
## Sobre o projeto
|
|
35
|
+
|
|
36
|
+
**Verifica** é uma ferramenta simples que permite que professores preparem testes automatizados para corrigir atividades em python, fornecendo aos alunos uma correção instantânea para seus programas antes deles serem enviados oficialmente.
|
|
37
|
+
|
|
38
|
+
## Como usar
|
|
39
|
+
_Quer saber como criar os arquivos de correção? [Clique aqui](https://github.com/espinafr/verifica/tree/master/docs)_
|
|
40
|
+
1. Baixe a ferramenta:
|
|
41
|
+
```bash
|
|
42
|
+
pip install verifica
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
2. Faça as atividades propostas com base nas orientações recebidas.
|
|
46
|
+
|
|
47
|
+
3. No diretório com os arquivos `.py`, execute o comando `python -m verifica` seguido da localização do diretório com os arquivos de correção no github
|
|
48
|
+
```bash
|
|
49
|
+
python -m verifica usuario/repositorio/branch/localizacao/da/pasta
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
## Como compilar
|
|
53
|
+
|
|
54
|
+
Para gerar os arquivos de distribuição do projeto, certifique-se de ter o módulo `build` instalado:
|
|
55
|
+
|
|
56
|
+
```bash
|
|
57
|
+
pip install build
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
Em seguida, execute o comando de construção na raiz do projeto:
|
|
61
|
+
|
|
62
|
+
```bash
|
|
63
|
+
python -m build
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
Os arquivos gerados (arquivos `.tar.gz` e `.whl`) estarão disponíveis no diretório `dist/`. Use o arquivo `.whl` para distribuição e instalação do pacote via pip.
|
|
67
|
+
|
|
68
|
+
```bash
|
|
69
|
+
pip install dist/{NOME DO ARQUIVO GERADO}
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
## Reconhecimentos
|
|
73
|
+
|
|
74
|
+
Veja o arquivo [ACKNOWLEDGEMENTS](https://github.com/espinafr/verifica/blob/master/ACKNOWLEDGEMENTS.md).
|
|
75
|
+
|
|
76
|
+
## Licença
|
|
77
|
+
|
|
78
|
+
Veja o arquivo [LICENSE](https://github.com/espinafr/verifica/blob/master/LICENSE).
|
verifica-1.0.0/README.md
ADDED
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
<div align="center">
|
|
2
|
+
<h1 align="center">Verifica</h1>
|
|
3
|
+
<p align="center">Uma ferramenta simples para correção de atividades em python via CLI.<br>
|
|
4
|
+
<table>
|
|
5
|
+
<tbody>
|
|
6
|
+
<tr>
|
|
7
|
+
<td><a href="https://pypi.org/project/verifica/">Página no Pypi</a></td>
|
|
8
|
+
<td align="right"><a href="https://github.com/espinafr/verifica/issues/new?template=denúncia-de-bug.yml">Reportar bug</a></td>
|
|
9
|
+
</tr>
|
|
10
|
+
<tr>
|
|
11
|
+
<td colspan="2" align="center"><a href="https://github.com/espinafr/verifica/tree/master/docs">Como configurar</a></td>
|
|
12
|
+
</tr>
|
|
13
|
+
</tbody>
|
|
14
|
+
</table>
|
|
15
|
+
</div>
|
|
16
|
+
|
|
17
|
+
## Sobre o projeto
|
|
18
|
+
|
|
19
|
+
**Verifica** é uma ferramenta simples que permite que professores preparem testes automatizados para corrigir atividades em python, fornecendo aos alunos uma correção instantânea para seus programas antes deles serem enviados oficialmente.
|
|
20
|
+
|
|
21
|
+
## Como usar
|
|
22
|
+
_Quer saber como criar os arquivos de correção? [Clique aqui](https://github.com/espinafr/verifica/tree/master/docs)_
|
|
23
|
+
1. Baixe a ferramenta:
|
|
24
|
+
```bash
|
|
25
|
+
pip install verifica
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
2. Faça as atividades propostas com base nas orientações recebidas.
|
|
29
|
+
|
|
30
|
+
3. No diretório com os arquivos `.py`, execute o comando `python -m verifica` seguido da localização do diretório com os arquivos de correção no github
|
|
31
|
+
```bash
|
|
32
|
+
python -m verifica usuario/repositorio/branch/localizacao/da/pasta
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
## Como compilar
|
|
36
|
+
|
|
37
|
+
Para gerar os arquivos de distribuição do projeto, certifique-se de ter o módulo `build` instalado:
|
|
38
|
+
|
|
39
|
+
```bash
|
|
40
|
+
pip install build
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
Em seguida, execute o comando de construção na raiz do projeto:
|
|
44
|
+
|
|
45
|
+
```bash
|
|
46
|
+
python -m build
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
Os arquivos gerados (arquivos `.tar.gz` e `.whl`) estarão disponíveis no diretório `dist/`. Use o arquivo `.whl` para distribuição e instalação do pacote via pip.
|
|
50
|
+
|
|
51
|
+
```bash
|
|
52
|
+
pip install dist/{NOME DO ARQUIVO GERADO}
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
## Reconhecimentos
|
|
56
|
+
|
|
57
|
+
Veja o arquivo [ACKNOWLEDGEMENTS](https://github.com/espinafr/verifica/blob/master/ACKNOWLEDGEMENTS.md).
|
|
58
|
+
|
|
59
|
+
## Licença
|
|
60
|
+
|
|
61
|
+
Veja o arquivo [LICENSE](https://github.com/espinafr/verifica/blob/master/LICENSE).
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
[build-system]
|
|
2
|
+
requires = ["setuptools >= 77.0.3"]
|
|
3
|
+
build-backend = "setuptools.build_meta"
|
|
4
|
+
|
|
5
|
+
[project]
|
|
6
|
+
name = "verifica"
|
|
7
|
+
version = "1.0.0"
|
|
8
|
+
dependencies = [
|
|
9
|
+
"colorama>=0.4.6",
|
|
10
|
+
"platformdirs>=2.5.2"
|
|
11
|
+
]
|
|
12
|
+
authors = [
|
|
13
|
+
{ name="Théo Modeneis Ruela", email="theo.ruela@gmail.com" },
|
|
14
|
+
]
|
|
15
|
+
description = "Uma ferramenta simples para correção de atividades em python via CLI."
|
|
16
|
+
readme = "README.md"
|
|
17
|
+
requires-python = ">=3.9"
|
|
18
|
+
classifiers = [
|
|
19
|
+
"Programming Language :: Python :: 3",
|
|
20
|
+
"Operating System :: OS Independent",
|
|
21
|
+
]
|
|
22
|
+
license = "MIT"
|
|
23
|
+
license-files = ["LICEN[CS]E*"]
|
|
24
|
+
|
|
25
|
+
[project.urls]
|
|
26
|
+
Homepage = "https://github.com/espinafr/Verifica"
|
|
27
|
+
Issues = "https://github.com/espinafr/Verifica/issues"
|
|
28
|
+
|
|
29
|
+
[project.scripts]
|
|
30
|
+
verifica = "verifica.__main__:main"
|
verifica-1.0.0/setup.cfg
ADDED
|
File without changes
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
import argparse
|
|
2
|
+
from pathlib import Path
|
|
3
|
+
from colorama import init
|
|
4
|
+
import logging
|
|
5
|
+
import sys
|
|
6
|
+
|
|
7
|
+
from .config import settings
|
|
8
|
+
from .check import Checker
|
|
9
|
+
from .fetcher import Fetcher
|
|
10
|
+
from .builder import Builder
|
|
11
|
+
|
|
12
|
+
logging.basicConfig(
|
|
13
|
+
level=logging.ERROR,
|
|
14
|
+
format='%(levelname)s - %(message)s',
|
|
15
|
+
handlers=[logging.FileHandler(f'{settings.config_dir}/app.log', mode='w', encoding='utf-8'), logging.StreamHandler(stream=sys.stdout)]
|
|
16
|
+
)
|
|
17
|
+
init(autoreset=True)
|
|
18
|
+
|
|
19
|
+
def main():
|
|
20
|
+
parser = argparse.ArgumentParser(description="Uma ferramenta simples para correção de atividades em python via CLI.", add_help=False)
|
|
21
|
+
positional = parser.add_argument_group("argumentos posicionais")
|
|
22
|
+
options = parser.add_argument_group("opções")
|
|
23
|
+
|
|
24
|
+
positional.add_argument("atividade", nargs="?", help="A URL do github ou caminho local do arquivo usado para a correção da atividade.")
|
|
25
|
+
options.add_argument("-f", "--files", default=Path.cwd(), help="Diretório com a(s) atividade(s) a ser(em) corrigida(s).")
|
|
26
|
+
options.add_argument("-h", "--help", "--ajuda", action="help", help="Mostra essa mensagem de ajuda.")
|
|
27
|
+
options.add_argument("-c", "--config", action="store_true", help="Mostra o caminho do arquivo de configuração.")
|
|
28
|
+
options.add_argument("-d", "--debug", action="store_true", help="Ativa o modo debug, mostrando mais informações durante a execução.")
|
|
29
|
+
options.add_argument("-l", "--local", action="store_true", help="Caminho local para a pasta com o arquivo de respostas, caso não queira baixar do github.")
|
|
30
|
+
options.add_argument("--version", action="store_true", help="Mostra a versão do programa.")
|
|
31
|
+
options.add_argument("-b", "--builder", action="store_true", help="TUI para criar arquivos de correção de atividades.")
|
|
32
|
+
|
|
33
|
+
args = parser.parse_args()
|
|
34
|
+
|
|
35
|
+
if args.debug:
|
|
36
|
+
logging.getLogger().setLevel(logging.DEBUG)
|
|
37
|
+
logging.info("Modo debug ativado. Mostrando informações detalhadas durante a execução.")
|
|
38
|
+
|
|
39
|
+
if args.config:
|
|
40
|
+
print(settings.config_path)
|
|
41
|
+
return
|
|
42
|
+
|
|
43
|
+
if args.version:
|
|
44
|
+
print(settings.get_version())
|
|
45
|
+
return
|
|
46
|
+
|
|
47
|
+
if args.builder:
|
|
48
|
+
builder = Builder()
|
|
49
|
+
builder.start()
|
|
50
|
+
return
|
|
51
|
+
|
|
52
|
+
if not args.atividade:
|
|
53
|
+
parser.error("o seguinte argumento é obrigatório: atividade")
|
|
54
|
+
|
|
55
|
+
if not args.local:
|
|
56
|
+
answers = Fetcher(args.atividade)
|
|
57
|
+
try:
|
|
58
|
+
print("Baixando arquivo de correção...")
|
|
59
|
+
logging.debug(f"CAMINHO DO ARQUIVO BAIXADO: {answers.fetch()}")
|
|
60
|
+
except Exception as e:
|
|
61
|
+
logging.error(f"Não foi possível localizar o arquivo de correção em '{args.atividade}'")
|
|
62
|
+
sys.exit(1)
|
|
63
|
+
else:
|
|
64
|
+
answers = Fetcher(args.atividade, local=True)
|
|
65
|
+
try:
|
|
66
|
+
print("Buscando arquivo de correção local...")
|
|
67
|
+
logging.debug(f"CAMINHO DO ARQUIVO LOCAL: {answers.get_file()}")
|
|
68
|
+
except Exception as e:
|
|
69
|
+
logging.error(f"Não foi possível localizar o arquivo de correção em '{args.atividade}'")
|
|
70
|
+
sys.exit(1)
|
|
71
|
+
|
|
72
|
+
decoded_answers = answers.get_decoded_json()
|
|
73
|
+
answers.cleanup()
|
|
74
|
+
|
|
75
|
+
checker = Checker(args.files, decoded_answers)
|
|
76
|
+
|
|
77
|
+
checker.setup_roadmap()
|
|
78
|
+
|
|
79
|
+
results = checker.run_roadmap()
|
|
80
|
+
checker.show_results(results)
|
|
81
|
+
|
|
82
|
+
sys.exit(0)
|
|
83
|
+
|
|
84
|
+
if __name__ == "__main__":
|
|
85
|
+
main()
|