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
52 changes: 52 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
---
name: Bug report
about: Report a bug or unexpected behavior
title: ''
labels: bug
assignees: ''
---

## Description

<!-- A clear description of what the bug is -->

## Device info

- **Device model**: <!-- e.g., HS300, KP115, HS105 -->
- **Device firmware version** (if known):

## Environment

- **Python version**:
- **tplink-cloud-api version**:
- **OS**:

## Steps to reproduce

1.
2.
3.

## Expected behavior

<!-- What you expected to happen -->

## Actual behavior

<!-- What actually happened -->

## Code snippet

```python
# Minimal code to reproduce the issue
```

## Error output

```
# Any error messages or stack traces
```

## Additional context

<!-- Any other relevant information -->
28 changes: 28 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
---
name: Feature request
about: Suggest a new feature or enhancement
title: ''
labels: enhancement
assignees: ''
---

## Description

<!-- A clear description of the feature you'd like -->

## Use case

<!-- Why do you need this feature? What problem does it solve? -->

## Proposed solution

<!-- If you have ideas on how this could be implemented -->

## Device support

<!-- If this relates to a specific device -->
- **Device model**: <!-- e.g., HS300, KP115, or "all devices" -->

## Additional context

<!-- Any other relevant information, links, or examples -->
19 changes: 19 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
## Summary

<!-- Brief description of what this PR does -->

## Changes

<!-- List the key changes made -->

## Test plan

<!-- How did you verify this works? -->
- [ ] Ran `pytest --verbose` locally
- [ ] Tested with a real TP-Link device (if applicable)

## Checklist

- [ ] Code follows existing patterns in the codebase
- [ ] Added/updated tests for new functionality (if applicable)
- [ ] README updated (if applicable)
63 changes: 63 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
# Contributing to tplink-cloud-api

Thanks for your interest in contributing! This document outlines how to get started.

## Development setup

1. Clone the repository:
```bash
git clone https://github.com/piekstra/tplink-cloud-api.git
cd tplink-cloud-api
```

2. Create a virtual environment:
```bash
python3 -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate
```

3. Install dependencies:
```bash
pip install -r requirements.txt
pip install -e .
```

## Running tests

This project uses `wiremock` to mock the TP-Link API for testing.

1. Start the wiremock service:
```bash
docker compose up -d
```

2. Run the tests:
```bash
pytest --verbose
```

See the [Testing section](README.md#testing) in the README for details on environment configuration.

## Submitting changes

1. Fork the repository
2. Create a feature branch (`git checkout -b my-feature`)
3. Make your changes
4. Run tests to ensure they pass
5. Commit your changes with a descriptive message
6. Push to your fork and open a pull request

## Adding support for new devices

If you'd like to add support for a new TP-Link device:

1. Open an issue first to discuss the device and its capabilities
2. If you have the device, capture the API responses it produces (device info, sys info, etc.)
3. Add wiremock mappings in `tests/wiremock/mappings/` for the new device
4. Implement the device class following existing patterns
5. Add tests for the new device
6. Update the README with the new device in the compatibility list

## Questions?

Feel free to open an issue if you have questions or need help getting started.