From db220b3114756fea948a26dc61a96250bc2d2b5b Mon Sep 17 00:00:00 2001 From: Tanner Weyer Date: Tue, 26 Dec 2023 09:59:01 -0600 Subject: [PATCH] Update formatting --- stellarphot/settings/models.py | 8 +------- stellarphot/settings/tests/test_models.py | 6 +++--- 2 files changed, 4 insertions(+), 10 deletions(-) diff --git a/stellarphot/settings/models.py b/stellarphot/settings/models.py index cead68a1..859d1073 100644 --- a/stellarphot/settings/models.py +++ b/stellarphot/settings/models.py @@ -142,13 +142,7 @@ class Exoplanet(BaseModel): To create an `Exoplanet` object, you can pass in the epoch, period, Identifier, coordinate, depth, and duration as keyword arguments: - >>> planet = Exoplanet( - epoch=Time(0, format="jd"), - period=0 * u.min, - identifier="", - coordinate=SkyCoord(ra="00:00:00.00", dec="+00:00:00.0", frame="icrs", unit=("hour", "degree")), - depth=0, - duration=0 * u.min,) + >>> planet = Exoplanet(epoch=Time(0, format="jd"), period=0 * u.min, identifier="TIC_2312323", coordinate=SkyCoord(ra="00:00:00.00", dec="+00:00:00.0", frame="icrs", unit=("hour", "degree")), depth=0, duration=0 * u.min) """ epoch: TimeType | None = None diff --git a/stellarphot/settings/tests/test_models.py b/stellarphot/settings/tests/test_models.py index ff44024f..c09e69d8 100644 --- a/stellarphot/settings/tests/test_models.py +++ b/stellarphot/settings/tests/test_models.py @@ -43,15 +43,15 @@ def test_create_invalid_values(bad_one): ra="00:00:00.00", dec="+00:00:00.0", frame="icrs", unit=("hour", "degree") ), depth=0, - duration=0 * u.min, + duration=0 * u.min ) def test_create_exoplanet_correctly(): planet = Exoplanet(**DEFAULT_EXOPLANET_SETTINGS) assert planet.epoch == DEFAULT_EXOPLANET_SETTINGS["epoch"] - assert planet.period == DEFAULT_EXOPLANET_SETTINGS["period"] + assert u.get_physical_type(planet.period) == 'time' assert planet.identifier == DEFAULT_EXOPLANET_SETTINGS["identifier"] assert planet.coordinate == DEFAULT_EXOPLANET_SETTINGS["coordinate"] assert planet.depth == DEFAULT_EXOPLANET_SETTINGS["depth"] - assert planet.duration == DEFAULT_EXOPLANET_SETTINGS["duration"] + assert u.get_physical_type(planet.duration) == 'time'