forked from dagster-io/dagster
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1 from dagster-io/master
Update forked repository.
- Loading branch information
Showing
326 changed files
with
17,417 additions
and
9,326 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
FROM gitpod/workspace-full | ||
|
||
USER gitpod | ||
|
||
# Install wxPython dependencies | ||
RUN sudo apt-get -q update | ||
|
||
ENV DAGSTER_HOME="$HOME/dagster_home" | ||
RUN mkdir -p $DAGSTER_HOME |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
image: | ||
file: .gitpod.Dockerfile | ||
|
||
# This will expose all necessary ports needed for your VNC image | ||
ports: | ||
- port: 3000 | ||
onOpen: open-preview | ||
|
||
tasks: | ||
- command: | | ||
cd examples/$EXAMPLE | ||
pip3 install -r requirements.txt | ||
[ -e README.md ] && gp open README.md | ||
clear && dagit | ||
- openMode: split-right | ||
command: echo SplitTerminal && clear |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
--- | ||
title: {{EXAMPLE_NAME}} | ||
description: Fill in a description | ||
--- | ||
|
||
# {{EXAMPLE_NAME}} | ||
|
||
Description of example goes here | ||
|
||
# Open in Playground | ||
|
||
Open up this example in a playground using [Gitpod](https://gitpod.io) | ||
|
||
[![Open in Gitpod](https://gitpod.io/button/open-in-gitpod.svg)](https://gitpod.io/#EXAMPLE={{EXAMPLE_NAME}}/https://github.com/dagster-io/dagster) | ||
|
||
# Download Manually | ||
|
||
Download the example: | ||
|
||
``` | ||
curl https://codeload.github.com/dagster-io/dagster/tar.gz/master | tar -xz --strip=2 dagster-master/examples/{{EXAMPLE_NAME}} | ||
cd dep_dsl | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
from dagster import RepositoryDefinition, pipeline, solid | ||
|
||
|
||
@solid | ||
def hello(_): | ||
return 1 | ||
|
||
|
||
@pipeline | ||
def my_pipeline(): | ||
hello() | ||
|
||
|
||
def define_repository(): | ||
return RepositoryDefinition("{{EXAMPLE_NAME}}", pipeline_defs=[my_pipeline]) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
repository: | ||
file: repo.py | ||
fn: define_repository |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
dagster | ||
dagit |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
#!/usr/bin/env python3 | ||
|
||
""" | ||
To use, run | ||
python bin/create_example.py --name example_name | ||
""" | ||
from __future__ import absolute_import | ||
|
||
import os | ||
import shutil | ||
import sys | ||
|
||
import click | ||
|
||
BASE_PATH = os.path.dirname(os.path.realpath(__file__)) | ||
sys.path.insert(0, BASE_PATH) | ||
|
||
from git_utils import get_most_recent_git_tag # isort:skip | ||
|
||
|
||
def copy_directory(src, dest): | ||
try: | ||
shutil.copytree(src, dest, ignore=shutil.ignore_patterns('.DS_Store')) | ||
# Directories are the same | ||
except shutil.Error as e: | ||
print('Directory not copied. Error: %s' % e) | ||
# Any error saying that the directory doesn't exist | ||
except OSError as e: | ||
print('Directory not copied. Error: %s' % e) | ||
|
||
|
||
@click.command() | ||
@click.option('--name', prompt='Name of library', help='Name of library') | ||
def main(name): | ||
template_library_path = os.path.abspath('bin/assets/dagster-example-tmpl') | ||
new_template_library_path = os.path.abspath('examples/{name}'.format(name=name)) | ||
|
||
if os.path.exists(new_template_library_path): | ||
raise click.UsageError('Example with name {name} already exists'.format(name=name)) | ||
|
||
copy_directory(template_library_path, new_template_library_path) | ||
|
||
version = get_most_recent_git_tag() | ||
|
||
for dname, _, files in os.walk(new_template_library_path): | ||
for fname in files: | ||
fpath = os.path.join(dname, fname) | ||
with open(fpath) as f: | ||
s = f.read() | ||
s = s.replace('{{EXAMPLE_NAME}}', name) | ||
s = s.replace('{{VERSION}}', version) | ||
with open(fpath, 'w') as f: | ||
f.write(s) | ||
|
||
new_fname = fname.replace('.tmpl', '') | ||
new_fpath = os.path.join(dname, new_fname) | ||
shutil.move(fpath, new_fpath) | ||
print('Created {path}'.format(path=new_fpath)) | ||
|
||
new_dname = dname.replace('example-tmpl', name) | ||
shutil.move(dname, new_dname) | ||
|
||
print('Example created at {path}'.format(path=new_template_library_path)) | ||
|
||
|
||
if __name__ == "__main__": | ||
main() # pylint: disable=no-value-for-parameter |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.