Skip to content

Commit f54ae79

Browse files
committed
fix: Playground: adapt
1 parent 19cbaed commit f54ae79

File tree

4 files changed

+252
-30
lines changed

4 files changed

+252
-30
lines changed

Playground/Makefile

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
cold-start:
2+
make stop;
3+
make start;
4+
15
start:
26
docker compose build -q;
37
docker compose up -d;
@@ -10,4 +14,7 @@ logs:
1014

1115
shell:
1216
make start;
13-
docker compose exec -it lab bash;
17+
docker compose exec -it lab bash;
18+
19+
open-linux:
20+
nohup xdg-open http://127.0.0.1:8888/tree &>/dev/null

Playground/docker-compose.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ services:
99
"--no-browser",
1010
"--ip=0.0.0.0",
1111
"--NotebookApp.token=''",
12-
"--NotebookApp.notebook_dir='/home/user/gerar-horario/playground/notebooks'",
12+
"--NotebookApp.notebook_dir='/home/user/gerar-horario/Playground/notebooks'",
1313
]
1414
volumes:
1515
- ../:/home/user/gerar-horario

Playground/notebooks/.ipynb_checkpoints/OlaGerador-checkpoint.ipynb

Lines changed: 70 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -12,14 +12,18 @@
1212
"cell_type": "code",
1313
"execution_count": 1,
1414
"id": "0fee0429-ba2b-455a-966f-71b00ec3cb1e",
15-
"metadata": {},
15+
"metadata": {
16+
"vscode": {
17+
"languageId": "csharp"
18+
}
19+
},
1620
"outputs": [
1721
{
1822
"data": {
1923
"text/html": [
2024
"\r\n",
2125
"<div>\r\n",
22-
" <div id='dotnet-interactive-this-cell-804.Microsoft.DotNet.Interactive.Http.HttpPort' style='display: none'>\r\n",
26+
" <div id='dotnet-interactive-this-cell-286.Microsoft.DotNet.Interactive.Http.HttpPort' style='display: none'>\r\n",
2327
" The below script needs to be able to find the current output cell; this is an easy method to get it.\r\n",
2428
" </div>\r\n",
2529
" <script type='text/javascript'>\r\n",
@@ -64,12 +68,12 @@
6468
"}\r\n",
6569
"\r\n",
6670
"function loadDotnetInteractiveApi() {\r\n",
67-
" probeAddresses([\"http://172.22.0.2:2048/\", \"http://127.0.0.1:2048/\"])\r\n",
71+
" probeAddresses([\"http://172.25.0.2:2049/\", \"http://127.0.0.1:2049/\"])\r\n",
6872
" .then((root) => {\r\n",
6973
" // use probing to find host url and api resources\r\n",
7074
" // load interactive helpers and language services\r\n",
7175
" let dotnetInteractiveRequire = require.config({\r\n",
72-
" context: '804.Microsoft.DotNet.Interactive.Http.HttpPort',\r\n",
76+
" context: '286.Microsoft.DotNet.Interactive.Http.HttpPort',\r\n",
7377
" paths:\r\n",
7478
" {\r\n",
7579
" 'dotnet-interactive': `${root}resources`\r\n",
@@ -146,35 +150,63 @@
146150
"id": "617ed7b2-355d-43f8-867b-a91648a9a61c",
147151
"metadata": {},
148152
"source": [
149-
"## Faz o build do projeto-gerar-horario;"
153+
"## Faz o build do gerar-horario;"
154+
]
155+
},
156+
{
157+
"cell_type": "code",
158+
"execution_count": 7,
159+
"id": "8de22ff6-98d6-4586-83ad-bfa053a5eb8c",
160+
"metadata": {},
161+
"outputs": [
162+
{
163+
"data": {
164+
"text/html": [
165+
"<div><div></div><div></div><div><strong>Installed Packages</strong><ul><li><span>Google.OrTools, 9.9.3963</span></li></ul></div></div>"
166+
]
167+
},
168+
"metadata": {},
169+
"output_type": "display_data"
170+
}
171+
],
172+
"source": [
173+
"#r \"nuget:Google.OrTools,9.9.3963\""
150174
]
151175
},
152176
{
153177
"cell_type": "code",
154178
"execution_count": 2,
155179
"id": "b50a9f5d-c261-4500-8a58-e1dc1ba27c66",
156-
"metadata": {},
180+
"metadata": {
181+
"vscode": {
182+
"languageId": "csharp"
183+
}
184+
},
157185
"outputs": [
158186
{
159187
"name": "stdout",
160188
"output_type": "stream",
161189
"text": [
162-
"MSBuild version 17.8.3+195e7f5a3 for .NET\n",
190+
" Determining projects to restore...\n",
191+
" Restored /home/user/gerar-horario/GerarHorario-Tests/GerarHorario-Tests.csproj (in 12.73 sec).\n",
192+
" 1 of 2 projects are up-to-date for restore.\n",
193+
"MSBuild version 17.9.8+b34f75857 for .NET\n",
163194
" Determining projects to restore...\n",
164195
" All projects are up-to-date for restore.\n",
165-
" GerarHorario -> /home/user/gerar-horario/projeto-gerar-horario/GerarHorario/bin/Debug/net8.0/GerarHorario.dll\n",
196+
" GerarHorario -> /home/user/gerar-horario/GerarHorario/bin/Debug/net8.0/GerarHorario.dll\n",
166197
"\n",
167198
"Build succeeded.\n",
168199
" 0 Warning(s)\n",
169200
" 0 Error(s)\n",
170201
"\n",
171-
"Time Elapsed 00:00:00.88\n"
202+
"Time Elapsed 00:00:00.94\n"
172203
]
173204
}
174205
],
175206
"source": [
176207
"#!pwsh\n",
177-
"dotnet build \"/home/user/gerar-horario/projeto-gerar-horario/GerarHorario\";"
208+
"dotnet restore \"/home/user/gerar-horario\";\n",
209+
"dotnet build \"/home/user/gerar-horario/GerarHorario\";"
178210
]
179211
},
180212
{
@@ -189,10 +221,14 @@
189221
"cell_type": "code",
190222
"execution_count": 3,
191223
"id": "eb2599d7-7693-4ad7-8b7c-b3f8e49e23c5",
192-
"metadata": {},
224+
"metadata": {
225+
"vscode": {
226+
"languageId": "csharp"
227+
}
228+
},
193229
"outputs": [],
194230
"source": [
195-
"#r \"../../projeto-gerar-horario/GerarHorario/bin/Debug/net8.0/GerarHorario.dll\""
231+
"#r \"../../GerarHorario/bin/Debug/net8.0/GerarHorario.dll\""
196232
]
197233
},
198234
{
@@ -207,7 +243,11 @@
207243
"cell_type": "code",
208244
"execution_count": 4,
209245
"id": "b375596e-7023-4eb6-bf8b-dbace732afa8",
210-
"metadata": {},
246+
"metadata": {
247+
"vscode": {
248+
"languageId": "csharp"
249+
}
250+
},
211251
"outputs": [],
212252
"source": [
213253
"using Sisgea.GerarHorario.Core;"
@@ -225,13 +265,25 @@
225265
"cell_type": "code",
226266
"execution_count": 6,
227267
"id": "a8c24654-2664-4cc0-8c0d-3cb22b94c5b8",
228-
"metadata": {},
268+
"metadata": {
269+
"vscode": {
270+
"languageId": "csharp"
271+
}
272+
},
229273
"outputs": [
230274
{
231-
"name": "stdout",
232-
"output_type": "stream",
233-
"text": [
234-
"True\n"
275+
"ename": "Error",
276+
"evalue": "System.IO.FileNotFoundException: Could not load file or assembly 'Google.OrTools, Version=9.9.3963.0, Culture=neutral, PublicKeyToken=c9649d7040f27838'. The system cannot find the file specified.\n\nFile name: 'Google.OrTools, Version=9.9.3963.0, Culture=neutral, PublicKeyToken=c9649d7040f27838'\n at Sisgea.GerarHorario.Core.GerarHorarioContext..ctor\n at Sisgea.GerarHorario.Core.Gerador.PrepararModelComRestricoes(GerarHorarioOptions options) in /home/user/gerar-horario/GerarHorario/Gerador/Gerador.cs:line 19\n at Sisgea.GerarHorario.Core.Gerador.GerarHorario(GerarHorarioOptions options)+MoveNext() in /home/user/gerar-horario/GerarHorario/Gerador/Gerador.cs:line 53\n at Sisgea.GerarHorario.Core.Main.Retorno() in /home/user/gerar-horario/GerarHorario/Main.cs:line 124\n at Submission#7.<<Initialize>>d__0.MoveNext()\n--- End of stack trace from previous location ---\n at Microsoft.CodeAnalysis.Scripting.ScriptExecutionState.RunSubmissionsAsync[TResult](ImmutableArray`1 precedingExecutors, Func`2 currentExecutor, StrongBox`1 exceptionHolderOpt, Func`2 catchExceptionOpt, CancellationToken cancellationToken)",
277+
"output_type": "error",
278+
"traceback": [
279+
"System.IO.FileNotFoundException: Could not load file or assembly 'Google.OrTools, Version=9.9.3963.0, Culture=neutral, PublicKeyToken=c9649d7040f27838'. The system cannot find the file specified.\n\nFile name: 'Google.OrTools, Version=9.9.3963.0, Culture=neutral, PublicKeyToken=c9649d7040f27838'\n at Sisgea.GerarHorario.Core.GerarHorarioContext..ctor\n at Sisgea.GerarHorario.Core.Gerador.PrepararModelComRestricoes(GerarHorarioOptions options) in /home/user/gerar-horario/GerarHorario/Gerador/Gerador.cs:line 19\n at Sisgea.GerarHorario.Core.Gerador.GerarHorario(GerarHorarioOptions options)+MoveNext() in /home/user/gerar-horario/GerarHorario/Gerador/Gerador.cs:line 53\n at Sisgea.GerarHorario.Core.Main.Retorno() in /home/user/gerar-horario/GerarHorario/Main.cs:line 124\n at Submission#7.<<Initialize>>d__0.MoveNext()\n--- End of stack trace from previous location ---\n at Microsoft.CodeAnalysis.Scripting.ScriptExecutionState.RunSubmissionsAsync[TResult](ImmutableArray`1 precedingExecutors, Func`2 currentExecutor, StrongBox`1 exceptionHolderOpt, Func`2 catchExceptionOpt, CancellationToken cancellationToken)",
280+
" at Sisgea.GerarHorario.Core.GerarHorarioContext..ctor",
281+
" at Sisgea.GerarHorario.Core.Gerador.PrepararModelComRestricoes(GerarHorarioOptions options) in /home/user/gerar-horario/GerarHorario/Gerador/Gerador.cs:line 19",
282+
" at Sisgea.GerarHorario.Core.Gerador.GerarHorario(GerarHorarioOptions options)+MoveNext() in /home/user/gerar-horario/GerarHorario/Gerador/Gerador.cs:line 53",
283+
" at Sisgea.GerarHorario.Core.Main.Retorno() in /home/user/gerar-horario/GerarHorario/Main.cs:line 124",
284+
" at Submission#7.<<Initialize>>d__0.MoveNext()",
285+
"--- End of stack trace from previous location ---",
286+
" at Microsoft.CodeAnalysis.Scripting.ScriptExecutionState.RunSubmissionsAsync[TResult](ImmutableArray`1 precedingExecutors, Func`2 currentExecutor, StrongBox`1 exceptionHolderOpt, Func`2 catchExceptionOpt, CancellationToken cancellationToken)"
235287
]
236288
}
237289
],

0 commit comments

Comments
 (0)