How to use setup_tap method in lisa

Best Python code snippet using lisa_python

BuildViewer.py

Source:BuildViewer.py Github

copy

Full Screen

1#!/usr/bin/env python2"""3A simple script that copies all the cubes and everything into the right places4This has not been well set up to work universally. It's only been tested on one setup5"""6import os, shutil7# from TAP_Setup import setup8def main(RootDir, TAPViewerPath, TAPViewerSource, MapFileName, CubesPath, Seasons):9 TAPViewerDir = os.path.join(RootDir, TAPViewerPath)10 #Check if TAP Viewer Dir exists:11 if not os.path.isdir(TAPViewerDir):12 print "making new TAP Viewer Directory"13 os.mkdir(TAPViewerDir)14 # copy the exe and settings files15 shutil.copy(os.path.join(TAPViewerSource,'TAP.exe'), TAPViewerDir)16 shutil.copy(os.path.join(TAPViewerSource,'SETTINGS.TAP'), TAPViewerDir)17 # Check for TAPDATA18 TAPDATADir = os.path.join(TAPViewerDir,"TAPDATA")19 if not os.path.isdir(TAPDATADir):20 print "Making TAPDATA Directory"21 os.mkdir(TAPDATADir)22 # copy the TAPCONFIG file23 shutil.copy(os.path.join(TAPViewerSource, "TAPDATA", "TAPCONFIG.txt"), TAPDATADir)24 # copy the site.txt file25 shutil.copy(os.path.join(RootDir,"site.txt"), TAPDATADir)26 shutil.copy(os.path.join(TAPViewerSource, MapFileName), TAPDATADir)27 # copy the start times file (not required, but it's good to have it there28 # print StartTimeFiles29 # for (filename, _) in StartTimeFiles:30 # shutil.copy(filename, TAPDATADir)31 FullCubesPath = os.path.join(RootDir, CubesPath) 32 for (season, junk) in Seasons:33 SeasonPath = os.path.join(TAPDATADir,season)34 if not os.path.isdir(SeasonPath):35 print "Creating:", SeasonPath36 os.mkdir(SeasonPath)37 SeasonCubesPath = os.path.join(FullCubesPath,season)38 print SeasonPath, SeasonCubesPath39 40 for name in os.listdir(SeasonCubesPath):41 print "Moving:", name42 shutil.move(os.path.join(SeasonCubesPath,name),43 os.path.join(SeasonPath,name) )44 # These steps are both useful for archiving your TAP project, but not needed for45 # the TAP viewer to work. 46 # copy the script and Setup_TAP files to viewer dir for archive47 # setfile = os.path.join(RootDir,'Setup_TAP.py')48 # shutil.copy(setfile, TAPViewerDir)49 # move Trajectories to TapViewer dir50 # shutil.move(setup.TrajectoriesPath, TAPViewerDir)51 52 # copy the start times file (not required, but it's good to have it there53 # print StartTimeFiles54 # for (filename, _) in StartTimeFiles:55 # shutil.copy(filename, TAPDATADir)56if __name__ == '__main__':57 import Setup_TAP as tap58 main(tap.RootDir, tap.CubesPath, tap.CubesRootNames, tap.CubeType, tap.CubeDataType,59 tap.Seasons, tap.TrajectoriesPath, tap.ReceptorType, tap.Grid, tap.OilWeatheringType,...

Full Screen

Full Screen

testSetup.py

Source:testSetup.py Github

copy

Full Screen

1#!/usr/bin/env python2"""3A way to import a particular setup by only changing one thing4"""5# getting the root dir from the command line:6import sys, os7import datetime8import numpy as np9# get default paramaters10setup = __import__('Setup_TAP')11def getSetup():12 RootDir = os.path.abspath(__file__)13 if not os.path.exists(RootDir): 14 raise Exception("RootDir: %s Doesn't exist"%RootDir)15 sys.path.insert(0, RootDir) 16 setup = __import__('Setup_TAP')17 setup.RootDir = RootDir18 print setup19 return setup20def paramstest():21 class pp:22 pass23 # number of start times you want in each season:24 pp.NumStarts = 50025 # # Length of release in hours (0 for instantaneous)26 pp.ReleaseLength = 30 *24 # in hours27 # name of the GNOME script file to run28 pp.PyGnome_script = "script_ArcticTAP"29 # number of Lagrangian elements you want in the GNOME run30 pp.NumLEs = 1000...

Full Screen

Full Screen

Automation Testing Tutorials

Learn to execute automation testing from scratch with LambdaTest Learning Hub. Right from setting up the prerequisites to run your first automation test, to following best practices and diving deeper into advanced test scenarios. LambdaTest Learning Hubs compile a list of step-by-step guides to help you be proficient with different test automation frameworks i.e. Selenium, Cypress, TestNG etc.

LambdaTest Learning Hubs:

YouTube

You could also refer to video tutorials over LambdaTest YouTube channel to get step by step demonstration from industry experts.

Run lisa automation tests on LambdaTest cloud grid

Perform automation testing on 3000+ real desktop and mobile devices online.

Try LambdaTest Now !!

Get 100 minutes of automation test minutes FREE!!

Next-Gen App & Browser Testing Cloud

Was this article helpful?

Helpful

NotHelpful