Merged in feature/postprocessing (pull request #114)

Feature/postprocessing

* tests

* passtest

* fixshorttests

* mosttests

* improvingbasedockerfile

* testspeeds

* testing

* host

* canparallel

* clean

* passfullsuite

* singlepagemax

* test

* findfeatures

* findstables

* tbls

* tablestoo

* tablestoo

* lateraltests

* tableloc

* cleanup

* inlinetable

* childids

* cleanup

* tests
This commit is contained in:
Michael McGuinness
2025-04-22 14:40:16 +00:00
parent edc50c7510
commit fee71e7740
404 changed files with 211048 additions and 2820 deletions
-8
View File
@@ -5,7 +5,6 @@ import (
"log/slog"
docinitrunner "queryorchestration/api/docInitRunner"
doctextprocessrunner "queryorchestration/api/docTextProcessRunner"
"queryorchestration/internal/serviceconfig/objectstore"
"queryorchestration/internal/serviceconfig/queue"
)
@@ -44,13 +43,6 @@ func (s *Service) Process(ctx context.Context, params Params) error {
Key: params.Key,
Hash: params.Hash,
}
case objectstore.TextTextract:
queueParams.QueueURL = s.cfg.GetDocumentTextProcessURL()
queueParams.Body = doctextprocessrunner.Body{
Bucket: params.Bucket,
Key: params.Key,
Hash: params.Hash,
}
default:
slog.Info("unsupported key", "key", params.Key)
return nil
-25
View File
@@ -8,7 +8,6 @@ import (
"queryorchestration/internal/serviceconfig"
"queryorchestration/internal/serviceconfig/objectstore"
"queryorchestration/internal/serviceconfig/queue/documentinit"
"queryorchestration/internal/serviceconfig/queue/documenttextprocess"
queuemock "queryorchestration/mocks/queue"
"github.com/aws/aws-sdk-go-v2/service/sqs"
@@ -19,7 +18,6 @@ import (
type ProcessConfig struct {
serviceconfig.BaseConfig
documentinit.DocInitConfig
documenttextprocess.DocTextProcessConfig
}
func TestProcess(t *testing.T) {
@@ -29,7 +27,6 @@ func TestProcess(t *testing.T) {
mockSQS := queuemock.NewMockSQSClient(t)
cfg.QueueClient = mockSQS
cfg.DocInitURL = "docinit"
cfg.DocumentTextProcessURL = "doctextprocess"
svc := New(cfg)
@@ -68,28 +65,6 @@ func TestProcess(t *testing.T) {
})
assert.NoError(t, err)
})
t.Run("document text process", func(t *testing.T) {
mockSQS.EXPECT().
SendMessage(
mock.Anything,
mock.MatchedBy(func(in *sqs.SendMessageInput) bool {
return *in.QueueUrl == cfg.DocumentTextProcessURL
}),
mock.Anything,
).
Return(&sqs.SendMessageOutput{}, nil)
location := objectstore.BucketKey{
ClientID: "7db16095-9155-47d4-8004-b3b3ead93c83",
Location: objectstore.TextTextract,
CreatedAt: time.Now().UTC(),
}
err := svc.Process(ctx, Params{
Event: EventS3ObjectCreatedPut,
Key: location.String(),
})
assert.NoError(t, err)
})
}
func TestIsSupportedEvent(t *testing.T) {
-2
View File
@@ -3,13 +3,11 @@ package documentstore
import (
"queryorchestration/internal/serviceconfig"
"queryorchestration/internal/serviceconfig/queue/documentinit"
"queryorchestration/internal/serviceconfig/queue/documenttextprocess"
)
type ConfigProvider interface {
serviceconfig.ConfigProvider
documentinit.ConfigProvider
documenttextprocess.ConfigProvider
}
type Service struct {
-2
View File
@@ -5,7 +5,6 @@ import (
"queryorchestration/internal/serviceconfig"
"queryorchestration/internal/serviceconfig/queue/documentinit"
"queryorchestration/internal/serviceconfig/queue/documenttextprocess"
"github.com/stretchr/testify/assert"
)
@@ -13,7 +12,6 @@ import (
type DocInitConfig struct {
serviceconfig.BaseConfig
documentinit.DocInitConfig
documenttextprocess.DocTextProcessConfig
}
func TestNew(t *testing.T) {