Skip to content

Commit

Permalink
Merge branch 'develop' into update-ruby-docker-image
Browse files Browse the repository at this point in the history
  • Loading branch information
robkooper authored Jul 13, 2024
2 parents c84620b + 7165d63 commit 257a641
Show file tree
Hide file tree
Showing 8 changed files with 41 additions and 51 deletions.
24 changes: 15 additions & 9 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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: >-
Expand All @@ -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
Expand All @@ -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;"
Expand All @@ -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 .
2 changes: 1 addition & 1 deletion .ruby-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
ruby-2.5.9
ruby-2.7.7
2 changes: 1 addition & 1 deletion .zenodo.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
13 changes: 13 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM ruby:3.1.2
FROM ruby:3.1
LABEL maintainer="Max Burnette <[email protected]>, Rob Kooper <[email protected]>"

# arguments that are added at the bottom of BETY
Expand Down
43 changes: 6 additions & 37 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -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.
2 changes: 1 addition & 1 deletion config/database.yml.gh
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@ test:
database: test
pool: 5
username: postgres
password:
password: bety
host: localhost
port: 5432
4 changes: 3 additions & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit 257a641

Please sign in to comment.