SWDatabase
 All Classes Namespaces Files Functions Variables Enumerations Enumerator Macros Pages
Variables
tests.notaunittest_timeserie_compare_official_website Namespace Reference

Variables

string help_message
 
string fetch_type = 'DISCOVER_MAG'
 
list fetch_list = ['DISCOVER_MAG','DISCOVER_VELOCITY','STEREOA_MAG','STEREOA_VELOCITY','ACE_MAGLV4','ACE_VELOCITYLV4']
 
string website = 'https://www.ngdc.noaa.gov'
 
int fetch_level = 1
 
list table_name = interface_fetch_timeserie.fetch_info[fetch_type]
 
tuple folder_test = os.path.join('tests','TEST')
 
tuple test_mode = module_prompt.prompt_inlist(['Random','Today','Yesterday','User defined date'])
 
 db = None
 
tuple date_begin = datetime.datetime(2019,6,1)
 
int nmax = 100
 
int niter = 0
 
tuple delay = datetime.datetime.today()
 
tuple random_delay = random.uniform(0,delay.total_seconds())
 
tuple date_in = date_begin+datetime.timedelta(seconds=random_delay)
 
tuple path = os.path.join(db['dirname'],db['filename'])
 
list filename = db['filename']
 
tuple timeserie = interface_read_timeserie.read(table_name,path)
 
tuple test_path = os.path.join(folder_test,'swd_discover_mag_%s.png'%(date_in.strftime('%Y%m%d')))
 
string ref_filename = 'official_discover_%s.png'
 
tuple url = date_in.strftime('https://www.ngdc.noaa.gov/dscovr/plots/dscovr_1day_plots/%Y/%m/%Y%m%d-day.png')
 
tuple current_dir = os.getcwd()
 
tuple ref_path = os.path.join(folder_test,ref_filename)
 

Variable Documentation

tuple tests.notaunittest_timeserie_compare_official_website.current_dir = os.getcwd()
tuple tests.notaunittest_timeserie_compare_official_website.date_begin = datetime.datetime(2019,6,1)
tuple tests.notaunittest_timeserie_compare_official_website.date_in = date_begin+datetime.timedelta(seconds=random_delay)
tuple tests.notaunittest_timeserie_compare_official_website.db = None
tuple tests.notaunittest_timeserie_compare_official_website.delay = datetime.datetime.today()
int tests.notaunittest_timeserie_compare_official_website.fetch_level = 1
list tests.notaunittest_timeserie_compare_official_website.fetch_list = ['DISCOVER_MAG','DISCOVER_VELOCITY','STEREOA_MAG','STEREOA_VELOCITY','ACE_MAGLV4','ACE_VELOCITYLV4']
list tests.notaunittest_timeserie_compare_official_website.fetch_type = 'DISCOVER_MAG'
list tests.notaunittest_timeserie_compare_official_website.filename = db['filename']
tuple tests.notaunittest_timeserie_compare_official_website.folder_test = os.path.join('tests','TEST')
string tests.notaunittest_timeserie_compare_official_website.help_message
Initial value:
1 = """
2 Plot a timeserie for some dates and compare with the summary plot given at an official website.\n
3 Usage :\n
4 python tests/notaunittest.py [options]
5 [-h] : brief help
6 [-f fetchName] : which fetch type to test. Default: DISCOVER_MAG.
7 [--list] : list all fetch types that can be compared with its official website.
8 """
int tests.notaunittest_timeserie_compare_official_website.niter = 0
int tests.notaunittest_timeserie_compare_official_website.nmax = 100
tuple tests.notaunittest_timeserie_compare_official_website.path = os.path.join(db['dirname'],db['filename'])
tuple tests.notaunittest_timeserie_compare_official_website.random_delay = random.uniform(0,delay.total_seconds())
string tests.notaunittest_timeserie_compare_official_website.ref_filename = 'official_discover_%s.png'
tuple tests.notaunittest_timeserie_compare_official_website.ref_path = os.path.join(folder_test,ref_filename)
list tests.notaunittest_timeserie_compare_official_website.table_name = interface_fetch_timeserie.fetch_info[fetch_type]
tuple tests.notaunittest_timeserie_compare_official_website.test_mode = module_prompt.prompt_inlist(['Random','Today','Yesterday','User defined date'])
tuple tests.notaunittest_timeserie_compare_official_website.test_path = os.path.join(folder_test,'swd_discover_mag_%s.png'%(date_in.strftime('%Y%m%d')))
tuple tests.notaunittest_timeserie_compare_official_website.timeserie = interface_read_timeserie.read(table_name,path)
tuple tests.notaunittest_timeserie_compare_official_website.url = date_in.strftime('https://www.ngdc.noaa.gov/dscovr/plots/dscovr_1day_plots/%Y/%m/%Y%m%d-day.png')
string tests.notaunittest_timeserie_compare_official_website.website = 'https://www.ngdc.noaa.gov'