Skip to content

Commit

Permalink
Update formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
Tanner728 committed Dec 26, 2023
1 parent 3d7617e commit db220b3
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 10 deletions.
8 changes: 1 addition & 7 deletions stellarphot/settings/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 3 additions & 3 deletions stellarphot/settings/tests/test_models.py
Original file line number Diff line number Diff line change
Expand Up @@ -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'

0 comments on commit db220b3

Please sign in to comment.