Skip to content

Commit 6cf5e5a

Browse files
authored
v0.28.3 (#1122)
1 parent 717318c commit 6cf5e5a

File tree

3 files changed

+21
-6
lines changed

3 files changed

+21
-6
lines changed

CHANGELOG.md

+9-1
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,13 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
66

77
## Unreleased
88

9+
## [0.28.3] - 2024-10-22
10+
11+
### Fixed
12+
13+
- `seaborn` document patch (#1122)
14+
- Clearing `matplotlib` and `seaborn` plots at the end of each code run (#1122)
15+
916
## [0.28.2] - 2024-10-22
1017

1118
### Fixed
@@ -928,7 +935,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
928935

929936
- Events in Web Component indicating whether Mission Zero criteria have been met (#113)
930937

931-
[unreleased]: https://github.com/RaspberryPiFoundation/editor-ui/compare/v0.28.2...HEAD
938+
[unreleased]: https://github.com/RaspberryPiFoundation/editor-ui/compare/v0.28.3...HEAD
939+
[0.28.3]: https://github.com/RaspberryPiFoundation/editor-ui/releases/tag/v0.28.3
932940
[0.28.2]: https://github.com/RaspberryPiFoundation/editor-ui/releases/tag/v0.28.2
933941
[0.28.1]: https://github.com/RaspberryPiFoundation/editor-ui/releases/tag/v0.28.1
934942
[0.28.0]: https://github.com/RaspberryPiFoundation/editor-ui/releases/tag/v0.28.0

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@raspberrypifoundation/editor-ui",
3-
"version": "0.28.2",
3+
"version": "0.28.3",
44
"private": true,
55
"dependencies": {
66
"@apollo/client": "^3.7.8",

src/PyodideWorker.js

+11-4
Original file line numberDiff line numberDiff line change
@@ -260,7 +260,12 @@ const PyodideWorker = () => {
260260
return;
261261
}
262262
},
263-
after: () => {},
263+
after: () => {
264+
pyodide.runPython(`
265+
import matplotlib.pyplot as plt
266+
plt.clf()
267+
`);
268+
},
264269
},
265270
seaborn: {
266271
before: async () => {
@@ -270,12 +275,12 @@ const PyodideWorker = () => {
270275
pyodide.runPython(`
271276
import js
272277
273-
class DummyDocument:
278+
class __DummyDocument__:
274279
def __init__(self, *args, **kwargs) -> None:
275280
return
276281
def __getattr__(self, __name: str):
277-
return DummyDocument
278-
js.document = DummyDocument()
282+
return __DummyDocument__
283+
js.document = __DummyDocument__()
279284
`);
280285

281286
// Ensure micropip is loaded which can fetch packages from PyPi.
@@ -308,6 +313,8 @@ const PyodideWorker = () => {
308313
plt.savefig(bytes_io, format='jpg')
309314
bytes_io.seek(0)
310315
basthon.kernel.display_event({ "display_type": "matplotlib", "content": bytes_io.read() })
316+
317+
plt.clf()
311318
`);
312319
},
313320
},

0 commit comments

Comments
 (0)