1
0
Fork 0

add smoke test to catch some issues missed earlier

This commit is contained in:
Mateusz Konieczny 2024-08-13 14:06:57 +02:00
parent b655271adb
commit 1c21614911
4 changed files with 29 additions and 20 deletions

View file

@ -38,4 +38,5 @@ def main():
scan_eligible(grab_bag, scanner)
time.sleep(10)
main()
if __name__ == "__main__":
main()

View file

@ -1,6 +1,10 @@
import nominatim
config = __import__("0_config")
with open(config.nominatim_requests_missing_from_cache()) as fp:
for query in fp:
nominatim.query_nominatim(query.strip())
def main():
with open(config.nominatim_requests_missing_from_cache()) as fp:
for query in fp:
nominatim.query_nominatim(query.strip())
if __name__ == "__main__":
main()

34
run.py
View file

@ -5,28 +5,30 @@ obtain_atp_data = __import__("2_obtain_atp_data")
matcher = __import__("3_matcher")
show_data = __import__("4_show_data")
def main():
# TODO: test dependencies on fresh OS
# see readme for instructions how to install dependencies
# TODO: test dependencies on fresh OS
# see readme for instructions how to install dependencies
os.system("python3 -m unittest")
os.system("python3 -m unittest")
# part1:
# obtain OSM shop data (centroids)
obtain_osm_data.main()
# part1:
# obtain OSM shop data (centroids)
obtain_osm_data.main()
# part2:
# obtain ATP data (for specified spider)
obtain_atp_data.main()
# part2:
# obtain ATP data (for specified spider)
obtain_atp_data.main()
# part3:
# for each ATP case find nearest OSM entry, save to file
matcher.main()
# part3:
# for each ATP case find nearest OSM entry, save to file
matcher.main()
# part4:
# maps listing various missing data - shops, tags, and of various wrong data (shop in OSM not in ATP and so on)
show_data.main()
# part4:
# maps listing various missing data - shops, tags, and of various wrong data (shop in OSM not in ATP and so on)
show_data.main()
if __name__ == "__main__":
main()
# libosmium is used in shops
# following alternatives were considered

View file

@ -0,0 +1,2 @@
import nominatim_worker
import link_scan_worker