commit - 6610d9676c5a5741699d5a25bc18abddb02970f3
commit + 4d124c4c4952d27cfd619beb899fee492dd5b1ac
blob - /dev/null
blob + 1d0f8ba7d8154d76cfa9c4122819c596a10a35ba (mode 644)
--- /dev/null
+++ .env.example
+# Copy this file to .env (gitignored) and fill in real values.
+# test/runtests.jl loads .env automatically before running the tests.
+
+# nova.astrometry.net API key — get it from "My Profile" after signing in
+# at https://nova.astrometry.net/. Enables the live plate_solve round-trip
+# test; without it, that one test is skipped instead of run.
+ASTROMETRY_API_KEY=
blob - a8a1df41d600e2b0f78567ecf6988a7247cdcac1
blob + d73fe911444d7c51ce225eeab80be17d8604ff8d
--- .gitignore
+++ .gitignore
# part of the project (the wiki documents the pipeline, not its own
# deploy infrastructure).
PAGES_NOTES.md
+
+# Real API keys for local test runs (e.g. ASTROMETRY_API_KEY) — see
+# .env.example for the expected format.
+.env
blob - 51b08bc638beb16b9e8077145d544825e71d11ca
blob + 363321dbd6f1e254aaa3b0b336321b55b3025150
--- test/runtests.jl
+++ test/runtests.jl
using Reproject
using Distributed
+# Loads .env (repo root, gitignored) into ENV for local test runs — e.g.
+# ASTROMETRY_API_KEY, which enables the live plate_solve round-trip test
+# below instead of skipping it. Real environment variables always win: a
+# line here is only applied if that key isn't already set. Not read by
+# src/ itself — plate_solve takes api_key as an explicit argument; this
+# is test-only convenience.
+let env_file = joinpath(pkgdir(AsteroidPipeline), ".env")
+ if isfile(env_file)
+ for line in eachline(env_file)
+ line = strip(line)
+ (isempty(line) || startswith(line, "#")) && continue
+ k, v = split(line, "="; limit=2)
+ k = strip(k)
+ v = strip(strip(v), ['"', '\''])
+ haskey(ENV, k) || (ENV[k] = v)
+ end
+ end
+end
+
@testset "AsteroidPipeline.jl" begin
@testset "detect_sources" begin