pacificclimate / modelmeta

An ORM representation of the model metadata database
GNU General Public License v3.0
1 stars 0 forks source link

Drop support for Python <3.6 #91

Closed rod-glover closed 4 years ago

jameshiebert commented 4 years ago

Looks like PostGIS isn't installed. I'll hold off until the tests are passing.

rod-glover commented 4 years ago

Yeah, I'm looking into that. More specifically, it looks as if it is looking for PostGIS 2.4, even though we are using a setup with PostGIS 2.3 installed.

Here's the error message (note mention of "$libdir/postgis-2.4"):

self = <sqlalchemy.dialects.postgresql.psycopg2.PGDialect_psycopg2 object at 0x7fa104f9c860>
cursor = <cursor object at 0x7fa1062cace0; closed: -1>
statement = 'create extension postgis', parameters = {}
context = <sqlalchemy.dialects.postgresql.psycopg2.PGExecutionContext_psycopg2 object at 0x7fa105418a58>

    def do_execute(self, cursor, statement, parameters, context=None):
>       cursor.execute(statement, parameters)
E       psycopg2.errors.UndefinedFile: could not access file "$libdir/postgis-2.4": No such file or directory

../../../virtualenv/python3.6.9/lib/python3.6/site-packages/sqlalchemy/engine/default.py:581: UndefinedFile

And here's the installation (occurring previously) of PostGIS 2.3 for Postgres 9.3, followed by startup of Postgres 9.3.

Installing APT Packages
PostgreSQL package is detected. Stopping postgresql service. See https://github.com/travis-ci/travis-ci/issues/5737 for more information.
$ sudo systemctl stop postgresql
travis_time:start:14c7ef36
$ sudo -E apt-get -yq --no-install-suggests --no-install-recommends $(travis_apt_get_options) install postgresql-9.3-postgis-2.3
Reading package lists...
Building dependency tree...
Reading state information...
The following package was automatically installed and is no longer required:
  libopts25
Use 'sudo apt autoremove' to remove it.
0 upgraded, 0 newly installed, 0 to remove and 19 not upgraded.
travis_time:end:14c7ef36:start=1578338310834347427,finish=1578338311696540498,duration=862193071,event=prepare
travis_fold:end:apt
travis_time:start:0a7b5a62
travis_time:end:0a7b5a62:start=1578338311700068392,finish=1578338311702422496,duration=2354104,event=fix_ps4
travis_fold:start:postgresql
travis_time:start:066719ce
$ travis_setup_postgresql 9.3
Starting PostgreSQL v9.3
sudo systemctl start postgresql@9.3-main
jameshiebert commented 4 years ago

We don't use PostGIS with enough sophistication that we care very much about which version we're running. It's probably sufficient to upgrade to 2.4 and copy the Travis config in crmprtd.

rod-glover commented 4 years ago

I am going to try testing with PostGIS 2.4 in a PostgreSQL 9.3 environment. That is the PostgreSQL version that pcic_meta and ce_meta are still running under, and it would be nice to have our test environment as close to the production environment as possible.

rod-glover commented 4 years ago

That fixed the PostGIS problem. But there's an issue related to hdf5 in Python 3.7.

rod-glover commented 4 years ago

That bug had been lurking in the .travis.yml file since 2016. And I think it was me who put it in there. Bad @rod-glover .

rod-glover commented 4 years ago

Resolves #91

jameshiebert commented 4 years ago

LGTM!