Skip to content
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

Ready to publish v1.5.1 #13

Merged
merged 5 commits into from
Dec 20, 2023
Merged

Ready to publish v1.5.1 #13

merged 5 commits into from
Dec 20, 2023

Conversation

aaghamohammadi
Copy link
Owner

No description provided.

- Import InvalidClimateTypeError in __init__.py and add it to __all__.
- Create a new exceptions.py file.
- Add the InvalidClimateTypeError class to handle invalid climate types.
- The InvalidClimateTypeError class includes a custom message that lists the valid climate types.
- Refactor the HottelModel class in model.py to use the new InvalidClimateTypeError.
- Move the CLIMATE_CONSTANTS dictionary to the class level as it doesn't change across instances.
- Add a climate_type property to handle the conversion to uppercase and the validity check.
…ling

A new custom exception `MissingObserverLatitudeError` is added to provide a more descriptive error when the observer's latitude is missing.
The Observer class now uses getter and setter methods for `observer_latitude` and `observer_longitude` properties, with automatic conversion to radians, simplifying the interface.
The `_validate_latitude` method is renamed to `_ensure_latitude_provided` across multiple modules, and now raises the new custom exception, enhancing error specificity.
The `IrradiationCalculator` class is refactored to use the updated observer latitude validation method.
Unit tests are augmented to check for the correct observer latitude and longitude properties, ensuring code robustness.
- Moved the call to `logging.basicConfig()` to the top of the `logger.py` file to ensure it's called before any logging occurs.
- Updated the logger name in `_calculate_optimal_orientations()` method in `plotter.py` to match the method name.
- Added logging level setup and log message checks in the test cases in `test_pysolorie.py` to verify that the logging is working correctly.
@codecov-commenter
Copy link

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (1c1d9f0) 100.00% compared to head (42b0594) 100.00%.

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@            Coverage Diff            @@
##              main       #13   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           10        11    +1     
  Lines          234       277   +43     
  Branches        12        13    +1     
=========================================
+ Hits           234       277   +43     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@aaghamohammadi aaghamohammadi merged commit 8e83a0b into main Dec 20, 2023
14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants