source: sasview/src/sas/sasview/local_config.py @ 839f70f7

magnetic_scattrelease-4.2.2ticket-1009ticket-1094-headlessticket-1242-2d-resolutionticket-1243ticket-1249
Last change on this file since 839f70f7 was 839f70f7, checked in by butler, 5 years ago

Move all version variables to init.py

Move release date (for copyright) and zenodo/DOI string from
local_config to sas.sasview._init_.py so that only init needs changing
for a new release.

  • Property mode set to 100644
File size: 6.0 KB
RevLine 
[f53cd30]1"""
[efe730d]2Application settings
[f53cd30]3"""
[a1b8fee]4from __future__ import print_function
5
[f53cd30]6import time
7import os
[efe730d]8import logging
9
[d85c194]10from sas.sasgui.guiframe.gui_style import GUIFRAME
[f53cd30]11import sas.sasview
12
[463e7ffc]13logger = logging.getLogger(__name__)
[c155a16]14
[f53cd30]15# Version of the application
16__appname__ = "SasView"
17__version__ = sas.sasview.__version__
[839f70f7]18__DOI__ = sas.sasview.__DOI__
19__release_date__ = sas.sasview.__release_date__
[f53cd30]20__build__ = sas.sasview.__build__
[c8d22ec]21__download_page__ = 'https://github.com/SasView/sasview/releases'
[9989a6a]22__update_URL__ = 'http://www.sasview.org/latestversion.json'
[f53cd30]23
24# Debug message flag
25__EVT_DEBUG__ = False
26
27# Flag for automated testing
28__TEST__ = False
29
30# Debug message should be written to a file?
[c8d22ec]31__EVT_DEBUG_2_FILE__ = False
[f53cd30]32__EVT_DEBUG_FILENAME__ = "debug.log"
33
34# About box info
35_do_aboutbox = True
36_do_acknowledge = True
[5e88e27c]37_do_release = True
[f53cd30]38_do_tutorial = True
39_acknowledgement_preamble =\
[e572d4b]40'''To ensure the long term support and development of this software please
41remember to:'''
[0ea31ca]42_acknowledgement_preamble_bullet1 =\
[d8161f2]43'''Acknowledge its use in your publications as :'''
[0ea31ca]44_acknowledgement_preamble_bullet2 =\
[d8161f2]45'''Reference SasView as:'''
[0ea31ca]46_acknowledgement_preamble_bullet3 =\
[c8d22ec]47'''Reference the model you used if appropriate (see documentation for refs)'''
48_acknowledgement_preamble_bullet4 =\
49'''Send us your reference for our records: developers@sasview.org'''
[f53cd30]50_acknowledgement_publications = \
[e572d4b]51("This work benefited from the use of the SasView application, originally"
52"developed under NSF Award DMR-0520547. SasView also contains code developed"
53"with funding from the EU Horizon 2020 programme under the SINE2020 project"
54"Grant No 654000.")
[d8161f2]55_acknowledgement_citation = \
[e572d4b]56'''M. Doucet et al. SasView Version %s, %s''' % (__version__, __DOI__)
[f53cd30]57_acknowledgement =  \
[e572d4b]58("This work was originally developed as part of the DANSE project funded by"
59"the US NSF under Award DMR-0520547,\n but is currently maintained by a"
60"collaboration between UTK, UMD, NIST, ORNL, ISIS, ESS, ILL, ANSTO, TU Delft,"
61"DLS, BAM and the scattering community.\n\n SasView also contains code"
62"developed with funding from the EU Horizon 2020 programme under the SINE2020"
63"project (Grant No 654000).\nA list of individual contributors can be found"
64"at: http://www.sasview.org/contact.html")
[f53cd30]65
66_homepage = "http://www.sasview.org"
67_download = __download_page__
68_authors = []
69_paper = "http://sourceforge.net/p/sasview/tickets/"
70_license = "mailto:help@sasview.org"
71
72
73icon_path = os.path.abspath(os.path.join(os.path.dirname(__file__), "images"))
[c155a16]74logger.info("icon path: %s" % icon_path)
[f53cd30]75media_path = os.path.abspath(os.path.join(os.path.dirname(__file__), "media"))
[c8d22ec]76test_path = os.path.abspath(os.path.join(os.path.dirname(__file__), "test"))
[f53cd30]77
78_nist_logo = os.path.join(icon_path, "nist_logo.png")
79_umd_logo = os.path.join(icon_path, "umd_logo.png")
80_sns_logo = os.path.join(icon_path, "sns_logo.png")
[e0f28e6]81_ornl_logo = os.path.join(icon_path, "ornl_logo.png")
[f53cd30]82_isis_logo = os.path.join(icon_path, "isis_logo.png")
83_ess_logo = os.path.join(icon_path, "ess_logo.png")
84_ill_logo = os.path.join(icon_path, "ill_logo.png")
[e0f28e6]85_ansto_logo = os.path.join(icon_path, "ansto_logo.png")
[49e000b]86_tudelft_logo = os.path.join(icon_path, "tudelft_logo.png")
[1779e72]87_dls_logo = os.path.join(icon_path, "dls_logo.png")
[1b4cb41]88_bam_logo = os.path.join(icon_path, "bam_logo.png")
[f53cd30]89_nsf_logo = os.path.join(icon_path, "nsf_logo.png")
90_danse_logo = os.path.join(icon_path, "danse_logo.png")
91_inst_logo = os.path.join(icon_path, "utlogo.gif")
92_nist_url = "http://www.nist.gov/"
93_umd_url = "http://www.umd.edu/"
94_sns_url = "http://neutrons.ornl.gov/"
[e0f28e6]95_ornl_url = "http://neutrons.ornl.gov/"
[f53cd30]96_nsf_url = "http://www.nsf.gov"
97_isis_url = "http://www.isis.stfc.ac.uk/"
98_ess_url = "http://ess-scandinavia.eu/"
99_ill_url = "http://www.ill.eu/"
[e0f28e6]100_ansto_url = "http://www.ansto.gov.au/"
[49e000b]101_tudelft_url = "http://www.tnw.tudelft.nl/en/cooperation/facilities/reactor-instituut-delft/"
[1779e72]102_dls_url = "http://www.diamond.ac.uk/"
[f53cd30]103_danse_url = "http://www.cacr.caltech.edu/projects/danse/release/index.html"
104_inst_url = "http://www.utk.edu"
105_corner_image = os.path.join(icon_path, "angles_flat.png")
106_welcome_image = os.path.join(icon_path, "SVwelcome.png")
[839f70f7]107_copyright = ("(c) 2009 - %s, UTK, UMD, NIST, ORNL, ISIS, ESS, ILL, ANSTO,"
108              "TU Delft, DLS and BAM") % __release_date__
[adb0851]109marketplace_url = "http://marketplace.sasview.org/"
[f53cd30]110
111#edit the list of file state your plugin can read
112APPLICATION_WLIST = 'SasView files (*.svs)|*.svs'
113APPLICATION_STATE_EXTENSION = '.svs'
114GUIFRAME_WIDTH = 1150
115GUIFRAME_HEIGHT = 840
[ae9b8bf]116PLUGIN_STATE_EXTENSIONS = ['.fitv', '.inv', '.prv', '.crf']
[f53cd30]117PLUGINS_WLIST = ['Fitting files (*.fitv)|*.fitv',
[c8d22ec]118                 'Invariant files (*.inv)|*.inv',
[96d293da]119                 'P(r) files (*.prv)|*.prv',
[ae9b8bf]120                 'Corfunc files (*.crf)|*.crf']
[f53cd30]121PLOPANEL_WIDTH = 415
122PLOPANEL_HEIGTH = 370
123DATAPANEL_WIDTH = 235
124DATAPANEL_HEIGHT = 700
[c8d22ec]125SPLASH_SCREEN_PATH = os.path.join(icon_path, "SVwelcome_mini.png")
126TUTORIAL_PATH = os.path.join(media_path, "Tutorial.pdf")
[f53cd30]127DEFAULT_STYLE = GUIFRAME.MULTIPLE_APPLICATIONS|GUIFRAME.MANAGER_ON\
128                    |GUIFRAME.CALCULATOR_ON|GUIFRAME.TOOLBAR_ON
129SPLASH_SCREEN_WIDTH = 512
130SPLASH_SCREEN_HEIGHT = 366
131SS_MAX_DISPLAY_TIME = 2000
[c8d22ec]132WELCOME_PANEL_ON = True
[f53cd30]133WELCOME_PANEL_SHOW = False
134CLEANUP_PLOT = False
135# OPEN and SAVE project menu
136OPEN_SAVE_PROJECT_MENU = True
137#VIEW MENU
138VIEW_MENU = True
139#EDIT MENU
140EDIT_MENU = True
141
142SetupIconFile_win = os.path.join(icon_path, "ball.ico")
143SetupIconFile_mac = os.path.join(icon_path, "ball.icns")
144DefaultGroupName = "."
145OutputBaseFilename = "setupSasView"
146
147FIXED_PANEL = True
148DATALOADER_SHOW = True
149CLEANUP_PLOT = False
150WELCOME_PANEL_SHOW = False
151#Show or hide toolbar at the start up
152TOOLBAR_SHOW = True
153# set a default perspective
154DEFAULT_PERSPECTIVE = 'None'
155
[957af0d]156# Time out for updating sasview
157UPDATE_TIMEOUT = 2
158
[c6bdb3b]159# Time out for updating sasview
160UPDATE_TIMEOUT = 2
161
[f53cd30]162def printEVT(message):
163    if __EVT_DEBUG__:
[c8d22ec]164        """
165        :TODO - Need method doc string
166        """
[9c3d784]167        print("%g%s" % (time.clock(), message))
[c8d22ec]168
[f53cd30]169        if __EVT_DEBUG_2_FILE__:
170            out = open(__EVT_DEBUG_FILENAME__, 'a')
171            out.write("%10g%s\n" % (time.clock(), message))
172            out.close()
Note: See TracBrowser for help on using the repository browser.