diff --git a/conf.py b/conf.py index 11f196c..2f644f0 100644 --- a/conf.py +++ b/conf.py @@ -1,3 +1,4 @@ +"""Setup for pip.""" # Configuration file for the Sphinx documentation builder. # # This file only contains a selection of the most common options. For a full @@ -27,11 +28,10 @@ # Add any Sphinx extension module names here, as strings. They can be # extensions coming with Sphinx (named 'sphinx.ext.*') or your custom # ones. -#extensions = [ -#] -#extensions = ['sphinx.ext.autodoc'] +# extensions = [] +# extensions = ['sphinx.ext.autodoc'] extensions = ['sphinx.ext.autodoc', 'sphinx.ext.doctest', 'sphinx.ext.intersphinx', - 'sphinx.ext.todo', 'sphinx.ext.viewcode', 'sphinx.ext.imgmath', + 'sphinx.ext.todo', 'sphinx.ext.viewcode', 'sphinx.ext.imgmath', 'sphinx.ext.ifconfig', 'sphinx.ext.imgconverter', 'sphinx.ext.napoleon'] # Add any paths that contain templates here, relative to this directory. @@ -48,7 +48,7 @@ # The theme to use for HTML and HTML Help pages. See the documentation for # a list of builtin themes. # -#html_theme = 'alabaster' +# html_theme = 'alabaster' html_theme = 'default' # Add any paths that contain custom static files (such as style sheets) here, diff --git a/scheduler/__init__.py b/scheduler/__init__.py index e96ddab..e70f094 100644 --- a/scheduler/__init__.py +++ b/scheduler/__init__.py @@ -1,6 +1,22 @@ +"""Scheduler module.""" __version__ = "0.0.1a4" -from .scheduler import * -from .submission import * -from .suites import * -from .cli import * +from .scheduler import Server, EcflowServer, EcflowServerFromFile, EcflowLogServer, EcflowClient, \ + EcflowTask +from .submission import SlurmSubmission, BackgroundSubmission, BatchSubmission, \ + GridEngineSubmission, PBSSubmission, SubmitException, TaskSettings, EcflowSubmitTask, \ + KillException, StatusException, get_submission_object +from .suites import EcflowSuite, EcflowSuiteFamily, EcflowSuiteTask, EcflowSuiteTrigger, \ + EcflowSuiteTriggers, EcflowSuiteVariable, SuiteDefinition +from .cli import parse_kill_cmd, parse_status_cmd, parse_submit_cmd, kill_cmd, status_cmd, \ + submit_cmd + + +__all__ = ["Server", "EcflowServer", "EcflowServerFromFile", "EcflowLogServer", "EcflowClient", + "EcflowTask", "SlurmSubmission", "BackgroundSubmission", "BatchSubmission", + "GridEngineSubmission", "PBSSubmission", "SubmitException", "TaskSettings", + "EcflowSubmitTask", "KillException", "StatusException", "get_submission_object", + "EcflowSuite", "EcflowSuiteFamily", "EcflowSuiteTask", "EcflowSuiteTrigger", + "EcflowSuiteTriggers", "EcflowSuiteVariable", "SuiteDefinition", "parse_kill_cmd", + "parse_status_cmd", "parse_submit_cmd", "kill_cmd", "status_cmd", "submit_cmd" + ] diff --git a/scheduler/submission.py b/scheduler/submission.py index e4c03cf..3e19c90 100644 --- a/scheduler/submission.py +++ b/scheduler/submission.py @@ -316,7 +316,7 @@ def __init__(self, msg, task, task_settings): task (scheduler.EcflowTask): Task. task_settings (TaskSettings): Task settings. """ - Exception.__init__() + Exception().__init__() logfile = task.create_submission_log(task_settings.joboutdir) with open(logfile, mode="a", encoding="utf-8") as file_handler: file_handler.write(msg) @@ -336,7 +336,7 @@ def __init__(self, msg, task, task_settings): task (scheduler.EcflowTask): Task. task_settings (TaskSettings): Task settings. """ - Exception.__init__() + Exception().__init__() logfile = task.create_kill_log(task_settings.joboutdir) with open(logfile, mode="a", encoding="utf-8") as file_handler: file_handler.write(msg) @@ -357,7 +357,7 @@ def __init__(self, msg, task, task_settings): task_settings (TaskSettings): Task settings """ - Exception.__init__() + Exception().__init__() # joboutdir = task.joboutdir logfile = task.create_status_log(task_settings.joboutdir) with open(logfile, mode="a", encoding="utf-8") as file_handler: diff --git a/setup.py b/setup.py index e641d72..a8d2c96 100644 --- a/setup.py +++ b/setup.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +"""Setup for pip.""" # -*- coding: utf-8 -*- from setuptools import setup, find_packages @@ -15,11 +15,13 @@ def read(rel_path): + """Read file.""" with open(path.join(here, rel_path), 'r') as fp: return fp.read() def get_version(rel_path): + """Get version number from file.""" for line in read(rel_path).splitlines(): if line.startswith('__version__'): delim = '"' if '"' in line else "'"