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
Line 
1"""
2Application settings
3"""
4from __future__ import print_function
5
6import time
7import os
8import logging
9
10from sas.sasgui.guiframe.gui_style import GUIFRAME
11import sas.sasview
12
13logger = logging.getLogger(__name__)
14
15# Version of the application
16__appname__ = "SasView"
17__version__ = sas.sasview.__version__
18__DOI__ = sas.sasview.__DOI__
19__release_date__ = sas.sasview.__release_date__
20__build__ = sas.sasview.__build__
21__download_page__ = 'https://github.com/SasView/sasview/releases'
22__update_URL__ = 'http://www.sasview.org/latestversion.json'
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?
31__EVT_DEBUG_2_FILE__ = False
32__EVT_DEBUG_FILENAME__ = "debug.log"
33
34# About box info
35_do_aboutbox = True
36_do_acknowledge = True
37_do_release = True
38_do_tutorial = True
39_acknowledgement_preamble =\
40'''To ensure the long term support and development of this software please
41remember to:'''
42_acknowledgement_preamble_bullet1 =\
43'''Acknowledge its use in your publications as :'''
44_acknowledgement_preamble_bullet2 =\
45'''Reference SasView as:'''
46_acknowledgement_preamble_bullet3 =\
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'''
50_acknowledgement_publications = \
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.")
55_acknowledgement_citation = \
56'''M. Doucet et al. SasView Version %s, %s''' % (__version__, __DOI__)
57_acknowledgement =  \
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")
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"))
74logger.info("icon path: %s" % icon_path)
75media_path = os.path.abspath(os.path.join(os.path.dirname(__file__), "media"))
76test_path = os.path.abspath(os.path.join(os.path.dirname(__file__), "test"))
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")
81_ornl_logo = os.path.join(icon_path, "ornl_logo.png")
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")
85_ansto_logo = os.path.join(icon_path, "ansto_logo.png")
86_tudelft_logo = os.path.join(icon_path, "tudelft_logo.png")
87_dls_logo = os.path.join(icon_path, "dls_logo.png")
88_bam_logo = os.path.join(icon_path, "bam_logo.png")
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/"
95_ornl_url = "http://neutrons.ornl.gov/"
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/"
100_ansto_url = "http://www.ansto.gov.au/"
101_tudelft_url = "http://www.tnw.tudelft.nl/en/cooperation/facilities/reactor-instituut-delft/"
102_dls_url = "http://www.diamond.ac.uk/"
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")
107_copyright = ("(c) 2009 - %s, UTK, UMD, NIST, ORNL, ISIS, ESS, ILL, ANSTO,"
108              "TU Delft, DLS and BAM") % __release_date__
109marketplace_url = "http://marketplace.sasview.org/"
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
116PLUGIN_STATE_EXTENSIONS = ['.fitv', '.inv', '.prv', '.crf']
117PLUGINS_WLIST = ['Fitting files (*.fitv)|*.fitv',
118                 'Invariant files (*.inv)|*.inv',
119                 'P(r) files (*.prv)|*.prv',
120                 'Corfunc files (*.crf)|*.crf']
121PLOPANEL_WIDTH = 415
122PLOPANEL_HEIGTH = 370
123DATAPANEL_WIDTH = 235
124DATAPANEL_HEIGHT = 700
125SPLASH_SCREEN_PATH = os.path.join(icon_path, "SVwelcome_mini.png")
126TUTORIAL_PATH = os.path.join(media_path, "Tutorial.pdf")
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
132WELCOME_PANEL_ON = True
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
156# Time out for updating sasview
157UPDATE_TIMEOUT = 2
158
159# Time out for updating sasview
160UPDATE_TIMEOUT = 2
161
162def printEVT(message):
163    if __EVT_DEBUG__:
164        """
165        :TODO - Need method doc string
166        """
167        print("%g%s" % (time.clock(), message))
168
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.