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
60 changes: 60 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
name: Bug report
description: Something in the SDK, the drums command or the MCP server does not behave as documented.
labels: ["bug"]
body:
- type: markdown
attributes:
value: |
Thanks for the report. Do not paste an API key anywhere in this issue; if one was exposed, revoke it first.
Security problems go through private reporting, not an issue: see SECURITY.md.
- type: textarea
id: what
attributes:
label: What happened
description: What you did, what you expected, what you got instead.
validations:
required: true
- type: textarea
id: repro
attributes:
label: Smallest script or command that shows it
description: Python or shell, as pasted. Replace the key with drums_sk_...
render: python
validations:
required: true
- type: textarea
id: error
attributes:
label: Error output
description: The full traceback or the error text. Gateway errors carry a request_id (gw_...); include it.
render: text
- type: input
id: version
attributes:
label: SDK version
description: Output of `drums version` or `python -c "import drums; print(drums.__version__)"`
placeholder: drums 0.3.0
validations:
required: true
- type: input
id: python
attributes:
label: Python version and OS
placeholder: Python 3.12.5, macOS 15 / Ubuntu 24.04
validations:
required: true
- type: dropdown
id: server
attributes:
label: Server
options:
- Drums Cloud (beta.drums.run)
- self-hosted drumsd
- the fake gateway in tests
validations:
required: true
- type: input
id: runtime
attributes:
label: Runtime version
description: Output of `client.health()["version"]`, if you can reach the server.
11 changes: 11 additions & 0 deletions .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
blank_issues_enabled: true
contact_links:
- name: Security report
url: https://github.com/Drums-Labs/drums-python-sdk/security/advisories/new
about: Report a vulnerability privately. Please do not open a public issue for it.
- name: Documentation
url: https://console.drums.run/docs
about: Quickstart, concepts, the SDK reference and the HTTP API.
- name: Account, billing or a problem with your workspace
url: https://console.drums.run
about: Workspace questions go through the console, not this repository.
36 changes: 36 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: Feature request
description: A method, option, tool or behaviour you need from the SDK or the MCP server.
labels: ["enhancement"]
body:
- type: textarea
id: problem
attributes:
label: What you are trying to do
description: The workflow, not the solution. What do you do today instead?
validations:
required: true
- type: textarea
id: proposal
attributes:
label: What you would like
description: The call, option or tool as you would write it. Pseudo-code is fine.
render: python
validations:
required: true
- type: dropdown
id: area
attributes:
label: Area
options:
- Python client (drums, drums.aio)
- MCP server or drums command
- hybrid tools (shell, files, office, browser)
- errors and validity
- packaging or docs
validations:
required: true
- type: textarea
id: context
attributes:
label: Anything else
description: Links to the docs page or the gateway route involved, if you know them.
20 changes: 20 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
## What changed

<!-- One behaviour per pull request. Say what changed and why, in plain words. -->

## How it was tested

<!-- The command you ran and what it printed. CI runs `python -m unittest discover -s tests -v` on 3.9 to 3.13. -->

```bash
python3 -m unittest discover -s tests -v
```

## Checklist

- [ ] Tests added or updated for the behaviour that changed, including the error path
- [ ] `CHANGELOG.md` updated under the next version heading
- [ ] Docstrings say what the method sends, returns and raises
- [ ] No third-party runtime dependency added
- [ ] No tokens, keys, private hostnames or account identifiers in code, tests, fixtures or docs
- [ ] Commits are signed off (`git commit -s`, see CONTRIBUTING.md)
16 changes: 16 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
version: 2
updates:
# The package has no runtime dependencies; this covers the build backend pinned in pyproject.toml.
- package-ecosystem: pip
directory: /
schedule:
interval: weekly
labels: ["dependencies"]
- package-ecosystem: github-actions
directory: /
schedule:
interval: weekly
labels: ["dependencies"]
groups:
actions:
patterns: ["*"]
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
strategy:
fail-fast: false
matrix:
python: ["3.9", "3.12", "3.13"]
python: ["3.9", "3.10", "3.11", "3.12", "3.13"]
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
Expand Down
135 changes: 135 additions & 0 deletions CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,135 @@
# Contributor Covenant Code of Conduct

## Our Pledge

