浏览代码

Merge branch 'master' of https://forge.univ-artois.fr/m1-2018-2019/TDD2019IMPL

Loquicom 6 年之前
父节点
当前提交
15214fc65c
共有 5 个文件被更改,包括 81 次插入11 次删除
  1. 3 0
      .gitmodules
  2. 47 0
      README.md
  3. 1 0
      TDD2019TESTS
  4. 11 11
      build.xml
  5. 19 0
      checklinks.sh

+ 3 - 0
.gitmodules

@@ -0,0 +1,3 @@
+[submodule "TDD2019TESTS"]
+	path = TDD2019TESTS
+	url = https://forge.univ-artois.fr/m1-2018-2019/TDD2019TESTS.git

+ 47 - 0
README.md

@@ -0,0 +1,47 @@
+# Projet interpréteur lisp
+
+[![Qualité](https://forge.univ-artois.fr/sonar67/api/badges/gate?key=root%3A2018%3AMyLisp)](https://forge.univ-artois.fr/sonar67/dashboard/index/root%3A2018%3AMyLisp)
+[![Tests réussis](https://forge.univ-artois.fr/sonar67/api/badges/measure?key=root%3A2018%3AMyLisp&metric=test_success_density)](https://forge.univ-artois.fr/sonar67/dashboard/index/root%3A2018%3AMyLisp)
+[![Couverture de code](https://forge.univ-artois.fr/sonar67/api/badges/measure?key=root%3A2018%3AMyLisp&metric=coverage)](https://forge.univ-artois.fr/sonar67/dashboard/index/root%3A2018%3AMyLisp)
+
+La page [Lisp sur wikipedia](https://en.wikipedia.org/wiki/Lisp_%28programming_language%29) et la page [Scheme sur wikipedia](https://en.wikipedia.org/wiki/Scheme_%28programming_language%29) fournissent l'historique et les fonctionnalités du langage.
+
+Le comportement de l'interpréteur (le tests) sont validés à l'aide de l'interpréteur [JScheme](http://jscheme.sourceforge.net/jscheme/main.html).
+
+Le nombre de tests augmentera au cours du semestre jusqu'à obtenir un interpréteur pleinement fonctionnelle.
+
+Ce projet est basé sur le travail de [Peter Norvig en Python](http://norvig.com/lispy.html).
+
+Peter Norvig a aussi proposé une version [Java de son interpréteur](http://norvig.com/jscheme.html). Cette version a été conçue à la naissance du langage, et ne peut pas être considérée comme une conception oriénté objet d'un interpréteur Lisp.
+
+Plus récemment, [une version Java a été proposée par Remy Forax](https://forax.github.io/2014-06-01-e733e6af6114eff55149-lispy_in_java.html). 
+Si cette solution utilise des concepts avancés et récents de Java (lambdas et streams), le code reste proche de la version python, donc pas vraiment orientée objet.
+
+## Pour déclarer ce projet comme source `upstream`
+
+Il suffit de déclarer une fois ce projet comme dépôt distant de votre fork :
+
+```
+$ git remote add upstream https://forge.univ-artois.fr/m1-2018-2019/TDD2019IMPL.git
+```
+
+Ensuite, à chaque mise à jour de ce projet, vous pouvez mettre à jour votre fork
+à l'aide des commandes suivantes :
+
+```
+$ git pull upstream master
+$ git push
+```
+
+## Si vous ne voyez plus vos tests dans votre projet
+
+Il suffit de rajouter le projet de tests comme un sous module du projet :
+
+```
+$ git submodule add https://forge.univ-artois.fr/m1-2018-2019/TDD2019TESTS.git
+# remplacer le chemin absolu https://forge.univ-artois.fr/m1-2018-2019/TDD2019TESTS.git 
+# par ../../m1-2018-2019/TDD2019TESTS.git dans le fichier `.gitmodules`.
+$ git commit -m "Les tests sont de retour"
+$ git push
+```
+

+ 1 - 0
TDD2019TESTS

@@ -0,0 +1 @@
+Subproject commit 027ef7a376f913b71dcfbec3a442987329c65d5a

+ 11 - 11
build.xml

@@ -9,15 +9,15 @@
 
 	<!-- Define the SonarQube global properties (the most usual way is to pass these properties via the command line) -->
 	<property name="sonar.host.url" value="https://forge.univ-artois.fr/sonar67" />
-	<property name="sonar.projectKey" value="${etudiant}:2018:MyLisp" />
-	<property name="sonar.projectName" value="${etudiant} Lisp 18" />
+	<property name="sonar.projectKey" value="${etudiant}:2019:MyLisp" />
+	<property name="sonar.projectName" value="${etudiant} Lisp 19" />
 	<property name="sonar.projectVersion" value="1.0" />
 	<property name="sonar.java.source" value="${project.java.version}" />
 	<property name="sonar.java.binaries" value="build" />
 	<property name="sonar.java.libraries" value="lib/*.jar" />
 	<property name="sonar.sources" value="src" />
 	<property name="sonar.exclusions" value="**/*Test*" />
-	<property name="sonar.tests" value="TDD2018TESTS/src,TDD2018OWNTESTS/src" />
+	<property name="sonar.tests" value="TDD2019TESTS/src,TDD2019OWNTESTS/src" />
 	<property name="sonar.junit.reportPaths" value="${testreports}" />
 	<property name="sonar.jacoco.reportPath" value="${testreports}/jacoco.exec" />
         <property name="sonar.pitest.reportsDirectory" value="${testreports}" />
@@ -51,35 +51,35 @@
 
 	<target name="compilepublictests">
 		<echo>Compilation des tests publics</echo>
-		<javac includeantruntime="true" srcdir="TDD2018TESTS/src" destdir="${build}" source="${project.java.version}" debug="true" encoding="${encoding}">
+		<javac includeantruntime="true" srcdir="TDD2019TESTS/src" destdir="${build}" source="${project.java.version}" debug="true" encoding="${encoding}">
 			<classpath refid="mypath" />
 		</javac>
 		<copy todir="${build}">
-			<fileset dir="TDD2018TESTS/src">
+			<fileset dir="TDD2019TESTS/src">
 				<include name="**/*.story" />
 			</fileset>
 		</copy>
 	</target>
 	<target name="compileprivatetests" if="private.tests.found">
 		<echo>Compilation des tests privés</echo>
-		<javac includeantruntime="true" srcdir="TDD2018HIDDENTESTS/src" destdir="${build}" source="${project.java.version}" debug="true" encoding="${encoding}">
+		<javac includeantruntime="true" srcdir="TDD2019HIDDENTESTS/src" destdir="${build}" source="${project.java.version}" debug="true" encoding="${encoding}">
 			<classpath refid="mypath" />
 		</javac>
 
 		<copy todir="${build}">
-			<fileset dir="TDD2018HIDDENTESTS/src">
+			<fileset dir="TDD2019HIDDENTESTS/src">
 				<include name="**/*.story" />
 			</fileset>
 		</copy>
 	</target>
 	<target name="compileowntests">
 		<echo>Compilation des tests personnels</echo>
-		<javac includeantruntime="true" srcdir="TDD2018OWNTESTS/src" destdir="${build}" source="${project.java.version}" debug="true" encoding="${encoding}">
+		<javac includeantruntime="true" srcdir="TDD2019OWNTESTS/src" destdir="${build}" source="${project.java.version}" debug="true" encoding="${encoding}">
 			<classpath refid="mypath" />
 		</javac>
 
 		<copy todir="${build}">
-			<fileset dir="TDD2018OWNTESTS/src">
+			<fileset dir="TDD2019OWNTESTS/src">
 				<include name="**/*.story" />
 			</fileset>
 		</copy>
@@ -90,7 +90,7 @@
 			<classpath path="lib/jacocoant.jar" />
 		</taskdef>
 		<antcall target="compilepublictests" />
-		<available property="private.tests.found" file="TDD2018HIDDENTESTS/src" type="dir" />
+		<available property="private.tests.found" file="TDD2019HIDDENTESTS/src" type="dir" />
 		<antcall target="compileprivatetests" />
 		<antcall target="compileowntests" />
 		<jacoco:coverage destfile="${sonar.jacoco.reportPath}">
@@ -111,7 +111,7 @@
 		</jacoco:coverage>
 	</target>
 
-	<target name="m1" description="Verification des projets de TDD2018" depends="clean,build,tests" />
+	<target name="m1" description="Verification des projets de TDD2019" depends="clean,build,tests" />
 
 	<!-- Define the SonarQube target -->
 	<target name="sonar" depends="m1" description="Analyse le code avec SonarQube">

+ 19 - 0
checklinks.sh

@@ -0,0 +1,19 @@
+#!/bin/bash
+
+if [ ! -d "TDD2019TESTS" ]; then
+   echo "Adding main public test repository"
+   git submodule add --force https://forge.univ-artois.fr/m1-2018-2019/TDD2019TESTS.git 
+fi
+
+if [ ! -d "TDD2019HIDDENTESTS" ]; then
+   echo "Adding main hidden test repository"
+   git submodule add --force https://forge.univ-artois.fr/root/TDD2019HIDDENTESTS.git 
+fi
+
+if [ ! -d "TDD2019OWNTESTS" ]; then
+   echo "Adding own test repository for $1"
+   git submodule add --force https://forge.univ-artois.fr/$1/TDD2019OWNTESTS.git 
+
+fi
+
+# git checkout HEAD .gitmodules