-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.xml
More file actions
151 lines (123 loc) · 4.11 KB
/
build.xml
File metadata and controls
151 lines (123 loc) · 4.11 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
<?xml version="1.0" encoding="UTF-8"?>
<project name="focussed_crawler" basedir="./" default="info">
<!--
clean and checking targets
-->
<target name="clean" depends="init.properties" unless="noclean">
<delete dir="${build.dir}" failonerror="false"/>
<exec executable="python" dir="." failonerror="true">
<arg value="--version"/>
</exec>
</target>
<!--
viz app
-->
<target name="test.intel_viz" depends="clean, init.properties" description="intel graph visualization code, github version">
<fail unless="config" message="config missing property e.g. -Dconfig=../../config/example.ini"/>
<fail unless="data-graph" message="data-graph missing property -Ddata-graph=../../corpus/example/example_data_graph.json"/>
<mkdir dir="${build.dir}"/>
<mkdir dir="${build.dir}/bin"/>
<echo>
Viz [start]
</echo>
<!-- copy files -->
<copy todir="${build.dir}/bin" failonerror="false">
<!-- app -->
<fileset dir="${src.dir}">
<include name="intel_viz.py"/>
<include name="intel_viz_lib.py"/>
</fileset>
</copy>
<!-- run app -->
<exec executable="python" dir="${build.dir}/bin" failonerror="true">
<arg value="intel_viz.py"/>
<arg value="${config}"/>
<arg value="${data-graph}"/>
</exec>
<echo>
Viz [end]
</echo>
</target>
<!-- Start the web crawler-->
<target name="crawl">
<exec executable="python" dir="crawler/" failonerror="true">
<arg value="runner.py"/>
</exec>
</target>
<!-- Testing custom configs-->
<target name="test.config">
<exec executable="python" dir="crawler/scripts" failonerror="true">
<arg value="check_config_file.py"/>
<arg value="${path}"/>
<arg value="${thread_url}"/>
</exec>
</target>
<!-- Parsing the data for the graph-->
<target name="parse.crawled-data">
<exec executable="python" dir="crawler/scripts" failonerror="true">
<arg value="parse_data_for_graph.py"/>
<arg value="${data}"/>
</exec>
</target>
<!--code for first iteration of viz-->
<target name="viz" depends="clean, init.properties" description="intel graph visualization code, github version">
<fail unless="config" message="config missing property e.g. -Dconfig=../../config/example.ini"/>
<fail unless="data-graph" message="data-graph missing property -Ddata-graph=../../corpus/example/example_data_graph.json"/>
<mkdir dir="${build.dir}"/>
<mkdir dir="${build.dir}/bin"/>
<echo>
Viz [start]
</echo>
<!-- copy files -->
<copy todir="${build.dir}/bin" failonerror="false">
<!-- app -->
<fileset dir="${src.dir}">
<include name="intel_viz.py"/>
<include name="intel_viz_lib.py"/>
</fileset>
</copy>
<!-- run app -->
<exec executable="python" dir="${build.dir}/bin" failonerror="true">
<arg value="intel_viz.py"/>
<arg value="${config}"/>
<arg value="${data-graph}"/>
</exec>
<echo>
Viz [end]
</echo>
</target>
<!--
properties not dependant on local context
version numbers for software releases
-->
<target name="init.properties" description="Initialise properties">
<property name="project.name" value="focussed_crawler"/>
<property name="project.home" value="."/>
<property name="src.dir" value="./src"/>
<property name="build.dir" value="./build"/>
<property name="config.dir" value="./config"/>
<property name="third-party.dir" value="./third-party"/>
<property environment="env"/>
</target>
<target name="init.versions" description="Initialise version numbers for distribution targets">
<property name="viz.version" value="1_0"/>
</target>
<!--
help info
-->
<target name="info" depends="init.properties, init.versions" description="List all project information">
<echo level="info">
Basic pre-requisites
--------------------
Python 3.7 and various python libraries (see /docs)
Useful information
-------------------
Project name = ${project.name}
Project home = ${project.home}
Env Dir = ${env.Path}
version = ${viz.version}
"ant info" for this message
"ant -projecthelp" for a list of available targets (build, dist, test and deploy)
</echo>
</target>
</project>