Mod: tests and conda package channel for netgen
This commit is contained in:
parent
f94333ea0b
commit
49a7390473
@ -1,21 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<module type="PYTHON_MODULE" version="4">
|
||||
<component name="NewModuleRootManager">
|
||||
<content url="file://$MODULE_DIR$" />
|
||||
<orderEntry type="jdk" jdkName="Python 3.9 (anisotropy) (3)" jdkType="Python SDK" />
|
||||
<orderEntry type="sourceFolder" forTests="false" />
|
||||
<orderEntry type="module" module-name="conda-recipes" />
|
||||
<orderEntry type="module" module-name="build-it" />
|
||||
</component>
|
||||
<component name="PyDocumentationSettings">
|
||||
<option name="format" value="PLAIN" />
|
||||
<option name="myDocStringFormat" value="Plain" />
|
||||
</component>
|
||||
<component name="TemplatesService">
|
||||
<option name="TEMPLATE_FOLDERS">
|
||||
<list>
|
||||
<option value="$MODULE_DIR$/docs/source/templates" />
|
||||
</list>
|
||||
</option>
|
||||
</component>
|
||||
</module>
|
@ -1,29 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="dataSourceStorageLocal" created-in="PY-213.5744.248">
|
||||
<data-source name="anisotropy" uuid="eceb01dd-1859-4f29-833a-36c865d8b434">
|
||||
<database-info product="SQLite" version="3.34.0" jdbc-version="2.1" driver-name="SQLite JDBC" driver-version="3.34.0" dbms="SQLITE" exact-version="3.34.0" exact-driver-version="3.34">
|
||||
<identifier-quote-string>"</identifier-quote-string>
|
||||
</database-info>
|
||||
<case-sensitivity plain-identifiers="mixed" quoted-identifiers="mixed" />
|
||||
<auth-provider>no-auth</auth-provider>
|
||||
<schema-mapping>
|
||||
<introspection-scope>
|
||||
<node kind="schema" qname="@" />
|
||||
</introspection-scope>
|
||||
</schema-mapping>
|
||||
</data-source>
|
||||
<data-source name="anisotropy [2]" uuid="99a9a984-13e3-4c9e-9463-6554e7bc731c">
|
||||
<database-info product="SQLite" version="3.34.0" jdbc-version="2.1" driver-name="SQLite JDBC" driver-version="3.34.0" dbms="SQLITE" exact-version="3.34.0" exact-driver-version="3.34">
|
||||
<identifier-quote-string>"</identifier-quote-string>
|
||||
</database-info>
|
||||
<case-sensitivity plain-identifiers="mixed" quoted-identifiers="mixed" />
|
||||
<auth-provider>no-auth</auth-provider>
|
||||
<schema-mapping>
|
||||
<introspection-scope>
|
||||
<node kind="schema" qname="@" />
|
||||
</introspection-scope>
|
||||
</schema-mapping>
|
||||
</data-source>
|
||||
</component>
|
||||
</project>
|
@ -1,24 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="DataSourceManagerImpl" format="xml" multifile-model="true">
|
||||
<data-source source="LOCAL" name="anisotropy" uuid="eceb01dd-1859-4f29-833a-36c865d8b434">
|
||||
<driver-ref>sqlite.xerial</driver-ref>
|
||||
<synchronize>true</synchronize>
|
||||
<jdbc-driver>org.sqlite.JDBC</jdbc-driver>
|
||||
<jdbc-url>jdbc:sqlite:$PROJECT_DIR$/temp/anisotropy.db</jdbc-url>
|
||||
<working-dir>$ProjectFileDir$</working-dir>
|
||||
</data-source>
|
||||
<data-source source="LOCAL" name="anisotropy [2]" uuid="99a9a984-13e3-4c9e-9463-6554e7bc731c">
|
||||
<driver-ref>sqlite.xerial</driver-ref>
|
||||
<synchronize>true</synchronize>
|
||||
<jdbc-driver>org.sqlite.JDBC</jdbc-driver>
|
||||
<jdbc-url>jdbc:sqlite:$PROJECT_DIR$/playground/woPrismaticLayer/anisotropy.db</jdbc-url>
|
||||
<working-dir>$ProjectFileDir$</working-dir>
|
||||
<libraries>
|
||||
<library>
|
||||
<url>file://$APPLICATION_CONFIG_DIR$/jdbc-drivers/Xerial SQLiteJDBC/3.34.0/sqlite-jdbc-3.34.0.jar</url>
|
||||
</library>
|
||||
</libraries>
|
||||
</data-source>
|
||||
</component>
|
||||
</project>
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -1,6 +0,0 @@
|
||||
<component name="InspectionProjectProfileManager">
|
||||
<settings>
|
||||
<option name="USE_PROJECT_PROFILE" value="false" />
|
||||
<version value="1.0" />
|
||||
</settings>
|
||||
</component>
|
@ -1,4 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="ProjectRootManager" version="2" project-jdk-name="Python 3.9 (anisotropy) (3)" project-jdk-type="Python SDK" />
|
||||
</project>
|
@ -1,10 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="ProjectModuleManager">
|
||||
<modules>
|
||||
<module fileurl="file://$PROJECT_DIR$/.idea/anisotropy.iml" filepath="$PROJECT_DIR$/.idea/anisotropy.iml" />
|
||||
<module fileurl="file://$PROJECT_DIR$/../build-it/.idea/build-it.iml" filepath="$PROJECT_DIR$/../build-it/.idea/build-it.iml" />
|
||||
<module fileurl="file://$PROJECT_DIR$/../conda-recipes/.idea/conda-recipes.iml" filepath="$PROJECT_DIR$/../conda-recipes/.idea/conda-recipes.iml" />
|
||||
</modules>
|
||||
</component>
|
||||
</project>
|
@ -1,7 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="VcsDirectoryMappings">
|
||||
<mapping directory="" vcs="Git" />
|
||||
<mapping directory="$PROJECT_DIR$/../build-it" vcs="Git" />
|
||||
</component>
|
||||
</project>
|
@ -1,176 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="AutoImportSettings">
|
||||
<option name="autoReloadType" value="SELECTIVE" />
|
||||
</component>
|
||||
<component name="ChangeListManager">
|
||||
<list default="true" id="735b4a02-ca63-4646-83ce-e3aecad79043" name="Changes" comment="">
|
||||
<change beforePath="$PROJECT_DIR$/anisotropy/core/runner.py" beforeDir="false" afterPath="$PROJECT_DIR$/anisotropy/core/runner.py" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/playground/analytics.ipynb" beforeDir="false" afterPath="$PROJECT_DIR$/playground/analytics.ipynb" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/poetry.lock" beforeDir="false" afterPath="$PROJECT_DIR$/poetry.lock" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/pyproject.toml" beforeDir="false" afterPath="$PROJECT_DIR$/pyproject.toml" afterDir="false" />
|
||||
</list>
|
||||
<option name="SHOW_DIALOG" value="false" />
|
||||
<option name="HIGHLIGHT_CONFLICTS" value="true" />
|
||||
<option name="HIGHLIGHT_NON_ACTIVE_CHANGELIST" value="false" />
|
||||
<option name="LAST_RESOLUTION" value="IGNORE" />
|
||||
</component>
|
||||
<component name="DjangoConsoleOptions" custom-start-script="import sys; print('Python %s on %s' % (sys.version, sys.platform)) import django; print('Django %s' % django.get_version()) sys.path.extend([WORKING_DIR_AND_PYTHON_PATHS]) if 'setup' in dir(django): django.setup() import django_manage_shell; django_manage_shell.run(PROJECT_ROOT)">
|
||||
<option name="myCustomStartScript" value="import sys; print('Python %s on %s' % (sys.version, sys.platform)) import django; print('Django %s' % django.get_version()) sys.path.extend([WORKING_DIR_AND_PYTHON_PATHS]) if 'setup' in dir(django): django.setup() import django_manage_shell; django_manage_shell.run(PROJECT_ROOT)" />
|
||||
</component>
|
||||
<component name="FlaskConsoleOptions" custom-start-script="import sys sys.path.extend([WORKING_DIR_AND_PYTHON_PATHS]) from flask.cli import ScriptInfo locals().update(ScriptInfo(create_app=None).load_app().make_shell_context()) print("Python %s on %s\nApp: %s [%s]\nInstance: %s" % (sys.version, sys.platform, app.import_name, app.env, app.instance_path))">
|
||||
<envs>
|
||||
<env key="FLASK_APP" value="app" />
|
||||
</envs>
|
||||
<option name="myCustomStartScript" value="import sys sys.path.extend([WORKING_DIR_AND_PYTHON_PATHS]) from flask.cli import ScriptInfo locals().update(ScriptInfo(create_app=None).load_app().make_shell_context()) print("Python %s on %s\nApp: %s [%s]\nInstance: %s" % (sys.version, sys.platform, app.import_name, app.env, app.instance_path))" />
|
||||
<option name="myEnvs">
|
||||
<map>
|
||||
<entry key="FLASK_APP" value="app" />
|
||||
</map>
|
||||
</option>
|
||||
</component>
|
||||
<component name="Git.Settings">
|
||||
<option name="RECENT_GIT_ROOT_PATH" value="$PROJECT_DIR$" />
|
||||
</component>
|
||||
<component name="MarkdownSettingsMigration">
|
||||
<option name="stateVersion" value="1" />
|
||||
</component>
|
||||
<component name="ProjectId" id="227rrKyHKvHy3MHjsrGDIu81TFn" />
|
||||
<component name="ProjectLevelVcsManager" settingsEditedManually="true" />
|
||||
<component name="ProjectViewState">
|
||||
<option name="hideEmptyMiddlePackages" value="true" />
|
||||
<option name="showLibraryContents" value="true" />
|
||||
<option name="showMembers" value="true" />
|
||||
</component>
|
||||
<component name="PropertiesComponent">
|
||||
<property name="ASKED_ADD_EXTERNAL_FILES" value="true" />
|
||||
<property name="ASKED_SHARE_PROJECT_CONFIGURATION_FILES" value="true" />
|
||||
<property name="RunOnceActivity.OpenProjectViewOnStart" value="true" />
|
||||
<property name="RunOnceActivity.ShowReadmeOnStart" value="true" />
|
||||
<property name="WebServerToolWindowFactoryState" value="false" />
|
||||
<property name="database.data.extractors.current.export.id" value="Comma-separated (CSV)_id" />
|
||||
<property name="database.data.extractors.current.id" value="Comma-separated (CSV)_id" />
|
||||
<property name="last_opened_file_path" value="$USER_HOME$/.local/share/mambaforge/condabin/conda" />
|
||||
<property name="settings.editor.selected.configurable" value="advanced.settings" />
|
||||
</component>
|
||||
<component name="RunManager" selected="Python.cli">
|
||||
<configuration name="cli" type="PythonConfigurationType" factoryName="Python" singleton="false" nameIsGenerated="true">
|
||||
<module name="anisotropy" />
|
||||
<option name="INTERPRETER_OPTIONS" value="" />
|
||||
<option name="PARENT_ENVS" value="true" />
|
||||
<envs>
|
||||
<env name="PYTHONUNBUFFERED" value="1" />
|
||||
</envs>
|
||||
<option name="SDK_HOME" value="" />
|
||||
<option name="WORKING_DIRECTORY" value="$PROJECT_DIR$/temp" />
|
||||
<option name="IS_MODULE_SDK" value="true" />
|
||||
<option name="ADD_CONTENT_ROOTS" value="true" />
|
||||
<option name="ADD_SOURCE_ROOTS" value="true" />
|
||||
<EXTENSION ID="PythonCoverageRunConfigurationExtension" runner="coverage.py" />
|
||||
<option name="SCRIPT_NAME" value="$PROJECT_DIR$/anisotropy/core/cli.py" />
|
||||
<option name="PARAMETERS" value="compute -s shape -N 2 -v" />
|
||||
<option name="SHOW_COMMAND_LINE" value="false" />
|
||||
<option name="EMULATE_TERMINAL" value="false" />
|
||||
<option name="MODULE_MODE" value="false" />
|
||||
<option name="REDIRECT_INPUT" value="false" />
|
||||
<option name="INPUT_FILE" value="" />
|
||||
<method v="2">
|
||||
<option name="ToolBeforeRunTask" enabled="true" actionId="Tool_External Tools_mkdir" />
|
||||
</method>
|
||||
</configuration>
|
||||
<configuration name="poetry" type="PythonConfigurationType" factoryName="Python" nameIsGenerated="true">
|
||||
<module name="anisotropy" />
|
||||
<option name="INTERPRETER_OPTIONS" value="" />
|
||||
<option name="PARENT_ENVS" value="true" />
|
||||
<envs>
|
||||
<env name="PYTHONUNBUFFERED" value="1" />
|
||||
</envs>
|
||||
<option name="SDK_HOME" value="" />
|
||||
<option name="WORKING_DIRECTORY" value="$PROJECT_DIR$" />
|
||||
<option name="IS_MODULE_SDK" value="true" />
|
||||
<option name="ADD_CONTENT_ROOTS" value="true" />
|
||||
<option name="ADD_SOURCE_ROOTS" value="true" />
|
||||
<EXTENSION ID="PythonCoverageRunConfigurationExtension" runner="coverage.py" />
|
||||
<option name="SCRIPT_NAME" value="$USER_HOME$/.local/share/miniconda/envs/anisotropy/bin/poetry" />
|
||||
<option name="PARAMETERS" value="install" />
|
||||
<option name="SHOW_COMMAND_LINE" value="false" />
|
||||
<option name="EMULATE_TERMINAL" value="false" />
|
||||
<option name="MODULE_MODE" value="false" />
|
||||
<option name="REDIRECT_INPUT" value="false" />
|
||||
<option name="INPUT_FILE" value="" />
|
||||
<method v="2" />
|
||||
</configuration>
|
||||
<configuration name="pytest" type="tests" factoryName="py.test">
|
||||
<module name="anisotropy" />
|
||||
<option name="INTERPRETER_OPTIONS" value="" />
|
||||
<option name="PARENT_ENVS" value="true" />
|
||||
<option name="SDK_HOME" value="" />
|
||||
<option name="WORKING_DIRECTORY" value="$PROJECT_DIR$" />
|
||||
<option name="IS_MODULE_SDK" value="true" />
|
||||
<option name="ADD_CONTENT_ROOTS" value="true" />
|
||||
<option name="ADD_SOURCE_ROOTS" value="true" />
|
||||
<EXTENSION ID="PythonCoverageRunConfigurationExtension" runner="coverage.py" />
|
||||
<option name="_new_keywords" value="""" />
|
||||
<option name="_new_parameters" value="""" />
|
||||
<option name="_new_additionalArguments" value="""" />
|
||||
<option name="_new_target" value=""$PROJECT_DIR$/tests"" />
|
||||
<option name="_new_targetType" value=""PATH"" />
|
||||
<method v="2" />
|
||||
</configuration>
|
||||
<list>
|
||||
<item itemvalue="Python.cli" />
|
||||
<item itemvalue="Python.poetry" />
|
||||
<item itemvalue="Python tests.pytest" />
|
||||
</list>
|
||||
</component>
|
||||
<component name="SpellCheckerSettings" RuntimeDictionaries="0" Folders="0" CustomDictionaries="0" DefaultDictionary="application-level" UseSingleDictionary="true" transferred="true" />
|
||||
<component name="TaskManager">
|
||||
<task active="true" id="Default" summary="Default task">
|
||||
<changelist id="735b4a02-ca63-4646-83ce-e3aecad79043" name="Changes" comment="" />
|
||||
<created>1639199666793</created>
|
||||
<option name="number" value="Default" />
|
||||
<option name="presentableId" value="Default" />
|
||||
<updated>1639199666793</updated>
|
||||
<workItem from="1639199669888" duration="748000" />
|
||||
<workItem from="1639201155141" duration="7252000" />
|
||||
<workItem from="1639220059953" duration="108000" />
|
||||
<workItem from="1639220190153" duration="107000" />
|
||||
<workItem from="1639220332885" duration="309000" />
|
||||
<workItem from="1639220645678" duration="3971000" />
|
||||
<workItem from="1639299523428" duration="2089000" />
|
||||
<workItem from="1639306489894" duration="560000" />
|
||||
<workItem from="1639307082696" duration="4618000" />
|
||||
</task>
|
||||
<servers />
|
||||
</component>
|
||||
<component name="TypeScriptGeneratedFilesManager">
|
||||
<option name="version" value="3" />
|
||||
</component>
|
||||
<component name="Vcs.Log.Tabs.Properties">
|
||||
<option name="TAB_STATES">
|
||||
<map>
|
||||
<entry key="MAIN">
|
||||
<value>
|
||||
<State>
|
||||
<option name="FILTERS">
|
||||
<map>
|
||||
<entry key="branch">
|
||||
<value>
|
||||
<list>
|
||||
<option value="origin/devel" />
|
||||
</list>
|
||||
</value>
|
||||
</entry>
|
||||
</map>
|
||||
</option>
|
||||
</State>
|
||||
</value>
|
||||
</entry>
|
||||
</map>
|
||||
</option>
|
||||
</component>
|
||||
<component name="com.intellij.coverage.CoverageDataManagerImpl">
|
||||
<SUITE FILE_PATH="coverage/anisotropy$poetry.coverage" NAME="poetry Coverage Results" MODIFIED="1639204670361" SOURCE_PROVIDER="com.intellij.coverage.DefaultCoverageFileProvider" RUNNER="coverage.py" COVERAGE_BY_TEST_ENABLED="true" COVERAGE_TRACING_ENABLED="false" WORKING_DIRECTORY="$PROJECT_DIR$" />
|
||||
<SUITE FILE_PATH="coverage/anisotropy$cli.coverage" NAME="cli Coverage Results" MODIFIED="1639299976508" SOURCE_PROVIDER="com.intellij.coverage.DefaultCoverageFileProvider" RUNNER="coverage.py" COVERAGE_BY_TEST_ENABLED="true" COVERAGE_TRACING_ENABLED="false" WORKING_DIRECTORY="$PROJECT_DIR$/temp" />
|
||||
</component>
|
||||
</project>
|
@ -1,5 +1,6 @@
|
||||
name: anisotropy
|
||||
channels:
|
||||
- l-nafaryus
|
||||
- local
|
||||
- conda-forge
|
||||
dependencies:
|
||||
|
@ -1,4 +1,4 @@
|
||||
import os
|
||||
import os, shutil
|
||||
from os import path
|
||||
import unittest
|
||||
|
||||
@ -7,22 +7,19 @@ unittest.TestLoader.sortTestMethodsUsing = None
|
||||
class TestCore(unittest.TestCase):
|
||||
def setUp(self):
|
||||
try:
|
||||
import netgen
|
||||
NETGEN_MODULE = True
|
||||
import netgen.occ
|
||||
_ = netgen.occ.Pnt(0, 0, 0)
|
||||
|
||||
except ImportError:
|
||||
NETGEN_MODULE = False
|
||||
|
||||
if not NETGEN_MODULE:
|
||||
self.skipTest("Missing Netgen.")
|
||||
except Exception as e:
|
||||
self.skipTest(e)
|
||||
|
||||
else:
|
||||
from anisotropy import core
|
||||
from anisotropy import core
|
||||
|
||||
self.core = core
|
||||
|
||||
self.currentPath = os.path.abspath(".")
|
||||
self.outputPath = os.path.join(self.currentPath, "tests/test_core_output")
|
||||
self.outputPath = os.path.join(os.path.dirname(__file__), "test_core_output")
|
||||
os.makedirs(self.outputPath, exist_ok = True)
|
||||
|
||||
def test_config(self):
|
||||
@ -43,8 +40,9 @@ class TestCore(unittest.TestCase):
|
||||
|
||||
pathOld = os.path.abspath(".")
|
||||
config = self.core.DefaultConfig()
|
||||
|
||||
# TODO: config for solo case
|
||||
runner = self.core.UltimateRunner(config = config)
|
||||
runner.createRow()
|
||||
|
||||
runner.computeShape()
|
||||
self.assertTrue(path.isfile(path.join(runner.casepath(), "shape.step")))
|
||||
@ -59,6 +57,7 @@ class TestCore(unittest.TestCase):
|
||||
|
||||
def tearDown(self):
|
||||
os.chdir(self.currentPath)
|
||||
shutil.rmtree(self.outputPath)
|
||||
|
||||
if __name__ == "__main__":
|
||||
unittest.main()
|
||||
|
@ -9,7 +9,7 @@ class TestDatabase(unittest.TestCase):
|
||||
|
||||
self.database = database
|
||||
|
||||
self.outputPath = os.path.join(os.path.abspath("."), "tests/test_database_output")
|
||||
self.outputPath = os.path.join(os.path.dirname(__file__), "test_database_output")
|
||||
os.makedirs(self.outputPath, exist_ok = True)
|
||||
|
||||
def test_setup(self):
|
||||
@ -28,6 +28,7 @@ class TestDatabase(unittest.TestCase):
|
||||
self.assertTrue(table.table_exists())
|
||||
|
||||
def tearDown(self):
|
||||
#pass
|
||||
shutil.rmtree(self.outputPath)
|
||||
|
||||
if __name__ == "__main__":
|
||||
|
@ -1,4 +1,4 @@
|
||||
import os
|
||||
import os, shutil
|
||||
import unittest
|
||||
|
||||
unittest.TestLoader.sortTestMethodsUsing = None
|
||||
@ -6,21 +6,18 @@ unittest.TestLoader.sortTestMethodsUsing = None
|
||||
class TestShaping(unittest.TestCase):
|
||||
def setUp(self):
|
||||
try:
|
||||
import netgen
|
||||
NETGEN_MODULE = True
|
||||
import netgen.occ
|
||||
_ = netgen.occ.Pnt(0, 0, 0)
|
||||
|
||||
except ImportError:
|
||||
NETGEN_MODULE = False
|
||||
|
||||
if not NETGEN_MODULE:
|
||||
self.skipTest("Missing Netgen.")
|
||||
except Exception as e:
|
||||
self.skipTest(e)
|
||||
|
||||
else:
|
||||
from anisotropy import shaping
|
||||
|
||||
self.shaping = shaping
|
||||
|
||||
self.outputPath = os.path.join(os.path.abspath("."), "tests/test_shaping_output")
|
||||
self.outputPath = os.path.join(os.path.dirname(__file__), "test_shaping_output")
|
||||
os.makedirs(self.outputPath, exist_ok = True)
|
||||
|
||||
def test_simple(self):
|
||||
@ -68,7 +65,7 @@ class TestShaping(unittest.TestCase):
|
||||
faceCentered111.export(os.path.join(self.outputPath, "faceCentered111.step"))
|
||||
|
||||
def tearDown(self):
|
||||
pass
|
||||
shutil.rmtree(self.outputPath)
|
||||
|
||||
if __name__ == "__main__":
|
||||
unittest.main()
|
||||
|
Loading…
Reference in New Issue
Block a user