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

main -> dev #6191

Merged
merged 29 commits into from
Sep 27, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
97b00b8
remove unused config file, remove useless wraps by int, etc
fchapoton Aug 25, 2024
9b8a611
Fix links from stats
jwj61 Aug 25, 2024
7dc2cc4
Merge pull request #6173 from fchapoton/remove_lgtm_config
roed314 Aug 26, 2024
bfa4d63
Start
jwj61 Aug 23, 2024
89dd002
a few typos and more blank lines (pep E302)
fchapoton Sep 2, 2024
3c73fb4
more typos
fchapoton Sep 2, 2024
87caf5a
Merge pull request #6178 from fchapoton/des_typos
edgarcosta Sep 2, 2024
752b9ea
autopep8 action fixes
edgarcosta Sep 2, 2024
aa6cbf5
Merge pull request #6179 from LMFDB/autopep8-patches
edgarcosta Sep 2, 2024
3aa436d
Merge pull request #6174 from jwj61/fixmodlstats
edgarcosta Sep 2, 2024
ea359b8
fix pycodestyle E111 and E222
fchapoton Sep 2, 2024
d5dd294
Merge pull request #6180 from fchapoton/fix_E111_E222
roed314 Sep 2, 2024
1cd980a
Search for relative class number
jwj61 Sep 2, 2024
60582aa
activate the check for E111
fchapoton Sep 3, 2024
83e553f
Merge pull request #6182 from fchapoton/activation_E111
roed314 Sep 3, 2024
4e953df
Fix download input at top and bottom of search results
roed314 Sep 4, 2024
4c1c99b
Update nf-show-field.html
roed314 Sep 5, 2024
00463d9
Move dollar signs to relh function
roed314 Sep 5, 2024
bc1daaf
Relative class number is not a string
roed314 Sep 5, 2024
c2cb90f
Add test
roed314 Sep 5, 2024
755f0da
some typos and various small code details
fchapoton Sep 6, 2024
d052b8b
Merge pull request #6186 from fchapoton/varia_and_typo
roed314 Sep 9, 2024
bc8f50b
Fix comment tag
roed314 Sep 9, 2024
7a6b5bc
missing self arguments, etc
fchapoton Sep 12, 2024
16aa84e
Merge pull request #6183 from roed314/download_hidden
AndrewVSutherland Sep 26, 2024
9c592ae
Merge pull request #6181 from jwj61/addrelh
AndrewVSutherland Sep 27, 2024
6f673a3
Merge pull request #6188 from fchapoton/add_missing_self
AndrewVSutherland Sep 27, 2024
71c903c
autopep8 action fixes
AndrewVSutherland Sep 27, 2024
9db686c
Merge pull request #6192 from LMFDB/autopep8-patches
edgarcosta Sep 27, 2024
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
4 changes: 0 additions & 4 deletions .lgtm.yml

This file was deleted.

1 change: 1 addition & 0 deletions lmfdb/abvar/fq/download.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
from psycodict.encoding import Json
from .isog_class import AbvarFq_isoclass


class AbvarFq_download(Downloader):
table = db.av_fq_isog
title = 'Abelian variety isogeny classes'
Expand Down
2 changes: 2 additions & 0 deletions lmfdb/abvar/fq/search_parsing.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,13 @@
_parse_subset,
)


@search_parser # see SearchParser.__call__ for actual arguments when calling
def parse_nf_string(inp, query, qfield):
fields = [nf_string_to_label(field) for field in inp.split(",")]
_parse_subset(fields, query, qfield, mode=None, radical=None, product=None, cardinality=None)


@search_parser # (clean_info=True, default_field='galois_group', default_name='Galois group', default_qfield='galois') # see SearchParser.__call__ for actual arguments when calling
def parse_galgrp(inp, query, qfield):
from lmfdb.galois_groups.transitive_group import complete_group_codes
Expand Down
2 changes: 1 addition & 1 deletion lmfdb/artin_representations/math_classes.py
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ def determinant(self):
wc = thischar.split(r'.')
self._data['central_character'] = WebSmallDirichletCharacter(modulus=wc[0], number=wc[1])
return self._data['central_character']
return(thischar)
return thischar
# Not in the database
if self.dimension() == 1:
return self.central_character()
Expand Down
6 changes: 4 additions & 2 deletions lmfdb/belyi/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -683,6 +683,7 @@ def query_convert_abc_list(query):
query.pop("abc_list")
return query


def common_parse(info, query):
parse_bracketed_posints(info, query, "abc_list", "a, b, c", maxlength=3)
query_convert_abc_list(query)
Expand All @@ -700,8 +701,9 @@ def common_parse(info, query):
parse_nf_string(info, query, 'field', name="base number field", qfield='base_field_label')
parse_bool(info, query, "is_primitive", name="is_primitive")
for fld in ["geomtype", "group"]:
if info.get(fld):
query[fld] = info[fld]
if info.get(fld):
query[fld] = info[fld]


