<commit_before><?xml version="1.0"?>
<project name="bridgedb" default="dist" basedir=".">
  
  <property file="org.bridgedb/version.props"/>
  <property name="svn.exec.svnversion" value="svnversion"/>
  
   <macrodef name="iterate">
		<attribute name="target"/>
		<sequential>
			<subant target="@{target}">
				<filelist dir=".">
					<!-- NOTE: order is important! -->
					<file name="org.bridgedb/build.xml"/>
					<file name="org.bridgedb.bio/build.xml"/>
					<file name="org.bridgedb.file.orthoxml/build.xml"/>
					<file name="org.bridgedb.rdb/build.xml"/>
					<file name="org.bridgedb.rdb.construct/build.xml"/>
					<file name="org.bridgedb.tools.batchmapper/build.xml"/>
					<file name="org.bridgedb.server/build.xml"/>
					<file name="org.bridgedb.webservice.picr/build.xml"/>
					<file name="org.bridgedb.webservice.synergizer/build.xml"/>
					<file name="org.bridgedb.webservice.biomart/build.xml"/>
					<file name="org.bridgedb.webservice.bridgerest/build.xml"/>
					<file name="org.bridgedb.gui/build.xml"/>
				</filelist>
			</subant>
		</sequential>
	</macrodef>

  <target name="build">
		<iterate target="dist"/>
	</target>

  <target name="dist" depends="doc, build">
		<iterate target="dist"/>
	
	<property name="zipbase" value="bridgedb-${bridgedb.version}"/>
	<zip destfile="${zipbase}.zip">
		<zipfileset dir="." prefix="bridgedb-${bridgedb.version}">
			<include name="batchmapper.sh"/>
			<include name="batchmapper.bat"/>
			<include name="start-server.sh"/>
			<include name="dist/*.jar"/>
			<exclude name="dist/org.bridgedb.tests.metabolites.jar"/>
			<include name="LICENSE-2.0.txt"/>
			<include name="README.txt"/>
			<include name="apidoc"/>
			<include name="org.bridgedb.server/gdb.config.template"/>
			<include name="org.bridgedb.server/contrib/bridgedb-example.*"/>
			<exclude name="**/target/**"/>
			<exclude name="**/bin/**"/>
		</zipfileset>
	</zip>
	<tar destfile="${zipbase}.tar.gz" compression="gzip">
		<zipfileset src="${zipbase}.zip"/>
	</tar>
	
	<property name="zipbase2" value="bridgedb-${bridgedb.version}-src"/>
	<zip destfile="${zipbase2}.zip">
		<zipfileset dir="." prefix="bridgedb-${bridgedb.version}-src">
			<include name="batchmapper.sh"/>
			<include name="batchmapper.bat"/>
			<include name="start-server.sh"/>
			<include name="LICENSE-2.0.txt"/>
			<include name="README.txt"/>
			<include name="apidoc"/>
			<include name="org.bridgedb/version.props"/>
			<include name="build-common.xml"/>
			<include name="**/build.xml"/>
			<include name="**/META-INF/MANIFEST.MF"/>
			<include name="org.bridgedb.webservice.biomart/src/org/bridgedb/webservice/biomart/util/filterconversion.txt"/>
			<include name="org.bridgedb.bio/resources/**/*"/>
			<include name="**/*.java"/>
			<include name="**/*.jar"/>
			<include name="org.bridgedb.tools.benchmarking/*.txt"/>
			<exclude name="dist/*.jar"/>
			<include name="org.bridgedb.server/gdb.config.template"/>
			<include name="org.bridgedb.server/contrib/bridgedb-example.pl"/>
			<include name="org.bridgedb.server/contrib/bridgedb-example.py"/>
			<exclude name="**/target/**"/>
			<exclude name="**/bin/**"/>
		</zipfileset>
	</zip>
	<tar destfile="${zipbase2}.tar.gz" compression="gzip">
		<zipfileset src="${zipbase2}.zip"/>
	</tar>
	
  </target>

  <target name="clean">
		<iterate target="clean"/>
		<delete dir="apidoc"/>
  </target>

  <target name="test" depends="build">
		<iterate target="test"/>
  </target>

  <target name="dist-clean">
		<iterate target="dist-clean"/>
		<delete dir="apidoc"/>
		<delete dir="dist"/>
  </target>

   <target name="doc">
     <mkdir dir="apidoc"/>
	<tstamp /> <!-- set ${TODAY} and ${TSTAMP} -->
	<exec executable="${svn.exec.svnversion}" outputproperty="subversion_revision" failifexecutionfails="false">
		<arg line="-n ."/>
	</exec>
	<javadoc destdir="apidoc"
			doctitle="BridgeDb"
			header="Revision ${subversion_revision}"
			footer="Generated ${TODAY}">
		<package name="org.bridgedb"/>
		<package name="org.bridgedb.bio"/>
		<package name="org.bridgedb.file"/>
		<package name="org.bridgedb.rdb"/>
		<package name="org.bridgedb.rdb.construct"/>
        <package name="org.bridgedb.webservice"/>
        <package name="org.bridgedb.webservice.biomart"/>
		<sourcepath>
			<pathelement location="org.bridgedb/src"/>
			<pathelement location="org.bridgedb.rdb/src"/>
			<pathelement location="org.bridgedb.rdb.construct/src"/>
			<pathelement location="org.bridgedb.bio/src"/>
		</sourcepath>
	</javadoc>
  </target> 

