Skip to content

Conversation

@mbroecheler
Copy link
Contributor

No description provided.

mbroecheler and others added 4 commits March 23, 2025 11:56
@SuppressWarnings("resource")
@Container
private static final GenericContainer<?> cloudBackendContainer =
new GenericContainer<>(DockerImageName.parse("datasqrl/examples:finance"))
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@velo velo requested a review from Copilot March 26, 2025 18:00
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR prepares the release by updating documentation and templates while also refining core module code. Key changes include new and improved documentation files (CONTRIBUTING.md, issue and PR templates, README updates), renaming of module artifacts, and addition of detailed JavaDoc along with modified method visibilities in the GraphQL converter classes.

Reviewed Changes

Copilot reviewed 28 out of 31 changed files in this pull request and generated no comments.

File Description
CONTRIBUTING.md Added guidelines for contributing and signing commits.
.github/* Added/updated issue and pull request templates.
README.md Updated module names and descriptions for clarity.
acorn-graphql/* Added JavaDoc comments and adjusted method visibilities.
Files not reviewed (3)
  • Dockerfile: Language not supported
  • LICENSE.txt: Language not supported
  • acorn-springai/pom.xml: Language not supported
Comments suppressed due to low confidence (2)

acorn-graphql/src/main/java/com/datasqrl/ai/converter/GraphQLSchemaConverter.java:275

  • The visibility of getExtendedScalars() was changed from public to private. If external code relies on this method, this change could break compatibility. Consider verifying that this method is not part of the public API.
public static List<GraphQLScalarType> getExtendedScalars() {

acorn-graphql/src/main/java/com/datasqrl/ai/converter/GraphQLSchemaConverter.java:320

  • The convert() method's visibility has been changed from public to private. This may affect any components relying on this method externally; please ensure that this change is intentional and does not break existing integrations.
public APIFunction convert(Operation operationType, GraphQLFieldDefinition fieldDef) {

velo added 7 commits March 26, 2025 15:03
Signed-off-by: Marvin Froeder <marvin@datasqrl.com>
Signed-off-by: Marvin Froeder <marvin@datasqrl.com>
Signed-off-by: Marvin Froeder <marvin@datasqrl.com>
Signed-off-by: Marvin Froeder <marvin@datasqrl.com>
Signed-off-by: Marvin Froeder <marvin@datasqrl.com>
Signed-off-by: Marvin Froeder <marvin@datasqrl.com>
if (Files.isRegularFile(pathToExpected)) {
String expected = Files.readString(pathToExpected, StandardCharsets.UTF_8);
assertEquals(expected, result);
assertThat(pathToExpected).hasContent(result);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

FWIW, this assertion is much easier to read when something fails

java.lang.AssertionError: 
Path:
  src/test/resources/snapshot/creditcard-rewards.json
read with charset UTF-8 does not have the expected content:

Changed content at line 26:
expecting:
  ["    "query" : "query Rewards($customerid: Int!$fromTime: DateTime!$toTime: DateTime!) {\nRewards(customerid: $customerid, fromTime: $fromTime, toTime: $toTime) {\ntransactionId\ncustomerid\ncardNo\ncardType\ntime\namount\nreward\nmerchantName\n}\n\n}""]
but was:
  ["    "query" : "query Rewards($customerid: Int!, $fromTime: DateTime!, $toTime: DateTime!) {\nRewards(customerid: $customerid, fromTime: $fromTime, toTime: $toTime) {\ntransactionId\ncustomerid\ncardNo\ncardType\ntime\namount\nreward\nmerchantName\n}\n\n}""]

Changed content at line 53:
expecting:
  ["    "query" : "query RewardsByWeek($customerid: Int!$limit: Int = 12$offset: Int = 0) {\nRewardsByWeek(customerid: $customerid, limit: $limit, offset: $offset) {\ncustomerid\ntimeWeek\ntotal_reward\n}\n\n}""]
but was:
  ["    "query" : "query RewardsByWeek($customerid: Int!, $limit: Int = 12, $offset: Int = 0) {\nRewardsByWeek(customerid: $customerid, limit: $limit, offset: $offset) {\ncustomerid\ntimeWeek\ntotal_reward\n}\n\n}""]

Changed content at line 103:
expecting:
  ["    "query" : "query PotentialRewards($customerid: Int!$cardType: String!$fromTime: DateTime!$toTime: DateTime!) {\nPotentialRewards(customerid: $customerid, cardType: $cardType, fromTime: $fromTime, toTime: $toTime) {\ntransactionId\ncustomerid\nrewardCardType\ntime\namount\nreward\nmerchantName\n}\n\n}""]
but was:
  ["    "query" : "query PotentialRewards($customerid: Int!, $cardType: String!, $fromTime: DateTime!, $toTime: DateTime!) {\nPotentialRewards(customerid: $customerid, cardType: $cardType, fromTime: $fromTime, toTime: $toTime) {\ntransactionId\ncustomerid\nrewardCardType\ntime\namount\nreward\nmerchantName\n}\n\n}""]

Changed content at line 134:
expecting:
  ["    "query" : "query PotentialRewardsByWeek($customerid: Int!$cardType: String!$limit: Int = 12$offset: Int = 0) {\nPotentialRewardsByWeek(customerid: $customerid, cardType: $cardType, limit: $limit, offset: $offset) {\ncustomerid\ncardType\ntimeWeek\ntotal_reward\n}\n\n}""]
but was:
  ["    "query" : "query PotentialRewardsByWeek($customerid: Int!, $cardType: String!, $limit: Int = 12, $offset: Int = 0) {\nPotentialRewardsByWeek(customerid: $customerid, cardType: $cardType, limit: $limit, offset: $offset) {\ncustomerid\ncardType\ntimeWeek\ntotal_reward\n}\n\n}""]

	at com.datasqrl.ai.TestUtil.snapshotTest(TestUtil.java:33)
	at com.datasqrl.ai.converter.GraphQLSchemaConverterTest.snapshot(GraphQLSchemaConverterTest.java:121)
	at com.datasqrl.ai.converter.GraphQLSchemaConverterTest.testCreditCard(GraphQLSchemaConverterTest.java:59)
	at java.base/java.lang.reflect.Method.invoke(Method.java:569)
	at java.base/java.util.ArrayList.forEach(ArrayList.java:1511)
	at java.base/java.util.ArrayList.forEach(ArrayList.java:1511)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

agreed

@velo velo requested a review from Copilot March 27, 2025 18:23
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR prepares the release by updating example configurations, controllers, tests, documentation, and CI workflow settings for Acorn-Java.

  • Updated configuration and controller classes for improved consistency and clarity.
  • Added and refined example applications and tests for both the credit card rewards and Rick and Morty demos.
  • Revised documentation, issue templates, and CI workflows to reflect the latest module naming and environment changes.

Reviewed Changes

Copilot reviewed 56 out of 62 changed files in this pull request and generated no comments.

Show a summary per file
File Description
acorn-examples/acorn-sqrl-creditcard-rewards/src/main/java/com/datasqrl/ai/example/Config.java New config for schema conversion and chat persistence using specific resource files.
acorn-examples/acorn-sqrl-creditcard-rewards/src/main/java/com/datasqrl/ai/example/AIController.java Updated package and added endpoint documentation.
acorn-examples/acorn-example-rick-and-morty/src/test/java/com/datasqrl/ai/example/RickAndMortyExampleApplicationTest.java Added integration test querying the /agent endpoint.
acorn-examples/acorn-example-rick-and-morty/src/main/java/com/datasqrl/ai/example/RickAndMortyExampleApplication.java New Spring Boot application entry point for the Rick and Morty demo.
acorn-examples/acorn-example-rick-and-morty/src/main/java/com/datasqrl/ai/example/Config.java New config with an in-memory chat persistence and schema conversion setup.
acorn-examples/acorn-example-rick-and-morty/src/main/java/com/datasqrl/ai/example/AIController.java Added a simple endpoint to trigger LLM based message completion.
acorn-examples/acorn-example-rick-and-morty/README.md Updated demo documentation with usage and overview details.
README.md Refreshed library description, module dependencies, and getting started instructions.
CONTRIBUTING.md, .github/workflows/maven.yml, and ISSUE/PULL REQUEST templates Updated community and CI/CD documentation to align with the latest changes.
Files not reviewed (6)
  • Dockerfile: Language not supported
  • LICENSE.txt: Language not supported
  • acorn-examples/acorn-example-rick-and-morty/pom.xml: Language not supported
  • acorn-examples/acorn-example-rick-and-morty/src/main/resources/application.properties: Language not supported
  • acorn-examples/acorn-example-rick-and-morty/src/main/resources/schema.graphql: Language not supported
  • acorn-examples/acorn-sqrl-creditcard-rewards/pom.xml: Language not supported
Comments suppressed due to low confidence (1)

acorn-examples/acorn-example-rick-and-morty/src/main/java/com/datasqrl/ai/example/Config.java:100

  • [nitpick] The method name 'getGetMessageContextKeys' is redundant; consider renaming it to 'getMessageContextKeys' for clarity.
public Set<String> getGetMessageContextKeys() {

velo added 2 commits March 27, 2025 15:28
Signed-off-by: Marvin Froeder <marvin@datasqrl.com>
Signed-off-by: Marvin Froeder <marvin@datasqrl.com>
@velo velo marked this pull request as ready for review March 27, 2025 20:59
@mbroecheler mbroecheler merged commit fdf683c into main Mar 30, 2025
1 check passed
@mbroecheler mbroecheler deleted the 0.1-release branch March 30, 2025 15:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants