Skip to content

Commit c5d6a54

Browse files
authored
Merge pull request #6801 from LMFDB/main
main -> dev
2 parents 27f7a4b + 078bff5 commit c5d6a54

File tree

18 files changed

+249
-81
lines changed

18 files changed

+249
-81
lines changed

.github/workflows/matrix_includes.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,12 +30,12 @@
3030
"server": "devmirror"
3131
},
3232
{
33-
"files": "lmfdb/tests/test_dynamic_knowls.py lmfdb/tests/test_root.py lmfdb/hecke_algebras/test_hecke_algebras.py lmfdb/tests/test_homepage.py lmfdb/elliptic_curves/test_ell_curves.py lmfdb/elliptic_curves/test_browse_page.py",
33+
"files": "lmfdb/tests/test_dynamic_knowls.py lmfdb/tests/test_root.py lmfdb/hecke_algebras/test_hecke_algebras.py lmfdb/tests/test_homepage.py lmfdb/tests/test_random_redirects.py lmfdb/elliptic_curves/test_ell_curves.py lmfdb/elliptic_curves/test_browse_page.py",
3434
"folders": "elliptic_curves hecke_algebras tests",
3535
"server": "proddb"
3636
},
3737
{
38-
"files": "lmfdb/tests/test_dynamic_knowls.py lmfdb/tests/test_root.py lmfdb/hecke_algebras/test_hecke_algebras.py lmfdb/tests/test_homepage.py lmfdb/elliptic_curves/test_ell_curves.py lmfdb/elliptic_curves/test_browse_page.py",
38+
"files": "lmfdb/tests/test_dynamic_knowls.py lmfdb/tests/test_root.py lmfdb/hecke_algebras/test_hecke_algebras.py lmfdb/tests/test_homepage.py lmfdb/tests/test_random_redirects.py lmfdb/elliptic_curves/test_ell_curves.py lmfdb/elliptic_curves/test_browse_page.py",
3939
"folders": "elliptic_curves hecke_algebras tests",
4040
"server": "devmirror"
4141
},

.github/workflows/python-package.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ jobs:
9090
- name: checking that we didn't miss any test files
9191
shell: bash -l {0}
9292
# If this fails you need to update the file list above and file count
93-
run: test $(find lmfdb -name 'test_*.py' -or -name '*_test.py' | wc -l) -eq 40
93+
run: test $(find lmfdb -name 'test_*.py' -or -name '*_test.py' | wc -l) -eq 41
9494

9595
- name: Config LMFDB to run tests against proddb
9696
if: matrix.files != 'lint' && matrix.server == 'proddb'

lmfdb/bianchi_modular_forms/bianchi_modular_form.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
to_dict, web_latex_ideal_fact, flash_error, comma, display_knowl,
99
nf_string_to_label, parse_nf_string, parse_noop, parse_start, parse_count, parse_ints, parse_primes,
1010
SearchArray, TextBox, SelectBox, ExcludeOnlyBox, CountBox, SubsetBox, TextBoxWithSelect,
11-
teXify_pol, search_wrap, Downloader)
11+
teXify_pol, search_wrap, Downloader, redirect_no_cache)
1212
from lmfdb.utils.display_stats import StatsDisplay, totaler, proportioners
1313
from lmfdb.utils.interesting import interesting_knowls
1414
from lmfdb.utils.search_columns import SearchColumns, ProcessedCol, MultiProcessedCol
@@ -86,12 +86,13 @@ def index():
8686
return bianchi_modular_form_search(info)
8787

8888
@bmf_page.route("/random")
89+
@redirect_no_cache
8990
def random_bmf(): # Random Bianchi modular form
9091
res = db.bmf_forms.random(projection=['field_label', 'level_label', 'label_suffix'])
91-
return redirect(url_for(".render_bmf_webpage",
92+
return url_for(".render_bmf_webpage",
9293
field_label=res['field_label'],
9394
level_label=res['level_label'],
94-
label_suffix=res['label_suffix']), 307)
95+
label_suffix=res['label_suffix'])
9596

