Skip to content
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
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/release.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ Every step says who does it: script (run the command, read the result), CI (a wo
uv run --no-project python scripts/bump_engine.py --engine <VERSION> --dev-version <NEXT_DEV>
```

- [ ] 8. script: refresh the notices the new engine needs. First refresh the kept engine NOTICE (`git -C <arcadedb clone> show <VERSION>:NOTICE > native/wheel/ARCADEDB_ENGINE_NOTICE`; the generated notices embed it). The first `Test native` run on the bump PR stops at the notices drift check on purpose and uploads the generated file. Download it, commit it, push, and wait for the run to go green.
- [ ] 8. script: refresh the notices the new engine needs. First refresh the kept engine NOTICE (`git -C <arcadedb clone> show <VERSION>:NOTICE > native/wheel/ARCADEDB_ENGINE_NOTICE`; the generated notices embed it). The first `Test native (arcadedb)` run on the bump PR stops at the notices drift check on purpose and uploads the generated file. Download it, commit it, push, and wait for the run to go green.

```bash
gh run list -R ArcadeData/arcadedb-python --workflow test-native.yml --branch <bump-branch> --limit 1
Expand Down
2 changes: 1 addition & 1 deletion .github/pull_request_template.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ A short description of the change.

## Performance changes

For a change that claims a speed or memory difference: the timed A/B result (`ab.py`, with the noise run), or say why none applies. Leave this out otherwise.
For a change that claims a speed or memory difference: the timed A/B result (interleaved runs of the new build against `main` and a control run of `main` against itself, see CONTRIBUTING.md), or say why none applies. Leave this out otherwise.

## Docs

Expand Down
2 changes: 1 addition & 1 deletion CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ This repository builds two distributions that both import as `arcadedb`: `arcade
./scripts/build.sh # current platform, auto-detected
./scripts/build.sh linux/amd64 3.12 # Linux builds run in Docker (manylinux)
./scripts/build.sh linux/amd64 3.12 /path/to/lib # embed local ArcadeDB jars instead of the image's
ARCADEDB_TAG=26.11.1-SNAPSHOT ./scripts/build.sh # pin the arcadedata/arcadedb image (default: latest)
ARCADEDB_TAG=26.12.1-SNAPSHOT ./scripts/build.sh # pin the arcadedata/arcadedb image (default: latest)
```

- Linux builds use `scripts/Dockerfile.build`; macOS/Windows use `scripts/build-native.sh` with a native JDK 25+ (jlink).
Expand Down
8 changes: 5 additions & 3 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ On Linux the build runs in Docker. On macOS and Windows it needs a JDK 25 or lat

```shell
./scripts/build.sh # an arcadedb-jvm wheel for your platform in dist/
ARCADEDB_TAG=26.11.1-SNAPSHOT ./scripts/build.sh # pin the arcadedata/arcadedb image (default: latest)
ARCADEDB_TAG=26.12.1-SNAPSHOT ./scripts/build.sh # pin the arcadedata/arcadedb image (default: latest)
```

Tests run against the built wheel, not the source tree. Use `python -m pytest`, not the `pytest` entry point: with `--with`, the entry point does not see the packages of the environment.
Expand All @@ -74,18 +74,20 @@ bash native/scripts/build-image.sh <outdir>
uv run --no-project --python 3.12 python native/wheel/build_wheel.py --lib-dir <outdir> --version <version> --engine <engine> --out <wheeldir>
```

`build-image.sh` takes GraalVM Community Edition 25.4.4.1.1 from `GRAALVM_HOME_P5`; set it to your install. `build_wheel.py` takes `--graalvm-home`.

`native/wheel/parity_wheel.py` runs the test suite against the installed wheel; its arguments are in the "Run the parity suite" step of `test-native.yml`. See [Continuous integration](docs/modules/ROOT/pages/development/ci.adoc) for when each workflow runs.

### Tests

- Every fix comes with a regression test. Write the test first and run every test the change could affect.
- No skips: CI fails on a skipped test that is not listed in `scripts/check_test_skips.py`. A test that cannot run on a platform goes in `collect_ignore` in `tests/conftest.py`, and a known engine bug uses a strict `xfail`.
- No skips: CI fails on a skipped test that is not listed in `scripts/check_test_skips.py`. A test file that cannot run on a platform is a row, with its reason, in `WINDOWS_NOT_APPLICABLE` or `NATIVE_NOT_APPLICABLE` in `tests/conftest.py` (both feed `collect_ignore`), and a known engine bug uses a strict `xfail`.
- Never bind or address a hand-picked port in a test. Use `server.get_http_port()` or the `_free_ports()` pattern in `tests/test_server_wire_protocols.py`.
- Never assert on raw wall-clock time. A JVM pause makes it flaky.

### Pre-commit

This project uses [pre-commit](https://pre-commit.com/) (black, isort, shfmt, pretty-format-yaml, actionlint). Run it on the files you changed before you push, and again if it reformatted something:
This project uses [pre-commit](https://pre-commit.com/) (black, isort, shfmt, pretty-format-yaml, actionlint, and a local check that the old package name does not come back). Run it on the files you changed before you push, and again if it reformatted something:

```shell
uvx pre-commit run --files <changed files>
Expand Down
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -96,31 +96,31 @@ Releases from this repository start with 26.11.1. The 26.10.x wheels were built

## Documentation

- Here: [`docs/`](https://github.com/ArcadeData/arcadedb-python/tree/main/docs/modules/ROOT/pages) is an Antora component (AsciiDoc) with Installation, [Which package?](https://github.com/ArcadeData/arcadedb-python/blob/main/docs/modules/ROOT/pages/which-package.adoc), Quickstart, Databases and queries, Vectors, Faceted queries, and Concurrency, processes and crashes. It covers only what is specific to the Python bindings.
- Here: [`docs/`](https://github.com/ArcadeData/arcadedb-python/tree/main/docs/modules/ROOT/pages) is an Antora component (AsciiDoc) with Installation, [Which package?](https://github.com/ArcadeData/arcadedb-python/blob/main/docs/modules/ROOT/pages/which-package.adoc), Quickstart, the how-to pages (databases and queries, transactions, bulk loads, vectors, faceted queries, concurrency, durability, and more) and the development pages (Continuous integration, Release). It covers only what is specific to the Python bindings.
- Published at [docs.arcadedb.com/arcadedb-python](https://docs.arcadedb.com/arcadedb-python/), the same site as the main ArcadeDB manual, rebuilt daily from `main` (ArcadeData/arcadedb-docs#505). The `Docs` workflow builds it as a site of its own on every change under `docs/` and attaches it as the `docs-site` artifact. To build it locally, run `npx -p @antora/cli@3.2.1 -p @antora/site-generator@3.2.1 antora docs/antora-playbook.yml` and open `docs/build/site/index.html`.
- ArcadeDB itself (SQL, openCypher, schema, server): [docs.arcadedb.com](https://docs.arcadedb.com). It is not repeated here.

## Examples

[`examples/`](https://github.com/ArcadeData/arcadedb-python/tree/main/examples) holds 30 runnable scripts, from a first document store to vector search, time series, graph algorithms and server mode. CI runs them ([`test-python-examples.yml`](https://github.com/ArcadeData/arcadedb-python/blob/main/.github/workflows/test-python-examples.yml)).
[`examples/`](https://github.com/ArcadeData/arcadedb-python/tree/main/examples) holds 30 runnable scripts, from a first document store to vector search, time series, graph algorithms and server mode. CI runs them ([`test-python-examples.yml`](https://github.com/ArcadeData/arcadedb-python/blob/main/.github/workflows/test-python-examples.yml), and the `examples` job of [`test-native.yml`](https://github.com/ArcadeData/arcadedb-python/blob/main/.github/workflows/test-native.yml) for the native package).

## Build and test from source

```bash
./scripts/build.sh # an arcadedb-jvm wheel for your platform in dist/
```

The `arcadedb` (native) wheel is built from `native/` with GraalVM Community Edition; [`CLAUDE.md`](https://github.com/ArcadeData/arcadedb-python/blob/main/CLAUDE.md) has the commands. A native image build takes about 5 to 30 minutes per platform (macOS is the slowest).
The `arcadedb` (native) wheel is built from `native/` with GraalVM Community Edition; [`CONTRIBUTING.md`](https://github.com/ArcadeData/arcadedb-python/blob/main/CONTRIBUTING.md) has the commands. A native image build takes about 5 to 30 minutes per platform (macOS is the slowest).

The JVM build runs in Docker on Linux. macOS and Windows need a JDK 25 or later. The jars come from the `arcadedata/arcadedb` Docker image: `latest` by default, or the tag in `ARCADEDB_TAG` (for example `ARCADEDB_TAG=26.10.2 ./scripts/build.sh`). The package version is read from the engine jar in that image, so an `A.B.C-SNAPSHOT` image builds `A.B.C.devN`.

The native build does not use the image. It resolves `arcadedb-engine` and `arcadedb-server` from Maven Central at `arcadedb.version` in `native/pom.xml` (release versions only, because a snapshot is not on Maven Central) and compiles them with GraalVM Community Edition. Neither build compiles the engine from source: the engine code is upstream's, unmodified.

Tests run against the built wheel, not the source tree: install the wheel with its `test` extra into a virtual environment, then run `pytest`. [`CLAUDE.md`](https://github.com/ArcadeData/arcadedb-python/blob/main/CLAUDE.md) has the exact commands, the build options and the lint setup.
Tests run against the built wheel, not the source tree: `uv run --no-project --with "$W[test]" python -m pytest` (`W` is the wheel in `dist/`) makes a throwaway environment from the wheel and its `test` extra. Use `python -m pytest`, not the `pytest` entry point. [`CONTRIBUTING.md`](https://github.com/ArcadeData/arcadedb-python/blob/main/CONTRIBUTING.md) has the exact commands, and [`CLAUDE.md`](https://github.com/ArcadeData/arcadedb-python/blob/main/CLAUDE.md) the build options and the lint setup.

## Contributing

Open an [issue](https://github.com/ArcadeData/arcadedb-python/issues) or a pull request. Run `pre-commit run --all-files` first, and add a regression test with every fix. The rest of the bindings work from `humemai/arcadedb-embedded-python` is ported here one pull request at a time; [#19](https://github.com/ArcadeData/arcadedb-python/issues/19) lists what is done and what is next. <!-- allow-old-name -->
Open an [issue](https://github.com/ArcadeData/arcadedb-python/issues) or a pull request. Run `uvx pre-commit run --all-files` first, and add a regression test with every fix. The rest of the bindings work from `humemai/arcadedb-embedded-python` is ported here one pull request at a time; [#19](https://github.com/ArcadeData/arcadedb-python/issues/19) lists what is done and what is next. <!-- allow-old-name -->

## Where this code comes from

Expand Down
Loading
Loading