mirror of
https://github.com/oDinZu/natural-earth-vector.git
synced 2025-02-22 00:04:57 -05:00
wikidata: add fast test mode ( run only 110m ) - workaround for a travis timeout
This commit is contained in:
parent
564f006bf8
commit
bf1747b351
@ -36,7 +36,7 @@ matrix:
|
|||||||
- conda install --yes -c conda-forge requests
|
- conda install --yes -c conda-forge requests
|
||||||
- pip install csvtomd
|
- pip install csvtomd
|
||||||
script:
|
script:
|
||||||
- ./run_all.sh
|
- ./run_all.sh fast
|
||||||
|
|
||||||
|
|
||||||
# - os: linux
|
# - os: linux
|
||||||
|
73
run_all.sh
73
run_all.sh
@ -3,6 +3,8 @@ set -Eeuo pipefail
|
|||||||
|
|
||||||
STARTDATE=$(date +"%Y-%m-%dT%H:%M%z")
|
STARTDATE=$(date +"%Y-%m-%dT%H:%M%z")
|
||||||
|
|
||||||
|
runmode=${1-all}
|
||||||
|
|
||||||
# clean and recreate x_tempshape directory
|
# clean and recreate x_tempshape directory
|
||||||
rm -rf x_tempshape
|
rm -rf x_tempshape
|
||||||
mkdir -p x_tempshape
|
mkdir -p x_tempshape
|
||||||
@ -12,6 +14,7 @@ exec &> >(tee -a "$log_file")
|
|||||||
|
|
||||||
# Don't forget update the VERSION file!
|
# Don't forget update the VERSION file!
|
||||||
echo "-----------------------------------"
|
echo "-----------------------------------"
|
||||||
|
echo "Runmode : $runmode"
|
||||||
echo "Version $(cat VERSION)"
|
echo "Version $(cat VERSION)"
|
||||||
echo "Start: $STARTDATE "
|
echo "Start: $STARTDATE "
|
||||||
|
|
||||||
@ -29,6 +32,7 @@ rm -f $logmd
|
|||||||
# --------------------------------------------------------------------------------------------------------------------
|
# --------------------------------------------------------------------------------------------------------------------
|
||||||
# | mode |LetterCase| shape_path | shape filename
|
# | mode |LetterCase| shape_path | shape filename
|
||||||
# == 10m ================= |=========== |==========| ============| ================================================
|
# == 10m ================= |=========== |==========| ============| ================================================
|
||||||
|
function run10m {
|
||||||
./tools/wikidata/update.sh fetch_write uppercase 10m_cultural ne_10m_admin_0_countries_lakes
|
./tools/wikidata/update.sh fetch_write uppercase 10m_cultural ne_10m_admin_0_countries_lakes
|
||||||
./tools/wikidata/update.sh fetch_write uppercase 10m_cultural ne_10m_admin_0_countries
|
./tools/wikidata/update.sh fetch_write uppercase 10m_cultural ne_10m_admin_0_countries
|
||||||
./tools/wikidata/update.sh fetch_write uppercase 10m_cultural ne_10m_admin_0_disputed_areas
|
./tools/wikidata/update.sh fetch_write uppercase 10m_cultural ne_10m_admin_0_disputed_areas
|
||||||
@ -54,6 +58,9 @@ rm -f $logmd
|
|||||||
./tools/wikidata/update.sh fetch_write lowercase 10m_physical ne_10m_rivers_lake_centerlines
|
./tools/wikidata/update.sh fetch_write lowercase 10m_physical ne_10m_rivers_lake_centerlines
|
||||||
./tools/wikidata/update.sh fetch_write lowercase 10m_physical ne_10m_rivers_north_america
|
./tools/wikidata/update.sh fetch_write lowercase 10m_physical ne_10m_rivers_north_america
|
||||||
./tools/wikidata/update.sh fetch_write lowercase 10m_cultural ne_10m_admin_1_label_points_details
|
./tools/wikidata/update.sh fetch_write lowercase 10m_cultural ne_10m_admin_1_label_points_details
|
||||||
|
}
|
||||||
|
|
||||||
|
function run50m {
|
||||||
# == 50m ================= |=========== |==========| ============| ================================================
|
# == 50m ================= |=========== |==========| ============| ================================================
|
||||||
./tools/wikidata/update.sh fetch_write uppercase 50m_cultural ne_50m_admin_0_sovereignty
|
./tools/wikidata/update.sh fetch_write uppercase 50m_cultural ne_50m_admin_0_sovereignty
|
||||||
./tools/wikidata/update.sh fetch_write uppercase 50m_cultural ne_50m_admin_0_countries
|
./tools/wikidata/update.sh fetch_write uppercase 50m_cultural ne_50m_admin_0_countries
|
||||||
@ -70,6 +77,9 @@ rm -f $logmd
|
|||||||
./tools/wikidata/update.sh fetch_write lowercase 50m_physical ne_50m_playas
|
./tools/wikidata/update.sh fetch_write lowercase 50m_physical ne_50m_playas
|
||||||
./tools/wikidata/update.sh fetch_write lowercase 50m_physical ne_50m_rivers_lake_centerlines
|
./tools/wikidata/update.sh fetch_write lowercase 50m_physical ne_50m_rivers_lake_centerlines
|
||||||
./tools/wikidata/update.sh fetch_write lowercase 50m_physical ne_50m_rivers_lake_centerlines_scale_rank
|
./tools/wikidata/update.sh fetch_write lowercase 50m_physical ne_50m_rivers_lake_centerlines_scale_rank
|
||||||
|
}
|
||||||
|
|
||||||
|
function run110m {
|
||||||
# ==110m ================= |=========== |==========| ============| ================================================
|
# ==110m ================= |=========== |==========| ============| ================================================
|
||||||
./tools/wikidata/update.sh fetch_write uppercase 110m_cultural ne_110m_admin_0_sovereignty
|
./tools/wikidata/update.sh fetch_write uppercase 110m_cultural ne_110m_admin_0_sovereignty
|
||||||
./tools/wikidata/update.sh fetch_write uppercase 110m_cultural ne_110m_admin_0_countries
|
./tools/wikidata/update.sh fetch_write uppercase 110m_cultural ne_110m_admin_0_countries
|
||||||
@ -79,24 +89,61 @@ rm -f $logmd
|
|||||||
./tools/wikidata/update.sh fetch_write lowercase 110m_cultural ne_110m_admin_1_states_provinces_lakes
|
./tools/wikidata/update.sh fetch_write lowercase 110m_cultural ne_110m_admin_1_states_provinces_lakes
|
||||||
./tools/wikidata/update.sh fetch_write lowercase 110m_physical ne_110m_lakes
|
./tools/wikidata/update.sh fetch_write lowercase 110m_physical ne_110m_lakes
|
||||||
./tools/wikidata/update.sh fetch_write lowercase 110m_physical ne_110m_rivers_lake_centerlines
|
./tools/wikidata/update.sh fetch_write lowercase 110m_physical ne_110m_rivers_lake_centerlines
|
||||||
|
}
|
||||||
|
|
||||||
# ======================== |=========== |==========| ============| ================================================
|
# ======================== |=========== |==========| ============| ================================================
|
||||||
|
|
||||||
# show summary
|
|
||||||
cat x_tempshape/update.md
|
|
||||||
|
|
||||||
# list new files
|
|
||||||
ls -Gga x_tempshape/*/*
|
|
||||||
|
|
||||||
# Update shape files ( if everything is OK! )
|
if [[ "$runmode" == "all" ]]
|
||||||
cp -r x_tempshape/10m_cultural/* 10m_cultural/
|
then
|
||||||
cp -r x_tempshape/10m_physical/* 10m_physical/
|
# =========================================================
|
||||||
cp -r x_tempshape/50m_cultural/* 50m_cultural/
|
# run all steps !
|
||||||
cp -r x_tempshape/50m_physical/* 50m_physical/
|
# =========================================================
|
||||||
cp -r x_tempshape/110m_cultural/* 110m_cultural/
|
run10m
|
||||||
cp -r x_tempshape/110m_physical/* 110m_physical/
|
run50m
|
||||||
|
run110m
|
||||||
|
|
||||||
|
# show summary
|
||||||
|
cat x_tempshape/update.md
|
||||||
|
|
||||||
|
# list new files
|
||||||
|
ls -Gga x_tempshape/*/*
|
||||||
|
|
||||||
|
# Update shape files ( if everything is OK! )
|
||||||
|
cp -r x_tempshape/10m_cultural/* 10m_cultural/
|
||||||
|
cp -r x_tempshape/10m_physical/* 10m_physical/
|
||||||
|
cp -r x_tempshape/50m_cultural/* 50m_cultural/
|
||||||
|
cp -r x_tempshape/50m_physical/* 50m_physical/
|
||||||
|
cp -r x_tempshape/110m_cultural/* 110m_cultural/
|
||||||
|
cp -r x_tempshape/110m_physical/* 110m_physical/
|
||||||
|
|
||||||
|
# test copy mode ( write again .. )
|
||||||
|
./tools/wikidata/update.sh copy uppercase 10m_cultural ne_10m_admin_0_countries
|
||||||
|
|
||||||
|
else
|
||||||
|
# =========================================================
|
||||||
|
# fast test !
|
||||||
|
# =========================================================
|
||||||
|
# travis osx hack - run a minimal test
|
||||||
|
run110m
|
||||||
|
# show summary
|
||||||
|
cat x_tempshape/update.md
|
||||||
|
# list new files
|
||||||
|
ls -Gga x_tempshape/*/*
|
||||||
|
# Update shape files ( if everything is OK! )
|
||||||
|
cp -r x_tempshape/110m_cultural/* 110m_cultural/
|
||||||
|
cp -r x_tempshape/110m_physical/* 110m_physical/
|
||||||
|
|
||||||
|
# test copy mode ( write again .. )
|
||||||
|
./tools/wikidata/update.sh copy lowercase 110m_physical ne_110m_rivers_lake_centerlines
|
||||||
|
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# test copy mode ( write again .. )
|
|
||||||
./tools/wikidata/update.sh copy uppercase 10m_cultural ne_10m_admin_0_countries
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user