Skip to content
This repository was archived by the owner on Sep 5, 2025. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion .github/workflows/ci-go-unit-tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,15 @@ permissions:

jobs:
ci-go-tests:
runs-on: warp-ubuntu-latest-arm64-4x
name: Test ${{ matrix.os }}
runs-on:
"${{ matrix.os == 'linux' && 'warp-ubuntu-latest-x64-4x' || matrix.os == 'macos' &&
'warp-macos-15-arm64-6x'}}"

strategy:
fail-fast: false
matrix:
os: [linux, macos]

steps:
- uses: actions/checkout@v4
Expand Down
2 changes: 2 additions & 0 deletions .trunk/configs/.markdownlint.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# Prettier friendly markdownlint config (all formatting rules disabled)
extends: markdownlint/style/prettier
5 changes: 5 additions & 0 deletions .trunk/configs/ruff.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Generic, formatter-friendly config.
select = ["B", "D3", "E", "F"]

# Never enforce `E501` (line length violations). This should be handled by formatters.
ignore = ["E501"]
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@
- feat: update interface to engine and namespace
[#57](https://github.com/hypermodeinc/modusDB/pull/57)

- chore: Update dgraph dependency [#62](https://github.com/hypermodeinc/modusDB/pull/62)

## 2025-01-02 - Version 0.1.0

Baseline for the changelog.
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -91,8 +91,8 @@ please contact us at <hello@hypermode.com>.
## Acknowledgements

ModusDB builds heavily upon packages from the open source projects of
[Dgraph](https://github.com/dgraph-io/dgraph) (graph query processing and transaction management),
[Badger](https://github.com/dgraph-io/badger) (data storage), and
[Dgraph](https://github.com/hypermodeinc/dgraph) (graph query processing and transaction
management), [Badger](https://github.com/dgraph-io/badger) (data storage), and
[Ristretto](https://github.com/dgraph-io/ristretto) (cache). We expect the architecture and
implementations of modusDB and Dgraph to expand in differentiation over time as the projects
optimize for different core use cases, while maintaining Dgraph Query Language (DQL) compatibility.
4 changes: 2 additions & 2 deletions api.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ package modusdb
import (
"fmt"

"github.com/dgraph-io/dgraph/v24/dql"
"github.com/dgraph-io/dgraph/v24/schema"
"github.com/hypermodeinc/dgraph/v24/dql"
"github.com/hypermodeinc/dgraph/v24/schema"
"github.com/hypermodeinc/modusdb/api/apiutils"
"github.com/hypermodeinc/modusdb/api/structreflect"
)
Expand Down
2 changes: 1 addition & 1 deletion api/apiutils/apiutils.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ package apiutils
import (
"fmt"

"github.com/dgraph-io/dgraph/v24/x"
"github.com/hypermodeinc/dgraph/v24/x"
)

var (
Expand Down
4 changes: 2 additions & 2 deletions api/dgraphtypes/dgraphtypes.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ import (
"time"

"github.com/dgraph-io/dgo/v240/protos/api"
"github.com/dgraph-io/dgraph/v24/protos/pb"
"github.com/dgraph-io/dgraph/v24/types"
"github.com/hypermodeinc/dgraph/v24/protos/pb"
"github.com/hypermodeinc/dgraph/v24/types"
"github.com/hypermodeinc/modusdb/api/structreflect"
"github.com/twpayne/go-geom"
"github.com/twpayne/go-geom/encoding/wkb"
Expand Down
4 changes: 2 additions & 2 deletions api/mutations/mutations.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ import (
"strings"

"github.com/dgraph-io/dgo/v240/protos/api"
"github.com/dgraph-io/dgraph/v24/protos/pb"
"github.com/dgraph-io/dgraph/v24/schema"
"github.com/hypermodeinc/dgraph/v24/protos/pb"
"github.com/hypermodeinc/dgraph/v24/schema"
"github.com/hypermodeinc/modusdb/api/apiutils"
"github.com/hypermodeinc/modusdb/api/dgraphtypes"
)
Expand Down
8 changes: 4 additions & 4 deletions api_mutation_gen.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,10 @@ import (
"strings"

"github.com/dgraph-io/dgo/v240/protos/api"
"github.com/dgraph-io/dgraph/v24/dql"
"github.com/dgraph-io/dgraph/v24/protos/pb"
"github.com/dgraph-io/dgraph/v24/schema"
"github.com/dgraph-io/dgraph/v24/x"
"github.com/hypermodeinc/dgraph/v24/dql"
"github.com/hypermodeinc/dgraph/v24/protos/pb"
"github.com/hypermodeinc/dgraph/v24/schema"
"github.com/hypermodeinc/dgraph/v24/x"
"github.com/hypermodeinc/modusdb/api/apiutils"
"github.com/hypermodeinc/modusdb/api/dgraphtypes"
"github.com/hypermodeinc/modusdb/api/mutations"
Expand Down
10 changes: 5 additions & 5 deletions api_mutation_helpers.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@ import (
"fmt"
"reflect"

"github.com/dgraph-io/dgraph/v24/dql"
"github.com/dgraph-io/dgraph/v24/protos/pb"
"github.com/dgraph-io/dgraph/v24/query"
"github.com/dgraph-io/dgraph/v24/schema"
"github.com/dgraph-io/dgraph/v24/worker"
"github.com/hypermodeinc/dgraph/v24/dql"
"github.com/hypermodeinc/dgraph/v24/protos/pb"
"github.com/hypermodeinc/dgraph/v24/query"
"github.com/hypermodeinc/dgraph/v24/schema"
"github.com/hypermodeinc/dgraph/v24/worker"
"github.com/hypermodeinc/modusdb/api/apiutils"
"github.com/hypermodeinc/modusdb/api/structreflect"
)
Expand Down
2 changes: 1 addition & 1 deletion api_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import (
"fmt"
"strings"

"github.com/dgraph-io/dgraph/v24/x"
"github.com/hypermodeinc/dgraph/v24/x"
"github.com/hypermodeinc/modusdb/api/apiutils"
"github.com/hypermodeinc/modusdb/api/querygen"
)
Expand Down
18 changes: 9 additions & 9 deletions engine.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,15 +20,15 @@ import (

"github.com/dgraph-io/badger/v4"
"github.com/dgraph-io/dgo/v240/protos/api"
"github.com/dgraph-io/dgraph/v24/dql"
"github.com/dgraph-io/dgraph/v24/edgraph"
"github.com/dgraph-io/dgraph/v24/posting"
"github.com/dgraph-io/dgraph/v24/protos/pb"
"github.com/dgraph-io/dgraph/v24/query"
"github.com/dgraph-io/dgraph/v24/schema"
"github.com/dgraph-io/dgraph/v24/worker"
"github.com/dgraph-io/dgraph/v24/x"
"github.com/dgraph-io/ristretto/v2/z"
"github.com/hypermodeinc/dgraph/v24/dql"
"github.com/hypermodeinc/dgraph/v24/edgraph"
"github.com/hypermodeinc/dgraph/v24/posting"
"github.com/hypermodeinc/dgraph/v24/protos/pb"
"github.com/hypermodeinc/dgraph/v24/query"
"github.com/hypermodeinc/dgraph/v24/schema"
"github.com/hypermodeinc/dgraph/v24/worker"
"github.com/hypermodeinc/dgraph/v24/x"
)

var (
Expand Down Expand Up @@ -80,7 +80,7 @@ func NewEngine(conf Config) (*Engine, error) {
worker.State.InitStorage()
worker.InitForLite(worker.State.Pstore)
schema.Init(worker.State.Pstore)
posting.Init(worker.State.Pstore, 0) // TODO: set cache size
posting.Init(worker.State.Pstore, 0, false) // TODO: set cache size

engine := &Engine{}
engine.isOpen.Store(true)
Expand Down
43 changes: 24 additions & 19 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,20 @@ require (
github.com/cavaliergopher/grab/v3 v3.0.1
github.com/dgraph-io/badger/v4 v4.5.0
github.com/dgraph-io/dgo/v240 v240.1.0
github.com/dgraph-io/dgraph/v24 v24.0.3-0.20241213192353-fd411c5b915b
github.com/dgraph-io/ristretto/v2 v2.0.1
github.com/dgraph-io/ristretto/v2 v2.1.0
github.com/hypermodeinc/dgraph/v24 v24.0.3-0.20250123224129-a0d027dcffe0
github.com/pkg/errors v0.9.1
github.com/stretchr/testify v1.10.0
github.com/twpayne/go-geom v1.5.7
golang.org/x/sync v0.10.0
google.golang.org/protobuf v1.35.2
google.golang.org/protobuf v1.36.2
)

require (
github.com/pelletier/go-toml/v2 v2.2.2 // indirect
github.com/sagikazarmark/locafero v0.4.0 // indirect
github.com/sagikazarmark/slog-shim v0.1.0 // indirect
github.com/sourcegraph/conc v0.3.0 // indirect
)

require (
Expand All @@ -23,12 +30,12 @@ require (
github.com/DataDog/datadog-go v3.5.0+incompatible // indirect
github.com/DataDog/opencensus-go-exporter-datadog v0.0.0-20220622145613-731d59e8b567 // indirect
github.com/HdrHistogram/hdrhistogram-go v1.1.2 // indirect
github.com/IBM/sarama v1.43.3 // indirect
github.com/IBM/sarama v1.45.0 // indirect
github.com/agnivade/levenshtein v1.0.3 // indirect
github.com/beorn7/perks v1.0.1 // indirect
github.com/bits-and-blooms/bitset v1.17.0 // indirect
// trunk-ignore(osv-scanner/GHSA-9w9f-6mg8-jp7w)
github.com/blevesearch/bleve/v2 v2.4.3 // indirect
github.com/blevesearch/bleve/v2 v2.4.4 // indirect
github.com/blevesearch/bleve_index_api v1.1.12 // indirect
github.com/blevesearch/geo v0.1.20 // indirect
github.com/blevesearch/go-porterstemmer v1.0.3 // indirect
Expand All @@ -37,7 +44,7 @@ require (
github.com/blevesearch/upsidedown_store_api v1.0.2 // indirect
github.com/cenkalti/backoff/v4 v4.3.0 // indirect
github.com/cespare/xxhash/v2 v2.3.0 // indirect
github.com/chewxy/math32 v1.10.1 // indirect
github.com/chewxy/math32 v1.11.0 // indirect
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect
github.com/dgraph-io/gqlgen v0.13.2 // indirect
github.com/dgraph-io/gqlparser/v2 v2.2.2 // indirect
Expand All @@ -50,7 +57,7 @@ require (
github.com/eapache/queue v1.1.0 // indirect
github.com/felixge/fgprof v0.9.3 // indirect
github.com/fsnotify/fsnotify v1.7.0 // indirect
github.com/getsentry/sentry-go v0.30.0 // indirect
github.com/getsentry/sentry-go v0.31.1 // indirect
github.com/go-jose/go-jose/v4 v4.0.4 // indirect
github.com/go-kit/log v0.2.1 // indirect
github.com/go-logfmt/logfmt v0.5.1 // indirect
Expand Down Expand Up @@ -95,9 +102,8 @@ require (
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
github.com/modern-go/reflect2 v1.0.2 // indirect
github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect
github.com/pelletier/go-toml v1.9.5 // indirect
github.com/philhofer/fwd v1.1.2 // indirect
github.com/pierrec/lz4/v4 v4.1.21 // indirect
github.com/pierrec/lz4/v4 v4.1.22 // indirect
github.com/pkg/profile v1.7.0 // indirect
github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect
github.com/prometheus/client_golang v1.20.5 // indirect
Expand All @@ -111,11 +117,10 @@ require (
github.com/sergi/go-diff v1.2.0 // indirect
github.com/soheilhy/cmux v0.1.5 // indirect
github.com/spf13/afero v1.11.0 // indirect
github.com/spf13/cast v1.3.1 // indirect
github.com/spf13/cast v1.7.1 // indirect
github.com/spf13/cobra v1.8.1 // indirect
github.com/spf13/jwalterweatherman v1.0.0 // indirect
github.com/spf13/pflag v1.0.5 // indirect
github.com/spf13/viper v1.7.1 // indirect
github.com/spf13/viper v1.19.0 // indirect
github.com/subosito/gotenv v1.6.0 // indirect
github.com/tinylib/msgp v1.1.8 // indirect
github.com/uber/jaeger-client-go v2.25.0+incompatible // indirect
Expand All @@ -127,17 +132,17 @@ require (
go.opencensus.io v0.24.0 // indirect
go.uber.org/multierr v1.11.0 // indirect
go.uber.org/zap v1.27.0 // indirect
golang.org/x/crypto v0.30.0 // indirect
golang.org/x/exp v0.0.0-20240909161429-701f63a606c0 // indirect
golang.org/x/net v0.32.0 // indirect
golang.org/x/sys v0.28.0 // indirect
golang.org/x/term v0.27.0 // indirect
golang.org/x/crypto v0.32.0 // indirect
golang.org/x/exp v0.0.0-20250106191152-7588d65b2ba8 // indirect
golang.org/x/net v0.34.0 // indirect
golang.org/x/sys v0.29.0 // indirect
golang.org/x/term v0.28.0 // indirect
golang.org/x/text v0.21.0 // indirect
golang.org/x/time v0.6.0 // indirect
gonum.org/v1/gonum v0.12.0 // indirect
google.golang.org/api v0.196.0 // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20240903143218-8af14fe29dc1 // indirect
google.golang.org/grpc v1.68.1 // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20241015192408-796eee8c2d53 // indirect
google.golang.org/grpc v1.69.2 // indirect
gopkg.in/DataDog/dd-trace-go.v1 v1.22.0 // indirect
gopkg.in/ini.v1 v1.67.0 // indirect
gopkg.in/yaml.v2 v2.4.0 // indirect
Expand Down
Loading
Loading