# -*- coding: utf-8 -*-## This file is subject to the terms and conditions defined in# file 'LICENSE.txt', which is part of this source code package.##_test=["Actions","Containers","Bridges","FE","Helpers",'ImplicitGeometry','Info',"IO","LinAlg","Types","Experimental","GeometricalTools"]fromMuscat.Infoimport__name__fromMuscat.Infoimport__copyright_holder__fromMuscat.Infoimport__copyright_years__fromMuscat.Infoimport__copyright__fromMuscat.Infoimport__license__fromMuscat.Infoimport__version__
[docs]defPreload(subSubModule="Muscat")->float:"""Function to preload all the import of a library using the test infrastructure of Muscat Each __init__.py must contain a variable named "_test" containing a list of string with the name of the module and submodules present on the directory. This ensure a safe travel thru the directory hierarchy (only import the module on the list explicitly) Parameters ---------- subSubModule : str, optional _description_, by default "Muscat" Returns ------- float time spend on the preload function. """importtimeimportosst=time.time()fromMuscat.Helpers.Checkimport__tryImporttry:__tryImport(subSubModule,{},stopAtFirstError=True,modulesToTreat=[],modulesToSkip=[])passexceptExceptionase:print(e)print('Error Loading module : '+subSubModule+' (Current folder'+os.getcwd()+')')print('-*-*-*-*-*-*> missing CheckIntegrity()??? <*-*-*-*-*-*--')raiseifsubSubModule=="Muscat":importMuscat.Containers.NativeTransferimportMuscat.LinAlg.NativeEigenSolverimportMuscat.FE.Integrators.NativeIntegrationimportMuscat.FE.WeakForms.NativeNumericalWeakFormimportMuscat.Containers.NativeMeshimportMuscat.FE.Numberings.NativeDofNumberingimportMuscat.FE.Spaces.NativeSpaceimportMuscat.Containers.Filters.NativeFiltersreturntime.time()-st
[docs]defmain():"""This function call the function to check the integrity of the installation Please read the documentation of py:class:Muscat.Helpers.Check.RunTests """print(" {} version {}".format(__name__,__version__))print(" Copyright (c) {}".format(__copyright__))print("")fromMuscat.Helpers.CheckimportRunTestsimportsyssys.exit(len(RunTests()))