Skip to content

Commit

Permalink
Merge pull request #6173 from fchapoton/remove_lgtm_config
Browse files Browse the repository at this point in the history
remove unused config file, remove useless wraps by int, etc
  • Loading branch information
roed314 authored Aug 26, 2024
2 parents 256dbaf + 97b00b8 commit 7dc2cc4
Show file tree
Hide file tree
Showing 11 changed files with 48 additions and 50 deletions.
4 changes: 0 additions & 4 deletions .lgtm.yml

This file was deleted.

5 changes: 3 additions & 2 deletions lmfdb/groups/abstract/web_groups.py
Original file line number Diff line number Diff line change
Expand Up @@ -2186,9 +2186,10 @@ def myisinner(a):
elif rep_type == "Perm":
inners = [str(z) for z in inners]
else:
if self.element_repr_type=="GLFq":
if self.element_repr_type == "GLFq":
R, N, k, d, rep_type = self._matrix_coefficient_data(self.element_repr_type)
inners = [matrix(R,d,d,[[z for z in zz] for zz in z3]) if z3 != '' else '' for z3 in inners]
inners = [matrix(R, d, d, [list(zz) for zz in z3])
if z3 != '' else '' for z3 in inners]
inners = [latex(matrix(z)) if z != '' else '' for z in inners]
return {'orders': orders, 'inners': inners}

Expand Down
6 changes: 3 additions & 3 deletions lmfdb/hilbert_modular_forms/web_HMF.py
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ def create_from_data_string(self, label_or_field, L):

# The weight

data['parallel_weight'] = int(2)
data['parallel_weight'] = 2
data['weight'] = str([data['parallel_weight']] * F.degree())
weight = [2] * F.degree()

Expand All @@ -126,14 +126,14 @@ def create_from_data_string(self, label_or_field, L):
i = L.find("x")
j = L.find(i+1,",")
data['hecke_polynomial'] = pol = L[i:j]
data['dimension'] = int(1)
data['dimension'] = 1
x = polygen(QQ)
hpol = x.parent()(str(pol))
data['dimension'] = int(hpol.degree())
else:
# rational
data['hecke_polynomial'] = 'x'
data['dimension'] = int(1)
data['dimension'] = 1

i = L.rfind("[")
j = L.rfind("]")
Expand Down
2 changes: 1 addition & 1 deletion lmfdb/lfunctions/Lfunction.py
Original file line number Diff line number Diff line change
Expand Up @@ -1074,7 +1074,7 @@ def __init__(self, **args):
self.quasidegree = 1
self.level_factored = self.level = 1
self.mu_fe = [] # the shifts of the Gamma_R to print
self.automorphyexp = float(self.weight) - float(1.5)
self.automorphyexp = float(self.weight) - 1.5
self.nu_fe = [Rational(1/2), self.automorphyexp] # the shift of the Gamma_C to print
self.compute_kappa_lambda_Q_from_mu_nu()
self.algebraic = True
Expand Down
4 changes: 2 additions & 2 deletions lmfdb/modlmf/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -189,9 +189,9 @@ def render_modlmf_webpage(**args):

info['coeffs']=[str(s).replace('x','a').replace('*','') for s in data['coeffs']]

if data['deg'] != int(1):
if data['deg'] != 1:
try:
pol=str(conway_polynomial(data['characteristic'], data['deg'])).replace('x','a').replace('*','')
pol = str(conway_polynomial(data['characteristic'], data['deg'])).replace('x','a').replace('*','')
info['field']= pol
except Exception:
info['field']=""
Expand Down
2 changes: 1 addition & 1 deletion lmfdb/modular_curves/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -1259,7 +1259,7 @@ def modcurve_data(label):
"coarse_class_num" : iso_num,
"contains_negative_one" : "yes"},
"label")
labels = [lab for lab in labels]
labels = list(labels)
label_tables_cols = [(label, "gps_gl2zhat_fine", "label") for label in labels]
else:
label_tables_cols = [(label, "gps_gl2zhat_fine", "label")]
Expand Down
8 changes: 4 additions & 4 deletions lmfdb/sato_tate_groups/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -684,13 +684,13 @@ def mu_data(n):
assert n > 0
n = ZZ(n)
rec = {}
rec['label'] = "0.1.%d"%n
rec['label_components'] = [int(0),int(1),int(0),int(n)]
rec['label'] = "0.1.%d" % n
rec['label_components'] = [0, 1, 0, int(n)]
rec['weight'] = 0
rec['degree'] = 1
rec['rational'] = bool(n <= 2)
rec['name'] = 'mu(%d)'%n
rec['pretty'] = r'\mu(%d)'%n
rec['name'] = 'mu(%d)' % n
rec['pretty'] = r'\mu(%d)' % n
rec['real_dimension'] = 0
rec['components'] = int(n)
rec['component_group'] = db.gps_special_names.lucky({'family':'C','parameters':{'n':n}},projection='label')
Expand Down
4 changes: 2 additions & 2 deletions lmfdb/sato_tate_groups/test_st.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ def test_completeness(self):
import sys
L = self.tc.get('/SatoTateGroup/?weight=1&degree=2')
assert '3 matches' in L.get_data(as_text=True)
data = list(db.gps_st.search({'weight':int(1),'degree':int(2)}, projection='label'))
data = list(db.gps_st.search({'weight': 1, 'degree': 2}, projection='label'))
assert len(data) == 3
print("")
for label in data:
Expand All @@ -81,7 +81,7 @@ def test_completeness(self):
assert label in L.get_data(as_text=True) and 'Moment sequences' in L.get_data(as_text=True)
L = self.tc.get('/SatoTateGroup/?weight=1&degree=4')
assert 'of 52' in L.get_data(as_text=True)
data = list(db.gps_st.search({'weight':int(1),'degree':int(4)}, projection='label'))
data = list(db.gps_st.search({'weight': 1, 'degree': 4}, projection='label'))
assert len(data) == 52

