Skip to content

[DO NOT MERGE] Code review #53

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 30 commits into
base: pre-apis
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
bb00fef
Jai/hyp 2765 get api (#28)
jairad26 Dec 18, 2024
47fec90
Bump golang.org/x/crypto from 0.29.0 to 0.31.0 (#29)
dependabot[bot] Dec 18, 2024
208821a
separate ci tests and lint (#30)
jairad26 Dec 18, 2024
571b799
Create CODEOWNERS
ryanfoxtyler Dec 18, 2024
0420655
add readFrom, index creation, and gid for apis (#31)
jairad26 Dec 19, 2024
a8aee3e
Jai/hyp 2771 benchmark modusdb (#32)
jairad26 Dec 19, 2024
2e3b106
upgrade dependencies in go.mod (#24)
mangalaman93 Dec 20, 2024
3e824e2
add delete api (#33)
jairad26 Dec 20, 2024
1116c7c
add nested mutation, getting nested values, upsert, nested types supp…
jairad26 Dec 26, 2024
84b781b
support unstructured data in modusdb (#38)
jairad26 Jan 2, 2025
f7007a4
chore: repo setup (#43)
ryanfoxtyler Jan 2, 2025
fff8aaa
chore: create LICENSE (#42)
ryanfoxtyler Jan 2, 2025
e676bc6
chore: add trunk (#44)
ryanfoxtyler Jan 2, 2025
a157525
chore: add readme (#46)
ryanfoxtyler Jan 2, 2025
dac39a7
chore: add copyrights (#47)
jairad26 Jan 3, 2025
77effe0
Update trunk.yaml
ryanfoxtyler Jan 3, 2025
2e7ac26
chore: move to Warp runners for GitHub Actions (#50)
ryanfoxtyler Jan 3, 2025
bcd42e1
feat: add readfrom json tag to support reverse edges (#49)
jairad26 Jan 3, 2025
dd2ea80
chore: Refactoring package management (#51)
jairad26 Jan 3, 2025
7abdc72
chore: move reflection logic to utils package (#54)
jairad26 Jan 5, 2025
48b27de
revs
jairad26 Jan 6, 2025
205eaf7
.
jairad26 Jan 6, 2025
f24f940
rename internal to api to reflect the functions inside are for the ap…
jairad26 Jan 8, 2025
42b1452
fix: alter schema on reverse edge after querying schema (#55)
jairad26 Jan 10, 2025
b9226a5
Merge branch 'main' into code-review
jairad26 Jan 10, 2025
b297d54
feat: update modusDB interface to driver and db (#57)
jairad26 Jan 15, 2025
9b6934e
chore: separate load and unit tests (#59)
jairad26 Jan 16, 2025
b63cc2a
chore: Ignore blev warning (#60)
mattjohnsonpint Jan 16, 2025
1bf8d5a
chore: Update dgraph dependency (#62)
jairad26 Jan 24, 2025
69abfd7
Merge branch 'main' into code-review
jairad26 Jan 24, 2025
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
5 changes: 5 additions & 0 deletions .github/CODEOWNERS
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# CODEOWNERS info: https://help.github.com/en/articles/about-code-owners
# Owners are automatically requested for review for PRs that changes code
# that they own.

* @hypermodeinc/database
28 changes: 28 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
---
name: Bug report
about: Create a report to help us improve
title: ""
labels: bug
assignees: ""
---

**Describe the bug** A clear and concise description of what the bug is.

**To Reproduce** Steps to reproduce the behavior:

1. Go to '...'
2. Click on '....'
3. Scroll down to '....'
4. See error

**Expected behavior** A clear and concise description of what you expected to happen.

**Screenshots** If applicable, add screenshots to help explain your problem.

**Environment**

- OS: [e.g. macOS, Windows, Ubuntu]
- Language [e.g. Go]
- Version [e.g. v0.xx]

**Additional context** Add any other context about the problem here.
5 changes: 5 additions & 0 deletions .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
blank_issues_enabled: false
contact_links:
- name: Modus Community Support
url: https://discord.hypermode.com
about: Please ask and answer questions here
17 changes: 17 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
---
name: Feature request
about: Suggest an idea for this project
title: ""
labels: ""
assignees: ""
---

**Is your feature request related to a problem? Please describe.** A clear and concise description
of what the problem is. Ex. I'm always frustrated when [...]

**Describe the solution you'd like** A clear and concise description of what you want to happen.

**Describe alternatives you've considered** A clear and concise description of any alternative
solutions or features you've considered.

**Additional context** Add any other context or screenshots about the feature request here.
Comment on lines +9 to +17
Copy link
Member

Choose a reason for hiding this comment

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

Trunk merged the title and body of these paragraphs, because they were just bold text rather than headings. Use ## headings instead.

5 changes: 5 additions & 0 deletions .github/actionlint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
self-hosted-runner:
# Labels of self-hosted runner in array of string
labels:
- warp-ubuntu-latest-arm64-2x
- warp-ubuntu-latest-arm64-4x
26 changes: 26 additions & 0 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
**Description**

Please explain the changes you made here.

**Checklist**

- [ ] Code compiles correctly and linting passes locally
- [ ] For all _code_ changes, an entry added to the `CHANGELOG.md` file describing and linking to
this PR
- [ ] Tests added for new functionality, or regression tests for bug fixes added as applicable
- [ ] For public APIs, new features, etc., PR on [docs repo](https://github.com/hypermodeinc/docs)
staged and linked here

**Instructions**

- The PR title should follow the [Conventional Commits](https://www.conventionalcommits.org/)
syntax, leading with `fix:`, `feat:`, `chore:`, `ci:`, etc.
- The description should briefly explain what the PR is about. In the case of a bugfix, describe or
link to the bug.
- In the checklist section, check the boxes in that are applicable, using `[x]` syntax.
- If not applicable, remove the entire line. Only leave the box unchecked if you intend to come
back and check the box later.
- Delete the `Instructions` line and everything below it, to indicate you have read and are
following these instructions. 🙂

Thank you for your contribution to modusDB!
4 changes: 1 addition & 3 deletions .github/renovate.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
{
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
"extends": [
"github>hypermodeinc/renovate-config"
]
"extends": ["github>hypermodeinc/renovate-config"]
}
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: ci-go-tests
name: ci-go-lint

on:
pull_request:
Expand All @@ -8,30 +8,28 @@ on:
- reopened
- ready_for_review
paths:
- '**/*.go'
- '**/go.mod'
- "**/*.go"
- "**/go.mod"
- .github/workflows/*

permissions:
contents: read
actions: write

jobs:
ci-go-tests:
runs-on: ubuntu-24.04
ci-go-lint:
runs-on: warp-ubuntu-latest-arm64-2x

steps:
- uses: actions/checkout@v4

- name: Set up Go
uses: actions/setup-go@v5
with:
go-version-file: 'go.mod'
go-version-file: go.mod
cache-dependency-path: go.sum

- name: golangci-lint
uses: golangci/[email protected]
with:
args: --timeout=10m

- name: Run Unit Tests
run: go test -race -v ./...
33 changes: 33 additions & 0 deletions .github/workflows/ci-go-load-tests.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: ci-go-load-tests

on:
pull_request:
types:
- opened
- synchronize
- reopened
- ready_for_review
paths:
- "**/*.go"
- "**/go.mod"
- .github/workflows/*

permissions:
contents: read
actions: write

jobs:
ci-go-tests:
runs-on: warp-ubuntu-latest-arm64-4x

steps:
- uses: actions/checkout@v4

- name: Set up Go
uses: actions/setup-go@v5
with:
go-version-file: go.mod
cache-dependency-path: go.sum

- name: Run Unit Tests
run: go test -race -v ./load_test/...
41 changes: 41 additions & 0 deletions .github/workflows/ci-go-unit-tests.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: ci-go-unit-tests

on:
pull_request:
types:
- opened
- synchronize
- reopened
- ready_for_review
paths:
- "**/*.go"
- "**/go.mod"
- .github/workflows/*

permissions:
contents: read
actions: write

jobs:
ci-go-tests:
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

- name: Set up Go
uses: actions/setup-go@v5
with:
go-version-file: go.mod
cache-dependency-path: go.sum

- name: Run Unit Tests
run: go test -race -v ./unit_test/...
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,5 @@ go.work.sum

# env file
.env

cpu_profile.prof
9 changes: 9 additions & 0 deletions .trunk/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
*out
*logs
*actions
*notifications
*tools
plugins
user_trunk.yaml
user.yaml
tmp
File renamed without changes.
8 changes: 8 additions & 0 deletions .trunk/configs/.markdownlint.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"line-length": { "line_length": 150, "tables": false },
"no-inline-html": false,
"no-bare-urls": false,
"no-space-in-emphasis": false,
"no-emphasis-as-heading": false,
"first-line-heading": false
}
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/.prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"semi": false,
"proseWrap": "always",
"printWidth": 100
}
7 changes: 7 additions & 0 deletions .trunk/configs/.yamllint.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
rules:
quoted-strings:
required: only-when-needed
extra-allowed: ["{|}"]
key-duplicates: {}
octal-values:
forbid-implicit-octal: true
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"]
43 changes: 43 additions & 0 deletions .trunk/trunk.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
# This file controls the behavior of Trunk: https://docs.trunk.io/cli
# To learn more about the format of this file, see https://docs.trunk.io/reference/trunk-yaml

version: 0.1

cli:
version: 1.22.8

# Trunk provides extensibility via plugins. (https://docs.trunk.io/plugins)
plugins:
sources:
- id: trunk
ref: v1.6.6
uri: https://github.com/trunk-io/plugins

# Many linters and tools depend on runtimes - configure them here. (https://docs.trunk.io/runtimes)
runtimes:
enabled:
- [email protected]
- [email protected]
- [email protected]

# This is the section where you manage your linters. (https://docs.trunk.io/check/configuration)
lint:
enabled:
- [email protected]
- [email protected]
- git-diff-check
- [email protected]
- [email protected]
- [email protected]
- [email protected]
- [email protected]
- [email protected]
- [email protected]
- [email protected]

actions:
enabled:
- trunk-announce
- trunk-check-pre-push
- trunk-fmt-pre-commit
- trunk-upgrade-available
3 changes: 3 additions & 0 deletions .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"recommendations": ["trunk.io"]
}
6 changes: 6 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"editor.formatOnSave": true,
"editor.defaultFormatter": "trunk.io",
"editor.trimAutoWhitespace": true,
"trunk.autoInit": false
}
22 changes: 22 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# Changelog

## UNRELEASED

- feat: add readfrom json tag to support reverse edges
[#49](https://github.com/hypermodeinc/modusDB/pull/49)

- chore: Refactoring package management [#51](https://github.com/hypermodeinc/modusDB/pull/51)

- fix: alter schema on reverse edge after querying schema
[#55](https://github.com/hypermodeinc/modusDB/pull/55)

- 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.

See git commit history for changes for this version and prior.
Loading