Contributing to Basecamp SDK
March 24, 2026 ยท View on GitHub
Thank you for your interest in contributing to the Basecamp SDK. This document provides guidelines and instructions for contributing.
Development Setup
Prerequisites
| SDK | Requirements |
|---|---|
| Go | Go 1.26+, golangci-lint |
| TypeScript | Node.js 18+, npm |
| Ruby | Ruby 3.2+, Bundler |
| Swift | Swift 6.0+, Xcode 16+ |
| Kotlin | JDK 17+, Kotlin 2.0+ |
| Python | Python 3.11+, uv |
A Basecamp account is optional (for integration testing only).
Getting Started
-
Clone the repository:
git clone https://github.com/basecamp/basecamp-sdk.git cd basecamp-sdk -
Install dependencies and run tests for each SDK:
Go:
cd go && go mod download make test make check # formatting, linting, testsTypeScript:
cd typescript && npm install npm test npm run typecheck npm run lintRuby:
cd ruby && bundle install bundle exec rake test bundle exec rubocopSwift:
cd swift swift build swift testKotlin:
cd kotlin ./gradlew :sdk:jvmTestPython:
cd python && uv sync && cd .. make py-test make py-check # tests, types, lint, format, drift -
Run all SDKs at once from the repo root:
make check # all 6 SDK test suites make conformance # cross-SDK conformance tests
Code Style
Python Code
- Target Python 3.11+
- Use ruff for linting and formatting (line length: 120)
- All service method parameters are keyword-only (after
*) - Use type annotations for function signatures
- Generated code under
src/basecamp/generated/is exempt from style rules
Go Code
- Follow standard Go conventions and Effective Go
- Use
gofmtfor formatting (runmake fmt) - Keep functions focused and small
- Document all exported types, functions, and methods
- Use meaningful variable names
Naming Conventions
- Service types:
*Service(e.g.,ProjectsService,TodosService) - Request types:
Create*Request,Update*Request - Options types:
*Optionsor*ListOptions - Error constructors:
Err*(e.g.,ErrNotFound,ErrAuth)
Error Handling
- Return structured
*Errortypes with appropriate codes - Include helpful hints for user-facing errors
- Use
ErrUsageHint()for configuration/usage errors - Wrap underlying errors with context
Testing
- Write unit tests for all new functionality
- Use table-driven tests where appropriate
- Mock HTTP responses using
httptest - Test both success and error paths
Commit Conventions
We follow Conventional Commits for clear, structured commit history.
Format
<type>(<scope>): <description>
[optional body]
[optional footer(s)]
Types
feat: New featurefix: Bug fixdocs: Documentation changesstyle: Code style changes (formatting, semicolons, etc.)refactor: Code changes that neither fix bugs nor add featuresperf: Performance improvementstest: Adding or updating testsbuild: Build system or dependency changesci: CI configuration changeschore: Other changes that don't modify src or test files
Scope
Use the service or component name:
projects,todos,campfires,webhooks, etc.auth,client,config,errorsdocs,ci,deps
Examples
feat(schedules): add GetEntryOccurrence method
fix(timesheet): use bucket-scoped endpoints for reports
docs(readme): add error handling section
test(cards): add coverage for move operations
Pull Request Process
Before Submitting
-
Run all checks locally:
make check # runs all 6 SDK test suites from repo root -
Ensure conformance tests pass:
make conformance -
Update documentation if adding new features
Submitting a PR
-
Create a feature branch from
main:git checkout -b feat/my-feature -
Make your changes with clear, focused commits
-
Push and open a pull request against
main -
Fill out the PR template with:
- Summary of changes
- Motivation and context
- Testing performed
- Breaking changes (if any)
Review Process
- All PRs require at least one review
- CI must pass (tests, linting, security checks)
- Address review feedback promptly
- Squash commits if requested
Adding New API Coverage
All SDKs are generated from a single Smithy specification. When adding support for new Basecamp API endpoints:
-
Edit the Smithy model (
spec/basecamp.smithy)- Define the resource, operations, and shapes
- Follow patterns from existing resources (e.g.,
Project,Todo)
-
Regenerate the OpenAPI spec
make smithy-build -
Run per-SDK generators to update generated service code:
- Go:
make go-check-driftโ Go services are hand-written wrappers around the generated client; the drift check verifies all generated operations are covered - TypeScript:
make ts-generate-services - Ruby:
make rb-generate-services - Swift:
make swift-generate - Kotlin:
make kt-generate-services - Python:
make py-generate
- Go:
-
Add tests for each SDK
-
Add conformance tests (
conformance/tests/) covering the new operations -
Update documentation:
- Add to the services table in each SDK's README
- Add to CHANGELOG under
[Unreleased]
Reporting Issues
- Use GitHub Issues for bug reports and feature requests
- Include reproduction steps for bugs
- Provide Go version and OS information
- Include relevant error messages and logs
Questions?
Open a GitHub Discussion for questions about contributing or using the SDK.