Skip to content

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
johnvanbreda committed Dec 14, 2018
2 parents cc4012c + 547a535 commit a665495
Show file tree
Hide file tree
Showing 720 changed files with 38,728 additions and 35,282 deletions.
45 changes: 31 additions & 14 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,16 @@
dist: precise
dist: trusty
sudo: required

language: php

php:
- '5.6'
- '7.0'
- '7.1'
# - hhvm
- '7.2'

env:
- POSTGRESQL_VERSION=postgresql-9.3-postgis-2.1
- POSTGRESQL_VERSION=postgresql-10-postgis-2.4

services:
- postgresql
Expand All @@ -23,25 +27,38 @@ before_install:
# Reinstall PostgreSQL - see https://github.com/travis-ci/travis-ci/issues/7048#issuecomment-267731971
- sudo apt-get autoremove postgis*
- sudo apt-get autoremove postgresql*
- sudo apt-get install postgresql-9.3-postgis-2.1
- sudo apt-get install $POSTGRESQL_VERSION
# Install Apache.
- sudo apt-get install apache2 libapache2-mod-fastcgi
# Enable php-fpm.
- sudo cp ~/.phpenv/versions/$(phpenv version-name)/etc/php-fpm.conf.default ~/.phpenv/versions/$(phpenv version-name)/etc/php-fpm.conf
# See https://www.marcus-povey.co.uk/2016/02/16/travisci-with-php-7-on-apache-php-fpm/
- if [[ ${TRAVIS_PHP_VERSION:0:2} == "7." ]]; then sudo cp ~/.phpenv/versions/$(phpenv version-name)/etc/php-fpm.d/www.conf.default ~/.phpenv/versions/$(phpenv version-name)/etc/php-fpm.d/www.conf; fi
# enable php-fpm
- sudo cp ~/.phpenv/versions/$(phpenv version-name)/etc/php-fpm.conf.default ~/.phpenv/versions/$(phpenv version-name)/etc/php-fpm.conf
- sudo a2enmod rewrite actions fastcgi alias
- echo "cgi.fix_pathinfo = 1" >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini
- sudo sed -i -e "s,www-data,travis,g" /etc/apache2/envvars
- sudo chown -R travis:travis /var/lib/apache2/fastcgi
- ~/.phpenv/versions/$(phpenv version-name)/sbin/php-fpm
# Configure apache virtual hosts.
- sudo cp -f .travis/travis-ci-apache /etc/apache2/sites-available/default
- sudo sed -e "s?%TRAVIS_BUILD_DIR%?$(pwd)?g" --in-place /etc/apache2/sites-available/default
# configure apache virtual hosts
- sudo cp -f .travis/travis-ci-apache /etc/apache2/sites-available/000-default.conf
- sudo sed -e "s?%TRAVIS_BUILD_DIR%?$(pwd)?g" --in-place /etc/apache2/sites-available/000-default.conf
- sudo service apache2 restart

install:
# Grant execute on scripts
- chmod +x .travis/postgres_setup.sh

before_script:
# Special configuration required for PostgreSQL 10.
- |
if [ ${POSTGRESQL_VERSION:10:4} == "-10-" ]; then
# Use default port
sudo sed -i 's/port = 5433/port = 5432/' /etc/postgresql/10/main/postgresql.conf
# Use 9.6 auth config:
sudo cp /etc/postgresql/{9.6,10}/main/pg_hba.conf
fi
- sudo service postgresql restart
# Create database
- psql -c 'create database indicia;' -U postgres -d postgres
# Add extension for PostGIS
- psql -U postgres -d indicia -c "create extension postgis"
Expand All @@ -58,12 +75,12 @@ before_script:
- sudo mv phpunit-5.7.phar /usr/local/bin/phpunit

script:
- /usr/local/bin/phpunit --configuration phpunit-config-test.xml
- /usr/local/bin/phpunit --configuration phpunit-setup-check-test.xml
- /usr/local/bin/phpunit --configuration phpunit-home-test.xml
- /usr/local/bin/phpunit --stderr --configuration phpunit-config-test.xml
- /usr/local/bin/phpunit --stderr --configuration phpunit-setup-check-test.xml
- /usr/local/bin/phpunit --stderr --configuration phpunit-home-test.xml
# Repeat to upgrade modules
- /usr/local/bin/phpunit --configuration phpunit-home-test.xml
- /usr/local/bin/phpunit --configuration phpunit-tests.xml
- /usr/local/bin/phpunit --stderr --configuration phpunit-home-test.xml
- /usr/local/bin/phpunit --stderr --configuration phpunit-tests.xml

