diff --git a/.scalafmt.conf b/.scalafmt.conf index d14e7413..86dfb7bd 100644 --- a/.scalafmt.conf +++ b/.scalafmt.conf @@ -1,4 +1,4 @@ -version = 3.10.4 +version = 3.10.6 runner.dialect = scala3 align.preset = more diff --git a/MODULE.bazel.lock b/MODULE.bazel.lock index bf097a6e..e1b0cb68 100644 --- a/MODULE.bazel.lock +++ b/MODULE.bazel.lock @@ -1,6 +1,20 @@ { "lockFileVersion": 26, "registryFileHashes": { + "https://bcr.bazel.build/bazel_registry.json": "8a28e4aff06ee60aed2a8c281907fb8bcbf3b753c91fb5a5c57da3215d5b3497", + "https://bcr.bazel.build/modules/apple_support/2.2.0/MODULE.bazel": "5e32bc42e413a4544df7afee7fa4c7aff73e670a44e56e8e45ce1954332034ad", + "https://bcr.bazel.build/modules/apple_support/2.2.0/source.json": "368bf1de5dace2a411e792e6df2ea5384eb8db3899680ed51b37eb48b88fd8ac", + "https://bcr.bazel.build/modules/bazel_features/1.41.0/MODULE.bazel": "6e0f87fafed801273c371d41e22a15a6f8abf83fdd7f87d5e44ad317b94433d0", + "https://bcr.bazel.build/modules/bazel_features/1.41.0/source.json": "8fd525b31b0883c47e0593443cdd10219b94a7556b3195fc02d75c86c66cfe30", + "https://bcr.bazel.build/modules/buildifier_prebuilt/8.2.1.2/MODULE.bazel": "6d078b1d6ddccb91b3090853945fbfdd41169bb2b2c1dd00fbd388f0be1b09f5", + "https://bcr.bazel.build/modules/buildifier_prebuilt/8.2.1.2/source.json": "93439c253ffe47da41f6b4b85807b4e14fefa5424b7af533a740a374e40c00f2", + "https://bcr.bazel.build/modules/contrib_rules_jvm/0.32.0/MODULE.bazel": "0a51c56b2fc0d8ce6184f19513c78ce2a8a56119bc2adbc1859ff84c30724c29", + "https://bcr.bazel.build/modules/contrib_rules_jvm/0.32.0/source.json": "55b30b443561e3cce13001197961c732661ceb8e0e573b6e734d2bb6e52b3c1b", + "https://bcr.bazel.build/modules/protobuf/33.5/MODULE.bazel": "df58cd1c41c9d1257afa7f3110b23d970c107bf806b2e4d8c59a344d05504b0c", + "https://bcr.bazel.build/modules/protobuf/33.5/source.json": "fe53cb512afd722159c4c763f3fbbcc6ab850d45d1f389d8374f91c11e83bcd7", + "https://bcr.bazel.build/modules/rules_cc/0.2.15/MODULE.bazel": "6a0a4a75a57aa6dc888300d848053a58c6b12a29f89d4304e1c41448514ec6e8", + "https://bcr.bazel.build/modules/rules_python/1.8.3/MODULE.bazel": "f343e159b59701334be3914416b9f1b72845801ba47920fcb288af4ce8c5cce3", + "https://bcr.bazel.build/modules/rules_python/1.8.3/source.json": "e5439f308e3c6f79f318a0f87108db46fc575be89370c3dfb3f7e0eaa571a3f8", "https://raw.githubusercontent.com/aaylward/bazel-central-registry/otel_cpp_bazel_8_9/bazel_registry.json": "8a28e4aff06ee60aed2a8c281907fb8bcbf3b753c91fb5a5c57da3215d5b3497", "https://raw.githubusercontent.com/aaylward/bazel-central-registry/otel_cpp_bazel_8_9/modules/abseil-cpp/20210324.2/MODULE.bazel": "7cd0312e064fde87c8d1cd79ba06c876bd23630c83466e9500321be55c96ace2", "https://raw.githubusercontent.com/aaylward/bazel-central-registry/otel_cpp_bazel_8_9/modules/abseil-cpp/20211102.0/MODULE.bazel": "70390338f7a5106231d20620712f7cccb659cd0e9d073d1991c038eb9fc57589", @@ -31,8 +45,7 @@ "https://raw.githubusercontent.com/aaylward/bazel-central-registry/otel_cpp_bazel_8_9/modules/apple_support/1.22.1/MODULE.bazel": "90bd1a660590f3ceffbdf524e37483094b29352d85317060b2327fff8f3f4458", "https://raw.githubusercontent.com/aaylward/bazel-central-registry/otel_cpp_bazel_8_9/modules/apple_support/1.24.1/MODULE.bazel": "f46e8ddad60aef170ee92b2f3d00ef66c147ceafea68b6877cb45bd91737f5f8", "https://raw.githubusercontent.com/aaylward/bazel-central-registry/otel_cpp_bazel_8_9/modules/apple_support/1.24.2/MODULE.bazel": "0e62471818affb9f0b26f128831d5c40b074d32e6dda5a0d3852847215a41ca4", - "https://raw.githubusercontent.com/aaylward/bazel-central-registry/otel_cpp_bazel_8_9/modules/apple_support/2.1.0/MODULE.bazel": "b15c125dabed01b6803c129cd384de4997759f02f8ec90dc5136bcf6dfc5086a", - "https://raw.githubusercontent.com/aaylward/bazel-central-registry/otel_cpp_bazel_8_9/modules/apple_support/2.1.0/source.json": "78064cfefe18dee4faaf51893661e0d403784f3efe88671d727cdcdc67ed8fb3", + "https://raw.githubusercontent.com/aaylward/bazel-central-registry/otel_cpp_bazel_8_9/modules/apple_support/2.2.0/MODULE.bazel": "not found", "https://raw.githubusercontent.com/aaylward/bazel-central-registry/otel_cpp_bazel_8_9/modules/aspect_bazel_lib/1.31.2/MODULE.bazel": "7bee702b4862612f29333590f4b658a5832d433d6f8e4395f090e8f4e85d442f", "https://raw.githubusercontent.com/aaylward/bazel-central-registry/otel_cpp_bazel_8_9/modules/aspect_bazel_lib/1.38.0/MODULE.bazel": "6307fec451ba9962c1c969eb516ebfe1e46528f7fa92e1c9ac8646bef4cdaa3f", "https://raw.githubusercontent.com/aaylward/bazel-central-registry/otel_cpp_bazel_8_9/modules/aspect_bazel_lib/1.40.3/MODULE.bazel": "668e6bcb4d957fc0e284316dba546b705c8d43c857f87119619ee83c4555b859", @@ -65,9 +78,8 @@ "https://raw.githubusercontent.com/aaylward/bazel-central-registry/otel_cpp_bazel_8_9/modules/bazel_features/1.33.0/MODULE.bazel": "8b8dc9d2a4c88609409c3191165bccec0e4cb044cd7a72ccbe826583303459f6", "https://raw.githubusercontent.com/aaylward/bazel-central-registry/otel_cpp_bazel_8_9/modules/bazel_features/1.34.0/MODULE.bazel": "e8475ad7c8965542e0c7aac8af68eb48c4af904be3d614b6aa6274c092c2ea1e", "https://raw.githubusercontent.com/aaylward/bazel-central-registry/otel_cpp_bazel_8_9/modules/bazel_features/1.38.0/MODULE.bazel": "f9b8a9c890ebd216b4049fd12a31d3c2602e3403c7af636b04fbbd7453edc9c9", - "https://raw.githubusercontent.com/aaylward/bazel-central-registry/otel_cpp_bazel_8_9/modules/bazel_features/1.39.0/MODULE.bazel": "28739425c1fc283c91931619749c832b555e60bcd1010b40d8441ce0a5cf726d", - "https://raw.githubusercontent.com/aaylward/bazel-central-registry/otel_cpp_bazel_8_9/modules/bazel_features/1.39.0/source.json": "f63cbeb4c602098484d57001e5a07d31cb02bbccde9b5e2c9bf0b29d05283e93", "https://raw.githubusercontent.com/aaylward/bazel-central-registry/otel_cpp_bazel_8_9/modules/bazel_features/1.4.1/MODULE.bazel": "e45b6bb2350aff3e442ae1111c555e27eac1d915e77775f6fdc4b351b758b5d7", + "https://raw.githubusercontent.com/aaylward/bazel-central-registry/otel_cpp_bazel_8_9/modules/bazel_features/1.41.0/MODULE.bazel": "not found", "https://raw.githubusercontent.com/aaylward/bazel-central-registry/otel_cpp_bazel_8_9/modules/bazel_features/1.9.0/MODULE.bazel": "885151d58d90d8d9c811eb75e3288c11f850e1d6b481a8c9f766adee4712358b", "https://raw.githubusercontent.com/aaylward/bazel-central-registry/otel_cpp_bazel_8_9/modules/bazel_features/1.9.1/MODULE.bazel": "8f679097876a9b609ad1f60249c49d68bfab783dd9be012faf9d82547b14815a", "https://raw.githubusercontent.com/aaylward/bazel-central-registry/otel_cpp_bazel_8_9/modules/bazel_lib/3.0.0/MODULE.bazel": "22b70b80ac89ad3f3772526cd9feee2fa412c2b01933fea7ed13238a448d370d", @@ -93,8 +105,7 @@ "https://raw.githubusercontent.com/aaylward/bazel-central-registry/otel_cpp_bazel_8_9/modules/boringssl/0.20240913.0/MODULE.bazel": "fcaa7503a5213290831a91ed1eb538551cf11ac0bc3a6ad92d0fef92c5bd25fb", "https://raw.githubusercontent.com/aaylward/bazel-central-registry/otel_cpp_bazel_8_9/modules/boringssl/0.20241024.0/MODULE.bazel": "b540cff73d948cb79cb0bc108d7cef391d2098a25adabfda5043e4ef548dbc87", "https://raw.githubusercontent.com/aaylward/bazel-central-registry/otel_cpp_bazel_8_9/modules/boringssl/0.20241024.0/source.json": "d843092e682b84188c043ac742965d7f96e04c846c7e338187e03238674909a9", - "https://raw.githubusercontent.com/aaylward/bazel-central-registry/otel_cpp_bazel_8_9/modules/buildifier_prebuilt/8.2.1.1/MODULE.bazel": "2e2e306add04b7c7cd21e73c9293dcbd7528a08a84338e919036f402eb6b1e2e", - "https://raw.githubusercontent.com/aaylward/bazel-central-registry/otel_cpp_bazel_8_9/modules/buildifier_prebuilt/8.2.1.1/source.json": "4c86fd3a384a09613c2213fb1f71562d6d70471977e6e81173e6625fd6ce53bc", + "https://raw.githubusercontent.com/aaylward/bazel-central-registry/otel_cpp_bazel_8_9/modules/buildifier_prebuilt/8.2.1.2/MODULE.bazel": "not found", "https://raw.githubusercontent.com/aaylward/bazel-central-registry/otel_cpp_bazel_8_9/modules/buildozer/8.2.1/MODULE.bazel": "61e9433c574c2bd9519cad7fa66b9c1d2b8e8d5f3ae5d6528a2c2d26e68d874d", "https://raw.githubusercontent.com/aaylward/bazel-central-registry/otel_cpp_bazel_8_9/modules/buildozer/8.2.1/source.json": "7c33f6a26ee0216f85544b4bca5e9044579e0219b6898dd653f5fb449cf2e484", "https://raw.githubusercontent.com/aaylward/bazel-central-registry/otel_cpp_bazel_8_9/modules/c-ares/1.15.0/MODULE.bazel": "ba0a78360fdc83f02f437a9e7df0532ad1fbaa59b722f6e715c11effebaa0166", @@ -110,8 +121,7 @@ "https://raw.githubusercontent.com/aaylward/bazel-central-registry/otel_cpp_bazel_8_9/modules/check/0.15.2.bcr.1/source.json": "dc81d335b44f70c17d8ba6dbff9c7f196594f38835981bbf7e6a6d363130d682", "https://raw.githubusercontent.com/aaylward/bazel-central-registry/otel_cpp_bazel_8_9/modules/civetweb/1.16/MODULE.bazel": "46a38f9daeb57392e3827fce7d40926be0c802bd23cdd6bfd3a96c804de42fae", "https://raw.githubusercontent.com/aaylward/bazel-central-registry/otel_cpp_bazel_8_9/modules/civetweb/1.16/source.json": "ba8b9585adb8355cb51b999d57172fd05e7a762c56b8d4bac6db42c99de3beb7", - "https://raw.githubusercontent.com/aaylward/bazel-central-registry/otel_cpp_bazel_8_9/modules/contrib_rules_jvm/0.31.1/MODULE.bazel": "ea9d6dbb5df3f6992c557e6bcabc4265aff3858a84bcac94f9609e46b1bf2fe6", - "https://raw.githubusercontent.com/aaylward/bazel-central-registry/otel_cpp_bazel_8_9/modules/contrib_rules_jvm/0.31.1/source.json": "798da1c4beb347245f225459be9ee92d1c38434d7177e1e38cfb413611980235", + "https://raw.githubusercontent.com/aaylward/bazel-central-registry/otel_cpp_bazel_8_9/modules/contrib_rules_jvm/0.32.0/MODULE.bazel": "not found", "https://raw.githubusercontent.com/aaylward/bazel-central-registry/otel_cpp_bazel_8_9/modules/curl/8.11.0.bcr.4/MODULE.bazel": "4a7625ad6d3978f5794598c6a799c75663f04ae66bd7b54a17c8c0fd203e65af", "https://raw.githubusercontent.com/aaylward/bazel-central-registry/otel_cpp_bazel_8_9/modules/curl/8.11.0.bcr.4/source.json": "bca1e3ba69100563ddfbc60872b797237a9d424c9e86f289259a701919a4b97d", "https://raw.githubusercontent.com/aaylward/bazel-central-registry/otel_cpp_bazel_8_9/modules/curl/8.4.0/MODULE.bazel": "0bc250aa1cb69590049383df7a9537c809591fcf876c620f5f097c58fdc9bc10", @@ -256,7 +266,7 @@ "https://raw.githubusercontent.com/aaylward/bazel-central-registry/otel_cpp_bazel_8_9/modules/protobuf/32.1/MODULE.bazel": "89cd2866a9cb07fee9ff74c41ceace11554f32e0d849de4e23ac55515cfada4d", "https://raw.githubusercontent.com/aaylward/bazel-central-registry/otel_cpp_bazel_8_9/modules/protobuf/33.0/MODULE.bazel": "c5270efb4aad37a2f893536076518793f409ea7df07a06df995d848d1690f21c", "https://raw.githubusercontent.com/aaylward/bazel-central-registry/otel_cpp_bazel_8_9/modules/protobuf/33.4/MODULE.bazel": "114775b816b38b6d0ca620450d6b02550c60ceedfdc8d9a229833b34a223dc42", - "https://raw.githubusercontent.com/aaylward/bazel-central-registry/otel_cpp_bazel_8_9/modules/protobuf/33.4/source.json": "555f8686b4c7d6b5ba731fbea13bf656b4bfd9a7ff629c1d9d3f6e1d6155de79", + "https://raw.githubusercontent.com/aaylward/bazel-central-registry/otel_cpp_bazel_8_9/modules/protobuf/33.5/MODULE.bazel": "not found", "https://raw.githubusercontent.com/aaylward/bazel-central-registry/otel_cpp_bazel_8_9/modules/protoc-gen-validate/1.0.4.bcr.2/MODULE.bazel": "c4bd2c850211ff5b7dadf9d2d0496c1c922fdedc303c775b01dfd3b3efc907ed", "https://raw.githubusercontent.com/aaylward/bazel-central-registry/otel_cpp_bazel_8_9/modules/protoc-gen-validate/1.0.4/MODULE.bazel": "b8913c154b16177990f6126d2d2477d187f9ddc568e95ee3e2d50fc65d2c494a", "https://raw.githubusercontent.com/aaylward/bazel-central-registry/otel_cpp_bazel_8_9/modules/protoc-gen-validate/1.2.1.bcr.1/MODULE.bazel": "4bf09676b62fa587ae07e073420a76ec8766dcce7545e5f8c68cfa8e484b5120", @@ -305,6 +315,7 @@ "https://raw.githubusercontent.com/aaylward/bazel-central-registry/otel_cpp_bazel_8_9/modules/rules_cc/0.2.0/MODULE.bazel": "b5c17f90458caae90d2ccd114c81970062946f49f355610ed89bebf954f5783c", "https://raw.githubusercontent.com/aaylward/bazel-central-registry/otel_cpp_bazel_8_9/modules/rules_cc/0.2.13/MODULE.bazel": "eecdd666eda6be16a8d9dc15e44b5c75133405e820f620a234acc4b1fdc5aa37", "https://raw.githubusercontent.com/aaylward/bazel-central-registry/otel_cpp_bazel_8_9/modules/rules_cc/0.2.14/MODULE.bazel": "353c99ed148887ee89c54a17d4100ae7e7e436593d104b668476019023b58df8", + "https://raw.githubusercontent.com/aaylward/bazel-central-registry/otel_cpp_bazel_8_9/modules/rules_cc/0.2.15/MODULE.bazel": "not found", "https://raw.githubusercontent.com/aaylward/bazel-central-registry/otel_cpp_bazel_8_9/modules/rules_cc/0.2.16/MODULE.bazel": "9242fa89f950c6ef7702801ab53922e99c69b02310c39fb6e62b2bd30df2a1d4", "https://raw.githubusercontent.com/aaylward/bazel-central-registry/otel_cpp_bazel_8_9/modules/rules_cc/0.2.16/source.json": "d03d5cde49376d87e14ec14b666c56075e5e3926930327fd5d0484a1ff2ac1cc", "https://raw.githubusercontent.com/aaylward/bazel-central-registry/otel_cpp_bazel_8_9/modules/rules_cc/0.2.4/MODULE.bazel": "1ff1223dfd24f3ecf8f028446d4a27608aa43c3f41e346d22838a4223980b8cc", @@ -413,8 +424,7 @@ "https://raw.githubusercontent.com/aaylward/bazel-central-registry/otel_cpp_bazel_8_9/modules/rules_python/1.5.1/MODULE.bazel": "acfe65880942d44a69129d4c5c3122d57baaf3edf58ae5a6bd4edea114906bf5", "https://raw.githubusercontent.com/aaylward/bazel-central-registry/otel_cpp_bazel_8_9/modules/rules_python/1.6.0/MODULE.bazel": "7e04ad8f8d5bea40451cf80b1bd8262552aa73f841415d20db96b7241bd027d8", "https://raw.githubusercontent.com/aaylward/bazel-central-registry/otel_cpp_bazel_8_9/modules/rules_python/1.7.0/MODULE.bazel": "d01f995ecd137abf30238ad9ce97f8fc3ac57289c8b24bd0bf53324d937a14f8", - "https://raw.githubusercontent.com/aaylward/bazel-central-registry/otel_cpp_bazel_8_9/modules/rules_python/1.8.1/MODULE.bazel": "7e487b202981471b71b8d602d23f74e576faad9de1daa5710f49d3280d399efe", - "https://raw.githubusercontent.com/aaylward/bazel-central-registry/otel_cpp_bazel_8_9/modules/rules_python/1.8.1/source.json": "df6038c5a66ed13aa3e3490c8afd3270c6a673fea4b2662c191b6cf31d166eb2", + "https://raw.githubusercontent.com/aaylward/bazel-central-registry/otel_cpp_bazel_8_9/modules/rules_python/1.8.3/MODULE.bazel": "not found", "https://raw.githubusercontent.com/aaylward/bazel-central-registry/otel_cpp_bazel_8_9/modules/rules_rust/0.45.1/MODULE.bazel": "a69d0db3a958fab2c6520961e1b2287afcc8b36690fd31bbc4f6f7391397150d", "https://raw.githubusercontent.com/aaylward/bazel-central-registry/otel_cpp_bazel_8_9/modules/rules_rust/0.51.0/MODULE.bazel": "2b6d1617ac8503bfdcc0e4520c20539d4bba3a691100bee01afe193ceb0310f9", "https://raw.githubusercontent.com/aaylward/bazel-central-registry/otel_cpp_bazel_8_9/modules/rules_rust/0.68.1/MODULE.bazel": "8d3332ef4079673385eb81f8bd68b012decc04ac00c9d5a01a40eff90301732c", @@ -560,7 +570,7 @@ "@@apple_rules_lint+//lint:extensions.bzl%linter": { "general": { "bzlTransitiveDigest": "GRMyLraxrIqwpYRdzOfjZMmByG37F1TiOwo1vnf4KJ4=", - "usagesDigest": "MD/tENc7ct5AQZrbADbDaSWu6SYB9Svwe02oLD7Sj6U=", + "usagesDigest": "f2EijVXcSr7xRc9XlBuj7JffjKnPMz6Gb5X0VLXQZFA=", "recordedInputs": [], "generatedRepoSpecs": { "apple_linters": { @@ -699,7 +709,7 @@ }, "@@rules_oci+//oci:extensions.bzl%oci": { "general": { - "bzlTransitiveDigest": "3vTuVCvx75vuzwKkDIO2I7iXPXam+s32U+Wn082UtoA=", + "bzlTransitiveDigest": "lG1n2HkWw8ikh8oafpWlAVlVMERJ/3dVt5E9W5AqtnA=", "usagesDigest": "Kgby1nDW9rgAbA8BJL/5yvJ8seegm7g/iZbjvDizaEE=", "recordedInputs": [ "REPO_MAPPING:aspect_bazel_lib+,bazel_tools bazel_tools", @@ -1036,7 +1046,7 @@ "@@rules_python+//python/extensions:config.bzl%config": { "general": { "bzlTransitiveDigest": "tpiXvHXWP8z23XkccFfNPavHB4Sq2c8kxPlZAR2mN5A=", - "usagesDigest": "JoEJaFGCJXAu2aMckzsVrS0Gz9dIhMnc0PEav88G7ew=", + "usagesDigest": "HZ99ezJBkgjKcxXQ3OBxGgesUIMF6eg7E0TUNOait2I=", "recordedInputs": [ "REPO_MAPPING:rules_python+,bazel_tools bazel_tools", "REPO_MAPPING:rules_python+,pypi__build rules_python++config+pypi__build", @@ -1204,7 +1214,7 @@ "@@rules_python+//python/uv:uv.bzl%uv": { "general": { "bzlTransitiveDigest": "SxM597Xgir5amMOGJtvYenMreZ/ZLSncCbC65J1FDBs=", - "usagesDigest": "B/mAxYlrftJu4GYJNA3xazmr/pQLkAoZ3GdTzNQIzyo=", + "usagesDigest": "XRYYokHTb3p1WwpZj2sncZ1bh8zJfO4YrKJ2PkapnO8=", "recordedInputs": [ "REPO_MAPPING:rules_python+,bazel_tools bazel_tools", "REPO_MAPPING:rules_python+,platforms platforms" @@ -1233,7 +1243,7 @@ }, "@@rules_rust+//crate_universe:extension.bzl%crate%+crate": { "general": { - "bzlTransitiveDigest": "3K7d+LIYrNWLoNVlvNGWYLzaNrywatTvyr0fQutgJlw=", + "bzlTransitiveDigest": "LYGvWXKsCBQJ8UAqRX+mabYpJ4lx0fe9NODCUu7pRgc=", "usagesDigest": "DHz/0EANM8jbCkaWhJDEncpi7wT+wVwCwo2O6ZI9pxA=", "recordedInputs": [ "ENV:CARGO_BAZEL_DEBUG \\0", diff --git a/bazel/cc.MODULE.bazel b/bazel/cc.MODULE.bazel index 629ada25..3d7e7fad 100644 --- a/bazel/cc.MODULE.bazel +++ b/bazel/cc.MODULE.bazel @@ -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") diff --git a/bazel/java.MODULE.bazel b/bazel/java.MODULE.bazel index 1f82fe4a..10d1e0bd 100644 --- a/bazel/java.MODULE.bazel +++ b/bazel/java.MODULE.bazel @@ -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") @@ -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", @@ -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", diff --git a/bazel/proto.MODULE.bazel b/bazel/proto.MODULE.bazel index 66758733..2206ea34 100644 --- a/bazel/proto.MODULE.bazel +++ b/bazel/proto.MODULE.bazel @@ -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") diff --git a/bazel/python.MODULE.bazel b/bazel/python.MODULE.bazel index 8e3ccc80..03ccd7b8 100644 --- a/bazel/python.MODULE.bazel +++ b/bazel/python.MODULE.bazel @@ -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( diff --git a/bazel/tools.MODULE.bazel b/bazel/tools.MODULE.bazel index 7b8bbedc..ed34873a 100644 --- a/bazel/tools.MODULE.bazel +++ b/bazel/tools.MODULE.bazel @@ -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") diff --git a/jvm/src/main/java/com/muchq/indexer/chessql/compiler/QueryCompiler.java b/jvm/src/main/java/com/muchq/indexer/chessql/compiler/QueryCompiler.java deleted file mode 100644 index 41880569..00000000 --- a/jvm/src/main/java/com/muchq/indexer/chessql/compiler/QueryCompiler.java +++ /dev/null @@ -1,7 +0,0 @@ -package com.muchq.indexer.chessql.compiler; - -import com.muchq.indexer.chessql.ast.Expr; - -public interface QueryCompiler { - T compile(Expr expr); -} diff --git a/jvm/src/main/java/com/muchq/indexer/motifs/MotifDetector.java b/jvm/src/main/java/com/muchq/indexer/motifs/MotifDetector.java deleted file mode 100644 index d0a1f811..00000000 --- a/jvm/src/main/java/com/muchq/indexer/motifs/MotifDetector.java +++ /dev/null @@ -1,12 +0,0 @@ -package com.muchq.indexer.motifs; - -import com.muchq.indexer.engine.model.GameFeatures; -import com.muchq.indexer.engine.model.Motif; -import com.muchq.indexer.engine.model.PositionContext; - -import java.util.List; - -public interface MotifDetector { - Motif motif(); - List detect(List positions); -} diff --git a/jvm/src/main/java/com/muchq/indexer/App.java b/jvm/src/main/java/com/muchq/one_d4/App.java similarity index 92% rename from jvm/src/main/java/com/muchq/indexer/App.java rename to jvm/src/main/java/com/muchq/one_d4/App.java index 8badfd2d..10bf545c 100644 --- a/jvm/src/main/java/com/muchq/indexer/App.java +++ b/jvm/src/main/java/com/muchq/one_d4/App.java @@ -1,4 +1,4 @@ -package com.muchq.indexer; +package com.muchq.one_d4; import io.micronaut.runtime.Micronaut; import org.slf4j.Logger; diff --git a/jvm/src/main/java/com/muchq/indexer/BUILD.bazel b/jvm/src/main/java/com/muchq/one_d4/BUILD.bazel similarity index 70% rename from jvm/src/main/java/com/muchq/indexer/BUILD.bazel rename to jvm/src/main/java/com/muchq/one_d4/BUILD.bazel index f76c5c09..fb6f0392 100644 --- a/jvm/src/main/java/com/muchq/indexer/BUILD.bazel +++ b/jvm/src/main/java/com/muchq/one_d4/BUILD.bazel @@ -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", @@ -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", @@ -47,4 +47,4 @@ java_binary( ], ) -linux_oci_java(bin_name = "indexer") +linux_oci_java(bin_name = "one_d4") diff --git a/jvm/src/main/java/com/muchq/indexer/IndexerModule.java b/jvm/src/main/java/com/muchq/one_d4/IndexerModule.java similarity index 75% rename from jvm/src/main/java/com/muchq/indexer/IndexerModule.java rename to jvm/src/main/java/com/muchq/one_d4/IndexerModule.java index 4c37598f..67697517 100644 --- a/jvm/src/main/java/com/muchq/indexer/IndexerModule.java +++ b/jvm/src/main/java/com/muchq/one_d4/IndexerModule.java @@ -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; diff --git a/jvm/src/main/java/com/muchq/indexer/api/BUILD.bazel b/jvm/src/main/java/com/muchq/one_d4/api/BUILD.bazel similarity index 67% rename from jvm/src/main/java/com/muchq/indexer/api/BUILD.bazel rename to jvm/src/main/java/com/muchq/one_d4/api/BUILD.bazel index aa795358..1f550bb6 100644 --- a/jvm/src/main/java/com/muchq/indexer/api/BUILD.bazel +++ b/jvm/src/main/java/com/muchq/one_d4/api/BUILD.bazel @@ -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", diff --git a/jvm/src/main/java/com/muchq/indexer/api/IndexController.java b/jvm/src/main/java/com/muchq/one_d4/api/IndexController.java similarity index 87% rename from jvm/src/main/java/com/muchq/indexer/api/IndexController.java rename to jvm/src/main/java/com/muchq/one_d4/api/IndexController.java index 8536ee0d..9eb3aef9 100644 --- a/jvm/src/main/java/com/muchq/indexer/api/IndexController.java +++ b/jvm/src/main/java/com/muchq/one_d4/api/IndexController.java @@ -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; diff --git a/jvm/src/main/java/com/muchq/indexer/api/QueryController.java b/jvm/src/main/java/com/muchq/one_d4/api/QueryController.java similarity index 77% rename from jvm/src/main/java/com/muchq/indexer/api/QueryController.java rename to jvm/src/main/java/com/muchq/one_d4/api/QueryController.java index f5f22d11..8a2595ca 100644 --- a/jvm/src/main/java/com/muchq/indexer/api/QueryController.java +++ b/jvm/src/main/java/com/muchq/one_d4/api/QueryController.java @@ -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; diff --git a/jvm/src/main/java/com/muchq/indexer/api/dto/BUILD.bazel b/jvm/src/main/java/com/muchq/one_d4/api/dto/BUILD.bazel similarity index 86% rename from jvm/src/main/java/com/muchq/indexer/api/dto/BUILD.bazel rename to jvm/src/main/java/com/muchq/one_d4/api/dto/BUILD.bazel index 8866f5af..2700f82b 100644 --- a/jvm/src/main/java/com/muchq/indexer/api/dto/BUILD.bazel +++ b/jvm/src/main/java/com/muchq/one_d4/api/dto/BUILD.bazel @@ -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", ], ) diff --git a/jvm/src/main/java/com/muchq/indexer/api/dto/GameFeatureRow.java b/jvm/src/main/java/com/muchq/one_d4/api/dto/GameFeatureRow.java similarity index 93% rename from jvm/src/main/java/com/muchq/indexer/api/dto/GameFeatureRow.java rename to jvm/src/main/java/com/muchq/one_d4/api/dto/GameFeatureRow.java index 8f019a55..b4dc15fa 100644 --- a/jvm/src/main/java/com/muchq/indexer/api/dto/GameFeatureRow.java +++ b/jvm/src/main/java/com/muchq/one_d4/api/dto/GameFeatureRow.java @@ -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; diff --git a/jvm/src/main/java/com/muchq/indexer/api/dto/IndexRequest.java b/jvm/src/main/java/com/muchq/one_d4/api/dto/IndexRequest.java similarity index 74% rename from jvm/src/main/java/com/muchq/indexer/api/dto/IndexRequest.java rename to jvm/src/main/java/com/muchq/one_d4/api/dto/IndexRequest.java index ea3321b9..13389fdb 100644 --- a/jvm/src/main/java/com/muchq/indexer/api/dto/IndexRequest.java +++ b/jvm/src/main/java/com/muchq/one_d4/api/dto/IndexRequest.java @@ -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) { } diff --git a/jvm/src/main/java/com/muchq/indexer/api/dto/IndexResponse.java b/jvm/src/main/java/com/muchq/one_d4/api/dto/IndexResponse.java similarity index 77% rename from jvm/src/main/java/com/muchq/indexer/api/dto/IndexResponse.java rename to jvm/src/main/java/com/muchq/one_d4/api/dto/IndexResponse.java index 8a9e9e60..f8c7052c 100644 --- a/jvm/src/main/java/com/muchq/indexer/api/dto/IndexResponse.java +++ b/jvm/src/main/java/com/muchq/one_d4/api/dto/IndexResponse.java @@ -1,4 +1,4 @@ -package com.muchq.indexer.api.dto; +package com.muchq.one_d4.api.dto; import java.util.UUID; diff --git a/jvm/src/main/java/com/muchq/indexer/api/dto/QueryRequest.java b/jvm/src/main/java/com/muchq/one_d4/api/dto/QueryRequest.java similarity index 85% rename from jvm/src/main/java/com/muchq/indexer/api/dto/QueryRequest.java rename to jvm/src/main/java/com/muchq/one_d4/api/dto/QueryRequest.java index 45a2724f..6ed26905 100644 --- a/jvm/src/main/java/com/muchq/indexer/api/dto/QueryRequest.java +++ b/jvm/src/main/java/com/muchq/one_d4/api/dto/QueryRequest.java @@ -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 { diff --git a/jvm/src/main/java/com/muchq/indexer/api/dto/QueryResponse.java b/jvm/src/main/java/com/muchq/one_d4/api/dto/QueryResponse.java similarity index 73% rename from jvm/src/main/java/com/muchq/indexer/api/dto/QueryResponse.java rename to jvm/src/main/java/com/muchq/one_d4/api/dto/QueryResponse.java index 5f9e414f..af0d22d0 100644 --- a/jvm/src/main/java/com/muchq/indexer/api/dto/QueryResponse.java +++ b/jvm/src/main/java/com/muchq/one_d4/api/dto/QueryResponse.java @@ -1,4 +1,4 @@ -package com.muchq.indexer.api.dto; +package com.muchq.one_d4.api.dto; import java.util.List; diff --git a/jvm/src/main/java/com/muchq/indexer/chessql/ast/AndExpr.java b/jvm/src/main/java/com/muchq/one_d4/chessql/ast/AndExpr.java similarity index 69% rename from jvm/src/main/java/com/muchq/indexer/chessql/ast/AndExpr.java rename to jvm/src/main/java/com/muchq/one_d4/chessql/ast/AndExpr.java index 78b45e11..fbc63813 100644 --- a/jvm/src/main/java/com/muchq/indexer/chessql/ast/AndExpr.java +++ b/jvm/src/main/java/com/muchq/one_d4/chessql/ast/AndExpr.java @@ -1,4 +1,4 @@ -package com.muchq.indexer.chessql.ast; +package com.muchq.one_d4.chessql.ast; import java.util.List; diff --git a/jvm/src/main/java/com/muchq/indexer/chessql/ast/BUILD.bazel b/jvm/src/main/java/com/muchq/one_d4/chessql/ast/BUILD.bazel similarity index 100% rename from jvm/src/main/java/com/muchq/indexer/chessql/ast/BUILD.bazel rename to jvm/src/main/java/com/muchq/one_d4/chessql/ast/BUILD.bazel diff --git a/jvm/src/main/java/com/muchq/indexer/chessql/ast/ComparisonExpr.java b/jvm/src/main/java/com/muchq/one_d4/chessql/ast/ComparisonExpr.java similarity index 70% rename from jvm/src/main/java/com/muchq/indexer/chessql/ast/ComparisonExpr.java rename to jvm/src/main/java/com/muchq/one_d4/chessql/ast/ComparisonExpr.java index f568b0e5..ec8dff59 100644 --- a/jvm/src/main/java/com/muchq/indexer/chessql/ast/ComparisonExpr.java +++ b/jvm/src/main/java/com/muchq/one_d4/chessql/ast/ComparisonExpr.java @@ -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 { } diff --git a/jvm/src/main/java/com/muchq/indexer/chessql/ast/Expr.java b/jvm/src/main/java/com/muchq/one_d4/chessql/ast/Expr.java similarity index 72% rename from jvm/src/main/java/com/muchq/indexer/chessql/ast/Expr.java rename to jvm/src/main/java/com/muchq/one_d4/chessql/ast/Expr.java index 1726960c..436d9eac 100644 --- a/jvm/src/main/java/com/muchq/indexer/chessql/ast/Expr.java +++ b/jvm/src/main/java/com/muchq/one_d4/chessql/ast/Expr.java @@ -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 { } diff --git a/jvm/src/main/java/com/muchq/indexer/chessql/ast/InExpr.java b/jvm/src/main/java/com/muchq/one_d4/chessql/ast/InExpr.java similarity index 72% rename from jvm/src/main/java/com/muchq/indexer/chessql/ast/InExpr.java rename to jvm/src/main/java/com/muchq/one_d4/chessql/ast/InExpr.java index 6dcf94a7..7e0dff53 100644 --- a/jvm/src/main/java/com/muchq/indexer/chessql/ast/InExpr.java +++ b/jvm/src/main/java/com/muchq/one_d4/chessql/ast/InExpr.java @@ -1,4 +1,4 @@ -package com.muchq.indexer.chessql.ast; +package com.muchq.one_d4.chessql.ast; import java.util.List; diff --git a/jvm/src/main/java/com/muchq/indexer/chessql/ast/MotifExpr.java b/jvm/src/main/java/com/muchq/one_d4/chessql/ast/MotifExpr.java similarity index 61% rename from jvm/src/main/java/com/muchq/indexer/chessql/ast/MotifExpr.java rename to jvm/src/main/java/com/muchq/one_d4/chessql/ast/MotifExpr.java index 8c482ef6..f4cf8d37 100644 --- a/jvm/src/main/java/com/muchq/indexer/chessql/ast/MotifExpr.java +++ b/jvm/src/main/java/com/muchq/one_d4/chessql/ast/MotifExpr.java @@ -1,4 +1,4 @@ -package com.muchq.indexer.chessql.ast; +package com.muchq.one_d4.chessql.ast; public record MotifExpr(String motifName) implements Expr { } diff --git a/jvm/src/main/java/com/muchq/indexer/chessql/ast/NotExpr.java b/jvm/src/main/java/com/muchq/one_d4/chessql/ast/NotExpr.java similarity index 59% rename from jvm/src/main/java/com/muchq/indexer/chessql/ast/NotExpr.java rename to jvm/src/main/java/com/muchq/one_d4/chessql/ast/NotExpr.java index 06e5fcbc..05bcd928 100644 --- a/jvm/src/main/java/com/muchq/indexer/chessql/ast/NotExpr.java +++ b/jvm/src/main/java/com/muchq/one_d4/chessql/ast/NotExpr.java @@ -1,4 +1,4 @@ -package com.muchq.indexer.chessql.ast; +package com.muchq.one_d4.chessql.ast; public record NotExpr(Expr operand) implements Expr { } diff --git a/jvm/src/main/java/com/muchq/indexer/chessql/ast/OrExpr.java b/jvm/src/main/java/com/muchq/one_d4/chessql/ast/OrExpr.java similarity index 69% rename from jvm/src/main/java/com/muchq/indexer/chessql/ast/OrExpr.java rename to jvm/src/main/java/com/muchq/one_d4/chessql/ast/OrExpr.java index 2e521f8d..164727ae 100644 --- a/jvm/src/main/java/com/muchq/indexer/chessql/ast/OrExpr.java +++ b/jvm/src/main/java/com/muchq/one_d4/chessql/ast/OrExpr.java @@ -1,4 +1,4 @@ -package com.muchq.indexer.chessql.ast; +package com.muchq.one_d4.chessql.ast; import java.util.List; diff --git a/jvm/src/main/java/com/muchq/indexer/chessql/compiler/BUILD.bazel b/jvm/src/main/java/com/muchq/one_d4/chessql/compiler/BUILD.bazel similarity index 81% rename from jvm/src/main/java/com/muchq/indexer/chessql/compiler/BUILD.bazel rename to jvm/src/main/java/com/muchq/one_d4/chessql/compiler/BUILD.bazel index ec98ed86..7f2969f9 100644 --- a/jvm/src/main/java/com/muchq/indexer/chessql/compiler/BUILD.bazel +++ b/jvm/src/main/java/com/muchq/one_d4/chessql/compiler/BUILD.bazel @@ -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", ], ) diff --git a/jvm/src/main/java/com/muchq/indexer/chessql/compiler/CompiledQuery.java b/jvm/src/main/java/com/muchq/one_d4/chessql/compiler/CompiledQuery.java similarity index 68% rename from jvm/src/main/java/com/muchq/indexer/chessql/compiler/CompiledQuery.java rename to jvm/src/main/java/com/muchq/one_d4/chessql/compiler/CompiledQuery.java index d9a58376..058332fc 100644 --- a/jvm/src/main/java/com/muchq/indexer/chessql/compiler/CompiledQuery.java +++ b/jvm/src/main/java/com/muchq/one_d4/chessql/compiler/CompiledQuery.java @@ -1,4 +1,4 @@ -package com.muchq.indexer.chessql.compiler; +package com.muchq.one_d4.chessql.compiler; import java.util.List; diff --git a/jvm/src/main/java/com/muchq/one_d4/chessql/compiler/QueryCompiler.java b/jvm/src/main/java/com/muchq/one_d4/chessql/compiler/QueryCompiler.java new file mode 100644 index 00000000..c3dd7cfd --- /dev/null +++ b/jvm/src/main/java/com/muchq/one_d4/chessql/compiler/QueryCompiler.java @@ -0,0 +1,7 @@ +package com.muchq.one_d4.chessql.compiler; + +import com.muchq.one_d4.chessql.ast.Expr; + +public interface QueryCompiler { + T compile(Expr expr); +} diff --git a/jvm/src/main/java/com/muchq/indexer/chessql/compiler/SqlCompiler.java b/jvm/src/main/java/com/muchq/one_d4/chessql/compiler/SqlCompiler.java similarity index 90% rename from jvm/src/main/java/com/muchq/indexer/chessql/compiler/SqlCompiler.java rename to jvm/src/main/java/com/muchq/one_d4/chessql/compiler/SqlCompiler.java index 5d1aac6a..b204ee27 100644 --- a/jvm/src/main/java/com/muchq/indexer/chessql/compiler/SqlCompiler.java +++ b/jvm/src/main/java/com/muchq/one_d4/chessql/compiler/SqlCompiler.java @@ -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; diff --git a/jvm/src/main/java/com/muchq/indexer/chessql/lexer/BUILD.bazel b/jvm/src/main/java/com/muchq/one_d4/chessql/lexer/BUILD.bazel similarity index 100% rename from jvm/src/main/java/com/muchq/indexer/chessql/lexer/BUILD.bazel rename to jvm/src/main/java/com/muchq/one_d4/chessql/lexer/BUILD.bazel diff --git a/jvm/src/main/java/com/muchq/indexer/chessql/lexer/Lexer.java b/jvm/src/main/java/com/muchq/one_d4/chessql/lexer/Lexer.java similarity index 99% rename from jvm/src/main/java/com/muchq/indexer/chessql/lexer/Lexer.java rename to jvm/src/main/java/com/muchq/one_d4/chessql/lexer/Lexer.java index 41c6e7c8..94320bc0 100644 --- a/jvm/src/main/java/com/muchq/indexer/chessql/lexer/Lexer.java +++ b/jvm/src/main/java/com/muchq/one_d4/chessql/lexer/Lexer.java @@ -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; diff --git a/jvm/src/main/java/com/muchq/indexer/chessql/lexer/Token.java b/jvm/src/main/java/com/muchq/one_d4/chessql/lexer/Token.java similarity index 82% rename from jvm/src/main/java/com/muchq/indexer/chessql/lexer/Token.java rename to jvm/src/main/java/com/muchq/one_d4/chessql/lexer/Token.java index 68322096..782e6136 100644 --- a/jvm/src/main/java/com/muchq/indexer/chessql/lexer/Token.java +++ b/jvm/src/main/java/com/muchq/one_d4/chessql/lexer/Token.java @@ -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 diff --git a/jvm/src/main/java/com/muchq/indexer/chessql/lexer/TokenType.java b/jvm/src/main/java/com/muchq/one_d4/chessql/lexer/TokenType.java similarity index 90% rename from jvm/src/main/java/com/muchq/indexer/chessql/lexer/TokenType.java rename to jvm/src/main/java/com/muchq/one_d4/chessql/lexer/TokenType.java index 816776fa..551d7d62 100644 --- a/jvm/src/main/java/com/muchq/indexer/chessql/lexer/TokenType.java +++ b/jvm/src/main/java/com/muchq/one_d4/chessql/lexer/TokenType.java @@ -1,4 +1,4 @@ -package com.muchq.indexer.chessql.lexer; +package com.muchq.one_d4.chessql.lexer; public enum TokenType { // Literals diff --git a/jvm/src/main/java/com/muchq/indexer/chessql/parser/BUILD.bazel b/jvm/src/main/java/com/muchq/one_d4/chessql/parser/BUILD.bazel similarity index 65% rename from jvm/src/main/java/com/muchq/indexer/chessql/parser/BUILD.bazel rename to jvm/src/main/java/com/muchq/one_d4/chessql/parser/BUILD.bazel index 18c54e20..c3b28bf9 100644 --- a/jvm/src/main/java/com/muchq/indexer/chessql/parser/BUILD.bazel +++ b/jvm/src/main/java/com/muchq/one_d4/chessql/parser/BUILD.bazel @@ -8,7 +8,7 @@ java_library( ], visibility = ["//visibility:public"], deps = [ - "//jvm/src/main/java/com/muchq/indexer/chessql/ast", - "//jvm/src/main/java/com/muchq/indexer/chessql/lexer", + "//jvm/src/main/java/com/muchq/one_d4/chessql/ast", + "//jvm/src/main/java/com/muchq/one_d4/chessql/lexer", ], ) diff --git a/jvm/src/main/java/com/muchq/indexer/chessql/parser/ParseException.java b/jvm/src/main/java/com/muchq/one_d4/chessql/parser/ParseException.java similarity index 87% rename from jvm/src/main/java/com/muchq/indexer/chessql/parser/ParseException.java rename to jvm/src/main/java/com/muchq/one_d4/chessql/parser/ParseException.java index 0b3b0dfc..67dcbad6 100644 --- a/jvm/src/main/java/com/muchq/indexer/chessql/parser/ParseException.java +++ b/jvm/src/main/java/com/muchq/one_d4/chessql/parser/ParseException.java @@ -1,4 +1,4 @@ -package com.muchq.indexer.chessql.parser; +package com.muchq.one_d4.chessql.parser; public class ParseException extends RuntimeException { private final int position; diff --git a/jvm/src/main/java/com/muchq/indexer/chessql/parser/Parser.java b/jvm/src/main/java/com/muchq/one_d4/chessql/parser/Parser.java similarity index 89% rename from jvm/src/main/java/com/muchq/indexer/chessql/parser/Parser.java rename to jvm/src/main/java/com/muchq/one_d4/chessql/parser/Parser.java index 7673894c..45713783 100644 --- a/jvm/src/main/java/com/muchq/indexer/chessql/parser/Parser.java +++ b/jvm/src/main/java/com/muchq/one_d4/chessql/parser/Parser.java @@ -1,15 +1,15 @@ -package com.muchq.indexer.chessql.parser; - -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.indexer.chessql.lexer.Lexer; -import com.muchq.indexer.chessql.lexer.Token; -import com.muchq.indexer.chessql.lexer.TokenType; +package com.muchq.one_d4.chessql.parser; + +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 com.muchq.one_d4.chessql.lexer.Lexer; +import com.muchq.one_d4.chessql.lexer.Token; +import com.muchq.one_d4.chessql.lexer.TokenType; import java.util.ArrayList; import java.util.List; diff --git a/jvm/src/main/java/com/muchq/indexer/db/BUILD.bazel b/jvm/src/main/java/com/muchq/one_d4/db/BUILD.bazel similarity index 88% rename from jvm/src/main/java/com/muchq/indexer/db/BUILD.bazel rename to jvm/src/main/java/com/muchq/one_d4/db/BUILD.bazel index 52d84ee2..74c4bd28 100644 --- a/jvm/src/main/java/com/muchq/indexer/db/BUILD.bazel +++ b/jvm/src/main/java/com/muchq/one_d4/db/BUILD.bazel @@ -12,7 +12,7 @@ java_library( ], visibility = ["//visibility:public"], deps = [ - "//jvm/src/main/java/com/muchq/indexer/chessql/compiler", + "//jvm/src/main/java/com/muchq/one_d4/chessql/compiler", "@maven//:com_h2database_h2", "@maven//:com_zaxxer_HikariCP", "@maven//:org_slf4j_slf4j_api", diff --git a/jvm/src/main/java/com/muchq/indexer/db/DataSourceFactory.java b/jvm/src/main/java/com/muchq/one_d4/db/DataSourceFactory.java similarity index 94% rename from jvm/src/main/java/com/muchq/indexer/db/DataSourceFactory.java rename to jvm/src/main/java/com/muchq/one_d4/db/DataSourceFactory.java index 7e758ac5..b70212d3 100644 --- a/jvm/src/main/java/com/muchq/indexer/db/DataSourceFactory.java +++ b/jvm/src/main/java/com/muchq/one_d4/db/DataSourceFactory.java @@ -1,4 +1,4 @@ -package com.muchq.indexer.db; +package com.muchq.one_d4.db; import com.zaxxer.hikari.HikariConfig; import com.zaxxer.hikari.HikariDataSource; diff --git a/jvm/src/main/java/com/muchq/indexer/db/GameFeatureDao.java b/jvm/src/main/java/com/muchq/one_d4/db/GameFeatureDao.java similarity index 98% rename from jvm/src/main/java/com/muchq/indexer/db/GameFeatureDao.java rename to jvm/src/main/java/com/muchq/one_d4/db/GameFeatureDao.java index ddde060b..7eadd4ea 100644 --- a/jvm/src/main/java/com/muchq/indexer/db/GameFeatureDao.java +++ b/jvm/src/main/java/com/muchq/one_d4/db/GameFeatureDao.java @@ -1,6 +1,6 @@ -package com.muchq.indexer.db; +package com.muchq.one_d4.db; -import com.muchq.indexer.chessql.compiler.CompiledQuery; +import com.muchq.one_d4.chessql.compiler.CompiledQuery; import org.slf4j.Logger; import org.slf4j.LoggerFactory; diff --git a/jvm/src/main/java/com/muchq/indexer/db/GameFeatureStore.java b/jvm/src/main/java/com/muchq/one_d4/db/GameFeatureStore.java similarity index 96% rename from jvm/src/main/java/com/muchq/indexer/db/GameFeatureStore.java rename to jvm/src/main/java/com/muchq/one_d4/db/GameFeatureStore.java index 3abd9768..207a0d22 100644 --- a/jvm/src/main/java/com/muchq/indexer/db/GameFeatureStore.java +++ b/jvm/src/main/java/com/muchq/one_d4/db/GameFeatureStore.java @@ -1,4 +1,4 @@ -package com.muchq.indexer.db; +package com.muchq.one_d4.db; import java.time.Instant; import java.util.List; diff --git a/jvm/src/main/java/com/muchq/indexer/db/IndexingRequestDao.java b/jvm/src/main/java/com/muchq/one_d4/db/IndexingRequestDao.java similarity index 99% rename from jvm/src/main/java/com/muchq/indexer/db/IndexingRequestDao.java rename to jvm/src/main/java/com/muchq/one_d4/db/IndexingRequestDao.java index aefa30ce..c474136c 100644 --- a/jvm/src/main/java/com/muchq/indexer/db/IndexingRequestDao.java +++ b/jvm/src/main/java/com/muchq/one_d4/db/IndexingRequestDao.java @@ -1,4 +1,4 @@ -package com.muchq.indexer.db; +package com.muchq.one_d4.db; import org.slf4j.Logger; import org.slf4j.LoggerFactory; diff --git a/jvm/src/main/java/com/muchq/indexer/db/IndexingRequestStore.java b/jvm/src/main/java/com/muchq/one_d4/db/IndexingRequestStore.java similarity index 95% rename from jvm/src/main/java/com/muchq/indexer/db/IndexingRequestStore.java rename to jvm/src/main/java/com/muchq/one_d4/db/IndexingRequestStore.java index 40af1a46..40433ba7 100644 --- a/jvm/src/main/java/com/muchq/indexer/db/IndexingRequestStore.java +++ b/jvm/src/main/java/com/muchq/one_d4/db/IndexingRequestStore.java @@ -1,4 +1,4 @@ -package com.muchq.indexer.db; +package com.muchq.one_d4.db; import java.time.Instant; import java.util.Optional; diff --git a/jvm/src/main/java/com/muchq/indexer/db/Migration.java b/jvm/src/main/java/com/muchq/one_d4/db/Migration.java similarity index 99% rename from jvm/src/main/java/com/muchq/indexer/db/Migration.java rename to jvm/src/main/java/com/muchq/one_d4/db/Migration.java index 0ac3a8d0..82897760 100644 --- a/jvm/src/main/java/com/muchq/indexer/db/Migration.java +++ b/jvm/src/main/java/com/muchq/one_d4/db/Migration.java @@ -1,4 +1,4 @@ -package com.muchq.indexer.db; +package com.muchq.one_d4.db; import org.slf4j.Logger; import org.slf4j.LoggerFactory; diff --git a/jvm/src/main/java/com/muchq/indexer/docs/API.md b/jvm/src/main/java/com/muchq/one_d4/docs/API.md similarity index 100% rename from jvm/src/main/java/com/muchq/indexer/docs/API.md rename to jvm/src/main/java/com/muchq/one_d4/docs/API.md diff --git a/jvm/src/main/java/com/muchq/indexer/docs/CHESSQL.md b/jvm/src/main/java/com/muchq/one_d4/docs/CHESSQL.md similarity index 100% rename from jvm/src/main/java/com/muchq/indexer/docs/CHESSQL.md rename to jvm/src/main/java/com/muchq/one_d4/docs/CHESSQL.md diff --git a/jvm/src/main/java/com/muchq/indexer/docs/DESIGN.md b/jvm/src/main/java/com/muchq/one_d4/docs/DESIGN.md similarity index 100% rename from jvm/src/main/java/com/muchq/indexer/docs/DESIGN.md rename to jvm/src/main/java/com/muchq/one_d4/docs/DESIGN.md diff --git a/jvm/src/main/java/com/muchq/indexer/docs/DOCDB_STORAGE.md b/jvm/src/main/java/com/muchq/one_d4/docs/DOCDB_STORAGE.md similarity index 100% rename from jvm/src/main/java/com/muchq/indexer/docs/DOCDB_STORAGE.md rename to jvm/src/main/java/com/muchq/one_d4/docs/DOCDB_STORAGE.md diff --git a/jvm/src/main/java/com/muchq/indexer/docs/IN_PROCESS_MODE.md b/jvm/src/main/java/com/muchq/one_d4/docs/IN_PROCESS_MODE.md similarity index 100% rename from jvm/src/main/java/com/muchq/indexer/docs/IN_PROCESS_MODE.md rename to jvm/src/main/java/com/muchq/one_d4/docs/IN_PROCESS_MODE.md diff --git a/jvm/src/main/java/com/muchq/indexer/docs/MCP_INTEGRATION.md b/jvm/src/main/java/com/muchq/one_d4/docs/MCP_INTEGRATION.md similarity index 100% rename from jvm/src/main/java/com/muchq/indexer/docs/MCP_INTEGRATION.md rename to jvm/src/main/java/com/muchq/one_d4/docs/MCP_INTEGRATION.md diff --git a/jvm/src/main/java/com/muchq/indexer/docs/ROADMAP.md b/jvm/src/main/java/com/muchq/one_d4/docs/ROADMAP.md similarity index 100% rename from jvm/src/main/java/com/muchq/indexer/docs/ROADMAP.md rename to jvm/src/main/java/com/muchq/one_d4/docs/ROADMAP.md diff --git a/jvm/src/main/java/com/muchq/indexer/engine/BUILD.bazel b/jvm/src/main/java/com/muchq/one_d4/engine/BUILD.bazel similarity index 74% rename from jvm/src/main/java/com/muchq/indexer/engine/BUILD.bazel rename to jvm/src/main/java/com/muchq/one_d4/engine/BUILD.bazel index 59884e97..6bc78e24 100644 --- a/jvm/src/main/java/com/muchq/indexer/engine/BUILD.bazel +++ b/jvm/src/main/java/com/muchq/one_d4/engine/BUILD.bazel @@ -9,8 +9,8 @@ java_library( ], visibility = ["//visibility:public"], deps = [ - "//jvm/src/main/java/com/muchq/indexer/engine/model", - "//jvm/src/main/java/com/muchq/indexer/motifs", + "//jvm/src/main/java/com/muchq/one_d4/engine/model", + "//jvm/src/main/java/com/muchq/one_d4/motifs", "@maven//:io_github_tors42_chariot", "@maven//:org_slf4j_slf4j_api", ], diff --git a/jvm/src/main/java/com/muchq/indexer/engine/FeatureExtractor.java b/jvm/src/main/java/com/muchq/one_d4/engine/FeatureExtractor.java similarity index 86% rename from jvm/src/main/java/com/muchq/indexer/engine/FeatureExtractor.java rename to jvm/src/main/java/com/muchq/one_d4/engine/FeatureExtractor.java index 552d376c..455855ac 100644 --- a/jvm/src/main/java/com/muchq/indexer/engine/FeatureExtractor.java +++ b/jvm/src/main/java/com/muchq/one_d4/engine/FeatureExtractor.java @@ -1,10 +1,10 @@ -package com.muchq.indexer.engine; +package com.muchq.one_d4.engine; -import com.muchq.indexer.engine.model.GameFeatures; -import com.muchq.indexer.engine.model.Motif; -import com.muchq.indexer.engine.model.ParsedGame; -import com.muchq.indexer.engine.model.PositionContext; -import com.muchq.indexer.motifs.MotifDetector; +import com.muchq.one_d4.engine.model.GameFeatures; +import com.muchq.one_d4.engine.model.Motif; +import com.muchq.one_d4.engine.model.ParsedGame; +import com.muchq.one_d4.engine.model.PositionContext; +import com.muchq.one_d4.motifs.MotifDetector; import org.slf4j.Logger; import org.slf4j.LoggerFactory; diff --git a/jvm/src/main/java/com/muchq/indexer/engine/GameReplayer.java b/jvm/src/main/java/com/muchq/one_d4/engine/GameReplayer.java similarity index 90% rename from jvm/src/main/java/com/muchq/indexer/engine/GameReplayer.java rename to jvm/src/main/java/com/muchq/one_d4/engine/GameReplayer.java index 52bf3102..12b78bd5 100644 --- a/jvm/src/main/java/com/muchq/indexer/engine/GameReplayer.java +++ b/jvm/src/main/java/com/muchq/one_d4/engine/GameReplayer.java @@ -1,7 +1,7 @@ -package com.muchq.indexer.engine; +package com.muchq.one_d4.engine; -import chariot.util.Board; -import com.muchq.indexer.engine.model.PositionContext; +import chariot.chess.Board; +import com.muchq.one_d4.engine.model.PositionContext; import java.util.ArrayList; import java.util.List; @@ -15,7 +15,7 @@ public class GameReplayer { public List replay(String moveText) { List positions = new ArrayList<>(); - Board board = Board.fromStandardPosition(); + Board board = Board.ofStandard(); positions.add(new PositionContext(0, board.toFEN(), true)); diff --git a/jvm/src/main/java/com/muchq/indexer/engine/PgnParser.java b/jvm/src/main/java/com/muchq/one_d4/engine/PgnParser.java similarity index 93% rename from jvm/src/main/java/com/muchq/indexer/engine/PgnParser.java rename to jvm/src/main/java/com/muchq/one_d4/engine/PgnParser.java index 3befb228..2955cf06 100644 --- a/jvm/src/main/java/com/muchq/indexer/engine/PgnParser.java +++ b/jvm/src/main/java/com/muchq/one_d4/engine/PgnParser.java @@ -1,6 +1,6 @@ -package com.muchq.indexer.engine; +package com.muchq.one_d4.engine; -import com.muchq.indexer.engine.model.ParsedGame; +import com.muchq.one_d4.engine.model.ParsedGame; import java.util.LinkedHashMap; import java.util.Map; diff --git a/jvm/src/main/java/com/muchq/indexer/engine/model/BUILD.bazel b/jvm/src/main/java/com/muchq/one_d4/engine/model/BUILD.bazel similarity index 100% rename from jvm/src/main/java/com/muchq/indexer/engine/model/BUILD.bazel rename to jvm/src/main/java/com/muchq/one_d4/engine/model/BUILD.bazel diff --git a/jvm/src/main/java/com/muchq/indexer/engine/model/GameFeatures.java b/jvm/src/main/java/com/muchq/one_d4/engine/model/GameFeatures.java similarity index 90% rename from jvm/src/main/java/com/muchq/indexer/engine/model/GameFeatures.java rename to jvm/src/main/java/com/muchq/one_d4/engine/model/GameFeatures.java index 2acf5077..ae446c25 100644 --- a/jvm/src/main/java/com/muchq/indexer/engine/model/GameFeatures.java +++ b/jvm/src/main/java/com/muchq/one_d4/engine/model/GameFeatures.java @@ -1,4 +1,4 @@ -package com.muchq.indexer.engine.model; +package com.muchq.one_d4.engine.model; import java.util.List; import java.util.Map; diff --git a/jvm/src/main/java/com/muchq/indexer/engine/model/Motif.java b/jvm/src/main/java/com/muchq/one_d4/engine/model/Motif.java similarity index 69% rename from jvm/src/main/java/com/muchq/indexer/engine/model/Motif.java rename to jvm/src/main/java/com/muchq/one_d4/engine/model/Motif.java index c21a876f..aafece56 100644 --- a/jvm/src/main/java/com/muchq/indexer/engine/model/Motif.java +++ b/jvm/src/main/java/com/muchq/one_d4/engine/model/Motif.java @@ -1,4 +1,4 @@ -package com.muchq.indexer.engine.model; +package com.muchq.one_d4.engine.model; public enum Motif { PIN, diff --git a/jvm/src/main/java/com/muchq/indexer/engine/model/ParsedGame.java b/jvm/src/main/java/com/muchq/one_d4/engine/model/ParsedGame.java similarity index 71% rename from jvm/src/main/java/com/muchq/indexer/engine/model/ParsedGame.java rename to jvm/src/main/java/com/muchq/one_d4/engine/model/ParsedGame.java index 66b4d4e9..93030b44 100644 --- a/jvm/src/main/java/com/muchq/indexer/engine/model/ParsedGame.java +++ b/jvm/src/main/java/com/muchq/one_d4/engine/model/ParsedGame.java @@ -1,4 +1,4 @@ -package com.muchq.indexer.engine.model; +package com.muchq.one_d4.engine.model; import java.util.Map; diff --git a/jvm/src/main/java/com/muchq/indexer/engine/model/PositionContext.java b/jvm/src/main/java/com/muchq/one_d4/engine/model/PositionContext.java similarity index 67% rename from jvm/src/main/java/com/muchq/indexer/engine/model/PositionContext.java rename to jvm/src/main/java/com/muchq/one_d4/engine/model/PositionContext.java index 481a070e..d3d02637 100644 --- a/jvm/src/main/java/com/muchq/indexer/engine/model/PositionContext.java +++ b/jvm/src/main/java/com/muchq/one_d4/engine/model/PositionContext.java @@ -1,4 +1,4 @@ -package com.muchq.indexer.engine.model; +package com.muchq.one_d4.engine.model; public record PositionContext(int moveNumber, String fen, boolean whiteToMove) { } diff --git a/jvm/src/main/java/com/muchq/indexer/motifs/BUILD.bazel b/jvm/src/main/java/com/muchq/one_d4/motifs/BUILD.bazel similarity index 87% rename from jvm/src/main/java/com/muchq/indexer/motifs/BUILD.bazel rename to jvm/src/main/java/com/muchq/one_d4/motifs/BUILD.bazel index 2362c116..7dff7e06 100644 --- a/jvm/src/main/java/com/muchq/indexer/motifs/BUILD.bazel +++ b/jvm/src/main/java/com/muchq/one_d4/motifs/BUILD.bazel @@ -12,7 +12,7 @@ java_library( ], visibility = ["//visibility:public"], deps = [ - "//jvm/src/main/java/com/muchq/indexer/engine/model", + "//jvm/src/main/java/com/muchq/one_d4/engine/model", "@maven//:io_github_tors42_chariot", ], ) diff --git a/jvm/src/main/java/com/muchq/indexer/motifs/CrossPinDetector.java b/jvm/src/main/java/com/muchq/one_d4/motifs/CrossPinDetector.java similarity index 95% rename from jvm/src/main/java/com/muchq/indexer/motifs/CrossPinDetector.java rename to jvm/src/main/java/com/muchq/one_d4/motifs/CrossPinDetector.java index 6d4d6204..d01f183d 100644 --- a/jvm/src/main/java/com/muchq/indexer/motifs/CrossPinDetector.java +++ b/jvm/src/main/java/com/muchq/one_d4/motifs/CrossPinDetector.java @@ -1,8 +1,8 @@ -package com.muchq.indexer.motifs; +package com.muchq.one_d4.motifs; -import com.muchq.indexer.engine.model.GameFeatures; -import com.muchq.indexer.engine.model.Motif; -import com.muchq.indexer.engine.model.PositionContext; +import com.muchq.one_d4.engine.model.GameFeatures; +import com.muchq.one_d4.engine.model.Motif; +import com.muchq.one_d4.engine.model.PositionContext; import java.util.ArrayList; import java.util.List; diff --git a/jvm/src/main/java/com/muchq/indexer/motifs/DiscoveredAttackDetector.java b/jvm/src/main/java/com/muchq/one_d4/motifs/DiscoveredAttackDetector.java similarity index 95% rename from jvm/src/main/java/com/muchq/indexer/motifs/DiscoveredAttackDetector.java rename to jvm/src/main/java/com/muchq/one_d4/motifs/DiscoveredAttackDetector.java index c7add08a..4d0c0273 100644 --- a/jvm/src/main/java/com/muchq/indexer/motifs/DiscoveredAttackDetector.java +++ b/jvm/src/main/java/com/muchq/one_d4/motifs/DiscoveredAttackDetector.java @@ -1,8 +1,8 @@ -package com.muchq.indexer.motifs; +package com.muchq.one_d4.motifs; -import com.muchq.indexer.engine.model.GameFeatures; -import com.muchq.indexer.engine.model.Motif; -import com.muchq.indexer.engine.model.PositionContext; +import com.muchq.one_d4.engine.model.GameFeatures; +import com.muchq.one_d4.engine.model.Motif; +import com.muchq.one_d4.engine.model.PositionContext; import java.util.ArrayList; import java.util.List; diff --git a/jvm/src/main/java/com/muchq/indexer/motifs/ForkDetector.java b/jvm/src/main/java/com/muchq/one_d4/motifs/ForkDetector.java similarity index 95% rename from jvm/src/main/java/com/muchq/indexer/motifs/ForkDetector.java rename to jvm/src/main/java/com/muchq/one_d4/motifs/ForkDetector.java index 4f936737..777a8426 100644 --- a/jvm/src/main/java/com/muchq/indexer/motifs/ForkDetector.java +++ b/jvm/src/main/java/com/muchq/one_d4/motifs/ForkDetector.java @@ -1,8 +1,8 @@ -package com.muchq.indexer.motifs; +package com.muchq.one_d4.motifs; -import com.muchq.indexer.engine.model.GameFeatures; -import com.muchq.indexer.engine.model.Motif; -import com.muchq.indexer.engine.model.PositionContext; +import com.muchq.one_d4.engine.model.GameFeatures; +import com.muchq.one_d4.engine.model.Motif; +import com.muchq.one_d4.engine.model.PositionContext; import java.util.ArrayList; import java.util.List; diff --git a/jvm/src/main/java/com/muchq/one_d4/motifs/MotifDetector.java b/jvm/src/main/java/com/muchq/one_d4/motifs/MotifDetector.java new file mode 100644 index 00000000..907f22c7 --- /dev/null +++ b/jvm/src/main/java/com/muchq/one_d4/motifs/MotifDetector.java @@ -0,0 +1,12 @@ +package com.muchq.one_d4.motifs; + +import com.muchq.one_d4.engine.model.GameFeatures; +import com.muchq.one_d4.engine.model.Motif; +import com.muchq.one_d4.engine.model.PositionContext; + +import java.util.List; + +public interface MotifDetector { + Motif motif(); + List detect(List positions); +} diff --git a/jvm/src/main/java/com/muchq/indexer/motifs/PinDetector.java b/jvm/src/main/java/com/muchq/one_d4/motifs/PinDetector.java similarity index 74% rename from jvm/src/main/java/com/muchq/indexer/motifs/PinDetector.java rename to jvm/src/main/java/com/muchq/one_d4/motifs/PinDetector.java index 9f82db1c..1ef55df1 100644 --- a/jvm/src/main/java/com/muchq/indexer/motifs/PinDetector.java +++ b/jvm/src/main/java/com/muchq/one_d4/motifs/PinDetector.java @@ -1,9 +1,8 @@ -package com.muchq.indexer.motifs; +package com.muchq.one_d4.motifs; -import chariot.util.Board; -import com.muchq.indexer.engine.model.GameFeatures; -import com.muchq.indexer.engine.model.Motif; -import com.muchq.indexer.engine.model.PositionContext; +import com.muchq.one_d4.engine.model.GameFeatures; +import com.muchq.one_d4.engine.model.Motif; +import com.muchq.one_d4.engine.model.PositionContext; import java.util.ArrayList; import java.util.List; @@ -20,12 +19,9 @@ public List detect(List positions List occurrences = new ArrayList<>(); for (PositionContext ctx : positions) { - Board board = Board.fromFEN(ctx.fen()); - // A pin exists when a sliding piece (bishop, rook, queen) attacks a piece - // that shields a more valuable piece behind it along the same line. - // We detect this by looking for pieces that have limited legal moves - // compared to their pseudo-legal moves due to being pinned to the king. - if (hasPinnedPiece(board, ctx.whiteToMove())) { + String fen = ctx.fen(); + String placement = fen.split(" ")[0]; + if (detectPinFromFen(placement, ctx.whiteToMove())) { occurrences.add(new GameFeatures.MotifOccurrence( ctx.moveNumber(), "Pin detected at move " + ctx.moveNumber())); } @@ -34,21 +30,6 @@ public List detect(List positions return occurrences; } - private boolean hasPinnedPiece(Board board, boolean whiteToMove) { - // Use chariot's legal move generation to detect pins: - // A piece is pinned if the number of legal moves is restricted. - // We compare legal moves count for each piece vs expected mobility. - // For simplicity, we detect pin by checking if any piece of the side to move - // has zero legal moves while not being blocked by friendly pieces alone. - String fen = board.toFEN(); - String[] parts = fen.split(" "); - String placement = parts[0]; - - // Simple heuristic: check if there's a piece on a line between an attacker - // and the king. This is a simplified detection. - return detectPinFromFen(placement, whiteToMove); - } - private boolean detectPinFromFen(String placement, boolean whiteToMove) { // Find king position and check for pieces on diagonals/files/ranks // between sliding attackers and the king. diff --git a/jvm/src/main/java/com/muchq/indexer/motifs/SkewerDetector.java b/jvm/src/main/java/com/muchq/one_d4/motifs/SkewerDetector.java similarity index 94% rename from jvm/src/main/java/com/muchq/indexer/motifs/SkewerDetector.java rename to jvm/src/main/java/com/muchq/one_d4/motifs/SkewerDetector.java index ae8c3038..99de7de2 100644 --- a/jvm/src/main/java/com/muchq/indexer/motifs/SkewerDetector.java +++ b/jvm/src/main/java/com/muchq/one_d4/motifs/SkewerDetector.java @@ -1,8 +1,8 @@ -package com.muchq.indexer.motifs; +package com.muchq.one_d4.motifs; -import com.muchq.indexer.engine.model.GameFeatures; -import com.muchq.indexer.engine.model.Motif; -import com.muchq.indexer.engine.model.PositionContext; +import com.muchq.one_d4.engine.model.GameFeatures; +import com.muchq.one_d4.engine.model.Motif; +import com.muchq.one_d4.engine.model.PositionContext; import java.util.ArrayList; import java.util.List; diff --git a/jvm/src/main/java/com/muchq/indexer/queue/BUILD.bazel b/jvm/src/main/java/com/muchq/one_d4/queue/BUILD.bazel similarity index 100% rename from jvm/src/main/java/com/muchq/indexer/queue/BUILD.bazel rename to jvm/src/main/java/com/muchq/one_d4/queue/BUILD.bazel diff --git a/jvm/src/main/java/com/muchq/indexer/queue/InMemoryIndexQueue.java b/jvm/src/main/java/com/muchq/one_d4/queue/InMemoryIndexQueue.java similarity index 96% rename from jvm/src/main/java/com/muchq/indexer/queue/InMemoryIndexQueue.java rename to jvm/src/main/java/com/muchq/one_d4/queue/InMemoryIndexQueue.java index 6b95cef4..2084f53d 100644 --- a/jvm/src/main/java/com/muchq/indexer/queue/InMemoryIndexQueue.java +++ b/jvm/src/main/java/com/muchq/one_d4/queue/InMemoryIndexQueue.java @@ -1,4 +1,4 @@ -package com.muchq.indexer.queue; +package com.muchq.one_d4.queue; import java.time.Duration; import java.util.Optional; diff --git a/jvm/src/main/java/com/muchq/indexer/queue/IndexMessage.java b/jvm/src/main/java/com/muchq/one_d4/queue/IndexMessage.java similarity index 80% rename from jvm/src/main/java/com/muchq/indexer/queue/IndexMessage.java rename to jvm/src/main/java/com/muchq/one_d4/queue/IndexMessage.java index 5a391e6c..30df8c66 100644 --- a/jvm/src/main/java/com/muchq/indexer/queue/IndexMessage.java +++ b/jvm/src/main/java/com/muchq/one_d4/queue/IndexMessage.java @@ -1,4 +1,4 @@ -package com.muchq.indexer.queue; +package com.muchq.one_d4.queue; import java.util.UUID; diff --git a/jvm/src/main/java/com/muchq/indexer/queue/IndexQueue.java b/jvm/src/main/java/com/muchq/one_d4/queue/IndexQueue.java similarity index 85% rename from jvm/src/main/java/com/muchq/indexer/queue/IndexQueue.java rename to jvm/src/main/java/com/muchq/one_d4/queue/IndexQueue.java index 028570e7..2a5b4618 100644 --- a/jvm/src/main/java/com/muchq/indexer/queue/IndexQueue.java +++ b/jvm/src/main/java/com/muchq/one_d4/queue/IndexQueue.java @@ -1,4 +1,4 @@ -package com.muchq.indexer.queue; +package com.muchq.one_d4.queue; import java.time.Duration; import java.util.Optional; diff --git a/jvm/src/main/java/com/muchq/indexer/worker/BUILD.bazel b/jvm/src/main/java/com/muchq/one_d4/worker/BUILD.bazel similarity index 75% rename from jvm/src/main/java/com/muchq/indexer/worker/BUILD.bazel rename to jvm/src/main/java/com/muchq/one_d4/worker/BUILD.bazel index 8bbe4612..a90123da 100644 --- a/jvm/src/main/java/com/muchq/indexer/worker/BUILD.bazel +++ b/jvm/src/main/java/com/muchq/one_d4/worker/BUILD.bazel @@ -10,10 +10,10 @@ java_library( visibility = ["//visibility:public"], deps = [ "//jvm/src/main/java/com/muchq/chess_com_api", - "//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/queue", + "//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/queue", "@maven//:com_fasterxml_jackson_core_jackson_core", "@maven//:com_fasterxml_jackson_core_jackson_databind", "@maven//:io_micronaut_micronaut_context", diff --git a/jvm/src/main/java/com/muchq/indexer/worker/IndexWorker.java b/jvm/src/main/java/com/muchq/one_d4/worker/IndexWorker.java similarity index 94% rename from jvm/src/main/java/com/muchq/indexer/worker/IndexWorker.java rename to jvm/src/main/java/com/muchq/one_d4/worker/IndexWorker.java index 98e712f2..91d0ca4a 100644 --- a/jvm/src/main/java/com/muchq/indexer/worker/IndexWorker.java +++ b/jvm/src/main/java/com/muchq/one_d4/worker/IndexWorker.java @@ -1,16 +1,16 @@ -package com.muchq.indexer.worker; +package com.muchq.one_d4.worker; import com.fasterxml.jackson.core.JsonProcessingException; import com.fasterxml.jackson.databind.ObjectMapper; import com.muchq.chess_com_api.ChessClient; import com.muchq.chess_com_api.GamesResponse; import com.muchq.chess_com_api.PlayedGame; -import com.muchq.indexer.db.GameFeatureStore; -import com.muchq.indexer.db.IndexingRequestStore; -import com.muchq.indexer.engine.FeatureExtractor; -import com.muchq.indexer.engine.model.GameFeatures; -import com.muchq.indexer.engine.model.Motif; -import com.muchq.indexer.queue.IndexMessage; +import com.muchq.one_d4.db.GameFeatureStore; +import com.muchq.one_d4.db.IndexingRequestStore; +import com.muchq.one_d4.engine.FeatureExtractor; +import com.muchq.one_d4.engine.model.GameFeatures; +import com.muchq.one_d4.engine.model.Motif; +import com.muchq.one_d4.queue.IndexMessage; import org.slf4j.Logger; import org.slf4j.LoggerFactory; diff --git a/jvm/src/main/java/com/muchq/indexer/worker/IndexWorkerLifecycle.java b/jvm/src/main/java/com/muchq/one_d4/worker/IndexWorkerLifecycle.java similarity index 91% rename from jvm/src/main/java/com/muchq/indexer/worker/IndexWorkerLifecycle.java rename to jvm/src/main/java/com/muchq/one_d4/worker/IndexWorkerLifecycle.java index de6a57a6..c1fbf4c4 100644 --- a/jvm/src/main/java/com/muchq/indexer/worker/IndexWorkerLifecycle.java +++ b/jvm/src/main/java/com/muchq/one_d4/worker/IndexWorkerLifecycle.java @@ -1,7 +1,7 @@ -package com.muchq.indexer.worker; +package com.muchq.one_d4.worker; -import com.muchq.indexer.queue.IndexMessage; -import com.muchq.indexer.queue.IndexQueue; +import com.muchq.one_d4.queue.IndexMessage; +import com.muchq.one_d4.queue.IndexQueue; import io.micronaut.context.event.ApplicationEventListener; import io.micronaut.runtime.server.event.ServerStartupEvent; import org.slf4j.Logger; diff --git a/jvm/src/main/java/com/muchq/indexer/worker/ResultMapper.java b/jvm/src/main/java/com/muchq/one_d4/worker/ResultMapper.java similarity index 98% rename from jvm/src/main/java/com/muchq/indexer/worker/ResultMapper.java rename to jvm/src/main/java/com/muchq/one_d4/worker/ResultMapper.java index c9e981b5..1ca276f0 100644 --- a/jvm/src/main/java/com/muchq/indexer/worker/ResultMapper.java +++ b/jvm/src/main/java/com/muchq/one_d4/worker/ResultMapper.java @@ -1,4 +1,4 @@ -package com.muchq.indexer.worker; +package com.muchq.one_d4.worker; /** * Maps chess.com API result values to standard chess notation. diff --git a/jvm/src/test/java/com/muchq/indexer/chessql/compiler/BUILD.bazel b/jvm/src/test/java/com/muchq/one_d4/chessql/compiler/BUILD.bazel similarity index 57% rename from jvm/src/test/java/com/muchq/indexer/chessql/compiler/BUILD.bazel rename to jvm/src/test/java/com/muchq/one_d4/chessql/compiler/BUILD.bazel index 71a51dac..08f9357b 100644 --- a/jvm/src/test/java/com/muchq/indexer/chessql/compiler/BUILD.bazel +++ b/jvm/src/test/java/com/muchq/one_d4/chessql/compiler/BUILD.bazel @@ -5,9 +5,9 @@ java_test_suite( size = "small", srcs = ["SqlCompilerTest.java"], deps = [ - "//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/one_d4/chessql/ast", + "//jvm/src/main/java/com/muchq/one_d4/chessql/compiler", + "//jvm/src/main/java/com/muchq/one_d4/chessql/parser", "@maven//:junit_junit", "@maven//:org_assertj_assertj_core", ], diff --git a/jvm/src/test/java/com/muchq/indexer/chessql/compiler/SqlCompilerTest.java b/jvm/src/test/java/com/muchq/one_d4/chessql/compiler/SqlCompilerTest.java similarity index 96% rename from jvm/src/test/java/com/muchq/indexer/chessql/compiler/SqlCompilerTest.java rename to jvm/src/test/java/com/muchq/one_d4/chessql/compiler/SqlCompilerTest.java index 6e8861cf..8770f0fc 100644 --- a/jvm/src/test/java/com/muchq/indexer/chessql/compiler/SqlCompilerTest.java +++ b/jvm/src/test/java/com/muchq/one_d4/chessql/compiler/SqlCompilerTest.java @@ -1,7 +1,7 @@ -package com.muchq.indexer.chessql.compiler; +package com.muchq.one_d4.chessql.compiler; -import com.muchq.indexer.chessql.ast.Expr; -import com.muchq.indexer.chessql.parser.Parser; +import com.muchq.one_d4.chessql.ast.Expr; +import com.muchq.one_d4.chessql.parser.Parser; import org.junit.Test; import java.util.List; diff --git a/jvm/src/test/java/com/muchq/indexer/chessql/lexer/BUILD.bazel b/jvm/src/test/java/com/muchq/one_d4/chessql/lexer/BUILD.bazel similarity index 79% rename from jvm/src/test/java/com/muchq/indexer/chessql/lexer/BUILD.bazel rename to jvm/src/test/java/com/muchq/one_d4/chessql/lexer/BUILD.bazel index 1f772d98..3f0e211c 100644 --- a/jvm/src/test/java/com/muchq/indexer/chessql/lexer/BUILD.bazel +++ b/jvm/src/test/java/com/muchq/one_d4/chessql/lexer/BUILD.bazel @@ -5,7 +5,7 @@ java_test_suite( size = "small", srcs = ["LexerTest.java"], deps = [ - "//jvm/src/main/java/com/muchq/indexer/chessql/lexer", + "//jvm/src/main/java/com/muchq/one_d4/chessql/lexer", "@maven//:junit_junit", "@maven//:org_assertj_assertj_core", ], diff --git a/jvm/src/test/java/com/muchq/indexer/chessql/lexer/LexerTest.java b/jvm/src/test/java/com/muchq/one_d4/chessql/lexer/LexerTest.java similarity index 98% rename from jvm/src/test/java/com/muchq/indexer/chessql/lexer/LexerTest.java rename to jvm/src/test/java/com/muchq/one_d4/chessql/lexer/LexerTest.java index f9e590ef..82c58086 100644 --- a/jvm/src/test/java/com/muchq/indexer/chessql/lexer/LexerTest.java +++ b/jvm/src/test/java/com/muchq/one_d4/chessql/lexer/LexerTest.java @@ -1,4 +1,4 @@ -package com.muchq.indexer.chessql.lexer; +package com.muchq.one_d4.chessql.lexer; import org.junit.Test; diff --git a/jvm/src/test/java/com/muchq/indexer/chessql/parser/BUILD.bazel b/jvm/src/test/java/com/muchq/one_d4/chessql/parser/BUILD.bazel similarity index 66% rename from jvm/src/test/java/com/muchq/indexer/chessql/parser/BUILD.bazel rename to jvm/src/test/java/com/muchq/one_d4/chessql/parser/BUILD.bazel index 41baa9dc..070e4031 100644 --- a/jvm/src/test/java/com/muchq/indexer/chessql/parser/BUILD.bazel +++ b/jvm/src/test/java/com/muchq/one_d4/chessql/parser/BUILD.bazel @@ -5,8 +5,8 @@ java_test_suite( size = "small", srcs = ["ParserTest.java"], deps = [ - "//jvm/src/main/java/com/muchq/indexer/chessql/ast", - "//jvm/src/main/java/com/muchq/indexer/chessql/parser", + "//jvm/src/main/java/com/muchq/one_d4/chessql/ast", + "//jvm/src/main/java/com/muchq/one_d4/chessql/parser", "@maven//:junit_junit", "@maven//:org_assertj_assertj_core", ], diff --git a/jvm/src/test/java/com/muchq/indexer/chessql/parser/ParserTest.java b/jvm/src/test/java/com/muchq/one_d4/chessql/parser/ParserTest.java similarity index 91% rename from jvm/src/test/java/com/muchq/indexer/chessql/parser/ParserTest.java rename to jvm/src/test/java/com/muchq/one_d4/chessql/parser/ParserTest.java index ef627cf2..17850c38 100644 --- a/jvm/src/test/java/com/muchq/indexer/chessql/parser/ParserTest.java +++ b/jvm/src/test/java/com/muchq/one_d4/chessql/parser/ParserTest.java @@ -1,12 +1,12 @@ -package com.muchq.indexer.chessql.parser; - -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; +package com.muchq.one_d4.chessql.parser; + +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 org.junit.Test; import java.util.List; diff --git a/jvm/src/test/java/com/muchq/indexer/engine/BUILD.bazel b/jvm/src/test/java/com/muchq/one_d4/engine/BUILD.bazel similarity index 52% rename from jvm/src/test/java/com/muchq/indexer/engine/BUILD.bazel rename to jvm/src/test/java/com/muchq/one_d4/engine/BUILD.bazel index efdaf427..fcd382e2 100644 --- a/jvm/src/test/java/com/muchq/indexer/engine/BUILD.bazel +++ b/jvm/src/test/java/com/muchq/one_d4/engine/BUILD.bazel @@ -3,10 +3,13 @@ load("@contrib_rules_jvm//java:defs.bzl", "java_test_suite") java_test_suite( name = "engine", size = "small", - srcs = ["PgnParserTest.java"], + srcs = [ + "GameReplayerTest.java", + "PgnParserTest.java", + ], deps = [ - "//jvm/src/main/java/com/muchq/indexer/engine", - "//jvm/src/main/java/com/muchq/indexer/engine/model", + "//jvm/src/main/java/com/muchq/one_d4/engine", + "//jvm/src/main/java/com/muchq/one_d4/engine/model", "@maven//:junit_junit", "@maven//:org_assertj_assertj_core", ], diff --git a/jvm/src/test/java/com/muchq/one_d4/engine/GameReplayerTest.java b/jvm/src/test/java/com/muchq/one_d4/engine/GameReplayerTest.java new file mode 100644 index 00000000..cff44475 --- /dev/null +++ b/jvm/src/test/java/com/muchq/one_d4/engine/GameReplayerTest.java @@ -0,0 +1,188 @@ +package com.muchq.one_d4.engine; + +import com.muchq.one_d4.engine.model.PositionContext; +import org.junit.Test; + +import java.util.List; + +import static org.assertj.core.api.Assertions.assertThat; + +public class GameReplayerTest { + + private final GameReplayer replayer = new GameReplayer(); + + @Test + public void testEmptyMoveText() { + List positions = replayer.replay(""); + + assertThat(positions).hasSize(1); + assertThat(positions.get(0).moveNumber()).isEqualTo(0); + assertThat(positions.get(0).whiteToMove()).isTrue(); + assertThat(positions.get(0).fen()).startsWith("rnbqkbnr/pppppppp/8/8/8/8/PPPPPPPP/RNBQKBNR"); + } + + @Test + public void testSingleMove() { + List positions = replayer.replay("1. e4"); + + assertThat(positions).hasSize(2); + + // Initial position + assertThat(positions.get(0).moveNumber()).isEqualTo(0); + assertThat(positions.get(0).whiteToMove()).isTrue(); + + // After 1. e4 + assertThat(positions.get(1).moveNumber()).isEqualTo(1); + assertThat(positions.get(1).whiteToMove()).isFalse(); + assertThat(positions.get(1).fen()).contains("PPPP1PPP"); // pawn moved from e2 + } + + @Test + public void testOpeningMoves() { + List positions = replayer.replay("1. e4 e5 2. Nf3 Nc6 3. Bb5"); + + assertThat(positions).hasSize(6); // initial + 5 moves + + // After 1. e4 - move 1, black to move + assertThat(positions.get(1).moveNumber()).isEqualTo(1); + assertThat(positions.get(1).whiteToMove()).isFalse(); + + // After 1... e5 - move 2 (incremented after black moves), white to move + assertThat(positions.get(2).moveNumber()).isEqualTo(2); + assertThat(positions.get(2).whiteToMove()).isTrue(); + + // After 2. Nf3 - still move 2, black to move + assertThat(positions.get(3).moveNumber()).isEqualTo(2); + assertThat(positions.get(3).whiteToMove()).isFalse(); + + // After 3. Bb5 (Ruy Lopez) - move 3, black to move + assertThat(positions.get(5).moveNumber()).isEqualTo(3); + assertThat(positions.get(5).whiteToMove()).isFalse(); + assertThat(positions.get(5).fen()).contains("B"); // bishop on b5 + } + + @Test + public void testCastlingKingside() { + List positions = replayer.replay("1. e4 e5 2. Nf3 Nc6 3. Bc4 Bc5 4. O-O"); + + PositionContext afterCastle = positions.get(positions.size() - 1); + // After O-O, king should be on g1 and rook on f1 + // FEN back rank: RNBQ1RK1 (Rook a1, Knight b1, Bishop c1, Queen d1, empty e1, Rook f1, King g1, empty h1) + assertThat(afterCastle.fen()).contains("1RK1 "); // king on g1, rook on f1, h1 empty + } + + @Test + public void testCastlingQueenside() { + List positions = replayer.replay( + "1. d4 d5 2. c4 e6 3. Nc3 Nf6 4. Bg5 Be7 5. e3 O-O 6. Nf3 Nbd7 7. Qc2 c6 8. O-O-O"); + + PositionContext afterCastle = positions.get(positions.size() - 1); + // After O-O-O, white king on c1, rook on d1 + assertThat(afterCastle.fen()).contains("2KR"); // king on c1, rook on d1 + } + + @Test + public void testCapture() { + List positions = replayer.replay("1. e4 d5 2. exd5"); + + PositionContext afterCapture = positions.get(positions.size() - 1); + assertThat(afterCapture.fen()).contains("3P4"); // pawn now on d5 + } + + @Test + public void testPromotion() { + // Simplified position where pawn promotes + List positions = replayer.replay( + "1. e4 d5 2. e5 d4 3. e6 d3 4. exf7+ Kd7 5. fxg8=Q"); + + PositionContext afterPromotion = positions.get(positions.size() - 1); + assertThat(afterPromotion.fen()).contains("Q"); // promoted queen + } + + @Test + public void testCheckNotation() { + List positions = replayer.replay("1. e4 e5 2. Qh5 Nc6 3. Bc4 Nf6 4. Qxf7+"); + + // Should handle + notation without issue + assertThat(positions).hasSize(8); + } + + @Test + public void testCheckmateNotation() { + // Scholar's mate + List positions = replayer.replay("1. e4 e5 2. Qh5 Nc6 3. Bc4 Nf6 4. Qxf7#"); + + assertThat(positions).hasSize(8); + // The move with # should be processed correctly + PositionContext finalPos = positions.get(positions.size() - 1); + assertThat(finalPos.moveNumber()).isEqualTo(4); + } + + @Test + public void testStripsComments() { + List positions = replayer.replay( + "1. e4 {Best by test} e5 {Solid reply} 2. Nf3"); + + assertThat(positions).hasSize(4); // initial + 3 moves + } + + @Test + public void testStripsVariations() { + List positions = replayer.replay( + "1. e4 e5 (1... c5 2. Nf3) 2. Nf3"); + + assertThat(positions).hasSize(4); // initial + 3 moves (variation excluded) + } + + @Test + public void testStripsNagAnnotations() { + List positions = replayer.replay( + "1. e4 $1 e5 $2 2. Nf3 $10"); + + assertThat(positions).hasSize(4); + } + + @Test + public void testIgnoresResultIndicator() { + List positions = replayer.replay("1. e4 e5 2. Nf3 Nc6 1-0"); + + assertThat(positions).hasSize(5); // initial + 4 moves, not including result + } + + @Test + public void testMoveNumbersWithoutSpaces() { + List positions = replayer.replay("1.e4 e5 2.Nf3 Nc6"); + + assertThat(positions).hasSize(5); + } + + @Test + public void testPawnMoveWithoutPieceIndicator() { + List positions = replayer.replay("1. d4 d5 2. c4 e6"); + + assertThat(positions).hasSize(5); + // Verify pawns moved correctly + PositionContext afterD4 = positions.get(1); + assertThat(afterD4.fen()).contains("3P4"); // d4 pawn + } + + @Test + public void testAmbiguousMoveWithFile() { + // Position where two knights can go to same square + List positions = replayer.replay( + "1. e4 e5 2. Nf3 Nc6 3. Nc3 Nf6 4. Nd5 Nxd5 5. exd5 Nd4 6. Nxd4"); + + assertThat(positions).hasSize(12); + } + + @Test + public void testAmbiguousMoveWithRank() { + // Simpler test for rank disambiguation - two rooks can move to same square + // After Rae1 and Rfe1 type moves + List positions = replayer.replay( + "1. e4 e5 2. Nf3 Nc6 3. Bb5 a6 4. Ba4 Nf6 5. O-O Be7 6. Re1 b5 7. Bb3 d6 8. c3 O-O"); + + // Should handle the game without errors + assertThat(positions).hasSize(17); // initial + 16 half-moves + } +} diff --git a/jvm/src/test/java/com/muchq/indexer/engine/PgnParserTest.java b/jvm/src/test/java/com/muchq/one_d4/engine/PgnParserTest.java similarity index 95% rename from jvm/src/test/java/com/muchq/indexer/engine/PgnParserTest.java rename to jvm/src/test/java/com/muchq/one_d4/engine/PgnParserTest.java index 0f860409..f38f3e23 100644 --- a/jvm/src/test/java/com/muchq/indexer/engine/PgnParserTest.java +++ b/jvm/src/test/java/com/muchq/one_d4/engine/PgnParserTest.java @@ -1,6 +1,6 @@ -package com.muchq.indexer.engine; +package com.muchq.one_d4.engine; -import com.muchq.indexer.engine.model.ParsedGame; +import com.muchq.one_d4.engine.model.ParsedGame; import org.junit.Test; import static org.assertj.core.api.Assertions.assertThat; diff --git a/jvm/src/test/java/com/muchq/indexer/motifs/BUILD.bazel b/jvm/src/test/java/com/muchq/one_d4/motifs/BUILD.bazel similarity index 74% rename from jvm/src/test/java/com/muchq/indexer/motifs/BUILD.bazel rename to jvm/src/test/java/com/muchq/one_d4/motifs/BUILD.bazel index 9c3f859f..5a34361a 100644 --- a/jvm/src/test/java/com/muchq/indexer/motifs/BUILD.bazel +++ b/jvm/src/test/java/com/muchq/one_d4/motifs/BUILD.bazel @@ -9,8 +9,8 @@ java_test_suite( "SkewerDetectorTest.java", ], deps = [ - "//jvm/src/main/java/com/muchq/indexer/engine/model", - "//jvm/src/main/java/com/muchq/indexer/motifs", + "//jvm/src/main/java/com/muchq/one_d4/engine/model", + "//jvm/src/main/java/com/muchq/one_d4/motifs", "@maven//:junit_junit", "@maven//:org_assertj_assertj_core", ], diff --git a/jvm/src/test/java/com/muchq/indexer/motifs/ForkDetectorTest.java b/jvm/src/test/java/com/muchq/one_d4/motifs/ForkDetectorTest.java similarity index 97% rename from jvm/src/test/java/com/muchq/indexer/motifs/ForkDetectorTest.java rename to jvm/src/test/java/com/muchq/one_d4/motifs/ForkDetectorTest.java index 5714df75..b807f38f 100644 --- a/jvm/src/test/java/com/muchq/indexer/motifs/ForkDetectorTest.java +++ b/jvm/src/test/java/com/muchq/one_d4/motifs/ForkDetectorTest.java @@ -1,8 +1,8 @@ -package com.muchq.indexer.motifs; +package com.muchq.one_d4.motifs; -import com.muchq.indexer.engine.model.GameFeatures; -import com.muchq.indexer.engine.model.Motif; -import com.muchq.indexer.engine.model.PositionContext; +import com.muchq.one_d4.engine.model.GameFeatures; +import com.muchq.one_d4.engine.model.Motif; +import com.muchq.one_d4.engine.model.PositionContext; import org.junit.Test; import java.util.List; diff --git a/jvm/src/test/java/com/muchq/indexer/motifs/PinDetectorTest.java b/jvm/src/test/java/com/muchq/one_d4/motifs/PinDetectorTest.java similarity index 97% rename from jvm/src/test/java/com/muchq/indexer/motifs/PinDetectorTest.java rename to jvm/src/test/java/com/muchq/one_d4/motifs/PinDetectorTest.java index 73dc4854..6e7b6f86 100644 --- a/jvm/src/test/java/com/muchq/indexer/motifs/PinDetectorTest.java +++ b/jvm/src/test/java/com/muchq/one_d4/motifs/PinDetectorTest.java @@ -1,8 +1,8 @@ -package com.muchq.indexer.motifs; +package com.muchq.one_d4.motifs; -import com.muchq.indexer.engine.model.GameFeatures; -import com.muchq.indexer.engine.model.Motif; -import com.muchq.indexer.engine.model.PositionContext; +import com.muchq.one_d4.engine.model.GameFeatures; +import com.muchq.one_d4.engine.model.Motif; +import com.muchq.one_d4.engine.model.PositionContext; import org.junit.Test; import java.util.List; diff --git a/jvm/src/test/java/com/muchq/indexer/motifs/SkewerDetectorTest.java b/jvm/src/test/java/com/muchq/one_d4/motifs/SkewerDetectorTest.java similarity index 97% rename from jvm/src/test/java/com/muchq/indexer/motifs/SkewerDetectorTest.java rename to jvm/src/test/java/com/muchq/one_d4/motifs/SkewerDetectorTest.java index a9163180..fdd5ed50 100644 --- a/jvm/src/test/java/com/muchq/indexer/motifs/SkewerDetectorTest.java +++ b/jvm/src/test/java/com/muchq/one_d4/motifs/SkewerDetectorTest.java @@ -1,8 +1,8 @@ -package com.muchq.indexer.motifs; +package com.muchq.one_d4.motifs; -import com.muchq.indexer.engine.model.GameFeatures; -import com.muchq.indexer.engine.model.Motif; -import com.muchq.indexer.engine.model.PositionContext; +import com.muchq.one_d4.engine.model.GameFeatures; +import com.muchq.one_d4.engine.model.Motif; +import com.muchq.one_d4.engine.model.PositionContext; import org.junit.Test; import java.util.List; diff --git a/jvm/src/test/java/com/muchq/indexer/queue/BUILD.bazel b/jvm/src/test/java/com/muchq/one_d4/queue/BUILD.bazel similarity index 82% rename from jvm/src/test/java/com/muchq/indexer/queue/BUILD.bazel rename to jvm/src/test/java/com/muchq/one_d4/queue/BUILD.bazel index cada7e43..b04127cb 100644 --- a/jvm/src/test/java/com/muchq/indexer/queue/BUILD.bazel +++ b/jvm/src/test/java/com/muchq/one_d4/queue/BUILD.bazel @@ -5,7 +5,7 @@ java_test_suite( size = "small", srcs = ["InMemoryIndexQueueTest.java"], deps = [ - "//jvm/src/main/java/com/muchq/indexer/queue", + "//jvm/src/main/java/com/muchq/one_d4/queue", "@maven//:junit_junit", "@maven//:org_assertj_assertj_core", ], diff --git a/jvm/src/test/java/com/muchq/indexer/queue/InMemoryIndexQueueTest.java b/jvm/src/test/java/com/muchq/one_d4/queue/InMemoryIndexQueueTest.java similarity index 97% rename from jvm/src/test/java/com/muchq/indexer/queue/InMemoryIndexQueueTest.java rename to jvm/src/test/java/com/muchq/one_d4/queue/InMemoryIndexQueueTest.java index e7e26ddf..ec24bbbc 100644 --- a/jvm/src/test/java/com/muchq/indexer/queue/InMemoryIndexQueueTest.java +++ b/jvm/src/test/java/com/muchq/one_d4/queue/InMemoryIndexQueueTest.java @@ -1,4 +1,4 @@ -package com.muchq.indexer.queue; +package com.muchq.one_d4.queue; import org.junit.Test; diff --git a/jvm/src/test/java/com/muchq/indexer/worker/BUILD.bazel b/jvm/src/test/java/com/muchq/one_d4/worker/BUILD.bazel similarity index 82% rename from jvm/src/test/java/com/muchq/indexer/worker/BUILD.bazel rename to jvm/src/test/java/com/muchq/one_d4/worker/BUILD.bazel index 1c8f94b2..9d4841ae 100644 --- a/jvm/src/test/java/com/muchq/indexer/worker/BUILD.bazel +++ b/jvm/src/test/java/com/muchq/one_d4/worker/BUILD.bazel @@ -5,7 +5,7 @@ java_test_suite( size = "small", srcs = ["ResultMapperTest.java"], deps = [ - "//jvm/src/main/java/com/muchq/indexer/worker", + "//jvm/src/main/java/com/muchq/one_d4/worker", "@maven//:junit_junit", "@maven//:org_assertj_assertj_core", ], diff --git a/jvm/src/test/java/com/muchq/indexer/worker/ResultMapperTest.java b/jvm/src/test/java/com/muchq/one_d4/worker/ResultMapperTest.java similarity index 99% rename from jvm/src/test/java/com/muchq/indexer/worker/ResultMapperTest.java rename to jvm/src/test/java/com/muchq/one_d4/worker/ResultMapperTest.java index 8383dc1e..82148283 100644 --- a/jvm/src/test/java/com/muchq/indexer/worker/ResultMapperTest.java +++ b/jvm/src/test/java/com/muchq/one_d4/worker/ResultMapperTest.java @@ -1,4 +1,4 @@ -package com.muchq.indexer.worker; +package com.muchq.one_d4.worker; import org.junit.Test; diff --git a/maven_install.json b/maven_install.json index ff161019..fc8b848e 100755 --- a/maven_install.json +++ b/maven_install.json @@ -1,7 +1,7 @@ { "__AUTOGENERATED_FILE_DO_NOT_MODIFY_THIS_FILE_MANUALLY": "THERE_IS_NO_DATA_ONLY_ZUUL", - "__INPUT_ARTIFACTS_HASH": -82233566, - "__RESOLVED_ARTIFACTS_HASH": 1853180561, + "__INPUT_ARTIFACTS_HASH": 1342741431, + "__RESOLVED_ARTIFACTS_HASH": 922105334, "conflict_resolution": { "com.fasterxml.jackson.core:jackson-annotations": "com.fasterxml.jackson.core:jackson-annotations:2.19.2", "com.fasterxml.jackson.core:jackson-core": "com.fasterxml.jackson.core:jackson-core:2.19.2", @@ -139,9 +139,9 @@ }, "com.h2database:h2": { "shasums": { - "jar": "b9d8f19358ada82a4f6eb5b174c6cfe320a375b5a9cb5a4fe456d623e6e55497" + "jar": "29b70e427cc1c40cdc376283adbb0cc62853073797bb5fe5761f81fe73d57ce0" }, - "version": "2.2.224" + "version": "2.4.240" }, "com.thoughtworks.paranamer:paranamer": { "shasums": { @@ -157,9 +157,9 @@ }, "io.github.tors42:chariot": { "shasums": { - "jar": "1479fa9edc5bb61dab644e70ba5c1552044d09c3f7ae48e6c6d6ed0cbbbfa828" + "jar": "e80ca3c2482e39a6dab5f12807e1d9afc669409f4a9a0a70f59bc71b65875280" }, - "version": "0.1.10" + "version": "0.2.6" }, "io.micronaut.jaxrs:micronaut-jaxrs-common": { "shasums": { @@ -445,15 +445,15 @@ }, "io.sentry:sentry": { "shasums": { - "jar": "f841a0d5e1500b130f38cbab803e897cebe3f639e4ed2f0cd1ae98872b36e0ae" + "jar": "bf4feb94944d03cc12e6d64ac8827d2328e3992744a3ce836f3f561e2c896209" }, - "version": "8.30.0" + "version": "8.31.0" }, "io.sentry:sentry-logback": { "shasums": { - "jar": "e7f056a54b3c90724d91b3558c539894e81dd4eaf9ca04a4b4b295168e4a437c" + "jar": "b5b22d31b53fdc24bf8843a6d7d609a68c4c8277990c276ccf73fa0fdbcc0da2" }, - "version": "8.30.0" + "version": "8.31.0" }, "jakarta.annotation:jakarta.annotation-api": { "shasums": { @@ -487,21 +487,21 @@ }, "net.bytebuddy:byte-buddy": { "shasums": { - "jar": "3575dcb8a98faf943d3c1595c47a16047c4fce8a83ebbb26262f1a2f67546357" + "jar": "d78396e3c5bce3f2865c9186647481e5589d34cacc632484715b686108d17c66" }, - "version": "1.17.7" + "version": "1.18.3" }, "org.assertj:assertj-core": { "shasums": { - "jar": "b27872b049abc88e23c853ce5917945dd57d43bd31175d852e3941d2a6fd0231" + "jar": "c4a445426c3c2861666863b842cc4ec7bbb1c4226fefd370b6d2fe83d6c4ff0f" }, - "version": "3.27.6" + "version": "3.27.7" }, "org.checkerframework:checker-qual": { "shasums": { - "jar": "13b3b6c9261d35886a297adae438d6606581acc1bf7c901402dd9963f2b6a690" + "jar": "0b5bb1a4bdc4e4b1217482fe598efcaab4e1fba7b37f9412639178fc8116fc05" }, - "version": "3.49.4" + "version": "3.52.0" }, "org.eclipse.jetty.toolchain:jetty-jakarta-servlet-api": { "shasums": { @@ -637,9 +637,9 @@ }, "org.postgresql:postgresql": { "shasums": { - "jar": "188976721ead8e8627eb6d8389d500dccc0c9bebd885268a3047180274a6031e" + "jar": "88f1fc3992e80ec3b048f798030e9a014aa4783c40afb56d3e7a87ee0adf166f" }, - "version": "42.7.4" + "version": "42.7.9" }, "org.reactivestreams:reactive-streams": { "shasums": { @@ -1410,8 +1410,11 @@ "io.github.tors42:chariot": [ "chariot", "chariot.api", + "chariot.chess", "chariot.internal", + "chariot.internal.chess", "chariot.internal.impl", + "chariot.internal.model", "chariot.internal.modeladapter", "chariot.internal.yayson", "chariot.model", @@ -1988,6 +1991,7 @@ "net.bytebuddy.description.field", "net.bytebuddy.description.method", "net.bytebuddy.description.modifier", + "net.bytebuddy.description.module", "net.bytebuddy.description.type", "net.bytebuddy.dynamic", "net.bytebuddy.dynamic.loading",