import matplotlib matplotlib.use('WXAgg') import plotTimeSeries import plotSummary import plotHistogram import plotBoxWhisker import plotProbability from odmtools.controller.logicPlotOptions import SeriesPlotInfo import logging from odmtools.common.logger import LoggerTool tool = LoggerTool() logger = tool.setupLogger(__name__, __name__ + '.log', 'w', logging.DEBUG) [ wxID_PANEL1, wxID_PAGEBOX, wxID_PAGEHIST, wxID_PAGEPROB, wxID_PAGESUMMARY, wxID_PAGETIMESERIES, wxID_TABPLOTS ] = [wx.NewId() for _init_ctrls in range(7)] class pnlPlot(fnb.FlatNotebook): def __init__(self, parent, taskserver): self.taskserver = taskserver self._init_ctrls(parent) self.initPubSub() self.parent = parent def _init_ctrls(self, parent):
import wx import logging from odmtools.gui.frmODMTools import frmODMToolsMain from odmtools.common.taskServer import TaskServerMP from odmtools.common.logger import LoggerTool from multiprocessing import cpu_count, freeze_support from odmtools.odmdata import MemoryDatabase import pyodbc import pymysql #import psycopg2 tool = LoggerTool() logger = tool.setupLogger('main', 'odmtools.log', 'a', logging.INFO) wx.Log.SetLogLevel(0) import sys import os # Module multiprocessing is organized differently in Python 3.4+ try: # Python 3.4+ if sys.platform.startswith('win'): import multiprocessing.popen_spawn_win32 as forking else: import multiprocessing.popen_fork as forking except ImportError: import multiprocessing.forking as forking
from odmtools.odmdata import Site from odmtools.odmdata import Variable from odmtools.odmdata import Unit from odmtools.odmdata import Series from odmtools.odmdata import DataValue from odmtools.odmdata import Qualifier from odmtools.odmdata import OffsetType from odmtools.odmdata import Sample from odmtools.odmdata import Method from odmtools.odmdata import QualityControlLevel from odmtools.odmdata import ODMVersion from odmtools.common.logger import LoggerTool import pandas as pd tool = LoggerTool() logger = tool.setupLogger(__name__, __name__ + ".log", "w", logging.DEBUG) class SeriesService: # Accepts a string for creating a SessionFactory, default uses odmdata/connection.cfg def __init__(self, connection_string="", debug=False): self._session_factory = SessionFactory(connection_string, debug) self._edit_session = self._session_factory.get_session() self._debug = debug def reset_session(self): self._edit_session = self._session_factory.get_session() # Reset the session in order to prevent memory leaks def get_db_version(self): return self._edit_session.query(ODMVersion).first().version_number
from odmtools.controller import pageIntro, pageExisting import pageMethod import pageQCL import pageVariable import pageSummary [wxID_PNLINTRO, wxID_PNLVARIABLE, wxID_PNLMETHOD, wxID_PNLQCL, wxID_PNLSUMMARY, wxID_WIZSAVE, wxID_PNLEXISTING, ] = [wx.NewId() for _init_ctrls in range(7)] from wx.lib.pubsub import pub as Publisher from odmtools.common.logger import LoggerTool import logging tool = LoggerTool() logger = tool.setupLogger(__name__, __name__ + '.log', 'w', logging.DEBUG) ######################################################################## class QCLPage(wiz.WizardPageSimple): def __init__(self, parent, title, service_man, qcl): """Constructor""" wiz.WizardPageSimple.__init__(self, parent) sizer = wx.BoxSizer(wx.VERTICAL) self.sizer = sizer self.SetSizer(sizer) self.qcl = qcl title = wx.StaticText(self, -1, title) title.SetFont(wx.Font(18, wx.SWISS, wx.NORMAL, wx.BOLD))
""" import wx import logging from odmtools.gui.frmODMTools import frmODMToolsMain from odmtools.common.taskServer import TaskServerMP from odmtools.common.logger import LoggerTool from multiprocessing import cpu_count, freeze_support from odmtools.odmdata import MemoryDatabase import pyodbc import pymysql #import psycopg2 tool = LoggerTool() logger = tool.setupLogger('main', 'odmtools.log', 'a', logging.INFO) wx.Log.SetLogLevel(0) import sys import os # Module multiprocessing is organized differently in Python 3.4+ try: # Python 3.4+ if sys.platform.startswith('win'): import multiprocessing.popen_spawn_win32 as forking else: import multiprocessing.popen_fork as forking except ImportError: import multiprocessing.forking as forking if sys.platform.startswith('win'):