meteocatpy 0.0.21 → 1.0.1

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.
package/CHANGELOG.md CHANGED
@@ -1,3 +1,19 @@
1
+ ## [1.0.1](https://github.com/figorr/meteocatpy/compare/v1.0.0...v1.0.1) (2025-02-05)
2
+
3
+
4
+ ### Bug Fixes
5
+
6
+ * 1.0.1 ([fc92ac1](https://github.com/figorr/meteocatpy/commit/fc92ac1fe40ff31cb0c38c5864d53209f42e128d))
7
+ * fix lightning api call code ([9abc092](https://github.com/figorr/meteocatpy/commit/9abc092b6951051279887d8ab09e2551371ea3b8))
8
+
9
+ ## [1.0.0](https://github.com/figorr/meteocatpy/compare/v0.0.20...v1.0.0) (2025-02-04)
10
+
11
+
12
+ ### Bug Fixes
13
+
14
+ * 1.0.0 ([c237e77](https://github.com/figorr/meteocatpy/commit/c237e7736f3504f19a1bb2e39ed7edd3264de115))
15
+
16
+
1
17
  ## [0.0.21](https://github.com/figorr/meteocatpy/compare/v0.0.20...v0.0.21) (2025-02-04)
2
18
 
3
19
 
@@ -14,12 +14,12 @@ from .exceptions import (
14
14
 
15
15
  _LOGGER = logging.getLogger(__name__)
16
16
 
17
- class MeteocatLightningData:
17
+ class MeteocatLightning:
18
18
  """Clase para interactuar con los datos de rayos de la API de Meteocat."""
19
19
 
20
20
  def __init__(self, api_key: str):
21
21
  """
22
- Inicializa la clase MeteocatStationData.
22
+ Inicializa la clase MeteocatLightning.
23
23
 
24
24
  Args:
25
25
  api_key (str): Clave de API para autenticar las solicitudes.
@@ -29,7 +29,6 @@ class MeteocatLightningData:
29
29
  "Content-Type": "application/json",
30
30
  "X-Api-Key": self.api_key,
31
31
  }
32
- self.variables = MeteocatVariables(api_key)
33
32
 
34
33
  @staticmethod
35
34
  def get_current_date():
@@ -1,2 +1,2 @@
1
1
  # version.py
2
- __version__ = "1.0.0"
2
+ __version__ = "1.0.1"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "meteocatpy",
3
- "version": "0.0.21",
3
+ "version": "1.0.1",
4
4
  "description": "[![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://opensource.org/licenses/Apache-2.0)\r [![Python version compatibility](https://img.shields.io/pypi/pyversions/meteocatpy)](https://pypi.org/project/meteocatpy)\r [![pipeline status](https://gitlab.com/figorr/meteocatpy/badges/master/pipeline.svg)](https://gitlab.com/figorr/meteocatpy/commits/master)",
5
5
  "main": "index.js",
6
6
  "directories": {
package/pyproject.toml CHANGED
@@ -1,6 +1,6 @@
1
1
  [tool.poetry]
2
2
  name = "meteocatpy"
3
- version = "1.0.0"
3
+ version = "1.0.1"
4
4
  description = "Script para obtener datos meteorológicos de la API de Meteocat"
5
5
  authors = ["figorr <jdcuartero@yahoo.es>"]
6
6
  license = "Apache-2.0"
@@ -2,7 +2,7 @@ import os
2
2
  import pytest
3
3
  import json
4
4
  from dotenv import load_dotenv
5
- from meteocatpy.lightning import MeteocatLightningData
5
+ from meteocatpy.lightning import MeteocatLightning
6
6
 
7
7
  # Cargar variables desde el archivo .env
8
8
  load_dotenv()
@@ -18,7 +18,7 @@ assert REGION_CODI_TEST, "Region codi test is required"
18
18
  @pytest.mark.asyncio
19
19
  async def test_lightning():
20
20
  # Crear una instancia de MeteocatLightningData con la API Key
21
- lightning_client = MeteocatLightningData(API_KEY)
21
+ lightning_client = MeteocatLightning(API_KEY)
22
22
 
23
23
  # Obtener los datos de rayos
24
24
  lightning_data = await lightning_client.get_lightning_data(REGION_CODI_TEST)
@@ -29,7 +29,7 @@ async def test_lightning():
29
29
  os.makedirs('tests/files', exist_ok=True)
30
30
 
31
31
  # Guardar los datos de rayos en un archivo JSON
32
- with open(f'tests/files/lightning_{REGION_CODI_TEST}_data.json', 'w', encoding='utf-8') as f:
32
+ with open(f'tests/files/lightning_{REGION_CODI_TEST}.json', 'w', encoding='utf-8') as f:
33
33
  json.dump(lightning_data, f, ensure_ascii=False, indent=4)
34
34
 
35
35
  # Verificar que los datos de rayos sean una lista