def primitivization_search(info, query, search_type):
if search_type == "galmap":
Expand Down
8 changes: 6 additions & 2 deletions lmfdb/characters/web_character.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,15 +59,19 @@
from lmfdb.groups.abstract.main import abstract_group_display_knowl
logger = make_logger("DC")


def parity_string(n):
return ("even" if n else "odd") if isinstance(n, bool) else ("odd" if n == -1 else "even")


def bool_string(b):
return "yes" if b else "no"


def compute_values(chi, groupelts):
"Helper function to compute values of several elements on the fly"
return [[k, int(chi.conreyangle(k) * chi.order)] for k in groupelts]
"Helper function to compute values of several elements on the fly"
return [[k, int(chi.conreyangle(k) * chi.order)] for k in groupelts]


def valuefield_from_order(order):
order2 = order if order % 4 != 2 else order / 2
Expand Down
2 changes: 1 addition & 1 deletion lmfdb/classical_modular_forms/test_cmf.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@


class CmfTest(LmfdbTest):
def runTest():
def runTest(self):
pass

def test_expression_divides(self):
Expand Down
2 changes: 1 addition & 1 deletion lmfdb/classical_modular_forms/test_cmf2.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@


class CmfTest(LmfdbTest):
def runTest():
def runTest(self):
pass

def test_download_qexp(self):
Expand Down
8 changes: 5 additions & 3 deletions lmfdb/ecnf/WebEllipticCurve.py
Original file line number Diff line number Diff line change
Expand Up @@ -176,8 +176,10 @@ def inflate_interval(a,b,r):
d*=r
return (c-d,c+d)

def plot_zone_union(R,S):
return(min(R[0],S[0]),max(R[1],S[1]),min(R[2],S[2]),max(R[3],S[3]))

def plot_zone_union(R, S):
return (min(R[0], S[0]), max(R[1], S[1]), min(R[2], S[2]), max(R[3], S[3]))


# Finds a suitable plotting zone for the component a <= x <= b of the EC y**2+h(x)*y=f(x)
def EC_R_plot_zone_piece(f,h,a,b):
Expand Down Expand Up @@ -718,7 +720,7 @@ def latex_kod(kod):
# LMFDB labels:
self.base_change_Q = [cremona_label_to_lmfdb_label(lab) for lab in self.base_change if '-' not in lab]

# sort by conductor (so also unkown curves come last)
# sort by conductor (so also unknown curves come last)
self.base_change_Q.sort(key=lambda lab:ZZ(conductor_from_label(lab)))
self.bcQtext = [] # for the Base change section of the home page
for lab in self.base_change_Q:
Expand Down
3 changes: 2 additions & 1 deletion lmfdb/ecnf/ecnf_test_pages.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,10 @@
from lmfdb.tests import LmfdbTest
from lmfdb import db


class ECNFTest(LmfdbTest):

def runTest():
def runTest(self):
pass

def test_d6_pages(self):
Expand Down
2 changes: 1 addition & 1 deletion lmfdb/elliptic_curves/code.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ bsd_formula:
omega = E.period_lattice().omega(); reg = E.regulator(); tam = E.tamagawa_product(); tor = E.torsion_order();
assert r == ar; print("analytic sha: " + str(RR(Lr1) * tor^2 / (omega * reg * tam)))
magma: |
/* self-contained Magma code snippet for the BSD formula (checks rank, computes analyiic sha) */
/* self-contained Magma code snippet for the BSD formula (checks rank, computes analytic sha) */
E := EllipticCurve(%s); r := Rank(E); ar,Lr1 := AnalyticRank(E: Precision := 12); assert r eq ar;
sha := MordellWeilShaInformation(E); omega := RealPeriod(E) * (Discriminant(E) gt 0 select 2 else 1);
reg := Regulator(E); tam := &*TamagawaNumbers(E); tor := #TorsionSubgroup(E);
Expand Down
5 changes: 5 additions & 0 deletions lmfdb/elliptic_curves/congruent_numbers.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,18 +8,23 @@

congruent_number_data_directory = os.path.expanduser('~/data/congruent_number_curves')


def CNfilename(file_suffix):
return os.path.join(congruent_number_data_directory, "CN.{}".format(file_suffix))


def get_CN_data_old(fs, n):
with open(CNfilename(fs)) as data:
return data.readlines()[n-1].split()


def get_CN_data_new(fs, n):
return linecache.getline(CNfilename(fs), n).split()


get_CN_data = get_CN_data_new


