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

Adding a devcontainer.json and a button for easy codespacing #1

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 33 additions & 0 deletions .devcontainer/GETTING-STARTED.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# Getting Started with Dagster and GitHub Codespaces

## Running Dagster

To run Dagster, navigate to the Terminal tab below and run `dagster dev`. Your Dagster instance will start up.

To get to the Dagster UI, navigate to the Ports tab next to the Terminal tab, hover over the Local Address in row for port 3000, and click on the globe icon to open it in a new tab.

![the ports tab in GitHub Codespaces](./preview-icons.png)

This codespace comes with all of Dagster's Python dependencies pre-installed, along with any dependencies found in `setup.py`.

> **Note**
> If you're feeling fancy, you can also click on the two-panel icon next to the globe icon to open the Dagster UI in a split pane view within GitHub Codespaces.

## What is GitHub Codespaces?

GitHub Codespaces is a cloud-hosted IDE. It's a fully-featured version of Visual Studio Code connected to your GitHub account.

Saving your code will be stored across Codespace sessions. You'll also be able to commit and raise pull requests from within the IDE.

Refer to the Codespaces [documentation](https://docs.github.com/en/codespaces) to learn more.

## Pricing and turning off your Codespace

Keeping Dagster running in a Codespace will keep the Codespace running. Remember to turn off your Codespace when you're done to prevent exceding your free hours.

The 2-Core version of GitHub Codespaces are free for up to 60 hours a month.

You can turn off your Codespace by opening the Command Palette and running `Stop Current Codespace` from within the IDE, or from [the Codespaces page](www.github.com/codespaces).

> **Warning**
> As a reminder, leaving Dagster running will prevent your Codespace from turning off automatically. To read more about this, see [this GitHub Docs article](https://docs.github.com/en/codespaces/developing-in-codespaces/stopping-and-starting-a-codespace).
28 changes: 28 additions & 0 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
// For format details, see https://aka.ms/devcontainer.json. For config options, see the
// README at: https://github.com/devcontainers/templates/tree/main/src/python
{
"name": "Python 3",
// Or use a Dockerfile or Docker Compose file. More info: https://containers.dev/guide/dockerfile
"image": "mcr.microsoft.com/devcontainers/python:0-3.9",

// Features to add to the dev container. More info: https://containers.dev/features.
// "features": {},

// Use 'forwardPorts' to make a list of ports inside the container available locally.
"forwardPorts": [3000],

// Use 'postCreateCommand' to run commands after the container is created.
"updateContentCommand": "mkdir /workspaces/.dagster && pip install -e \".[dev]\"",

// Configure tool-specific properties.
"customizations": {
"codespaces": {
"openFiles": [
".devcontainer/GETTING-STARTED.md"
]
}
}

// Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root.
// "remoteUser": "root"
}
Binary file added .devcontainer/preview-icons.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# Population Analysis
# Population Analysis [![Open in GitHub Codespaces](https://github.com/codespaces/badge.svg)](https://github.com/codespaces/new?hide_repo_select=true&ref=main&repo=602216386)

Collection of Dagster assets and jobs which represent and forecast population growth.