|
| 1 | +# Using Dev Container for YDB Client SDK Contributors |
| 2 | + |
| 3 | +- [Official Dev Containers Documentation](https://containers.dev/) |
| 4 | +- [VS Code Dev Containers Extension Documentation](https://code.visualstudio.com/docs/devcontainers/containers) |
| 5 | + |
| 6 | +Dev Container allows you to quickly set up a reproducible and isolated environment for developing and testing YDB client SDKs. |
| 7 | + |
| 8 | +## Why Use It |
| 9 | + |
| 10 | +- No need for manual environment and dependency setup. |
| 11 | +- The environment matches CI and other project contributors. |
| 12 | +- You can run integration tests with a local YDB database without extra preparation. |
| 13 | +- All necessary tools for development and testing are pre-installed. |
| 14 | + |
| 15 | +## Getting Started |
| 16 | + |
| 17 | +1. Install a container engine (e.g., Docker or Podman) and Visual Studio Code with the Dev Containers extension. |
| 18 | +2. Clone the repository of the required SDK. |
| 19 | +3. If the repository contains a `.devcontainer` folder, open the project in VS Code and select **Reopen in Container**. |
| 20 | +4. After the environment starts, use standard commands to build, test, and run the code. |
| 21 | + |
| 22 | +## Implementation Details in YDB SDKs |
| 23 | + |
| 24 | +### Java SDK |
| 25 | +- The [`devcontainer`](https://github.com/ydb-platform/ydb-java-sdk/tree/master/.devcontainer) contains a `Dockerfile`, `devcontainer.json`, and scripts. |
| 26 | +- The environment includes JDK, Gradle, and development tools. |
| 27 | +- You can extend the Dockerfile to install additional tools. |
| 28 | + |
| 29 | +### Go SDK |
| 30 | +- The [`devcontainer`](https://github.com/ydb-platform/ydb-go-sdk/tree/master/.devcontainer) contains a `Dockerfile`, `devcontainer.json`, `compose.yml`, and scripts. |
| 31 | +- A local YDB cluster is automatically started for integration tests. |
| 32 | +- All dependencies and the required Go version are pre-installed. |
| 33 | + |
| 34 | +### JavaScript/TypeScript SDK |
| 35 | +- The [`devcontainer`](https://github.com/ydb-platform/ydb-js-sdk/tree/main/.devcontainer) contains a `Dockerfile`, `devcontainer.json`, `compose.yml`, and scripts. |
| 36 | +- The environment includes Node.js, npm, TypeScript, and development tools. |
| 37 | +- When the devcontainer starts, a YDB cluster is automatically started for integration tests. |
| 38 | + |
| 39 | +### Python SDK (PR #590) |
| 40 | +- The [`devcontainer`](https://github.com/ydb-platform/ydb-python-sdk/pull/590/files) contains a `Dockerfile`, `devcontainer.json`, `compose.yml`, scripts, and automatic ydb-cli profile setup. |
| 41 | +- When the environment starts, a local YDB cluster is automatically started and access from the container is pre-configured. |
| 42 | +- All dependencies, flake8, tox, and ydb-cli are pre-installed. |
0 commit comments