Files
astronomy/generate/unit_test_python
Don Cross 74044b39d3 More Python/pip package cleanup : version 2.0.17.
Generate astronomy.py directly in the package directory.
I realized it doesn't make sense to generate it in the
parent directory and then copy it; just generate it where
it will end up anyway.

Updated documentation so people know they can just do

    pip install astronomy-engine

to install Astronomy Engine in their Python project.

Removed the GitHub Actions status badge because it is redundant with
the checkmark/X indicator.

Now that private symbols are no longer exported, I had to
fix a couple of places where the unit tests still accessed them.
2022-03-20 16:47:29 -04:00

23 lines
778 B
Bash
Executable File

#!/bin/bash
Fail()
{
echo "ERROR($0): $1"
exit 1
}
[[ "$1" == "" || "$1" == "-v" ]] || Fail "Invalid command line options."
python3 --version || Fail "Cannot print python version"
python3 -m pylint --init-hook="import sys; sys.setrecursionlimit(2000)" ../source/python/astronomy/astronomy.py || Fail "pylint detected problems"
python3 test.py $1 all || Fail "Failed Python unit tests."
for file in temp/py_longitude_*.txt; do
./generate $1 check ${file} || Fail "Failed verification of file ${file}"
done
echo "$0: Generating Python test output."
time python3 test.py astro_check > temp/py_check.txt || Fail "Failure in Python astro_check"
./generate $1 check temp/py_check.txt || Fail "Verification failure for Python unit test output."
echo "$0: PASS"
exit 0