From 38e86fbda76c7efb2c2878051b05f7d1db6a7f86 Mon Sep 17 00:00:00 2001 From: Adorilson Bezerraa Date: Tue, 24 Jan 2023 22:31:22 +0000 Subject: [PATCH 1/4] Adicao de ambientes virtuais em .gitignore --- .gitignore | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.gitignore b/.gitignore index 1e01e736..c9c9a349 100644 --- a/.gitignore +++ b/.gitignore @@ -50,3 +50,7 @@ testem.log # System Files .DS_Store Thumbs.db + +# Virtual environments +.env +.venv From df9521a61851ffe487c87f37fc026b93009552dc Mon Sep 17 00:00:00 2001 From: Adorilson Bezerraa Date: Tue, 24 Jan 2023 22:39:45 +0000 Subject: [PATCH 2/4] =?UTF-8?q?Remocao=20de=20vari=C3=A1veis=20nao=20usada?= =?UTF-8?q?s=20e=20para=20referencias=20inexistentes?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/app/admin/exportar-dados/exportar-dados.component.ts | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/app/admin/exportar-dados/exportar-dados.component.ts b/src/app/admin/exportar-dados/exportar-dados.component.ts index 5707cff3..db3e950b 100644 --- a/src/app/admin/exportar-dados/exportar-dados.component.ts +++ b/src/app/admin/exportar-dados/exportar-dados.component.ts @@ -4,14 +4,12 @@ import Query from 'src/app/model/firestore/query'; import Submissao from 'src/app/model/submissao'; import Turma from 'src/app/model/turma'; import { SelectItem } from 'primeng/api'; -import pageTracks from '../../../../json/pageTracks.json'; -import estudantesJson from '../../../../json/estudantes.json'; import Usuario from 'src/app/model/usuario'; import EstatisticaPageTrack from 'src/app/model/modelagem/estatisticaPageTrack'; import { Assunto } from '../../model/aprendizagem/questoes/assunto'; -estudantesJson; + @Component({ selector: 'app-exportar-dados', templateUrl: './exportar-dados.component.html', From fd1e612254ae277594a09bab11b607325b7cb390 Mon Sep 17 00:00:00 2001 From: Adorilson Bezerraa Date: Tue, 24 Jan 2023 22:40:56 +0000 Subject: [PATCH 3/4] Remocao de referencias para fontes inexistentes --- src/app/model/analytics/analyticsProgramacao.ts | 3 ++- src/app/model/experimento/export.ts | 4 +++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/src/app/model/analytics/analyticsProgramacao.ts b/src/app/model/analytics/analyticsProgramacao.ts index 39c19724..432234a0 100644 --- a/src/app/model/analytics/analyticsProgramacao.ts +++ b/src/app/model/analytics/analyticsProgramacao.ts @@ -4,7 +4,8 @@ import Submissao from '../submissao'; import { Util } from '../util'; import { EventosProgramacao } from './enum/eventosProgramacao'; -import submissoesEstudantes from '../../../../json/submissoes_27_jan_v2.json'; +//import submissoesEstudantes from '../../../../json/submissoes_27_jan_v2.json'; +let submissoesEstudantes = {} enum EstadosAlgoritmo{ diff --git a/src/app/model/experimento/export.ts b/src/app/model/experimento/export.ts index 8db97575..f1006d36 100644 --- a/src/app/model/experimento/export.ts +++ b/src/app/model/experimento/export.ts @@ -1,7 +1,9 @@ import { Observable, forkJoin } from 'rxjs'; import Submissao from '../submissao'; -import submissoesEstudantes from '../../../../json/submissoes_29_mai.json'; +//import submissoesEstudantes from '../../../../json/submissoes_29_mai.json'; +let submissoesEstudantes = {}; + import ErroCompilacaoFactory from '../errors/analise-compilacao/erroCompilacaoFactory'; import NameError from '../errors/analise-compilacao/nameError'; import ErroSintaxeVariavel from '../errors/analise-pre-compilacao/erroSintaxeVariavel'; From e5fbdb554fcee6f0ded8c891ab012673908c0490 Mon Sep 17 00:00:00 2001 From: Adorilson Bezerraa Date: Tue, 24 Jan 2023 22:42:50 +0000 Subject: [PATCH 4/4] Atualizacao do README (secao Instalacao) --- README.md | 54 ++++++++++++++++++++++++++++++++++++++++++++++-------- 1 file changed, 46 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index 88bb6eaf..065ae989 100644 --- a/README.md +++ b/README.md @@ -26,11 +26,49 @@ https://www.lucidchart.com/invitations/accept/c08e9d10-8fa1-41e7-a148-c1b70f3cb0 # Instalação -1. Instalar o Angular. -2. Instalar as dependências Python do projeto: pip3 install --user Django==2.2.4 && pip3 install --user djangorestframework -&& pip3 install --user django-cors-headers && pip3 install --user pexpect && pip3 install --user python-decouple -3. Clonar o projeto -4. Acessar a pasta do projeto e instalar as dependências do projeto: npm install -5. Acessar a pasta src/app/model/firestore e digitar o comando: git submodule init && git submodule update -6. Rodar o projeto: ng serve -7. Acessar a pasta backend e executar o servidor Django: python manage.py runserver +## Angular e demais dependências Node + +1. Clonar o projeto e acessar o diretório +2. Criar ambiente virtual para Node 14.21.2 +``` +nodeenv --node=14.21.2 .env +. .env/bin/activate +``` +3. Instalar as dependências Node do projeto +``` +npm install +``` +4. Acessar a pasta `src/app/model/firestore` e configurar submodulos do git +``` +cd src/app/model/firestore +git submodule init +git submodule update +cd - +``` +5. Rodar o projeto +``` +npm run ng serve +``` + +O comando acima deverá resultar em +``` +** Angular Live Development Server is listening on localhost:4200, open your browser on http://localhost:4200/ ** +``` + +## Backend com Django + +0. Acessar o diretório `backend` (diretório não existe!) +1. Criar e ativar ambiente virtual +``` +python -m venv .venv +source .venv/bin/activate +``` +2. Instalar as dependências Python do projeto: +``` +pip3 install Django==2.2.4 djangorestframework django-cors-headers +pip3 install pexpect python-decouple +``` +3. Executar o servidor Django: +``` +python manage.py runserver +```