meteocatpy 0.0.10 → 0.0.11

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 (40) hide show
  1. package/.github/workflows/release.yml +33 -33
  2. package/.gitlab-ci.yml +46 -46
  3. package/.pre-commit-config.yaml +37 -37
  4. package/.releaserc +23 -23
  5. package/.releaserc.toml +14 -14
  6. package/AUTHORS.md +12 -12
  7. package/CHANGELOG.md +171 -164
  8. package/README.md +61 -61
  9. package/filetree.py +48 -48
  10. package/filetree.txt +48 -48
  11. package/meteocatpy/README.md +61 -61
  12. package/meteocatpy/__init__.py +27 -27
  13. package/meteocatpy/const.py +10 -10
  14. package/meteocatpy/data.py +93 -93
  15. package/meteocatpy/exceptions.py +35 -35
  16. package/meteocatpy/forecast.py +137 -137
  17. package/meteocatpy/helpers.py +46 -46
  18. package/meteocatpy/stations.py +71 -71
  19. package/meteocatpy/symbols.py +89 -89
  20. package/meteocatpy/town.py +61 -61
  21. package/meteocatpy/townstations.py +99 -99
  22. package/meteocatpy/variables.py +77 -77
  23. package/meteocatpy/version.py +2 -2
  24. package/package.json +23 -23
  25. package/poetry.lock +3313 -3313
  26. package/pyproject.toml +72 -72
  27. package/releaserc.json +17 -17
  28. package/requirements.test.txt +3 -3
  29. package/setup.cfg +64 -64
  30. package/setup.py +10 -10
  31. package/tests/data_test.py +122 -122
  32. package/tests/import_test.py +18 -18
  33. package/tests/integration_test_complete.py +76 -76
  34. package/tests/integration_test_forecast.py +54 -54
  35. package/tests/integration_test_station_data.py +33 -33
  36. package/tests/integration_test_stations.py +31 -31
  37. package/tests/integration_test_symbols.py +68 -68
  38. package/tests/integration_test_town.py +32 -32
  39. package/tests/integration_test_town_stations.py +36 -36
  40. package/tests/integration_test_variables.py +32 -32
