Skip to content

DOC: Update CONTRIBUTING.md with local services setup and test instructions#1709

Open
nishtha-agarwal-211 wants to merge 2 commits intoopenml:mainfrom
nishtha-agarwal-211:doc/update-local-services-testing-docs
Open

DOC: Update CONTRIBUTING.md with local services setup and test instructions#1709
nishtha-agarwal-211 wants to merge 2 commits intoopenml:mainfrom
nishtha-agarwal-211:doc/update-local-services-testing-docs

Conversation

@nishtha-agarwal-211
Copy link
Copy Markdown

Closes #1708

Metadata

Details

What does this PR implement/fix?
Adds two missing documentation sections to CONTRIBUTING.md:

  1. Starting Local Services — Documents the required chown/chmod permission step on data/php before running docker compose, and the exact clone + startup commands for the openml/services repo (with --profile rest-api --profile minio), as introduced in [MNT] Update CI/CD with local test server and dependency matrix #1697.

  2. Running tests with local services — Extends the testing guide with instructions to set the OPENML_USE_LOCAL_SERVICES="true" environment variable before running pytest, for both Linux/macOS and Windows.

Why is this necessary?
The CI was switched to run tests against local Docker services in #1629 and #1697, but the contributor documentation was never updated to reflect this. Contributors had no documented way to replicate the CI test run locally.

…ctions

Closes openml#1708

- Add 'Starting Local Services' section with required permission step
  (chown/chmod data/php) before running docker compose, as implemented in openml#1697
- Extend testing guide with OPENML_USE_LOCAL_SERVICES env var instructions
  for running pytest against local services (Linux/macOS and Windows)
@nishtha-agarwal-211 nishtha-agarwal-211 changed the title DOC: Update CONTRIBUTING.md with local services setup and test instru… DOC: Update CONTRIBUTING.md with local services setup and test instructions Mar 10, 2026
Copilot AI review requested due to automatic review settings April 12, 2026 07:06
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Updates contributor documentation so developers can start the local Dockerized OpenML services and run the test suite against them (to mirror CI behavior).

Changes:

  • Add a “Starting Local Services” section with initial permission setup + openml/services startup instructions.
  • Extend the testing guide with OPENML_USE_LOCAL_SERVICES="true" instructions for Linux/macOS and Windows.
  • Fix formatting/indentation of the final MkDocs preview line.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +81 to +93
The test suite runs against local services via Docker. Before starting the services for the first time, set the required file permissions:

```bash
chown -R www-data:www-data data/php
# Or, if the above fails (e.g. because `www-data` does not exist on your system):
chmod -R 777 data/php
```

Then clone the [openml/services](https://github.com/openml/services) repository and start the services:

```bash
git clone https://github.com/openml/services.git
cd services
Copy link

Copilot AI Apr 12, 2026

Choose a reason for hiding this comment

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

The permission commands reference data/php before the openml/services repo is cloned/entered; following these steps in order will likely fail with “No such file or directory”. Consider reordering to clone/cd into services first (or explicitly prefix the path with services/).

Suggested change
The test suite runs against local services via Docker. Before starting the services for the first time, set the required file permissions:
```bash
chown -R www-data:www-data data/php
# Or, if the above fails (e.g. because `www-data` does not exist on your system):
chmod -R 777 data/php
```
Then clone the [openml/services](https://github.com/openml/services) repository and start the services:
```bash
git clone https://github.com/openml/services.git
cd services
The test suite runs against local services via Docker. Before starting the services for the first time, clone the [openml/services](https://github.com/openml/services) repository, enter it, and set the required file permissions:
```bash
git clone https://github.com/openml/services.git
cd services
chown -R www-data:www-data data/php
# Or, if the above fails (e.g. because `www-data` does not exist on your system):
chmod -R 777 data/php

Copilot uses AI. Check for mistakes.
```bash
chown -R www-data:www-data data/php
# Or, if the above fails (e.g. because `www-data` does not exist on your system):
chmod -R 777 data/php
Copy link

Copilot AI Apr 12, 2026

Choose a reason for hiding this comment

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

chown -R www-data:www-data ... typically requires sudo, and the fallback chmod -R 777 is overly permissive. To better match the CI setup and reduce permissions risk, consider documenting the chmod -R a+rw ... approach (CI uses this on ./data and ./logs in .github/workflows/test.yml:125-127) or another least-privilege alternative.

Suggested change
chmod -R 777 data/php
chmod -R a+rw data/php

Copilot uses AI. Check for mistakes.
Comment on lines +91 to +95
```bash
git clone https://github.com/openml/services.git
cd services
docker compose --profile rest-api --profile minio up -d
```
Copy link

Copilot AI Apr 12, 2026

Choose a reason for hiding this comment

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

The documented docker compose command doesn’t match the CI service startup (CI uses --profile rest-api --profile minio --profile evaluation-engine plus data/logs permission tweaks in .github/workflows/test.yml:125-127). If the goal is to let contributors replicate CI locally, update the command or clarify why evaluation-engine (and the extra chmods) are not needed here.

Copilot uses AI. Check for mistakes.

### Starting Local Services

The test suite runs against local services via Docker. Before starting the services for the first time, set the required file permissions:
Copy link

Copilot AI Apr 12, 2026

Choose a reason for hiding this comment

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

“The test suite runs against local services via Docker” reads as the default behavior, but later instructions indicate local services are opt-in via OPENML_USE_LOCAL_SERVICES. Consider rephrasing to avoid confusion (e.g., CI runs against local services, or tests can be run against local services).

Suggested change
The test suite runs against local services via Docker. Before starting the services for the first time, set the required file permissions:
The test suite can be run against local services via Docker. Before starting the services for the first time, set the required file permissions:

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[DOC] Update documentation for running tests with local services

2 participants