meteocat 3.2.0 → 4.0.0

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 (47) hide show
  1. package/.github/ISSUE_TEMPLATE/bug_report.md +45 -45
  2. package/.github/ISSUE_TEMPLATE/config.yml +8 -8
  3. package/.github/ISSUE_TEMPLATE/improvement.md +39 -39
  4. package/.github/ISSUE_TEMPLATE/new_function.md +41 -41
  5. package/.github/labels.yml +63 -63
  6. package/.github/workflows/autocloser.yaml +27 -27
  7. package/.github/workflows/close-on-label.yml +48 -48
  8. package/.github/workflows/force-sync-labels.yml +18 -18
  9. package/.github/workflows/hassfest.yaml +13 -13
  10. package/.github/workflows/publish-zip.yml +67 -67
  11. package/.github/workflows/release.yml +41 -41
  12. package/.github/workflows/stale.yml +63 -63
  13. package/.github/workflows/sync-gitlab.yml +107 -107
  14. package/.github/workflows/sync-labels.yml +21 -21
  15. package/.github/workflows/validate.yaml +16 -16
  16. package/.pre-commit-config.yaml +37 -37
  17. package/.releaserc +37 -37
  18. package/AUTHORS.md +13 -13
  19. package/CHANGELOG.md +954 -932
  20. package/README.md +207 -207
  21. package/conftest.py +11 -11
  22. package/custom_components/meteocat/__init__.py +298 -298
  23. package/custom_components/meteocat/condition.py +63 -63
  24. package/custom_components/meteocat/config_flow.py +613 -613
  25. package/custom_components/meteocat/const.py +132 -132
  26. package/custom_components/meteocat/helpers.py +58 -58
  27. package/custom_components/meteocat/manifest.json +25 -25
  28. package/custom_components/meteocat/options_flow.py +287 -287
  29. package/custom_components/meteocat/strings.json +1058 -1058
  30. package/custom_components/meteocat/translations/ca.json +1058 -1058
  31. package/custom_components/meteocat/translations/en.json +1058 -1058
  32. package/custom_components/meteocat/translations/es.json +1058 -1058
  33. package/custom_components/meteocat/version.py +1 -1
  34. package/custom_components/meteocat/weather.py +218 -218
  35. package/filetree.py +48 -48
  36. package/filetree.txt +79 -79
  37. package/hacs.json +8 -8
  38. package/info.md +11 -11
  39. package/package.json +22 -22
  40. package/poetry.lock +3222 -3222
  41. package/pyproject.toml +68 -68
  42. package/requirements.test.txt +3 -3
  43. package/setup.cfg +64 -64
  44. package/setup.py +10 -10
  45. package/tests/bandit.yaml +17 -17
  46. package/tests/conftest.py +19 -19
  47. package/tests/test_init.py +9 -9
