Skip to content

Commit

Permalink
Releasing 8.0.0 (#478)
Browse files Browse the repository at this point in the history
* cd: Run publish-to-test-pypi only on development branch

* fix devcontainer (#468)

* Add start and end times to room class (#469)

* Remove deprecated code (#461)

* Remove deprecated code

* Remove old codeql config

* Remove unused fixture

* Minor clean up

* Refactor async_post_request

Signed-off-by: Tobias Sauerwein <[email protected]>

---------

Signed-off-by: Tobias Sauerwein <[email protected]>

* Split tests and clean up (#471)

* split tests

* clean up cruft

* Fix NLPD to provide energy readings

* Add BNLD - Bticino dimmable light

* Update readme (#472)

* Clean up somfy shutter
* Add new bticino scope
* update readme

* chore(deps): Bump actions/setup-python from 4.7.1 to 5.0.0 (#474)

Bumps [actions/setup-python](https://github.com/actions/setup-python) from 4.7.1 to 5.0.0.
- [Release notes](https://github.com/actions/setup-python/releases)
- [Commits](actions/setup-python@v4.7.1...v5.0.0)

---
updated-dependencies:
- dependency-name: actions/setup-python
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* add missing device type mapping for NIS (#476)

* Add power data to NLPD entities (#477)

* Clean up (#479)

---------

Signed-off-by: Tobias Sauerwein <[email protected]>
Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: Hugo Dupras <[email protected]>
Co-authored-by: deosrc <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
  • Loading branch information
4 people authored Dec 15, 2023
1 parent 3e3ec49 commit 0d3bf6b
Show file tree
Hide file tree
Showing 44 changed files with 1,325 additions and 7,086 deletions.
3 changes: 2 additions & 1 deletion .devcontainer/Dockerfile.dev
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,12 @@ SHELL ["/bin/bash", "-o", "pipefail", "-c"]

WORKDIR /workspaces

COPY Pipfile Pipfile.lock ./
COPY Pipfile ./

# Create Python requirements files from pipenv (lockfile)
RUN pip3 install -U pip \
&& pip3 install pipenv \
&& pipenv lock \
&& pipenv requirements > /tmp/requirements.txt \
&& pipenv requirements --dev > /tmp/requirements_dev.txt

Expand Down
68 changes: 0 additions & 68 deletions .github/workflows/codeql-analysis.yml

This file was deleted.

2 changes: 1 addition & 1 deletion .github/workflows/publish-to-pypi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
with:
fetch-depth: 0
- name: Set up Python 3.10
uses: actions/setup-python@v4.7.1
uses: actions/setup-python@v5.0.0
with:
python-version: 3.10.8
- name: Install dependencies
Expand Down
3 changes: 1 addition & 2 deletions .github/workflows/publish-to-test-pypi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ on:
push:
branches:
- development
- master


jobs:
Expand All @@ -17,7 +16,7 @@ jobs:
ref: development
fetch-depth: 0
- name: Set up Python 3.10
uses: actions/setup-python@v4.7.1
uses: actions/setup-python@v5.0.0
with:
python-version: 3.10.8
- name: Install dependencies
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/pythonpackage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
with:
fetch-depth: 0
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4.7.1
uses: actions/setup-python@v5.0.0
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
Expand All @@ -44,7 +44,7 @@ jobs:
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4.7.1
uses: actions/setup-python@v5.0.0
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
Expand All @@ -65,7 +65,7 @@ jobs:
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4.7.1
uses: actions/setup-python@v5.0.0
with:
python-version: ${{ matrix.python-version }}
- name: Run tests with tox
Expand Down
51 changes: 0 additions & 51 deletions .pylintrc

This file was deleted.

28 changes: 15 additions & 13 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,18 +9,21 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

### Added

- Bticino IP scopes
- Bticino dimmable light (BNLD)
- Start and end times to room class

### Changed

-
- Add power data to NLPD entities

### Deprecated

-

### Removed

-
- deprecated code

### Fixed

Expand Down Expand Up @@ -69,7 +72,6 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Add NLUF device stub
- Add TPSRS Somfy shutters


### Changed

- Update test fixture data to be in line with HA tests
Expand Down Expand Up @@ -128,11 +130,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Deprecated

- The following modules are deprecated and will be removed in pyatmo 8.0.0
- camera
- home_coach
- public_data
- thermostat
- weather_station
- camera
- home_coach
- public_data
- thermostat
- weather_station

## [7.0.0] - 2022-06-05

Expand All @@ -152,11 +154,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Deprecated

- The following modules are deprecated and will be removed in pyatmo 8.0.0
- camera
- home_coach
- public_data
- thermostat
- weather_station
- camera
- home_coach
- public_data
- thermostat
- weather_station

### Removed

Expand Down
22 changes: 8 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
pyatmo
======
# pyatmo

[![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/ambv/black)
[![GitHub Actions](https://github.com/jabesq/pyatmo/workflows/Python%20package/badge.svg)](https://github.com/jabesq/pyatmo/actions?workflow=Python+package)
Expand All @@ -11,16 +10,14 @@ pyatmo
>
> I apologize for any inconvenience this may cause, and I sincerely hope to have the capacity to allocate more time to this repository in the near future. Your understanding is greatly appreciated.
***

---

Simple API to access Netatmo devices and data like weather station or camera data from Python 3.
For more detailed information see [dev.netatmo.com](http://dev.netatmo.com)

This project has no relation with the Netatmo company.

Install
-------
## Install

To install pyatmo simply run:

Expand All @@ -31,14 +28,12 @@ Once installed you can simply add `pyatmo` to your Python 3 scripts by including

import pyatmo

Note
----
## Note

The module requires a valid user account and a registered application. See [usage.md](./usage.md) for further information.
The module requires a valid user account and a registered application.
Be aware that the module may stop working if Netatmo decides to change their API.

Development
-----------
## Development

Clone the repo and install dependencies:

Expand All @@ -51,8 +46,7 @@ To add the pre-commit hook to your environment run:
pip install pre-commit
pre-commit install

Testing
-------
## Testing

To run the full suite simply run the following command from within the virtual environment:

Expand All @@ -64,7 +58,7 @@ or

To generate code coverage xml (e.g. for use in VSCode) run

python -m pytest --cov-report xml:cov.xml --cov smart_home --cov-append tests/
python -m pytest --cov-report xml:cov.xml --cov pyatmo --cov-append tests/

Another way to run the tests is by using `tox`. This runs the tests against the installed package and multiple versions of python.

Expand Down
10 changes: 0 additions & 10 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -94,15 +94,6 @@ ignore = [
"UP038", # Use `X | Y` in `isinstance` call instead of `(X, Y)`
]

[tool.ruff.flake8-import-conventions.extend-aliases]
voluptuous = "vol"
"homeassistant.helpers.area_registry" = "ar"
"homeassistant.helpers.config_validation" = "cv"
"homeassistant.helpers.device_registry" = "dr"
"homeassistant.helpers.entity_registry" = "er"
"homeassistant.helpers.issue_registry" = "ir"
"homeassistant.util.dt" = "dt_util"

[tool.ruff.flake8-pytest-style]
fixture-parentheses = false

Expand All @@ -111,7 +102,6 @@ fixture-parentheses = false

[tool.ruff.isort]
force-sort-within-sections = true
known-first-party = ["homeassistant"]
combine-as-imports = true
split-on-trailing-comma = false

Expand Down
4 changes: 0 additions & 4 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,6 @@ exclude = tests
[options.package_data]
pyatmo = py.typed

[flake8]
max-line-length = 88
ignore = W503, E501

[pep8]
max-line-length = 88
ignore = W503, E501
Expand Down
21 changes: 1 addition & 20 deletions src/pyatmo/__init__.py
Original file line number Diff line number Diff line change
@@ -1,44 +1,25 @@
"""Expose submodules."""
from pyatmo import const, modules
from pyatmo.account import AsyncAccount
from pyatmo.auth import AbstractAsyncAuth, ClientAuth, NetatmoOAuth2
from pyatmo.camera import AsyncCameraData, CameraData
from pyatmo.auth import AbstractAsyncAuth
from pyatmo.exceptions import ApiError, InvalidHome, InvalidRoom, NoDevice, NoSchedule
from pyatmo.home import Home
from pyatmo.home_coach import AsyncHomeCoachData, HomeCoachData
from pyatmo.modules import Module
from pyatmo.modules.device_types import DeviceType
from pyatmo.public_data import AsyncPublicData, PublicData
from pyatmo.room import Room
from pyatmo.thermostat import AsyncHomeData, AsyncHomeStatus, HomeData, HomeStatus
from pyatmo.weather_station import AsyncWeatherStationData, WeatherStationData

__all__ = [
"AbstractAsyncAuth",
"ApiError",
"AsyncAccount",
"AsyncCameraData",
"AsyncHomeCoachData",
"AsyncHomeData",
"AsyncHomeStatus",
"AsyncPublicData",
"AsyncWeatherStationData",
"CameraData",
"ClientAuth",
"HomeCoachData",
"HomeData",
"HomeStatus",
"InvalidHome",
"InvalidRoom",
"Home",
"Module",
"Room",
"DeviceType",
"NetatmoOAuth2",
"NoDevice",
"NoSchedule",
"PublicData",
"WeatherStationData",
"const",
"modules",
]
Loading

0 comments on commit 0d3bf6b

Please sign in to comment.