Setting up for development
To change the code, run the tests or build this documentation. Any Linux (or macOS) works; you need git and Julia 1.11 or newer — juliaup installs it on any distribution:
curl -fsSL https://install.julialang.org | shThe library
git clone https://github.com/Richard7987/AsteroidPipeline.jl.git
cd AsteroidPipeline.jl
julia --project=. -e 'using Pkg; Pkg.instantiate()'Then, in the repository:
| To | Run |
|---|---|
| use your working copy | julia --project=., then using AsteroidPipeline |
| run the tests | julia --project=. -e 'using Pkg; Pkg.test()' |
| try it on real data | the scripts in examples/ (examples/fetch_data.sh downloads public ZTF images) |
Some tests use the network (SkyBoT, JPL Horizons, the MPC); without it they are skipped, not failed. Gaia, SIMBAD, VSX, astrometry.net and the NEO Confirmation Page answer from recorded answers in test/fixtures:
| To | Set |
|---|---|
| query them instead | ASTEROIDPIPELINE_LIVE_TESTS=true |
| record their answers again (after changing a query) | ASTEROIDPIPELINE_RECORD=true |
astrometry.net's are recorded only with an API key (ASTROMETRY_API_KEY, in the environment or in a .env file at the repository's root) and the public ZTF frames of examples/fetch_data.sh; without them, the recorded ones are kept.
A query with no recorded answer fails with a message saying so. The tests run on GitHub on Julia 1.11, with the recorded answers, and on the newest release, live — keep the code working on both.
The terminal app
pip install -e .[test]
pytest ui/testsThey run the app without a terminal or Julia, against a stand-in for its engine.
The documentation
julia --project=docs -e 'using Pkg; Pkg.develop(path="."); Pkg.instantiate()'
julia --project=docs docs/make.jlThe site lands in docs/build/1; docs/build_all_versions.sh builds every version, as it is published. Pages are in docs/src; figures are drawn by docs/make_figures.jl from the measured numbers, on every build.