From 323571ebd17bfcaeb95573e49437750a9bf0271d Mon Sep 17 00:00:00 2001 From: Maxime Beauchemin Date: Tue, 14 Oct 2014 14:55:41 -0700 Subject: [PATCH] Minor touchups --- dags/examples/hourly.py | 2 +- docs/installation.rst | 25 ++++++++++++++++++++++--- flux/models.py | 12 ++++++------ flux/operators/mysql_operator.py | 1 - requirements.txt | 1 + 5 files changed, 30 insertions(+), 11 deletions(-) diff --git a/dags/examples/hourly.py b/dags/examples/hourly.py index ff2e725b8c546..91fa081399a89 100644 --- a/dags/examples/hourly.py +++ b/dags/examples/hourly.py @@ -4,7 +4,7 @@ default_args = { 'owner': 'max', - 'start_date': datetime(2014, 10, 1), + 'start_date': datetime(2014, 10, 12), 'schedule_interval': timedelta(hours=1), 'mysql_dbid': 'local_mysql', } diff --git a/docs/installation.rst b/docs/installation.rst index 365bd797b422d..8e21f6adbfd6a 100644 --- a/docs/installation.rst +++ b/docs/installation.rst @@ -12,13 +12,30 @@ Debian packages sudo apt-get install libmysqlclient-dev mysql-server sudo apt-get g++ -Required environment variable, add this to your .bashrc -''''''''''''''''''''''''''''''''''''''''''''''''''''''' +Mac setup +''''''''''''''' + +:: + + # Install mysql + brew install mysql + # Start mysql + mysql.server start + + # Install python package managers + sudo easy_install pip + sudo pip install virtualenv + + +Required environment variable, add this to your .bashrc or .bash_profile +'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' :: export FLUX_HOME=~/Flux export PATH=$PATH:$FLUX_HOME/flux/bin + # also run it, or source it, or start a new shell + source ~/.bashrc Create a python virtualenv '''''''''''''''''''''''''' @@ -44,8 +61,10 @@ fine. :: + # If : $ mysql -u root -p - mysql> CREATE DATABASE flux; + mysql> + CREATE DATABASE flux; CREATE USER 'flux'@'localhost' IDENTIFIED BY 'flux'; GRANT ALL PRIVILEGES ON flux.* TO 'flux'@'localhost'; diff --git a/flux/models.py b/flux/models.py index ef9e1be1fffc6..122cab4f9322e 100644 --- a/flux/models.py +++ b/flux/models.py @@ -190,7 +190,7 @@ def command( force=False, pickle=None): """ - Returns a command that can be executed anywhere where flux is + Returns a command that can be executed anywhere where flux is installed. This command is part of the message sent to executors by the orchestrator. """ @@ -472,7 +472,7 @@ def __init__(self, event, task_instance): class BaseJob(Base): """ Abstract class to be derived for jobs. Jobs are processing items with state - and duration that aren't task instances. For instance a BackfillJob is + and duration that aren't task instances. For instance a BackfillJob is a collection of task instance runs, but should have it's own state, start and end time. """ @@ -762,7 +762,7 @@ def get_flat_relatives(self, upstream=False): def detect_downstream_cycle(self, task=None): """ - When invoked, this routine will raise an exception if a cycle is + When invoked, this routine will raise an exception if a cycle is detected downstream from self. It is invoked when tasks are added to the DAG to detect cycles. """ @@ -794,7 +794,7 @@ def run( def get_direct_relatives(self, upstream=False): """ - Get the direct relatives to the current task, upstream or + Get the direct relatives to the current task, upstream or downstream. """ if upstream: @@ -961,8 +961,8 @@ def sub_dag( self, task_regex, include_downstream=False, include_upstream=True): """ - Returns a subset of the current dag as a deep copy of the current dag - based on a regex that should match one or many tasks, and includes + Returns a subset of the current dag as a deep copy of the current dag + based on a regex that should match one or many tasks, and includes upstream and downstream neighboors based on the flag passed. """ dag = copy.deepcopy(self) diff --git a/flux/operators/mysql_operator.py b/flux/operators/mysql_operator.py index e0e05ef551e73..89fccbb414402 100644 --- a/flux/operators/mysql_operator.py +++ b/flux/operators/mysql_operator.py @@ -18,7 +18,6 @@ def __init__(self, sql, mysql_dbid, *args, **kwargs): Parameters: mysql_dbid: reference to a specific mysql database sql: the sql code you to be executed - """ super(MySqlOperator, self).__init__(*args, **kwargs) diff --git a/requirements.txt b/requirements.txt index 7ceccd78bc97c..cf5c16a576ba5 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,4 +1,5 @@ chartkick +flake8 flask flask-admin flask-bootstrap