def parse_gens_string(s):
if s == '[]':
return []
Expand Down
23 changes: 12 additions & 11 deletions lmfdb/elliptic_curves/elliptic_curve.py
Original file line number Diff line number Diff line change
Expand Up @@ -764,21 +764,22 @@ def render_curve_webpage_by_label(label):
code = data.code()
code['show'] = {'magma':'','pari':'','sage':'','oscar':''} # use default show names
learnmore_curve_picture = ('Picture description', url_for(".curve_picture_page"))
T = render_template("ec-curve.html",
properties=data.properties,
data=data,
# set default show names but actually code snippets are filled in only when needed
code=code,
bread=data.bread, title=data.title,
friends=data.friends,
downloads=data.downloads,
KNOWL_ID="ec.q.%s"%lmfdb_label,
BACKUP_KNOWL_ID="ec.q.%s"%data.lmfdb_iso,
learnmore=learnmore_list_add(*learnmore_curve_picture))
T = render_template("ec-curve.html",
properties=data.properties,
data=data,
# set default show names but actually code snippets are filled in only when needed
code=code,
bread=data.bread, title=data.title,
friends=data.friends,
downloads=data.downloads,
KNOWL_ID="ec.q.%s"%lmfdb_label,
BACKUP_KNOWL_ID="ec.q.%s"%data.lmfdb_iso,
learnmore=learnmore_list_add(*learnmore_curve_picture))
ec_logger.debug("Total walltime: %ss"%(time.time() - t0))
ec_logger.debug("Total cputime: %ss"%(cputime(cpt0)))
return T


@ec_page.route("/data/<label>")
def EC_data(label):
bread = get_bread([(label, url_for_label(label)), ("Data", " ")])
Expand Down
2 changes: 2 additions & 0 deletions lmfdb/elliptic_curves/isog_class.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@

from sage.all import latex, PowerSeriesRing, QQ, ZZ, RealField


class ECisog_class():
"""
Class for an isogeny class of elliptic curves over Q
Expand Down Expand Up @@ -187,6 +188,7 @@ def perm(i): return next(c for c in self.curves if c['Cnumber']==i+1)['lmfdb_num
self.code['matrix'] = {'sage':'E.isogeny_class().matrix()'}
self.code['plot'] = {'sage':'E.isogeny_graph().plot(edge_labels=True)'}


def make_graph(M, vertex_labels=None):
"""
Code extracted from Sage's elliptic curve isogeny class (reshaped
Expand Down
1 change: 1 addition & 0 deletions lmfdb/elliptic_curves/test_browse_page.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
from lmfdb.tests import LmfdbTest


class HomePageTest(LmfdbTest):
# All tests should pass
#
Expand Down
2 changes: 1 addition & 1 deletion lmfdb/elliptic_curves/web_ec.py
Original file line number Diff line number Diff line change
Expand Up @@ -398,7 +398,7 @@ def red(p):
if adelic_data:
assert len(adelic_data) == 1
my_adelic_data = adelic_data[0]
data['adelic_data'] = my_adelic_data
data['adelic_data'] = my_adelic_data
data['adelic_gens_latex'] = ",".join([str(latex(dispZmat_from_list(z,2))) for z in my_adelic_data['adelic_gens']])
M = ZZ(self.adelic_level)
data['adelic_level_latex'] = web_latex_factored_integer(M,equals=True)
Expand Down
2 changes: 1 addition & 1 deletion lmfdb/galois_groups/templates/character-table.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
{%- set dummy = gp.conjclasses -%}
{%- set ccs = gp.conjugacy_classes -%}
{%- if info.char_highlight -%}
<p>The row representing the character {{info.char_highlight}} is highighted below.</p>
<p>The row representing the character {{info.char_highlight}} is highlighted below.</p>
{%- endif -%}
<table class="nowrap">
<tr>
Expand Down
2 changes: 1 addition & 1 deletion lmfdb/galois_groups/transitive_group.py
Original file line number Diff line number Diff line change
Expand Up @@ -660,7 +660,7 @@ def complete_group_code(code):
n = int(rematch.group(1))
t = int(rematch.group(2))
return [(n, t)]
# covert GAP code to abstract group label
# convert GAP code to abstract group label
rematch = re.match(r'^\[(\d+),(\d+)\]$', code)
if rematch:
code = "%s.%s" % (rematch.group(1), rematch.group(2))
Expand Down
3 changes: 2 additions & 1 deletion lmfdb/genus2_curves/g2c_test_pages.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,10 @@
from lmfdb.tests import LmfdbTest
from lmfdb import db


class Genus2Test(LmfdbTest):

def runTest():
def runTest(self):
pass

