Skip to content

Commit 2b8f2a0

Browse files
rvisser7edgarcosta
authored andcommitted
Made download message to load Oscar package global (i.e. moved to place_code utils)
1 parent 47e8ede commit 2b8f2a0

4 files changed

Lines changed: 4 additions & 7 deletions

File tree

lmfdb/ecnf/code.yaml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,6 @@ not-implemented:
2323
frontmatter:
2424
all: |
2525
{lang} code for working with elliptic curve {label}
26-
oscar: |
27-
If you have not already loaded the Oscar package, you should type "using Oscar;" before running the code below.
2826
rest: |
2927
(Note that not all these functions may be available, and some may take a long time to execute.)
3028

lmfdb/elliptic_curves/code.yaml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,9 +33,6 @@ not-implemented:
3333
frontmatter:
3434
all: |
3535
{lang} code for working with elliptic curve {label}
36-
oscar: |
37-
If you have not already loaded the Oscar package, you should type "using Oscar;" before running the code below.
38-
3936
4037
curve:
4138
comment: Define the curve

lmfdb/number_fields/code.yaml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,6 @@ not-implemented:
2424
frontmatter:
2525
all: |
2626
{lang} code for working with number field {label}.
27-
oscar: |
28-
If you have not already loaded the Oscar package, you should type "using Oscar;" before running the code below.
2927
rest: |
3028
Some of these functions may take a long time to execute (this depends on the field).
3129

lmfdb/utils/place_code.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,10 @@ def build_frontmatter(self, label, lang):
109109
for key in ['all', lang, 'rest']:
110110
frmt += codefrmt[key] if key in codefrmt else ""
111111

112+
# Include message to load Oscar package (if lang is Oscar)
113+
if key == 'oscar':
114+
frmt += 'If you have not already loaded the Oscar package, you should type "using Oscar;" before running the code below.\n'
115+
112116
frmt = frmt.replace('\n', '\n' + cmt + " ", frmt.count("\n")-1)
113117
return frmt.format(lang=self.full_names[lang], label=label) + "\n"
114118

0 commit comments

Comments
 (0)