Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Configure GitHub Codespace #297

Merged
merged 4 commits into from
Nov 29, 2022
Merged

Configure GitHub Codespace #297

merged 4 commits into from
Nov 29, 2022

Conversation

janosh
Copy link
Member

@janosh janosh commented Nov 28, 2022

This PR makes the example apps table in the readme more useful. Before we only had links to the app scripts. This PR adds a "Launch Codespace" button next to each example which opens the CT repo in a GitHub Codespace and auto-installs it along with deps. The goal is to make it easier for beginners to start using CT by automating the setup as much as possible. Ideally they have to click a link from the readme, wait for the Codespace to spin up and then invoke a python command to launch the example app of their choosing (with hot reloading of code changes btw, making it a nice playground to start tinkering).

Just tried it out and seems to be working! I assume this was made easier by @tschaume's setup refactoring in #292 so thanks for that. 👍

Here's the basic_hello_world.py example app running in a browser inside a codespace running in the browser... Let the web inception begin. 😄

Screenshot 2022-11-28 at 14 52 53

Readme examples table

Screenshot 2022-11-28 at 15 02 01

@janosh
Copy link
Member Author

janosh commented Nov 28, 2022

@mkhorton In case you give this a try, would be curious to hear if it works for you. I was getting some errors from the structure examples but I think they were actual CT errors (StructureGraph missing method get_scene()), not due to the Codespace config.

@janosh janosh changed the title Codespace Configure GitHub Codespace Nov 29, 2022
@janosh janosh added the docs Documentation, examples, user guides label Nov 29, 2022
dscribe was the cause of install errors in `pip install .[server]` causing codespace spin up to fail
@janosh
Copy link
Member Author

janosh commented Nov 29, 2022

Dropping dscribe from optional deps set 'server' since it hasn't been an essential dep since #270 and was causing pip install .[server] to fail, leading to non-functional codespaces.

@janosh janosh merged commit f21aa59 into main Nov 29, 2022
@janosh janosh deleted the codespace branch November 29, 2022 23:23
@mkhorton
Copy link
Member

@janosh this is a great idea, works wonderfully in Chrome :)

Some terminal output not displayed in Safari which leads to unexpected behaviour, but I assume this is not our issue. There's a delay in the dependencies being installed and available when launching the Codespace which wasn't immediately obvious. Overall really nice for demos however, I can definitely see myself recommending this to others!

The earlier error you saw was due to a refactor last week, that was now fixed in #296

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs Documentation, examples, user guides
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants