diff --git a/.gitignore b/.gitignore index 0485ba8f6b07aff0aaa8ae8d20e6723bcb365a36..f95f670012e9aac7d78124428417120aea7c01ac 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,4 @@ \.DS_Store + +doc/ diff --git a/README.md b/README.md index fbdeaad0f426f8436ac57f76ea4c0873851987e2..64419fee2fb366c76dbf0343e8c9cc797a91b236 100644 --- a/README.md +++ b/README.md @@ -14,8 +14,10 @@ ## C'est quoi ? Dojo Hepia est un site propre d'HEPIA, qui à pour but de proposer une plateforme simple de publication d'entrainement constitués de kata. Le but est d'encourager les professeurs à centraliser leurs exercices (de code) sur une seule et même plateforme. +Dojo Hepia permet de créer des programmes constitués de kata. + ## Pourquoi ? -Parler de la valeur péga ajoutée et de la plateforme de code et de compilation online +Parler de la valeur pédago ajoutée et de la plateforme de code et de compilation online diff --git a/tests/python/assert_test01/.idea/workspace.xml b/tests/python/assert_test01/.idea/workspace.xml index 340adcfb3bb7b3688cc7c1fee720f2436f690e46..3415de75d417b10a7997b79f657b9351991de080 100644 --- a/tests/python/assert_test01/.idea/workspace.xml +++ b/tests/python/assert_test01/.idea/workspace.xml @@ -145,12 +145,12 @@ <option name="presentableId" value="Default" /> <updated>1556636994757</updated> <workItem from="1556636997623" duration="502000" /> - <workItem from="1556696058143" duration="2446000" /> + <workItem from="1556696058143" duration="2450000" /> </task> <servers /> </component> <component name="TimeTrackingManager"> - <option name="totallyTimeSpent" value="2948000" /> + <option name="totallyTimeSpent" value="2952000" /> </component> <component name="ToolWindowManager"> <frame x="355" y="87" width="1400" height="1000" extended-state="0" /> diff --git a/tests/serveur_compilation/front-end-compilation/src/app/compilateur/compilateur.component.css b/tests/serveur_compilation/front-end-compilation/src/app/compilateur/compilateur.component.css index 2a6ac6ce90941a56d08e88070dbd710bbb65ae76..9ea716f7b112483f870de7ade502de473aa23b3c 100644 --- a/tests/serveur_compilation/front-end-compilation/src/app/compilateur/compilateur.component.css +++ b/tests/serveur_compilation/front-end-compilation/src/app/compilateur/compilateur.component.css @@ -1,11 +1,12 @@ textarea { background-color: rgba(43, 47, 57, 1); - border: 0; + border: 2px solid rgba(44, 62, 80, 1.0); color: white; margin: 20px; border-radius: 12px; padding: 10px; resize: none; + outline: none; } button { @@ -28,14 +29,14 @@ button:hover { } .success { - border: 3px rgba(39, 174, 96,1.0) solid; - background-color: rgba(39, 174, 96,0.2); + border: 3px rgba(39, 174, 96, 1.0) solid; + background-color: rgba(39, 174, 96, 0.2); } select { padding-left: 10px; background-color: rgba(43, 47, 57, 1); - border: 0; + border: 2px solid white; color: white; margin: 20px; border-radius: 12px; diff --git a/tests/serveur_compilation/server_rest/.idea/compiler.xml b/tests/serveur_compilation/server_rest/.idea/compiler.xml index 14146fda1de7a458332cc41d7b9f3c0bc94f5b8f..f8ea6ba06071dd9b6dbd87cfb16260c791ab851c 100644 --- a/tests/serveur_compilation/server_rest/.idea/compiler.xml +++ b/tests/serveur_compilation/server_rest/.idea/compiler.xml @@ -6,8 +6,8 @@ <sourceOutputDir name="target/generated-sources/annotations" /> <sourceTestOutputDir name="target/generated-test-sources/test-annotations" /> <outputRelativeToContentRoot value="true" /> - <module name="server_rest_new" /> <module name="09" /> + <module name="server_rest_new" /> </profile> </annotationProcessing> </component> diff --git a/tests/serveur_compilation/server_rest/.idea/workspace.xml b/tests/serveur_compilation/server_rest/.idea/workspace.xml index cdcbdca9081dd2322b605bf3ac151928b30f3923..2f0fea1e2624f93db29d050e133c2540f8fab82e 100644 --- a/tests/serveur_compilation/server_rest/.idea/workspace.xml +++ b/tests/serveur_compilation/server_rest/.idea/workspace.xml @@ -2,20 +2,9 @@ <project version="4"> <component name="ChangeListManager"> <list default="true" id="e6a1f2e5-4f60-4227-82bb-83eb10fa94a5" name="Default Changelist" comment=""> - <change afterPath="$PROJECT_DIR$/../../python/assert_test01/.idea/assert_test01.iml" afterDir="false" /> - <change afterPath="$PROJECT_DIR$/../../python/assert_test01/.idea/misc.xml" afterDir="false" /> - <change afterPath="$PROJECT_DIR$/../../python/assert_test01/.idea/modules.xml" afterDir="false" /> - <change afterPath="$PROJECT_DIR$/../../python/assert_test01/.idea/vcs.xml" afterDir="false" /> - <change afterPath="$PROJECT_DIR$/../../python/assert_test01/main.py" afterDir="false" /> - <change afterPath="$PROJECT_DIR$/../../python/assert_test01/test.py" afterDir="false" /> - <change beforePath="$PROJECT_DIR$/../front-end-compilation/src/app/app.component.html" beforeDir="false" afterPath="$PROJECT_DIR$/../front-end-compilation/src/app/app.component.html" afterDir="false" /> - <change beforePath="$PROJECT_DIR$/../front-end-compilation/src/app/compilateur/compilateur.component.html" beforeDir="false" afterPath="$PROJECT_DIR$/../front-end-compilation/src/app/compilateur/compilateur.component.html" afterDir="false" /> - <change beforePath="$PROJECT_DIR$/../front-end-compilation/src/app/compilateur/compilateur.component.ts" beforeDir="false" afterPath="$PROJECT_DIR$/../front-end-compilation/src/app/compilateur/compilateur.component.ts" afterDir="false" /> - <change beforePath="$PROJECT_DIR$/../front-end-compilation/src/app/compilation.service.ts" beforeDir="false" afterPath="$PROJECT_DIR$/../front-end-compilation/src/app/compilation.service.ts" afterDir="false" /> + <change beforePath="$PROJECT_DIR$/../../../README.md" beforeDir="false" afterPath="$PROJECT_DIR$/../../../README.md" afterDir="false" /> + <change beforePath="$PROJECT_DIR$/../front-end-compilation/src/app/compilateur/compilateur.component.css" beforeDir="false" afterPath="$PROJECT_DIR$/../front-end-compilation/src/app/compilateur/compilateur.component.css" afterDir="false" /> <change beforePath="$PROJECT_DIR$/.idea/compiler.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/compiler.xml" afterDir="false" /> - <change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" /> - <change beforePath="$PROJECT_DIR$/src/main/java/app.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/app.java" afterDir="false" /> - <change beforePath="$PROJECT_DIR$/../serveur_compilation/.idea/compiler.xml" beforeDir="false" afterPath="$PROJECT_DIR$/../serveur_compilation/.idea/compiler.xml" afterDir="false" /> <change beforePath="$PROJECT_DIR$/../serveur_compilation/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/../serveur_compilation/.idea/workspace.xml" afterDir="false" /> <change beforePath="$PROJECT_DIR$/../serveur_compilation/src/main/java/compilation.java" beforeDir="false" afterPath="$PROJECT_DIR$/../serveur_compilation/src/main/java/compilation.java" afterDir="false" /> <change beforePath="$PROJECT_DIR$/../serveur_compilation/target/classes/compilation.class" beforeDir="false" afterPath="$PROJECT_DIR$/../serveur_compilation/target/classes/compilation.class" afterDir="false" /> @@ -46,7 +35,7 @@ <entry file="file://$PROJECT_DIR$/src/main/java/app.java"> <provider selected="true" editor-type-id="text-editor"> <state relative-caret-position="45"> - <caret line="8" column="18" lean-forward="true" selection-start-line="8" selection-start-column="18" selection-end-line="8" selection-end-column="18" /> + <caret line="8" column="18" selection-start-line="8" selection-start-column="18" selection-end-line="8" selection-end-column="18" /> </state> </provider> </entry> @@ -91,9 +80,9 @@ <foldersAlwaysOnTop value="true" /> </navigator> <panes> - <pane id="PackagesPane" /> <pane id="ProjectPane" /> <pane id="Scope" /> + <pane id="PackagesPane" /> </panes> </component> <component name="PropertiesComponent"> @@ -160,16 +149,17 @@ <workItem from="1556636100835" duration="126000" /> <workItem from="1556699423305" duration="678000" /> <workItem from="1556700805455" duration="927000" /> + <workItem from="1556726276244" duration="564000" /> </task> <servers /> </component> <component name="TimeTrackingManager"> - <option name="totallyTimeSpent" value="1731000" /> + <option name="totallyTimeSpent" value="2295000" /> </component> <component name="ToolWindowManager"> <frame x="0" y="23" width="1920" height="1121" extended-state="0" /> <layout> - <window_info content_ui="combo" id="Project" order="0" visible="true" weight="0.2550586" /> + <window_info content_ui="combo" id="Project" order="0" visible="true" weight="0.25772098" /> <window_info id="Structure" order="1" side_tool="true" weight="0.25" /> <window_info id="Image Layers" order="2" /> <window_info id="Designer" order="3" /> @@ -214,7 +204,7 @@ <entry file="file://$PROJECT_DIR$/src/main/java/app.java"> <provider selected="true" editor-type-id="text-editor"> <state relative-caret-position="45"> - <caret line="8" column="18" lean-forward="true" selection-start-line="8" selection-start-column="18" selection-end-line="8" selection-end-column="18" /> + <caret line="8" column="18" selection-start-line="8" selection-start-column="18" selection-end-line="8" selection-end-column="18" /> </state> </provider> </entry> diff --git a/tests/serveur_compilation/serveur_compilation/.idea/workspace.xml b/tests/serveur_compilation/serveur_compilation/.idea/workspace.xml index 743efce9fb462719db7afe821622612eb38ab751..c44ebe8a00429c9118cad366c47a3d7a7e287800 100644 --- a/tests/serveur_compilation/serveur_compilation/.idea/workspace.xml +++ b/tests/serveur_compilation/serveur_compilation/.idea/workspace.xml @@ -2,21 +2,10 @@ <project version="4"> <component name="ChangeListManager"> <list default="true" id="8d8fb2c1-8426-4933-8193-ee68625cf8de" name="Default Changelist" comment=""> - <change afterPath="$PROJECT_DIR$/../../python/assert_test01/.idea/assert_test01.iml" afterDir="false" /> - <change afterPath="$PROJECT_DIR$/../../python/assert_test01/.idea/misc.xml" afterDir="false" /> - <change afterPath="$PROJECT_DIR$/../../python/assert_test01/.idea/modules.xml" afterDir="false" /> - <change afterPath="$PROJECT_DIR$/../../python/assert_test01/.idea/vcs.xml" afterDir="false" /> - <change afterPath="$PROJECT_DIR$/../../python/assert_test01/main.py" afterDir="false" /> - <change afterPath="$PROJECT_DIR$/../../python/assert_test01/test.py" afterDir="false" /> - <change beforePath="$PROJECT_DIR$/../front-end-compilation/src/app/app.component.html" beforeDir="false" afterPath="$PROJECT_DIR$/../front-end-compilation/src/app/app.component.html" afterDir="false" /> - <change beforePath="$PROJECT_DIR$/../front-end-compilation/src/app/compilateur/compilateur.component.html" beforeDir="false" afterPath="$PROJECT_DIR$/../front-end-compilation/src/app/compilateur/compilateur.component.html" afterDir="false" /> - <change beforePath="$PROJECT_DIR$/../front-end-compilation/src/app/compilateur/compilateur.component.ts" beforeDir="false" afterPath="$PROJECT_DIR$/../front-end-compilation/src/app/compilateur/compilateur.component.ts" afterDir="false" /> - <change beforePath="$PROJECT_DIR$/../front-end-compilation/src/app/compilation.service.ts" beforeDir="false" afterPath="$PROJECT_DIR$/../front-end-compilation/src/app/compilation.service.ts" afterDir="false" /> + <change beforePath="$PROJECT_DIR$/../../../README.md" beforeDir="false" afterPath="$PROJECT_DIR$/../../../README.md" afterDir="false" /> + <change beforePath="$PROJECT_DIR$/../front-end-compilation/src/app/compilateur/compilateur.component.css" beforeDir="false" afterPath="$PROJECT_DIR$/../front-end-compilation/src/app/compilateur/compilateur.component.css" afterDir="false" /> <change beforePath="$PROJECT_DIR$/../server_rest/.idea/compiler.xml" beforeDir="false" afterPath="$PROJECT_DIR$/../server_rest/.idea/compiler.xml" afterDir="false" /> <change beforePath="$PROJECT_DIR$/../server_rest/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/../server_rest/.idea/workspace.xml" afterDir="false" /> - <change beforePath="$PROJECT_DIR$/../server_rest/src/main/java/app.java" beforeDir="false" afterPath="$PROJECT_DIR$/../server_rest/src/main/java/app.java" afterDir="false" /> - <change beforePath="$PROJECT_DIR$/.idea/compiler.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/compiler.xml" afterDir="false" /> - <change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" /> <change beforePath="$PROJECT_DIR$/src/main/java/compilation.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/compilation.java" afterDir="false" /> </list> <ignored path="$PROJECT_DIR$/out/" /> @@ -35,7 +24,7 @@ <file pinned="false" current-in-tab="false"> <entry file="file://$PROJECT_DIR$/pom.xml"> <provider selected="true" editor-type-id="text-editor"> - <state relative-caret-position="591"> + <state relative-caret-position="705"> <caret line="47" column="19" selection-start-line="47" selection-start-column="19" selection-end-line="47" selection-end-column="19" /> </state> </provider> @@ -44,8 +33,8 @@ <file pinned="false" current-in-tab="true"> <entry file="file://$PROJECT_DIR$/src/main/java/compilation.java"> <provider selected="true" editor-type-id="text-editor"> - <state relative-caret-position="135"> - <caret line="9" column="82" lean-forward="true" selection-start-line="9" selection-start-column="82" selection-end-line="9" selection-end-column="82" /> + <state relative-caret-position="300"> + <caret line="20" column="1" lean-forward="true" selection-start-line="20" selection-start-column="1" selection-end-line="20" selection-end-column="1" /> <folding> <element signature="imports" expanded="true" /> </folding> @@ -94,6 +83,7 @@ </navigator> <panes> <pane id="Scope" /> + <pane id="PackagesPane" /> <pane id="ProjectPane"> <subPane> <expand> @@ -101,11 +91,28 @@ <item name="serveur_compilation" type="b2602c69:ProjectViewProjectNode" /> <item name="serveur_compilation" type="462c0819:PsiDirectoryNode" /> </path> + <path> + <item name="serveur_compilation" type="b2602c69:ProjectViewProjectNode" /> + <item name="serveur_compilation" type="462c0819:PsiDirectoryNode" /> + <item name="src" type="462c0819:PsiDirectoryNode" /> + </path> + <path> + <item name="serveur_compilation" type="b2602c69:ProjectViewProjectNode" /> + <item name="serveur_compilation" type="462c0819:PsiDirectoryNode" /> + <item name="src" type="462c0819:PsiDirectoryNode" /> + <item name="main" type="462c0819:PsiDirectoryNode" /> + </path> + <path> + <item name="serveur_compilation" type="b2602c69:ProjectViewProjectNode" /> + <item name="serveur_compilation" type="462c0819:PsiDirectoryNode" /> + <item name="src" type="462c0819:PsiDirectoryNode" /> + <item name="main" type="462c0819:PsiDirectoryNode" /> + <item name="java" type="462c0819:PsiDirectoryNode" /> + </path> </expand> <select /> </subPane> </pane> - <pane id="PackagesPane" /> </panes> </component> <component name="PropertiesComponent"> @@ -121,6 +128,7 @@ <property name="project.structure.last.edited" value="Modules" /> <property name="project.structure.proportion" value="0.15" /> <property name="project.structure.side.proportion" value="0.2" /> + <property name="restartRequiresConfirmation" value="false" /> </component> <component name="RecentsManager"> <key name="CopyFile.RECENT_KEYS"> @@ -173,17 +181,18 @@ <updated>1556635807220</updated> <workItem from="1556635811007" duration="263000" /> <workItem from="1556699075828" duration="2375000" /> + <workItem from="1556724368190" duration="1020000" /> </task> <servers /> </component> <component name="TimeTrackingManager"> - <option name="totallyTimeSpent" value="2638000" /> + <option name="totallyTimeSpent" value="3658000" /> </component> <component name="ToolWindowManager"> <frame x="1920" y="0" width="1920" height="1200" extended-state="0" /> <editor active="true" /> <layout> - <window_info content_ui="combo" id="Project" order="0" visible="true" weight="0.25239617" /> + <window_info content_ui="combo" id="Project" order="0" visible="true" weight="0.2550586" /> <window_info id="Structure" order="1" side_tool="true" weight="0.25" /> <window_info id="Image Layers" order="2" /> <window_info id="Designer" order="3" /> @@ -220,7 +229,7 @@ <component name="editorHistoryManager"> <entry file="file://$PROJECT_DIR$/pom.xml"> <provider selected="true" editor-type-id="text-editor"> - <state relative-caret-position="591"> + <state relative-caret-position="705"> <caret line="47" column="19" selection-start-line="47" selection-start-column="19" selection-end-line="47" selection-end-column="19" /> </state> </provider> @@ -234,8 +243,8 @@ </entry> <entry file="file://$PROJECT_DIR$/src/main/java/compilation.java"> <provider selected="true" editor-type-id="text-editor"> - <state relative-caret-position="135"> - <caret line="9" column="82" lean-forward="true" selection-start-line="9" selection-start-column="82" selection-end-line="9" selection-end-column="82" /> + <state relative-caret-position="300"> + <caret line="20" column="1" lean-forward="true" selection-start-line="20" selection-start-column="1" selection-end-line="20" selection-end-column="1" /> <folding> <element signature="imports" expanded="true" /> </folding> diff --git a/tests/serveur_compilation/serveur_compilation/docker/dockerfile b/tests/serveur_compilation/serveur_compilation/docker/dockerfile new file mode 100644 index 0000000000000000000000000000000000000000..44733c5b9be7eb9168efe37f2c2e592852826375 --- /dev/null +++ b/tests/serveur_compilation/serveur_compilation/docker/dockerfile @@ -0,0 +1,12 @@ +FROM ubuntu:14.04 + +ENV DEBIAN_FRONTEND noninteractive + +RUN apt-get update && apt-get -y upgrade +RUN apt-get install -y python3-pip python3-dev +RUN pip3 install assertpy + +RUN mkdir /env/ + +WORKDIR /env/ + diff --git a/tests/serveur_compilation/serveur_compilation/share_docker_file/__pycache__/sample.cpython-34.pyc b/tests/serveur_compilation/serveur_compilation/share_docker_file/__pycache__/sample.cpython-34.pyc new file mode 100644 index 0000000000000000000000000000000000000000..23275a87c85fc51866ff958eec5377c75200dc6b Binary files /dev/null and b/tests/serveur_compilation/serveur_compilation/share_docker_file/__pycache__/sample.cpython-34.pyc differ diff --git a/tests/serveur_compilation/serveur_compilation/share_docker_file/test.txt b/tests/serveur_compilation/serveur_compilation/share_docker_file/test.txt new file mode 100644 index 0000000000000000000000000000000000000000..da5f074ad245b443296ec6447381efc1ba1fbc2b --- /dev/null +++ b/tests/serveur_compilation/serveur_compilation/share_docker_file/test.txt @@ -0,0 +1 @@ +blablabal \ No newline at end of file diff --git a/tests/serveur_compilation/serveur_compilation/src/main/java/compilation.java b/tests/serveur_compilation/serveur_compilation/src/main/java/compilation.java index 2f165897ae110cecf96b8107ea064c3f5f9c5672..50756d80d8e47f5542343aa3b80bb43a60bf4109 100644 --- a/tests/serveur_compilation/serveur_compilation/src/main/java/compilation.java +++ b/tests/serveur_compilation/serveur_compilation/src/main/java/compilation.java @@ -7,13 +7,14 @@ public class compilation { public HashMap<String, Object> execute_kata(JSONObject input) { - String filename = "", filename_test="", cmd = "", line, output = "", error = ""; + String filename = "", filename_test="todeleteifitstayslikethis", cmd = "", line, output = "", error = ""; switch (input.get("language").toString()) { case "python": - filename = "sample.py"; - filename_test = "assert.py"; - cmd = "python3 " + filename_test; + filename = "share_docker_file/sample.py"; + filename_test = "share_docker_file/assert.py"; + // cmd = "python3 " + filename_test; + cmd = "docker run --rm --mount type=bind,source=/Users/freak/Desktop/dojo-hepia/tests/serveur_compilation/serveur_compilation/share_docker_file,dst=/env/ hey:1.1 python3 assert.py"; break; case "java": filename = "app.java"; diff --git a/tests/serveur_compilation/serveur_compilation/target/classes/compilation.class b/tests/serveur_compilation/serveur_compilation/target/classes/compilation.class index 34eb1119e3bed9e1fc9c99959481b5e220f8e396..ec8f215b9a581c2ea23d3af24924b37dd63b9fb1 100644 Binary files a/tests/serveur_compilation/serveur_compilation/target/classes/compilation.class and b/tests/serveur_compilation/serveur_compilation/target/classes/compilation.class differ