We as members, contributors, and leaders pledge to make participation in our
community a harassment-free experience for everyone, regardless of age, body
size, visible or invisible disability, ethnicity, sex characteristics, gender
identity and expression, level of experience, education, socio-economic status,
nationality, personal appearance, race, caste, color, religion, or sexual
identity and orientation.

We pledge to act and interact in ways that contribute to an open, welcoming,
diverse, inclusive, and healthy community.

## Our Standards

Examples of behavior that contributes to a positive environment for our
community include:

* Demonstrating empathy and kindness toward other people
* Being respectful of differing opinions, viewpoints, and experiences
* Giving and gracefully accepting constructive feedback
* Accepting responsibility and apologizing to those affected by our mistakes,
and learning from the experience
* Focusing on what is best not just for us as individuals, but for the overall
community

Examples of unacceptable behavior include:

* The use of sexualized language or imagery, and sexual attention or advances of
any kind
* Trolling, insulting or derogatory comments, and personal or political attacks
* Public or private harassment
* Publishing others' private information, such as a physical or email address,
without their explicit permission
* Other conduct which could reasonably be considered inappropriate in a
professional setting

## Enforcement Responsibilities

Community leaders are responsible for clarifying and enforcing our standards of
acceptable behavior and will take appropriate and fair corrective action in
response to any behavior that they deem inappropriate, threatening, offensive,
or harmful.

Community leaders have the right and responsibility to remove, edit, or reject
comments, commits, code, wiki edits, issues, and other contributions that are
not aligned to this Code of Conduct, and will communicate reasons for moderation
decisions when appropriate.

## Scope

This Code of Conduct applies within all community spaces, and also applies when
an individual is officially representing the community in public spaces.
Examples of representing our community include using an official e-mail address,
posting via an official social media account, or acting as an appointed
representative at an online or offline event.

## Enforcement

