Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
460 commits
Select commit Hold shift + click to select a range
9387e90
Rename thigns
all-seeing-code Sep 7, 2020
c8d2d1a
Change port variable
all-seeing-code Sep 8, 2020
8dd9891
Address review comments
all-seeing-code Sep 14, 2020
d3707e8
Remove client_slash file
all-seeing-code Sep 14, 2020
1e55e5c
Update python import function to make python3 happy
all-seeing-code Sep 14, 2020
e109345
feat(Slash gRPC Client): Add gRPC support for Slash endpoints
all-seeing-code Sep 16, 2020
bc94bdf
Improved example in readme (#152)
dhagrow Sep 18, 2020
bc7735d
Fix missing import of 'errors' (#151)
ajeetdsouza Sep 18, 2020
8460628
Release 20.07.0 (#158)
martinmr Sep 18, 2020
9005f38
Update README.md
bucanero Oct 5, 2020
ad97c61
Update README.md
bucanero Oct 5, 2020
0597d91
Update README.md
bucanero Oct 8, 2020
077e8d8
Update README.md
bucanero Oct 8, 2020
28db0ff
Update README.md
bucanero Oct 8, 2020
17719cb
Update README.md
bucanero Oct 8, 2020
df45ad4
Merge pull request #159 from bucanero/master
bucanero Oct 8, 2020
93779c4
Update CHANGELOG.md
bucanero Oct 8, 2020
7be46a9
Docs (discuss feedback): fix incorrect statement about upsert blocks …
aaroncarey Nov 26, 2020
9c88f10
Incorporate feedback from Anand
aaroncarey Nov 30, 2020
9bf6458
fix: small typo error
0xflotus Dec 4, 2020
70628e1
Merge pull request #163 from 0xflotus/patch-1
bucanero Dec 4, 2020
84aa715
chore: enabled syntax highlighting
0xflotus Dec 4, 2020
2180842
Merge pull request #164 from 0xflotus/patch-2
bucanero Dec 4, 2020
a629def
Merge pull request #161 from dgraph-io/aa-doc-pydgraph-D-2777
bucanero Dec 23, 2020
f45aae3
Add response to proto
all-seeing-code Jan 4, 2021
2b469bd
Add response format
all-seeing-code Jan 13, 2021
29a292d
Add integration test
all-seeing-code Jan 14, 2021
3a63dd4
Add decode to handle byte strings
all-seeing-code Jan 15, 2021
29e766b
feat: Add RDF response capability to Pydgraph
all-seeing-code Jan 15, 2021
670e55b
Update link to Python client docs, minor edits to intro
aaroncarey Feb 8, 2021
25e0081
Merge pull request #166 from dgraph-io/aaroncarey/link-to-docs
aaroncarey Feb 9, 2021
cbe75c7
Update Pydgraph client to support login into namespace
all-seeing-code Mar 8, 2021
ae447f0
Change function name
all-seeing-code Mar 9, 2021
a06f342
Merge pull request #167 from dgraph-io/anurags92/ExtendClientForMulti…
all-seeing-code Mar 10, 2021
73121c6
Add hash to response and txn context. Prepare for release v21.03
all-seeing-code Apr 9, 2021
57cfd1e
Update changelog
all-seeing-code Apr 9, 2021
cee9d75
Merge pull request #168 from dgraph-io/anurags92/release21.03Update
all-seeing-code Apr 9, 2021
44ff58c
Add from_cloud method
all-seeing-code Apr 21, 2021
91d3f9a
Merge pull request #169 from dgraph-io/anurags92/RenameCloudEndpoint
all-seeing-code Apr 21, 2021
2ee79e1
refresh example for v21.03
darkn3rd Jul 1, 2021
ca2e941
fix DgraphClientStub.from_cloud() comment bug in pydgraph
darkn3rd Jul 2, 2021
d0fd07e
Merge pull request #171 from darkn3rd/joaquin/update-sample
MichelDiz Jul 6, 2021
c8a7021
Release v21.3.1. (#173)
danielmai Aug 4, 2021
450fe95
doc: Cleanup README.
danielmai Aug 4, 2021
cb66105
fix: Missing variable in from_cloud. (#174)
danielmai Aug 5, 2021
f4e7c3c
Release 21.3.2. (#175)
danielmai Aug 5, 2021
ff08af7
delete yml
MichelDiz Oct 25, 2022
eaaa282
Merge pull request #184 from dgraph-io/micheldiz/removeAction
MichelDiz Oct 25, 2022
e9331a9
Adding example for datetime parsing (#170)
mrwunderbar666 Oct 27, 2022
38769e7
Bump setuptools from 45.2.0 to 65.5.1 (#187)
dependabot[bot] Mar 21, 2023
69d1e49
Bump wheel from 0.34.2 to 0.38.1 (#186)
dependabot[bot] Mar 22, 2023
b589d9e
update requirements due to a conflict with protobuf (#183)
MaxxReis Mar 29, 2023
b7324fb
chore(ci): add ci to pydgraph (#192)
joshua-goldstein Apr 25, 2023
647893b
chore(ci/cd): add pipelines + modernize repo (#193)
joshua-goldstein May 15, 2023
b569813
chore(ci): fix test script & use latest docker image (#195)
joshua-goldstein May 15, 2023
835ced4
chore(ci): test against latest dgraph on main #196
joshua-goldstein May 15, 2023
cf41843
cleanup README, compose files and doc links (#194)
mangalaman93 May 15, 2023
db724cb
accept grpc endpoint or /graphql endpoint in from_cloud function (#190)
rderbier May 16, 2023
3c7f85b
fix the TLS examples in examples/tls (#198)
mangalaman93 May 17, 2023
dc5ca05
update docs and fix flaky tests (#199)
mangalaman93 May 17, 2023
a228e52
Add utility functions to support graph analysis and viz (#200)
matthewmcneely May 23, 2023
f2b9a27
chore: Improve Dgraph cloud docs in README (#201)
mangalaman93 May 24, 2023
ba923a9
chore(changelog): add changelog for v23 release (#197)
joshua-goldstein May 24, 2023
e47c922
chore(cd): pipeline fixes (#203)
joshua-goldstein May 25, 2023
bb5f4fd
chore(cd): fix protobuf import issue (#204)
joshua-goldstein May 30, 2023
69776d5
chore(cd): release v23.0.1 (#205)
joshua-goldstein May 31, 2023
feebb15
Add Jupyter Notebook example (#206)
matthewmcneely Jun 27, 2023
9427133
add ai-classification notebook (#207)
rderbier Jun 27, 2023
0e3f938
chore(docs): Remove invalid emails and non-maintainers. (#208)
MichelDiz Aug 15, 2023
c6b5261
return commit_ts in the function 'commit()' in txn.py (#213)
seedoilz Oct 13, 2023
205f7a4
accept custom grpc options in from_cloud function (#215)
rarvikar Nov 6, 2023
807e3bd
chore: prepare changelog for v23.0.2 release (#217)
joshua-goldstein Nov 8, 2023
49d64d6
chore: update version in meta (#218)
Nov 8, 2023
2b0f069
Create CODEOWNERS (#219)
ryanfoxtyler Jan 31, 2024
649748f
CI: resolve failing jobs (#216)
Feb 1, 2024
0651eff
Create computeEmbeddings.py (#221)
rderbier May 30, 2024
b897e0b
Create stale.yml
ryanfoxtyler Jul 10, 2024
d809db7
Create dependabot.yml
ryanfoxtyler Jul 11, 2024
e86f92a
Bump actions/checkout from 3 to 4 (#226)
dependabot[bot] Jul 11, 2024
8805afa
Bump actions/setup-python from 4 to 5 (#227)
dependabot[bot] Jul 11, 2024
c0e4cdb
Bump github/codeql-action from 2 to 3 (#224)
dependabot[bot] Jul 11, 2024
3b96706
Bump actions/setup-go from 3 to 5 (#225)
dependabot[bot] Jul 11, 2024
d46f727
Bump grpcio from 1.54.0 to 1.54.3 (#220)
dependabot[bot] Jul 11, 2024
8d847dd
Update README.md
ryanfoxtyler Jul 12, 2024
7a41620
Update README.md
ryanfoxtyler Jul 12, 2024
ab9a7e7
Update README.md
ryanfoxtyler Jul 12, 2024
9092a63
Allow flexible dependency versions for grpcio & protobuf (#233)
gautambhat Jul 24, 2024
9e9deb5
Bump pytest from 7.3.1 to 8.3.1 (#235)
dependabot[bot] Jul 24, 2024
1feaef3
Bump protobuf from 4.22.3 to 5.27.2 (#231)
dependabot[bot] Jul 24, 2024
980b095
Bump build from 0.10.0 to 1.2.1 (#229)
dependabot[bot] Jul 24, 2024
66d619a
Bump grpcio-tools from 1.54.0 to 1.65.1 in the minor-and-patch group …
dependabot[bot] Jul 24, 2024
0419151
update proto to make it consistent with dgraph-io/dgo (#237)
mangalaman93 Jul 24, 2024
86edc13
regenerate protos with python3.11 (#238)
mangalaman93 Jul 24, 2024
771763a
prepare to release version v24.0.2 (#239)
mangalaman93 Jul 24, 2024
9657a73
add RAG notebooks (#240)
rderbier Jul 25, 2024
31913b3
Bump the minor-and-patch group with 2 updates (#241)
dependabot[bot] Aug 3, 2024
a6325f0
Bump grpcio-tools from 1.65.2 to 1.65.4 in the minor-and-patch group …
dependabot[bot] Aug 7, 2024
f708e49
Update ci-aqua-security-trivy-tests.yml
ryanfoxtyler Aug 21, 2024
e878f0a
Bump grpcio-tools from 1.65.4 to 1.65.5 in the minor-and-patch group …
dependabot[bot] Aug 22, 2024
f10d34c
Bump grpcio-tools from 1.65.5 to 1.66.0 in the minor-and-patch group …
dependabot[bot] Aug 28, 2024
06ac1d9
Bump grpcio-tools from 1.66.0 to 1.66.1 in the minor-and-patch group …
dependabot[bot] Sep 4, 2024
78de8d6
Update dependabot.yml
ryanfoxtyler Sep 10, 2024
6f6a496
Bump the minor-and-patch group with 2 updates (#246)
dependabot[bot] Sep 10, 2024
7783af5
Bump grpcio-tools from 1.66.1 to 1.66.2 in the minor-and-patch group …
dependabot[bot] Oct 3, 2024
9e8f937
Bump build from 1.2.2 to 1.2.2.post1 (#248)
dependabot[bot] Oct 9, 2024
10a3690
Update stale.yml
ryanfoxtyler Nov 11, 2024
a3b6f1a
Bump grpcio-tools from 1.66.2 to 1.68.0 in the minor-and-patch group …
dependabot[bot] Nov 21, 2024
c02f298
use go.mod file to figure out go version for Dgraph repo (#253)
mangalaman93 Nov 28, 2024
f0c9c71
Bump setuptools from 67.7.2 to 75.6.0 (#252)
dependabot[bot] Nov 28, 2024
e21787b
update proto file to support bigfloat data type (#255)
mangalaman93 Nov 28, 2024
8d58365
prepare for v24.1.0 release (#256)
mangalaman93 Nov 28, 2024
73f764f
add changelog for v24.1.0 (#257)
mangalaman93 Nov 28, 2024
8f88e35
upgrade python version to 3.12.7 (#258)
mangalaman93 Nov 28, 2024
42157cf
Raphael/readme doc drop data (#254)
mangalaman93 Jan 21, 2025
1077078
chore: repo alignment (#260)
ryanfoxtyler Jan 22, 2025
07847ac
chore: normalize copyrights (#262)
ryanfoxtyler Feb 5, 2025
451f0c8
cleanup
ryanfoxtyler Feb 6, 2025
0921a3d
chore: cleanup
ryanfoxtyler Feb 6, 2025
d842fbf
Update renovate.json
ryanfoxtyler Feb 15, 2025
9da6fef
Update CODEOWNERS
ryanfoxtyler Feb 24, 2025
a849c17
feat: add support for dgraph connection strings (#263)
matthewmcneely Mar 26, 2025
0931e3a
chore(deps): Update dependency protobuf to v6 (#264)
renovate[bot] Mar 27, 2025
8ef4d6a
Update PULL_REQUEST_TEMPLATE.md
ryanfoxtyler Mar 29, 2025
ac802b6
chore: release v24.2.0 (#265)
matthewmcneely Apr 1, 2025
551f79d
chore: add generated grpc artifacts (#266)
matthewmcneely Apr 2, 2025
7c6956b
chore: add protos check action (#267)
matthewmcneely Apr 3, 2025
9e74bed
chore(deps): Update dependency protobuf to >=4.23.0,<7.0.0 (#268)
renovate[bot] May 21, 2025
982bc2b
move Trunk to action
ryanfoxtyler Jun 1, 2025
171424d
Update trunk.yml
ryanfoxtyler Jun 1, 2025
282f5fb
Update trunk.yml
ryanfoxtyler Jun 1, 2025
7f2f53d
Bump min grpcio version, pin grpcio-tools to 1.65.x
matthewmcneely Jul 29, 2025
6708988
Update README
matthewmcneely Jul 29, 2025
ae263b7
Update changelog
matthewmcneely Jul 29, 2025
aa70a8b
Update version
matthewmcneely Jul 29, 2025
990f672
Update generated protobufs
matthewmcneely Jul 29, 2025
9b30084
Update changelog
matthewmcneely Jul 29, 2025
1c54889
Update README
matthewmcneely Jul 29, 2025
6e4d894
Update correctly generated code
matthewmcneely Jul 29, 2025
764c2b3
Update dev dependencies for python 3.13+
matthewmcneely Jul 29, 2025
8d54653
Reorder steps for quicker grpc failures
matthewmcneely Jul 29, 2025
5c308d3
Raise an error if attempting to generate protobufs using python 3.13
matthewmcneely Jul 29, 2025
497c46b
Update README
matthewmcneely Jul 29, 2025
2bfae89
Update the conditional step comparison logic
matthewmcneely Jul 29, 2025
8005f56
Update CHANGELOG.md
matthewmcneely Jul 30, 2025
31c9042
Force the python version when building and running CD
matthewmcneely Aug 5, 2025
1c4f300
chore(deps): Update actions/checkout action to v5 (#276)
renovate[bot] Aug 20, 2025
613c2ba
Delete .github/actionlint.yml
ryanfoxtyler Aug 21, 2025
350b486
Update cd-pydgraph.yml
ryanfoxtyler Aug 21, 2025
302906b
Update ci-pydgraph-tests.yml
ryanfoxtyler Aug 21, 2025
26eacef
chore(deps): Update actions to v6 (major) (#278)
renovate[bot] Oct 1, 2025
e0d225e
Update trunk config
matthewmcneely Sep 4, 2025
99731bf
Convert whitelist to open/all ipv4 addresses
matthewmcneely Sep 4, 2025
77f5739
Update proto and generated
matthewmcneely Sep 4, 2025
2317483
Implement updated v1 api
matthewmcneely Sep 4, 2025
50b3a1f
Add/update tests
matthewmcneely Sep 4, 2025
de5cf83
Skip pre-v25 functionality in tests
matthewmcneely Sep 5, 2025
508a23b
Update trunk
matthewmcneely Sep 10, 2025
d1ac785
Remove logging
matthewmcneely Sep 10, 2025
8392ac5
Sync the version
matthewmcneely Sep 10, 2025
5672df4
Update the changelog and readme
matthewmcneely Sep 10, 2025
ce15cd2
align apis with dgo client
Dec 15, 2025
05abf04
fix checks
Dec 15, 2025
0222f1b
change headers and add tests
Dec 16, 2025
2c023a7
Update docs and configs
matthewmcneely Dec 17, 2025
06dbd01
Add linter suppression for test
matthewmcneely Dec 17, 2025
808544b
Add tests for ACL+namespaces
matthewmcneely Dec 17, 2025
d0c3a04
Satisfy the linter
matthewmcneely Dec 17, 2025
77f80f0
Update changelog
matthewmcneely Dec 18, 2025
513298a
Fix typo
matthewmcneely Dec 18, 2025
8127007
Upgrade trunk configuration
matthewmcneely Dec 18, 2025
caa6e3c
fix: address CI flaky tests with tolerance and retry logic
mlwelles Dec 29, 2025
df698e2
chore: fix formatting
mlwelles Dec 29, 2025
58d3bca
chore: fix formatting
mlwelles Dec 29, 2025
60c6dd5
Add context manager support (fixes for PR #279)
mlwelles Dec 31, 2025
2616c62
fix: Resolve linting and test issues from PR #280 (#285)
mlwelles Dec 31, 2025
e3975ae
fix: use duck typing for gRPC error detection (grpcio 1.76+ compat)
mlwelles Jan 16, 2026
328bca7
feat: add transaction retry utilities with exponential backoff
mlwelles Jan 16, 2026
545b25b
fix: remove unused imports in test_retry.py
mlwelles Jan 16, 2026
2dac6b0
feat: modernize project tooling and add comprehensive type annotation…
mlwelles Jan 19, 2026
c725e8b
ci: add protobuf version matrix to CI tests
mlwelles Jan 19, 2026
673bf16
ci: scope protobuf compat tests to older 4.x and 5.x versions
mlwelles Jan 19, 2026
aafe61f
ci: rename job to Protobuf Release Version Backwards Compatibility
mlwelles Jan 19, 2026
14fc5ff
ci: rename job to Test Protobuf Backwards Compat
mlwelles Jan 19, 2026
c35861b
ci: remove redundant quotes to fix yamllint
mlwelles Jan 19, 2026
ad65bf7
ci: add standalone yamllint hook to pre-commit
mlwelles Jan 19, 2026
9de5506
ci: rename job to Test Protobuf Compat
mlwelles Jan 19, 2026
b4b1b80
ci: rename job to Test Pydgraph
mlwelles Jan 19, 2026
24d4335
ci: add protobuf compat tests for both DGraph Latest and HEAD
mlwelles Jan 19, 2026
069f5d2
ci: integrate protobuf version matrix into main test jobs
mlwelles Jan 19, 2026
2de7c8e
docs: update CI workflow documentation for protobuf version matrix
mlwelles Jan 19, 2026
473256a
Bump version
matthewmcneely Jan 19, 2026
67db658
Update changelog
matthewmcneely Jan 19, 2026
ec09561
fix: add shellcheck disable for subshell warning in local-test.sh
mlwelles Jan 19, 2026
f3d76ea
ci: skip no-commit-to-branch hook in CD workflow
mlwelles Jan 19, 2026
05934f5
fix(cd): remove uv version step incompatible with dynamic versioning
mlwelles Jan 19, 2026
f4cbfd6
fix: prevent asyncio.Lock deadlock in AsyncTxn.do_request error handling
shaunpatterson Feb 2, 2026
4804886
style: apply ruff formatting to async_client, client, and retry modules
shaunpatterson Feb 2, 2026
4021f98
test: add regression tests for async txn deadlock fix
mlwelles Feb 5, 2026
d28af08
feat(tests): add comprehensive stress tests for sync and async clients
mlwelles Feb 6, 2026
e782c9b
refactor(tests): split stress tests into sync/async with shared fixtures
mlwelles Feb 6, 2026
041cf91
docs: add stress test instructions to CONTRIBUTING.md
mlwelles Feb 6, 2026
bdafc9d
docs: add CI benchmarks design plan
mlwelles Feb 6, 2026
9a1ef3a
chore: add .worktrees to gitignore
mlwelles Feb 6, 2026
9bb8eed
fix(tests): add Future type annotations for ProcessPoolExecutor results
mlwelles Feb 6, 2026
940072e
docs: add CI benchmarks implementation plan
mlwelles Feb 6, 2026
ec42503
deps: add pytest-benchmark and pygal for CI benchmarks
mlwelles Feb 6, 2026
275a464
build: add benchmark Makefile target
mlwelles Feb 6, 2026
90695a5
feat(tests): add benchmark fixture to sync stress tests
mlwelles Feb 6, 2026
b774403
feat(tests): add benchmark fixture to async stress tests
mlwelles Feb 6, 2026
fbc1779
ci: add benchmarks job to PR/main workflow
mlwelles Feb 6, 2026
46207c3
ci: add benchmarks workflow for semver tag releases
mlwelles Feb 6, 2026
0ab202e
chore: ignore benchmark output files
mlwelles Feb 6, 2026
16b4444
fix: address linting issues in benchmark integration
mlwelles Feb 6, 2026
9d725a4
chore: remove implementation plan files
mlwelles Feb 6, 2026
d30779b
docs: use make test PYTEST_ARGS instead of direct script calls
mlwelles Feb 6, 2026
eaaf30a
refactor: benchmark target uses make test with PYTEST_ARGS
mlwelles Feb 6, 2026
f7c5e24
build: export test config vars for consistent make syntax
mlwelles Feb 6, 2026
bab40b2
build: default PYTEST_ARGS to -v if unset
mlwelles Feb 6, 2026
760a2d8
fix: improve local-test.sh robustness and add moderate stress mode
mlwelles Feb 6, 2026
0a016b6
fix: resolve benchmark fixture issues for sync and async stress tests
mlwelles Feb 6, 2026
5f61b25
refactor(tests): remove ProcessPoolExecutor from stress tests
mlwelles Feb 6, 2026
8ed02d8
test: add movie dataset to test resources
mlwelles Feb 6, 2026
ab7e3a6
feat(tests): add movie dataset pytest fixtures
mlwelles Feb 6, 2026
a56d79a
refactor(tests): standardize test naming with _sync/_async suffixes
mlwelles Feb 6, 2026
de3c9ba
docs: add targeted benchmarks implementation plan
mlwelles Feb 10, 2026
d23bffd
feat(tests): add targeted benchmark tests for individual operations
mlwelles Feb 10, 2026
0bef193
style: fix linting issues in stress tests and scripts
mlwelles Feb 10, 2026
bfeb316
fix(scripts): add shellcheck disable directives for expected warnings
mlwelles Feb 10, 2026
195f197
fix(ci): use make benchmark to properly start Dgraph before benchmarks
mlwelles Feb 10, 2026
d86aba0
ci: run benchmarks only on release tags
mlwelles Feb 10, 2026
ff4fedd
fix: prevent asyncio.Lock deadlock in AsyncTxn.do_request error handling
shaunpatterson Feb 2, 2026
23b83d8
style: apply ruff formatting to async_client, client, and retry modules
shaunpatterson Feb 2, 2026
332fc6c
test: add regression tests for async txn deadlock fix
mlwelles Feb 5, 2026
8e0ccdc
Merge remote-tracking branch 'origin/main' into feature/stress-tests
mlwelles Feb 11, 2026
1e5b082
ci: run benchmarks on push to main
mlwelles Feb 11, 2026
0159eca
feat: auto-download test data fixtures on demand
mlwelles Feb 11, 2026
747fcf7
docs: add STRESS_TEST_MODE options to benchmark help text
mlwelles Feb 11, 2026
8f15345
feat: use movies schema and lazy-load 1million dataset for stress tests
mlwelles Feb 11, 2026
7990b75
refactor: rename stress test fixtures for clarity
mlwelles Feb 11, 2026
26f2e99
Merge remote-tracking branch 'origin/main' into feature/stress-tests
mlwelles Feb 11, 2026
860ba4b
refactor: remove deprecated unittest.makeSuite usage
mlwelles Feb 11, 2026
336a5d0
refactor: move client fixtures from conftest into test files
mlwelles Feb 12, 2026
a4fb7e6
refactor: remove sync_client_clean fixture, use explicit drop_all
mlwelles Feb 12, 2026
1ed4f42
refactor: fix async fixture scoping, consolidate clients, disable ben…
mlwelles Feb 12, 2026
2c20ab3
feat(tests): add rounds-based sustained load to stress tests
mlwelles Feb 12, 2026
965ee7f
fix: remove extra trailing newlines in conftest.py
mlwelles Feb 12, 2026
4774bef
fix: benchmark mode uses quick config and disables gRPC fork handler
mlwelles Feb 12, 2026
96fe773
fix: handle empty STRESS_TEST_ROUNDS env var from Makefile export
mlwelles Feb 12, 2026
0eacc0a
fix: use benchmark.pedantic to control stress test iteration
mlwelles Feb 12, 2026
d6ac6c6
fix: move return to else block to satisfy ruff TRY300
mlwelles Feb 17, 2026
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
34 changes: 34 additions & 0 deletions .github/workflows/ci-pydgraph-benchmarks.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: ci-pydgraph-benchmarks
on:
push:
branches:
- main
tags:
- v[0-9]+.[0-9]+.[0-9]+*

permissions:
contents: read

jobs:
benchmarks:
name: Release Benchmarks
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
- name: Setup python runtime and tooling
uses: ./.github/actions/setup-python-and-tooling
with:
python-version: "3.13"
- name: Setup project dependencies
run: INSTALL_MISSING_TOOLS=true make setup
- name: Sync python virtualenv
run: make sync
- name: Run benchmarks
run: make benchmark
- name: Upload benchmark results
uses: actions/upload-artifact@v4
with:
name: benchmark-results-${{ github.ref_name }}
path: |
benchmark-results.json
benchmark-histogram.svg
13 changes: 13 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -41,3 +41,16 @@ venv
pyvenv.cfg
.DS_Store
examples/notebook/RAG/.env
.osgrep

# Git worktrees
.worktrees/

# Benchmark outputs
benchmark-results.json
benchmark-histogram.svg
stress-benchmark-results.json

# Downloaded test data (fetched on demand)
tests/resources/1million.rdf.gz
tests/resources/1million.schema
1 change: 1 addition & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ repos:
pass_filenames: false
additional_dependencies:
- pytest>=8.3.3
- pytest-benchmark>=4.0.0
- grpcio>=1.65.1
- protobuf>=4.23.0
- repo: https://github.com/pre-commit/mirrors-mypy
Expand Down
37 changes: 35 additions & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -220,15 +220,48 @@ make test
Run specific tests:

```sh
bash scripts/local-test.sh -v tests/test_connect.py::TestOpen
make test PYTEST_ARGS="-v tests/test_connect.py::TestOpen"
```

Run a single test:

```sh
bash scripts/local-test.sh -v tests/test_connect.py::TestOpen::test_connection_with_auth
make test PYTEST_ARGS="-v tests/test_connect.py::TestOpen::test_connection_with_auth"
```

### Stress Tests

The project includes comprehensive stress tests that verify concurrent operations, transaction
conflicts, deadlock prevention, and retry mechanisms for both sync and async clients.

**Quick mode** (default, ~12 seconds) - 20 workers, 50 ops, 10 iterations:

```sh
make test PYTEST_ARGS="tests/test_stress_sync.py tests/test_stress_async.py -v"
```

**Moderate mode** (10x quick, includes movie dataset, ~60+ seconds) - 200 workers, 500 ops, 100
iterations:

```sh
make test STRESS_TEST_MODE=moderate PYTEST_ARGS="tests/test_stress_sync.py tests/test_stress_async.py -v"
```

**Full mode** (10x moderate, maximum stress, ~10+ minutes) - 2000 workers, 5000 ops, 1000
iterations:

```sh
make test STRESS_TEST_MODE=full PYTEST_ARGS="tests/test_stress_sync.py tests/test_stress_async.py -v"
```

The stress tests cover:

- **Sync tests**: Run with `ThreadPoolExecutor` to test concurrent operations
- **Async tests**: Use pure `asyncio.gather()` concurrency (no `concurrent.futures` mixing)
- **Retry utilities**: Tests for `retry_async()`, `with_retry_async()`, and
`run_transaction_async()`
- **Deadlock regression**: Validates the asyncio.Lock deadlock fix from PR #293

### Test Infrastructure

The test script requires Docker and Docker Compose to be installed on your machine.
Expand Down
55 changes: 52 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,25 @@
SHELL := /bin/bash
export PATH := $(HOME)/.local/bin:$(HOME)/.cargo/bin:$(PATH)

# Export test configuration variables so they're available to child processes
# Usage: make test STRESS_TEST_MODE=moderate PYTEST_ARGS="-v"
# make test LOG=info (adds --log-cli-level=INFO to default PYTEST_ARGS)
export STRESS_TEST_MODE
export DGRAPH_IMAGE_TAG

# When LOG is set (e.g., LOG=info), inject --log-cli-level into pytest flags.
# Works with both the default PYTEST_ARGS and explicit overrides:
# make test LOG=info → -v --benchmark-disable --log-cli-level=INFO
# make benchmark LOG=warning → --benchmark-only ... --log-cli-level=WARNING
# make test PYTEST_ARGS="-x" LOG=debug → -x --log-cli-level=DEBUG
PYTEST_ARGS ?= -v --benchmark-disable
ifdef LOG
LOG_FLAG := --log-cli-level=$(shell echo '$(LOG)' | tr '[:lower:]' '[:upper:]')
PYTEST_ARGS += $(LOG_FLAG)
endif
export LOG
export PYTEST_ARGS

# Source venv if it exists and isn't already active
PROJECT_VENV := $(CURDIR)/.venv
ACTIVATE := $(wildcard .venv/bin/activate)
Expand All @@ -15,14 +34,21 @@ else
RUN :=
endif

.PHONY: help setup sync deps deps-uv deps-trunk deps-docker test check protogen clean build publish
.PHONY: help setup sync deps deps-uv deps-trunk deps-docker test benchmark check protogen clean build publish

.DEFAULT_GOAL := help

help: ## Show this help message
@echo ""
@echo "Environment Variables:"
@echo " INSTALL_MISSING_TOOLS=true Enable automatic installation of missing tools (default: disabled)"
@echo " LOG=<level> Add --log-cli-level to pytest (e.g., LOG=info, LOG=debug)"
@echo " Works with both 'test' and 'benchmark' targets"
@echo " STRESS_TEST_MODE=<mode> Stress test preset: quick (default), moderate, full"
@echo " PYTEST_ARGS=\"...\" Override default pytest flags (default: -v --benchmark-disable)"
@echo " Note: overrides LOG when set explicitly. 'benchmark' sets its own"
@echo " PYTEST_ARGS internally but still honours LOG"
@echo " DGRAPH_IMAGE_TAG=<tag> Override the Dgraph Docker image tag (default: latest)"
@echo ""
@echo "Available targets:"
@grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-15s\033[0m %s\n", $$1, $$2}'
Expand Down Expand Up @@ -51,8 +77,31 @@ clean: ## Cleans build artifacts
build: deps-uv sync protogen ## Builds release package
$(RUN) uv build

test: deps-uv sync ## Run tests
bash scripts/local-test.sh
test: deps-uv sync ## Run tests (use PYTEST_ARGS to pass options, e.g., make test PYTEST_ARGS="-v tests/test_connect.py")
bash scripts/local-test.sh $(PYTEST_ARGS)

benchmark: ## Run benchmarks (measures per-operation latency with pytest-benchmark)
@# Outputs (all .gitignored):
@# benchmark-results.json Phase 1 results (pytest-benchmark JSON)
@# benchmark-histogram.svg Phase 1 latency histogram
@# stress-benchmark-results.json Phase 2 results (pytest-benchmark JSON)
@#
@# Phase 1: Per-operation latency benchmarks against a clean database.
@# Runs targeted benchmark tests (test_benchmark_*.py) which measure individual
@# operations (query, mutation, upsert, etc.) in isolation. Each test creates a
@# fresh schema via drop_all, so these MUST run on their own Dgraph cluster —
@# the rapid schema churn destabilises the alpha for any tests that follow.
@echo "═══ Phase 1: Per-operation latency benchmarks ═══"
$(MAKE) test PYTEST_ARGS="--benchmark-only --benchmark-json=benchmark-results.json --benchmark-histogram=benchmark-histogram -v $(LOG_FLAG) tests/test_benchmark_async.py tests/test_benchmark_sync.py"
@# Phase 2: Stress-test benchmarks under sustained concurrent load.
@# Runs stress tests (test_stress_*.py) with the 1-million-movie dataset loaded.
@# Uses a separate Dgraph cluster (via a second 'make test' invocation) so the
@# alpha starts fresh after Phase 1's drop_all churn.
@# benchmark.pedantic(rounds=1) in each stress test prevents pytest-benchmark
@# from compounding iterations — the stress_config["rounds"] inner loop
@# (controlled by STRESS_TEST_MODE) handles repetition instead.
@echo "═══ Phase 2: Stress-test benchmarks (moderate load, 1M movies) ═══"
$(MAKE) test STRESS_TEST_MODE=moderate PYTEST_ARGS="--benchmark-only --benchmark-json=stress-benchmark-results.json -v $(LOG_FLAG) tests/test_stress_async.py tests/test_stress_sync.py"

publish: clean build ## Publish a new release to PyPi (requires UV_PUBLISH_USERNAME and UV_PUBLISH_PASSWORD to be set)
$(RUN) uv publish
Expand Down
4 changes: 2 additions & 2 deletions PUBLISHING.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,12 @@ This document contains instructions to create a new pydgraph release and publish
1. Create a new branch (prepare-for-release-vXX.X.X, for instance)
1. Update the VERSION in pydgraph/meta.py
1. Build pydgraph locally, see the [README](README.md#build-from-source)
1. Run the tests (`bash scripts/local-test.sh`) to ensure everything works
1. Run the tests (`make test`) to ensure everything works
1. If you're concerned about incompatibilities with earlier Dgraph versions, invoke the test suite
with earlier Dgraph versions

```sh
DGRAPH_IMAGE_TAG=vX.X.X bash scripts/local-test.sh
make test DGRAPH_IMAGE_TAG=vX.X.X
```

1. If you happen to have the testpypi access token, try a test upload to testpypi:
Expand Down
Loading
Loading