def test_all_pages(self):
Expand Down
10 changes: 5 additions & 5 deletions lmfdb/groups/abstract/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -1492,7 +1492,7 @@ def diagram_js(gp, layers, display_opts, aut=False, normal=False):
ilayer += 2
iorder += 2
if gp.outer_equivalence and ilayer>3:
ilayer -= 2
ilayer -= 2
ll = [
[
grp.subgroup,
Expand Down Expand Up @@ -1630,7 +1630,7 @@ def render_abstract_group(label, data=None):
friends += [("As the automorphism of a curve", auto_url)]

if abstract_group_label_regex.fullmatch(label) and len(gp.transitive_friends) > 0:
gal_gp_url = "/GaloisGroup/?gal="+label
gal_gp_url = "/GaloisGroup/?gal=" + label
friends += [("As a transitive group", gal_gp_url)]

if db.gps_st.count({"component_group": label}) > 0:
Expand Down Expand Up @@ -1919,10 +1919,10 @@ def download_group(**args):
if dltype == "oscar":
# This needs to change for larger groups
if gp_data["solvable"]:
s += com + " The group will be created as a polycylic group (not necessarily matching the presentation in the LMFDB).\n"
s += com + ' You can turn it into a permuation group using "PermGroup(G)".\n'
s += com + " The group will be created as a polycyclic group (not necessarily matching the presentation in the LMFDB).\n"
s += com + ' You can turn it into a permutation group using "PermGroup(G)".\n'
else:
s += com + " The group will be created as a permuation group (not necessarily using the generators used in the LMFDB).\n"
s += com + " The group will be created as a permutation group (not necessarily using the generators used in the LMFDB).\n"
s += com2 + "\n"
s += "\n"
s += "G = small_group(%s,%s)" % tuple(label.split("."))
Expand Down
20 changes: 10 additions & 10 deletions lmfdb/groups/abstract/verify.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,44 +27,44 @@ def test_small_gps(sample_gp):
#Confirm number of non-conjugate subgroups (if known in database)
if sample_gp['number_subgroup_classes']:
SubLat = libgap.LatticeSubgroups(G)
Cons = libgap.ConjugacyClassesSubgroups(SubLat)
Cons = libgap.ConjugacyClassesSubgroups(SubLat)
print ("Number of subgroup classes match: " + str(libgap.Size(Cons) == sample_gp['number_subgroup_classes']))
if sample_gp['number_normal_subgroups']:
NormLat = libgap.NormalSubgroups(G)
print ("Number of normal subgroups match: " + str(libgap.Size(NormLat) == sample_gp['number_normal_subgroups']))
print("Number of normal subgroups match: " + str(libgap.Size(NormLat) == sample_gp['number_normal_subgroups']))

# check if minimal permutation degrees match
if sample_gp['permutation_degree']:
minpermdeg_gap = libgap.MinimalFaithfulPermutationDegree(G)
print("Minimal permutation degrees match: " + str(minpermdeg_gap == sample_gp['permutation_degree']))

# check order stats
stupid_str = 'Set(ConjugacyClasses(SmallGroup(' + id_nums[0]+ ',' + id_nums[1] + ")), z->Order(Representative(z))) "
stupid_str = 'Set(ConjugacyClasses(SmallGroup(' + id_nums[0] + ',' + id_nums[1] + ")), z->Order(Representative(z))) "
ords = libgap.eval(stupid_str)

ordsLMFDB = []
ords_list = sample_gp['order_stats']
for i in range(len(ords_list)):
ordsLMFDB.append(ords_list[i][0])
print("Order set matches: " + str(ords == ordsLMFDB))
#print(ords,ordsLMFDB)
# print(ords,ordsLMFDB)

#check degrees
irr_stats = sample_gp['irrep_stats']
# check degrees
irr_stats = sample_gp['irrep_stats']
degLMFDB = []
for i in range(len(irr_stats)):
for j in range(irr_stats[i][1]):
degLMFDB.append(irr_stats[i][0])
stupid_str_2 = 'List(Irr(SmallGroup(' + id_nums[0] + ',' + id_nums[1]+ ')), z -> z[1])'
stupid_str_2 = 'List(Irr(SmallGroup(' + id_nums[0] + ',' + id_nums[1] + ')), z -> z[1])'
degs = libgap.eval(stupid_str_2)

print("Degrees of characters match: " + str(degs == degLMFDB))
#print(degs,degLMFDB)
# print(degs,degLMFDB)


#pick random group of order <= 2000 from DB
# pick random group of order <= 2000 from DB

for i in range(10):
x = db.gps_groups_test.random({'order': {"$lte" :2000}})
x = db.gps_groups_test.random({'order': {"$lte" :2000}})
sample_gp =db.gps_groups_test.lucky({'label': x})
test_small_gps(sample_gp)
Loading
Loading