Instances of abusive, harassing, or otherwise unacceptable behavior may be
reported to the community leaders responsible for enforcement: the maintainers
of the Drums-Labs organization on GitHub. A private report through the
repository's
[security advisories page](https://github.com/Drums-Labs/drums-python-sdk/security/advisories/new)
reaches them too; mark it "code of conduct".
All complaints will be reviewed and investigated promptly and fairly.

All community leaders are obligated to respect the privacy and security of the
reporter of any incident.

## Enforcement Guidelines

Community leaders will follow these Community Impact Guidelines in determining
the consequences for any action they deem in violation of this Code of Conduct:

### 1. Correction

**Community Impact**: Use of inappropriate language or other behavior deemed
unprofessional or unwelcome in the community.

**Consequence**: A private, written warning from community leaders, providing
clarity around the nature of the violation and an explanation of why the
behavior was inappropriate. A public apology may be requested.

### 2. Warning

**Community Impact**: A violation through a single incident or series of
actions.

**Consequence**: A warning with consequences for continued behavior. No
interaction with the people involved, including unsolicited interaction with
those enforcing the Code of Conduct, for a specified period of time. This
includes avoiding interactions in community spaces as well as external channels
like social media. Violating these terms may lead to a temporary or permanent
ban.

### 3. Temporary Ban

**Community Impact**: A serious violation of community standards, including
sustained inappropriate behavior.

**Consequence**: A temporary ban from any sort of interaction or public
communication with the community for a specified period of time. No public or
private interaction with the people involved, including unsolicited interaction
with those enforcing the Code of Conduct, is allowed during this period.
Violating these terms may lead to a permanent ban.

### 4. Permanent Ban

**Community Impact**: Demonstrating a pattern of violation of community
standards, including sustained inappropriate behavior, harassment of an
individual, or aggression toward or disparagement of classes of individuals.

**Consequence**: A permanent ban from any sort of public interaction within the
community.

## Attribution

This Code of Conduct is adapted from the [Contributor Covenant][homepage],
version 2.1, available at
[https://www.contributor-covenant.org/version/2/1/code_of_conduct.html][v2.1].

Community Impact Guidelines were inspired by
[Mozilla's code of conduct enforcement ladder][Mozilla CoC].

For answers to common questions about this code of conduct, see the FAQ at
[https://www.contributor-covenant.org/faq][FAQ]. Translations are available at
[https://www.contributor-covenant.org/translations][translations].

[homepage]: https://www.contributor-covenant.org
[v2.1]: https://www.contributor-covenant.org/version/2/1/code_of_conduct.html
[Mozilla CoC]: https://github.com/mozilla/diversity
[FAQ]: https://www.contributor-covenant.org/faq
[translations]: https://www.contributor-covenant.org/translations
62 changes: 48 additions & 14 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
# Contributing to drums-sdk

Thanks for helping. This package is the Python client for Drums; it uses only the standard library and supports
Python 3.9 and later.
Thanks for helping. This package is the Python client and MCP server for Drums; it uses only the standard library
and supports Python 3.9 and later. By taking part you agree to the [code of conduct](CODE_OF_CONDUCT.md).

## Set up

```bash
git clone https://github.com/Drums-Labs/drums-python-sdk.git
cd drums-python-sdk
python3 -m venv .venv && .venv/bin/pip install -e .
python3 -m venv .venv
.venv/bin/pip install -e .
```

## Run the tests
Expand All @@ -17,29 +18,62 @@ python3 -m venv .venv && .venv/bin/pip install -e .
.venv/bin/python -m unittest discover -s tests -v
```

The tests run against a fake daemon on 127.0.0.1 and need no Drums account. Run them on the oldest Python you have
as well as the newest; CI covers 3.9 through 3.13.
The tests run against a fake gateway on `127.0.0.1` and need no Drums account or network. CI runs them on Python
3.9 through 3.13; run them on the oldest and the newest Python you have. If `uv` is installed, the whole matrix is:

```bash
for v in 3.9 3.10 3.11 3.12 3.13; do uv run --python "$v" --no-project python -m unittest discover -s tests; done
```

CI also builds the package and checks it:

```bash
.venv/bin/pip install --upgrade build twine
.venv/bin/python -m build
.venv/bin/python -m twine check --strict dist/*
```

## Make a change

- Keep the package dependency-free. A change that needs a third-party library needs a discussion first.
- Keep the package dependency-free. A change that needs a third-party library needs a discussion in an issue first.
- Every public method gets a docstring that says what it sends, what it returns and which `drums.errors` it raises.
- Add or update a test in `tests/` for the behaviour you change, including the error path.
- A change to `drums/mcp_tools.json` must keep the list identical to the one the gateway serves; say in the PR which
gateway change it pairs with.
- Update `CHANGELOG.md` under the next version heading.
- Do not put tokens, keys, hostnames of private machines or prices in code, tests, fixtures or docs.
- Do not put tokens, keys, hostnames of private machines, account identifiers or prices in code, tests, fixtures or
docs.

## Sign your commits (DCO)

Every commit needs a `Signed-off-by` line with your real name and email, which states that you wrote the change or
have the right to submit it under the project's license, as set out in the
[Developer Certificate of Origin](https://developercertificate.org/). Git adds it for you:

```bash
git commit -s -m "step: return the observation when screenshot=True"
```

To add it to the last commit:

```bash
git commit --amend -s --no-edit
```

## Open a pull request

- Small, focused PRs. One behaviour per PR.
- Describe what changed and how you tested it. CI must be green.
- Commit messages describe the change in plain words. No generated boilerplate or tool attribution lines.
- Small, focused pull requests: one behaviour per PR.
- Fill in the template: what changed, how you tested it. CI must be green.
- Commit messages describe the change in plain words, in the present tense, with the area first
(`transport: ...`, `mcp: ...`, `tests: ...`). No generated boilerplate or tool attribution lines.
- A maintainer reviews within a few days. We may ask for changes or for the PR to be split.

## Releases

Maintainers cut releases by tagging `vX.Y.Z` on `main`; the release workflow builds the package, runs the tests on
every supported Python and publishes to PyPI (see `RELEASE.md`).
Maintainers cut releases by tagging `vX.Y.Z` on `main`; the release workflow builds the package, runs the tests
against the built wheel on every supported Python and publishes to PyPI with Trusted Publishing (see
[RELEASE.md](RELEASE.md)).

## Security

Found a security problem? Do not open a public issue. Email the maintainers at the address on
[drums.run](https://drums.run) and give us a few days to respond.
Found a security problem? Do not open a public issue. Follow [SECURITY.md](SECURITY.md).
Loading
Loading