Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
giscience
big-data
ohsome
oshdb-examples
Commits
c641b2c8
Commit
c641b2c8
authored
Mar 21, 2019
by
Moritz Schott
Browse files
remove reports from examples -> useless in this case
parent
a3bf43b2
Changes
3
Hide whitespace changes
Inline
Side-by-side
Jenkinsfile
View file @
c641b2c8
...
...
@@ -38,38 +38,6 @@ pipeline {
}
}
stage
(
'Reports and Statistics'
)
{
//create reports only if triggerd by new code
when
{
expression
{
if
(
currentBuild
.
rawBuild
.
getCauses
().
any
{
it
==~
/^jenkins\.branch\.BranchIndexingCause.*/
}){
return
true
}
return
false
}
}
steps
{
script
{
projver
=
sh
(
returnStdout:
true
,
script:
'mvn org.apache.maven.plugins:maven-help-plugin:2.1.1:evaluate -Dexpression=project.version | grep -Ev "(^\\[|Download\\w+)"'
).
trim
()
//warnings plugin
rtMaven
.
run
pom:
'pom.xml'
,
goals:
'--batch-mode -V -e checkstyle:checkstyle pmd:pmd pmd:cpd findbugs:findbugs com.github.spotbugs:spotbugs-maven-plugin:3.1.7:spotbugs -Dmaven.repo.local=.m2'
recordIssues
enabledForFailure:
true
,
tool:
checkStyle
()
recordIssues
enabledForFailure:
true
,
tool:
findBugs
()
recordIssues
enabledForFailure:
true
,
tool:
spotBugs
()
recordIssues
enabledForFailure:
true
,
tool:
cpd
(
pattern:
'**/target/cpd.xml'
)
recordIssues
enabledForFailure:
true
,
tool:
pmdParser
(
pattern:
'**/target/pmd.xml'
)
}
}
post
{
failure
{
rocketSend
channel:
'jenkinsohsome'
,
message:
"Reporting of examples-build nr. ${env.BUILD_NUMBER} *failed* on Branch - ${env.BRANCH_NAME} (<${env.BUILD_URL}|Open Build in Jenkins>). Latest commit from ${author}."
,
rawMessage:
true
}
}
}
stage
(
'Check Dependencies'
)
{
when
{
expression
{
...
...
@@ -137,4 +105,4 @@ pipeline {
}
}
}
}
\ No newline at end of file
}
src/main/java/org/heigit/bigspatialdata/oshdb/examples/analyses/DistinctContributors.java
View file @
c641b2c8
...
...
@@ -14,9 +14,9 @@ public class DistinctContributors {
public
static
void
main
(
String
[]
args
)
throws
Exception
{
// database
OSHDBH2
oshdb
=
(
new
OSHDBH2
(
DistinctContributors
.
class
.
getResource
(
"/test.oshdb.mv.db"
)
OSHDBH2
oshdb
=
new
OSHDBH2
(
DistinctContributors
.
class
.
getResource
(
"/test.oshdb.mv.db"
)
.
getFile
()
.
replace
(
".mv.db"
,
""
))
)
.
replace
(
".mv.db"
,
""
))
.
multithreading
(
true
);
//keytables
...
...
@@ -40,7 +40,7 @@ public class DistinctContributors {
// output
for
(
Map
.
Entry
<
OSHDBTimestamp
,
Integer
>
entry
:
result
.
entrySet
())
{
System
.
out
.
format
(
"%s\t%.2f
\
n"
,
System
.
out
.
format
(
"%s\t%.2f
%
n"
,
TimestampFormatter
.
getInstance
().
isoDateTime
(
entry
.
getKey
()),
entry
.
getValue
().
doubleValue
()
);
...
...
src/main/java/org/heigit/bigspatialdata/oshdb/examples/analyses/RoadLength.java
View file @
c641b2c8
...
...
@@ -25,9 +25,9 @@ public class RoadLength {
public
static
void
main
(
String
[]
args
)
throws
Exception
{
// database
OSHDBH2
oshdb
=
(
new
OSHDBH2
(
RoadLength
.
class
.
getResource
(
"/test.oshdb.mv.db"
)
OSHDBH2
oshdb
=
new
OSHDBH2
(
RoadLength
.
class
.
getResource
(
"/test.oshdb.mv.db"
)
.
getFile
()
.
replace
(
".mv.db"
,
""
))
)
.
replace
(
".mv.db"
,
""
))
.
multithreading
(
true
);
OSHDBH2
oshdbKeytables
=
new
OSHDBH2
(
RoadLength
.
class
.
getResource
(
"/test.oshdb.keytables.mv.db"
)
.
getFile
()
...
...
@@ -41,11 +41,11 @@ public class RoadLength {
.
osmType
(
OSMType
.
WAY
)
.
osmTag
(
"highway"
,
highway_motorway
)
.
aggregateByTimestamp
()
.
sum
(
snapshot
->
(
Geo
.
lengthOf
(
snapshot
.
getGeometry
())
/
1000
)
)
;
.
sum
(
snapshot
->
Geo
.
lengthOf
(
snapshot
.
getGeometry
())
/
1000
);
// output
for
(
Map
.
Entry
<
OSHDBTimestamp
,
Number
>
entry
:
result
.
entrySet
())
{
System
.
out
.
format
(
"%s\t%.2f
\
n"
,
System
.
out
.
format
(
"%s\t%.2f
%
n"
,
TimestampFormatter
.
getInstance
().
isoDateTime
(
entry
.
getKey
()),
entry
.
getValue
().
doubleValue
()
);
...
...
Johannes Visintini
@johannes
mentioned in merge request
!4 (merged)
·
May 19, 2020
mentioned in merge request
!4 (merged)
mentioned in merge request !4
Toggle commit list
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment