systemair-api-promises 0.1.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- systemair_api_promises-0.1.0/.github/ISSUE_TEMPLATE/bug_report.md +43 -0
- systemair_api_promises-0.1.0/.github/ISSUE_TEMPLATE/feature_request.md +22 -0
- systemair_api_promises-0.1.0/.github/PULL_REQUEST_TEMPLATE.md +34 -0
- systemair_api_promises-0.1.0/.github/workflows/publish-to-pypi.yml +29 -0
- systemair_api_promises-0.1.0/.github/workflows/python-tests.yml +42 -0
- systemair_api_promises-0.1.0/.gitignore +77 -0
- systemair_api_promises-0.1.0/.pre-commit-config.yaml +34 -0
- systemair_api_promises-0.1.0/CHANGELOG.md +42 -0
- systemair_api_promises-0.1.0/CONTRIBUTING.md +154 -0
- systemair_api_promises-0.1.0/LICENSE +21 -0
- systemair_api_promises-0.1.0/MANIFEST.in +14 -0
- systemair_api_promises-0.1.0/PKG-INFO +458 -0
- systemair_api_promises-0.1.0/README.md +404 -0
- systemair_api_promises-0.1.0/TODO.md +129 -0
- systemair_api_promises-0.1.0/docs/Makefile +20 -0
- systemair_api_promises-0.1.0/docs/make.bat +35 -0
- systemair_api_promises-0.1.0/docs/source/api.rst +74 -0
- systemair_api_promises-0.1.0/docs/source/changelog.rst +5 -0
- systemair_api_promises-0.1.0/docs/source/conf.py +60 -0
- systemair_api_promises-0.1.0/docs/source/contributing.rst +5 -0
- systemair_api_promises-0.1.0/docs/source/index.rst +20 -0
- systemair_api_promises-0.1.0/docs/source/installation.rst +48 -0
- systemair_api_promises-0.1.0/docs/source/modules/index.rst +38 -0
- systemair_api_promises-0.1.0/docs/source/modules/systemair_api.api.systemair_api.rst +7 -0
- systemair_api_promises-0.1.0/docs/source/modules/systemair_api.api.websocket_client.rst +7 -0
- systemair_api_promises-0.1.0/docs/source/modules/systemair_api.auth.authenticator.rst +7 -0
- systemair_api_promises-0.1.0/docs/source/modules/systemair_api.models.ventilation_data.rst +7 -0
- systemair_api_promises-0.1.0/docs/source/modules/systemair_api.models.ventilation_unit.rst +7 -0
- systemair_api_promises-0.1.0/docs/source/modules/systemair_api.utils.constants.rst +7 -0
- systemair_api_promises-0.1.0/docs/source/modules/systemair_api.utils.exceptions.rst +7 -0
- systemair_api_promises-0.1.0/docs/source/modules/systemair_api.utils.register_constants.rst +7 -0
- systemair_api_promises-0.1.0/docs/source/usage.rst +213 -0
- systemair_api_promises-0.1.0/example.env +2 -0
- systemair_api_promises-0.1.0/main.py +131 -0
- systemair_api_promises-0.1.0/pyproject.toml +90 -0
- systemair_api_promises-0.1.0/pytest.ini +6 -0
- systemair_api_promises-0.1.0/requirements-dev.txt +21 -0
- systemair_api_promises-0.1.0/requirements.txt +11 -0
- systemair_api_promises-0.1.0/setup.cfg +4 -0
- systemair_api_promises-0.1.0/setup.py +71 -0
- systemair_api_promises-0.1.0/systemair_api/__init__.py +10 -0
- systemair_api_promises-0.1.0/systemair_api/__main__.py +118 -0
- systemair_api_promises-0.1.0/systemair_api/__version__.py +3 -0
- systemair_api_promises-0.1.0/systemair_api/api/__init__.py +4 -0
- systemair_api_promises-0.1.0/systemair_api/api/systemair_api.py +281 -0
- systemair_api_promises-0.1.0/systemair_api/api/websocket_client.py +100 -0
- systemair_api_promises-0.1.0/systemair_api/auth/__init__.py +3 -0
- systemair_api_promises-0.1.0/systemair_api/auth/authenticator.py +306 -0
- systemair_api_promises-0.1.0/systemair_api/models/__init__.py +4 -0
- systemair_api_promises-0.1.0/systemair_api/models/ventilation_data.py +65 -0
- systemair_api_promises-0.1.0/systemair_api/models/ventilation_unit.py +412 -0
- systemair_api_promises-0.1.0/systemair_api/utils/__init__.py +4 -0
- systemair_api_promises-0.1.0/systemair_api/utils/constants.py +28 -0
- systemair_api_promises-0.1.0/systemair_api/utils/exceptions.py +135 -0
- systemair_api_promises-0.1.0/systemair_api/utils/register_constants.py +324 -0
- systemair_api_promises-0.1.0/systemair_api_promises.egg-info/PKG-INFO +458 -0
- systemair_api_promises-0.1.0/systemair_api_promises.egg-info/SOURCES.txt +59 -0
- systemair_api_promises-0.1.0/systemair_api_promises.egg-info/dependency_links.txt +1 -0
- systemair_api_promises-0.1.0/systemair_api_promises.egg-info/entry_points.txt +2 -0
- systemair_api_promises-0.1.0/systemair_api_promises.egg-info/requires.txt +20 -0
- systemair_api_promises-0.1.0/systemair_api_promises.egg-info/top_level.txt +1 -0
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: Bug report
|
|
3
|
+
about: Create a report to help us improve
|
|
4
|
+
title: '[BUG] '
|
|
5
|
+
labels: bug
|
|
6
|
+
assignees: ''
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
## Bug Description
|
|
10
|
+
A clear and concise description of what the bug is.
|
|
11
|
+
|
|
12
|
+
## To Reproduce
|
|
13
|
+
Steps to reproduce the behavior:
|
|
14
|
+
1. Use function/class '...'
|
|
15
|
+
2. With parameters '....'
|
|
16
|
+
3. Execute code '....'
|
|
17
|
+
4. See error
|
|
18
|
+
|
|
19
|
+
## Expected Behavior
|
|
20
|
+
A clear and concise description of what you expected to happen.
|
|
21
|
+
|
|
22
|
+
## Actual Behavior
|
|
23
|
+
A clear and concise description of what actually happened.
|
|
24
|
+
|
|
25
|
+
## Error Messages
|
|
26
|
+
If applicable, add error messages or stack traces you received.
|
|
27
|
+
|
|
28
|
+
```
|
|
29
|
+
Paste error messages here
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
## Environment
|
|
33
|
+
- OS: [e.g. Windows 10, macOS 12.0, Ubuntu 22.04]
|
|
34
|
+
- Python version: [e.g. 3.8.10]
|
|
35
|
+
- SystemAIR-API version: [e.g. 0.1.0]
|
|
36
|
+
- Systemair device model: [e.g. Save VTC 300, SaveCair]
|
|
37
|
+
|
|
38
|
+
## Additional Context
|
|
39
|
+
Add any other context about the problem here, such as code snippets showing how you're using the library.
|
|
40
|
+
|
|
41
|
+
```python
|
|
42
|
+
# Your code example here
|
|
43
|
+
```
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: Feature request
|
|
3
|
+
about: Suggest an idea for this project
|
|
4
|
+
title: '[FEATURE] '
|
|
5
|
+
labels: enhancement
|
|
6
|
+
assignees: ''
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
## Is your feature request related to a problem? Please describe.
|
|
10
|
+
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
|
|
11
|
+
|
|
12
|
+
## Describe the solution you'd like
|
|
13
|
+
A clear and concise description of what you want to happen. Include any API design ideas or features you would like to see.
|
|
14
|
+
|
|
15
|
+
## Describe alternatives you've considered
|
|
16
|
+
A clear and concise description of any alternative solutions or features you've considered.
|
|
17
|
+
|
|
18
|
+
## Use case
|
|
19
|
+
Explain how this feature would be used and who would use it.
|
|
20
|
+
|
|
21
|
+
## Additional context
|
|
22
|
+
Add any other context or screenshots about the feature request here.
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
## Description
|
|
2
|
+
Please provide a brief summary of the changes. If this PR is fixing an issue, please reference it.
|
|
3
|
+
|
|
4
|
+
## Type of change
|
|
5
|
+
Please delete options that are not relevant.
|
|
6
|
+
|
|
7
|
+
- [ ] Bug fix (non-breaking change which fixes an issue)
|
|
8
|
+
- [ ] New feature (non-breaking change which adds functionality)
|
|
9
|
+
- [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
|
|
10
|
+
- [ ] Documentation update
|
|
11
|
+
- [ ] Refactoring (no functional changes, no API changes)
|
|
12
|
+
- [ ] Performance enhancement
|
|
13
|
+
- [ ] Test addition or update
|
|
14
|
+
- [ ] Build-related changes
|
|
15
|
+
- [ ] Other (please describe):
|
|
16
|
+
|
|
17
|
+
## How Has This Been Tested?
|
|
18
|
+
Please describe the tests that you added or existing tests that you ran to verify your changes.
|
|
19
|
+
|
|
20
|
+
- [ ] Unit tests
|
|
21
|
+
- [ ] Integration tests
|
|
22
|
+
- [ ] Functional tests
|
|
23
|
+
- [ ] Manual tests
|
|
24
|
+
|
|
25
|
+
## Checklist:
|
|
26
|
+
- [ ] My code follows the style guidelines of this project
|
|
27
|
+
- [ ] I have performed a self-review of my own code
|
|
28
|
+
- [ ] I have commented my code, particularly in hard-to-understand areas
|
|
29
|
+
- [ ] I have made corresponding changes to the documentation
|
|
30
|
+
- [ ] My changes generate no new warnings
|
|
31
|
+
- [ ] I have added tests that prove my fix is effective or that my feature works
|
|
32
|
+
- [ ] New and existing unit tests pass locally with my changes
|
|
33
|
+
- [ ] Any dependent changes have been merged and published in downstream modules
|
|
34
|
+
- [ ] I have checked my code and corrected any misspellings
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
name: Publish to PyPI
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
release:
|
|
5
|
+
types: [created]
|
|
6
|
+
|
|
7
|
+
jobs:
|
|
8
|
+
deploy:
|
|
9
|
+
runs-on: ubuntu-latest
|
|
10
|
+
steps:
|
|
11
|
+
- uses: actions/checkout@v3
|
|
12
|
+
|
|
13
|
+
- name: Set up Python
|
|
14
|
+
uses: actions/setup-python@v4
|
|
15
|
+
with:
|
|
16
|
+
python-version: '3.9'
|
|
17
|
+
|
|
18
|
+
- name: Install dependencies
|
|
19
|
+
run: |
|
|
20
|
+
python -m pip install --upgrade pip
|
|
21
|
+
pip install build twine
|
|
22
|
+
|
|
23
|
+
- name: Build and publish
|
|
24
|
+
env:
|
|
25
|
+
TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }}
|
|
26
|
+
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
|
|
27
|
+
run: |
|
|
28
|
+
python -m build
|
|
29
|
+
twine upload dist/*
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
name: Python Tests
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches: [ main, master ]
|
|
6
|
+
pull_request:
|
|
7
|
+
branches: [ main, master ]
|
|
8
|
+
|
|
9
|
+
jobs:
|
|
10
|
+
test:
|
|
11
|
+
runs-on: ubuntu-latest
|
|
12
|
+
strategy:
|
|
13
|
+
matrix:
|
|
14
|
+
python-version: ['3.7', '3.8', '3.9', '3.10']
|
|
15
|
+
|
|
16
|
+
steps:
|
|
17
|
+
- uses: actions/checkout@v3
|
|
18
|
+
|
|
19
|
+
- name: Set up Python ${{ matrix.python-version }}
|
|
20
|
+
uses: actions/setup-python@v4
|
|
21
|
+
with:
|
|
22
|
+
python-version: ${{ matrix.python-version }}
|
|
23
|
+
|
|
24
|
+
- name: Install dependencies
|
|
25
|
+
run: |
|
|
26
|
+
python -m pip install --upgrade pip
|
|
27
|
+
pip install -e ".[dev]"
|
|
28
|
+
|
|
29
|
+
- name: Lint with flake8
|
|
30
|
+
run: |
|
|
31
|
+
flake8 systemair_api
|
|
32
|
+
|
|
33
|
+
- name: Check types with mypy
|
|
34
|
+
run: |
|
|
35
|
+
mypy systemair_api
|
|
36
|
+
|
|
37
|
+
- name: Test with pytest
|
|
38
|
+
run: |
|
|
39
|
+
pytest --cov=systemair_api
|
|
40
|
+
|
|
41
|
+
- name: Upload coverage to Codecov
|
|
42
|
+
uses: codecov/codecov-action@v3
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
# .gitignore
|
|
2
|
+
|
|
3
|
+
# Environment variables
|
|
4
|
+
.env
|
|
5
|
+
|
|
6
|
+
# Python cache files
|
|
7
|
+
__pycache__/
|
|
8
|
+
*.py[cod]
|
|
9
|
+
*$py.class
|
|
10
|
+
*.so
|
|
11
|
+
.Python
|
|
12
|
+
build/
|
|
13
|
+
develop-eggs/
|
|
14
|
+
dist/
|
|
15
|
+
downloads/
|
|
16
|
+
eggs/
|
|
17
|
+
.eggs/
|
|
18
|
+
lib/
|
|
19
|
+
lib64/
|
|
20
|
+
parts/
|
|
21
|
+
sdist/
|
|
22
|
+
var/
|
|
23
|
+
wheels/
|
|
24
|
+
*.egg-info/
|
|
25
|
+
.installed.cfg
|
|
26
|
+
*.egg
|
|
27
|
+
|
|
28
|
+
# IDE specific files
|
|
29
|
+
.idea/
|
|
30
|
+
.vscode/
|
|
31
|
+
*.swp
|
|
32
|
+
*.swo
|
|
33
|
+
.DS_Store
|
|
34
|
+
|
|
35
|
+
# Logs
|
|
36
|
+
*.log
|
|
37
|
+
logs/
|
|
38
|
+
|
|
39
|
+
# Virtual environments
|
|
40
|
+
venv/
|
|
41
|
+
env/
|
|
42
|
+
ENV/
|
|
43
|
+
.env/
|
|
44
|
+
.venv/
|
|
45
|
+
env.bak/
|
|
46
|
+
venv.bak/
|
|
47
|
+
|
|
48
|
+
# Local development configuration
|
|
49
|
+
.env.local
|
|
50
|
+
.env.development.local
|
|
51
|
+
.env.test.local
|
|
52
|
+
.env.production.local
|
|
53
|
+
|
|
54
|
+
# Jupyter notebook
|
|
55
|
+
.ipynb_checkpoints
|
|
56
|
+
*.ipynb
|
|
57
|
+
|
|
58
|
+
# Package files
|
|
59
|
+
*.tar.gz
|
|
60
|
+
*.tgz
|
|
61
|
+
*.zip
|
|
62
|
+
|
|
63
|
+
# private notes
|
|
64
|
+
notes/
|
|
65
|
+
# Testing
|
|
66
|
+
.coverage
|
|
67
|
+
htmlcov/
|
|
68
|
+
.pytest_cache/
|
|
69
|
+
coverage.xml
|
|
70
|
+
.pytest_cache/
|
|
71
|
+
.tox/
|
|
72
|
+
nosetests.xml
|
|
73
|
+
.hypothesis/
|
|
74
|
+
|
|
75
|
+
# Documentation
|
|
76
|
+
/CLAUDE.md
|
|
77
|
+
/TODO.md
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
repos:
|
|
2
|
+
- repo: https://github.com/pre-commit/pre-commit-hooks
|
|
3
|
+
rev: v4.4.0
|
|
4
|
+
hooks:
|
|
5
|
+
- id: trailing-whitespace
|
|
6
|
+
- id: end-of-file-fixer
|
|
7
|
+
- id: check-yaml
|
|
8
|
+
- id: check-added-large-files
|
|
9
|
+
- id: debug-statements
|
|
10
|
+
- id: check-merge-conflict
|
|
11
|
+
- id: check-toml
|
|
12
|
+
|
|
13
|
+
- repo: https://github.com/psf/black
|
|
14
|
+
rev: 23.7.0
|
|
15
|
+
hooks:
|
|
16
|
+
- id: black
|
|
17
|
+
language_version: python3
|
|
18
|
+
|
|
19
|
+
- repo: https://github.com/pycqa/isort
|
|
20
|
+
rev: 5.12.0
|
|
21
|
+
hooks:
|
|
22
|
+
- id: isort
|
|
23
|
+
|
|
24
|
+
- repo: https://github.com/pycqa/flake8
|
|
25
|
+
rev: 6.1.0
|
|
26
|
+
hooks:
|
|
27
|
+
- id: flake8
|
|
28
|
+
additional_dependencies: [flake8-docstrings]
|
|
29
|
+
|
|
30
|
+
- repo: https://github.com/pre-commit/mirrors-mypy
|
|
31
|
+
rev: v1.5.1
|
|
32
|
+
hooks:
|
|
33
|
+
- id: mypy
|
|
34
|
+
additional_dependencies: [types-requests]
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
All notable changes to this project will be documented in this file.
|
|
4
|
+
|
|
5
|
+
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
|
6
|
+
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
|
+
|
|
8
|
+
## [Unreleased]
|
|
9
|
+
|
|
10
|
+
### Added
|
|
11
|
+
- GitHub issue templates
|
|
12
|
+
- Pre-commit hooks configuration
|
|
13
|
+
- More comprehensive error handling
|
|
14
|
+
- CONTRIBUTING.md with contribution guidelines
|
|
15
|
+
- CHANGELOG.md to track changes
|
|
16
|
+
- LICENSE file with MIT license
|
|
17
|
+
- MANIFEST.in file for package distribution
|
|
18
|
+
- Development dependencies in requirements-dev.txt
|
|
19
|
+
|
|
20
|
+
### Changed
|
|
21
|
+
- Improved package setup with proper metadata
|
|
22
|
+
- Enhanced documentation with more usage examples
|
|
23
|
+
- Updated README with PyPI installation instructions
|
|
24
|
+
- Refactored code structure for better organization
|
|
25
|
+
- Improved logging throughout the codebase
|
|
26
|
+
|
|
27
|
+
### Fixed
|
|
28
|
+
- Token refresh handling
|
|
29
|
+
|
|
30
|
+
## [0.1.0] - 2025-03-15
|
|
31
|
+
|
|
32
|
+
### Added
|
|
33
|
+
- Initial release
|
|
34
|
+
- Authentication with Systemair Home Solutions cloud
|
|
35
|
+
- Token management with automatic refresh
|
|
36
|
+
- Real-time monitoring via WebSocket connection
|
|
37
|
+
- Retrieve unit information and status
|
|
38
|
+
- Control ventilation modes and airflow levels
|
|
39
|
+
- Monitor temperatures, humidity, and air quality
|
|
40
|
+
- View and manage alarms
|
|
41
|
+
- Track active functions (heating, cooling, etc.)
|
|
42
|
+
- Unit testing suite with >85% code coverage
|
|
@@ -0,0 +1,154 @@
|
|
|
1
|
+
# Contributing to SystemAIR-API
|
|
2
|
+
|
|
3
|
+
First off, thank you for considering contributing to SystemAIR-API! We appreciate your time and effort, and every contribution helps make this project better for everyone.
|
|
4
|
+
|
|
5
|
+
This document provides guidelines and instructions for contributing to the project. Please read it before making any contributions.
|
|
6
|
+
|
|
7
|
+
## Table of Contents
|
|
8
|
+
|
|
9
|
+
- [Code of Conduct](#code-of-conduct)
|
|
10
|
+
- [How Can I Contribute?](#how-can-i-contribute)
|
|
11
|
+
- [Development Environment Setup](#development-environment-setup)
|
|
12
|
+
- [Code Style](#code-style)
|
|
13
|
+
- [Testing](#testing)
|
|
14
|
+
- [Pull Request Process](#pull-request-process)
|
|
15
|
+
- [Release Process](#release-process)
|
|
16
|
+
|
|
17
|
+
## Code of Conduct
|
|
18
|
+
|
|
19
|
+
This project and everyone participating in it is governed by a Code of Conduct that establishes expected behavior for our community. By participating, you are expected to uphold this code. Please report unacceptable behavior to the project maintainers.
|
|
20
|
+
|
|
21
|
+
## How Can I Contribute?
|
|
22
|
+
|
|
23
|
+
### Reporting Bugs
|
|
24
|
+
|
|
25
|
+
This section guides you through submitting a bug report. Following these guidelines helps maintainers understand your report and reproduce the issue.
|
|
26
|
+
|
|
27
|
+
- **Use the GitHub issue tracker**
|
|
28
|
+
- **Check if the bug has already been reported**
|
|
29
|
+
- **Use the bug report template**
|
|
30
|
+
- **Provide detailed steps to reproduce**
|
|
31
|
+
- **Describe the behavior you observed and what you expected to see**
|
|
32
|
+
- **Include relevant details about your environment** (OS, Python version, package versions, etc.)
|
|
33
|
+
|
|
34
|
+
### Suggesting Enhancements
|
|
35
|
+
|
|
36
|
+
This section guides you through submitting an enhancement suggestion, including completely new features and minor improvements to existing functionality.
|
|
37
|
+
|
|
38
|
+
- **Use the GitHub issue tracker**
|
|
39
|
+
- **Check if the enhancement has already been suggested**
|
|
40
|
+
- **Use the feature request template**
|
|
41
|
+
- **Provide a clear description of the enhancement**
|
|
42
|
+
- **Explain why this enhancement would be useful**
|
|
43
|
+
|
|
44
|
+
### Code Contributions
|
|
45
|
+
|
|
46
|
+
#### Pull Requests
|
|
47
|
+
|
|
48
|
+
- **Submit pull requests from a new branch, not master/main**
|
|
49
|
+
- **Follow the [pull request template](/.github/PULL_REQUEST_TEMPLATE.md)**
|
|
50
|
+
- **Make sure all tests pass**
|
|
51
|
+
- **Add new tests for new functionality**
|
|
52
|
+
- **Update documentation for new features**
|
|
53
|
+
|
|
54
|
+
## Development Environment Setup
|
|
55
|
+
|
|
56
|
+
Here's how to set up your development environment to work on SystemAIR-API:
|
|
57
|
+
|
|
58
|
+
1. **Fork the repository** (click the Fork button at the top right of the repository page)
|
|
59
|
+
|
|
60
|
+
2. **Clone your fork**:
|
|
61
|
+
```bash
|
|
62
|
+
git clone https://github.com/your-username/SystemAIR-API.git
|
|
63
|
+
cd SystemAIR-API
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
3. **Set up upstream remote**:
|
|
67
|
+
```bash
|
|
68
|
+
git remote add upstream https://github.com/Promises/SystemAIR-API.git
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
4. **Create a virtual environment and install dependencies**:
|
|
72
|
+
```bash
|
|
73
|
+
python -m venv .venv
|
|
74
|
+
source .venv/bin/activate # On Windows: .venv\Scripts\activate
|
|
75
|
+
|
|
76
|
+
# Install the package in development mode
|
|
77
|
+
pip install -e ".[dev]"
|
|
78
|
+
# Or install dependencies separately
|
|
79
|
+
pip install -r requirements.txt
|
|
80
|
+
pip install -r requirements-dev.txt
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
5. **Set up pre-commit hooks**:
|
|
84
|
+
```bash
|
|
85
|
+
pre-commit install
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
## Code Style
|
|
89
|
+
|
|
90
|
+
This project follows these code style guidelines:
|
|
91
|
+
|
|
92
|
+
- **Black** for code formatting with a line length of 88 characters
|
|
93
|
+
- **isort** for import sorting (configured to be compatible with Black)
|
|
94
|
+
- **mypy** for static type checking
|
|
95
|
+
- **flake8** for linting
|
|
96
|
+
|
|
97
|
+
Pre-commit hooks are set up to run these tools automatically before each commit.
|
|
98
|
+
|
|
99
|
+
## Testing
|
|
100
|
+
|
|
101
|
+
All code contributions should include appropriate tests:
|
|
102
|
+
|
|
103
|
+
- **Write tests for all new functionality**
|
|
104
|
+
- **Ensure existing tests pass for bug fixes**
|
|
105
|
+
- **Run the test suite before submitting a PR**:
|
|
106
|
+
```bash
|
|
107
|
+
pytest
|
|
108
|
+
```
|
|
109
|
+
|
|
110
|
+
- **Check test coverage**:
|
|
111
|
+
```bash
|
|
112
|
+
pytest --cov=systemair_api --cov-report=term --cov-report=html
|
|
113
|
+
```
|
|
114
|
+
|
|
115
|
+
## Pull Request Process
|
|
116
|
+
|
|
117
|
+
1. **Update your fork with the latest changes from upstream**:
|
|
118
|
+
```bash
|
|
119
|
+
git fetch upstream
|
|
120
|
+
git checkout main
|
|
121
|
+
git merge upstream/main
|
|
122
|
+
git push origin main
|
|
123
|
+
```
|
|
124
|
+
|
|
125
|
+
2. **Create a new branch for your feature or bugfix**:
|
|
126
|
+
```bash
|
|
127
|
+
git checkout -b feature/your-feature-name
|
|
128
|
+
# or
|
|
129
|
+
git checkout -b fix/your-bugfix-name
|
|
130
|
+
```
|
|
131
|
+
|
|
132
|
+
3. **Make your changes and commit them with clear, descriptive messages**
|
|
133
|
+
|
|
134
|
+
4. **Push your branch to GitHub**:
|
|
135
|
+
```bash
|
|
136
|
+
git push origin feature/your-feature-name
|
|
137
|
+
```
|
|
138
|
+
|
|
139
|
+
5. **Submit a pull request** through the GitHub website
|
|
140
|
+
|
|
141
|
+
6. **Update your PR if requested** after code review
|
|
142
|
+
|
|
143
|
+
## Release Process
|
|
144
|
+
|
|
145
|
+
The project maintainers follow this process for releases:
|
|
146
|
+
|
|
147
|
+
1. Update version number in appropriate files (setup.py, __init__.py, etc.)
|
|
148
|
+
2. Update CHANGELOG.md with notable changes
|
|
149
|
+
3. Create a new GitHub release with a tag matching the version number
|
|
150
|
+
4. Publish to PyPI
|
|
151
|
+
|
|
152
|
+
## Questions?
|
|
153
|
+
|
|
154
|
+
If you have any questions or need help with the contribution process, please open an issue or contact the project maintainers.
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2025 Henning Berge
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
include LICENSE
|
|
2
|
+
include README.md
|
|
3
|
+
include requirements.txt
|
|
4
|
+
include pytest.ini
|
|
5
|
+
include pyproject.toml
|
|
6
|
+
include example.env
|
|
7
|
+
recursive-exclude tests *
|
|
8
|
+
recursive-exclude notes *
|
|
9
|
+
recursive-exclude htmlcov *
|
|
10
|
+
recursive-exclude .venv *
|
|
11
|
+
global-exclude *.pyc
|
|
12
|
+
global-exclude __pycache__
|
|
13
|
+
global-exclude *.py[cod]
|
|
14
|
+
global-exclude *$py.class
|