Skip to content

Commit

Permalink
Merge pull request #2862 from LMFDB/master
Browse files Browse the repository at this point in the history
master --> web
  • Loading branch information
AndrewVSutherland committed Mar 22, 2019
2 parents ec14daa + 4d78b6a commit 52ef578
Show file tree
Hide file tree
Showing 12 changed files with 82 additions and 21 deletions.
25 changes: 23 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,31 @@ Development
* [Getting Started](https://github.com/LMFDB/lmfdb/blob/master/GettingStarted.md) -- cheat sheet for setting up lmfdb
* [Development Guide](https://github.com/LMFDB/lmfdb/blob/master/Development.md) -- organizing development

Screenshot
Guidelines
----------

![LMFDB Screenshot](https://raw.github.com/wiki/LMFDB/lmfdb/lmfdb-screenshot-20120410.png)
1. Each mathematical object should have its own home page. Home pages
summarize basic invariants at the top, progressing to more advanced
information at the bottom, with mathematical terms defined by knowls.
The right hand side of each home page should include a properties box
that summarizes key invariants, links to completeness, source, and
reliability knowls, and when applicable, a list of related objects.
2. Each home page should have a mathematically meaningful, permanent URL.
3. Each mathematical object should be given a label that is mathematically
meaningful, and to the extent possible, human-readable and concise.
The translation between an object's label and its URL should be
relatively straightforward.
4. Each home page should list the names of the entities responsible
for producing the data on that page.
5. Each class of objects has a browse-and-search page, which has
browsing options in the upper portion of the page, and a search form
below. It should be possible to browse to the home page of an
object without having detailed knowledge about the underlying
mathematics. The search form should be (at least partially) visible
in a browser without scrolling the browse-and-search page.
6. Home pages and browse-and-search pages should address the needs
of both experts and non-experts in the subject, in order to ensure
that the pages are useful to a broad mathematical audience.

[logo]: https://github.com/LMFDB/lmfdb/raw/master/lmfdb/static/images/lmfdb-logo.png "LMFDB"

5 changes: 4 additions & 1 deletion lmfdb/backend/database.py
Original file line number Diff line number Diff line change
Expand Up @@ -3632,9 +3632,12 @@ def make_tuple(val, top_level=True):
return {make_tuple(rec[0]): rec[1] for rec in cur}
else:
constraint_list = [(i, constraint[col]) for (i, col) in enumerate(allcols) if col in constraint]
column_indexes = [i for (i, col) in enumerate(allcols) if col not in constraint]
def satisfies_constraint(val):
return all(val[i] == c for i,c in constraint_list)
return {make_tuple(rec[0]): rec[1] for rec in cur if satisfies_constraint(rec[0])}
def remove_constraint(val):
return [val[i] for i in column_indexes]
return {make_tuple(remove_constraint(rec[0])): rec[1] for rec in cur if satisfies_constraint(rec[0])}

def _quick_max(self, col, ccols, cvals):
if ccols is None:
Expand Down
23 changes: 17 additions & 6 deletions lmfdb/characters/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,12 +31,14 @@ def ctx_characters():

def learn(current = None):
r = []
if current != 'extent':
r.append( ('Completeness of the data', url_for(".extent_page")) )
if current != 'source':
r.append( ('Source of the data', url_for(".how_computed_page")) )
if current != 'extent':
r.append( ('Extent of the data', url_for(".extent_page")) )
if current != 'reliability':
r.append( ('Reliability of the data', url_for(".reliability")) )
if current != 'labels':
r.append( ('Labels for Dirichlet characters', url_for(".labels_page")) )
r.append( ('Dirichlet character labels', url_for(".labels_page")) )
return r

###############################################################################
Expand Down Expand Up @@ -148,16 +150,25 @@ def labels_page():
@characters_page.route("/Source")
def how_computed_page():
info = {}
info['title'] = 'Source of Dirichlet Characters'
info['title'] = 'Source of Dirichlet Character Data'
info['bread'] = [ ('Characters',url_for(".render_characterNavigation")),
('Dirichlet', url_for(".render_Dirichletwebpage")), ('Source', '') ]
info['learnmore'] = learn('source')
return render_template("single.html", kid='dq.character.dirichlet.source', **info)

@characters_page.route("/Extent")
@characters_page.route("/Reliability")
def reliability():
info = {}
info['title'] = 'Reliability of Dirichlet Character Data'
info['bread'] = [ ('Characters',url_for(".render_characterNavigation")),
('Dirichlet', url_for(".render_Dirichletwebpage")), ('Reliability', '') ]
info['learnmore'] = learn('reliability')
return render_template("single.html", kid='rcs.rigor.character.dirichlet', **info)

@characters_page.route("/Completeness")
def extent_page():
info = {}
info['title'] = 'Extent of Dirichlet Characters Data'
info['title'] = 'Completeness of Dirichlet Character Data'
info['bread'] = [ ('Characters',url_for(".render_characterNavigation")),
('Dirichlet', url_for(".render_Dirichletwebpage")), ('Extent', '') ]
info['learnmore'] = learn('extent')
Expand Down
12 changes: 10 additions & 2 deletions lmfdb/genus2_curves/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,8 @@

def learnmore_list():
return [('Completeness of the data', url_for(".completeness_page")),
('Source of the data', url_for(".how_computed_page")),
('Source of the data', url_for(".source_page")),
('Reliability of the data', url_for(".reliability_page")),
('Genus 2 curve labels', url_for(".labels_page"))]

# Return the learnmore list with the matchstring entry removed
Expand Down Expand Up @@ -403,12 +404,19 @@ def completeness_page():
credit=credit_string, title=t, bread=bread, learnmore=learnmore_list_remove('Completeness'))

@g2c_page.route("/Source")
def how_computed_page():
def source_page():
t = 'Source of Genus 2 Curve Data over $\Q$'
bread = (('Genus 2 Curves', url_for(".index")), ('$\Q$', url_for(".index")),('Source',''))
return render_template("single.html", kid='dq.g2c.source',
credit=credit_string, title=t, bread=bread, learnmore=learnmore_list_remove('Source'))

@g2c_page.route("/Reliability")
def reliability_page():
t = 'Reliability of Genus 2 Curve Data over $\Q$'
bread = (('Genus 2 Curves', url_for(".index")), ('$\Q$', url_for(".index")),('Reliability',''))
return render_template("single.html", kid='dq.g2c.reliability',
credit=credit_string, title=t, bread=bread, learnmore=learnmore_list_remove('Reliability'))

@g2c_page.route("/Labels")
def labels_page():
t = 'Labels for Genus 2 Curves over $\Q$'
Expand Down
1 change: 1 addition & 0 deletions lmfdb/homepage/sidebar.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -266,6 +266,7 @@
colspan: onecolumn
- title: Lattices
url_for: "lattice.lattice_render_webpage"
status: beta
- title: Subgroups of
part2:
- title: $\SL(2)$
Expand Down
18 changes: 13 additions & 5 deletions lmfdb/sato_tate_groups/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,8 @@ def st_link_by_name(weight,degree,name):

def learnmore_list():
return [('Completeness of the data', url_for('.completeness_page')),
('Source of the data', url_for('.how_computed_page')),
('Source of the data', url_for('.source_page')),
('Reliability of the data', url_for('.reliability_page')),
('Sato-Tate group labels', url_for('.labels_page'))]

# Return the learnmore list with the matchstring entry removed
Expand All @@ -158,7 +159,7 @@ def index():
info = {'weight_list' : weight_list, 'degree_list' : degree_list, 'st0_list' : st0_list, 'st0_dict' : st0_dict, 'group_list': group_list, 'group_dict' : group_dict}
title = 'Sato-Tate Groups'
bread = [('Sato-Tate Groups', '.')]
return render_template('st_browse.html', info=info, credit=credit_string, title=title, learnmore=learnmore_list_remove('Completeness'), bread=bread)
return render_template('st_browse.html', info=info, credit=credit_string, title=title, learnmore=learnmore_list(), bread=bread)

@st_page.route('/random')
def random():
Expand Down Expand Up @@ -541,16 +542,23 @@ def render_st_group(info, portrait=None):
def completeness_page():
t = 'Completeness of Sato-Tate Group Data'
bread = [('Sato-Tate Groups', url_for('.index')), ('Completeness','')]
return render_template('single.html', kid='dq.st.extent',
return render_template('single.html', kid='dq.st_group.extent',
credit=credit_string, title=t, bread=bread, learnmore=learnmore_list_remove('Completeness'))

@st_page.route('/Source')
def how_computed_page():
def source_page():
t = 'Source of Sato-Tate Group Data'
bread = [('Sato-Tate Groups', url_for('.index')), ('Source','')]
return render_template('single.html', kid='dq.st.source',
return render_template('single.html', kid='dq.st_group.source',
credit=credit_string, title=t, bread=bread, learnmore=learnmore_list_remove('Source'))

@st_page.route('/Reliability')
def reliability_page():
t = 'Reliability of Sato-Tate Group Data'
bread = [('Sato-Tate Groups', url_for('.index')), ('Reliability','')]
return render_template('single.html', kid='dq.st_group.reliability',
credit=credit_string, title=t, bread=bread, learnmore=learnmore_list_remove('Reliability'))

@st_page.route('/Labels')
def labels_page():
t = 'Labels for Sato-Tate Groups'
Expand Down
2 changes: 1 addition & 1 deletion lmfdb/sato_tate_groups/templates/st_browse.html
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{% extends "homepage.html" %}
{% block content %}
<div>
{{ KNOWL_INC('dq.st.extent') }}
{{ KNOWL_INC('st_group.summary') }}
</div>

<h2> Browse {{ KNOWL('st_group.definition', title='Sato-Tate groups') }}</h2>
Expand Down
4 changes: 4 additions & 0 deletions lmfdb/templates/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -225,6 +225,10 @@ body.knowl #header {
font-size: 150%;
}

#header .bread a {
color: {{color.bread_links}};
}

#header .topright {
text-align: right;
white-space:nowrap;
Expand Down
4 changes: 4 additions & 0 deletions lmfdb/utils/color.py
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,7 @@ class ColorScheme(object):
'header_text_topright': 'col_main_dl',
# Header navi colors
'header_navi_text': 'col_main_dl',
'bread_links': 'col_main_dl',

# flashes
'flashes_border': c.col_light_red_1,
Expand Down Expand Up @@ -359,6 +360,9 @@ class JohnBlue(YellowKnowls):
col_main_d = c.black # ?00
knowl_hyper_text = '#1565C0' # P1-800
knowl_shadow = '#0D47A1' # P1-900
sidebar_background_hover = c.white # '#CCE6FC'
a_background_hover = '#E3F2FD'
knowl_hover = '#FFF8C1' # lighter than knowl border

class IndigoHair(YellowKnowls):
code = 18
Expand Down
2 changes: 1 addition & 1 deletion lmfdb/zeros/zeta/platt_zeros.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
import mpmath
mpmath.mp.prec = 300

zeta_folder = os.path.expanduser('~/data/zeros/zeta/')
zeta_folder = os.path.expanduser('/home/lmfdb/data/zeros/zeta/')
data_location = os.path.join(zeta_folder, 'data/')
db_location = os.path.join(zeta_folder,'index.db')

Expand Down
3 changes: 1 addition & 2 deletions lmfdb/zeros/zeta/templates/zeta.html
Original file line number Diff line number Diff line change
Expand Up @@ -111,8 +111,7 @@
</form>
<br/>
<p>
The zeros are accurate to an absolute precision of $\pm 2^{-102}$. The first 30
digits past the decimal point are correct but the remainder in general are not.
The zeros are accurate to within $\pm 2.5\times 10^{-31}$.
</p>
<div align="center">
<a id="plainlink" href="">View</a> or <a id="plaindownloadlink" href="">download</a> this table as plain text.
Expand Down
4 changes: 3 additions & 1 deletion lmfdb/zeros/zeta/zetazeros.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
import flask
from mpmath import nstr, inf
from sage.all import floor, log
from lmfdb.logger import make_logger
from flask import render_template, request, url_for

Expand Down Expand Up @@ -78,7 +80,7 @@ def list_zeros(N=None,
zeros = zeros_starting_at_t(t, limit)

if fmt == 'plain':
response = flask.Response(("%d %s\n" % (n, str(z)) for (n, z) in zeros))
response = flask.Response(("%d %s\n" % (n, nstr(z,31+floor(log(z,10))+1,strip_zeros=False,min_fixed=-inf,max_fixed=+inf)) for (n, z) in zeros))
response.headers['content-type'] = 'text/plain'
if download == "yes":
response.headers['content-disposition'] = 'attachment; filename=zetazeros'
Expand Down

0 comments on commit 52ef578

Please sign in to comment.