Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,13 @@ repos:
- id: check-docstring-first # checks a common error of defining a docstring after code
- id: debug-statements # checks for debugger imports and py37+ `breakpoint()` calls in python source
- repo: https://github.com/psf/black-pre-commit-mirror
rev: 25.9.0
rev: 26.1.0
hooks:
- id: black
name: black for fits-finder
args: ["--config=./fits-finder/pyproject.toml", "./fits-finder"]
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: 'v0.14.3'
rev: 'v0.14.13'
hooks:
- id: ruff
name: ruff for fits-finder
Expand Down
1 change: 0 additions & 1 deletion fits-finder/fits_finder/config.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import os
from collections import defaultdict


ZTF_DR_DB_API_BASE_URL = os.environ.get("ZTF_DR_DB_API_BASE_URL", "https://db.ztf.snad.space")
ZTF_FITS_PRODUCTS_URL = os.environ.get("FITS_PRODUCTS_URL", "https://fits.ztf.snad.space/products/sci")

Expand Down
1 change: 0 additions & 1 deletion fits-finder/fits_finder/date_with_frac.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
from .config import ZTF_FITS_PRODUCTS_URL
from .http_client import http_client


PALOMAR = EarthLocation(lon=-116.863, lat=33.356, height=1706) # EarthLocation.of_site('Palomar')


Expand Down
1 change: 0 additions & 1 deletion fits-finder/fits_finder/http_client.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
from httpx import AsyncClient, Limits


# https://stackoverflow.com/a/74397436/5437597


Expand Down
1 change: 0 additions & 1 deletion fits-finder/fits_finder/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
from . import root, v1
from .http_client import http_client


app = FastAPI(
title="ZTF FITS Finder API by SNAD",
version=metadata.version("ztf-fits-url-finder"),
Expand Down
7 changes: 2 additions & 5 deletions fits-finder/fits_finder/root.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,12 @@
from fastapi import APIRouter
from fastapi.responses import HTMLResponse


router = APIRouter()


@router.get("/", include_in_schema=False)
def homepage() -> HTMLResponse:
return HTMLResponse(
content=f"""
return HTMLResponse(content=f"""
<p>
Welcome to <a href="SNAD">SNAD</a> API server for the ZTF FITS files look-ups.
</p>
Expand All @@ -20,5 +18,4 @@ def homepage() -> HTMLResponse:
<p>
See source code as a part of <a href="{metadata.metadata("ztf-fits-url-finder")["Repository"]}"><font face="monospace">ztf-fits-proxy</font></a> project on GitHub.
</p>
""" # noqa: E501
)
""") # noqa: E501
1 change: 0 additions & 1 deletion fits-finder/fits_finder/v1.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
from .date_with_frac import DateWithFrac
from .ztf_db import get_by_oid


router = APIRouter()

FILE_SUFFIXES = [
Expand Down
1 change: 0 additions & 1 deletion proxy-cache-filler/proxy_cache_filler.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@

import requests


BASE_URL = "http://ztf-fits-proxy/products/sci/"

ZTFSTARTDATE = datetime(2017, 9, 26)
Expand Down