sajaniemi_variable_dataset_large / pool /shard010 /Python /0089337_testmigrations.py
Pendigard's picture
Upload folder using huggingface_hub (part 115)
b2e2343 verified
Raw History Blame Contribute Delete
1.05 kB
"""
Loads an old project version.
Version: 2017jan13
"""
import optima as op
from optima import tic, toc, blank, pd # analysis:ignore
## Options
tests = [
'basicmigration',
]
oldprojectname = 'concentrated_v2.0.4.prj' # Options are concentrated_v2.0.4.prj and concentrated_v2.1.prj
## Housekeeping
if 'doplot' not in locals(): doplot = True
def done(t=0):
print('Done.')
toc(t)
blank()
blank()
print('Running tests:')
for i,test in enumerate(tests): print(('%i. '+test) % (i+1))
blank()
##############################################################################
## The tests
##############################################################################
T = tic()
if 'basicmigration' in tests:
# Figure out the path
import os
optimapath = os.path.dirname(op.__file__)
spreadsheetpath = os.path.join(optimapath, '..', 'tests', '') # Empty last part puts a /
oldprojectfile = spreadsheetpath+oldprojectname
P = op.loadproj(filename=oldprojectfile)
P.runsim()
if doplot: op.pygui(P)