</project>
<commit_msg>Build the QC tool with Ant too (closes #90)<commit_after><?xml version="1.0"?>
<project name="bridgedb" default="dist" basedir=".">
  
  <property file="org.bridgedb/version.props"/>
  <property name="svn.exec.svnversion" value="svnversion"/>
  
   <macrodef name="iterate">
		<attribute name="target"/>
		<sequential>
			<subant target="@{target}">
				<filelist dir=".">
					<!-- NOTE: order is important! -->
					<file name="org.bridgedb/build.xml"/>
					<file name="org.bridgedb.bio/build.xml"/>
					<file name="org.bridgedb.file.orthoxml/build.xml"/>
					<file name="org.bridgedb.rdb/build.xml"/>
					<file name="org.bridgedb.rdb.construct/build.xml"/>
					<file name="org.bridgedb.tools.batchmapper/build.xml"/>
                                        <file name="org.bridgedb.tools.qc/build.xml"/>
					<file name="org.bridgedb.server/build.xml"/>
					<file name="org.bridgedb.webservice.picr/build.xml"/>
					<file name="org.bridgedb.webservice.synergizer/build.xml"/>
					<file name="org.bridgedb.webservice.biomart/build.xml"/>
					<file name="org.bridgedb.webservice.bridgerest/build.xml"/>
					<file name="org.bridgedb.gui/build.xml"/>
				</filelist>
			</subant>
		</sequential>
	</macrodef>

  <target name="build">
		<iterate target="dist"/>
	</target>

  <target name="dist" depends="doc, build">
		<iterate target="dist"/>
	
	<property name="zipbase" value="bridgedb-${bridgedb.version}"/>
	<zip destfile="${zipbase}.zip">
		<zipfileset dir="." prefix="bridgedb-${bridgedb.version}">
			<include name="batchmapper.sh"/>
			<include name="batchmapper.bat"/>
			<include name="start-server.sh"/>
			<include name="dist/*.jar"/>
			<exclude name="dist/org.bridgedb.tests.metabolites.jar"/>
			<include name="LICENSE-2.0.txt"/>
			<include name="README.txt"/>
			<include name="apidoc"/>
			<include name="org.bridgedb.server/gdb.config.template"/>
			<include name="org.bridgedb.server/contrib/bridgedb-example.*"/>
			<exclude name="**/target/**"/>
			<exclude name="**/bin/**"/>
		</zipfileset>
	</zip>
	<tar destfile="${zipbase}.tar.gz" compression="gzip">
		<zipfileset src="${zipbase}.zip"/>
	</tar>
	
	<property name="zipbase2" value="bridgedb-${bridgedb.version}-src"/>
	<zip destfile="${zipbase2}.zip">
		<zipfileset dir="." prefix="bridgedb-${bridgedb.version}-src">
			<include name="batchmapper.sh"/>
			<include name="batchmapper.bat"/>
			<include name="start-server.sh"/>
			<include name="LICENSE-2.0.txt"/>
			<include name="README.txt"/>
			<include name="apidoc"/>
			<include name="org.bridgedb/version.props"/>
			<include name="build-common.xml"/>
			<include name="**/build.xml"/>
			<include name="**/META-INF/MANIFEST.MF"/>
			<include name="org.bridgedb.webservice.biomart/src/org/bridgedb/webservice/biomart/util/filterconversion.txt"/>
			<include name="org.bridgedb.bio/resources/**/*"/>
			<include name="**/*.java"/>
			<include name="**/*.jar"/>
			<include name="org.bridgedb.tools.benchmarking/*.txt"/>
			<exclude name="dist/*.jar"/>
			<include name="org.bridgedb.server/gdb.config.template"/>
			<include name="org.bridgedb.server/contrib/bridgedb-example.pl"/>
			<include name="org.bridgedb.server/contrib/bridgedb-example.py"/>
			<exclude name="**/target/**"/>
			<exclude name="**/bin/**"/>
		</zipfileset>
	</zip>
	<tar destfile="${zipbase2}.tar.gz" compression="gzip">
		<zipfileset src="${zipbase2}.zip"/>
	</tar>
	
  </target>

  <target name="clean">
		<iterate target="clean"/>
		<delete dir="apidoc"/>
  </target>

  <target name="test" depends="build">
		<iterate target="test"/>
  </target>

  <target name="dist-clean">
		<iterate target="dist-clean"/>
		<delete dir="apidoc"/>
		<delete dir="dist"/>
  </target>

   <target name="doc">
     <mkdir dir="apidoc"/>
	<tstamp /> <!-- set ${TODAY} and ${TSTAMP} -->
	<exec executable="${svn.exec.svnversion}" outputproperty="subversion_revision" failifexecutionfails="false">
		<arg line="-n ."/>
	</exec>
	<javadoc destdir="apidoc"
			doctitle="BridgeDb"
			header="Revision ${subversion_revision}"
			footer="Generated ${TODAY}">
		<package name="org.bridgedb"/>
		<package name="org.bridgedb.bio"/>
		<package name="org.bridgedb.file"/>
		<package name="org.bridgedb.rdb"/>
		<package name="org.bridgedb.rdb.construct"/>
        <package name="org.bridgedb.webservice"/>
        <package name="org.bridgedb.webservice.biomart"/>
		<sourcepath>
			<pathelement location="org.bridgedb/src"/>
			<pathelement location="org.bridgedb.rdb/src"/>
			<pathelement location="org.bridgedb.rdb.construct/src"/>
			<pathelement location="org.bridgedb.bio/src"/>
		</sourcepath>
	</javadoc>
  </target> 

</project>

{'fraction_non_alphanumeric': 0.21218418462211527, 'fraction_numerical': 0.002406212402931204, 'mean_word_length': 3.972267536704731, 'pattern_counts': {'":': 0, '<': 238, '<?xml version=': 2, '>': 238, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 33}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 1, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6973112', 'n_tokens_mistral': 3641, 'n_tokens_neox': 3216, 'n_words': 478}