Pysolorie

Latest version: v1.5.6

Safety actively analyzes 623315 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 1 of 3

1.5.6

-------------

Release date: 2023-12-29


Fixed

- Introduced a new exception class ``InvalidObserverLatitudeError`` in ``exceptions.py`` for better error handling of invalid observer latitude values.
- Updated ``IrradiationCalculator`` in ``numerical_integration.py`` to handle cases where the ``irradiance_components`` dictionary is empty, providing a meaningful return value based on observer latitude.
- Fixed ``Observer`` class validation in ``observer.py`` to include a check for the observer's latitude being within the valid range.


Testing

- Added test case ``test_calculate_sunrise_sunset_invalid_latitude`` to ensure exceptions are properly raised for invalid latitude inputs.
- Added missing tests for invalid observer latitude in ``test_observer.py``.

1.5.5

-------------

Release date: 2023-12-28

Fixed

- Removed the logs of ``observer.py``

1.5.4

-------------

Release date: 2023-12-28

Fixed

- Removed the logs of unnecessary function calls.

1.5.3

-------------

Release date: 2023-12-28

Changed


- Improved documentation and code comments to clarify the calculation and representation of direct irradiation, rather than total direct irradiation.
- Standardized exception handling in the ``observer.py`` by decorating relevant methods, ensuring consistency in logging exceptions.
- Made code improvements in ``tests/test_*`` files for comprehensive coverage and robust testing of the solar irradiation logic under different geographical and temporal conditions.

Fixed

- Modified ``numerical_integration.py`` to return 0 for direct irradiation during the polar night when the sun does not rise.
- Addressed improper handling of zero values for sunrise and sunset hour angles representing extreme latitude scenarios (Midnight Sun and Polar Night).
- Enhanced the ``observer.py`` to handle cases of Midnight Sun and Polar Night with appropriate logging for exceptional circumstances.
- Fixed issues with missing logger instances in ``plotter.py`` by correctly setting up decorators and ensuring log messages are adequately recorded.

Documentation

- Refactored ``README.md`` for syntactical accuracy in the representation of solar irradiance and optimized the explanation of solar panel orientation.
- Updated all instances in documentation where "total direct irradiation" was mentioned to "direct irradiation" to maintain consistency with the recent code updates.
- Included explanation for Midnight Sun and Polar Night phenomena in solar irradiance context to educate users about edge cases in solar panel energy calculations.
- Refined code examples and added clarifications on special cases where zero irradiation is expected, enhancing the user's understanding.

Testing

- Expanded the test suite to cover new scenarios, like polar regions and edge calendar days where the sun's behavior significantly differs (e.g., Midnight Sun and Polar Night).
- Implemented additional assertions in unit tests to cover the new edge cases introduced by the recent geographic and temporal scenarios handled in the update.

1.5.2

-------------

Release date: 2023-12-23

Changed


- Refactoring in various modules (``plotter.py``, ``report.py``, ``tests/test_pysolorie.py``, etc.) to improve code clarity and reduce the complexity.
- Renamed "optimal orientation" to "optimal tilt angle" in the README, documentation, and examples to more accurately reflect solar panel positioning.
- Updated and clarified solar irradiance discussion in the paper draft, along with audience benefits, terminology, and code usage in the README and documentation.
- Improved various code samples across the documentation for enhanced clarity and consistency.

Fixed


- Fixed the incorrect setting of logger instances within several classes and refactored the decorating function to correctly set the logger attribute.
- Resolved mypy type checking errors by adding type ignore comments where necessary.


Testing


- Extensive refactoring of test cases, with tests being moved to newly named files according to their respective functionalities.
- Addition of test cases for new refactorings and exception handling enhancements to ensure code reliability and correctness.

Documentation


- Amended the Sphinx configuration with the ``sphinx-copybutton`` extension and updated the packages list to include the extension.
- Corrected and improved the structure of documentation files to enhance user understanding and readability.

Miscellaneous

- Simplified GitHub issue templates to make them more accessible and concise for users.
- Refinement of content descriptions, departmental affiliations for authors, and enhancement of figure captions in the paper draft.

1.5.1

-------------

Release date: 2023-12-20

Added

- Implemented class ``InvalidClimateTypeError`` in ``exceptions.py``, providing custom exception handling for when an invalid climate type is provided.
- Implemented class ``MissingObserverLatitudeError`` in ``exceptions.py``, to manage the error when the observer's latitude is not provided.

Changed

- Reorganized the ``__all__`` list in ``__init__.py`` within the ``pysolorie`` package for improved module import organization.
- Refactored the ``HottelModel`` class in ``model.py`` to provide a climate type check and raise the newly implemented ``InvalidClimateTypeError`` if the climate type is not recognized.
- Enhanced error handling across various modules by using the new custom exception classes defined in ``exceptions.py``.

Fixed

- Addressed an issue where the wrong logger was referenced in the `plotter.py`, which now correctly references the logger set for ``_calculate_optimal_orientations``.
- Updated logging setup in ``logger.py`` by shifting ``basicConfig`` setup outside the ``logger_decorator`` function for improved logging practices.
- Updated the ``plotter.py`` to correct the logger name used in the ``plot_optimal_orientation`` method for consistency and correctness.

Documentation

- Included changes in documentation to reflect the addition of new issue templates for bug reporting and feature requests.
- Updated documentation to cover the new exception classes and their usage within the application.

Testing

- Expanded ``test_pysolorie.py`` to include tests for newly introduced exceptions ``InvalidClimateTypeError`` and ``MissingObserverLatitudeError`` ensuring robust error handling.
- Augmented logging tests in ``test_pysolorie.py``, verifying that appropriate messages are recorded at info level, indicating successful operation of the updated functionality.

Page 1 of 3

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.