@@ -1,33 +1,33 @@
1
- name: Release
2
-
3
- on:
4
- push:
5
- branches:
6
- - master
7
-
8
- jobs:
9
- release:
10
- name: Create Release
11
- runs-on: ubuntu-latest
12
-
13
- steps:
14
- # Paso 1: Configurar el repositorio
15
- - name: Checkout repository
16
- uses: actions/checkout@v3
17
-
18
- # Paso 2: Configurar Node.js (requerido para semantic-release)
19
- - name: Set up Node.js
20
- uses: actions/setup-node@v3
21
- with:
22
- node-version: 20.8.1 # Versión compatible con semantic-release
23
-
24
- # Paso 3: Instalar dependencias necesarias
25
- - name: Install dependencies
26
- run: npm ci
27
-
28
- # Paso 4: Ejecutar semantic-release
29
- - name: Run semantic-release
30
- env:
31
- GITHUB_TOKEN: ${{ secrets.WORKFLOW_TOKEN }}
32
- NPM_TOKEN: ${{ secrets.NPM_WORKFLOW }}
33
- run: npx semantic-release
1
+ name: Release
2
+
3
+ on:
4
+ push:
5
+ branches:
6
+ - master
7
+
8
+ jobs:
9
+ release:
10
+ name: Create Release
11
+ runs-on: ubuntu-latest
12
+
13
+ steps:
14
+ # Paso 1: Configurar el repositorio
15
+ - name: Checkout repository
16
+ uses: actions/checkout@v3
17
+
18
+ # Paso 2: Configurar Node.js (requerido para semantic-release)
19
+ - name: Set up Node.js
20
+ uses: actions/setup-node@v3
21
+ with:
22
+ node-version: 20.8.1 # Versión compatible con semantic-release
23
+
24
+ # Paso 3: Instalar dependencias necesarias
25
+ - name: Install dependencies
26
+ run: npm ci
27
+
28
+ # Paso 4: Ejecutar semantic-release
29
+ - name: Run semantic-release
30
+ env:
31
+ GITHUB_TOKEN: ${{ secrets.WORKFLOW_TOKEN }}
32
+ NPM_TOKEN: ${{ secrets.NPM_WORKFLOW }}
33
+ run: npx semantic-release
package/.gitlab-ci.yml CHANGED
@@ -1,46 +1,46 @@
1
- stages:
2
- - github
3
- - pypi
4
-
5
- variables:
6
- BASE_URL: "https://api.meteo.cat"
7
- PYPI_USERNAME: $PRODUCTION_USERNAME # Usuario de PyPi
8
- PYPI_PASSWORD: $PRODUCTION_PASSWORD # Token de PyPi
9
- PYPI_API_TOKEN: $PYPI_API_TOKEN # Token de PyPi
10
- GL_TOKEN: $GL_TOKEN # Token de GitLab
11
- GH_TOKEN: $GH_TOKEN # Token de GitHub
12
- GH_REMOTE_URL: $GH_REMOTE_URL # GH Remote URL Repository
13
- GL_REMOTE_URL: $GL_REMOTE_URL # GL Remote URL Repository
14
- GIT_USER_NAME: $GIT_USER_NAME # USER NAME FOR GIT
15
- GIT_USER_EMAIL: $GIT_USER_EMAIL # USER EMAIL FOR GIT
16
- GIT_STRATEGY: fetch
17
- GIT_DEPTH: 0
18
-
19
- default:
20
- image: python:3.12.7
21
- before_script:
22
- - python -V # Verificar versión de Python
23
- - python -m pip install --upgrade pip
24
- - pip install poetry # Instalar Poetry
25
- - poetry config virtualenvs.create true # Activada la creación de entornos virtuales
26
- - poetry config virtualenvs.in-project true # Crear el virtualenv en el directorio del proyecto
27
- - poetry install # Instalar dependencias con Poetry
28
-
29
- github_job:
30
- stage: github
31
- script:
32
- - git checkout master # Asegurarse de estar en la rama master
33
- - git remote set-url origin "$GH_REMOTE_URL" # Cambiar la URL para GitHub
34
- # - poetry run semantic-release version # Generar nueva versión
35
- # - poetry run semantic-release publish # Ejecutar el comando para publicar el release
36
- - git push origin master # Hacer push al repositorio de GitHub
37
- allow_failure: true # Opcional: evita que el pipeline falle completamente
38
- only:
39
- - master
40
-
41
- pypy_job:
42
- stage: pypi
43
- script:
44
- - poetry publish --build -u "__token__" -p $PYPI_API_TOKEN # Usar el token de API de PyPI
45
- only:
46
- - master
1
+ stages:
2
+ - github
3
+ - pypi
4
+
5
+ variables:
6
+ BASE_URL: "https://api.meteo.cat"
7
+ PYPI_USERNAME: $PRODUCTION_USERNAME # Usuario de PyPi
8
+ PYPI_PASSWORD: $PRODUCTION_PASSWORD # Token de PyPi
9
+ PYPI_API_TOKEN: $PYPI_API_TOKEN # Token de PyPi
10
+ GL_TOKEN: $GL_TOKEN # Token de GitLab
11
+ GH_TOKEN: $GH_TOKEN # Token de GitHub
12
+ GH_REMOTE_URL: $GH_REMOTE_URL # GH Remote URL Repository
13
+ GL_REMOTE_URL: $GL_REMOTE_URL # GL Remote URL Repository
14
+ GIT_USER_NAME: $GIT_USER_NAME # USER NAME FOR GIT
15
+ GIT_USER_EMAIL: $GIT_USER_EMAIL # USER EMAIL FOR GIT
16
+ GIT_STRATEGY: fetch
17
+ GIT_DEPTH: 0
18
+
19
+ default:
20
+ image: python:3.12.7
21
+ before_script:
22
+ - python -V # Verificar versión de Python
23
+ - python -m pip install --upgrade pip
24
+ - pip install poetry # Instalar Poetry
25
+ - poetry config virtualenvs.create true # Activada la creación de entornos virtuales
26
+ - poetry config virtualenvs.in-project true # Crear el virtualenv en el directorio del proyecto
27
+ - poetry install # Instalar dependencias con Poetry
28
+
29
+ github_job:
30
+ stage: github
31
+ script:
32
+ - git checkout master # Asegurarse de estar en la rama master
33
+ - git remote set-url origin "$GH_REMOTE_URL" # Cambiar la URL para GitHub
34
+ # - poetry run semantic-release version # Generar nueva versión
35
+ # - poetry run semantic-release publish # Ejecutar el comando para publicar el release
36
+ - git push origin master # Hacer push al repositorio de GitHub
37
+ allow_failure: true # Opcional: evita que el pipeline falle completamente
38
+ only:
39
+ - master
40
+
41
+ pypy_job:
42
+ stage: pypi
43
+ script:
44
+ - poetry publish --build -u "__token__" -p $PYPI_API_TOKEN # Usar el token de API de PyPI
45
+ only:
46
+ - master
@@ -1,37 +1,37 @@
1
- repos:
2
- - repo: https://github.com/asottile/pyupgrade
3
- rev: v3.15.2
4
- hooks:
5
- - id: pyupgrade
6
- args: [--py37-plus]
7
- - repo: https://github.com/psf/black
8
- rev: 24.4.2
9
- hooks:
10
- - id: black
11
- args:
12
- - --safe
13
- - --quiet
14
- files: ^((homeassistant|script|tests)/.+)?[^/]+\.py$
15
- - repo: https://github.com/codespell-project/codespell
16
- rev: v2.2.6
17
- hooks:
18
- - id: codespell
19
- args:
20
- - --ignore-words-list=hass,alot,datas,dof,dur,farenheit,hist,iff,ines,ist,lightsensor,mut,nd,pres,referer,ser,serie,te,technik,ue,uint,visability,wan,wanna,withing
21
- - --skip="./.*,*.csv,*.json"
22
- - --quiet-level=2
23
- exclude_types: [csv, json]
24
- - repo: https://github.com/charliermarsh/ruff-pre-commit
25
- rev: v0.4.8
26
- hooks:
27
- - id: ruff
28
- args: [--fix, --exit-non-zero-on-fix]
29
- - id: ruff-format
30
- - repo: https://github.com/pre-commit/mirrors-mypy
31
- rev: v1.10.0
32
- hooks:
33
- - id: mypy
34
- args:
35
- - --pretty
36
- - --show-error-codes
37
- - --show-error-context
1
+ repos:
2
+ - repo: https://github.com/asottile/pyupgrade
3
+ rev: v3.15.2
4
+ hooks:
5
+ - id: pyupgrade
6
+ args: [--py37-plus]
7
+ - repo: https://github.com/psf/black
8
+ rev: 24.4.2
9
+ hooks:
10
+ - id: black
11
+ args:
12
+ - --safe
13
+ - --quiet
14
+ files: ^((homeassistant|script|tests)/.+)?[^/]+\.py$
15
+ - repo: https://github.com/codespell-project/codespell
16
+ rev: v2.2.6
17
+ hooks:
18
+ - id: codespell
19
+ args:
20
+ - --ignore-words-list=hass,alot,datas,dof,dur,farenheit,hist,iff,ines,ist,lightsensor,mut,nd,pres,referer,ser,serie,te,technik,ue,uint,visability,wan,wanna,withing
21
+ - --skip="./.*,*.csv,*.json"
22
+ - --quiet-level=2
23
+ exclude_types: [csv, json]
24
+ - repo: https://github.com/charliermarsh/ruff-pre-commit
25
+ rev: v0.4.8
26
+ hooks:
27
+ - id: ruff
28
+ args: [--fix, --exit-non-zero-on-fix]
29
+ - id: ruff-format
30
+ - repo: https://github.com/pre-commit/mirrors-mypy
31
+ rev: v1.10.0
32
+ hooks:
33
+ - id: mypy
34
+ args:
35
+ - --pretty
36
+ - --show-error-codes
37
+ - --show-error-context
package/.releaserc CHANGED
@@ -1,23 +1,23 @@
1
- {
2
- "branches": ["master"],
3
- "plugins": [
4
- "@semantic-release/commit-analyzer",
5
- "@semantic-release/release-notes-generator",
6
- [
7
- "@semantic-release/changelog",
8
- {
9
- "changelogFile": "CHANGELOG.md"
10
- }
11
- ],
12
- "@semantic-release/npm",
13
- "@semantic-release/github",
14
- [
15
- "@semantic-release/git",
16
- {
17
- "assets": ["CHANGELOG.md", "package.json", "pyproject.toml"],
18
- "message": "v${nextRelease.version}\n\n${nextRelease.notes}"
19
- }
20
- ]
21
- ],
22
- "repositoryUrl": "https://github.com/figorr/meteocatpy"
23
- }
1
+ {
2
+ "branches": ["master"],
3
+ "plugins": [
4
+ "@semantic-release/commit-analyzer",
5
+ "@semantic-release/release-notes-generator",
6
+ [
7
+ "@semantic-release/changelog",
8
+ {
9
+ "changelogFile": "CHANGELOG.md"
10
+ }
11
+ ],
12
+ "@semantic-release/npm",
13
+ "@semantic-release/github",
14
+ [
15
+ "@semantic-release/git",
16
+ {
17
+ "assets": ["CHANGELOG.md", "package.json", "pyproject.toml"],
18
+ "message": "v${nextRelease.version}\n\n${nextRelease.notes}"
19
+ }
20
+ ]
21
+ ],
22
+ "repositoryUrl": "https://github.com/figorr/meteocatpy"
23
+ }
package/.releaserc.toml CHANGED
@@ -1,14 +1,14 @@
1
- branches = ["master"]
2
-
3
- [plugins]
4
- "@semantic-release/gitlab" = {}
5
- "@semantic-release/github" = {}
6
- "@semantic-release/changelog" = {}
7
- "@semantic-release/commit-analyzer" = { preset = "conventional" }
8
- "@semantic-release/release-notes-generator" = {}
9
- "@semantic-release/git" = {}
10
-
11
- [[plugins]]
12
- path = "@semantic-release/git"
13
- assets = ["meteocatpy/version.py"]
14
- message = "chore(release): update version to ${nextRelease.version}"
1
+ branches = ["master"]
2
+
3
+ [plugins]
4
+ "@semantic-release/gitlab" = {}
5
+ "@semantic-release/github" = {}
6
+ "@semantic-release/changelog" = {}
7
+ "@semantic-release/commit-analyzer" = { preset = "conventional" }
8
+ "@semantic-release/release-notes-generator" = {}
9
+ "@semantic-release/git" = {}
10
+
11
+ [[plugins]]
12
+ path = "@semantic-release/git"
13
+ assets = ["meteocatpy/version.py"]
14
+ message = "chore(release): update version to ${nextRelease.version}"
package/AUTHORS.md CHANGED
@@ -1,12 +1,12 @@
1
- # Contributions to `meteocatpy`
2
-
3
- ## Owners
4
-
5
- - Figorr [GitLab](https://gitlab.com/figorr) [GitHub](https://github.com/figorr)
6
-
7
- ## Maintainers
8
-
9
- - Figorr [GitLab](https://gitlab.com/figorr) [GitHub](https://github.com/figorr)
10
-
11
- ## Contributors
12
-
1
+ # Contributions to `meteocatpy`
2
+
3
+ ## Owners
4
+
5
+ - Figorr [GitLab](https://gitlab.com/figorr) [GitHub](https://github.com/figorr)
6
+
7
+ ## Maintainers
8
+
9
+ - Figorr [GitLab](https://gitlab.com/figorr) [GitHub](https://github.com/figorr)
10
+
11
+ ## Contributors
12
+