Skip to content

Commit ef6f8c2

Browse files
committed
New Jupyter kernel cleanup, acknowledgements added.
1 parent b7d369c commit ef6f8c2

File tree

9 files changed

+92
-119
lines changed

9 files changed

+92
-119
lines changed

CMakeLists.txt

Lines changed: 20 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -108,15 +108,13 @@ else()
108108
endif()
109109

110110
option(ENABLE_JUPYTER "Enable building the Xeus-based Jupyter kernel" OFF)
111-
option(ENABLE_PY_JUPYTER "Enable building the pure-Python Jupyter kernel" ON)
111+
option(ENABLE_PY_JUPYTER "Enable building the default Jupyter kernel" ON)
112112

113113
if(ENABLE_JUPYTER)
114-
message(STATUS "Building the Jupyter kernel")
115114
# Currently only possible when building against Conda.
116115
set(CONDA_FOUND TRUE)
117116
else()
118-
set(CONDA_FOUND FALSE)
119-
message(STATUS "Not building the Jupyter kernel")
117+
set(CONDA_FOUND FALSE)
120118
endif()
121119

122120
option(BUILD_TESTS "Build tests" ON)
@@ -273,6 +271,24 @@ endif()
273271
# Add subdirectories to project.
274272
#---------------------------------------------------------------------------
275273

274+
# Jupyter kernel
275+
print_header("Configuring Jupyter kernel")
276+
if(ENABLE_JUPYTER)
277+
message(STATUS "Building the Xeus-based Jupyter kernel")
278+
# Currently only possible when building against Conda.
279+
set(CONDA_FOUND TRUE)
280+
else()
281+
set(CONDA_FOUND FALSE)
282+
if(ENABLE_PY_JUPYTER)
283+
message(STATUS "Building the default Jupyter kernel")
284+
else()
285+
message(STATUS "Not building a Jupyter kernel")
286+
endif()
287+
endif()
288+
if(ENABLE_PY_JUPYTER)
289+
add_subdirectory(jupyterkernel)
290+
endif()
291+
276292
# Core/packages
277293
add_subdirectory(client_server)
278294
add_subdirectory(core)
@@ -288,11 +304,6 @@ if(BUILD_TESTS)
288304
add_subdirectory(tests)
289305
endif()
290306

291-
# py jupyter kernel
292-
if(ENABLE_PY_JUPYTER)
293-
add_subdirectory(jupyterkernel)
294-
endif()
295-
296307
add_subdirectory(web2 EXCLUDE_FROM_ALL)
297308

298309
# Generate the core/Config.hh file; this needs to come as late as possible

client_server/CMakeLists.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -198,7 +198,7 @@ target_link_libraries(cadabra2latex cadabra_client)
198198

199199
# Jupyter kernel
200200
if(ENABLE_JUPYTER)
201-
print_header("Configuring Jupyter kernel build")
201+
print_header("Configuring Xeus Jupyter kernel")
202202
find_package(xtl REQUIRED)
203203
find_package(nlohmann_json REQUIRED)
204204
find_library(UUID_LIBRARIES uuid REQUIRED)
@@ -212,7 +212,7 @@ if(ENABLE_JUPYTER)
212212
target_link_libraries(cadabra-jupyter-kernel ${JSONCPP_LIBRARIES})
213213
endif()
214214
else()
215-
print_header("Not building Jupyter kernel")
215+
message("-- Not building Xeus Jupyter kernel")
216216
endif()
217217

218218
# Make sure sqlite3.dll is copied into the build directory on Windows.

examples/schwarzschild.ipynb

