Skip to content

Commit 8480126

Browse files
committed
Open source
1 parent bc1960a commit 8480126

File tree

90 files changed

+5206
-1
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

90 files changed

+5206
-1
lines changed

.dockerignore

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# Enables docker build from the project root directory without sending a
2+
# massive amount of data in the build context to Docker. We start with a
3+
# wildcard to exclude all by default, followed by opting in files and
4+
# directories with '!'
5+
# See: https://docs.docker.com/engine/reference/builder/#dockerignore-file
6+
7+
*
8+
!entrypoint.sh
9+
!service/target
10+
!solver/target

.editorconfig

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
root = true
2+
end_of_line = lf
3+
insert_final_newline = true
4+
indent_style = space
5+
6+
[*.{java,xml,kt}]
7+
indent_size = 2
8+
continuation_indent_size = 4

Dockerfile

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
FROM azul/zulu-openjdk:11
2+
3+
RUN set -e ;\
4+
export DEBIAN_FRONTEND=noninteractive ;\
5+
apt-get update -y;\
6+
apt-get install -y locales ;\
7+
locale-gen en_US.UTF-8 ;\
8+
/usr/sbin/update-locale LANG=en_US.UTF-8
9+
10+
RUN apt-get install -y gringo
11+
12+
ENV LANG=en_US.UTF-8 \
13+
LANGUAGE=en_US.UTF-8 \
14+
LC_ALL=en_US.UTF-8
15+
16+
EXPOSE 8080 8888 11210
17+
18+
ADD service/target/service*.jar service.jar
19+
20+
COPY entrypoint.sh /
21+
ENTRYPOINT ["/entrypoint.sh"]

Dockerfile-solver

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
FROM azul/zulu-openjdk:11
2+
3+
RUN set -e ;\
4+
export DEBIAN_FRONTEND=noninteractive ;\
5+
apt-get update -y;\
6+
apt-get install -y locales ;\
7+
locale-gen en_US.UTF-8 ;\
8+
/usr/sbin/update-locale LANG=en_US.UTF-8
9+
10+
RUN apt-get install -y gringo
11+
12+
ENV LANG=en_US.UTF-8 \
13+
LANGUAGE=en_US.UTF-8 \
14+
LC_ALL=en_US.UTF-8
15+
16+
EXPOSE 8081 8888 11210
17+
18+
ADD solver/target/solver*.jar solver.jar
19+
20+
COPY entrypoint.sh /
21+
ENTRYPOINT ["/entrypoint.sh"]

README.md

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,11 @@
1-
# sapling
1+
# Sapling
2+
23
Planning tool for remote and distributed teams
4+
5+
## Development
6+
7+
Starting a local database
8+
9+
```sh
10+
scripts/db.sh fresh
11+
```

common/pom.xml

Lines changed: 92 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,92 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<project xmlns="http://maven.apache.org/POM/4.0.0"
3+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
4+
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
5+
<parent>
6+
<groupId>com.sourceclear.agile</groupId>
7+
<artifactId>pi-planning</artifactId>
8+
<version>1.0.0-SNAPSHOT</version>
9+
</parent>
10+
<modelVersion>4.0.0</modelVersion>
11+
12+
<artifactId>common</artifactId>
13+
14+
<dependencies>
15+
<dependency>
16+
<groupId>org.inferred</groupId>
17+
<artifactId>freebuilder</artifactId>
18+
</dependency>
19+
20+
<dependency>
21+
<groupId>org.apache.commons</groupId>
22+
<artifactId>commons-collections4</artifactId>
23+
</dependency>
24+
25+
<dependency>
26+
<groupId>org.apache.commons</groupId>
27+
<artifactId>commons-lang3</artifactId>
28+
</dependency>
29+
30+
<dependency>
31+
<groupId>commons-io</groupId>
32+
<artifactId>commons-io</artifactId>
33+
</dependency>
34+
35+
<dependency>
36+
<groupId>com.google.guava</groupId>
37+
<artifactId>guava</artifactId>
38+
</dependency>
39+
40+
<dependency>
41+
<groupId>org.jetbrains.kotlin</groupId>
42+
<artifactId>kotlin-stdlib</artifactId>
43+
</dependency>
44+
45+
<dependency>
46+
<groupId>org.jetbrains.kotlin</groupId>
47+
<artifactId>kotlin-reflect</artifactId>
48+
</dependency>
49+
50+
<dependency>
51+
<groupId>com.fasterxml.jackson.module</groupId>
52+
<artifactId>jackson-module-kotlin</artifactId>
53+
</dependency>
54+
55+
<dependency>
56+
<groupId>com.fasterxml.jackson.datatype</groupId>
57+
<artifactId>jackson-datatype-jdk8</artifactId>
58+
</dependency>
59+
60+
<dependency>
61+
<groupId>org.slf4j</groupId>
62+
<artifactId>slf4j-api</artifactId>
63+
</dependency>
64+
65+
<dependency>
66+
<groupId>junit</groupId>
67+
<artifactId>junit</artifactId>
68+
<scope>test</scope>
69+
</dependency>
70+
71+
<dependency>
72+
<groupId>org.hamcrest</groupId>
73+
<artifactId>hamcrest-library</artifactId>
74+
<scope>test</scope>
75+
</dependency>
76+
77+
<dependency>
78+
<groupId>com.fasterxml.jackson.dataformat</groupId>
79+
<artifactId>jackson-dataformat-csv</artifactId>
80+
</dependency>
81+
</dependencies>
82+
83+
<build>
84+
<resources>
85+
<resource>
86+
<directory>src/main/resources</directory>
87+
<filtering>true</filtering>
88+
</resource>
89+
</resources>
90+
</build>
91+
92+
</project>
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
package com.sourceclear.agile.piplanning.service.services;
2+
3+
4+
import com.sourceclear.agile.piplanning.objects.Fact;
5+
import com.sourceclear.agile.piplanning.objects.Problem;
6+
import com.sourceclear.agile.piplanning.objects.Soln;
7+
8+
import java.io.IOException;
9+
import java.net.URI;
10+
import java.util.List;
11+
import java.util.Set;
12+
13+
public interface ClingoService {
14+
Set<Soln> solve(Problem problem) throws IOException;
15+
16+
Set<Soln> solveRemotely(URI uri, Problem problem) throws IOException;
17+
18+
String solve(String instance) throws IOException;
19+
20+
List<Fact> parse(String instance);
21+
}

0 commit comments

Comments
 (0)