Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions .github/workflows/check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ jobs:
- name: Install Go
uses: actions/setup-go@v2
with:
go-version: 1.16.x
go-version: 1.17.x
- name: Checkout code
uses: actions/checkout@v2
- name: Run linters
Expand All @@ -20,7 +20,7 @@ jobs:
test:
strategy:
matrix:
go-version: [1.14.x, 1.15.x, 1.16.x]
go-version: [1.17.x]
platform: [ubuntu-latest]
runs-on: ${{ matrix.platform }}
steps:
Expand Down Expand Up @@ -54,7 +54,7 @@ jobs:
if: success()
uses: actions/setup-go@v2
with:
go-version: 1.16.x
go-version: 1.17.x
- name: Checkout code
uses: actions/checkout@v2
- uses: actions/cache@v2
Expand All @@ -78,4 +78,4 @@ jobs:
uses: coverallsapp/github-action@v1.1.2
with:
github-token: ${{ secrets.github_token }}
path-to-lcov: coverage.lcov
path-to-lcov: coverage.lcov
2 changes: 1 addition & 1 deletion cloud/config_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ func TestRunInputFromViper(t *testing.T) {
"764874ad5081665459c67d40607f68df6fc689aa695b4822e012aef84cba5394.prj": 432,
"434bf26e3fda1ef9cef7e1fa6cc6b5174d11a22b19cbe10d256adc83b2a97d44.ncf": 14284,
"ffe280d818c1549074d0e15cfb74377b891287d7f81a4ad9038d0f65b12f6642.nc": 3484,
"49a409a3b905563a8353be4505af732f02c81ce480de33df78a3330f17b6caf7.gob": 21276,
"26b310adcf36530acdb518bd74b61355b2a2e7825c20a07f3631db412c655881.gob": 21276,
}
if len(js.FileData) != len(wantFiles) {
t.Errorf("incorrect number of files: %d != %d", len(js.FileData), len(wantFiles))
Expand Down
Binary file modified cmd/inmap/testdata/inmapVarGrid.gob
Binary file not shown.
135 changes: 2 additions & 133 deletions emissions/aep/testdata/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,136 +1,5 @@
# Copyright (c) 2014, Docker PostGIS Authors (See AUTHORS)

# Permission is hereby granted, free of charge, to any person
# obtaining a copy of this software and associated documentation
# files (the "Software"), to deal in the Software without
# restriction, including without limitation the rights to use,
# copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the
# Software is furnished to do so, subject to the following
# conditions:

# The above copyright notice and this permission notice shall be
# included in all copies or substantial portions of the Software.

# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
# OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
# HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
# WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
# OTHER DEALINGS IN THE SOFTWARE.

FROM postgres:13-alpine

LABEL maintainer="PostGIS Project - https://postgis.net"

ENV POSTGIS_VERSION 3.1.2
ENV POSTGIS_SHA256 c49b6baa4afe4aed6cc7333399897aaf7540b40779a939a4d5a81d0725f6c9f8

#Temporary fix:
# for PostGIS 2.* - building a special geos
# reason: PostGIS 2.5.5 is not working with GEOS 3.9.*
ENV POSTGIS2_GEOS_VERSION tags/3.8.2

RUN set -eux \
\
&& apk add --no-cache --virtual .fetch-deps \
ca-certificates \
openssl \
tar \
\
&& wget -O postgis.tar.gz "https://github.com/postgis/postgis/archive/$POSTGIS_VERSION.tar.gz" \
&& echo "$POSTGIS_SHA256 *postgis.tar.gz" | sha256sum -c - \
&& mkdir -p /usr/src/postgis \
&& tar \
--extract \
--file postgis.tar.gz \
--directory /usr/src/postgis \
--strip-components 1 \
&& rm postgis.tar.gz \
\
&& apk add --no-cache --virtual .build-deps \
autoconf \
automake \
clang-dev \
file \
g++ \
gcc \
gdal-dev \
gettext-dev \
json-c-dev \
libtool \
libxml2-dev \
llvm11-dev \
make \
pcre-dev \
perl \
proj-dev \
protobuf-c-dev \
\
# GEOS setup
&& if [ $(printf %.1s "$POSTGIS_VERSION") == 3 ]; then \
apk add --no-cache --virtual .build-deps-geos geos-dev cunit-dev ; \
elif [ $(printf %.1s "$POSTGIS_VERSION") == 2 ]; then \
apk add --no-cache --virtual .build-deps-geos cmake git ; \
cd /usr/src ; \
git clone https://github.com/libgeos/geos.git ; \
cd geos ; \
git checkout ${POSTGIS2_GEOS_VERSION} -b geos_build ; \
mkdir cmake-build ; \
cd cmake-build ; \
cmake -DCMAKE_BUILD_TYPE=Release .. ; \
make -j$(nproc) ; \
make check ; \
make install ; \
cd / ; \
rm -fr /usr/src/geos ; \
else \
echo ".... unknown PosGIS ...." ; \
fi \
\
# build PostGIS
\
&& cd /usr/src/postgis \
&& gettextize \
&& ./autogen.sh \
&& ./configure \
--with-pcredir="$(pcre-config --prefix)" \
&& make -j$(nproc) \
&& make install \
\
# regress check
&& mkdir /tempdb \
&& chown -R postgres:postgres /tempdb \
&& su postgres -c 'pg_ctl -D /tempdb init' \
&& su postgres -c 'pg_ctl -D /tempdb start' \
&& cd regress \
&& make -j$(nproc) check RUNTESTFLAGS=--extension PGUSER=postgres \
#&& make -j$(nproc) check RUNTESTFLAGS=--dumprestore PGUSER=postgres \
#&& make garden PGUSER=postgres \
&& su postgres -c 'pg_ctl -D /tempdb --mode=immediate stop' \
&& rm -rf /tempdb \
&& rm -rf /tmp/pgis_reg \
# add .postgis-rundeps
&& apk add --no-cache --virtual .postgis-rundeps \
gdal \
json-c \
libstdc++ \
pcre \
proj \
protobuf-c \
# Geos setup
&& if [ $(printf %.1s "$POSTGIS_VERSION") == 3 ]; then \
apk add --no-cache --virtual .postgis-rundeps-geos geos ; \
fi \
# clean
&& cd / \
&& rm -rf /usr/src/postgis \
&& apk del .fetch-deps .build-deps .build-deps-geos

COPY ./initdb-postgis.sh /docker-entrypoint-initdb.d/10_postgis.sh
COPY ./update-postgis.sh /usr/local/bin
FROM postgis/postgis:14-3.2-alpine

# Install OSM2PGSQL
ENV OSM2PGSQL_VERSION 1.5.0
Expand All @@ -149,4 +18,4 @@ RUN apk add --no-cache cmake make g++ boost-dev expat-dev \
make &&\
make install

COPY honolulu_hawaii.osm.pbf /
COPY honolulu_hawaii.osm.pbf /
8 changes: 4 additions & 4 deletions emissions/slca/eieio/server_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -330,9 +330,9 @@ func TestServer_grpc(t *testing.T) {
{
impactType: "emis",
pollutant: eieiorpc.Pollutant_TotalPM25,
colors: [][]uint8{[]uint8{0x0, 0x0, 0x0}, []uint8{0x0, 0x0, 0x0}, []uint8{0x0, 0x0, 0x0},
[]uint8{0x0, 0x0, 0x0}, []uint8{0x0, 0x0, 0x0}, []uint8{0xff, 0xff, 0xff}, []uint8{0x0, 0x0, 0x0},
[]uint8{0x0, 0x0, 0x0}, []uint8{0x0, 0x0, 0x0}, []uint8{0x0, 0x0, 0x0}},
colors: [][]uint8{[]uint8{0x0, 0x0, 0x0}, []uint8{0x0, 0x0, 0x0}, []uint8{0xff, 0xff, 0xff}, []uint8{0x0, 0x0, 0x0},
[]uint8{0x0, 0x0, 0x0}, []uint8{0x27, 0x16, 0xb7}, []uint8{0x0, 0x0, 0x0}, []uint8{0xff, 0xff, 0xff},
[]uint8{0x27, 0x16, 0xb7}, []uint8{0x27, 0x16, 0xb7}},
},
} {
t.Run(test.impactType, func(t *testing.T) {
Expand All @@ -352,7 +352,7 @@ func TestServer_grpc(t *testing.T) {
t.Fatal(err)
}
if !reflect.DeepEqual(mapInfo.RGB, test.colors) {
t.Errorf("%v != %v", mapInfo.RGB, test.colors)
t.Errorf("%#v != %v", mapInfo.RGB, test.colors)
}
})
}
Expand Down
14 changes: 11 additions & 3 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,9 @@ require (
github.com/aws/aws-sdk-go v1.38.35
github.com/cenkalti/backoff v2.2.1+incompatible
github.com/cenkalti/backoff/v4 v4.1.1
github.com/cilium/ebpf v0.8.0 // indirect
github.com/cpuguy83/go-md2man v1.0.9-0.20180619205630-691ee98543af // indirect
github.com/cpuguy83/go-md2man/v2 v2.0.1 // indirect
github.com/ctessum/atmos v0.0.0-20170526022537-cba69f7ca647
github.com/ctessum/cdf v0.0.0-20181201011353-edced208ea9d
github.com/ctessum/geom v0.2.10
Expand All @@ -21,6 +23,7 @@ require (
github.com/ctessum/sparse v0.0.0-20181201011727-57d6234a2c9d
github.com/ctessum/unit v0.0.0-20160621200450-755774ac2fcb
github.com/davecgh/go-spew v1.1.1
github.com/docker/distribution v2.8.0+incompatible // indirect
github.com/go-humble/detect v0.1.2 // indirect
github.com/go-humble/router v0.5.0
github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da
Expand All @@ -34,27 +37,32 @@ require (
github.com/jackc/pgx/v4 v4.12.0
github.com/johanbrandhorst/protobuf v0.6.1
github.com/jonas-p/go-shp v0.1.2-0.20190401125246-9fd306ae10a6
github.com/kr/pretty v0.2.0
github.com/kr/pretty v0.3.0
github.com/lib/pq v1.10.2
github.com/lnashier/viper v0.0.0-20180730210402-cc7336125d12
github.com/magiconair/properties v1.7.3 // indirect
github.com/mattn/go-sqlite3 v1.11.0
github.com/moby/sys/mountinfo v0.6.0 // indirect
github.com/opencontainers/image-spec v1.0.2 // indirect
github.com/opencontainers/runc v1.1.0 // indirect
github.com/pelletier/go-toml v1.0.1 // indirect
github.com/rs/cors v1.3.0 // indirect
github.com/russross/blackfriday v2.0.0+incompatible // indirect
github.com/sirupsen/logrus v1.7.0
github.com/sirupsen/logrus v1.8.1
github.com/skratchdot/open-golang v0.0.0-20160302144031-75fb7ed4208c
github.com/spf13/cast v1.2.0
github.com/spf13/cobra v0.0.3
github.com/spf13/jwalterweatherman v0.0.0-20170901151539-12bd96e66386 // indirect
github.com/spf13/pflag v1.0.5
github.com/tealeg/xlsx v1.0.3
github.com/testcontainers/testcontainers-go v0.11.1
github.com/urfave/cli v1.22.5 // indirect
github.com/vishvananda/netns v0.0.0-20211101163701-50045581ed74 // indirect
gocloud.dev v0.23.0
golang.org/x/build v0.0.0-20190226180436-80ca8d25ddd4
golang.org/x/crypto v0.0.0-20210616213533-5ff15b29337e
golang.org/x/net v0.0.0-20210505214959-0714010a04ed
golang.org/x/net v0.0.0-20220127200216-cd36cc0744dd
golang.org/x/sys v0.0.0-20220209214540-3681064d5158 // indirect
gonum.org/v1/gonum v0.0.0-20191009222026-5d5638e6749a
gonum.org/v1/plot v0.0.0-20190526055220-ccfad0c86201
google.golang.org/grpc v1.37.0
Expand Down
Loading