Releases: aschmere/dwd_global_radiation
Release 1.1.0rc6
Enhancements:
- Improved Forecast Retrieval: Refactored the
get_forecast_for_future_hourmethod inLocationto return a dictionary directly instead of a JSON string. This enhancement simplifies the handling of forecast data and reduces potential errors related to JSON string processing.
Details:
- The
get_forecast_for_future_hourmethod now ensures that forecast data is returned as a dictionary. This change improves the usability of the method and aligns with best practices for data handling in Python. - Users of the Python package will now receive forecast data as a structured dictionary, making it easier to work with and integrate into other systems.
Version Update:
- Bumped the version in
setup.pyto1.1.0rc6to reflect these improvements and changes.
This release focuses on enhancing the internal methods of the package to provide more robust and user-friendly functionality for forecast retrieval.
Release 1.1.0rc5
Features
- Add function to get forecast for a specific future hour
- Implemented the
get_forecast_for_future_hourmethod in theLocationclass to retrieve the forecast for a specific hour in the future. - The method takes a
datetime_inputparameter and anumber_of_hoursparameter, finds the corresponding forecast entry, and returns it in JSON format. If no forecast is found, an error message is returned. - Ensured the
datetime_inputparameter is timezone-aware and returns the forecast timestamp in UTC format. - Rounded the
sisvalue to 0 decimal places.
- Implemented the
Improvements
- Update setup.py
- Bumped the version to
1.1.0rc5.
- Bumped the version to
This release introduces a new method to retrieve specific hourly forecasts, ensuring accurate and timezone-aware timestamps, along with rounding improvements for the forecast values.
Release Note for 1.0.0rc4
Version: 1.0.0rc4
Release Date: 30th May 2024
This release updates the package version to 1.0.0rc4. There are no functional changes or new features in this release compared to 1.0.0rc1.
Note: Intermediate versions 1.0.0rc2 and 1.0.0rc3 were used for testing purposes to address specific import issues with Home Assistant when automatically installing the required netCDF package. These versions have now been consolidated, and 1.0.0rc4 reverts to the stable state of 1.0.0rc1.
Release Notes for Version 1.1.0rc1
Overview
This is the release of version 1.1.0rc1 of the GlobalRadiation package. This release includes significant performance improvements, code refactoring, and preparations for the upcoming official release. Below is a summary of the key changes and improvements.
Key Changes and Improvements
Caching Functionality
- Introduced Caching for Measurements and Forecasts:
- Implemented caching mechanisms to store recently fetched measurement and forecast data.
- This improvement enhances performance by reducing redundant data retrieval operations and speeds up data access.
Code Refactoring
- Refactored Printing-Related Code:
- Moved all printing-related functions and classes from the main
GlobalRadiationclass to a new moduleglobal_radiation_printer. - This refactoring adheres to the Single Responsibility Principle (SRP) and enhances code modularity and maintainability.
- The new module includes:
IndentConfig: Manages indentation settings for pretty-printing data outputs.FormatConfig: Encapsulates formatting details such as date/time format and local timezone.PrintConfig: Sets configuration parameters for the global radiation print service.- Functions for printing headers, measurements, forecasts, single measurement entries, tabulated data, and single forecast entries.
- Moved all printing-related functions and classes from the main
Version Update
- Prepare for Upcoming Release:
- Updated the version number in
setup.pyto1.1.0rc1to indicate the preparation for the upcoming release on PyPI. - This version update reflects the inclusion of new features and significant improvements in the package.
- Updated the version number in
Detailed Changes
-
Caching:
- Added mechanisms to cache measurement and forecast data to avoid redundant network requests.
- Improved performance and efficiency by using cached data where appropriate.
-
Printer Module:
- Separated all printing functionalities into a dedicated module
global_radiation_printer.py. - Enhanced readability and maintainability of the codebase by adhering to the Single Responsibility Principle (SRP).
- Separated all printing functionalities into a dedicated module
Release 1.0.0rc8
Description
This pre-release includes important bug fixes and enhancements to ensure the correct resetting of measurements and forecasts during data fetch operations. Additionally, the version has been updated to 1.0.0rc7a.
Bug Fixes
- Reset Measurements: Ensured that measurements for every location are reset at the beginning of each
fetch_measurements()call. This prevents the accumulation of measurement values across multiple runs. - Reset Forecasts: Modified the
fetch_forecasts()method to reset the forecasts object for each location, ensuring that outdated forecast data is not retained.
Enhancements
- Version Bump: Updated the version in
setup.pyto1.0.0rc8to reflect these changes.
v1.0.0rc7: Enhanced JSON Serialization and Version Update
Description:
This release includes several key updates and improvements:
-
Added
to_dictMethods:- Implemented
to_dictmethods across various classes to enable easy JSON serialization. This ensures that our objects can be seamlessly converted to JSON format, which is essential for compatibility with Home Assistant and other systems that utilize JSON data.
- Implemented
-
Version Update:
- Updated the version to
1.0.0rc7insetup.pyto prepare for the publication of this new release.
- Updated the version to
Changes:
-
JSON Serialization:
- Added
to_dictmethods in the following classes:MeasurementEntryMeasurementForecastEntryForecastLocationGlobalRadiation
- These methods ensure that all attributes are converted to a format compatible with JSON serialization, handling native and NumPy types appropriately.
- Added
-
Version Bump:
- Updated the project version to
1.0.0rc7to reflect the new features and improvements.
- Updated the project version to
Release 1.0.0rc6
- Add 1.0.0rc6 to setup.py
- Add "remove_location" method
Release 1.0.0rc5
Relax numpy requirement from >=1.26.4 to 1.26.0 in release 1.0.0rc5
Release 1.0.0rc4
What's New
- Version Update: Bumped the version in
setup.pyfrom1.0.0rc3to1.0.0rc4.
Improvements
- Optimization: Optimized the
_get_nearest_grid_pointfunction by leveraging the known grid resolution. This change significantly reduces the number of points checked by calculating only the four nearest grid points based on the given latitude and longitude, improving the efficiency of the function.
Detailed Release Notes
-
Version Update:
- Updated the version in
setup.pyto1.0.0rc4to reflect the latest changes and improvements.
- Updated the version in
-
Function Optimization:
- Improved the
_get_nearest_grid_pointfunction:- Removed the unused
coordinatesvariable. - Optimized the function to check only the four nearest grid points, reducing computational overhead and enhancing performance.
- Removed the unused
- Improved the
1.0.0rc3 - Fix repository link in setup.py
See Readme.md