Commit ab05fbd8 authored by Michael Salim's avatar Michael Salim
Browse files

major reorganization; added setuptools and sphinx docs folder

parent 75d8ac3b
......@@ -3,7 +3,7 @@ import os
import sys
if __name__ == "__main__":
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "argobalsam.settings")
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "django_config.settings")
from django.core.management import execute_from_command_line
......
# These must come before any other imports
import django
import os
os.environ['DJANGO_SETTINGS_MODULE'] = 'argobalsam.settings'
os.environ['DJANGO_SETTINGS_MODULE'] = 'balsam.django_config.settings'
django.setup()
# --------------
import argparse
import sys
from cli_commands import newapp,newjob,newdep,ls,modify,rm,qsub
from cli_commands import kill,mkchild,launcher,service,make_dummies
from balsam.scripts.cli_commands import newapp,newjob,newdep,ls,modify,rm,qsub
from balsam.scripts.cli_commands import kill,mkchild,launcher,service,make_dummies
from django.conf import settings
def main():
......
......@@ -3,12 +3,12 @@ import subprocess
import sys
from django.conf import settings
import balsam.models
from balsamlauncher import dag
import ls_commands as lscmd
from balsam.service import models
from balsam.launcher import dag
import balsam.scripts.ls_commands as lscmd
Job = balsam.models.BalsamJob
AppDef = balsam.models.ApplicationDefinition
Job = models.BalsamJob
AppDef = models.ApplicationDefinition
def cmd_confirmation(message=''):
confirm = ''
......@@ -237,7 +237,7 @@ def mkchild(args):
def launcher(args):
daemon = args.daemon
from importlib.util import find_spec
fname = find_spec("balsamlauncher.launcher").origin
fname = find_spec("balsam.launcher.launcher").origin
original_args = sys.argv[2:]
command = [sys.executable] + [fname] + original_args
print("Starting Balsam launcher")
......@@ -260,7 +260,7 @@ def make_dummies(args):
job.workflow = 'dummy'
job.allowed_work_sites = settings.BALSAM_SITE
job.wall_time_minutes = 1
job.wall_time_minutes = 0
job.num_nodes = 1
job.processes_per_node = 1
job.threads_per_rank = 1
......
import balsam.models
Job = balsam.models.BalsamJob
AppDef = balsam.models.ApplicationDefinition
from balsam.service import models
Job = models.BalsamJob
AppDef = models.ApplicationDefinition
def print_history(jobs):
for job in jobs:
......
from common import Serializer
from balsam.common import Serializer
class BalsamJobMessage:
''' This is the template for the messages passed to Balsam to create a job '''
......@@ -31,4 +31,4 @@ class BalsamJobMessage:
def deserialize(text):
m = BalsamJobMessage()
m.__dict__ = Serializer.deserialize(text)
return m
\ No newline at end of file
return m
import logging,sys,os
logger = logging.getLogger(__name__)
from common import MessageReceiver,db_tools
from balsam import models, BalsamStatusSender
from balsam.common import MessageReceiver,db_tools
from balsam.service import models, BalsamStatusSender
from django.conf import settings
from django.db import utils,connections,DEFAULT_DB_ALIAS
......
import logging,sys
logger = logging.getLogger(__name__)
from common import Serializer
from balsam.common import Serializer
class SerializeFailed(Exception): pass
class DeserializeFailed(Exception): pass
......
import logging
logger = logging.getLogger(__name__)
from balsam import BalsamJobStatus
from common import PikaMessageInterface, NoMessageInterface
from balsam.service import BalsamJobStatus
from balsam.common import PikaMessageInterface, NoMessageInterface
SENDER_MAP = {
'pika' : PikaMessageInterface.PikaMessageInterface,
......
......@@ -4,4 +4,4 @@ from django.apps import AppConfig
class BalsamCoreConfig(AppConfig):
name = 'balsam'
name = 'balsam.service'
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment