Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Custom curator url for webapp-only installation #1265

Open
wants to merge 1,375 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
1375 commits
Select commit Hold shift + click to select a range
15451c0
Merge branch 'synthesis_queue' into development
jimallman Jul 2, 2021
b72c6f7
Keep a pristine template for synth-run popup
jimallman Jul 2, 2021
2061774
Merge branch 'synthesis_queue' into development
jimallman Jul 2, 2021
4426181
Wait to enable new-synth-run button
jimallman Jul 2, 2021
3f01868
Merge branch 'synthesis_queue' into development
jimallman Jul 2, 2021
fb4b433
Suppress collection preview popup onclick
jimallman Jul 2, 2021
1057c64
Merge branch 'synthesis_queue' into development
jimallman Jul 2, 2021
53aa1b9
typo
jimallman Jul 2, 2021
f7a217a
Merge branch 'synthesis_queue' into development
jimallman Jul 2, 2021
1c9f6da
Add loading message while new-synth popup is disabled
jimallman Jul 2, 2021
f4cccaf
Merge branch 'synthesis_queue' into development
jimallman Jul 2, 2021
a7980b8
Wrap click behavior to avoid premature calls
jimallman Jul 2, 2021
4fd0d35
Merge branch 'synthesis_queue' into development
jimallman Jul 2, 2021
0ad84f3
cleanup
jimallman Jul 2, 2021
1fb5646
Early test of synth-submission button
jimallman Jul 3, 2021
21f95ea
Merge branch 'synthesis_queue' into development
jimallman Jul 3, 2021
0fffea8
Simple validation of new synth-run specs
jimallman Jul 3, 2021
e659394
Merge branch 'synthesis_queue' into development
jimallman Jul 3, 2021
346feb0
Handle premature validation
jimallman Jul 3, 2021
1d2bfeb
Merge branch 'synthesis_queue' into development
jimallman Jul 3, 2021
e243ef2
typo
jimallman Jul 3, 2021
8c198aa
Merge branch 'synthesis_queue' into development
jimallman Jul 3, 2021
efa7585
Subscribe validator to changes in spec
jimallman Jul 3, 2021
62bb800
Merge branch 'synthesis_queue' into development
jimallman Jul 3, 2021
821e6dd
Simpler subscription
jimallman Jul 3, 2021
a75239a
Merge branch 'synthesis_queue' into development
jimallman Jul 3, 2021
ed25a25
allow subscription to synth-run "runner"
jimallman Jul 3, 2021
8fb4711
Merge branch 'synthesis_queue' into development
jimallman Jul 3, 2021
c5e4100
Validate entire spec
jimallman Jul 3, 2021
600fa94
Merge branch 'synthesis_queue' into development
jimallman Jul 3, 2021
d7f21f2
Support verbose or quiet validation
jimallman Jul 3, 2021
40257c9
Merge branch 'synthesis_queue' into development
jimallman Jul 3, 2021
9bb1c54
another swing at disabling button
jimallman Jul 3, 2021
d6b2e5f
Merge branch 'synthesis_queue' into development
jimallman Jul 3, 2021
1ec23a4
more careful check for options
jimallman Jul 3, 2021
1942007
Merge branch 'synthesis_queue' into development
jimallman Jul 3, 2021
01f712d
gentler disable (click to see details)
jimallman Jul 3, 2021
0bfaa2d
Merge branch 'synthesis_queue' into development
jimallman Jul 3, 2021
a436d2d
prepare to handle new-synth-run response
jimallman Jul 6, 2021
99abe80
Steal sort + delete UI from collection editor
jimallman Jul 6, 2021
c7adb17
Merge branch 'synthesis_queue' into development
jimallman Jul 6, 2021
e621e04
migrate shuffling logic
jimallman Jul 6, 2021
ad96fed
Merge branch 'synthesis_queue' into development
jimallman Jul 6, 2021
039ff20
typo
jimallman Jul 6, 2021
3364827
Merge branch 'synthesis_queue' into development
jimallman Jul 6, 2021
018609c
diagnostic chatter
jimallman Jul 6, 2021
6ee373e
Merge branch 'synthesis_queue' into development
jimallman Jul 6, 2021
5556aae
clean up
jimallman Jul 6, 2021
09d076b
Merge branch 'synthesis_queue' into development
jimallman Jul 6, 2021
00dc54f
adapt list-ordering UI and behavior for synth run
jimallman Jul 6, 2021
95a6c6e
Merge branch 'synthesis_queue' into development
jimallman Jul 6, 2021
19b2dd6
layout cleanup
jimallman Jul 6, 2021
7df785f
Add mock collectionInfo object to hold rank+status
jimallman Jul 6, 2021
7bd23dd
Merge branch 'synthesis_queue' into development
jimallman Jul 6, 2021
e6aaf1e
Mark as observable array
jimallman Jul 6, 2021
72a6651
Merge branch 'synthesis_queue' into development
jimallman Jul 6, 2021
b032052
Look for *wrapped* items in arrays
jimallman Jul 6, 2021
242431b
Merge branch 'synthesis_queue' into development
jimallman Jul 6, 2021
a9bb354
typo
jimallman Jul 6, 2021
9a511ed
Merge branch 'synthesis_queue' into development
jimallman Jul 6, 2021
822c4b2
re-order args
jimallman Jul 6, 2021
61c7429
Merge branch 'synthesis_queue' into development
jimallman Jul 6, 2021
83ff331
update observable collections list
jimallman Jul 6, 2021
0aa9068
Merge branch 'synthesis_queue' into development
jimallman Jul 6, 2021
091a16e
Try another accessor
jimallman Jul 7, 2021
11ef75d
Merge branch 'synthesis_queue' into development
jimallman Jul 7, 2021
cddd87d
Always unwrap KO-bound collections for modification
jimallman Jul 7, 2021
76ceed2
Merge branch 'synthesis_queue' into development
jimallman Jul 7, 2021
aa8bdb5
Explicitly add 'rank' properties
jimallman Jul 7, 2021
2ea682d
Merge branch 'synthesis_queue' into development
jimallman Jul 7, 2021
760acd3
duh
jimallman Jul 7, 2021
8cab6df
Merge branch 'synthesis_queue' into development
jimallman Jul 7, 2021
7551919
Each new collection gets a ranking
jimallman Jul 7, 2021
e599e53
Merge branch 'synthesis_queue' into development
jimallman Jul 7, 2021
32a5188
force updates to synth-run list display
jimallman Jul 7, 2021
a98ecfa
Merge branch 'synthesis_queue' into development
jimallman Jul 7, 2021
c113931
typo
jimallman Jul 7, 2021
92a1f16
Merge branch 'synthesis_queue' into development
jimallman Jul 7, 2021
2b8303b
unwrap collection to test values
jimallman Jul 7, 2021
c6eaaaf
Merge branch 'synthesis_queue' into development
jimallman Jul 7, 2021
09e9d23
layout fixes for Move/Move All buttons
jimallman Jul 7, 2021
928ac82
Merge branch 'synthesis_queue' into development
jimallman Jul 7, 2021
1706765
typo
jimallman Jul 7, 2021
cdeed6e
Merge branch 'synthesis_queue' into development
jimallman Jul 7, 2021
c4af1ed
unwrap when sorting for Move All
jimallman Jul 7, 2021
0a7eca5
Merge branch 'synthesis_queue' into development
jimallman Jul 7, 2021
a8c7655
Consolidated npm build w/ all fixes
jimallman Nov 29, 2021
6f6b846
Clarify README to explain how to update master
jimallman Nov 29, 2021
f8ff03e
Uupdate README to use relative paths
jimallman Nov 29, 2021
109f82c
Overwrite TNRS package*.json and bundle files
jimallman Apr 19, 2022
c7b36e1
Merge branch 'smarter-csv-parsing' into development
jimallman Apr 19, 2022
2416281
typo
jimallman Apr 19, 2022
e5d8df2
Update TNRS bundle directly from smarter-csv-parsing
jimallman Apr 19, 2022
a2b4b55
Update bundle from smarter-csv-parsing
jimallman Apr 19, 2022
b515ea6
Merge branch 'smarter-csv-parsing' into development
jimallman Apr 19, 2022
b7d5fe3
Update bundle from smarter-csv-parsing
jimallman Apr 19, 2022
6236c73
Merge branch 'smarter-csv-parsing' into development
jimallman Apr 19, 2022
90b5a2e
Grab new bundle from smarter-csv-parsing
jimallman Apr 20, 2022
c147602
Merge branch 'smarter-csv-parsing' into development
jimallman Apr 20, 2022
ff16656
Forced merge (as-is) from fix-for-frozen-bulk-tnrs
jimallman Jun 29, 2022
b6762c6
Merge branch 'data-license' into development
jimallman Aug 9, 2022
99cd532
typo
jimallman Aug 19, 2022
f7a334c
Disable import-study-from-TreeBASE option
jimallman Sep 1, 2022
b8ae295
Add early warning to discourage clicks
jimallman Sep 1, 2022
b064f61
Merge branch 'disable-treebase-import' into development
jimallman Sep 1, 2022
3c5d509
More prominent warnings about TreeBASE import
jimallman Sep 1, 2022
caf70c6
Merge branch 'disable-treebase-import' into development
jimallman Sep 1, 2022
2440568
Update to use python3
jimallman Dec 9, 2022
0a64c04
Add source-tree option to Analysis tab UI
jimallman Jan 12, 2023
d2f83fd
Enhanced conflict UI for Analysis tab
jimallman Jan 13, 2023
1fb1d2c
Quickly determine context for tree/study search UI
jimallman Jan 20, 2023
dd1f404
Add context test for study+tree lookup UI
jimallman Jan 30, 2023
23b865b
More prep for flexible tree+study lookup
jimallman Jan 30, 2023
fa9956b
Merge branch 'conflict-with-source-tree2' into development
jimallman Jan 31, 2023
6b454e5
Return missing value
jimallman Feb 10, 2023
c609095
Merge branch 'conflict-with-source-tree2' into development
jimallman Feb 10, 2023
d6eb1b5
Resolve lingering conflict in TNRS bundle
jimallman Feb 14, 2023
a5a8be7
Smarter test for collection editor
jimallman Feb 14, 2023
0576509
Find container to reset study lookup
jimallman Feb 14, 2023
1101d95
Merge branch 'conflict-with-source-tree2' into development
jimallman Feb 14, 2023
8ccd624
Fix study-lookup reset
jimallman Feb 14, 2023
2cc0004
Merge branch 'conflict-with-source-tree2' into development
jimallman Feb 14, 2023
bdb9edb
Try to stop extra study-search results
jimallman Feb 14, 2023
53f5c44
Merge branch 'conflict-with-source-tree2' into development
jimallman Feb 14, 2023
5b1bd31
Add study+tree ID option for tree conflict
jimallman Feb 20, 2023
8ce70d2
Safer minting of unique element IDs
jimallman Feb 20, 2023
743975f
Merge branch 'mint-unique-element-ids' into development
jimallman Feb 20, 2023
c4af18a
JS typos and cleanup
jimallman Feb 21, 2023
1dc70b9
Merge branch 'mint-unique-element-ids' into development
jimallman Feb 21, 2023
7dc5529
temporary debugger statement
jimallman Feb 21, 2023
f3f6d24
Merge branch 'mint-unique-element-ids' into development
jimallman Feb 21, 2023
48dce8a
Filter array with jQuery.grep (vs jQuery.map)
jimallman Feb 21, 2023
1e8f5a9
Merge branch 'mint-unique-element-ids' into development
jimallman Feb 21, 2023
750b2fd
Merge branch '2nexml-missing-bug' into development
jimallman Feb 27, 2023
7b549b5
Hide debugging chatter, show 501 error
jimallman Feb 27, 2023
0398588
Merge branch 'allow-reusing-taxon-names' into development
jimallman Feb 28, 2023
e58203e
Merge branch 'allow-reusing-taxon-names' into development
jimallman Feb 28, 2023
bd5d02d
Revert "Safer minting of unique element IDs"
jimallman Feb 28, 2023
3a59435
Merge branch 'store-highest-minted-element-ids' into development
jimallman Feb 28, 2023
9d2b329
Merge branch 'store-highest-minted-element-ids' into development
jimallman Feb 28, 2023
ed93051
Merge branch 'store-highest-minted-element-ids' into development
jimallman Feb 28, 2023
d50dd69
Merge branch 'store-highest-minted-element-ids' into development
jimallman Feb 28, 2023
f5734a0
Hot fix to support script-managed-trees code
jimallman Feb 28, 2023
31c0635
Merge branch 'store-highest-minted-element-ids' into development
jimallman Feb 28, 2023
131d3dd
Merge branch 'store-highest-minted-element-ids' into development
jimallman Feb 28, 2023
9dde3c3
Merge branch 'smarter-collection-refresh' into development
jimallman Mar 7, 2023
9852d80
Merge branch 'smarter-collection-refresh' into development
jimallman Mar 7, 2023
d65bc53
Merge branch 'master' into conflict-with-source-tree2
jimallman Mar 7, 2023
73a34e9
Merge branch 'conflict-with-source-tree2' into development
jimallman Mar 7, 2023
7c5372d
Dynamic UI for single-tree popup
jimallman Mar 7, 2023
a8b7f76
Merge branch 'conflict-with-source-tree2' into development
jimallman Mar 7, 2023
8422934
Extra test for single-tree viewer
jimallman Mar 7, 2023
f7d817e
Merge branch 'conflict-with-source-tree2' into development
jimallman Mar 7, 2023
d2c7c51
typo
jimallman Mar 7, 2023
a64801d
Merge branch 'conflict-with-source-tree2' into development
jimallman Mar 7, 2023
b1d0062
Add cloned UI for study+tree lookup
jimallman Mar 7, 2023
00596de
Merge branch 'conflict-with-source-tree2' into development
jimallman Mar 7, 2023
1d2e408
Remove extra GO button
jimallman Mar 13, 2023
cf9fd41
Merge branch 'conflict-with-source-tree2' into development
jimallman Mar 13, 2023
5ee7dce
Refactoring for multiple contexts
jimallman Mar 13, 2023
5b5731f
Merge branch 'conflict-with-source-tree2' into development
jimallman Mar 13, 2023
5af1a1c
comment cleanup
jimallman Mar 13, 2023
2bf2639
Merge branch 'conflict-with-source-tree2' into development
jimallman Mar 13, 2023
15004ca
Add results list for study+tree lookup
jimallman Mar 13, 2023
c2f4e76
Merge branch 'conflict-with-source-tree2' into development
jimallman Mar 13, 2023
1c1c15a
Cleanup for alt contexts
jimallman Mar 13, 2023
fe19e7e
Merge branch 'conflict-with-source-tree2' into development
jimallman Mar 13, 2023
11e62cc
Load study list and (re)bind UI as needed
jimallman Mar 13, 2023
4a30af2
Merge branch 'conflict-with-source-tree2' into development
jimallman Mar 13, 2023
82f6253
Refactor CSS to show link to selected study
jimallman Mar 13, 2023
5b1e3f4
Merge branch 'conflict-with-source-tree2' into development
jimallman Mar 13, 2023
da60a21
Alignment fixes
jimallman Mar 14, 2023
b900242
Merge branch 'conflict-with-source-tree2' into development
jimallman Mar 14, 2023
283302b
Gather study+tree IDs for API call (and history)
jimallman Mar 14, 2023
df54ea4
Merge branch 'conflict-with-source-tree2' into development
jimallman Mar 14, 2023
3d6ef6f
Encode URI for conflict info
jimallman Mar 14, 2023
931aaac
Merge branch 'conflict-with-source-tree2' into development
jimallman Mar 14, 2023
f741da9
Double encode non-hash octothorpe in URL?
jimallman Mar 14, 2023
b250128
Merge branch 'conflict-with-source-tree2' into development
jimallman Mar 14, 2023
33fb973
More safety for dangerous # in URL
jimallman Mar 14, 2023
0faf2e2
Merge branch 'conflict-with-source-tree2' into development
jimallman Mar 14, 2023
652a00a
Use '@' instead of '#' (else History breaks)
jimallman Mar 14, 2023
f186627
Merge branch 'conflict-with-source-tree2' into development
jimallman Mar 14, 2023
9cfcad7
Cosmetic tweaks; prep for incoming URL
jimallman Mar 14, 2023
3ed0399
Cosmetic tweaks; prep for incoming URL
jimallman Mar 14, 2023
d84fd21
Update study+tree selectors even if conflict fails
jimallman Mar 14, 2023
4bf4ba7
Merge branch 'conflict-with-source-tree2' into development
jimallman Mar 14, 2023
81f8380
Isolate UI refresh for incoming URLs?
jimallman Mar 14, 2023
5252f82
Merge branch 'conflict-with-source-tree2' into development
jimallman Mar 14, 2023
1fcf083
Working through alternative cases...
jimallman Mar 14, 2023
e993c36
Working through alternative cases...
jimallman Mar 14, 2023
0a8706b
Remove call w/o conflict details
jimallman Mar 14, 2023
b7555aa
Merge branch 'conflict-with-source-tree2' into development
jimallman Mar 14, 2023
e529a5a
Revert "Remove call w/o conflict details"
jimallman Mar 14, 2023
dfce484
Mock up conflict info in case of errors
jimallman Mar 14, 2023
5f788c0
Merge branch 'conflict-with-source-tree2' into development
jimallman Mar 14, 2023
fc04be9
Parse incoming URL to get study+tree ids
jimallman Mar 14, 2023
c604e3c
Merge branch 'conflict-with-source-tree2' into development
jimallman Mar 14, 2023
e4043e8
Show basic feedback on incoming tree URL
jimallman Mar 14, 2023
2530f42
Show basic feedback on incoming tree URL
jimallman Mar 14, 2023
d05fbf3
Wrap optional UI in hidden DIV
jimallman Mar 21, 2023
9abf2f4
Merge branch 'conflict-with-source-tree2' into development
jimallman Mar 21, 2023
b8d9e5a
Generalize form init and action selectors
jimallman Mar 21, 2023
7e5c9d8
Load study list (for lookup) on page load
jimallman Mar 21, 2023
da1acee
Merge branch 'conflict-with-source-tree2' into development
jimallman Mar 21, 2023
2cea0f0
Init lookup form AFTER reaching new tab
jimallman Mar 21, 2023
93bccb8
Merge branch 'conflict-with-source-tree2' into development
jimallman Mar 21, 2023
44afadf
Load study list AFTER tab is properly loaded
jimallman Mar 21, 2023
f24cb71
Merge branch 'conflict-with-source-tree2' into development
jimallman Mar 21, 2023
24220e2
Enable reference-select behavior
jimallman Mar 21, 2023
4102c9a
Merge branch 'conflict-with-source-tree2' into development
jimallman Mar 21, 2023
80f28cb
Re-position study selector for Analyses tab
jimallman Mar 21, 2023
1cac70c
Merge branch 'conflict-with-source-tree2' into development
jimallman Mar 21, 2023
b67cc0a
Fix layout in tree-view popup
jimallman Mar 27, 2023
9f1a242
Load study lookup list for Home tab
jimallman Mar 27, 2023
d8b0f32
Merge branch 'conflict-with-source-tree2' into development
jimallman Mar 27, 2023
b1c4446
Looser test for tree-view-popup context
jimallman Mar 27, 2023
db39297
Merge branch 'conflict-with-source-tree2' into development
jimallman Mar 27, 2023
37c0b44
Incoming conflict-URL message should persist
jimallman Mar 28, 2023
04963e3
Merge branch 'conflict-with-source-tree2' into development
jimallman Mar 28, 2023
17ebe8f
Layout tweaks for Analyses tab
jimallman Mar 28, 2023
6355823
Merge branch 'conflict-with-source-tree2' into development
jimallman Mar 28, 2023
2e1f6b7
Suppress auto-suggestions for study-lookup fields.
jimallman Mar 28, 2023
c3c9bb1
Merge branch 'conflict-with-source-tree2' into development
jimallman Mar 28, 2023
22118f4
Fix study+tree conflict summary
jimallman Mar 28, 2023
32cfdfe
Merge branch 'conflict-with-source-tree2' into development
jimallman Mar 28, 2023
571793a
Fix raw OR encoded '@' in reference tree ID
jimallman Mar 28, 2023
5cc43fd
Merge branch 'conflict-with-source-tree2' into development
jimallman Mar 28, 2023
ae74678
Smarter encoding (preserve '@' for displayed name)
jimallman Mar 28, 2023
42186a9
Merge branch 'conflict-with-source-tree2' into development
jimallman Mar 28, 2023
f5d4e1d
Open reference tree in a new window/frame.
jimallman Apr 3, 2023
9dbd159
Merge branch 'conflict-with-source-tree2' into development
jimallman Apr 3, 2023
7b1e05d
Link directly to reference tree in new frame.
jimallman Apr 3, 2023
6b21d1f
Merge branch 'conflict-with-source-tree2' into development
jimallman Apr 3, 2023
6aa1a52
Expect the curation app base URL in webapp config
jimallman May 1, 2023
5c07c19
Add note to circle back to example config files
jimallman May 2, 2023
fffe9e3
Refactoring for clarity (new config standards)
jimallman May 9, 2023
643e3dc
Update API-endpoint method calls
jimallman May 9, 2023
0507168
More refactoring of API settings
jimallman May 9, 2023
cf73261
Use dynamic web-app URL for curator
jimallman May 9, 2023
94b26f4
Merge branch 'fix-webapp-configs' into development
jimallman May 9, 2023
d569460
Remove outdated test for JS vars
jimallman May 9, 2023
6396819
Merge branch 'fix-webapp-configs' into development
jimallman May 9, 2023
a401ab4
Use common API base URL for tree/taxomachine calls
jimallman May 9, 2023
568a30a
Merge branch 'fix-webapp-configs' into development
jimallman May 9, 2023
73e9584
Update old vars from webapp config file
jimallman May 16, 2023
1f00d5a
More conversion to latest webapp config vars
jimallman May 16, 2023
3d1bc62
Merge branch 'fix-webapp-configs' into development
jimallman May 16, 2023
a46109b
merge
mtholder May 31, 2023
ae3882f
ignore
mtholder Jun 1, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -20,5 +20,8 @@ GITHUB_CLIENT_SECRET
GITHUB_APP_PRIVATE_KEY_PEM
smasher/lib/json-simple-1.1.1.jar
deploy/setup/CONFIG
env
web2py
restart.sh
webapp/static/statistics/
lint/
8 changes: 4 additions & 4 deletions LICENSE.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Copyright (c) 2013, Jonathan Rees
Copyright (c) 2013, Mark Holder
Copyright (c) 2013, Jim Allman
Copyright (c) 2013, Stephen Smith
Copyright (c) 2013-2016, Jonathan Rees
Copyright (c) 2013-2016, Mark Holder
Copyright (c) 2013-2016, Jim Allman
Copyright (c) 2013-2016, Stephen Smith