after_script:
- cat application/logs/*
9 changes: 6 additions & 3 deletions .travis/travis-ci-apache
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,10 @@

DocumentRoot %TRAVIS_BUILD_DIR%

<Directory "%TRAVIS_BUILD_DIR%">
<Directory "%TRAVIS_BUILD_DIR%/">
Options FollowSymLinks MultiViews ExecCGI
AllowOverride All
Order deny,allow
Allow from all
Require all granted
</Directory>

# Wire up Apache to use Travis CI's php-fpm.
Expand All @@ -15,6 +14,10 @@
Action php5-fcgi /php5-fcgi
Alias /php5-fcgi /usr/lib/cgi-bin/php5-fcgi
FastCgiExternalServer /usr/lib/cgi-bin/php5-fcgi -host 127.0.0.1:9000 -pass-header Authorization

<Directory /usr/lib/cgi-bin>
Require all granted
</Directory>
</IfModule>

</VirtualHost>
69 changes: 69 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
# Version 2.0.0

Please see [upgrading to version 2.0.0](UPGRADE-v2.md).

## Warehouse user interface changes

* Warehouse client helper and media code libraries updated to use jQuery 3.2.1
and jQuery UI 1.12.
* Overhaul the warehouse UI with a new Bootstrap 3 based theme and more logical menu
structure.
* Warehouse home page now has additional help for getting started and diagnosing
problems.

## Back-end changes

* Support for PostgreSQL version 10.
* Support for PHP 7.2.
* Support for prioritised load aware background task scheduling via a work queue module.

## Database schema changes

* Removed the following:
* index_locations_samples table
* fields named location_id_* from cache_occurrences_functional
* fields named location_id_* from cache_samples_functional
Replaced the above with cache_occurrences_functional.location_ids (integer[]) and
cache_samples_functional.location_ids (integer[]). This means there is no need to
distinguish between uniquely indexed location types (linked via the locaiton_id_*
fields) and non-uniquely indexed location types (linked in the index_locations_samples
table). Removes the need for additional join to index_locations_samples so will improve
performance in many cases.
* Attribute values for taxa, samples and occurrences are now stored in the relevant
reporting cache tables in a JSON document (attrs_json field). This means that reports
can output custom attribute values for a record without additional joins for each
attribute. To enable this functionality, the report needs a parameter of type taxattrs,
smpattrs or occattrs (allowing attributes to include to be dynamically declared in a
parameter). Then provide a parameter useJsonAttributes set to a value of '1' to enable
the new method of accessing attribute values. This has the potential to improve
performance significantly for reports which include many different attribute values in
the output.
* New cache_taxon_paths which provides a hierarchical link between taxa and all their
taxonomic parents.
* Cache_occurrences_functional now has a taxon_path field which links to the parent taxa
for the record, as defined by the main taxon list configured on the warehouse.
* Reports no longer need to join via users to check the sharing/privacy settings of a
user. Any sharing task codes which are not available for the user are listed in
cache_*_functional.blocked_sharing_tasks.
* Support for dynamic attributes, i.e custom sample or occurrence attributes which are
linked to a taxon. They can then be included on a recording form only when entering a
taxon that is, or is a descendant of, the linked taxon.

## Report updates

* Updated reports which used the location_id_* fields to output a location for a record
to now update a list of overlapping locations rather than being limited to a single
location. For example, if a record is added which overlaps 2 country boundaries then
the report may include both country names in the output field rather than just one.
* Removed the following unused verification reports. Existing verification
implementations on client websites should be updated to use the verification_5 prebuilt
form and its reports:
* reports/library/occurrences/verification_list.xml
* reports/library/occurrences/verification_list_2.xml
* reports/library/occurrences/verification_list_3.xml
* reports/library/occurrences/verification_list_3_mapping.xml
* reports/library/occurrences/verification_list_3_mapping_using_spatial_index_builder.xml
* reports/library/occurrences/verification_list_3_using_spatial_index_builder.xml
* Other unused reports removed:
* reports/library/locations/filterable_occurrence_counts_mappable_2.xml
* reports/library/locations/filterable_species_counts_mappable_2.xml
Loading

0 comments on commit a665495

Please sign in to comment.