mirror of
https://github.com/mozilla/ichnaea.git
synced 2025-12-05 01:10:44 +00:00
Switch to make update-vendored, doc fixes
This commit is contained in:
8
Makefile
8
Makefile
@@ -44,7 +44,7 @@ default:
|
||||
@echo " docs - generate Sphinx HTML documentation, including API docs"
|
||||
@echo " buildjs - generate js static assets"
|
||||
@echo " buildcss - generate css static assets"
|
||||
@echo " download - re-download vendor source and test data"
|
||||
@echo " update-vendored - re-download vendor source and test data"
|
||||
@echo ""
|
||||
@echo " help - see this text"
|
||||
@echo ""
|
||||
@@ -133,6 +133,6 @@ runservices: my.env .docker-build
|
||||
stop: my.env
|
||||
${DC} stop
|
||||
|
||||
.PHONY: download
|
||||
download: my.env
|
||||
${DC} run --rm --no-deps app shell make -f docker.make download
|
||||
.PHONY: update-vendored
|
||||
update-vendored: my.env
|
||||
${DC} run --rm --no-deps app shell make -f docker.make update_vendored
|
||||
|
||||
24
docker.make
24
docker.make
@@ -38,13 +38,13 @@ all:
|
||||
@echo " build_python_deps - install and check python dependencies"
|
||||
@echo " build_geocalc - compile and install geocalclib"
|
||||
@echo " check - check that C libraries are available to Python"
|
||||
@echo " download - download libraries and test data"
|
||||
@echo " update_vendored - update libraries and test data"
|
||||
@echo ""
|
||||
@echo " build_datamaps - build datamaps binaries"
|
||||
@echo " build_libmaxmind - build libmaxmind library"
|
||||
@echo " download_datamaps - download datamaps source"
|
||||
@echo " download_libmaxmind - download libmaxmind source"
|
||||
@echo " download_test_data - download MaxMind DB test data"
|
||||
@echo " update_datamaps - update datamaps source"
|
||||
@echo " update_libmaxmind - update libmaxmind source"
|
||||
@echo " update_test_data - update MaxMind DB test data"
|
||||
@echo ""
|
||||
@echo " help - see this text"
|
||||
|
||||
@@ -82,20 +82,20 @@ build_check:
|
||||
$(PYTHON) -c "import sys; from ichnaea.geoip import GeoIPWrapper; sys.exit(not GeoIPWrapper('ichnaea/tests/data/GeoIP2-City-Test.mmdb').check_extension())"
|
||||
$(PYTHON) -c "import sys; from ichnaea.geocode import GEOCODER; sys.exit(not GEOCODER.region(51.5, -0.1) == 'GB')"
|
||||
|
||||
.PHONY: download_datamaps
|
||||
download_datamaps:
|
||||
.PHONY: update_datamaps
|
||||
update_datamaps:
|
||||
cd $(VENDOR) && wget -q \
|
||||
-O $(DATAMAPS_NAME).tar.gz \
|
||||
https://github.com/ericfischer/datamaps/archive/$(DATAMAPS_COMMIT).tar.gz
|
||||
|
||||
.PHONY: download_libmaxmind
|
||||
download_libmaxmind:
|
||||
.PHONY: update_libmaxmind
|
||||
update_libmaxmind:
|
||||
cd $(VENDOR) && wget -q \
|
||||
-O $(LIBMAXMIND_NAME).tar.gz \
|
||||
https://github.com/maxmind/libmaxminddb/releases/download/$(LIBMAXMIND_VERSION)/$(LIBMAXMIND_NAME).tar.gz
|
||||
|
||||
.PHONY: download_test_data
|
||||
download_test_data:
|
||||
.PHONY: update_test_data
|
||||
update_test_data:
|
||||
cd $(TEST_DATA) && wget -q \
|
||||
-O GeoIP2-City-Test.json \
|
||||
https://raw.githubusercontent.com/maxmind/MaxMind-DB/master/source-data/GeoIP2-City-Test.json && \
|
||||
@@ -106,5 +106,5 @@ download_test_data:
|
||||
-O GeoIP2-Connection-Type-Test.mmdb \
|
||||
https://github.com/maxmind/MaxMind-DB/raw/master/test-data/GeoIP2-Connection-Type-Test.mmdb
|
||||
|
||||
.PHONY: download
|
||||
download: download_datamaps download_libmaxmind download_test_data
|
||||
.PHONY: update_vendored
|
||||
update_vendored: update_datamaps update_libmaxmind update_test_data
|
||||
|
||||
@@ -253,17 +253,17 @@ with a web brower.
|
||||
|
||||
Updating Test GeoIP Data and Libraries
|
||||
======================================
|
||||
The development environment uses a test MaxMind GeoIP database, and a test
|
||||
confirms that this is less than 1000 days old. To update this database and
|
||||
confirm tests pass, run::
|
||||
The development environment uses a test MaxMind GeoIP database, and the Ichnaea
|
||||
test suite will fail if this is more than 1000 days old. To update this
|
||||
database and confirm tests pass, run::
|
||||
|
||||
$ make download test
|
||||
$ make update-vendored test
|
||||
|
||||
Commit the refreshed files.
|
||||
|
||||
This command can also be used to updated `libmaxmindb` and the `datamaps`
|
||||
source. Update `docker.make` for the desired versions, and run::
|
||||
This command can also be used to updated ``libmaxmindb`` and the ``datamaps``
|
||||
source. Update ``docker.make`` for the desired versions, and run::
|
||||
|
||||
$ make download build test
|
||||
$ make update-vendored build test
|
||||
|
||||
Commit the updated source tarballs.
|
||||
|
||||
@@ -9,4 +9,5 @@ http://creativecommons.org/licenses/by-sa/3.0/ or send a letter to
|
||||
Creative Commons, 444 Castro Street, Suite 900, Mountain View,
|
||||
California, 94041, USA
|
||||
|
||||
To download fresh copies and confirm they work, run ``make download test``.
|
||||
To download fresh copies and confirm they work, run
|
||||
``make update-vendored test``.
|
||||
|
||||
@@ -62,7 +62,7 @@ class TestHeartbeat(object):
|
||||
assert isinstance(data[name]["time"], int)
|
||||
assert data[name]["time"] >= 0
|
||||
|
||||
# Run "make download" when this gets too old
|
||||
# Run "make update-vendored" when this gets too old
|
||||
assert 1 < data["geoip"]["age_in_days"] < 1000
|
||||
|
||||
|
||||
|
||||
2
vendor/README.rst
vendored
2
vendor/README.rst
vendored
@@ -3,4 +3,4 @@ Vendor
|
||||
|
||||
These tarballs where downloaded from https://github.com/ericfischer/datamaps and
|
||||
https://github.com/maxmind/libmaxminddb. To download new versions and confirm
|
||||
they work, update ``docker.make`` and run ``make download build test``.
|
||||
they work, update ``docker.make`` and run ``make update-vendored build test``.
|
||||
|
||||
Reference in New Issue
Block a user