for label in data:
Expand Down
56 changes: 28 additions & 28 deletions lmfdb/siegel_modular_forms/family_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,99 +3,99 @@
families = [
{
"name": "Gamma0_2",
"degree": int(2),
"degree": 2,
"dim_args_default": {"k": "4..24", "j": "2"},
"latex_name": "M_{k,j}\\left(\\Gamma_0(2)\\right)",
"order": int(50)
"order": 50
},
{
"name": "Gamma0_3",
"degree": int(2),
"degree": 2,
"dim_args_default": { "k": "0..20" },
"latex_name": "M_k\\left(\\Gamma_0(3)\\right)",
"order": int(80)
"order": 80
},
{
"name": "Gamma0_3_psi_3",
"degree": int(2),
"degree": 2,
"dim_args_default": { "k": "0..20" },
"latex_name": "M_k\\left(\\Gamma_0(3),\\psi_3\\right)",
"order": int(90)
"order": 90
},
{
"name": "Gamma0_4_half",
"degree": int(2),
"degree": 2,
"dim_args_default": { "k": "1..20" },
"latex_name": "M_{k-1/2}\\left(\\Gamma_0(4)\\right)",
"order": int(108)
"order": 108
},
{
"name": "Gamma0_4",
"degree": int(2),
"degree": 2,
"dim_args_default": { "k": "0..20" },
"latex_name": "M_k\\left(\\Gamma_0(4)\\right)",
"order": int(100)
"order": 100
},
{
"name": "Gamma0_4_psi_4",
"degree": int(2),
"degree": 2,
"dim_args_default": { "k": "0..40" },
"latex_name": "M_k\\left(\\Gamma_0(4),\\psi_4\\right)",
"order": int(105)
"order": 105
},
{
"name": "Gamma1_2",
"degree": int(2),
"degree": 2,
"dim_args_default": { "k": "4..10", "j": "2" },
"latex_name": "M_{k,j}\\left(\\Gamma_1(2)\\right)",
"order": int(60)
"order": 60
},
{
"name": "Gamma_2",
"degree": int(2),
"degree": 2,
"dim_args_default": { "k": "4..10", "j": "2" },
"latex_name": "M_{k,j}\\left(\\Gamma(2)\\right)",
"order": int(70)
"order": 70
},
{
"name": "Kp",
"degree": int(2),
"degree": 2,
"latex_name": "M_2\\left(K(p)\\right)",
"order": int(110)
"order": 110
},
{
"name": "Sp4Z_2",
"degree": int(2),
"degree": 2,
"dim_args_default": { "k": "4..24" },
"latex_name": "M_{k,2}\\left(\\textrm{Sp}(4,\\mathbb{Z})\\right)",
"order": int(30)
"order": 30
},
{
"name": "Sp4Z_j",
"degree": int(2),
"degree": 2,
"dim_args_default": { "k": "4..24", "j": "4" },
"latex_name": "M_{k,j}\\left(\\textrm{Sp}(4,\\mathbb{Z})\\right)",
"order": int(40)
"order": 40
},
{
"name": "Sp4Z",
"degree": int(2),
"degree": 2,
"dim_args_default": { "k": "0..20" },
"latex_name": "M_k\\left({\\textrm{Sp}}(4,\\mathbb{Z})\\right)",
"order": int(10)
"order": 10
},
{
"name": "Sp6Z",
"degree": int(3),
"degree": 3,
"dim_args_default": { "k": "0..20" },
"latex_name": "M_{k}\\left(\\textrm{Sp}(6,\\mathbb{Z})\\right)",
"order": int(130)
"order": 130
},
{
"name": "Sp8Z",
"degree": int(4),
"degree": 4,
"dim_args_default": { "k": "0..16" },
"latex_name": "M_k\\left(\\textrm{Sp}(8,\\mathbb{Z})\\right)",
"order": int(140)
"order": 140
},
]
2 changes: 1 addition & 1 deletion lmfdb/utils/uploader.py
Original file line number Diff line number Diff line change
Expand Up @@ -296,7 +296,7 @@ def header(self):

@lazy_attribute
def header_dict(self):
return {name: box for (name, box) in zip(self.header, self.inputs)}
return dict(zip(self.header, self.inputs))

def parse_csv(self, stream):
reader = csv.reader(stream)
Expand Down
5 changes: 3 additions & 2 deletions lmfdb/verify/modcurve/modcurve_modelmaps.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,14 +58,15 @@ def check_rat_pts_map_to_rat_pts(self, rec):
pt_on_codomain_as_list = apply_map_to_pt(rec['coordinates'], rel_pt)

# TEST 1: check this pt is rational
if not all([t in QQ for t in pt_on_codomain_as_list]):
if not all(t in QQ for t in pt_on_codomain_as_list):
return False

# TEST 2: check this is actually a point on the codomain
equation, number_variables = self.modcurve_models[rec["codomain_label"], rec["codomain_model_type"]]
Pol = PolynomialRing(QQ, number_variables, names=VARORDER[:number_variables])

if not all([Pol(f_str)(pt_on_codomain_as_list) == 0 for f_str in equation]):
if not all(Pol(f_str)(pt_on_codomain_as_list) == 0
for f_str in equation):
return False

return True

0 comments on commit 7dc2cc4

Please sign in to comment.