Skip to content

Commit

Permalink
Merge pull request #97 from truthencode/sync/truth2adarro
Browse files Browse the repository at this point in the history
Sync/truth2adarro
  • Loading branch information
adarro authored Sep 9, 2023
2 parents 0a5fe39 + 030df0e commit e8743a9
Show file tree
Hide file tree
Showing 258 changed files with 11,319 additions and 40 deletions.
3 changes: 2 additions & 1 deletion .trunk/trunk.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
version: 0.1
cli:
cli:
version: 1.15.0

plugins:
sources:
- id: trunk
Expand Down
92 changes: 70 additions & 22 deletions build-logic/src/main/kotlin/djaxonomy.test-conventions.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -46,18 +46,63 @@ fun JvmTestSuite.applyKotlinTest() {
val junitScalaTestVersion: String by project
val junitPlatformVersion: String by project

val scalaLibraryVersion: String by project
val enumeratumVersion: String by project
val logbackVersion: String by project

val scalaTestPlusMockitoVersion: String by project
val scalaCheckVersion: String by project
val scalaTestVersion: String by project
val accordVersion: String by project
val scalaMajorVersion: String by project
val scalaLoggingVersion: String by project

val mockitoVersion: String by project
val concordionVersion: String by project
val flexmarkVersion: String by project
val typeSafeConfigVersion: String by project

fun JvmTestSuite.applyConcordionAcceptanceTest() {
dependencies {
implementation(project())
implementation("org.concordion:concordion:$concordionVersion")
// flexmark (mostly for concordion / markdown)
implementation("com.vladsch.flexmark:flexmark-all:$flexmarkVersion") // 0.62.2 -> 0.64.8
// implementation("com.vladsch.flexmark:ext-gfm-strikethrough:$flexmarkVersion")
// implementation("com.vladsch.flexmark:flexmark-ext-emoji:$flexmarkVersion")
// implementation("com.vladsch.flexmark:flexmark-ext-yaml-front-matter:$flexmarkVersion")
// implementation("com.vladsch.flexmark:flexmark-ext-gfm-tasklist:$flexmarkVersion")
}
}

fun JvmTestSuite.applyScalaDepends() {
dependencies {
implementation("org.scala-lang:scala-library:$scalaLibraryVersion")
implementation("ch.qos.logback:logback-classic:$logbackVersion")
implementation("com.typesafe.scala-logging:scala-logging_$scalaMajorVersion:$scalaLoggingVersion")
implementation("com.beachape:enumeratum_$scalaMajorVersion:$enumeratumVersion")
implementation("com.typesafe:config:$typeSafeConfigVersion")
}
}

fun JvmTestSuite.applyVintageEngine() {
dependencies {
runtimeOnly("org.junit.vintage:junit-vintage-engine:$junitPlatformVersion")
}
}

fun JvmTestSuite.applyJupiterEngine() {
dependencies {
runtimeOnly("org.junit.jupiter:junit-jupiter-engine:$junitPlatformVersion")
}
}

fun JvmTestSuite.applyScalaTest() {
dependencies {
runtimeOnly("co.helmethair:scalatest-junit-runner:$junitScalaTestVersion")
runtimeOnly("org.junit.vintage:junit-vintage-engine:$junitPlatformVersion")

// runtimeOnly("org.junit.vintage:junit-vintage-engine:5.10.0")

implementation("org.scalatest:scalatest_$scalaMajorVersion:$scalaTestVersion")
implementation("org.scalacheck:scalacheck_$scalaMajorVersion:$scalaCheckVersion")
implementation("org.scalatestplus:mockito-3-4_$scalaMajorVersion:$scalaTestPlusMockitoVersion")
Expand Down Expand Up @@ -118,12 +163,29 @@ project.testing {
when (tt) {
TestTypes.Unit -> {
logger.error(("Configuring standard Unit Test for scala"))
test.applyScalaTest()
this.applyScalaTest()
}

TestTypes.Acceptance -> {
useJUnitJupiter()
this.applyScalaDepends()
this.applyJupiterEngine()
this.applyVintageEngine()
logger.error("adding scala acceptance stuff")
dependencies {
implementation("de.neuland-bfi:jade4j:1.2.7")
}
targets.all {
testTask.configure {
useJUnitPlatform {
// includeEngines = setOf("vintage")
// includeEngines("junit-jupiter", "junit-vintage")
testLogging {
events("passed", "skipped", "failed")
}
}
}
}
}

else -> {
Expand All @@ -132,29 +194,15 @@ project.testing {
}
}
}
}
/*
val functionalTest by registering(JvmTestSuite::class) {

dependencies {
implementation(project())
}
}
register<JvmTestSuite>("integrationTest") {
dependencies {
implementation(project())
}
targets {
all {
testTask.configure {
shouldRunAfter(t)
// Concordian BDD Acceptance
if (tt == TestTypes.Acceptance) {
logger.error("applying Concordion Acceptance")
this.applyConcordionAcceptanceTest()
this.applyVintageEngine()
this.applyJupiterEngine()
}
}
}
}
*/
} // config
}
}
17 changes: 14 additions & 3 deletions docs/developers_guide/Tech_Concepts.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# List of technologies used or considered for use.
# List of technologies used or considered for use