9697
@bmf_page.route("/interesting")
9798
def interesting():

lmfdb/characters/main.py

Lines changed: 3 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
from lmfdb.utils import (
77
to_dict, flash_error, SearchArray, YesNoBox, display_knowl, ParityBox,
88
TextBox, CountBox, parse_bool, parse_ints, search_wrap, raw_typeset_poly,
9-
StatsDisplay, totaler, proportioners, comma, flash_warning, Downloader)
9+
StatsDisplay, totaler, proportioners, comma, flash_warning, Downloader, redirect_no_cache)
1010
from lmfdb.utils.interesting import interesting_knowls
1111
from lmfdb.utils.search_parsing import parse_range3
1212
from lmfdb.utils.search_columns import SearchColumns, MathCol, LinkCol, CheckCol, ProcessedCol, MultiProcessedCol
@@ -22,7 +22,6 @@
2222
WebSmallDirichletGroup,
2323
WebDBDirichletOrbit
2424
)
25-
from lmfdb.characters.ListCharacters import get_character_modulus
2625
from lmfdb.characters import characters_page
2726
from lmfdb import db
2827

@@ -312,24 +311,6 @@ def dirichlet_character_search(info, query):
312311
@characters_page.route("/Dirichlet")
313312
@characters_page.route("/Dirichlet/")
314313
def render_DirichletNavigation():
315-
try:
316-
if 'modbrowse' in request.args:
317-
arg = request.args['modbrowse']
318-
arg = arg.split('-')
319-
modulus_start = int(arg[0])
320-
modulus_end = int(arg[1])
321-
info = {'args': request.args}
322-
info['title'] = 'Dirichlet characters of modulus ' + str(modulus_start) + '-' + str(modulus_end)
323-
info['bread'] = bread('Modulus')
324-
info['learnmore'] = learn()
325-
headers, entries, rows, cols = get_character_modulus(modulus_start, modulus_end, limit=8)
326-
info['entries'] = entries
327-
info['rows'] = list(range(modulus_start, modulus_end + 1))
328-
info['cols'] = sorted({r[1] for r in entries})
329-
return render_template("ModulusList.html", **info)
330-
except (ValueError, IndexError) as err:
331-
flash_error("Error raised in parsing: %s", err)
332-
333314
if request.args:
334315
# hidden_search_type for prev/next buttons
335316
info = to_dict(request.args, search_array=DirichSearchArray())
@@ -640,8 +621,9 @@ def ctx_dirchar():
640621

641622

642623
@characters_page.route('/Dirichlet/random')
624+
@redirect_no_cache
643625
def random_Dirichletwebpage():
644-
return redirect(url_for('.render_DirichletNavigation', search_type="Random"))
626+
return url_for('.render_DirichletNavigation', search_type="Random")
645627

646628

647629
@characters_page.route('/Dirichlet/interesting')

lmfdb/characters/templates/CharacterNavigate.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ <h2> Browse </h2>
1212
<table class="browse">
1313
<tr>
1414
<td>By {{ KNOWL('character.dirichlet.modulus', title="modulus") }}:</td>
15-
<td>{% for rnge in info.modulus_list %} <a href="?modbrowse={{rnge}}">{{rnge}}</a>&nbsp;&nbsp; {% endfor %} $\cdots$</td>
15+
<td>{% for rnge in info.modulus_list %} <a href="?modulus={{rnge}}">{{rnge}}</a>&nbsp;&nbsp; {% endfor %} $\cdots$</td>
1616
</tr><tr>
1717
<td>By {{ KNOWL('character.dirichlet.conductor', title="conductor") }}:</td>
1818
<td>{% for rnge in info.conductor_list %} <a href="?conductor={{rnge}}">{{rnge}}</a>&nbsp;&nbsp; {% endfor %} $\cdots$</td>

lmfdb/characters/test_characters.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,8 @@ def test_even_odd(self):
3131
assert '>%s</t' % (parity_string(-1)) in W.get_data(as_text=True)
3232

