Skip to content

Commit d43da8a

Browse files
authored
Merge pull request #220 from NESCent/joss-submission
Paper and README updates for JOSS submission
2 parents 86e5b57 + 6a34423 commit d43da8a

File tree

5 files changed

+154
-99
lines changed

5 files changed

+154
-99
lines changed

Gemfile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
source 'http://rubygems.org'
22

3+
ruby '2.2.0'
34
gem 'rails', '4.1.4'
45

56
# Paperclip adds file upload support to ActiveRecord models

Gemfile.lock

Lines changed: 91 additions & 90 deletions
Original file line numberDiff line numberDiff line change
@@ -27,43 +27,44 @@ GEM
2727
minitest (~> 5.1)
2828
thread_safe (~> 0.1)
2929
tzinfo (~> 1.1)
30-
addressable (2.3.6)
30+
addressable (2.5.2)
31+
public_suffix (>= 2.0.2, < 4.0)
3132
arel (5.0.1.20140414130214)
3233
aws-sdk (1.51.0)
3334
json (~> 1.4)
3435
nokogiri (>= 1.4.4)
35-
bcrypt (3.1.7)
36-
builder (3.2.2)
36+
bcrypt (3.1.11)
37+
builder (3.2.3)
3738
capybara (2.2.1)
3839
mime-types (>= 1.16)
3940
nokogiri (>= 1.3.3)
4041
rack (>= 1.0.0)
4142
rack-test (>= 0.5.4)
4243
xpath (~> 2.0)
43-
climate_control (0.0.3)
44-
activesupport (>= 3.0)
44+
climate_control (0.2.0)
4545
cliver (0.3.2)
46-
cocaine (0.5.4)
46+
cocaine (0.5.8)
4747
climate_control (>= 0.0.3, < 1.0)
4848
coffee-rails (4.0.1)
4949
coffee-script (>= 2.2.0)
5050
railties (>= 4.0.0, < 5.0)
51-
coffee-script (2.2.0)
51+
coffee-script (2.4.1)
5252
coffee-script-source
5353
execjs
54-
coffee-script-source (1.7.0)
54+
coffee-script-source (1.12.2)
5555
commonjs (0.2.7)
56-
coveralls (0.7.0)
57-
multi_json (~> 1.3)
58-
rest-client
59-
simplecov (>= 0.7)
60-
term-ansicolor
61-
thor
62-
crack (0.4.2)
56+
concurrent-ruby (1.0.5)
57+
coveralls (0.8.21)
58+
json (>= 1.8, < 3)
59+
simplecov (~> 0.14.1)
60+
term-ansicolor (~> 1.3)
61+
thor (~> 0.19.4)
62+
tins (~> 1.6)
63+
crack (0.4.3)
6364
safe_yaml (~> 1.0.0)
64-
daemons (1.1.9)
65-
delayed_job (4.0.2)
66-
activesupport (>= 3.0, < 4.2)
65+
daemons (1.2.5)
66+
delayed_job (4.0.6)
67+
activesupport (>= 3.0, < 5.0)
6768
delayed_job_active_record (4.0.3)
6869
activerecord (>= 3.0, < 5.0)
6970
delayed_job (>= 3.0, < 4.1)
@@ -75,65 +76,65 @@ GEM
7576
warden (~> 1.2.3)
7677
docile (1.1.5)
7778
erubis (2.7.0)
78-
eventmachine (1.0.3)
79-
execjs (2.2.1)
80-
faraday (0.9.0)
79+
eventmachine (1.2.5)
80+
execjs (2.7.0)
81+
faraday (0.12.2)
8182
multipart-post (>= 1.2, < 3)
82-
hashie (3.2.0)
83+
hashie (3.5.7)
8384
hike (1.2.3)
84-
i18n (0.6.11)
85-
jquery-rails (3.1.1)
85+
i18n (0.9.1)
86+
concurrent-ruby (~> 1.0)
87+
jquery-rails (3.1.4)
8688
railties (>= 3.0, < 5.0)
8789
thor (>= 0.14, < 2.0)
88-
jquery-tablesorter (1.12.7)
90+
jquery-tablesorter (1.12.8)
8991
railties (>= 3.1, < 5)
90-
json (1.8.1)
91-
jwt (1.0.0)
92+
json (1.8.6)
93+
jwt (1.5.6)
9294
less (2.3.3)
9395
commonjs (~> 0.2.6)
9496
less-rails (2.3.3)
9597
actionpack (>= 3.1)
9698
less (~> 2.3.1)
9799
less-rails-bootstrap (2.3.3)
98100
less-rails (~> 2.3.1)
99-
libv8 (3.16.14.7)
100-
mail (2.5.4)
101+
libv8 (3.16.14.19)
102+
mail (2.5.5)
101103
mime-types (~> 1.16)
102104
treetop (~> 1.4.8)
103105
mime-types (1.25.1)
104-
mini_portile (0.6.0)
105-
minitest (5.4.0)
106-
multi_json (1.10.1)
107-
multi_xml (0.5.5)
106+
mini_portile2 (2.3.0)
107+
minitest (5.10.3)
108+
multi_json (1.12.2)
109+
multi_xml (0.6.0)
108110
multipart-post (2.0.0)
109-
netrc (0.7.7)
110-
nokogiri (1.6.2.1)
111-
mini_portile (= 0.6.0)
112-
oauth2 (1.0.0)
113-
faraday (>= 0.8, < 0.10)
111+
nokogiri (1.8.1)
112+
mini_portile2 (~> 2.3.0)
113+
oauth2 (1.4.0)
114+
faraday (>= 0.8, < 0.13)
114115
jwt (~> 1.0)
115116
multi_json (~> 1.3)
116117
multi_xml (~> 0.5)
117-
rack (~> 1.2)
118+
rack (>= 1.2, < 3)
118119
omniauth (1.2.2)
119120
hashie (>= 1.2, < 4)
120121
rack (~> 1.0)
121-
omniauth-google-oauth2 (0.2.5)
122-
omniauth (> 1.0)
123-
omniauth-oauth2 (~> 1.1)
124-
omniauth-oauth2 (1.2.0)
125-
faraday (>= 0.8, < 0.10)
122+
omniauth-google-oauth2 (0.5.2)
123+
jwt (~> 1.5)
126124
multi_json (~> 1.3)
127-
oauth2 (~> 1.0)
125+
omniauth (>= 1.1.1)
126+
omniauth-oauth2 (>= 1.3.1)
127+
omniauth-oauth2 (1.5.0)
128+
oauth2 (~> 1.1)
128129
omniauth (~> 1.2)
129130
omniauth-openid (1.0.1)
130131
omniauth (~> 1.0)
131132
rack-openid (~> 1.3.1)
132133
orm_adapter (0.5.0)
133-
paperclip (4.2.0)
134-
activemodel (>= 3.0.0)
135-
activesupport (>= 3.0.0)
136-
cocaine (~> 0.5.3)
134+
paperclip (4.2.4)
135+
activemodel (>= 3.2.0)
136+
activesupport (>= 3.2.0)
137+
cocaine (~> 0.5.5)
137138
mime-types
138139
pg (0.17.1)
139140
poltergeist (1.5.1)
@@ -142,13 +143,14 @@ GEM
142143
multi_json (~> 1.0)
143144
websocket-driver (>= 0.2.0)
144145
polyglot (0.3.5)
145-
protected_attributes (1.0.8)
146+
protected_attributes (1.0.9)
146147
activemodel (>= 4.0.1, < 5.0)
147-
rack (1.5.2)
148+
public_suffix (3.0.1)
149+
rack (1.5.5)
148150
rack-openid (1.3.1)
149151
rack (>= 1.1.0)
150152
ruby-openid (>= 2.1.8)
151-
rack-test (0.6.2)
153+
rack-test (0.6.3)
152154
rack (>= 1.0)
153155
rails (4.1.4)
154156
actionmailer (= 4.1.4)
@@ -160,73 +162,72 @@ GEM
160162
bundler (>= 1.3.0, < 2.0)
161163
railties (= 4.1.4)
162164
sprockets-rails (~> 2.0)
163-
rails_12factor (0.0.2)
165+
rails_12factor (0.0.3)
164166
rails_serve_static_assets
165167
rails_stdout_logging
166-
rails_serve_static_assets (0.0.2)
167-
rails_stdout_logging (0.0.3)
168+
rails_serve_static_assets (0.0.5)
169+
rails_stdout_logging (0.0.5)
168170
railties (4.1.4)
169171
actionpack (= 4.1.4)
170172
activesupport (= 4.1.4)
171173
rake (>= 0.8.7)
172174
thor (>= 0.18.1, < 2.0)
173-
rake (10.3.2)
174-
ref (1.0.5)
175-
rest-client (1.7.1)
176-
mime-types (>= 1.16, < 3.0)
177-
netrc (~> 0.7)
178-
ruby-openid (2.5.0)
179-
safe_yaml (1.0.3)
175+
rake (12.3.0)
176+
ref (2.0.0)
177+
ruby-openid (2.7.0)
178+
safe_yaml (1.0.4)
180179
sass (3.2.19)
181-
sass-rails (4.0.3)
180+
sass-rails (4.0.5)
182181
railties (>= 4.0.0, < 5.0)
183-
sass (~> 3.2.0)
184-
sprockets (~> 2.8, <= 2.11.0)
182+
sass (~> 3.2.2)
183+
sprockets (~> 2.8, < 3.0)
185184
sprockets-rails (~> 2.0)
186-
simplecov (0.8.2)
185+
simplecov (0.14.1)
187186
docile (~> 1.1.0)
188-
multi_json
189-
simplecov-html (~> 0.8.0)
190-
simplecov-html (0.8.0)
191-
sprockets (2.11.0)
187+
json (>= 1.8, < 3)
188+
simplecov-html (~> 0.10.0)
189+
simplecov-html (0.10.2)
190+
sprockets (2.12.4)
192191
hike (~> 1.2)
193192
multi_json (~> 1.0)
194193
rack (~> 1.0)
195194
tilt (~> 1.1, != 1.3.0)
196-
sprockets-rails (2.1.3)
195+
sprockets-rails (2.3.3)
197196
actionpack (>= 3.0)
198197
activesupport (>= 3.0)
199-
sprockets (~> 2.8)
200-
term-ansicolor (1.3.0)
198+
sprockets (>= 2.8, < 4.0)
199+
term-ansicolor (1.6.0)
201200
tins (~> 1.0)
202-
therubyracer (0.12.1)
203-
libv8 (~> 3.16.14.0)
201+
therubyracer (0.12.3)
202+
libv8 (~> 3.16.14.15)
204203
ref
205-
thin (1.6.2)
206-
daemons (>= 1.0.9)
207-
eventmachine (>= 1.0.0)
208-
rack (>= 1.0.0)
209-
thor (0.19.1)
210-
thread_safe (0.3.4)
204+
thin (1.7.2)
205+
daemons (~> 1.0, >= 1.0.9)
206+
eventmachine (~> 1.0, >= 1.0.4)
207+
rack (>= 1, < 3)
208+
thor (0.19.4)
209+
thread_safe (0.3.6)
211210
tilt (1.4.1)
212-
tins (1.3.0)
211+
tins (1.16.3)
213212
treetop (1.4.15)
214213
polyglot
215214
polyglot (>= 0.3.1)
216-
tzinfo (1.2.2)
215+
tzinfo (1.2.4)
217216
thread_safe (~> 0.1)
218-
uglifier (2.5.1)
217+
uglifier (2.5.3)
219218
execjs (>= 0.3.0)
220219
json (>= 1.8.0)
221-
warden (1.2.3)
220+
warden (1.2.7)
222221
rack (>= 1.0)
223222
webmock (1.17.4)
224223
addressable (>= 2.2.7)
225224
crack (>= 0.3.2)
226-
websocket-driver (0.3.4)
227-
wicked (1.0.3)
228-
rails (>= 3.0.7)
229-
xpath (2.0.0)
225+
websocket-driver (0.7.0)
226+
websocket-extensions (>= 0.1.0)
227+
websocket-extensions (0.1.3)
228+
wicked (1.3.2)
229+
railties (>= 3.0.7)
230+
xpath (2.1.0)
230231
nokogiri (~> 1.3)
231232

