Skip to content

Commit

Permalink
Merge pull request #111 from yetanalytics/temporal-alignments
Browse files Browse the repository at this point in the history
[DS-144] Temporal properties + Alignments Rework
  • Loading branch information
kelvinqian00 authored Jan 11, 2024
2 parents 0462a5f + 6cf3ab5 commit f78829f
Show file tree
Hide file tree
Showing 132 changed files with 119,569 additions and 117,960 deletions.
7 changes: 7 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,13 @@ jobs:
- name: Setup CI environment
uses: yetanalytics/actions/[email protected]

- name: Log into DockerHub
if: ${{ matrix.target == 'test-unit' }}
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}

- name: Run Makefile Target ${{ matrix.target }}
run: make ${{ matrix.target }}

Expand Down
11 changes: 11 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,16 @@
# Change Log

## [0.4.0] - 2024-01-03
- Change `alignments` inputs to `models` inputs that incorporate additional temporal properties.
- Make `models` an array in which the user can apply different `personae` to.
- Separate alignments by component types: `verbs`, `activities`, `activityTypes`, `templates`, `patterns`, and `objectOverrides`.
- The new temporal properties are as follows:
- `bounds`: the time intervals in which a particular Pattern's or Template's statements are allowed to generate in.
- `boundRestarts`: which Pattern or Template should repeat if a bound is exceeded.
- `periods`: the frequency in which a Pattern's or Template's statements are generated.
- Make `repeatMax` a model property for Patterns instead of a hardcoded constant.
- Rework the CLI so that subcommands go in the front, not the end, of the top-level command.

## [0.3.2] - 2023-10-03
- Update server Jetty dependencies to v9.4.52 to address CVEs.

Expand Down
21 changes: 10 additions & 11 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,15 @@

GROUP_ID ?= com.yetanalytics
ARTIFACT_ID ?= datasim
VERSION ?= 0.3.0
MAIN_NS ?= com.yetanalytics.datasim.main
VERSION ?= 0.4.0

clean:
rm -rf target

target/bundle/datasim_cli.jar:
mkdir -p target/bundle
rm -f pom.xml
clojure -X:depstar uberjar :no-pom false :sync-pom true :aliases '[:cli]' :aot true :group-id $(GROUP_ID) :artifact-id $(ARTIFACT_ID)-cli :version '"$(VERSION)"' :jar target/bundle/datasim_cli.jar :main-class com.yetanalytics.datasim.main
clojure -X:depstar uberjar :no-pom false :sync-pom true :aliases '[:cli]' :aot true :group-id $(GROUP_ID) :artifact-id $(ARTIFACT_ID)-cli :version '"$(VERSION)"' :jar target/bundle/datasim_cli.jar :main-class com.yetanalytics.datasim.cli
rm -f pom.xml

target/bundle/datasim_server.jar: # no AOT for this one
Expand All @@ -35,25 +34,25 @@ target/bundle: target/bundle/bin target/bundle/datasim_cli.jar target/bundle/dat

bundle: target/bundle


# Tests

test-unit:
clojure -Adev:cli:run-tests
clojure -Adev:cli:server:test:run-test

test-unit-onyx:
clojure -Adev:cli:onyx:run-onyx-tests
clojure -Adev:cli:onyx:onyx-test:run-onyx-test

test-cli:
clojure -A:cli:run -p dev-resources/profiles/cmi5/fixed.json -a dev-resources/personae/simple.json -l dev-resources/alignments/simple.json -o dev-resources/parameters/simple.json validate-input dev-resources/input/simple.json
clojure -A:cli:run-cli validate-input -p dev-resources/profiles/cmi5/fixed.json -a dev-resources/personae/simple.json -m dev-resources/models/simple.json -o dev-resources/parameters/simple.json -v dev-resources/input/simple.json

test-cli-comprehensive:
clojure -A:cli:run -i dev-resources/input/simple.json validate-input dev-resources/input/simple.json
clojure -A:cli:run-cli validate-input -i dev-resources/input/simple.json -v dev-resources/input/simple.json

test-cli-output:
clojure -A:cli:run -i dev-resources/input/simple.json generate
clojure -A:cli:run-cli generate -i dev-resources/input/simple.json

test-bundle-output: bundle
cd target/bundle; bin/run.sh -i ../../dev-resources/input/simple.json generate
cd target/bundle; bin/run.sh generate -i ../../dev-resources/input/simple.json

validate-template:
AWS_PAGER="" aws cloudformation validate-template --template-body file://template/0_vpc.yml
Expand All @@ -64,4 +63,4 @@ validate-template:
ci: test-unit test-unit-onyx test-cli validate-template

