diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 869f598b..4106ceca 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -18,12 +18,14 @@ jobs: fail-fast: false matrix: ruby: - - 2.5 - - 2.6 - # - 2.7 is not supported, results in error + - 2.7 + postgres_image: + - postgis/postgis:12-3.3 services: postgres: - image: mdillon/postgis:9.5 + image: ${{ matrix.postgres_image }} + env: + POSTGRES_PASSWORD: bety ports: - 5432:5432 options: >- @@ -32,15 +34,17 @@ jobs: --health-timeout 5s --health-retries 5 steps: - - uses: actions/checkout@v2 - - uses: actions/cache@v1 + - name: Checkout code + uses: actions/checkout@v3 + - name: Restore cache + uses: actions/cache@v1 with: path: vendor/bundle key: ${{ runner.os }}-gems-${{ matrix.ruby}}-${{ hashFiles('**/Gemfile.lock') }} restore-keys: | ${{ runner.os }}-gems- - name: Set up Ruby ${{ matrix.ruby }} - uses: actions/setup-ruby@v1 + uses: ruby/setup-ruby@v1 with: ruby-version: ${{ matrix.ruby }} - name: Install libraries @@ -58,9 +62,11 @@ jobs: - name: Build and test with Rake env: RAILS_ENV: test + POSTGRES_PASSWORD: bety + PGPASSWORD: bety run: | cp config/database.yml.gh config/database.yml - psql -h localhost -U postgres -c "CREATE USER bety WITH SUPERUSER CREATEDB UNENCRYPTED PASSWORD 'bety'"; + psql -h localhost -U postgres -c "CREATE USER bety WITH SUPERUSER CREATEDB PASSWORD 'bety'"; psql -h localhost -U postgres -c "DROP DATABASE IF EXISTS test;" psql -h localhost -U postgres -c "CREATE DATABASE test WITH OWNER bety;" psql -h localhost -U bety -d test -c "CREATE EXTENSION postgis;" @@ -75,6 +81,6 @@ jobs: docker: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - name: Build image run: docker build --tag image --file Dockerfile . diff --git a/.ruby-version b/.ruby-version index 1a8e8ebb..80b0e7ef 100644 --- a/.ruby-version +++ b/.ruby-version @@ -1 +1 @@ -ruby-2.5.9 +ruby-2.7.7 diff --git a/.zenodo.json b/.zenodo.json index 5119eefb..f30f4076 100644 --- a/.zenodo.json +++ b/.zenodo.json @@ -58,7 +58,7 @@ ], "language":"eng", "license":{ - "id":"NCSA" + "id":"BSD 3-Clause" }, "references":[ "LeBauer, D., Kooper, R., Mulrooney, P., Rohde, S., Wang, D., Long, S. P., & Dietze, M. C. (2018). BETYdb: a yield, trait, and ecosystem service database applied to second\u2010generation bioenergy feedstock production. GCB Bioenergy, 10(1), 61-71", diff --git a/CHANGELOG.md b/CHANGELOG.md index 67c1b4bc..25eff0a9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -17,6 +17,19 @@ You will need to install the latest version of BETY (or the version you want to In this case you can simply pull down the version you want, and run `docker-compose bety migrate`. +## [5.x] - + +### Changed + +- License changed from UIUC/NCSA to BSD 3-Clause [#748](https://github.com/PecanProject/bety/pull/758). + The licenses are functionally the same, but BSD 3-Clause is more widely recognized. + This change is consistent with moving R packages in PEcAn project to BSD 3-Clause to comply with CRAN requirements. +- Updated GitHub actions to test and use supported versions of Rails (v2.7) and Postgres (12.3.3) [#753](https://github.com/PecanProject/bety/pull/753) + - **Important** Users who use the docker-compose file will need to either: + - dump the database first and then reload because this involves a database version upgrade + - switch the postgres image back to mdillon/postgis:9.5. This is not recommended because postgres v9.5 is no longer supported. + + ## [5.4.1] - 2021-10-10 ### Changed diff --git a/Dockerfile b/Dockerfile index a5ad6840..279371ab 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM ruby:3.1.2 +FROM ruby:3.1 LABEL maintainer="Max Burnette , Rob Kooper " # arguments that are added at the bottom of BETY diff --git a/LICENSE b/LICENSE index 2baf1d04..8e36b7b3 100644 --- a/LICENSE +++ b/LICENSE @@ -1,44 +1,13 @@ -# Licenses - -* Software: University of Illinois/NCSA Open Source License (MIT/BSD compatible) -* Data: Open Data Commons Attribution License (ODC-By) v1.0 - -## Software License - -University of Illinois/NCSA Open Source License +## BSD 3-clause Open Source Software License Copyright (c) 2015, University of Illinois, NCSA. All rights reserved. -BETYdb -www.betydb.org - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -"Software"), to deal with 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: +Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: -- Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimers. -- Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimers in the - documentation and/or other materials provided with the distribution. -- Neither the names of University of Illinois, NCSA, nor the names - of its contributors may be used to endorse or promote products - derived from this Software without specific prior written permission. +1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. -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 CONTRIBUTORS 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 WITH THE SOFTWARE. +2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. -## Data License +3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. -All public data in BETYdb is made available under the Open Data Commons Attribution License (ODC-By) v1.0. -You are free to share, create, and adapt its contents. -Data with an access_level field and value <= 2 is is not covered by this license, but may be available for use with consent. +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS “AS IS” AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/config/database.yml.gh b/config/database.yml.gh index 4cb5e878..a76f646b 100644 --- a/config/database.yml.gh +++ b/config/database.yml.gh @@ -5,6 +5,6 @@ test: database: test pool: 5 username: postgres - password: + password: bety host: localhost port: 5432 diff --git a/docker-compose.yml b/docker-compose.yml index 23cfc84d..0e4553d4 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -17,7 +17,9 @@ services: # postgresql + postgis to hold all the data postgres: - image: mdillon/postgis:9.5 + image: postgis/postgis:12-3.3 + env: + POSTGRES_PASSWORD: bety networks: - bety #ports: