Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Morphir integration with TraderX #253

Closed
wants to merge 62 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
62 commits
Select commit Hold shift + click to select a range
349dd43
create models folder
amihere-w Oct 28, 2024
1ce9fc1
include morphir ir temporarily
amihere-w Oct 28, 2024
d8ba037
include model in trade processor
amihere-w Oct 28, 2024
7a045fa
remove npm install
amihere-w Oct 30, 2024
44cff96
add dependencies for morphir, aspect
amihere-w Oct 30, 2024
76d0834
include aspect, annotation
amihere-w Oct 30, 2024
047e36c
include build from morphir elm source
amihere-w Nov 4, 2024
30077be
add models/dist to gitignore
amihere-w Nov 4, 2024
0aba7bd
refactor trade processor models into models folder
amihere-w Nov 4, 2024
61338a0
WIP
amihere-w Nov 4, 2024
c7a649a
trade status as annotation fixed
amihere-w Nov 4, 2024
9d3aaac
update entity field mapping
amihere-w Nov 5, 2024
9c3da98
add simple thread pause for trade service
amihere-w Nov 5, 2024
9ddfb64
combine rules
amihere-w Nov 6, 2024
2ad528c
consolidate morphir rule
amihere-w Nov 7, 2024
68375b6
remodelled trade process
worlas Nov 7, 2024
04f8f62
refactor java code after model updates
amihere-w Nov 7, 2024
51df7ef
convert bix rules error response into simple string
amihere-w Nov 11, 2024
745c2f6
parse error message to return in exception
amihere-w Nov 11, 2024
2b19c4e
comments
amihere-w Nov 11, 2024
b0571fe
add jackson scala module
amihere-w Nov 11, 2024
41428c7
add json converters for morphir model classes
amihere-w Nov 11, 2024
c584ea8
WIP
amihere-w Nov 18, 2024
b4930fe
add morphir tests
amihere-w Nov 18, 2024
9dbf7fd
add serializers
amihere-w Nov 18, 2024
e3f4c52
Revert "add serializers"
amihere-w Nov 18, 2024
70d484e
add json serializer to morphir
amihere-w Nov 18, 2024
71bee1b
add -f and circe to models build
amihere-w Nov 20, 2024
452975a
fix models compilation error
amihere-w Nov 20, 2024
87d7085
fix trade processor docker build
amihere-w Nov 22, 2024
f77e2a7
include action on trade object for trade service
amihere-w Nov 27, 2024
3f7fc9d
update models hashes
amihere-w Nov 27, 2024
2a7fcb7
include (de)serializers for trade objects
amihere-w Nov 27, 2024
e76b4e3
add scheduling for trade processor
amihere-w Nov 27, 2024
7d81abb
simplify morphir aspect
amihere-w Nov 27, 2024
5386e71
include new path for processor
amihere-w Nov 27, 2024
b80bf65
include necessary fields for trade feed rows
amihere-w Nov 27, 2024
837e814
add uuid
amihere-w Nov 27, 2024
08ab430
include action,state,id to TradeTicket
amihere-w Nov 27, 2024
14e45a9
include cancel trade option
amihere-w Nov 27, 2024
412f958
fetch cancelled order with id
amihere-w Nov 27, 2024
87a2766
fix formatting
amihere-w Nov 27, 2024
5759398
avoid position > 0 when processing
amihere-w Nov 27, 2024
d6760e8
allow trade/pos updates to be flattened into one row based on id
amihere-w Nov 28, 2024
832a259
filter trades correctly
amihere-w Nov 28, 2024
e40dc44
title case for side
amihere-w Nov 29, 2024
b4c31c7
fix cancellation bugs
amihere-w Nov 29, 2024
4f0a2ca
apply spread operator
amihere-w Dec 2, 2024
1d035ca
simple format
amihere-w Dec 2, 2024
b2f4239
abstract hibernate converter
amihere-w Dec 2, 2024
207ca80
update service to use correct trade id for settlement
amihere-w Dec 2, 2024
ef1efe0
add print statement
amihere-w Dec 2, 2024
472ca43
trade rules modified
worlas Dec 2, 2024
4dc81da
Merge remote-tracking branch 'origin/morphir' into morphir
worlas Dec 2, 2024
dc3da1a
fix new model changes
amihere-w Dec 2, 2024
a62fcf5
remove maybe in trade order object
amihere-w Dec 2, 2024
f6c25ce
trade rules modified and scala code gitignored
worlas Dec 3, 2024
5adcfe7
Merge branch 'morphir' of https://github.com/amihere-w/traderX into m…
worlas Dec 3, 2024
197ad19
trade rules modified
worlas Dec 3, 2024
365f458
removed desired action
amihere-w Dec 12, 2024
351427d
Merge branch 'main' into morphir
amihere-w Jan 29, 2025
5db893b
Merge pull request #1 from amihere-w/morphir
amihere-w Jan 29, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -466,4 +466,6 @@ website/.docusaurus
.cache-loader
website/npm-debug.log*
website/yarn-debug.log*
website/yarn-error.log*
website/yarn-error.log*