Lines changed: 55 additions & 94 deletions
Original file line numberDiff line numberDiff line change
@@ -16,38 +16,7 @@
1616
"cell_type": "code",
1717
"execution_count": 1,
1818
"metadata": {},
19-
"outputs": [
20-
{
21-
"data": {
22-
"text/markdown": [
23-
"${}\\text{Attached property Coordinate to~}\\left[r,~ t,~ \\phi,~ \\theta\\right].$"
24-
]
25-
},
26-
"execution_count": 1,
27-
"metadata": {},
28-
"output_type": "execute_result"
29-
},
30-
{
31-
"data": {
32-
"text/markdown": [
33-
"${}\\text{Attached property Indices(position=fixed) to~}\\left[\\mu,~ \\nu,~ \\rho,~ \\sigma,~ \\lambda,~ \\kappa,~ \\chi,~ \\gamma\\right].$"
34-
]
35-
},
36-
"execution_count": 1,
37-
"metadata": {},
38-
"output_type": "execute_result"
39-
},
40-
{
41-
"data": {
42-
"text/markdown": [
43-
"${}\\text{Attached property PartialDerivative to~}\\partial{\\#}.$"
44-
]
45-
},
46-
"execution_count": 1,
47-
"metadata": {},
48-
"output_type": "execute_result"
49-
}
50-
],
19+
"outputs": [],
5120
"source": [
5221
"{r,t,\\phi,\\theta}::Coordinate;\n",
5322
"{\\mu,\\nu,\\rho,\\sigma,\\lambda,\\kappa,\\chi,\\gamma}::Indices(values={t,r,\\phi,\\theta}, position=fixed);\n",
@@ -73,12 +42,11 @@
7342
{
7443
"data": {
7544
"text/markdown": [
76-
"${}\\left[g_{t t} = -1+2M {r}^{-1},~ g_{r r} = {\\left(1-2M {r}^{-1}\\right)}^{-1},~ g_{\\theta \\theta} = {r}^{2},~ g_{\\phi \\phi} = {r}^{2} {\\left(\\sin{\\theta}\\right)}^{2},~ g^{t t} = {\\left(2M {r}^{-1}-1\\right)}^{-1},~ g^{r r} = -2M {r}^{-1}+1,~ g^{\\phi \\phi} = {\\left({r}^{2} {\\left(\\sin{\\theta}\\right)}^{2}\\right)}^{-1},~ g^{\\theta \\theta} = {r}^{-2}\\right]$"
45+
"${}\\left[g_{t t} = -1+2M {r}^{-1},~\\discretionary{}{}{} g_{r r} = {\\left(1-2M {r}^{-1}\\right)}^{-1},~\\discretionary{}{}{} g_{\\theta \\theta} = {r}^{2},~\\discretionary{}{}{} g_{\\phi \\phi} = {r}^{2} {\\left(\\sin{\\theta}\\right)}^{2},~\\discretionary{}{}{} g^{t t} = {\\left(2M {r}^{-1}-1\\right)}^{-1},~\\discretionary{}{}{} g^{r r} = -2M {r}^{-1}+1,~\\discretionary{}{}{} g^{\\phi \\phi} = {\\left({r}^{2} {\\left(\\sin{\\theta}\\right)}^{2}\\right)}^{-1},~\\discretionary{}{}{} g^{\\theta \\theta} = {r}^{-2}\\right]$"
7746
]
7847
},
79-
"execution_count": 2,
8048
"metadata": {},
81-
"output_type": "execute_result"
49+
"output_type": "display_data"
8250
}
8351
],
8452
"source": [
@@ -111,33 +79,31 @@
11179
"${}\\Gamma^{\\mu}\\,_{\\nu \\rho} = \\frac{1}{2}g^{\\mu \\sigma} \\left(\\partial_{\\rho}{g_{\\nu \\sigma}}+\\partial_{\\nu}{g_{\\rho \\sigma}}-\\partial_{\\sigma}{g_{\\nu \\rho}}\\right)$"
11280
]
11381
},
114-
"execution_count": 3,
11582
"metadata": {},
116-
"output_type": "execute_result"
83+
"output_type": "display_data"
11784
},
11885
{
11986
"data": {
12087
"text/markdown": [
121-
"${}\\Gamma^{\\mu}\\,_{\\nu \\rho} = \\square{}_{\\nu}{}_{\\rho}{}^{\\mu}\\left\\{\\begin{aligned}\\square{}_{\\phi}{}_{r}{}^{\\phi}= & {r}^{-1}\\\\[-.5ex]\n",
122-
"\\square{}_{\\phi}{}_{\\theta}{}^{\\phi}= & {\\left(\\tan{\\theta}\\right)}^{-1}\\\\[-.5ex]\n",
123-
"\\square{}_{\\theta}{}_{r}{}^{\\theta}= & {r}^{-1}\\\\[-.5ex]\n",
124-
"\\square{}_{r}{}_{r}{}^{r}= & M {\\left(r \\left(2M-r\\right)\\right)}^{-1}\\\\[-.5ex]\n",
125-
"\\square{}_{t}{}_{r}{}^{t}= & M {\\left(r \\left(-2M+r\\right)\\right)}^{-1}\\\\[-.5ex]\n",
126-
"\\square{}_{r}{}_{\\phi}{}^{\\phi}= & {r}^{-1}\\\\[-.5ex]\n",
127-
"\\square{}_{\\theta}{}_{\\phi}{}^{\\phi}= & {\\left(\\tan{\\theta}\\right)}^{-1}\\\\[-.5ex]\n",
128-
"\\square{}_{r}{}_{\\theta}{}^{\\theta}= & {r}^{-1}\\\\[-.5ex]\n",
129-
"\\square{}_{r}{}_{t}{}^{t}= & M {\\left(r \\left(-2M+r\\right)\\right)}^{-1}\\\\[-.5ex]\n",
130-
"\\square{}_{\\phi}{}_{\\phi}{}^{r}= & \\left(2M-r\\right) {\\left(\\sin{\\theta}\\right)}^{2}\\\\[-.5ex]\n",
131-
"\\square{}_{\\phi}{}_{\\phi}{}^{\\theta}= & - \\frac{1}{2}\\sin\\left(2\\theta\\right)\\\\[-.5ex]\n",
132-
"\\square{}_{\\theta}{}_{\\theta}{}^{r}= & 2M-r\\\\[-.5ex]\n",
133-
"\\square{}_{t}{}_{t}{}^{r}= & M \\left(-2M+r\\right) {r}^{-3}\\\\[-.5ex]\n",
88+
"${}\\Gamma^{\\mu}\\,_{\\nu \\rho} = \\square{}_{\\nu}{}_{\\rho}{}^{\\mu}\\left\\{\\begin{aligned}\\square{}_{\\phi}{}_{r}{}^{\\phi}& = {r}^{-1}\\\\[-.5ex]\n",
89+
"\\square{}_{\\phi}{}_{\\theta}{}^{\\phi}& = {\\left(\\tan{\\theta}\\right)}^{-1}\\\\[-.5ex]\n",
90+
"\\square{}_{\\theta}{}_{r}{}^{\\theta}& = {r}^{-1}\\\\[-.5ex]\n",
91+
"\\square{}_{r}{}_{r}{}^{r}& = M {\\left(r \\left(2M-r\\right)\\right)}^{-1}\\\\[-.5ex]\n",
92+
"\\square{}_{t}{}_{r}{}^{t}& = M {\\left(r \\left(-2M+r\\right)\\right)}^{-1}\\\\[-.5ex]\n",
93+
"\\square{}_{r}{}_{\\phi}{}^{\\phi}& = {r}^{-1}\\\\[-.5ex]\n",
94+
"\\square{}_{\\theta}{}_{\\phi}{}^{\\phi}& = {\\left(\\tan{\\theta}\\right)}^{-1}\\\\[-.5ex]\n",
95+
"\\square{}_{r}{}_{\\theta}{}^{\\theta}& = {r}^{-1}\\\\[-.5ex]\n",
96+
"\\square{}_{r}{}_{t}{}^{t}& = M {\\left(r \\left(-2M+r\\right)\\right)}^{-1}\\\\[-.5ex]\n",
97+
"\\square{}_{\\phi}{}_{\\phi}{}^{r}& = \\left(2M-r\\right) {\\left(\\sin{\\theta}\\right)}^{2}\\\\[-.5ex]\n",
98+
"\\square{}_{\\phi}{}_{\\phi}{}^{\\theta}& = - \\frac{1}{2}\\sin\\left(2\\theta\\right)\\\\[-.5ex]\n",
99+
"\\square{}_{\\theta}{}_{\\theta}{}^{r}& = 2M-r\\\\[-.5ex]\n",
100+
"\\square{}_{t}{}_{t}{}^{r}& = M \\left(-2M+r\\right) {r}^{-3}\\\\[-.5ex]\n",
134101
"\\end{aligned}\\right.\n",
135102
"$"
136103
]
137104
},
138-
"execution_count": 3,
139105
"metadata": {},
140-
"output_type": "execute_result"
106+
"output_type": "display_data"
141107
}
142108
],
143109
"source": [
@@ -171,9 +137,8 @@
171137
"${}R^{\\rho}\\,_{\\sigma \\mu \\nu} = \\partial_{\\mu}{\\Gamma^{\\rho}\\,_{\\nu \\sigma}}-\\partial_{\\nu}{\\Gamma^{\\rho}\\,_{\\mu \\sigma}}+\\Gamma^{\\rho}\\,_{\\mu \\lambda} \\Gamma^{\\lambda}\\,_{\\nu \\sigma}-\\Gamma^{\\rho}\\,_{\\nu \\lambda} \\Gamma^{\\lambda}\\,_{\\mu \\sigma}$"
172138
]
173139
},
174-
"execution_count": 4,
175140
"metadata": {},
176-
"output_type": "execute_result"
141+
"output_type": "display_data"
177142
}
178143
],
179144
"source": [
@@ -191,37 +156,36 @@
191156
{
192157
"data": {
193158
"text/markdown": [
194-
"${}R^{\\rho}\\,_{\\sigma \\mu \\nu} = \\square{}_{\\nu}{}_{\\sigma}{}^{\\rho}{}_{\\mu}\\left\\{\\begin{aligned}\\square{}_{t}{}_{t}{}^{r}{}_{r}= & 2M \\left(2M-r\\right) {r}^{-4}\\\\[-.5ex]\n",
195-
"\\square{}_{\\theta}{}_{\\theta}{}^{r}{}_{r}= & -M {r}^{-1}\\\\[-.5ex]\n",
196-
"\\square{}_{\\phi}{}_{\\phi}{}^{\\theta}{}_{\\theta}= & 2M {\\left(\\sin{\\theta}\\right)}^{2} {r}^{-1}\\\\[-.5ex]\n",
197-
"\\square{}_{\\phi}{}_{\\phi}{}^{r}{}_{r}= & -M {\\left(\\sin{\\theta}\\right)}^{2} {r}^{-1}\\\\[-.5ex]\n",
198-
"\\square{}_{t}{}_{r}{}^{t}{}_{r}= & 2M {\\left({r}^{2} \\left(2M-r\\right)\\right)}^{-1}\\\\[-.5ex]\n",
199-
"\\square{}_{\\phi}{}_{\\theta}{}^{\\phi}{}_{\\theta}= & -2M {r}^{-1}\\\\[-.5ex]\n",
200-
"\\square{}_{r}{}_{t}{}^{r}{}_{t}= & 2M \\left(-2M+r\\right) {r}^{-4}\\\\[-.5ex]\n",
201-
"\\square{}_{r}{}_{\\theta}{}^{r}{}_{\\theta}= & M {r}^{-1}\\\\[-.5ex]\n",
202-
"\\square{}_{\\theta}{}_{\\phi}{}^{\\theta}{}_{\\phi}= & -2M {\\left(\\sin{\\theta}\\right)}^{2} {r}^{-1}\\\\[-.5ex]\n",
203-
"\\square{}_{r}{}_{\\phi}{}^{r}{}_{\\phi}= & M {\\left(\\sin{\\theta}\\right)}^{2} {r}^{-1}\\\\[-.5ex]\n",
204-
"\\square{}_{r}{}_{r}{}^{t}{}_{t}= & 2M {\\left({r}^{2} \\left(-2M+r\\right)\\right)}^{-1}\\\\[-.5ex]\n",
205-
"\\square{}_{r}{}_{r}{}^{\\theta}{}_{\\theta}= & M {\\left({r}^{2} \\left(2M-r\\right)\\right)}^{-1}\\\\[-.5ex]\n",
206-
"\\square{}_{\\theta}{}_{\\theta}{}^{\\phi}{}_{\\phi}= & 2M {r}^{-1}\\\\[-.5ex]\n",
207-
"\\square{}_{r}{}_{r}{}^{\\phi}{}_{\\phi}= & M {\\left({r}^{2} \\left(2M-r\\right)\\right)}^{-1}\\\\[-.5ex]\n",
208-
"\\square{}_{t}{}_{t}{}^{\\phi}{}_{\\phi}= & M \\left(-2M+r\\right) {r}^{-4}\\\\[-.5ex]\n",
209-
"\\square{}_{t}{}_{t}{}^{\\theta}{}_{\\theta}= & M \\left(-2M+r\\right) {r}^{-4}\\\\[-.5ex]\n",
210-
"\\square{}_{\\phi}{}_{\\phi}{}^{t}{}_{t}= & -M {\\left(\\sin{\\theta}\\right)}^{2} {r}^{-1}\\\\[-.5ex]\n",
211-
"\\square{}_{\\theta}{}_{\\theta}{}^{t}{}_{t}= & -M {r}^{-1}\\\\[-.5ex]\n",
212-
"\\square{}_{\\phi}{}_{r}{}^{\\phi}{}_{r}= & M {\\left({r}^{2} \\left(-2M+r\\right)\\right)}^{-1}\\\\[-.5ex]\n",
213-
"\\square{}_{\\phi}{}_{t}{}^{\\phi}{}_{t}= & M \\left(2M-r\\right) {r}^{-4}\\\\[-.5ex]\n",
214-
"\\square{}_{\\theta}{}_{r}{}^{\\theta}{}_{r}= & M {\\left({r}^{2} \\left(-2M+r\\right)\\right)}^{-1}\\\\[-.5ex]\n",
215-
"\\square{}_{\\theta}{}_{t}{}^{\\theta}{}_{t}= & M \\left(2M-r\\right) {r}^{-4}\\\\[-.5ex]\n",
216-
"\\square{}_{t}{}_{\\phi}{}^{t}{}_{\\phi}= & M {\\left(\\sin{\\theta}\\right)}^{2} {r}^{-1}\\\\[-.5ex]\n",
217-
"\\square{}_{t}{}_{\\theta}{}^{t}{}_{\\theta}= & M {r}^{-1}\\\\[-.5ex]\n",
159+
"${}R^{\\rho}\\,_{\\sigma \\mu \\nu} = \\square{}_{\\nu}{}_{\\sigma}{}^{\\rho}{}_{\\mu}\\left\\{\\begin{aligned}\\square{}_{t}{}_{t}{}^{r}{}_{r}& = 2M \\left(2M-r\\right) {r}^{-4}\\\\[-.5ex]\n",
160+
"\\square{}_{\\theta}{}_{\\theta}{}^{r}{}_{r}& = -M {r}^{-1}\\\\[-.5ex]\n",
161+
"\\square{}_{\\phi}{}_{\\phi}{}^{\\theta}{}_{\\theta}& = 2M {\\left(\\sin{\\theta}\\right)}^{2} {r}^{-1}\\\\[-.5ex]\n",
162+
"\\square{}_{\\phi}{}_{\\phi}{}^{r}{}_{r}& = -M {\\left(\\sin{\\theta}\\right)}^{2} {r}^{-1}\\\\[-.5ex]\n",
163+
"\\square{}_{t}{}_{r}{}^{t}{}_{r}& = 2M {\\left({r}^{2} \\left(2M-r\\right)\\right)}^{-1}\\\\[-.5ex]\n",
164+
"\\square{}_{\\phi}{}_{\\theta}{}^{\\phi}{}_{\\theta}& = -2M {r}^{-1}\\\\[-.5ex]\n",
165+
"\\square{}_{r}{}_{t}{}^{r}{}_{t}& = 2M \\left(-2M+r\\right) {r}^{-4}\\\\[-.5ex]\n",
166+
"\\square{}_{r}{}_{\\theta}{}^{r}{}_{\\theta}& = M {r}^{-1}\\\\[-.5ex]\n",
167+
"\\square{}_{\\theta}{}_{\\phi}{}^{\\theta}{}_{\\phi}& = -2M {\\left(\\sin{\\theta}\\right)}^{2} {r}^{-1}\\\\[-.5ex]\n",
168+
"\\square{}_{r}{}_{\\phi}{}^{r}{}_{\\phi}& = M {\\left(\\sin{\\theta}\\right)}^{2} {r}^{-1}\\\\[-.5ex]\n",
169+
"\\square{}_{r}{}_{r}{}^{t}{}_{t}& = 2M {\\left({r}^{2} \\left(-2M+r\\right)\\right)}^{-1}\\\\[-.5ex]\n",
170+
"\\square{}_{r}{}_{r}{}^{\\theta}{}_{\\theta}& = M {\\left({r}^{2} \\left(2M-r\\right)\\right)}^{-1}\\\\[-.5ex]\n",
171+
"\\square{}_{\\theta}{}_{\\theta}{}^{\\phi}{}_{\\phi}& = 2M {r}^{-1}\\\\[-.5ex]\n",
172+
"\\square{}_{r}{}_{r}{}^{\\phi}{}_{\\phi}& = M {\\left({r}^{2} \\left(2M-r\\right)\\right)}^{-1}\\\\[-.5ex]\n",
173+
"\\square{}_{t}{}_{t}{}^{\\phi}{}_{\\phi}& = M \\left(-2M+r\\right) {r}^{-4}\\\\[-.5ex]\n",
174+
"\\square{}_{t}{}_{t}{}^{\\theta}{}_{\\theta}& = M \\left(-2M+r\\right) {r}^{-4}\\\\[-.5ex]\n",
175+
"\\square{}_{\\phi}{}_{\\phi}{}^{t}{}_{t}& = -M {\\left(\\sin{\\theta}\\right)}^{2} {r}^{-1}\\\\[-.5ex]\n",
176+
"\\square{}_{\\theta}{}_{\\theta}{}^{t}{}_{t}& = -M {r}^{-1}\\\\[-.5ex]\n",
177+
"\\square{}_{\\phi}{}_{r}{}^{\\phi}{}_{r}& = M {\\left({r}^{2} \\left(-2M+r\\right)\\right)}^{-1}\\\\[-.5ex]\n",
178+
"\\square{}_{\\phi}{}_{t}{}^{\\phi}{}_{t}& = M \\left(2M-r\\right) {r}^{-4}\\\\[-.5ex]\n",
179+
"\\square{}_{\\theta}{}_{r}{}^{\\theta}{}_{r}& = M {\\left({r}^{2} \\left(-2M+r\\right)\\right)}^{-1}\\\\[-.5ex]\n",
180+
"\\square{}_{\\theta}{}_{t}{}^{\\theta}{}_{t}& = M \\left(2M-r\\right) {r}^{-4}\\\\[-.5ex]\n",
181+
"\\square{}_{t}{}_{\\phi}{}^{t}{}_{\\phi}& = M {\\left(\\sin{\\theta}\\right)}^{2} {r}^{-1}\\\\[-.5ex]\n",
182+
"\\square{}_{t}{}_{\\theta}{}^{t}{}_{\\theta}& = M {r}^{-1}\\\\[-.5ex]\n",
218183
"\\end{aligned}\\right.\n",
219184
"$"
220185
]
221186
},
222-
"execution_count": 5,
223187
"metadata": {},
224-
"output_type": "execute_result"
188+
"output_type": "display_data"
225189
}
226190
],
227191
"source": [
@@ -248,19 +212,17 @@
248212
"${}R_{\\sigma \\nu} = R^{\\rho}\\,_{\\sigma \\rho \\nu}$"
249213
]
250214
},
251-
"execution_count": 6,
252215
"metadata": {},
253-
"output_type": "execute_result"
216+
"output_type": "display_data"
254217
},
255218
{
256219
"data": {
257220
"text/markdown": [
258221
"${}R_{\\sigma \\nu} = 0$"
259222
]
260223
},
261-
"execution_count": 6,
262224
"metadata": {},
263-
"output_type": "execute_result"
225+
"output_type": "display_data"
264226
}
265227
],
266228
"source": [
@@ -287,9 +249,8 @@
287249
"${}K = R^{\\mu}\\,_{\\nu \\rho \\sigma} R^{\\lambda}\\,_{\\kappa \\gamma \\chi} g_{\\mu \\lambda} g^{\\nu \\kappa} g^{\\rho \\gamma} g^{\\sigma \\chi}$"
288250
]
289251
},
290-
"execution_count": 7,
291252
"metadata": {},
292-
"output_type": "execute_result"
253+
"output_type": "display_data"
293254
}
294255
],
295256
"source": [
@@ -308,9 +269,8 @@
308269
"${}K = 48{M}^{2} {r}^{-6}$"
309270
]
310271
},
311-
"execution_count": 8,
312272
"metadata": {},
313-
"output_type": "execute_result"
273+
"output_type": "display_data"
314274
}
315275
],
316276
"source": [
@@ -335,15 +295,16 @@
335295
],
336296
"metadata": {
337297
"kernelspec": {
338-
"display_name": "Cadabra",
298+
"display_name": "Cadabra2",
339299
"language": "python",
340-
"name": "cadabra"
300+
"name": "cadabra2"
341301
},
342302
"language_info": {
343-
"file_extension": ".cdb",
344-
"mimetype": "text/cadabra",
345-
"name": "cadabra",
346-
"version": "2.0.0"
303+
"codemirror_mode": "python",
304+
"file_extension": ".ipynb",
305+
"mimetype": "text/python",
306+
"name": "cadabra2",
307+
"pygments_lexer": "python"
347308
}
348309
},
349310
"nbformat": 4,

