This repository has been archived by the owner on Jul 29, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
139 changed files
with
19,223 additions
and
97 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,153 @@ | ||
License | ||
======= | ||
|
||
labadmin makes usage of all of the following copyrighted packages; their licenses have been centralized in this document. | ||
|
||
-------------------------------------------------------------------------------- | ||
|
||
#### Chosen (v1.4.2) | ||
- by Patrick Filler for [Harvest](http://getharvest.com) | ||
- Copyright (c) 2011-2014 by Harvest | ||
|
||
Available for use under the [MIT License](http://en.wikipedia.org/wiki/MIT_License) | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the "Software"), to deal | ||
in 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: | ||
|
||
The above copyright notice and this permission notice shall be included in | ||
all copies or substantial portions of the Software. | ||
|
||
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 | ||
AUTHORS 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 IN | ||
THE SOFTWARE. | ||
|
||
-------------------------------------------------------------------------------- | ||
|
||
### DataTables ([1.10.12](https://github.com/DataTables/DataTables/releases/tag/1.10.12)) is released under the MIT License | ||
|
||
Copyright (c) 2008-2015 SpryMedia Limited | ||
http://datatables.net | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the "Software"), to deal | ||
in 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: | ||
|
||
The above copyright notice and this permission notice shall be included in | ||
all copies or substantial portions of the Software. | ||
|
||
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 | ||
AUTHORS 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 IN | ||
THE SOFTWARE. | ||
|
||
-------------------------------------------------------------------------------- | ||
|
||
### jQuery ([1.9.1](https://github.com/jquery/jquery/releases/tag/1.9.1)) is released under the MIT License | ||
|
||
Copyright 2012 jQuery Foundation and other contributors | ||
http://jquery.com/ | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining | ||
a copy of this software and associated documentation files (the | ||
"Software"), to deal in 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: | ||
|
||
The above copyright notice and this permission notice shall be | ||
included in all copies or substantial portions of the Software. | ||
|
||
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 AUTHORS 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 IN THE SOFTWARE. | ||
|
||
-------------------------------------------------------------------------------- | ||
|
||
### QUnit [2.0.1](https://github.com/jquery/qunit/releases/tag/2.0.1) | ||
|
||
Copyright jQuery Foundation and other contributors, https://jquery.org/ | ||
|
||
This software consists of voluntary contributions made by many | ||
individuals. For exact contribution history, see the revision history | ||
available at https://github.com/jquery/qunit | ||
|
||
The following license applies to all parts of this software except as | ||
documented below: | ||
|
||
==== | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining | ||
a copy of this software and associated documentation files (the | ||
"Software"), to deal in 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: | ||
|
||
The above copyright notice and this permission notice shall be | ||
included in all copies or substantial portions of the Software. | ||
|
||
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 AUTHORS 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 IN THE SOFTWARE. | ||
|
||
==== | ||
|
||
All files located in the node_modules directory are externally maintained | ||
libraries used by this software which have their own licenses; we | ||
recommend you read them, as their terms may differ from the terms above. | ||
|
||
-------------------------------------------------------------------------------- | ||
|
||
### Font Awesome [4.6.3](https://github.com/FortAwesome/Font-Awesome/releases/tag/v4.6.3) | ||
|
||
- by Dave Gandy - [http://fontawesome.io](http://fontawesome.io) | ||
|
||
Font License | ||
Applies to all desktop and webfont files in the following directory: font-awesome/fonts/. | ||
License: SIL OFL 1.1 | ||
URL: http://scripts.sil.org/OFL | ||
|
||
==== | ||
|
||
Code License | ||
Applies to all CSS and LESS files in the following directories: font-awesome/css/, font-awesome/less/, and font-awesome/scss/. | ||
License: MIT License | ||
URL: [http://opensource.org/licenses/mit-license.html](http://opensource.org/licenses/mit-license.html) | ||
|
||
==== | ||
|
||
Documentation License | ||
Applies to all Font Awesome project files that are not a part of the Font or Code licenses. | ||
License: CC BY 3.0 | ||
URL: [http://creativecommons.org/licenses/by/3.0/](http://creativecommons.org/licenses/by/3.0/) | ||
|
||
==== | ||
|
||
Brand Icons | ||
All brand icons are trademarks of their respective owners. | ||
The use of these trademarks does not indicate endorsement of the trademark holder by Font Awesome, nor vice versa. | ||
Brand icons should only be used to represent the company or product to which they refer. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,20 @@ | ||
#!/usr/bin/env python | ||
# ----------------------------------------------------------------------------- | ||
# Copyright (c) 2014--, The LabAdmin Development Team. | ||
# | ||
# Distributed under the terms of the BSD 3-clause License. | ||
# | ||
# The full license is in the file LICENSE, distributed with this software. | ||
# ----------------------------------------------------------------------------- | ||
|
||
from knimin.lib.configuration import config | ||
from knimin.lib.data_access import KniminAccess | ||
from knimin.lib.ag_jira import create_jira_handler | ||
from knimin.lib.qiita_client import QiitaClient | ||
|
||
db = KniminAccess(config) | ||
jira_handler = create_jira_handler(config) | ||
qiita_client = QiitaClient(config.qiita_host, config.qiita_client_id, | ||
config.qiita_client_secret, | ||
server_cert=config.qiita_server_cert) | ||
|
||
__all__ = ['db', 'jira_handler'] | ||
__all__ = ['db', 'jira_handler', 'qiita_client'] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
# ----------------------------------------------------------------------------- | ||
# Copyright (c) 2014--, The LabAdmin Development Team. | ||
# | ||
# Distributed under the terms of the BSD 3-clause License. | ||
# | ||
# The full license is in the file LICENSE, distributed with this software. | ||
# ----------------------------------------------------------------------------- | ||
|
||
from tornado.web import authenticated | ||
|
||
from knimin.handlers.base import BaseHandler | ||
from knimin.handlers.access_decorators import set_access | ||
from knimin import db | ||
|
||
|
||
@set_access(['Admin']) | ||
class PMCondensePlatesHandler(BaseHandler): | ||
@authenticated | ||
def get(self): | ||
dna_plates = db.get_dna_plate_list() | ||
for plate in dna_plates: | ||
plate['date'] = plate['date'].isoformat() | ||
|
||
self.render("pm_condense.html", | ||
plates=dna_plates, | ||
robots=db.get_property_options("processing_robot")) | ||
|
||
@authenticated | ||
def post(self): | ||
plate1 = self.get_argument('plate-1') | ||
plate2 = self.get_argument('plate-2') | ||
plate3 = self.get_argument('plate-3') | ||
plate4 = self.get_argument('plate-4') | ||
name = self.get_argument('name') | ||
robot = self.get_argument('robot') | ||
volume = self.get_argument('volume') | ||
|
||
dna_plates = [(plate1, 0), (plate2, 1), (plate3, 2), (plate4, 3)] | ||
plates = [plate1, plate2, plate3, plate4] | ||
pos = [0, 1, 2, 3] | ||
dna_plates = [(p, idx) for p, idx in zip(plates, pos) if p] | ||
# Magic number 2 -> The only supported plate type here is | ||
# a 384-well plate | ||
plate_id = db.condense_dna_plates( | ||
dna_plates, name, self.get_current_user(), robot, 2, volume) | ||
|
||
self.redirect("/pm_quantify/?plate=%s" % plate_id) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
# ----------------------------------------------------------------------------- | ||
# Copyright (c) 2014--, The LabAdmin Development Team. | ||
# | ||
# Distributed under the terms of the BSD 3-clause License. | ||
# | ||
# The full license is in the file LICENSE, distributed with this software. | ||
# ----------------------------------------------------------------------------- | ||
|
||
from tornado.web import authenticated | ||
from tornado.escape import json_decode, json_encode | ||
|
||
from knimin.handlers.base import BaseHandler | ||
from knimin.handlers.access_decorators import set_access | ||
from knimin.lib.qiita_jira_util import create_study | ||
from knimin import qiita_client, db | ||
|
||
|
||
@set_access(['Admin']) | ||
class PMCreateStudyHandler(BaseHandler): | ||
@authenticated | ||
def get(self): | ||
_, qiita_persons = qiita_client.get('/api/v1/person') | ||
# We don't have an id for each person. "Create" one by jsonizing | ||
# the information of each person | ||
for q in qiita_persons: | ||
q['json'] = json_encode(q) | ||
|
||
self.render("pm_create_study.html", currentuser=self.current_user, | ||
qiita_persons=qiita_persons) | ||
|
||
@authenticated | ||
def post(self): | ||
qiita_user = self.get_argument('qiita-user') | ||
jira_user = self.get_argument('jira-user') | ||
title = self.get_argument('study-title') | ||
alias = self.get_argument('study-alias') | ||
description = self.get_argument('study-description') | ||
abstract = self.get_argument('study-abstract') | ||
qiita_pi = json_decode(self.get_argument('qiita-pi')) | ||
qiita_lp = json_decode(self.get_argument('qiita-lp')) | ||
|
||
study_id = create_study(title, abstract, description, alias, | ||
qiita_user, qiita_pi, qiita_lp, jira_user) | ||
study = db.read_study(study_id) | ||
|
||
self.render("pm_study_created.html", current_user=self.current_user, | ||
title=title, study_id=study_id, jira_key=study['jira_id']) |
Oops, something went wrong.