Skip to content

Commit

Permalink
Fix CLI definition on pyproject.toml
Browse files Browse the repository at this point in the history
  • Loading branch information
albireox committed Oct 2, 2024
1 parent 2dbcc4e commit a12706d
Show file tree
Hide file tree
Showing 3 changed files with 162 additions and 161 deletions.
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ Repository = "https://github.com/sdss/lvmgort"
Documentation = "https://lvmgort.readthedocs.org"

[project.scripts]
main = "gort.__main__:main"
gort = "gort.__main__:main"

[project.optional-dependencies]
docs = [
Expand Down
8 changes: 4 additions & 4 deletions src/gort/tools.py
Original file line number Diff line number Diff line change
Expand Up @@ -814,14 +814,14 @@ async def get_ephemeris_summary(sjd: int | None = None) -> dict:

host = config["services"]["lvmapi"]["host"]
port = config["services"]["lvmapi"]["port"]
url = f"http://{host}:{port}/ephemeris/"
url = f"http://{host}:{port}/ephemeris/summary"

sjd = sjd or get_sjd("LCO")

async with httpx.AsyncClient() as client:
resp = await client.get(url, params={"sjd": sjd})
if resp.status_code != 200:
raise httpx.RequestError("Failed request to /ephemeris")
raise httpx.RequestError("Failed request to /ephemeris/summary")

return resp.json()

Expand All @@ -831,14 +831,14 @@ def get_ephemeris_summary_sync(sjd: int | None = None) -> dict:

host = config["services"]["lvmapi"]["host"]
port = config["services"]["lvmapi"]["port"]
url = f"http://{host}:{port}/ephemeris/"
url = f"http://{host}:{port}/ephemeris/summary"

sjd = sjd or get_sjd("LCO")

with httpx.Client() as client:
resp = client.get(url, params={"sjd": sjd})
if resp.status_code != 200:
raise httpx.RequestError("Failed request to /ephemeris")
raise httpx.RequestError("Failed request to /ephemeris/summary")

return resp.json()

Expand Down
Loading

0 comments on commit a12706d

Please sign in to comment.