Build quality / development tools These are generally implemented via gradle plugins or triggered of CI/CD builds to
improve code quality / security and or mind map or visualize concepts.
Expand Down Expand Up @@ -37,16 +37,23 @@ result comparison. Scala3 has integrated features similar to docusaurus, so like
Scala3 upgrade. Possible alternatives are [Znai](https://testingisdocumenting.org/znai/introduction/getting-started/) or
Docusaurus. We can go aDoc if needed but would prefer Markdown.

### Allure

[Allue](https://github.com/allure-framework) is a reporting aggregation service that works with Junit4 , Junit5, Scalatest, Cucumber and more.

### OpenAPI

Embedding a Swagger UI for the OpenAPI spec in the docs

### Jupyter

Would eventually like to integrate a Jupyter notebook in the doc site.
This would be useful for a living calculator, quick web checks and possibly even spark integration.
The default is very Python focused, but R / Scala kernels exist. Ideally embedding a Graal Scala Jupyter.
The default is very Python focused, but R / Scala kernels exist. Ideally embedding a Graal Scala Jupyter.
There are also a handful of Proof of concept polygot notebooks out there, mostly built in Smalltalk.

## Front End

Front End Using Kafka streams, we can update running totals and properties in an event-driven manner for character
builders such as feats possessed, stances / abilities toggled, items equipped to dynamically show average damage, DR
breaking, crit profiles, hit-points etc. without having to re-evaluate every effect in place.
Expand All @@ -57,6 +64,10 @@ filtering by requirements as they are discovered.
Camel - camel can route these topics in the background to update the databases, run further more process intensive
operations etc without affecting the flow of the builder.

Vert.x Vert.x can expose the API as a RESTful service and react via the event bus with Camel.
Vert.x Vert.x can expose the API as a RESTful service and react via the event bus with Camel.

## Apache Isis

Rapid prototyping where Domain Objects become the UI.
[Apache ~~Isis~~ Causeway](https://causeway.apache.org)
May have potential direct-integration issues as a JPMS Java app, but as a RESTful DTO Front-end it could be extremely useful.
4 changes: 3 additions & 1 deletion docs/resources/integration.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

At some point this page might show direct or indirect integration with other sites / applications.

Ideally, I would like to fill the gaps of existing solutions as opposed to duplicating all their existing hard work.
Ideally, I would like to fill the gaps with existing solutions as opposed to duplicating all their existing hard work.

examples include importing data from the undisputed Character Planner's forum export.

[DDO wiki](https://www.ddowiki.com)
8 changes: 5 additions & 3 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -83,11 +83,12 @@ quillVersion=3.11.0
monixVersion=3.4.0

#BDD Testing
concordionVersion=3.1.3
concordionVersion=4.0.1
concordionExtEmbedVersion=1.2.0
concordionExtCollapseOutputVersion=1.0.0


// flexmark markdown extensions for concordion specs
flexmarkVersion=0.64.8

# system properties
# concordion
Expand All @@ -103,7 +104,8 @@ junitScalaTestVersion=0.1.10

# Test Configuration / Version Management
# engines (base platform / jupiter / vintage)
junitPlatformVersion=5.8.2
junitPlatformVersion=5.10.0
# 5.8.2
# launcher etc
junitLauncherVersion=1.8.1

Expand Down
4 changes: 2 additions & 2 deletions local.properties
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@
# Location of the SDK. This is only used by Gradle.
# For customization when using a Version Control System, please read the
# header note.
#Tue Jun 28 02:46:01 MDT 2022
sdk.dir=/home/adarro/.android
#Sat Sep 09 14:55:15 MDT 2023
sdk.dir=C\:\\Users\\adarr\\AppData\\Local\\Android\\Sdk
1 change: 1 addition & 0 deletions mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,7 @@ markdown_extensions:

extra_javascript:
- https://cdn.jsdelivr.net/gh/rod2ik/cdn@main/mkdocs/javascripts/mkdocs-graphviz.js
- https://cdn.jsdelivr.net/gh/eddymens/markdown-external-link-script@v2.0.0/main.min.js
#nav:
# - Home: index.md
# - User guide:
Expand Down
10 changes: 5 additions & 5 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@
<couchbase.version>1.1.0</couchbase.version>
<!-- Languages -->
<!-- Extend -->
<xtend.version>2.13.0</xtend.version>
<xtend.version>2.32.0</xtend.version>
<!-- Scala -->
<scala.base>2.12</scala.base>
<scala.minor.version>2.13.6</scala.minor.version>
Expand Down Expand Up @@ -592,7 +592,7 @@
<plugin>
<groupId>pl.project13.maven</groupId>
<artifactId>git-commit-id-plugin</artifactId>
<version>2.2.0</version>
<version>4.9.10</version>

<configuration>
<!-- If you'd like to tell the plugin where your .git directory is,
Expand All @@ -606,7 +606,7 @@
<!-- that's the default value -->
<dateFormat>dd.MM.yyyy '@' HH:mm:ss z</dateFormat>

<!-- @since 2.2.0 -->
<!-- @since 4.9.10 -->
<!-- If you want to set the timezone of the dateformat to anything
in particular you can do this by using this option. As a general warning
try to avoid three-letter time zone IDs because the same abbreviation are
Expand Down Expand Up @@ -979,7 +979,7 @@
<dependency>
<groupId>org.pegdown</groupId>
<artifactId>pegdown</artifactId>
<version>1.5.0</version>
<version>1.6.0</version>
</dependency>
</dependencies>
<executions>
Expand Down Expand Up @@ -1294,7 +1294,7 @@
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>taglist-maven-plugin</artifactId>
<version>2.4</version>
<version>3.0.0</version>
</plugin>
</plugins>
</reporting>
Expand Down
17 changes: 14 additions & 3 deletions subprojects/common/ddo-core/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -89,14 +89,25 @@ dependencies {
// version = "0.62.2"
// )

testImplementation(group = "de.neuland-bfi", name = "jade4j", version = "1.2.7")
testImplementation(group = "net.ruippeixotog", name = "scala-scraper_$scalaMajorVersion", version = "2.2.1")
testCompileOnly(group = "org.jetbrains", name = "annotations", version = "17.0.0")
// testImplementation(group = "de.neuland-bfi", name = "jade4j", version = "1.2.7")
// testImplementation(group = "net.ruippeixotog", name = "scala-scraper_$scalaMajorVersion", version = "2.2.1")
// testCompileOnly(group = "org.jetbrains", name = "annotations", version = "17.0.0")

implementation(group = "org.jetbrains", name = "annotations", version = "17.0.0")
}
}

testing {
suites {
withType(JvmTestSuite::class).matching { it.name in listOf("acceptanceTest") }.configureEach {

dependencies {
implementation(project(":ddo-modeling"))
}
}
}
}

// sourceSets {
// this.getByName("acceptanceTest") {
// java {
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
/*
* SPDX-License-Identifier: Apache-2.0
*
* Copyright 2015-2021 Andre White.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package io.truthencode.ddo.model.destiny;

import com.vladsch.flexmark.ext.emoji.EmojiExtension;
import com.vladsch.flexmark.parser.Parser;
import com.vladsch.flexmark.util.data.DataSet;
import com.vladsch.flexmark.util.data.MutableDataSet;
import com.vladsch.flexmark.util.misc.Extension;
import org.concordion.api.option.FlexmarkOptions;
import org.concordion.integration.junit4.ConcordionRunner;
import org.junit.runner.RunWith;

import java.util.List;

@RunWith(ConcordionRunner.class)
public class EpicDestinies {
private final transient List<Extension> e = List.of(EmojiExtension.create());
@FlexmarkOptions
DataSet flexmarkOptions = new MutableDataSet()
.set(EmojiExtension.ATTR_IMAGE_SIZE, "24")
.set(Parser.EXTENSIONS, e);

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
/*
* SPDX-License-Identifier: Apache-2.0
*
* Copyright 2015-2021 Andre White.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package io.truthencode.ddo.model.feats;

import org.concordion.integration.junit4.ConcordionRunner;
import org.junit.runner.RunWith;

@RunWith(ConcordionRunner.class)
public class DodgeSpec {
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# AcceptanceTests

- [Model](../io/truthencode/ddo/model/Model.html "c:run")
Loading

0 comments on commit e8743a9

Please sign in to comment.