models/dist
10 changes: 4 additions & 6 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -123,9 +123,8 @@ services:
restart: always
image: trade-service
build:
context: trade-service
dockerfile: Dockerfile
working_dir: /trade-service
context: .
dockerfile: trade-service/Dockerfile
expose:
- 18092
ports:
Expand All @@ -152,9 +151,8 @@ services:
restart: always
image: trade-processor
build:
context: trade-processor
dockerfile: Dockerfile
working_dir: /trade-processor
context: .
dockerfile: trade-processor/Dockerfile
expose:
- 18091
ports:
Expand Down
9 changes: 9 additions & 0 deletions models/.gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#
# https://help.github.com/articles/dealing-with-line-endings/
#
# Linux start script should use lf
/gradlew text eol=lf

# These are Windows script files and should use crlf
*.bat text eol=crlf

8 changes: 8 additions & 0 deletions models/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# Ignore Gradle project-specific cache directory
.gradle

# Ignore Gradle build output directory
build

*.json
src/main/scala/
45 changes: 45 additions & 0 deletions models/build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
/*
* This file was generated by the Gradle 'init' task.
*
* This is a general purpose Gradle build.
* To learn more about Gradle by exploring our Samples at https://docs.gradle.org/8.8/samples
*/

// Apply the java plugin to add support for Java
plugins {
id 'scala'
id "com.github.node-gradle.node" version "7.1.0"
}

node {
npmInstallCommand = System.getenv("CI") ? 'ci' : 'install'

// Enabled the automatic download.
download = true
}

repositories {
mavenCentral()
}

// In this section you declare the dependencies for your production and test code
dependencies {
implementation 'org.morphir:morphir-sdk-core_2.13:0.21.0'
implementation 'org.morphir:morphir-sdk-json_2.13:0.21.0'
implementation 'org.scala-lang:scala-library:2.13.15'
implementation 'io.circe:circe-core_2.13:0.14.10'
}

tasks.register('generateMorphirIR', NpxTask) {
dependsOn 'npmInstall'
command = "morphir-elm"
args = ["make", "-f"]
}

tasks.register('morphirScalaGen', NpxTask) {
dependsOn 'generateMorphirIR'
command = "morphir-elm"
args = ['gen', '-t', 'scala', '-s', '-o', './src/main/scala']
}

compileScala.dependsOn morphirScalaGen
62 changes: 62 additions & 0 deletions models/elm.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
{
"type": "application",
"source-directories": [
"src"
],
"elm-version": "0.19.1",
"dependencies": {
"direct": {
"elm/browser": "1.0.2",
"elm/core": "1.0.5",
"elm/html": "1.0.0",
"finos/morphir-elm": "22.0.2"
},
"indirect": {
"TSFoster/elm-bytes-extra": "1.3.0",
"TSFoster/elm-md5": "2.0.1",
"TSFoster/elm-sha1": "2.1.1",
"TSFoster/elm-uuid": "4.2.0",
"avh4/elm-color": "1.0.0",
"avh4/elm-fifo": "1.0.4",
"chain-partners/elm-bignum": "1.0.1",
"cmditch/elm-bigint": "1.0.1",
"cuducos/elm-format-number": "8.1.4",
"danfishgold/base64-bytes": "1.1.0",
"dillonkearns/elm-markdown": "7.0.1",
"dosarf/elm-tree-view": "3.0.0",
"elm/bytes": "1.0.8",
"elm/json": "1.1.3",
"elm/parser": "1.1.0",
"elm/random": "1.0.0",
"elm/regex": "1.0.0",
"elm/svg": "1.0.1",
"elm/time": "1.0.0",
"elm/url": "1.0.0",
"elm/virtual-dom": "1.0.3",
"elm-community/graph": "6.0.0",
"elm-community/intdict": "3.1.0",
"elm-community/list-extra": "8.7.0",
"elm-community/maybe-extra": "5.3.0",
"elm-community/random-extra": "3.2.0",
"elm-explorations/markdown": "1.0.0",
"elm-explorations/test": "2.2.0",
"erlandsona/assoc-set": "1.1.3",
"fabhof/elm-ui-datepicker": "5.0.0",
"justinmimbs/date": "3.2.1",
"lattyware/elm-fontawesome": "6.0.0",
"matthewsj/elm-ordering": "2.0.0",
"mdgriffith/elm-ui": "1.1.8",
"myrho/elm-round": "1.0.5",
"pzp1997/assoc-list": "1.0.0",
"rtfeldman/elm-hex": "1.0.0",
"rtfeldman/elm-iso8601-date-strings": "1.1.4",
"rundis/elm-bootstrap": "5.2.0",
"stil4m/elm-syntax": "7.3.6",
"stil4m/structured-writer": "1.0.3"
}
},
"test-dependencies": {
"direct": {},
"indirect": {}
}
}
2 changes: 2 additions & 0 deletions models/gradle/libs.versions.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# This file was generated by the Gradle 'init' task.
# https://docs.gradle.org/current/userguide/platforms.html#sub::toml-dependencies-format
Binary file added models/gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
7 changes: 7 additions & 0 deletions models/gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.8-bin.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
Loading