All rights reserved.

Expand Down
114 changes: 51 additions & 63 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,101 +1,89 @@
opentree
========
# opentree

This is the repository for the Open Tree of Life web applications, one of many subsystems making up the Open Tree of Life project code.
This is the repository for the Open Tree of Life web applications, one of many subsystems making up
the Open Tree of Life project code.
For Open Tree of Life documentation, see
[the germinator repository's wiki](https://github.com/OpenTreeOfLife/germinator/wiki).
The 'deployment system' and web API documentation sources that formerly resided in this
repository now live in the [germinator repository](https://github.com/OpenTreeOfLife/germinator).
The following instructions have not been reviewed in a long time.
For local installation a better place to start might be
[this wiki page](https://github.com/OpenTreeOfLife/opentree/wiki/Installing-a-local-curator-and-tree-browser-test-server).

For Open Tree of Life documentation, see [the germinator repository's wiki](https://github.com/OpenTreeOfLife/germinator/wiki). The 'deployment system' and web API documentation sources that formerly resided in this repository now live in the [germinator repository](https://github.com/OpenTreeOfLife/germinator).

The following instructions have not been reviewed in a long time. For local installation a better place to start might be [this wiki page](https://github.com/OpenTreeOfLife/opentree/wiki/Installing-a-local-curator-and-tree-browser-test-server).

Installation
============
See the phylografter instructions for
more details about using web2py.
## Installation

We strongly recommend using a virtual environment to manage the version of
Python and installed modules. We're currently running opentree with Python
v2.7.3. Newer versions of python2.7 should work, but **NOTE that web2py is not
Python and installed modules.
We're currently running opentree with Python
v2.7.3.
Newer versions of python2.7 should work, but **NOTE that web2py is not
compatible with Python 3**.
The final invocation to create your virtualenv should look something like:

If necessary, compile Python2.7 and use it when making your virtualenv. You
should be able to safely install multiple versions of python using your
preferred package manager, or by configuring Python2.7 with the --prefix
option and 'make altinstall'.

So the final invocation to create your virtualenv should look something like:
```
$ virtualenv --python=/usr/bin/python2.7 --distribute <path/to/new/virtualenv/>
```
$ virtualenv --python=(which python2.7) --distribute env
$ source env/bin/activate

Or, if you're using virtualenvwrapper (http://virtualenvwrapper.readthedocs.org/en/latest/index.html):
```
$ mkvirtualenv --python=python2.7 --no-site-packages --distribute opentree
```

The included **requirements.txt** file lists known-good versions of all the required
python modules for opentree, plus a few convenience modules. To [install these modules
using pip](http://www.pip-installer.org/en/latest/cookbook.html#requirements-files),

<pre>
pip install -r requirements.txt
</pre>
pip install -r requirements.txt

### install web2py and link to applications

The contents of the webapp subdirectory are a web2py application. Make a symbolic
link called "opentree" in a web2py/applications directory to the webapp directory.
You should be able to launch web2py and see the app running at http://127.0.0.1:8000/opentree/

There is now a second web2py app for the curation tool, which will also need a
symlink. This will be available at http://127.0.0.1:8000/curator/
wget --no-verbose -O web2py_2.8.2_src.zip \
https://github.com/web2py/web2py/archive/R-2.8.2.zip
unzip web2py_2.8.2_src.zip
mv web2py_2.8.2_src web2py
cd web2py/applications
ln -s ../../webapp opentree
cd -
cp -p oauth20_account.py web2py/gluon/contrib/login_methods/
cp -p rewrite.py web2py/gluon/
cp -p custom_import.py web2py/gluon/
cp -p SITE.routes.py web2py/routes.py

Briefly:

1. Download and unpack the source code version of web2py from
http://www.web2py.com/examples/default/download MTH used version 2.4.2 of web2py
Optionally, you can install a second web2py app for the curation tool, which will also need a
symlink. This will be available at http://127.0.0.1:8000/curator/

NOTE: This version of web2py includes basic support for OAuth 2.0, but it needs
a minor patch to support for login via the GitHub API v3. (The curation app
uses GitHub for its datastore and attribution. The tree browser also uses it
for its issue tracker, with optional authentication for convenience.) Replace
this web2py file with a modified version in the same folder as this README:
<pre>
{web2py-2.4.4}/gluon/contrib/login_methods/oauth20_account.py
</pre>
cd web2py/applications
ln -s ../../curator curator
cd -

2. Create the sym links for the main web app and the study curation tool.
## Configuring the application
Copy and tweak the template `config` files to provide the variables that will
be available during execution of the web applications:

<pre>
cd web2py/applications
ln -s /full/path/to/opentree/webapp opentree
ln -s /full/path/to/opentree/curator curator
</pre>
for app in webapp curator ; do
cp ${app}/private/config.example ${app}/private/config
done

3. Customize web2py's site-wide routing behavior using "SITE.routes.py"
Edit each `${app}/private/config` file to use the API servers and properties that you
want to use for debugging purposes.

<pre>
# return to main web2py directory
cd ..
cp /full/path/to/opentree/SITE.routes.py routes.py
</pre>

This routing file works in tandem with the opentree app router and lets us have
proper URLs with hyphens instead of underscores.

4. Launch web2py
## Launch web2py for debugging

<pre>
cd /full/path/to/web2py
python web2py.py --nogui -a '&lt;recycle&gt;'
</pre>
cd web2py
python web2py.py --nogui -a '<recycle>'

Where the -a flag is allowing you to reuse the previous admin password that you used
with this instance of web2py.

## For an instance that allows logging in

**To test with login and proper domain name**, modify your test system's
`/etc/hosts` file (or equivalent) to resolve the domain `devtree.opentreeoflife.org`
to localhost (127.0.0.1). Then run web2py on (privileged) port 80 like so:

<pre>
cd /full/path/to/web2py
cd web2py
sudo python web2py.py --nogui -p 80 -a '&lt;recycle&gt;'
</pre>

Expand Down
35 changes: 19 additions & 16 deletions curator/controllers/collection.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
#########################################################################

from applications.opentree.modules.opentreewebapputil import(
get_opentree_services_method_urls,
get_opentree_api_endpoints,
fetch_current_TNRS_context_names,
fetch_trees_queued_for_synthesis,
get_maintenance_info)
Expand All @@ -27,7 +27,7 @@ def index():
Show list searchable/filtered list of all collections
(default filter = My Collections, if logged in?)
"""
view_dict = get_opentree_services_method_urls(request)
view_dict = get_opentree_api_endpoints(request)
view_dict['maintenance_info'] = get_maintenance_info(request)
if auth.is_logged_in():
# user is logged in, filter to their own collections by default?
Expand All @@ -46,7 +46,7 @@ def view():
? OR can this include work-in-progress from a personal branch?
"""
response.view = 'collection/edit.html'
view_dict = get_opentree_services_method_urls(request)
view_dict = get_opentree_api_endpoints(request)
view_dict['maintenance_info'] = get_maintenance_info(request)
#view_dict['taxonSearchContextNames'] = fetch_current_TNRS_context_names(request)
view_dict['collectionID'] = request.args[0] +'/'+ request.args[1]
Expand All @@ -65,7 +65,7 @@ def create():
if maintenance_info.get('maintenance_in_progress', False):
redirect(URL('curator', 'default', 'index', vars={"maintenance_notice":"true"}))
pass
view_dict = get_opentree_services_method_urls(request)
view_dict = get_opentree_api_endpoints(request)
view_dict['message'] = "collection/create"
return view_dict
"""
Expand All @@ -80,7 +80,7 @@ def edit():
args=request.args))
# Fetch a fresh list of search contexts for TNRS? see working example in
# the header search of the main opentree webapp
view_dict = get_opentree_services_method_urls(request)
view_dict = get_opentree_api_endpoints(request)
view_dict['taxonSearchContextNames'] = fetch_current_TNRS_context_names(request)
view_dict['treesQueuedForSynthesis'] = fetch_trees_queued_for_synthesis(request)
view_dict['collectionID'] = request.args[0] +'/'+ request.args[1]
Expand Down Expand Up @@ -108,6 +108,17 @@ def load():
def store():
return dict(message="collection/store")

def synthesis_dashboard():
"""
Allow any visitor to view (read-only!) a queue of recent custom-synthesis runs
"""
response.view = 'collection/synthesis_dashboard.html'
view_dict = get_opentree_services_method_urls(request)
view_dict['maintenance_info'] = get_maintenance_info(request)
view_dict['taxonSearchContextNames'] = fetch_current_TNRS_context_names(request)
view_dict['userCanEdit'] = auth.is_logged_in() and True or False
return view_dict

""" TODO: Adapt this for current collection status, based on new APIs """
def _get_latest_synthesis_details_for_collection_id( collection_id ):
# Fetch the last SHA for this collection that was used in the latest
Expand All @@ -118,7 +129,7 @@ def _get_latest_synthesis_details_for_collection_id( collection_id ):
import json
import requests

method_dict = get_opentree_services_method_urls(request)
method_dict = get_opentree_api_endpoints(request)

# fetch a list of all studies and collections that contribute to synthesis
# TODO: Request that these fields be added
Expand All @@ -137,15 +148,6 @@ def _get_latest_synthesis_details_for_collection_id( collection_id ):
# Draft code is based on schema proposed in
# https://github.com/OpenTreeOfLife/phylesystem-api/issues/228

# fetch the full source list, then look for this study and its trees
commit_SHA_in_synthesis = None
# if key (collection ID, e.g. "opentreeoflife/default") matches, read its details
for c_id, collection_details in source_dict.items():
if c_id == collection_id:
# this is the collection we're interested in!
commit_SHA_in_synthesis = collection_details['git_sha']
return commit_SHA_in_synthesis # TODO: return more information?

# fetch the full source list, then look for this collection and its SHA
# if key (collection ID, e.g. "opentreeoflife/default") matches, read its details
for c_id, collection_details in source_dict.items():
Expand All @@ -155,4 +157,5 @@ def _get_latest_synthesis_details_for_collection_id( collection_id ):
return None
except Exception, e:
# throw 403 or 500 or just leave it
raise HTTP(500, T('Unable to retrieve latest synthesis details for collection {u}'.format(u=collection)))
##raise HTTP(500, T('Unable to retrieve latest synthesis details for collection {u}'.format(u=collection_id)))
raise HTTP(500, T('Unable to retrieve latest synthesis details for collection {u}:\n\n{e}'.format(u=collection_id, e=e)))
15 changes: 8 additions & 7 deletions curator/controllers/default.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
from applications.opentree.modules.opentreewebapputil import(
get_opentree_services_method_urls,
get_opentree_api_endpoints,
extract_nexson_from_http_call,
fetch_github_app_auth_token,
get_maintenance_info)
Expand Down Expand Up @@ -29,7 +29,7 @@ def index():
a logged-in user.
"""
#response.flash = T("Welcome to web2py!")
view_dict = get_opentree_services_method_urls(request)
view_dict = get_opentree_api_endpoints(request)
view_dict['maintenance_info'] = get_maintenance_info(request)

if False: ## auth.is_logged_in():
Expand All @@ -45,12 +45,12 @@ def collections():

TODO: move to collection/index?
"""
view_dict = get_opentree_services_method_urls(request)
view_dict = get_opentree_api_endpoints(request)
view_dict['maintenance_info'] = get_maintenance_info(request)
return view_dict

def error():
view_dict = get_opentree_services_method_urls(request)
view_dict = get_opentree_api_endpoints(request)
return view_dict

@auth.requires_login()
Expand Down Expand Up @@ -78,7 +78,7 @@ def profile():
shows a personalized profile for any user (default = the current logged-in user)
http://..../{app}/default/profile/[username]
"""
view_dict = get_opentree_services_method_urls(request)
view_dict = get_opentree_api_endpoints(request)
view_dict['maintenance_info'] = get_maintenance_info(request)

# if the URL has a [username], try to load their information
Expand Down Expand Up @@ -192,7 +192,7 @@ def _get_opentree_activity( userid=None, username=None ):
'added_collections':[],
'curated_collections':[]
}
method_dict = get_opentree_services_method_urls(request)
method_dict = get_opentree_api_endpoints(request)

# Use GitHub API to gather comments from this user, as shown in
# https://github.com/OpenTreeOfLife/feedback/issues/created_by/jimallman
Expand Down Expand Up @@ -470,6 +470,7 @@ def to_nexson():
_LOG = get_logger(request, 'to_nexson')
if request.env.request_method == 'OPTIONS':
raise HTTP(200, T('Preflight approved!'))

orig_args = {}
is_upload = False
# several of our NexSON use "uploadid" instead of "uploadId" so we should accept either
Expand Down Expand Up @@ -622,7 +623,7 @@ def to_nexson():
try:
assert(os.path.exists(exe_path))
except:
response.view = 'generic.json'; return {'hb':exe_path}
#response.view = 'generic.json'; return {'hb':exe_path}
_LOG.warn("Could not find the 2nexml executable")
raise HTTP(501, T("Server is misconfigured for 2nexml conversion"))
invoc = [exe_path, '-f{f}'.format(f=inp_format), ]
Expand Down
12 changes: 6 additions & 6 deletions curator/controllers/study.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
#########################################################################

from applications.opentree.modules.opentreewebapputil import(
get_opentree_services_method_urls,
get_opentree_api_endpoints,
fetch_current_TNRS_context_names,
fetch_trees_queued_for_synthesis,
get_maintenance_info)
Expand All @@ -25,7 +25,7 @@ def index():
Show list searchable/filtered list of all studies
(default filter = My Studies, if logged in?)
"""
view_dict = get_opentree_services_method_urls(request)
view_dict = get_opentree_api_endpoints(request)

if auth.is_logged_in():
# user is logged in, filter to their own studies by default?
Expand All @@ -44,7 +44,7 @@ def view():
? OR can this include work-in-progress from a personal branch?
"""
response.view = 'study/edit.html'
view_dict = get_opentree_services_method_urls(request)
view_dict = get_opentree_api_endpoints(request)
view_dict['maintenance_info'] = get_maintenance_info(request)
#view_dict['taxonSearchContextNames'] = fetch_current_TNRS_context_names(request)
view_dict['studyID'] = request.args[0]
Expand All @@ -61,7 +61,7 @@ def create():
if maintenance_info.get('maintenance_in_progress', False):
redirect(URL('curator', 'default', 'index', vars={"maintenance_notice":"true"}))
pass
view_dict = get_opentree_services_method_urls(request)
view_dict = get_opentree_api_endpoints(request)
view_dict['message'] = "study/create"
return view_dict

Expand All @@ -76,7 +76,7 @@ def edit():
args=request.args))
# Fetch a fresh list of search contexts for TNRS? see working example in
# the header search of the main opentree webapp
view_dict = get_opentree_services_method_urls(request)
view_dict = get_opentree_api_endpoints(request)
view_dict['taxonSearchContextNames'] = fetch_current_TNRS_context_names(request)
view_dict['treesQueuedForSynthesis'] = fetch_trees_queued_for_synthesis(request)
view_dict['studyID'] = request.args[0]
Expand All @@ -93,7 +93,7 @@ def _get_latest_synthesis_details_for_study_id( study_id ):
import json
import requests

method_dict = get_opentree_services_method_urls(request)
method_dict = get_opentree_api_endpoints(request)

# fetch a list of all studies that contribute to synthesis
fetch_url = method_dict['getSynthesisSourceList_url']
Expand Down
Loading