3333
def test_modbrowse(self):
34-
W = self.tc.get('/Character/Dirichlet/?modbrowse=41-60')
35-
assert 'Dirichlet/45/11' in W.get_data(as_text=True)
34+
W = self.tc.get('/Character/Dirichlet/?modulus=41-60')
35+
assert '46.d' in W.get_data(as_text=True)
3636

3737
def test_search(self):
3838
W = self.tc.get('/Character/Dirichlet/?conductor=15&order=4')

lmfdb/elliptic_curves/elliptic_curve.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -190,7 +190,7 @@ def short_summary(self):
190190

191191
@property
192192
def summary(self):
193-
return r'Currently, the database includes ${}$ {} over $\Q$ in ${}$ {}, with {} at most ${}$.'.format(self.ncurves_c, self.ec_knowl, self.nclasses_c, self.cl_knowl, self.cond_knowl, self.max_N_c)
193+
return r'Currently, the database includes {} {} over $\Q$ in {} {}, with {} at most {}.'.format(self.ncurves_c, self.ec_knowl, self.nclasses_c, self.cl_knowl, self.cond_knowl, self.max_N_c)
194194

195195
table = db.ec_curvedata
196196
baseurl_func = ".rational_elliptic_curves"

lmfdb/galois_groups/main.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
from lmfdb import db
1010
from lmfdb.app import app
1111
from lmfdb.utils import (
12-
list_to_latex_matrix, flash_error, comma, latex_comma, to_dict, display_knowl,
12+
list_to_latex_matrix, flash_error, comma, to_dict, display_knowl,
1313
clean_input, prep_ranges, parse_bool, parse_ints, parse_galgrp,
1414
SearchArray, TextBox, TextBoxNoEg, YesNoBox, ParityBox, CountBox,
1515
StatsDisplay, totaler, proportioners, prop_int_pretty, Downloader,
@@ -596,8 +596,8 @@ def __init__(self):
596596

597597
@property
598598
def summary(self):
599-
return r"The database currently contains $%s$ transitive subgroups of $S_n$, including all subgroups (up to conjugacy) for $n \le 47$ and $n \ne 32$. Among the $2{,}801{,}324$ groups in degree $32$, all those with order less than $512$ or greater than $40{,}000{,}000{,}000$ are included." % latex_comma(self.ngroups)
599+
return r"The database currently contains %s transitive subgroups of $S_n$, including all subgroups (up to conjugacy) for $n \le 47$ and $n \ne 32$. Among the $2{,}801{,}324$ groups in degree $32$, all those with order less than $512$ or greater than $40{,}000{,}000{,}000$ are included." % comma(self.ngroups)
600600

601601
@property
602602
def short_summary(self):
603-
return r'The database current contains $%s$ groups, including all transitive subgroups of $S_n$ (up to conjugacy) for $n \le 47$ and $n \ne 32$. Here are some <a href="%s">further statistics</a>.' % (latex_comma(self.ngroups), url_for(".statistics"))
603+
return r'The database currently contains %s groups, including all transitive subgroups of $S_n$ (up to conjugacy) for $n \le 47$ and $n \ne 32$. Here are some <a href="%s">further statistics</a>.' % (comma(self.ngroups), url_for(".statistics"))

lmfdb/groups/abstract/main.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@
4848
pos_int_and_factor,
4949
sparse_cyclotomic_to_mathml,
5050
integer_to_mathml,
51+
redirect_no_cache,
5152
)
5253
from lmfdb.utils.search_parsing import (parse_multiset, search_parser, collapse_ors)
5354
from lmfdb.utils.interesting import interesting_knowls
@@ -841,11 +842,10 @@ def dynamic_statistics():
841842

842843

843844
@abstract_page.route("/random")
845+
@redirect_no_cache
844846
def random_abstract_group():
845847
label = db.gps_groups.random(projection="label")
846-
response = make_response(redirect(url_for(".by_label", label=label), 307))
847-
response.headers["Cache-Control"] = "no-cache, no-store"
848-
return response
848+
return url_for(".by_label", label=label)
849849

850850

851851
@abstract_page.route("/interesting")

0 commit comments

Comments
 (0)