galaxyproject / galaxyproject/training-material

[feature request] investigate using codapi

Open
#5,626 0 comments 1 reaction 0 assignees View on GitHub
Dominant language
HTML
Stars
367
Forks
1.1k
Avg merge
16h 27m
Merged PRs (30d)
49

Description

the UX is pretty decent (ignore the not actually fibbonaci function, it's just an example) but by adding a `` block after ever `pre` we can get runnable code.

This would work nicely for python and SQL tutorials potentially.

````markdown
```python
def fib(n):
if n < 2:
return 1
else:
return n + fib(n - 1)

print(fib(10))
```


````

produces

![Screenshot 2024-12-09 at 15-00-44 Debugging](https://github.com/user-attachments/assets/3cf7da6f-fe96-4c74-a956-e38ec4b23d24)

with the benefit that it's directly in-page editable. we'd need to see about [sharing state between the different boxes](https://github.com/nalgeon/codapi-js/blob/main/docs/code-cells.md).

it's an idea. the jupylite experience kinda sucks, and this'd be better by far.

Contributor guide

Open the contributing guide

Research direction

Start by reviewing the codapi-js code-cells documentation linked in the issue and the proposed markup after Markdown pre blocks. Check how this could apply to Python and SQL tutorials, including whether state can be shared between boxes. Done means the integration approach, affected tutorial rendering path, and state-sharing behavior are defined.

Written by the indexing model from the issue text.

Assessment

Tech stack
html, markdown, python, sql
Domain
documentation
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.