frontend/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ project(Cadabra)
66
# Preamble.
77
#---------------------------------------------------------------------------
88

9-
print_header("Configuring frontend")
9+
print_header("Configuring native notebook frontend")
1010

1111
set(INSTALL_LATEX_DIR "${CMAKE_INSTALL_PREFIX}/share/cadabra2/latex")
1212
set(INSTALL_MAN_DIR "${CMAKE_INSTALL_PREFIX}/share/cadabra2/manual")

jupyterkernel/CMakeLists.txt

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,9 @@
11
cmake_minimum_required(VERSION ${CADABRA_CMAKE_VERSION})
22
project(Cadabra)
33

4-
print_header("Configuring pure-Python Jupyter kernel")
54

6-
if(PYTHON_POSTFIX MATCHES 3)
7-
message(STATUS "Python version 3.")
8-
else()
9-
message(STATUS "Cannot build pure-Python Cadabra Jupyter kernel with Python version 2.")
10-
return()
5+
if(PYTHON_POSTFIX MATCHES 2)
6+
message(FATAL "Cannot build pure-Python Cadabra Jupyter kernel with Python version 2.")
117
endif()
128

139
configure_file(

jupyterkernel/cadabra2_jupyter/kernel.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ class CadabraJupyterKernel(ipykernel.kernelbase.Kernel):
2121

2222
@property
2323
def banner(self):
24-
return "Info at http://cadabra.science/\nAvailable under the terms of the GNU General Public License v3"
24+
return "Cadabra (C) 2001-2020 Kasper Peeters\nJupyter kernel by Fergus Baker\nMore info at https://cadabra.science/\nAvailable under the terms of the GNU General Public License v3"
2525

2626
def __init__(self, **kwargs):
2727
ipykernel.kernelbase.Kernel.__init__(self, **kwargs)

jupyterkernel/cadabra2_jupyter/server.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ def __init__(self, kernel_instance):
55
def send(self, data, typestr, parent_id, last_in_sequence):
66
if typestr == "latex_view":
77
data = data.replace("\\begin{dmath*}", "$").replace("\\end{dmath*}", "$")
8+
data = data.replace("\\discretionary{}{}{}", "").replace("~","")
89
self._kernel._send_result(data)
910
elif typestr == "image_png":
1011
# todo

web2/cadabra2/source/changelog.html

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,9 @@ <h3>2.3.0 (released 10-Jun-2020)</h3>
5858
<li>Various fixes for behaviour of <tt>unwrap</tt> with anti- or
5959
non-commuting arguments.</li>
6060
<li>New <tt>meld</tt> algorithm for canonicalisation (Dominic).</li>
61+
<li>New Jupyter kernel (enabled by default) which does not require
62+
Xeus; you can now get access to Cadabra on Jupyter on all supported
63+
systems, not just Conda (Fergus).</li>
6164
</ul>
6265

6366
<a name="2.2.8"></a>

web2/cadabra2/source/people.html

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -20,12 +20,13 @@ <h2>Acknowledgements</h2>
2020
factoring code), Dominic Price (for the conversion to pybind, the
2121
Windows port and the logic that enables importing notebooks into other
2222
notebooks), Connor Behan (for patches to improve trace operators and
23-
various other parts), Leo Brewin (for writing beautiful tutorials),
24-
Mattia Scomparin (for contributing tutorial notebooks) the Software
25-
Sustainability Institute and the Institute of Advanced Study (for
26-
financial support). Thanks to the many people who have sent me bug
27-
reports (keep 'm coming), and thanks to all of you who use Cadabra,
28-
sent feedback or cited the Cadabra papers.
23+
various other parts), Fergus Baker (for the new Jupyter kernel), Leo
24+
Brewin (for writing beautiful tutorials), Mattia Scomparin (for
25+
contributing tutorial notebooks) the Software Sustainability Institute
26+
and the Institute of Advanced Study (for financial support). Thanks to
27+
the many people who have sent me bug reports (keep 'm coming), and
28+
thanks to all of you who use Cadabra, sent feedback or cited the
29+
Cadabra papers.
2930
</p>
3031
<p>
3132
The name Cadabra is an implicit acknowledgement to

0 commit comments

Comments
 (0)