Skip to content

Commit

Permalink
Pep and flake compliant
Browse files Browse the repository at this point in the history
  • Loading branch information
trygveasp committed Aug 8, 2022
1 parent 4f93fd5 commit c80006a
Show file tree
Hide file tree
Showing 4 changed files with 31 additions and 13 deletions.
10 changes: 5 additions & 5 deletions 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
Expand Down Expand Up @@ -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.
Expand All @@ -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,
Expand Down
24 changes: 20 additions & 4 deletions 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"
]
6 changes: 3 additions & 3 deletions scheduler/submission.py
Expand Up @@ -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)
Expand All @@ -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)
Expand All @@ -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:
Expand Down
4 changes: 3 additions & 1 deletion setup.py
@@ -1,4 +1,4 @@
#!/usr/bin/env python
"""Setup for pip."""
# -*- coding: utf-8 -*-

from setuptools import setup, find_packages
Expand All @@ -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 "'"
Expand Down

0 comments on commit c80006a

Please sign in to comment.