-
Notifications
You must be signed in to change notification settings - Fork 15
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Nuova API sito GME e riscrittura generale #67
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
semplificazione dei blocchi condizionali spostata logica per trovare la data del prossimo cambio fascia in get_next_date, snellendo la funzione get_fascia
added vscode env to gitignore add logger for future use change in return types to match expect type or fn type return ordering and cleanup of imports
Imports are already pruned for new code, so there are missing import in this file!
switched base xml parser with defusedxml, as a wrapper of the base parser the sintax doesn't change fixes for date param format in API endpoint Better response handling Tries to load the zip only if the request is 200, otherwise logs the error moved the actual zip load after await Bump version, Drop bs4 requirement
inverted logic for time range comparison to use chained comparison Reasoning: comparing after 23 and before 7 requires or statement while checking between 8 and 19 can use chained comparison, which i think is more easy to understand.
fix for updated fascia simplify decode fascia def removed unnecessary override in property Added Release worflow in Github Actions With this action pushing on master creates a new patch version 0.0.+1 , we can override the bump with PR release label, or skip the creation of a release on commit with [norelease] in the commit title Improved request handling and errors exception
fixes Moved Exctract xml to utils module [norelease] bump version in manifest.json Added exceptions for linting known errors
-PunData holds the list of values for every pun band -Fascia Enumerates the bands Universally in the code -PunValues holds the dict of current values for the sensors, this way they are bonded to the enum definition and we can get type checking errors Main Changes: Coordinator: - replaced old for loop with dynamic one using the enum value to set and get pun values, simplified the check and setup of F23 - Removed number of values per pun as a separate dictionary, using len() when needed Interfaces: -New file, created Enum and Interfaces nedeed Sensor: -replace old static creation with a dynamic loop based on Enum Fascia, this way we can add Bands without having to edit all the various reference -Replaced definition of self.tipo with self.fascia using Enum -Simplified handle_coordinator_update using enum Utils: -Updated definitions and type return to Enum Fascia -Updated return type of exctract_xml to match PunData type -simplified append match statement with dynamic match General fixes to types and definitions moved holidays deps to utils non functional fixes Updated wrong type definition for PunSensorEntity removed unused decode fascia function correction to fmt_float type definition possible BREAKING CHANGE, new sensor ids definition di questa non sono sicuro, bisogna valutare bene che impatto ha sui gli user attuali, e considerata la natura dinamica della definizione dei nomi, nel caso ci fosse una variazione per cause non nostre, quale' l'impatto? per ora testo il funzionamento. hotfix missing initialization Revert for moddroid94@1987711 Cambiare id orfana gli altri sensori e non sembra esserci un helper per fare un merge dei sensori, per ora torniamo al behavior di dafult che non introduce breaking changes. hotfix per nome sensore prezzo fascia corrente Hotfixes fix for error in fascia F23 calculation better type definition in PunData removed unused orari dict removed redundant init Fixed F23 calculation, again. Update README.md [norelease] Test Custom Action removed old actions set local version to 0 fix test repo added requirements file automatic publishing of draft release comment edit to test merge. As documented in https://docs.github.com/en/actions/security-guides/automatic-token-authentication#using-the-github_token-in-a-workflow using GITHUB_TOKEN in an action won't trigger other actions (to avoid recursive calling) so the release action to upload and publish the draft release created by the drafter won't trigger, moving everything inside this action should make it run and publish everything, with the cost of having a little more runtime and if something fails in the draft the whole action will fail Revert "fixes to release action"
fix old change
Removed dependency as it will get pushed by action
Un errore nello zip viene gestito come un errore normale TODO implementare un errore custom in caso di errore di auth rimosso commento di test Fix riferimenti repo in release drafter e README per merge per: #45 (comment) #45 (comment) fix for permission in action
…effettuare tutte le request API allo stesso momento.
Refactor to Interfaces and Enums
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Versione parzialmente riscritta che sfrutta il nuovo sito web GME.
Non ci sono novità nelle funzionalità, solo nel codice che evita di appoggiarsi al sito storico, che verrà definitivamente abbandonato il 31/12/2024.
Maggiori informazioni nella discussione dell'issue #42 e nella pull-request #45 ormai integrata in questa.