Compare commits
21 Commits
merge-date
...
fix-output
Author | SHA1 | Date | |
---|---|---|---|
1b2f9a2278 | |||
937708f5d8 | |||
4c3ee712bb | |||
f5af965a33 | |||
bce16d336d | |||
729514ac89 | |||
46ce070b09 | |||
891fa50868 | |||
fdb3963ede | |||
90379a69c5 | |||
0faca67c35 | |||
77b533b642 | |||
ccf013e3c9 | |||
e67db4f1ef | |||
b11a26a812 | |||
4f41d8597f | |||
17b2d359bb | |||
62ca62274e | |||
501cae8329 | |||
0543c3e89f | |||
2191140232 |
12
.github/PULL_REQUEST_TEMPLATE.md
vendored
Normal file
12
.github/PULL_REQUEST_TEMPLATE.md
vendored
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
Thanks for contributing to centillion!
|
||||||
|
|
||||||
|
Please place an x between the brackets to indicate a yes answer
|
||||||
|
to the questions below.
|
||||||
|
|
||||||
|
- [ ] Is this pull request mergeable?
|
||||||
|
- [ ] Has this been tested locally?
|
||||||
|
- [ ] Does this pull request pass the tests?
|
||||||
|
- [ ] Have new tests been added to cover any new code?
|
||||||
|
- [ ] Was a spellchecker run on the source code and documentation after
|
||||||
|
changes were made?
|
||||||
|
|
43
CODE_OF_CONDUCT.md
Normal file
43
CODE_OF_CONDUCT.md
Normal file
@@ -0,0 +1,43 @@
|
|||||||
|
# Code of Conduct
|
||||||
|
|
||||||
|
## DCPPC Code of Conduct
|
||||||
|
|
||||||
|
All members of the Commons are expected to agree with the following code
|
||||||
|
of conduct. We will enforce this code as needed. We expect cooperation
|
||||||
|
from all members to help ensuring a safe environment for everybody.
|
||||||
|
|
||||||
|
## The Quick Version
|
||||||
|
|
||||||
|
The Consortium is dedicated to providing a harassment-free experience
|
||||||
|
for everyone, regardless of gender, gender identity and expression, age,
|
||||||
|
sexual orientation, disability, physical appearance, body size, race, or
|
||||||
|
religion (or lack thereof). We do not tolerate harassment of Consortium
|
||||||
|
members in any form. Sexual language and imagery is generally not
|
||||||
|
appropriate for any venue, including meetings, presentations, or
|
||||||
|
discussions.
|
||||||
|
|
||||||
|
## The Less Quick Version
|
||||||
|
|
||||||
|
Harassment includes offensive verbal comments related to gender, gender
|
||||||
|
identity and expression, age, sexual orientation, disability, physical
|
||||||
|
appearance, body size, race, religion, sexual images in public spaces,
|
||||||
|
deliberate intimidation, stalking, following, harassing photography or
|
||||||
|
recording, sustained disruption of talks or other events, inappropriate
|
||||||
|
physical contact, and unwelcome sexual attention.
|
||||||
|
|
||||||
|
Members asked to stop any harassing behavior are expected to comply
|
||||||
|
immediately.
|
||||||
|
|
||||||
|
If you are being harassed, notice that someone else is being harassed,
|
||||||
|
or have any other concerns, please contact [Titus
|
||||||
|
Brown](mailto:ctbrown@ucdavis.edu) immediately. If Titus is the cause of
|
||||||
|
your concern, please contact [Vivien
|
||||||
|
Bonazzi](mailto:bonazziv@mail.nih.gov).
|
||||||
|
|
||||||
|
We expect members to follow these guidelines at any Consortium event.
|
||||||
|
|
||||||
|
Original source and credit: <http://2012.jsconf.us/#/about> & The Ada
|
||||||
|
Initiative. Please help by translating or improving:
|
||||||
|
<http://github.com/leftlogic/confcodeofconduct.com>. This work is
|
||||||
|
licensed under a Creative Commons Attribution 3.0 Unported License
|
||||||
|
|
21
CONTRIBUTING.md
Normal file
21
CONTRIBUTING.md
Normal file
@@ -0,0 +1,21 @@
|
|||||||
|
# Contributing to the DCPPC Internal Repository
|
||||||
|
|
||||||
|
Hello, and thank you for wanting to contribute to the DCPPC Internal
|
||||||
|
Repository\!
|
||||||
|
|
||||||
|
By contributing to this repository, you agree:
|
||||||
|
|
||||||
|
1. To obey the [Code of Conduct](./CODE_OF_CONDUCT.md)
|
||||||
|
2. To release all your contributions under the same terms as the
|
||||||
|
license itself: the [Creative Commons Zero](./LICENSE.md) (aka
|
||||||
|
Public Domain) license
|
||||||
|
|
||||||
|
If you are OK with these two conditions, then we welcome both you and
|
||||||
|
your contribution\!
|
||||||
|
|
||||||
|
If you have any questions about contributing, please [open an
|
||||||
|
issue](https://github.com/dcppc/internal/issues/new) and Team Copper
|
||||||
|
will lend a hand ASAP.
|
||||||
|
|
||||||
|
Thank you for being here and for being a part of the DCPPC project.
|
||||||
|
|
@@ -267,7 +267,11 @@ def list_docs(doctype):
|
|||||||
if org['login']=='dcppc':
|
if org['login']=='dcppc':
|
||||||
# Business as usual
|
# Business as usual
|
||||||
search = Search(app.config["INDEX_DIR"])
|
search = Search(app.config["INDEX_DIR"])
|
||||||
return jsonify(search.get_list(doctype))
|
results_list = search.get_list(doctype)
|
||||||
|
for result in results_list:
|
||||||
|
ct = result['created_time']
|
||||||
|
result['created_time'] = datetime.strftime(ct,"%Y-%m-%d %I:%M %p")
|
||||||
|
return jsonify(results_list)
|
||||||
|
|
||||||
# nope
|
# nope
|
||||||
return render_template('403.html')
|
return render_template('403.html')
|
||||||
|
@@ -744,10 +744,10 @@ class Search:
|
|||||||
full_items[f['id']] = f
|
full_items[f['id']] = f
|
||||||
|
|
||||||
## Shorter:
|
## Shorter:
|
||||||
break
|
#break
|
||||||
## Longer:
|
## Longer:
|
||||||
#if nextPageToken is None:
|
if nextPageToken is None:
|
||||||
# break
|
break
|
||||||
|
|
||||||
|
|
||||||
writer = self.ix.writer()
|
writer = self.ix.writer()
|
||||||
@@ -795,7 +795,7 @@ class Search:
|
|||||||
subprocess.call(['rm','-fr',temp_dir])
|
subprocess.call(['rm','-fr',temp_dir])
|
||||||
|
|
||||||
writer.commit()
|
writer.commit()
|
||||||
print("Done, updated %d documents in the index" % count)
|
print("Done, updated %d Google Drive files in the index" % count)
|
||||||
|
|
||||||
|
|
||||||
# ------------------------------
|
# ------------------------------
|
||||||
@@ -873,7 +873,7 @@ class Search:
|
|||||||
|
|
||||||
|
|
||||||
writer.commit()
|
writer.commit()
|
||||||
print("Done, updated %d documents in the index" % count)
|
print("Done, updated %d Github issues in the index" % count)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -1247,7 +1247,7 @@ class Search:
|
|||||||
elif doctype=='issue':
|
elif doctype=='issue':
|
||||||
item_keys = ['title','repo_name','repo_url','url','created_time','modified_time']
|
item_keys = ['title','repo_name','repo_url','url','created_time','modified_time']
|
||||||
elif doctype=='emailthread':
|
elif doctype=='emailthread':
|
||||||
item_keys = ['title','owner_name','url','created_time','modified_time']
|
item_keys = ['title','owner_name','url','group','created_time','modified_time']
|
||||||
elif doctype=='disqus':
|
elif doctype=='disqus':
|
||||||
item_keys = ['title','created_time','url']
|
item_keys = ['title','created_time','url']
|
||||||
elif doctype=='ghfile':
|
elif doctype=='ghfile':
|
||||||
|
@@ -1,20 +1,38 @@
|
|||||||
|
######################################
|
||||||
|
# github oauth
|
||||||
|
GITHUB_OAUTH_CLIENT_ID = "XXX"
|
||||||
|
GITHUB_OAUTH_CLIENT_SECRET = "YYY"
|
||||||
|
|
||||||
|
######################################
|
||||||
|
# github acces token
|
||||||
|
GITHUB_TOKEN = "XXX"
|
||||||
|
|
||||||
|
######################################
|
||||||
|
# groups.io
|
||||||
|
GROUPSIO_TOKEN = "XXXXX"
|
||||||
|
GROUPSIO_USERNAME = "XXXXX"
|
||||||
|
GROUPSIO_PASSWORD = "XXXXX"
|
||||||
|
|
||||||
|
######################################
|
||||||
|
# Disqus API public key
|
||||||
|
DISQUS_TOKEN = "XXXXX"
|
||||||
|
|
||||||
|
######################################
|
||||||
|
# everything else
|
||||||
|
|
||||||
# Location of index file
|
# Location of index file
|
||||||
INDEX_DIR = "search_index"
|
INDEX_DIR = "search_index"
|
||||||
|
|
||||||
# oauth client deets
|
|
||||||
GITHUB_OAUTH_CLIENT_ID = "XXX"
|
|
||||||
GITHUB_OAUTH_CLIENT_SECRET = "YYY"
|
|
||||||
GITHUB_TOKEN = "ZZZ"
|
|
||||||
|
|
||||||
# More information footer: Repository label
|
# More information footer: Repository label
|
||||||
FOOTER_REPO_ORG = "charlesreid1"
|
FOOTER_REPO_ORG = "dcppc"
|
||||||
FOOTER_REPO_NAME = "centillion"
|
FOOTER_REPO_NAME = "centillion"
|
||||||
|
|
||||||
# Toggle to show Whoosh parsed query
|
# Toggle to show Whoosh parsed query
|
||||||
SHOW_PARSED_QUERY=True
|
SHOW_PARSED_QUERY=True
|
||||||
|
|
||||||
TAGLINE = "Search All The Things"
|
TAGLINE = "Search the Data Commons"
|
||||||
|
|
||||||
# Flask settings
|
# Flask settings
|
||||||
DEBUG = True
|
DEBUG = True
|
||||||
SECRET_KEY = 'WWWWW'
|
SECRET_KEY = 'XXXXX'
|
||||||
|
|
||||||
|
@@ -118,6 +118,7 @@ class DisqusCrawler(object):
|
|||||||
|
|
||||||
link = response['link']
|
link = response['link']
|
||||||
clean_link = re.sub('data-commons.us','nihdatacommons.us',link)
|
clean_link = re.sub('data-commons.us','nihdatacommons.us',link)
|
||||||
|
clean_link += "#disqus_comments"
|
||||||
|
|
||||||
# Finished working on thread.
|
# Finished working on thread.
|
||||||
|
|
||||||
|
@@ -66,7 +66,7 @@ class GroupsIOArchivesCrawler(object):
|
|||||||
|
|
||||||
## Short circuit
|
## Short circuit
|
||||||
## for debugging purposes
|
## for debugging purposes
|
||||||
break
|
#break
|
||||||
|
|
||||||
return subgroups
|
return subgroups
|
||||||
|
|
||||||
|
BIN
static/centillion_white_beta.png
Normal file
BIN
static/centillion_white_beta.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 29 KiB |
BIN
static/centillion_white_localhost.png
Normal file
BIN
static/centillion_white_localhost.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 30 KiB |
@@ -57,6 +57,25 @@ $(document).ready(function() {
|
|||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
|
//////////////////////////////////
|
||||||
|
// utility functions
|
||||||
|
|
||||||
|
// https://stackoverflow.com/a/25275808
|
||||||
|
function iso8601(date) {
|
||||||
|
var hours = date.getHours();
|
||||||
|
var minutes = date.getMinutes();
|
||||||
|
var ampm = hours >= 12 ? 'PM' : 'AM';
|
||||||
|
hours = hours % 12;
|
||||||
|
hours = hours ? hours : 12; // the hour '0' should be '12'
|
||||||
|
minutes = minutes < 10 ? '0'+minutes : minutes;
|
||||||
|
var strTime = hours + ':' + minutes + ' ' + ampm;
|
||||||
|
return date.getYear() + "-" + (date.getMonth()+1) + "-" + date.getDate() + " " + strTime;
|
||||||
|
}
|
||||||
|
|
||||||
|
// https://stackoverflow.com/a/7390612
|
||||||
|
var toType = function(obj) {
|
||||||
|
return ({}).toString.call(obj).match(/\s([a-zA-Z]+)/)[1].toLowerCase()
|
||||||
|
}
|
||||||
|
|
||||||
//////////////////////////////////
|
//////////////////////////////////
|
||||||
// API-to-Table Functions
|
// API-to-Table Functions
|
||||||
@@ -315,8 +334,10 @@ function load_emailthreads_table(){
|
|||||||
var r = new Array(), j = -1, size=result.length;
|
var r = new Array(), j = -1, size=result.length;
|
||||||
r[++j] = '<thead>'
|
r[++j] = '<thead>'
|
||||||
r[++j] = '<tr class="header-row">';
|
r[++j] = '<tr class="header-row">';
|
||||||
r[++j] = '<th width="70%">Topic</th>';
|
r[++j] = '<th width="60%">Topic</th>';
|
||||||
r[++j] = '<th width="30%">Started By</th>';
|
r[++j] = '<th width="15%">Started By</th>';
|
||||||
|
r[++j] = '<th width="15%">Date</th>';
|
||||||
|
r[++j] = '<th width="10%">Mailing List</th>';
|
||||||
r[++j] = '</tr>';
|
r[++j] = '</tr>';
|
||||||
r[++j] = '</thead>'
|
r[++j] = '</thead>'
|
||||||
r[++j] = '<tbody>'
|
r[++j] = '<tbody>'
|
||||||
@@ -327,6 +348,10 @@ function load_emailthreads_table(){
|
|||||||
r[++j] = '</a>'
|
r[++j] = '</a>'
|
||||||
r[++j] = '</td><td>';
|
r[++j] = '</td><td>';
|
||||||
r[++j] = result[i]['owner_name'];
|
r[++j] = result[i]['owner_name'];
|
||||||
|
r[++j] = '</td><td>';
|
||||||
|
r[++j] = result[i]['created_time'];
|
||||||
|
r[++j] = '</td><td>';
|
||||||
|
r[++j] = result[i]['group'];
|
||||||
r[++j] = '</td></tr>';
|
r[++j] = '</td></tr>';
|
||||||
}
|
}
|
||||||
r[++j] = '</tbody>'
|
r[++j] = '</tbody>'
|
||||||
|
@@ -58,7 +58,7 @@ button#feedback {
|
|||||||
/* search results table */
|
/* search results table */
|
||||||
td#search-results-score-col,
|
td#search-results-score-col,
|
||||||
td#search-results-type-col {
|
td#search-results-type-col {
|
||||||
width: 100px;
|
width: 90px;
|
||||||
}
|
}
|
||||||
|
|
||||||
div.container {
|
div.container {
|
||||||
@@ -86,6 +86,14 @@ div.container {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* badges for number of docs indexed */
|
/* badges for number of docs indexed */
|
||||||
|
span.results-count {
|
||||||
|
background-color: #555;
|
||||||
|
}
|
||||||
|
|
||||||
|
span.indexing-count {
|
||||||
|
background-color: #337ab7;
|
||||||
|
}
|
||||||
|
|
||||||
span.badge {
|
span.badge {
|
||||||
vertical-align: text-bottom;
|
vertical-align: text-bottom;
|
||||||
}
|
}
|
||||||
@@ -126,7 +134,7 @@ li.search-group-item {
|
|||||||
}
|
}
|
||||||
|
|
||||||
div.url {
|
div.url {
|
||||||
background-color: rgba(86,61,124,.15);
|
background-color: rgba(40,40,60,.15);
|
||||||
padding: 8px;
|
padding: 8px;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -192,7 +200,7 @@ table {
|
|||||||
|
|
||||||
.info, .last-searches {
|
.info, .last-searches {
|
||||||
color: gray;
|
color: gray;
|
||||||
font-size: 12px;
|
/*font-size: 12px;*/
|
||||||
font-family: Arial, serif;
|
font-family: Arial, serif;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -202,27 +210,27 @@ table {
|
|||||||
|
|
||||||
div.tags a, td.tag-cloud a {
|
div.tags a, td.tag-cloud a {
|
||||||
color: #b56020;
|
color: #b56020;
|
||||||
font-size: 12px;
|
/*font-size: 12px;*/
|
||||||
}
|
}
|
||||||
|
|
||||||
td.tag-cloud, td.directories-cloud {
|
td.tag-cloud, td.directories-cloud {
|
||||||
font-size: 12px;
|
/*font-size: 12px;*/
|
||||||
color: #555555;
|
color: #555555;
|
||||||
}
|
}
|
||||||
|
|
||||||
td.directories-cloud a {
|
td.directories-cloud a {
|
||||||
font-size: 12px;
|
/*font-size: 12px;*/
|
||||||
color: #377BA8;
|
color: #377BA8;
|
||||||
}
|
}
|
||||||
|
|
||||||
div.path {
|
div.path {
|
||||||
font-size: 12px;
|
/*font-size: 12px;*/
|
||||||
color: #666666;
|
color: #666666;
|
||||||
margin-bottom: 3px;
|
margin-bottom: 3px;
|
||||||
}
|
}
|
||||||
|
|
||||||
div.path a {
|
div.path a {
|
||||||
font-size: 12px;
|
/*font-size: 12px;*/
|
||||||
margin-right: 5px;
|
margin-right: 5px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -7,11 +7,18 @@
|
|||||||
<div class="col12sm" id="banner-col">
|
<div class="col12sm" id="banner-col">
|
||||||
<center>
|
<center>
|
||||||
<a id="banner-a" href="{{ url_for('search')}}?query=&fields=">
|
<a id="banner-a" href="{{ url_for('search')}}?query=&fields=">
|
||||||
|
{% if 'betasearch' in request.url %}
|
||||||
|
<img id="banner-img" src="{{ url_for('static', filename='centillion_white_beta.png') }}">
|
||||||
|
{% elif 'localhost' in request.url %}
|
||||||
|
<img id="banner-img" src="{{ url_for('static', filename='centillion_white_localhost.png') }}">
|
||||||
|
{% else %}
|
||||||
<img id="banner-img" src="{{ url_for('static', filename='centillion_white.png') }}">
|
<img id="banner-img" src="{{ url_for('static', filename='centillion_white.png') }}">
|
||||||
|
{% endif %}
|
||||||
</a>
|
</a>
|
||||||
</center>
|
</center>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{% if config['TAGLINE'] %}
|
{% if config['TAGLINE'] %}
|
||||||
<div class="row" id="tagline-row">
|
<div class="row" id="tagline-row">
|
||||||
<div class="col12sm" id="tagline-col">
|
<div class="col12sm" id="tagline-col">
|
||||||
|
@@ -5,7 +5,7 @@
|
|||||||
<div class="alert alert-success alert-dismissible fade in">
|
<div class="alert alert-success alert-dismissible fade in">
|
||||||
<a href="#" class="close" data-dismiss="alert" aria-label="close">×</a>
|
<a href="#" class="close" data-dismiss="alert" aria-label="close">×</a>
|
||||||
{% for message in messages %}
|
{% for message in messages %}
|
||||||
<p class="lead">{{ message }}</p>
|
<p>{{ message }}</p>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@@ -52,8 +52,8 @@
|
|||||||
<div class="container-fluid">
|
<div class="container-fluid">
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-xs-12 info">
|
<div class="col-xs-12 info">
|
||||||
<b>Found:</b> <span class="badge">{{entries|length}}</span> results
|
<b>Found:</b> <span class="badge results-count">{{entries|length}}</span> results
|
||||||
out of <span class="badge">{{totals["total"]}}</span> total items indexed
|
out of <span class="badge results-count">{{totals["total"]}}</span> total items indexed
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -67,32 +67,32 @@
|
|||||||
<div class="col-xs-12 info">
|
<div class="col-xs-12 info">
|
||||||
<b>Indexing:</b>
|
<b>Indexing:</b>
|
||||||
|
|
||||||
<span class="badge">{{totals["gdoc"]}}</span>
|
<span class="badge indexing-count">{{totals["gdoc"]}}</span>
|
||||||
<a href="/master_list?doctype=gdoc#gdoc">
|
<a href="/master_list?doctype=gdoc#gdoc">
|
||||||
Google Drive files
|
Google Drive files
|
||||||
</a>,
|
</a>,
|
||||||
|
|
||||||
<span class="badge">{{totals["issue"]}}</span>
|
<span class="badge indexing-count">{{totals["issue"]}}</span>
|
||||||
<a href="/master_list?doctype=issue#issue">
|
<a href="/master_list?doctype=issue#issue">
|
||||||
Github issues
|
Github issues
|
||||||
</a>,
|
</a>,
|
||||||
|
|
||||||
<span class="badge">{{totals["ghfile"]}}</span>
|
<span class="badge indexing-count">{{totals["ghfile"]}}</span>
|
||||||
<a href="/master_list?doctype=ghfile#ghfile">
|
<a href="/master_list?doctype=ghfile#ghfile">
|
||||||
Github files
|
Github files
|
||||||
</a>,
|
</a>,
|
||||||
|
|
||||||
<span class="badge">{{totals["markdown"]}}</span>
|
<span class="badge indexing-count">{{totals["markdown"]}}</span>
|
||||||
<a href="/master_list?doctype=markdown#markdown">
|
<a href="/master_list?doctype=markdown#markdown">
|
||||||
Github Markdown files
|
Github Markdown files
|
||||||
</a>,
|
</a>,
|
||||||
|
|
||||||
<span class="badge">{{totals["emailthread"]}}</span>
|
<span class="badge indexing-count">{{totals["emailthread"]}}</span>
|
||||||
<a href="/master_list?doctype=emailthread#emailthread">
|
<a href="/master_list?doctype=emailthread#emailthread">
|
||||||
Groups.io email threads
|
Groups.io email threads
|
||||||
</a>,
|
</a>,
|
||||||
|
|
||||||
<span class="badge">{{totals["disqus"]}}</span>
|
<span class="badge indexing-count">{{totals["disqus"]}}</span>
|
||||||
<a href="/master_list?doctype=disqus#disqus">
|
<a href="/master_list?doctype=disqus#disqus">
|
||||||
Disqus comment threads
|
Disqus comment threads
|
||||||
</a>
|
</a>
|
||||||
@@ -101,6 +101,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</li>
|
</li>
|
||||||
|
|
||||||
|
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
Reference in New Issue
Block a user