package/pyproject.toml CHANGED
@@ -1,68 +1,68 @@
1
- [tool.poetry]
2
- name = "meteocat"
3
- version = "3.2.0"
4
- description = "Script para obtener datos meteorológicos de la API de Meteocat"
5
- authors = ["figorr <jdcuartero@yahoo.es>"]
6
- license = "Apache-2.0"
7
- readme = "README.md"
8
- repository = "https://gitlab.com/figorr/meteocat"
9
- keywords = ['meteocat']
10
- packages = [
11
- { include = "meteocat", from = "custom_components" }
12
- ]
13
-
14
-
15
- [tool.poetry.dependencies]
16
- python = ">=3.12,<4.0"
17
- requests = "^2.32.3"
18
- python-dotenv = "^1.0.1"
19
- simplejson = "^3.19.3"
20
- setuptools = "^75.5.0"
21
- python-semantic-release = "^9.14.0"
22
- twine = "^5.1.1"
23
- aiofiles = "^24.1.0"
24
- voluptuous = "^0.15.2"
25
- syrupy = "^4.8.0"
26
- semantic-release = "^0.1.0"
27
-
28
-
29
- [tool.semantic_release]
30
- branch = "master" # Define la rama desde la que se harán los lanzamientos
31
- version_source = "tag" # Usa los tags para calcular la versión
32
- version_variable = "custom_components/meteocat/version.py:__version__" # Ubicación de la variable de versión
33
- changelog = { file = "CHANGELOG.md" } # Genera el changelog en el archivo especificado
34
- upload_to_pypi = false # Sube automáticamente la versión a PyPI
35
- ci = false # Cambiar a false si no usas CI/CD
36
-
37
-
38
- [build-system]
39
- requires = ["poetry-core"]
40
- build-backend = "poetry.core.masonry.api"
41
-
42
-
43
- [tool.poetry.dev-dependencies]
44
- aresponses = "*"
45
- detox = "*"
46
- flake8 = "*"
47
- mypy = "*"
48
- pydocstyle = "*"
49
- pylint = "*"
50
- pytest-aiohttp = "*"
51
- pytest-cov = "*"
52
- python-semantic-release = "^9.14.0"
53
- tox = "*"
54
- safety = ">=1.8.7"
55
- black = { version = ">19.10b0", allow-prereleases = true }
56
- Sphinx = ">=3.5.0,<7.0.0"
57
- autoapi = ">=2.0.1"
58
- sphinx-rtd-theme = "^0.5.1"
59
- m2r2 = ">=0.2.7"
60
- tomlkit = ">=0.7.0"
61
- sphinx-autoapi = ">=1.7.0"
62
- sphinx-copybutton = ">=0.3.1"
63
- pipdeptree = "^2.2.1"
64
-
65
-
66
- [tool.poetry.group.dev.dependencies]
67
- pyupgrade = "^3.4.0"
68
- pre-commit = "^3.3.1"
1
+ [tool.poetry]
2
+ name = "meteocat"
3
+ version = "4.0.0"
4
+ description = "Script para obtener datos meteorológicos de la API de Meteocat"
5
+ authors = ["figorr <jdcuartero@yahoo.es>"]
6
+ license = "Apache-2.0"
7
+ readme = "README.md"
8
+ repository = "https://gitlab.com/figorr/meteocat"
9
+ keywords = ['meteocat']
10
+ packages = [
11
+ { include = "meteocat", from = "custom_components" }
12
+ ]
13
+
14
+
15
+ [tool.poetry.dependencies]
16
+ python = ">=3.12,<4.0"
17
+ requests = "^2.32.3"
18
+ python-dotenv = "^1.0.1"
19
+ simplejson = "^3.19.3"
20
+ setuptools = "^75.5.0"
21
+ python-semantic-release = "^9.14.0"
22
+ twine = "^5.1.1"
23
+ aiofiles = "^24.1.0"
24
+ voluptuous = "^0.15.2"
25
+ syrupy = "^4.8.0"
26
+ semantic-release = "^0.1.0"
27
+
28
+
29
+ [tool.semantic_release]
30
+ branch = "master" # Define la rama desde la que se harán los lanzamientos
31
+ version_source = "tag" # Usa los tags para calcular la versión
32
+ version_variable = "custom_components/meteocat/version.py:__version__" # Ubicación de la variable de versión
33
+ changelog = { file = "CHANGELOG.md" } # Genera el changelog en el archivo especificado
34
+ upload_to_pypi = false # Sube automáticamente la versión a PyPI
35
+ ci = false # Cambiar a false si no usas CI/CD
36
+
37
+
38
+ [build-system]
39
+ requires = ["poetry-core"]
40
+ build-backend = "poetry.core.masonry.api"
41
+
42
+
43
+ [tool.poetry.dev-dependencies]
44
+ aresponses = "*"
45
+ detox = "*"
46
+ flake8 = "*"
47
+ mypy = "*"
48
+ pydocstyle = "*"
49
+ pylint = "*"
50
+ pytest-aiohttp = "*"
51
+ pytest-cov = "*"
52
+ python-semantic-release = "^9.14.0"
53
+ tox = "*"
54
+ safety = ">=1.8.7"
55
+ black = { version = ">19.10b0", allow-prereleases = true }
56
+ Sphinx = ">=3.5.0,<7.0.0"
57
+ autoapi = ">=2.0.1"
58
+ sphinx-rtd-theme = "^0.5.1"
59
+ m2r2 = ">=0.2.7"
60
+ tomlkit = ">=0.7.0"
61
+ sphinx-autoapi = ">=1.7.0"
62
+ sphinx-copybutton = ">=0.3.1"
63
+ pipdeptree = "^2.2.1"
64
+
65
+
66
+ [tool.poetry.group.dev.dependencies]
67
+ pyupgrade = "^3.4.0"
68
+ pre-commit = "^3.3.1"
@@ -1,3 +1,3 @@
1
- pytest
2
- pytest-cov
3
- pytest-homeassistant-custom-component
1
+ pytest
2
+ pytest-cov
3
+ pytest-homeassistant-custom-component
package/setup.cfg CHANGED
@@ -1,64 +1,64 @@
1
- [coverage:run]
2
- source =
3
- custom_components
4
-
5
- [coverage:report]
6
- exclude_lines =
7
- pragma: no cover
8
- raise NotImplemented()
9
- if __name__ == '__main__':
10
- main()
11
- show_missing = true
12
-
13
- [tool:pytest]
14
- testpaths = tests
15
- norecursedirs = .git
16
- asyncio_mode = auto
17
- addopts =
18
- -p syrupy
19
- --strict
20
- --cov=custom_components
21
-
22
- [flake8]
23
- # https://github.com/ambv/black#line-length
24
- max-line-length = 88
25
- # E501: line too long
26
- # W503: Line break occurred before a binary operator
27
- # E203: Whitespace before ':'
28
- # D202 No blank lines allowed after function docstring
29
- # W504 line break after binary operator
30
- ignore =
31
- E501,
32
- W503,
33
- E203,
34
- D202,
35
- W504
36
-
37
- [isort]
38
- # https://github.com/timothycrosley/isort
39
- # https://github.com/timothycrosley/isort/wiki/isort-Settings
40
- # splits long import on multiple lines indented by 4 spaces
41
- multi_line_output = 3
42
- include_trailing_comma=True
43
- force_grid_wrap=0
44
- use_parentheses=True
45
- line_length=88
46
- indent = " "
47
- # by default isort don't check module indexes
48
- not_skip = __init__.py
49
- # will group `import x` and `from x import` of the same module.
50
- force_sort_within_sections = true
51
- sections = FUTURE,STDLIB,INBETWEENS,THIRDPARTY,FIRSTPARTY,LOCALFOLDER
52
- default_section = THIRDPARTY
53
- known_first_party = custom_components,tests
54
- forced_separate = tests
55
- combine_as_imports = true
56
-
57
- [mypy]
58
- python_version = 3.7
59
- ignore_errors = true
60
- follow_imports = silent
61
- ignore_missing_imports = true
62
- warn_incomplete_stub = true
63
- warn_redundant_casts = true
64
- warn_unused_configs = true
1
+ [coverage:run]
2
+ source =
3
+ custom_components
4
+
5
+ [coverage:report]
6
+ exclude_lines =
7
+ pragma: no cover
8
+ raise NotImplemented()
9
+ if __name__ == '__main__':
10
+ main()
11
+ show_missing = true
12
+
13
+ [tool:pytest]
14
+ testpaths = tests
15
+ norecursedirs = .git
16
+ asyncio_mode = auto
17
+ addopts =
18
+ -p syrupy
19
+ --strict
20
+ --cov=custom_components
21
+
22
+ [flake8]
23
+ # https://github.com/ambv/black#line-length
24
+ max-line-length = 88
25
+ # E501: line too long
26
+ # W503: Line break occurred before a binary operator
27
+ # E203: Whitespace before ':'
28
+ # D202 No blank lines allowed after function docstring
29
+ # W504 line break after binary operator
30
+ ignore =
31
+ E501,
32
+ W503,
33
+ E203,
34
+ D202,
35
+ W504
36
+
37
+ [isort]
38
+ # https://github.com/timothycrosley/isort
39
+ # https://github.com/timothycrosley/isort/wiki/isort-Settings
40
+ # splits long import on multiple lines indented by 4 spaces
41
+ multi_line_output = 3
42
+ include_trailing_comma=True
43
+ force_grid_wrap=0
44
+ use_parentheses=True
45
+ line_length=88
46
+ indent = " "
47
+ # by default isort don't check module indexes
48
+ not_skip = __init__.py
49
+ # will group `import x` and `from x import` of the same module.
50
+ force_sort_within_sections = true
51
+ sections = FUTURE,STDLIB,INBETWEENS,THIRDPARTY,FIRSTPARTY,LOCALFOLDER
52
+ default_section = THIRDPARTY
53
+ known_first_party = custom_components,tests
54
+ forced_separate = tests
55
+ combine_as_imports = true
56
+
57
+ [mypy]
58
+ python_version = 3.7
59
+ ignore_errors = true
60
+ follow_imports = silent
61
+ ignore_missing_imports = true
62
+ warn_incomplete_stub = true
63
+ warn_redundant_casts = true
64
+ warn_unused_configs = true
package/setup.py CHANGED
@@ -1,10 +1,10 @@
1
- from setuptools import setup
2
-
3
- # Leer la versión desde el archivo version.py
4
- with open("meteocat/version.py") as f:
5
- exec(f.read()) # Ejecuta el archivo version.py para cargar la variable __version__
6
-
7
- setup(
8
- name="meteocat",
9
- version=__version__, # Usa la versión cargada dinámicamente # type: ignore
10
- )
1
+ from setuptools import setup
2
+
3
+ # Leer la versión desde el archivo version.py
4
+ with open("meteocat/version.py") as f:
5
+ exec(f.read()) # Ejecuta el archivo version.py para cargar la variable __version__
6
+
7
+ setup(
8
+ name="meteocat",
9
+ version=__version__, # Usa la versión cargada dinámicamente # type: ignore
10
+ )
package/tests/bandit.yaml CHANGED
@@ -1,17 +1,17 @@
1
- # https://bandit.readthedocs.io/en/latest/config.html
2
-
3
- tests:
4
- - B108
5
- - B306
6
- - B307
7
- - B313
8
- - B314
9
- - B315
10
- - B316
11
- - B317
12
- - B318
13
- - B319
14
- - B320
15
- - B325
16
- - B602
17
- - B604
1
+ # https://bandit.readthedocs.io/en/latest/config.html
2
+
3
+ tests:
4
+ - B108
5
+ - B306
6
+ - B307
7
+ - B313
8
+ - B314
9
+ - B315
10
+ - B316
11
+ - B317
12
+ - B318
13
+ - B319
14
+ - B320
15
+ - B325
16
+ - B602
17
+ - B604
package/tests/conftest.py CHANGED
@@ -1,19 +1,19 @@
1
- """Fixtures for testing."""
2
-
3
- import pytest
4
- import sys
5
- import os
6
- from homeassistant.setup import async_setup_component
7
- from homeassistant.core import HomeAssistant
8
-
9
- # Agregar el directorio raíz al PYTHONPATH
10
- sys.path.insert(0, os.path.abspath(os.path.join(os.path.dirname(__file__), '..')))
11
-
12
- # Habilitar la integración personalizada 'meteocat' en el entorno de pruebas
13
- @pytest.fixture(autouse=True)
14
- async def auto_enable_custom_integrations(hass: HomeAssistant):
15
- """Enable custom integrations."""
16
- # Aquí se puede habilitar la integración personalizada 'meteocat'
17
- await async_setup_component(hass, 'meteocat', {})
18
- yield
19
- # Si es necesario, puedes hacer limpieza después de cada prueba
1
+ """Fixtures for testing."""
2
+
3
+ import pytest
4
+ import sys
5
+ import os
6
+ from homeassistant.setup import async_setup_component
7
+ from homeassistant.core import HomeAssistant
8
+
9
+ # Agregar el directorio raíz al PYTHONPATH
10
+ sys.path.insert(0, os.path.abspath(os.path.join(os.path.dirname(__file__), '..')))
11
+
12
+ # Habilitar la integración personalizada 'meteocat' en el entorno de pruebas
13
+ @pytest.fixture(autouse=True)
14
+ async def auto_enable_custom_integrations(hass: HomeAssistant):
15
+ """Enable custom integrations."""
16
+ # Aquí se puede habilitar la integración personalizada 'meteocat'
17
+ await async_setup_component(hass, 'meteocat', {})
18
+ yield
19
+ # Si es necesario, puedes hacer limpieza después de cada prueba
@@ -1,9 +1,9 @@
1
- """Test component setup."""
2
- from homeassistant.setup import async_setup_component
3
-
4
- from custom_components.meteocat.const import DOMAIN
5
-
6
-
7
- async def test_async_setup(hass):
8
- """Test the component gets setup."""
9
- assert await async_setup_component(hass, DOMAIN, {}) is True
1
+ """Test component setup."""
2
+ from homeassistant.setup import async_setup_component
3
+
4
+ from custom_components.meteocat.const import DOMAIN
5
+
6
+
7
+ async def test_async_setup(hass):
8
+ """Test the component gets setup."""
9
+ assert await async_setup_component(hass, DOMAIN, {}) is True