232233
PLATFORMS
@@ -262,4 +263,4 @@ DEPENDENCIES
262263
wicked
263264

264265
BUNDLED WITH
265-
1.11.2
266+
1.12.5

README.md

Lines changed: 21 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -15,27 +15,39 @@ TraitDB is a Rails 4 application. It requires [ruby](http://ruby-lang.org) and
1515
```
1616
git clone [email protected]:NESCent/TraitDB.git
1717
```
18-
18+
1919
2. Install dependencies with `bundle install`
2020
3. Set your database credentials as environment variables. `config/database.yml` will read these values out of the environment. If your database server is on a different host, set the host/port as well:
21-
<pre><code>export TRAITDB_PG_DEV_USER="traitdb_dev_user"
22-
export TRAITDB_PG_DEV_PASS="your-password-here"</code></pre>
21+
```
22+
export TRAITDB_PG_DEV_USER="traitdb_dev_user"
23+
export TRAITDB_PG_DEV_PASS="your-password-here"
24+
```
2325
4. Run `rake db:setup`. This Instructs Rails to connect to your database and create the required users and databases. If your database requires you to authenticate before creating users/databases, you will be prompted for credentials.
2426
5. If `rake db:setup` is successful, it will also run a `rake db:migrate` to create database tables. If not successful, you can create the databases and users manually, then run `rake db:migrate` manually.
25-
6. Start the server with `rails server`.
26-
7. Visit [http://localhost:3000](http://localhost:3000) to access the application. You will be shown the about page. If you click _Upload_, you will be redirected to the sign-in screen. From here, you can create an account or sign in with OpenID.
27-
8. Start a [delayed_job](https://github.com/collectiveidea/delayed_job) worker. Delayed job is used to execute dataset imports as a background process. It includes a rake task to start a worker. You can run `rake jobs:work` in an additional terminal process, or run a worker as a daemon with `script/delayed_job start`.
27+
6. If you wish to enable Google Sign-in (recommended), you will need to
28+
- Register an application for [Google OAuth 2.0](https://developers.google.com/identity/protocols/OAuth2)
29+
- Enable the Google+ API
30+
- Set the Client ID and Client Secret credentials in your environment:
31+
```
32+
export TRAITDB_GOOGLE_APP_ID="your-google-app-id"
33+
export TRAITDB_GOOGLE_APP_SECRET="your-google-app-secret"
34+
```
35+
7. Start the server with `rails server`.
36+
8. Visit [http://localhost:3000](http://localhost:3000) to access the application. You will be shown the about page. If you click _Upload_, you will be redirected to the sign-in screen. From here, you can sign in with OpenID or a Google Account
37+
9. Start a [delayed_job](https://github.com/collectiveidea/delayed_job) worker. Delayed job is used to execute dataset imports as a background process. It includes a rake task to start a worker. You can run `rake jobs:work` in an additional terminal process, or run a worker as a daemon with `script/delayed_job start`.
2838
2939
## Usage
3040
3141
### Getting Started - Projects and Users
3242
3343
Data in TraitDB is publicly searchable and organized into projects. Initially there are no projects, and only administrators can create projects. Authentication is handled by OpenID, so in order to get started, you must:
3444
35-
1. Sign in with an OpenID by clicking __Sign In__ in the top menu bar. After signing in, there will be an entry in the users table with your email address.
45+
1. After signing in, there will be an entry in the users table with your email address.
3646
2. Upgrade this user to an Administrator with the following rake command:
37-
<pre><code>$ rake traitdb:upgrade_admin[[email protected]]
38-
Upgrading [email protected]</code></pre>
47+
```
48+
$ rake traitdb:upgrade_admin[[email protected]]
49+
50+
```
3951
3. Reload your web browser, you will have an __Admin__ menu option.
4052
4. Click __Admin->Projects__, and the __New Project__ button.
4153
5. Fill out the project details and save the new project

paper.bib

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
@article{ashman2014tree,
2+
title={Tree of Sex: A database of sexual systems},
3+
author={Ashman, Tia-Lynn and Bachtrog, Doris and Blackmon, Heath and Goldberg, Emma E and Hahn, Matthew W and Kirkpatrick, Mark and Kitano, Jun and Mank, Judith E and Mayrose, Itay and Ming, Ray and others},
4+
journal={Scientific Data},
5+
volume={1},
6+
pages={140015},
7+
year={2014},
8+
publisher={Nature Publishing Group}
9+
}

paper.md

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
---
2+
title: 'TraitDB: Web application database of phenotypic trait data.'
3+
tags:
4+
- trait
5+
- rails
6+
- csv
7+
authors:
8+
- name: Dan Leehr
9+
orcid: 0000-0003-3221-9579
10+
affiliation: "1"
11+
- name: Mercedes Gosby
12+
affiliation: "1"
13+
affiliations:
14+
- name: National Evolutionary Synthesis Center
15+
index: 1
16+
date: 20 July 2018
17+
bibliography: paper.bib
18+
---
19+
20+
# Summary
21+
22+
TraitDB is a web application built to facilitate storage, searching, subsetting, and sharing trait data.
23+
24+
TraitDB has been used by multiple [NESCent](http://nescent.org/) working groups to assemble datasets from different researchers into a single uniform dataset. Guided by a flexible YAML template system, TraitDB's import process provides validation feedback on CSV files and individual data cells to promote consistency and completeness.
25+
26+
TraitDB presents several options for browsing, subsetting, and downloading data via its web interface. It can summarize trait data over different taxonomic levels, and has been used to gather and prodice datasets hosted by the [Tree of Sex](treeofsex.org).
27+
28+
# Acknowledgements
29+
30+
TraitDB is a project of [National Evolutionary Synthesis Center](http://nescent.org/)
31+
32+
# References

0 commit comments

Comments
 (0)