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
Bump astral to 2.1 #32270
Bump astral to 2.1 #32270
Conversation
1f144d2
to
1cbaf12
Compare
@@ -164,7 +165,7 @@ def update_events(self, utc_point_in_time): | |||
) | |||
self.location.solar_depression = -10 | |||
self._check_event(utc_point_in_time, "dawn", PHASE_SMALL_DAY) | |||
self.next_noon = self._check_event(utc_point_in_time, "solar_noon", None) | |||
self.next_noon = self._check_event(utc_point_in_time, "noon", None) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
are solar_noon
and noon
equivalent?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think so. Solar noon is when the sun is highest in the sky. Noon is 12:00.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The docstring for the noon function indicates: Calculates the solar noon (the time when the sun is at its highest point.)
and reverse for midnight.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
noon
and midnight
were renamed here:
sffjunkie/astral@7e06188
There hasn't been any activity on this pull request recently. This pull request has been automatically marked as stale because of that and will be closed if no further activity occurs within 7 days. |
Guys, would you mind having a look at this PR? Would hate for it to be closed automatically... |
Please rebase on latest dev branch and solve the merge conflict. If tests pass I think we can merge. |
I think you need to rebase from latest dev branch, and remove any non related commits. The branch is now not clean. |
* Update cast to use the shared zeroconf instance * Add zeroconf to after_dependencies * Bump version to 5.2.0
* Prevent AirVisual from polling * Docstring
This PR needs to be rebased as there are unrelated changes. https://developers.home-assistant.io/docs/development_catching_up/ |
There's no point in wasting time on this until upstream astral has been fixed in places like Norway. |
There hasn't been any activity on this pull request recently. This pull request has been automatically marked as stale because of that and will be closed if no further activity occurs within 7 days. |
I think we can close here until the library is fixed. @alucryd if you close, you can reopen yourself and we keep the PR thread history intact. |
@MartinHjelmare Sure, let's do that. |
@alucryd, IIUC, this PR seems to be blocked because of sffjunkie/astral#34. However, that issue was opened on Jun 5, 2019, while astral version 2.0 was released on Feb 10, 2020. So, this issue is not a regression of a newer version of the library, as the issue was opened against astral version 1.10.1, which is the version currently being used by HA. Furthermore, I believe that sffjunkie/astral#34 was actually fixed in astral version 2.0, which is another good reason to revive and push forward this PR. (Context: I'm trying to push for upgrading astral version in HA because we have a dependency on the newer astral lib with HA's "jewish_calendar" integration and its "hdate" underline library.) |
I'll try to get back to this during the week, but last time I tried astral 2.1 it broke every single unit test involving hardcoded sun positions and it wasn't just in arctic regions. Will see if 2.2 fares better. |
@alucryd, did you give it a try? Thanks! |
Proposed change
Bump astral to 2.1
Type of change
Additional information
Astral 2.x introduces a new LocationInfo class, uses dataclasses and refactored a lot of code. Tried to use the new functions to the same extent as the old one to the best of my knowledge.
Lots of tests are failing on the dev HEAD, using
tox -e py38
, even without these changes so I'm not sure whether I can check that local tests pass. FWIW the sun component worked fine in my local testing.Checklist
black --fast homeassistant tests
)If user exposed functionality or configuration variables are added/changed:
If the code communicates with devices, web services, or third-party tools:
Updated and included derived files by running:
python3 -m script.hassfest
.requirements_all.txt
.Updated by running
python3 -m script.gen_requirements_all
..coveragerc
.The integration reached or maintains the following [Integration Quality Scale][quality-scale]: