pytouchlinesl 0.3.0__tar.gz → 0.5.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.
Files changed (22) hide show
  1. {pytouchlinesl-0.3.0/pytouchlinesl.egg-info → pytouchlinesl-0.5.0}/PKG-INFO +15 -3
  2. {pytouchlinesl-0.3.0 → pytouchlinesl-0.5.0}/README.md +11 -0
  3. {pytouchlinesl-0.3.0 → pytouchlinesl-0.5.0}/pyproject.toml +2 -2
  4. {pytouchlinesl-0.3.0 → pytouchlinesl-0.5.0}/pytouchlinesl/client/client.py +7 -15
  5. {pytouchlinesl-0.3.0 → pytouchlinesl-0.5.0}/pytouchlinesl/client/models/models.py +3 -6
  6. {pytouchlinesl-0.3.0 → pytouchlinesl-0.5.0/pytouchlinesl.egg-info}/PKG-INFO +15 -3
  7. {pytouchlinesl-0.3.0 → pytouchlinesl-0.5.0}/pytouchlinesl.egg-info/requires.txt +1 -1
  8. {pytouchlinesl-0.3.0 → pytouchlinesl-0.5.0}/LICENSE +0 -0
  9. {pytouchlinesl-0.3.0 → pytouchlinesl-0.5.0}/pytouchlinesl/__init__.py +0 -0
  10. {pytouchlinesl-0.3.0 → pytouchlinesl-0.5.0}/pytouchlinesl/client/__init__.py +0 -0
  11. {pytouchlinesl-0.3.0 → pytouchlinesl-0.5.0}/pytouchlinesl/client/base.py +0 -0
  12. {pytouchlinesl-0.3.0 → pytouchlinesl-0.5.0}/pytouchlinesl/client/models/__init__.py +0 -0
  13. {pytouchlinesl-0.3.0 → pytouchlinesl-0.5.0}/pytouchlinesl/module.py +0 -0
  14. {pytouchlinesl-0.3.0 → pytouchlinesl-0.5.0}/pytouchlinesl/touchlinesl.py +0 -0
  15. {pytouchlinesl-0.3.0 → pytouchlinesl-0.5.0}/pytouchlinesl/zone.py +0 -0
  16. {pytouchlinesl-0.3.0 → pytouchlinesl-0.5.0}/pytouchlinesl.egg-info/SOURCES.txt +0 -0
  17. {pytouchlinesl-0.3.0 → pytouchlinesl-0.5.0}/pytouchlinesl.egg-info/dependency_links.txt +0 -0
  18. {pytouchlinesl-0.3.0 → pytouchlinesl-0.5.0}/pytouchlinesl.egg-info/top_level.txt +0 -0
  19. {pytouchlinesl-0.3.0 → pytouchlinesl-0.5.0}/setup.cfg +0 -0
  20. {pytouchlinesl-0.3.0 → pytouchlinesl-0.5.0}/tests/test_module.py +0 -0
  21. {pytouchlinesl-0.3.0 → pytouchlinesl-0.5.0}/tests/test_touchlinesl.py +0 -0
  22. {pytouchlinesl-0.3.0 → pytouchlinesl-0.5.0}/tests/test_zone.py +0 -0
@@ -1,6 +1,6 @@
1
- Metadata-Version: 2.1
1
+ Metadata-Version: 2.4
2
2
  Name: pytouchlinesl
3
- Version: 0.3.0
3
+ Version: 0.5.0
4
4
  Summary: An API client for Roth's TouchlineSL control system.
5
5
  Author-email: Jon Seager <jon@sgrs.uk>
6
6
  Project-URL: Homepage, https://github.com/jnsgruk/pytouchlinesl
@@ -12,11 +12,12 @@ Requires-Python: >=3.10
12
12
  Description-Content-Type: text/markdown
13
13
  License-File: LICENSE
14
14
  Requires-Dist: aiohttp
15
- Requires-Dist: pydantic
15
+ Requires-Dist: pydantic>=2
16
16
  Provides-Extra: dev
17
17
  Requires-Dist: pytest; extra == "dev"
18
18
  Requires-Dist: pytest-asyncio; extra == "dev"
19
19
  Requires-Dist: ruff; extra == "dev"