server:
clojure -A:server
clojure -A:server:run-server
279 changes: 191 additions & 88 deletions README.md

Large diffs are not rendered by default.

145 changes: 61 additions & 84 deletions deps.edn
Original file line number Diff line number Diff line change
Expand Up @@ -16,90 +16,67 @@
http-kit/http-kit {:mvn/version "2.7.0"}
cheshire/cheshire {:mvn/version "5.11.0"}}
:aliases
{:cli {:extra-paths ["src/cli"]
:extra-deps {org.clojure/tools.cli {:mvn/version "1.0.219"}}}
:run {:main-opts ["-m" "com.yetanalytics.datasim.main"]}
:dev {:extra-paths ["dev-resources" "src/dev"]
:extra-deps {incanter/incanter-core {:mvn/version "1.9.3"}
incanter/incanter-charts {:mvn/version "1.9.3"}
criterium/criterium {:mvn/version "0.4.5"}}}
:test {:extra-paths ["src/test" "src/test_onyx"]
:extra-deps {same/ish {:mvn/version "0.1.6"}}}
:run-tests
{:extra-paths ["src/test"]
:extra-deps {same/ish {:mvn/version "0.1.6"}
io.github.cognitect-labs/test-runner {:git/tag "v0.5.1"
:git/sha "dfb30dd"}}
:main-opts ["-m" "cognitect.test-runner"
"-d" "src/test"]}
:run-onyx-tests
{:extra-paths ["src/test_onyx"]
:extra-deps {io.github.cognitect-labs/test-runner {:git/tag "v0.5.1"
:git/sha "dfb30dd"}}
:main-opts ["-m" "cognitect.test-runner"
"-d" "src/test_onyx"]}
:server
{:extra-paths ["src/server"]
:extra-deps
{;; Jetty deps - need to exclude and use v9.4.52 due to CVEs
io.pedestal/pedestal.jetty
{:mvn/version "0.6.0"
:exclusions [org.eclipse.jetty/jetty-server
org.eclipse.jetty/jetty-servlet
org.eclipse.jetty.alpn/alpn-api
org.eclipse.jetty/jetty-alpn-server
org.eclipse.jetty.http2/http2-server
org.eclipse.jetty.websocket/websocket-api
org.eclipse.jetty.websocket/websocket-servlet
org.eclipse.jetty.websocket/websocket-server]}
org.eclipse.jetty/jetty-server {:mvn/version "9.4.52.v20230823"}
org.eclipse.jetty/jetty-servlet {:mvn/version "9.4.52.v20230823"}
org.eclipse.jetty.alpn/alpn-api {:mvn/version "1.1.3.v20160715"}
org.eclipse.jetty/jetty-alpn-server {:mvn/version "9.4.52.v20230823"}
org.eclipse.jetty.http2/http2-server {:mvn/version "9.4.52.v20230823"}
;; Other server deps
io.pedestal/pedestal.service {:mvn/version "0.6.0"}
org.slf4j/slf4j-simple {:mvn/version "1.7.28"}
clj-http/clj-http {:mvn/version "3.12.3"}
environ/environ {:mvn/version "1.1.0"}
;; Buddy/BouncyCastle deps
buddy/buddy-auth {:mvn/version "3.0.323"
:exclusions [cheshire/cheshire
buddy/buddy-sign]}
buddy/buddy-sign {:mvn/version "3.5.346"
:exclusions [org.bouncycastle/bcprov-jdk18on]}
org.bouncycastle/bcprov-jdk18on {:mvn/version "1.75"}}
:main-opts ["-m" "com.yetanalytics.datasim.server"]}
:onyx
{:extra-paths ["onyx-resources" "src/onyx"]
:extra-deps {com.amazonaws/aws-java-sdk-s3 {:mvn/version "1.11.899"}
com.amazonaws/aws-java-sdk-core {:mvn/version "1.11.899"}
org.onyxplatform/onyx {:mvn/version "0.14.6"
:exclusions
;; TODO: More exclusions probably
[org.clojure/clojure
org.clojure/core.async
org.slf4j/slf4j-nop
com.amazonaws/aws-java-sdk-s3]}
aleph/aleph {:mvn/version "0.4.7-alpha7"}
com.fzakaria/slf4j-timbre {:mvn/version "0.3.20"}
org.onyxplatform/lib-onyx {:mvn/version "0.14.1.0"}
org.onyxplatform/onyx-http {:mvn/version "0.14.5.0"
:exclusions [aleph/aleph
io.netty/netty-all]}
;; for local repl
com.bhauman/rebel-readline {:mvn/version "0.1.4"}
;; for remote repl
nrepl/nrepl {:mvn/version "0.8.3"}
cider/cider-nrepl {:mvn/version "0.25.6"}
org.onyxplatform/onyx-peer-http-query {:mvn/version "0.14.5.1-SNAPSHOT"}
org.onyxplatform/onyx-amazon-s3 {:mvn/version "0.14.5.0"
:exclusions [org.clojure/clojure
org.onyxplatform/onyx
com.amazonaws/aws-java-sdk-s3]}}}
:onyx-dev
{:extra-paths ["src/onyx_dev"]}

{:dev {:extra-paths ["dev-resources" "src/dev"]
:extra-deps {incanter/incanter-core {:mvn/version "1.9.3"}
incanter/incanter-charts {:mvn/version "1.9.3"}
criterium/criterium {:mvn/version "0.4.5"}}}
:test {:extra-paths ["src/test" "src/test_onyx"]
:extra-deps {same/ish {:mvn/version "0.1.6"}
clj-test-containers/clj-test-containers {:mvn/version "0.7.4"}}}
:run-test {:extra-deps {io.github.cognitect-labs/test-runner {:git/tag "v0.5.1"
:git/sha "dfb30dd"}}
:main-opts ["-m" "cognitect.test-runner"
"-d" "src/test"]}
:cli {:extra-paths ["src/cli"]
:extra-deps {org.clojure/tools.cli {:mvn/version "1.0.219"}}}
:run-cli {:main-opts ["-m" "com.yetanalytics.datasim.cli"]}
:server {:extra-paths ["src/server"]
:extra-deps
{io.pedestal/pedestal.jetty {:mvn/version "0.6.2"}
io.pedestal/pedestal.service {:mvn/version "0.6.2"}
org.slf4j/slf4j-simple {:mvn/version "1.7.28"}
clj-http/clj-http {:mvn/version "3.12.3"}
environ/environ {:mvn/version "1.1.0"}
;; Buddy/BouncyCastle deps
buddy/buddy-auth {:mvn/version "3.0.323"
:exclusions [cheshire/cheshire
buddy/buddy-sign]}
buddy/buddy-sign {:mvn/version "3.5.346"
:exclusions [org.bouncycastle/bcprov-jdk18on]}
org.bouncycastle/bcprov-jdk18on {:mvn/version "1.75"}}}
:run-server {:main-opts ["-m" "com.yetanalytics.datasim.server"]}
:onyx {:extra-paths ["onyx-resources" "src/onyx"]
:extra-deps {com.amazonaws/aws-java-sdk-s3 {:mvn/version "1.11.899"}
com.amazonaws/aws-java-sdk-core {:mvn/version "1.11.899"}
org.onyxplatform/onyx {:mvn/version "0.14.6"
:exclusions
;; TODO: More exclusions probably
[org.clojure/clojure
org.clojure/core.async
org.slf4j/slf4j-nop
com.amazonaws/aws-java-sdk-s3]}
aleph/aleph {:mvn/version "0.4.7-alpha7"}
com.fzakaria/slf4j-timbre {:mvn/version "0.3.20"}
org.onyxplatform/lib-onyx {:mvn/version "0.14.1.0"}
org.onyxplatform/onyx-http {:mvn/version "0.14.5.0"
:exclusions [aleph/aleph
io.netty/netty-all]}
;; for local repl
com.bhauman/rebel-readline {:mvn/version "0.1.4"}
;; for remote repl
nrepl/nrepl {:mvn/version "0.8.3"}
cider/cider-nrepl {:mvn/version "0.25.6"}
org.onyxplatform/onyx-peer-http-query {:mvn/version "0.14.5.1-SNAPSHOT"}
org.onyxplatform/onyx-amazon-s3 {:mvn/version "0.14.5.0"
:exclusions [org.clojure/clojure
org.onyxplatform/onyx
com.amazonaws/aws-java-sdk-s3]}}}
:onyx-dev {:extra-paths ["src/onyx_dev"]}
:onyx-test {:extra-paths ["src/test_onyx"]}
:run-onyx-test {:extra-deps {io.github.cognitect-labs/test-runner {:git/tag "v0.5.1"
:git/sha "dfb30dd"}}
:main-opts ["-m" "cognitect.test-runner"
"-d" "src/test_onyx"]}
:depstar {:replace-deps ; tool usage is new in 2.x
{seancorfield/depstar {:mvn/version "2.0.165"}}
:ns-default hf.depstar
Expand Down
Loading

0 comments on commit f78829f

Please sign in to comment.