Skip to content

Development Environment

We're really excited that you are interested in contributing to Kloud Workspace. Before submitting your contribution, please make sure to take a moment and read through the following guidelines:

Prerequisites

Before you begin, check your prerequisites meet the minimum requirements versions:

  • Python (optional): >=3.8
  • NodeJS (docs): >=18
  • Golang (cli): >=1.21
sh
$ python --version
Python 3.11.2
sh
$ node --version
v22.11.0
sh
$ go version
go version go1.24.0 linux/amd64

Setup

You can clone the repository and run it locally:

1. Clone the repository

sh
git clone https://github.com/kloudkit/workspace
sh
git clone https://github.com/kloudkit/ws-docs
sh
git clone https://github.com/kloudkit/ws-cli

2. Install dependencies

sh
pip install pre-commit
sh
yarn install
sh
go install

3. Linting (Optional)

sh
pre-commit run --all-files
pre-commit install

💡 TIP

This step is automatically run on all pull requests and commits. If you choose to skip this step, that's OK, we will run it for you during CI.

4. Run a local development (docs) server

sh
yarn run docs:dev

Testing

Ensure your local environment meets the minimum requirements before running tests:

  • Python: >=3.11
  • Docker: >=25

1. Install Test Dependencies

Install the required Python packages for testing:

sh
pip install -r tests/requirements.txt

2. Run Tests

When executing tests for the first time, the test suite will build a Docker testing image (ghcr.io/kloudkit/workspace:tests) automatically.

sh
pytest

⚠️ WARNING

If you've updated the implementation code but haven't rebuilt the test image, the tests may run against an outdated image.

Make sure to rebuild the image before running tests.

3. Optional Execution Flags

  • Custom Docker Tag: Use the --shed-tag flag to specify a custom Docker image tag.

    sh
    pytest --shed-tag=my-custom-tag
  • Force Image Rebuild: Add the --shed-rebuild flag to rebuild the Docker image.

    sh
    pytest --shed-rebuild
  • Require Image: Add the --shed-require-image flag to require an existing pre-built Docker image.

    sh
    pytest --shed-rebuild

Released under the MIT License