20
+ Dynamic: license-file
20
21
 
21
22
  # A Python Library for Roth's TouchlineSL System
22
23
 
@@ -97,6 +98,8 @@ if __name__ == "__main__":
97
98
  Contributions in either code or documentation are welcome. The set of features is limited at the
98
99
  moment, but I'm happy to expand as the need arises.
99
100
 
101
+ Commit messages and PR titles should be formatted using [Conventional Commits](https://www.conventionalcommits.org/en/v1.0.0/).
102
+
100
103
  The project does not have many dependencies; just `asyncio` and `pytest`/`pytest-asyncio` for
101
104
  testing.
102
105
 
@@ -137,3 +140,12 @@ ruff check --fix
137
140
  # Format the code
138
141
  ruff format
139
142
  ```
143
+
144
+ ## Releasing
145
+
146
+ Once all the changes have been merged into `main` for a release, use the
147
+ [`.github/tag-release`](./.github/tag-release.sh) script to create a version bump commit in the
148
+ right format, create, **and push** the tag ready for release.
149
+
150
+ This could be automated with Github Actions - but commit signing gets a little complicated, so for
151
+ now it's just a script that can be run by maintainers.
@@ -77,6 +77,8 @@ if __name__ == "__main__":
77
77
  Contributions in either code or documentation are welcome. The set of features is limited at the
78
78
  moment, but I'm happy to expand as the need arises.
79
79
 
80
+ Commit messages and PR titles should be formatted using [Conventional Commits](https://www.conventionalcommits.org/en/v1.0.0/).
81
+
80
82
  The project does not have many dependencies; just `asyncio` and `pytest`/`pytest-asyncio` for
81
83
  testing.
82
84
 
@@ -117,3 +119,12 @@ ruff check --fix
117
119
  # Format the code
118
120
  ruff format
119
121
  ```
122
+
123
+ ## Releasing
124
+
125
+ Once all the changes have been merged into `main` for a release, use the
126
+ [`.github/tag-release`](./.github/tag-release.sh) script to create a version bump commit in the
127
+ right format, create, **and push** the tag ready for release.
128
+
129
+ This could be automated with Github Actions - but commit signing gets a little complicated, so for
130
+ now it's just a script that can be run by maintainers.
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "pytouchlinesl"
3
- version = "0.3.0"
3
+ version = "0.5.0"
4
4
  authors = [{ name = "Jon Seager", email = "jon@sgrs.uk" }]
5
5
  description = "An API client for Roth's TouchlineSL control system."
6
6
  readme = "README.md"
@@ -10,7 +10,7 @@ classifiers = [
10
10
  "License :: OSI Approved :: Apache Software License",
11
11
  "Operating System :: OS Independent",
12
12
  ]
13
- dependencies = ["aiohttp", "pydantic"]
13
+ dependencies = ["aiohttp", "pydantic>=2"]
14
14
 
15
15
  [project.optional-dependencies]
16
16
  dev = ["pytest", "pytest-asyncio", "ruff"]
@@ -103,6 +103,7 @@ class RothAPI(BaseClient):
103
103
  await self._login()
104
104
 
105
105
  resp = await self._authed_get(f"/users/{self._user_id}/modules/{module_id}")
106
+
106
107
  return ModuleModel(**resp)
107
108
 
108
109
  async def set_zone_temperature(
@@ -139,21 +140,12 @@ class RothAPI(BaseClient):
139
140
  or z.zone.id == zone_id
140
141
  ]
141
142
 
142
- # pydantic v1 compatibility
143
- try:
144
- p0_intervals = [
145
- i.dict(by_alias=True) for i in schedule.p0_intervals if i.start != 6100
146
- ]
147
- p1_intervals = [
148
- i.dict(by_alias=True) for i in schedule.p1_intervals if i.start != 6100
149
- ]
150
- except AttributeError:
151
- p0_intervals = [
152
- i.model_dump(by_alias=True) for i in schedule.p0_intervals if i.start != 6100
153
- ]
154
- p1_intervals = [
155
- i.model_dump(by_alias=True) for i in schedule.p1_intervals if i.start != 6100
156
- ]
143
+ p0_intervals = [
144
+ i.model_dump(by_alias=True) for i in schedule.p0_intervals if i.start != 6100
145
+ ]
146
+ p1_intervals = [
147
+ i.model_dump(by_alias=True) for i in schedule.p1_intervals if i.start != 6100
148
+ ]
157
149
 
158
150
  # TODO: This be simplified with Pydantic models
159
151
  data = {
@@ -6,10 +6,7 @@ tweaks to types and names.
6
6
 
7
7
  from typing import Any, Dict, List, Literal, Optional
8
8
 
9
- try:
10
- from pydantic.v1 import BaseModel, Field
11
- except ImportError:
12
- from pydantic import BaseModel, Field
9
+ from pydantic import BaseModel, Field
13
10
 
14
11
 
15
12
  class ZoneFlagsModel(BaseModel):
@@ -129,7 +126,7 @@ class ZonesModel(BaseModel):
129
126
 
130
127
 
131
128
  class ParamsModel(BaseModel):
132
- description: Optional[str]
129
+ description: Optional[str] = None
133
130
  working_status: Optional[bool] = Field(None, alias="workingStatus")
134
131
  txt_id: Optional[int] = Field(None, alias="txtId")
135
132
  icon_id: Optional[int] = Field(None, alias="iconId")
@@ -171,7 +168,7 @@ class AccountModuleModel(BaseModel):
171
168
  country: Optional[str] = None
172
169
  gmt_id: Optional[int] = Field(None, alias="gmtId")
173
170
  gmt_time: Optional[str] = Field(None, alias="gmtTime")
174
- postcode_policy_accepted: bool = Field(None, alias="postcodePolicyAccepted")
171
+ postcode_policy_accepted: Optional[bool] = Field(None, alias="postcodePolicyAccepted")
175
172
  style: Optional[str] = None
176
173
  version: Optional[str] = None
177
174
  company: Optional[str] = None
@@ -1,6 +1,6 @@
1
- Metadata-Version: 2.1
1
+ Metadata-Version: 2.4
2
2
  Name: pytouchlinesl
3
- Version: 0.3.0
3
+ Version: 0.5.0
4
4
  Summary: An API client for Roth's TouchlineSL control system.
5
5
  Author-email: Jon Seager <jon@sgrs.uk>
6
6
  Project-URL: Homepage, https://github.com/jnsgruk/pytouchlinesl
@@ -12,11 +12,12 @@ Requires-Python: >=3.10
12
12
  Description-Content-Type: text/markdown
13
13
  License-File: LICENSE
14
14
  Requires-Dist: aiohttp
15
- Requires-Dist: pydantic
15
+ Requires-Dist: pydantic>=2
16
16
  Provides-Extra: dev
17
17
  Requires-Dist: pytest; extra == "dev"
18
18
  Requires-Dist: pytest-asyncio; extra == "dev"
19
19
  Requires-Dist: ruff; extra == "dev"
20
+ Dynamic: license-file
20
21
 
21
22
  # A Python Library for Roth's TouchlineSL System
22
23
 
@@ -97,6 +98,8 @@ if __name__ == "__main__":
97
98
  Contributions in either code or documentation are welcome. The set of features is limited at the
98
99
  moment, but I'm happy to expand as the need arises.
99
100
 
101
+ Commit messages and PR titles should be formatted using [Conventional Commits](https://www.conventionalcommits.org/en/v1.0.0/).
102
+
100
103
  The project does not have many dependencies; just `asyncio` and `pytest`/`pytest-asyncio` for
101
104
  testing.
102
105
 
@@ -137,3 +140,12 @@ ruff check --fix
137
140
  # Format the code
138
141
  ruff format
139
142
  ```
143
+
144
+ ## Releasing
145
+
146
+ Once all the changes have been merged into `main` for a release, use the
147
+ [`.github/tag-release`](./.github/tag-release.sh) script to create a version bump commit in the
148
+ right format, create, **and push** the tag ready for release.
149
+
150
+ This could be automated with Github Actions - but commit signing gets a little complicated, so for
151
+ now it's just a script that can be run by maintainers.
@@ -1,5 +1,5 @@
1
1
  aiohttp
2
- pydantic
2
+ pydantic>=2
3
3
 
4
4
  [dev]
5
5
  pytest
File without changes
File without changes