Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
2 changes: 1 addition & 1 deletion .scalafmt.conf
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
version = 3.10.4
version = 3.10.6

runner.dialect = scala3
align.preset = more
Expand Down
42 changes: 26 additions & 16 deletions MODULE.bazel.lock

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion bazel/cc.MODULE.bazel
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
bazel_dep(name = "apple_support", version = "2.1.0")
bazel_dep(name = "apple_support", version = "2.2.0")
bazel_dep(name = "rules_cc", version = "0.2.16")
bazel_dep(name = "grpc", version = "1.76.0.bcr.1", repo_name = "com_github_grpc_grpc")
bazel_dep(name = "abseil-cpp", version = "20250814.1", repo_name = "com_google_absl")
Expand Down
12 changes: 6 additions & 6 deletions bazel/java.MODULE.bazel
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
bazel_dep(name = "rules_java", version = "9.3.0")
bazel_dep(name = "rules_jvm_external", version = "6.9")
bazel_dep(name = "contrib_rules_jvm", version = "0.31.1")
bazel_dep(name = "contrib_rules_jvm", version = "0.32.0")

maven = use_extension("@rules_jvm_external//:extensions.bzl", "maven")

Expand All @@ -16,9 +16,9 @@ maven.install(
"com.fasterxml.jackson.core:jackson-core",
"com.fasterxml.jackson.core:jackson-databind",
"com.zaxxer:HikariCP:6.3.3",
"io.github.tors42:chariot:0.1.10",
"com.h2database:h2:2.2.224",
"org.postgresql:postgresql:42.7.4",
"io.github.tors42:chariot:0.2.6",
"com.h2database:h2:2.4.240",
"org.postgresql:postgresql:42.7.9",
"com.fasterxml.jackson.datatype:jackson-datatype-guava",
"com.fasterxml.jackson.datatype:jackson-datatype-jdk8",
"com.fasterxml.jackson.datatype:jackson-datatype-jsr310",
Expand All @@ -38,10 +38,10 @@ maven.install(
"io.netty:netty-codec",
"io.netty:netty-handler",
"io.netty:netty-transport",
"io.sentry:sentry-logback:8.30.0",
"io.sentry:sentry-logback:8.31.0",
"jakarta.annotation:jakarta.annotation-api:3.0.0",
"junit:junit:4.13.2",
"org.assertj:assertj-core:3.27.6",
"org.assertj:assertj-core:3.27.7",
"org.eclipse.jetty:jetty-server:%s" % JETTY_VERSION,
"org.eclipse.jetty.websocket:websocket-jetty-server:%s" % JETTY_VERSION,
"org.jspecify:jspecify:1.0.0",
Expand Down
2 changes: 1 addition & 1 deletion bazel/proto.MODULE.bazel
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
bazel_dep(name = "rules_proto", version = "7.1.0")
bazel_dep(name = "protobuf", version = "33.4", repo_name = "com_google_protobuf")
bazel_dep(name = "protobuf", version = "33.5", repo_name = "com_google_protobuf")
2 changes: 1 addition & 1 deletion bazel/python.MODULE.bazel
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
bazel_dep(name = "rules_python", version = "1.8.1")
bazel_dep(name = "rules_python", version = "1.8.3")

# python = use_extension("@rules_python//python/extensions:python.bzl", "python")
# python.toolchain(
Expand Down
4 changes: 2 additions & 2 deletions bazel/tools.MODULE.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@ use_repo(llvm, "llvm_toolchain")

register_toolchains("@llvm_toolchain//:all")

bazel_dep(name = "bazel_features", version = "1.39.0")
bazel_dep(name = "bazel_features", version = "1.41.0")

bazel_dep(name = "buildifier_prebuilt", version = "8.2.1.1", dev_dependency = True)
bazel_dep(name = "buildifier_prebuilt", version = "8.2.1.2", dev_dependency = True)

bazel_dep(name = "bazel-diff", version = "12.1.1")
bazel_dep(name = "rules_shell", version = "0.6.1")

This file was deleted.

12 changes: 0 additions & 12 deletions jvm/src/main/java/com/muchq/indexer/motifs/MotifDetector.java

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.muchq.indexer;
package com.muchq.one_d4;

import io.micronaut.runtime.Micronaut;
import org.slf4j.Logger;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@ load("@rules_java//java:java_binary.bzl", "java_binary")
load("//bazel/rules:oci.bzl", "linux_oci_java")

java_binary(
name = "indexer",
name = "one_d4",
srcs = [
"App.java",
"IndexerModule.java",
],
main_class = "com.muchq.indexer.App",
main_class = "com.muchq.one_d4.App",
plugins = [
"//bazel/rules:micronaut_type_element_visitor_processor",
"//bazel/rules:micronaut_aggregating_type_element_visitor_processor",
Expand All @@ -24,16 +24,16 @@ java_binary(
"//jvm/src/main/java/com/muchq/chess_com_api",
"//jvm/src/main/java/com/muchq/http_client/core",
"//jvm/src/main/java/com/muchq/http_client/jdk11",
"//jvm/src/main/java/com/muchq/indexer/api",
"//jvm/src/main/java/com/muchq/indexer/api/dto",
"//jvm/src/main/java/com/muchq/indexer/chessql/compiler",
"//jvm/src/main/java/com/muchq/indexer/db",
"//jvm/src/main/java/com/muchq/indexer/engine",
"//jvm/src/main/java/com/muchq/indexer/engine/model",
"//jvm/src/main/java/com/muchq/indexer/motifs",
"//jvm/src/main/java/com/muchq/indexer/queue",
"//jvm/src/main/java/com/muchq/indexer/worker",
"//jvm/src/main/java/com/muchq/json",
"//jvm/src/main/java/com/muchq/one_d4/api",
"//jvm/src/main/java/com/muchq/one_d4/api/dto",
"//jvm/src/main/java/com/muchq/one_d4/chessql/compiler",
"//jvm/src/main/java/com/muchq/one_d4/db",
"//jvm/src/main/java/com/muchq/one_d4/engine",
"//jvm/src/main/java/com/muchq/one_d4/engine/model",
"//jvm/src/main/java/com/muchq/one_d4/motifs",
"//jvm/src/main/java/com/muchq/one_d4/queue",
"//jvm/src/main/java/com/muchq/one_d4/worker",
"@maven//:com_fasterxml_jackson_core_jackson_databind",
"@maven//:com_zaxxer_HikariCP",
"@maven//:io_micronaut_jaxrs_micronaut_jaxrs_server",
Expand All @@ -47,4 +47,4 @@ java_binary(
],
)

linux_oci_java(bin_name = "indexer")
linux_oci_java(bin_name = "one_d4")
Original file line number Diff line number Diff line change
@@ -1,31 +1,31 @@
package com.muchq.indexer;
package com.muchq.one_d4;

import com.fasterxml.jackson.databind.ObjectMapper;
import com.muchq.chess_com_api.ChessClient;
import com.muchq.http_client.core.HttpClient;
import com.muchq.http_client.jdk.Jdk11HttpClient;
import com.muchq.indexer.chessql.compiler.CompiledQuery;
import com.muchq.indexer.chessql.compiler.QueryCompiler;
import com.muchq.indexer.chessql.compiler.SqlCompiler;
import com.muchq.indexer.db.DataSourceFactory;
import com.muchq.indexer.db.GameFeatureDao;
import com.muchq.indexer.db.GameFeatureStore;
import com.muchq.indexer.db.IndexingRequestDao;
import com.muchq.indexer.db.IndexingRequestStore;
import com.muchq.indexer.db.Migration;
import com.muchq.indexer.engine.FeatureExtractor;
import com.muchq.indexer.engine.GameReplayer;
import com.muchq.indexer.engine.PgnParser;
import com.muchq.indexer.motifs.CrossPinDetector;
import com.muchq.indexer.motifs.DiscoveredAttackDetector;
import com.muchq.indexer.motifs.ForkDetector;
import com.muchq.indexer.motifs.MotifDetector;
import com.muchq.indexer.motifs.PinDetector;
import com.muchq.indexer.motifs.SkewerDetector;
import com.muchq.indexer.queue.InMemoryIndexQueue;
import com.muchq.indexer.queue.IndexQueue;
import com.muchq.indexer.worker.IndexWorker;
import com.muchq.indexer.worker.IndexWorkerLifecycle;
import com.muchq.one_d4.chessql.compiler.CompiledQuery;
import com.muchq.one_d4.chessql.compiler.QueryCompiler;
import com.muchq.one_d4.chessql.compiler.SqlCompiler;
import com.muchq.one_d4.db.DataSourceFactory;
import com.muchq.one_d4.db.GameFeatureDao;
import com.muchq.one_d4.db.GameFeatureStore;
import com.muchq.one_d4.db.IndexingRequestDao;
import com.muchq.one_d4.db.IndexingRequestStore;
import com.muchq.one_d4.db.Migration;
import com.muchq.one_d4.engine.FeatureExtractor;
import com.muchq.one_d4.engine.GameReplayer;
import com.muchq.one_d4.engine.PgnParser;
import com.muchq.one_d4.motifs.CrossPinDetector;
import com.muchq.one_d4.motifs.DiscoveredAttackDetector;
import com.muchq.one_d4.motifs.ForkDetector;
import com.muchq.one_d4.motifs.MotifDetector;
import com.muchq.one_d4.motifs.PinDetector;
import com.muchq.one_d4.motifs.SkewerDetector;
import com.muchq.one_d4.queue.InMemoryIndexQueue;
import com.muchq.one_d4.queue.IndexQueue;
import com.muchq.one_d4.worker.IndexWorker;
import com.muchq.one_d4.worker.IndexWorkerLifecycle;
import com.muchq.json.JsonUtils;
import io.micronaut.context.annotation.Context;
import io.micronaut.context.annotation.Factory;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,12 @@ java_library(
],
visibility = ["//visibility:public"],
deps = [
"//jvm/src/main/java/com/muchq/indexer/api/dto",
"//jvm/src/main/java/com/muchq/indexer/chessql/ast",
"//jvm/src/main/java/com/muchq/indexer/chessql/compiler",
"//jvm/src/main/java/com/muchq/indexer/chessql/parser",
"//jvm/src/main/java/com/muchq/indexer/db",
"//jvm/src/main/java/com/muchq/indexer/queue",
"//jvm/src/main/java/com/muchq/one_d4/api/dto",
"//jvm/src/main/java/com/muchq/one_d4/chessql/ast",
"//jvm/src/main/java/com/muchq/one_d4/chessql/compiler",
"//jvm/src/main/java/com/muchq/one_d4/chessql/parser",
"//jvm/src/main/java/com/muchq/one_d4/db",
"//jvm/src/main/java/com/muchq/one_d4/queue",
"@maven//:io_micronaut_jaxrs_micronaut_jaxrs_server",
"@maven//:jakarta_inject_jakarta_inject_api",
"@maven//:jakarta_ws_rs_jakarta_ws_rs_api",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
package com.muchq.indexer.api;
package com.muchq.one_d4.api;

import com.muchq.indexer.api.dto.IndexRequest;
import com.muchq.indexer.api.dto.IndexResponse;
import com.muchq.indexer.db.IndexingRequestStore;
import com.muchq.indexer.queue.IndexMessage;
import com.muchq.indexer.queue.IndexQueue;
import com.muchq.one_d4.api.dto.IndexRequest;
import com.muchq.one_d4.api.dto.IndexResponse;
import com.muchq.one_d4.db.IndexingRequestStore;
import com.muchq.one_d4.queue.IndexMessage;
import com.muchq.one_d4.queue.IndexQueue;
import jakarta.ws.rs.Consumes;
import jakarta.ws.rs.GET;
import jakarta.ws.rs.POST;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
package com.muchq.indexer.api;

import com.muchq.indexer.api.dto.GameFeatureRow;
import com.muchq.indexer.api.dto.QueryRequest;
import com.muchq.indexer.api.dto.QueryResponse;
import com.muchq.indexer.chessql.ast.Expr;
import com.muchq.indexer.chessql.compiler.CompiledQuery;
import com.muchq.indexer.chessql.compiler.QueryCompiler;
import com.muchq.indexer.chessql.parser.Parser;
import com.muchq.indexer.db.GameFeatureStore;
package com.muchq.one_d4.api;

import com.muchq.one_d4.api.dto.GameFeatureRow;
import com.muchq.one_d4.api.dto.QueryRequest;
import com.muchq.one_d4.api.dto.QueryResponse;
import com.muchq.one_d4.chessql.ast.Expr;
import com.muchq.one_d4.chessql.compiler.CompiledQuery;
import com.muchq.one_d4.chessql.compiler.QueryCompiler;
import com.muchq.one_d4.chessql.parser.Parser;
import com.muchq.one_d4.db.GameFeatureStore;
import jakarta.ws.rs.Consumes;
import jakarta.ws.rs.POST;
import jakarta.ws.rs.Path;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,6 @@ java_library(
],
visibility = ["//visibility:public"],
deps = [
"//jvm/src/main/java/com/muchq/indexer/db",
"//jvm/src/main/java/com/muchq/one_d4/db",
],
)
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package com.muchq.indexer.api.dto;
package com.muchq.one_d4.api.dto;

import com.muchq.indexer.db.GameFeatureStore;
import com.muchq.one_d4.db.GameFeatureStore;

import java.time.Instant;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.muchq.indexer.api.dto;
package com.muchq.one_d4.api.dto;

public record IndexRequest(String player, String platform, String startMonth, String endMonth) {
}
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.muchq.indexer.api.dto;
package com.muchq.one_d4.api.dto;

import java.util.UUID;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.muchq.indexer.api.dto;
package com.muchq.one_d4.api.dto;

public record QueryRequest(String query, int limit, int offset) {
public QueryRequest {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.muchq.indexer.api.dto;
package com.muchq.one_d4.api.dto;

import java.util.List;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.muchq.indexer.chessql.ast;
package com.muchq.one_d4.chessql.ast;

import java.util.List;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.muchq.indexer.chessql.ast;
package com.muchq.one_d4.chessql.ast;

public record ComparisonExpr(String field, String operator, Object value) implements Expr {
}
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.muchq.indexer.chessql.ast;
package com.muchq.one_d4.chessql.ast;

public sealed interface Expr permits OrExpr, AndExpr, NotExpr, ComparisonExpr, InExpr, MotifExpr {
}
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.muchq.indexer.chessql.ast;
package com.muchq.one_d4.chessql.ast;

import java.util.List;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.muchq.indexer.chessql.ast;
package com.muchq.one_d4.chessql.ast;

public record MotifExpr(String motifName) implements Expr {
}
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.muchq.indexer.chessql.ast;
package com.muchq.one_d4.chessql.ast;

public record NotExpr(Expr operand) implements Expr {
}
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.muchq.indexer.chessql.ast;
package com.muchq.one_d4.chessql.ast;

import java.util.List;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,6 @@ java_library(
],
visibility = ["//visibility:public"],
deps = [
"//jvm/src/main/java/com/muchq/indexer/chessql/ast",
"//jvm/src/main/java/com/muchq/one_d4/chessql/ast",
],
)
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.muchq.indexer.chessql.compiler;
package com.muchq.one_d4.chessql.compiler;

import java.util.List;

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
package com.muchq.one_d4.chessql.compiler;

import com.muchq.one_d4.chessql.ast.Expr;

public interface QueryCompiler<T> {
T compile(Expr expr);
}
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
package com.muchq.indexer.chessql.compiler;
package com.muchq.one_d4.chessql.compiler;

import com.muchq.indexer.chessql.ast.AndExpr;
import com.muchq.indexer.chessql.ast.ComparisonExpr;
import com.muchq.indexer.chessql.ast.Expr;
import com.muchq.indexer.chessql.ast.InExpr;
import com.muchq.indexer.chessql.ast.MotifExpr;
import com.muchq.indexer.chessql.ast.NotExpr;
import com.muchq.indexer.chessql.ast.OrExpr;
import com.muchq.one_d4.chessql.ast.AndExpr;
import com.muchq.one_d4.chessql.ast.ComparisonExpr;
import com.muchq.one_d4.chessql.ast.Expr;
import com.muchq.one_d4.chessql.ast.InExpr;
import com.muchq.one_d4.chessql.ast.MotifExpr;
import com.muchq.one_d4.chessql.ast.NotExpr;
import com.muchq.one_d4.chessql.ast.OrExpr;

import java.util.ArrayList;
import java.util.List;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.muchq.indexer.chessql.lexer;
package com.muchq.one_d4.chessql.lexer;

import java.util.ArrayList;
import java.util.List;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.muchq.indexer.chessql.lexer;
package com.muchq.one_d4.chessql.lexer;

public record Token(TokenType type, String value, int position) {
@Override
Expand Down
Loading
Loading