* fix(dependencies): force using Numpy 2.0 * ci: use stable branch for black * fix: use last version of Black * ci: use latest version of macOS instead of 11.0tags/v1.0.11
@@ -27,4 +27,4 @@ jobs: | |||||
- uses: actions/setup-python@v5 | - uses: actions/setup-python@v5 | ||||
with: | with: | ||||
python-version: 3.x | python-version: 3.x | ||||
- uses: psf/black@20.8b1 | |||||
- uses: psf/black@stable |
@@ -15,7 +15,7 @@ jobs: | |||||
matrix: | matrix: | ||||
os: | os: | ||||
- ubuntu-latest | - ubuntu-latest | ||||
- macos-11.0 | |||||
- macos-latest | |||||
- windows-latest | - windows-latest | ||||
python_version: | python_version: | ||||
- '3.8' | - '3.8' | ||||
@@ -31,7 +31,6 @@ jobs: | |||||
uses: actions/setup-python@v5 | uses: actions/setup-python@v5 | ||||
with: | with: | ||||
python-version: ${{ matrix.python_version }} | python-version: ${{ matrix.python_version }} | ||||
architecture: x64 | |||||
- name: Prepare environment | - name: Prepare environment | ||||
run: | | run: | | ||||
@@ -250,7 +250,7 @@ def _search_maximal_elongations( | |||||
EventType.MAXIMAL_ELONGATION, | EventType.MAXIMAL_ELONGATION, | ||||
[planet], | [planet], | ||||
translate_to_timezone(time.utc_datetime(), timezone), | translate_to_timezone(time.utc_datetime(), timezone), | ||||
details={"deg": elongation}, | |||||
details={"deg": float(elongation)}, | |||||
) | ) | ||||
) | ) | ||||
@@ -299,7 +299,7 @@ def _search_apogee(to_aster: Object, from_aster: Object = EARTH) -> callable: | |||||
EventType.APOGEE, | EventType.APOGEE, | ||||
[to_aster], | [to_aster], | ||||
translate_to_timezone(time.utc_datetime(), timezone), | translate_to_timezone(time.utc_datetime(), timezone), | ||||
details={"distance_km": distances[i]}, | |||||
details={"distance_km": float(distances[i])}, | |||||
) | ) | ||||
) | ) | ||||
@@ -338,7 +338,7 @@ def _search_perigee(aster: Object, from_aster: Object = EARTH) -> callable: | |||||
EventType.PERIGEE, | EventType.PERIGEE, | ||||
[aster], | [aster], | ||||
translate_to_timezone(time.utc_datetime(), timezone), | translate_to_timezone(time.utc_datetime(), timezone), | ||||
details={"distance_km": distances[i]}, | |||||
details={"distance_km": float(distances[i])}, | |||||
) | ) | ||||
) | ) | ||||
@@ -283,15 +283,17 @@ class AsterEphemerides(Serializable): | |||||
def serialize(self) -> dict: | def serialize(self) -> dict: | ||||
return { | return { | ||||
"object": self.object.serialize(), | "object": self.object.serialize(), | ||||
"rise_time": self.rise_time.isoformat() | |||||
if self.rise_time is not None | |||||
else None, | |||||
"culmination_time": self.culmination_time.isoformat() | |||||
if self.culmination_time is not None | |||||
else None, | |||||
"set_time": self.set_time.isoformat() | |||||
if self.set_time is not None | |||||
else None, | |||||
"rise_time": ( | |||||
self.rise_time.isoformat() if self.rise_time is not None else None | |||||
), | |||||
"culmination_time": ( | |||||
self.culmination_time.isoformat() | |||||
if self.culmination_time is not None | |||||
else None | |||||
), | |||||
"set_time": ( | |||||
self.set_time.isoformat() if self.set_time is not None else None | |||||
), | |||||
} | } | ||||
@@ -20,16 +20,16 @@ classifiers = [ | |||||
[tool.poetry.dependencies] | [tool.poetry.dependencies] | ||||
python = "^3.8" | python = "^3.8" | ||||
skyfield = "^1.21" | |||||
skyfield = "^1.49" | |||||
numpy = [ | numpy = [ | ||||
{ version = "<1.25", python = "3.8.*" }, | { version = "<1.25", python = "3.8.*" }, | ||||
{ version = "^1.25", python = ">=3.9,<3.13" }, | |||||
{ version = "^2.0", python = ">=3.9,<3.13" }, | |||||
] | ] | ||||
skyfield-data = ">=3,<6" | |||||
skyfield-data = "*" | |||||
python-dateutil = "^2.8" | python-dateutil = "^2.8" | ||||
[tool.poetry.group.dev.dependencies] | [tool.poetry.group.dev.dependencies] | ||||
black = "^23.1" | |||||
black = ">23.1,<25.0" | |||||
parameterized = "^0.9.0" | parameterized = "^0.9.0" | ||||
coverage = "^6.1.2" | coverage = "^6.1.2" | ||||
coveralls = "^3.3.1" | coveralls = "^3.3.1" | ||||