From 04bb32b5805fcd06ba162a1934341eff66ec02de Mon Sep 17 00:00:00 2001 From: rzommers Date: Mon, 16 Dec 2024 14:55:54 -0500 Subject: [PATCH 01/19] Create .readthedocs.yaml --- .readthedocs.yaml | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 .readthedocs.yaml diff --git a/.readthedocs.yaml b/.readthedocs.yaml new file mode 100644 index 0000000..3c72076 --- /dev/null +++ b/.readthedocs.yaml @@ -0,0 +1,14 @@ +version: "2" + +build: + os: "ubuntu-22.04" + tools: + python: "3.10" + +python: + install: + - requirements: rtd/requirements.txt + +sphinx: + configuration: rtd/source/conf.py + fail_on_warning: false From 56750d69d4f81281bbaea37424c11d9d8e4b9332 Mon Sep 17 00:00:00 2001 From: rzommers Date: Mon, 16 Dec 2024 14:56:32 -0500 Subject: [PATCH 02/19] Create Makefile --- rtd/Makefile | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 rtd/Makefile diff --git a/rtd/Makefile b/rtd/Makefile new file mode 100644 index 0000000..d0c3cbf --- /dev/null +++ b/rtd/Makefile @@ -0,0 +1,20 @@ +# Minimal makefile for Sphinx documentation +# + +# You can set these variables from the command line, and also +# from the environment for the first two. +SPHINXOPTS ?= +SPHINXBUILD ?= sphinx-build +SOURCEDIR = source +BUILDDIR = build + +# Put it first so that "make" without argument is like "make help". +help: + @$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) + +.PHONY: help Makefile + +# Catch-all target: route all unknown targets to Sphinx using the new +# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS). +%: Makefile + @$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) From b155c612f1b0ed734f6ea5b305c3230402654c87 Mon Sep 17 00:00:00 2001 From: rzommers Date: Mon, 16 Dec 2024 14:56:53 -0500 Subject: [PATCH 03/19] Create make.bat --- rtd/make.bat | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 rtd/make.bat diff --git a/rtd/make.bat b/rtd/make.bat new file mode 100644 index 0000000..9534b01 --- /dev/null +++ b/rtd/make.bat @@ -0,0 +1,35 @@ +@ECHO OFF + +pushd %~dp0 + +REM Command file for Sphinx documentation + +if "%SPHINXBUILD%" == "" ( + set SPHINXBUILD=sphinx-build +) +set SOURCEDIR=source +set BUILDDIR=build + +if "%1" == "" goto help + +%SPHINXBUILD% >NUL 2>NUL +if errorlevel 9009 ( + echo. + echo.The 'sphinx-build' command was not found. Make sure you have Sphinx + echo.installed, then set the SPHINXBUILD environment variable to point + echo.to the full path of the 'sphinx-build' executable. Alternatively you + echo.may add the Sphinx directory to PATH. + echo. + echo.If you don't have Sphinx installed, grab it from + echo.http://sphinx-doc.org/ + exit /b 1 +) + +%SPHINXBUILD% -M %1 %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O% +goto end + +:help +%SPHINXBUILD% -M help %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O% + +:end +popd From 26ed43a8596ed8edabddb498a8f6ea18878f209b Mon Sep 17 00:00:00 2001 From: rzommers Date: Mon, 16 Dec 2024 14:57:16 -0500 Subject: [PATCH 04/19] Create requirements.txt --- rtd/requirements.txt | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 rtd/requirements.txt diff --git a/rtd/requirements.txt b/rtd/requirements.txt new file mode 100644 index 0000000..2213189 --- /dev/null +++ b/rtd/requirements.txt @@ -0,0 +1,4 @@ +sphinx==8.1.3 +sphinx-rtd-theme==3.0.1 +markdown-it-py==3.0.0 +myst-parser==4.0.0 From cfbfbf7fdf2b2b4264a0b70c64be260ec425428e Mon Sep 17 00:00:00 2001 From: rzommers Date: Mon, 16 Dec 2024 14:58:10 -0500 Subject: [PATCH 05/19] Create conf.py --- rtd/source/conf.py | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 rtd/source/conf.py diff --git a/rtd/source/conf.py b/rtd/source/conf.py new file mode 100644 index 0000000..5b2c22b --- /dev/null +++ b/rtd/source/conf.py @@ -0,0 +1,36 @@ +# Configuration file for the Sphinx documentation builder. + +# -- Project information + +project = 'MotorModel Setup' +copyright = +author = + +release = '0.1' +version = '0.1.0' + +# -- General configuration + +extensions = [ + 'sphinx.ext.duration', + 'sphinx.ext.doctest', + 'sphinx.ext.autodoc', + 'sphinx.ext.autosummary', + 'sphinx.ext.intersphinx', + "myst_parser", +] + +intersphinx_mapping = { + 'python': ('https://docs.python.org/3/', None), + 'sphinx': ('https://www.sphinx-doc.org/en/master/', None), +} +intersphinx_disabled_domains = ['std'] + +templates_path = ['_templates'] + +# -- Options for HTML output + +html_theme = 'sphinx_rtd_theme' + +# -- Options for EPUB output +epub_show_urls = 'footnote' From 4b28203a5794dddd8111fffac9697458934a136a Mon Sep 17 00:00:00 2001 From: rzommers Date: Mon, 16 Dec 2024 14:58:40 -0500 Subject: [PATCH 06/19] Create index.md --- rtd/source/index.md | 84 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 84 insertions(+) create mode 100644 rtd/source/index.md diff --git a/rtd/source/index.md b/rtd/source/index.md new file mode 100644 index 0000000..b117908 --- /dev/null +++ b/rtd/source/index.md @@ -0,0 +1,84 @@ +# User Guide for SCOREC Motor Model + +This guide explains in a step-by-step approach the recommended way to install the MotorModel software package. + +The simulations within the MotorModel package use MISO, which is a C++ software library built on MFEM. Before continuing, MISO must be completely built, as well as MFEM and other dependencies. + +Go to [Insert Link] to find a guide on setting up MISO. It is strongly recommended that everything listed within this guide is built in one folder so that the eventual Python environment will be able to find all of the installed dependencies. + +Some of the tests contained within MotorModel require the use of SNOPT, which, unlike the other dependencies for this package, is not open-source, and must be purchased. See the [SNOPT Website](http://www.sbsi-sol-optimize.com/asp/sol_product_snopt.htm) for more information. + +## Python + +While the supporting MFEM and MISO libraries are made in C++, the code that is used to run an analysis is written in Python. Any work with Python must come after all of the above dependencies are installed. + +Python must be installed as a systems package. Another package, patch, is also required to install one of the dependencies. Patch is included with WSL [confirm information], but may need to be manually installed if you are using another platform. + +``` +sudo apt-get install python +sudo apt-get install patch +``` + +## Environment Setup + +A virtual environment must be made to be able to access Python libraries while in the terminal. All Python files must be kept in the same file location as the C++ dependencies. + +Enter the terminal and navigate to the motor folder. Use the following lines of code to create and activate a virtual Python environment. + +``` +python -m venv source /[path_to_motor_folder]/python +source /[path_to_motor_folder]/python/bin/activate +``` + +The source command must be repeated on each PC reboot, if Python needs to be used. + +## Dependency Downloads and Installations + +MotorModel, mphys, and omESP must all be downloaded and installed in the Python environment, and MISO must have its Python layer installed as well. + +Enter the terminal and navigate to the motor folder. Use the following lines of code to download and install the various Python-based dependencies. + +``` +cd MISO +pip install -e . + +cd ../Dependencies + +git clone https://github.com/tuckerbabcock/MotorModel.git +cd MotorModel +git checkout 12d953921a4dc926ac6ef31018de61f35b664014 +pip install -e . +cd .. + +git clone https://github.com/tuckerbabcock/mphys.git +cd mphys +git checkout c67212caca8ecb4a934b4b4bb05c1989b7041f03 +pip install -e . +cd .. + +git clone https://github.com/tuckerbabcock/omESP.git +cd omESP +git checkout b421974a6932780f5b80096228cb2bcf0d63c931 +pip install -e . +cd ../.. +``` + +## Building PyOptSparse + +PyOptSparse is the final installation for Python. This installation requires SNOPT. If SNOPT is not available, then the next step can not be completed. SNOPT is used for large-scale optimization problems, so it may be possible to use another package that has similar capabilities. The MotorModel tests and the below code assume that SNOPT is used, and they are not guaranteed to function with an alternative package. + +When SNOPT is acquired, the files must be placed in the motor folder so as to be used by the Python environment. + +Enter the terminal and navigate to the motor folder. Use the following lines of code to download and install PyOptSparse using SNOPT. + +``` +git clone https://github.com/OpenMDAO/build_pyoptsparse.git +cd build_pyoptsparse/ +pip install -e . +python build_pyoptsparse.py -s '/[path_to_motor_folder]/SNOPT' +cd .. +``` + +## Running an Analysis + +[Info TBA] From 2893ae63331f6d228b35043655600bd3af88a72e Mon Sep 17 00:00:00 2001 From: rzommers Date: Mon, 16 Dec 2024 15:03:43 -0500 Subject: [PATCH 07/19] Update conf.py --- rtd/source/conf.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/rtd/source/conf.py b/rtd/source/conf.py index 5b2c22b..c094b0b 100644 --- a/rtd/source/conf.py +++ b/rtd/source/conf.py @@ -3,8 +3,8 @@ # -- Project information project = 'MotorModel Setup' -copyright = -author = +copyright = 'TBA' +author = 'TBA' release = '0.1' version = '0.1.0' From d60288a2339a7eca38584ba0832d097228e6ac37 Mon Sep 17 00:00:00 2001 From: rzommers Date: Mon, 16 Dec 2024 16:20:27 -0500 Subject: [PATCH 08/19] Update index.md Edited for clarity --- rtd/source/index.md | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/rtd/source/index.md b/rtd/source/index.md index b117908..8246116 100644 --- a/rtd/source/index.md +++ b/rtd/source/index.md @@ -4,7 +4,7 @@ This guide explains in a step-by-step approach the recommended way to install th The simulations within the MotorModel package use MISO, which is a C++ software library built on MFEM. Before continuing, MISO must be completely built, as well as MFEM and other dependencies. -Go to [Insert Link] to find a guide on setting up MISO. It is strongly recommended that everything listed within this guide is built in one folder so that the eventual Python environment will be able to find all of the installed dependencies. +Go to [MISO Installation](https://miso-installation.readthedocs.io/en/latest/) to find a guide on setting up MISO. It is strongly recommended that all downloads and builds are completed in one folder so that the eventual Python environment will be able to find all of the installed dependencies. This guide assumes that the formatting is the same as what's recommended in the MISO guide. Some of the tests contained within MotorModel require the use of SNOPT, which, unlike the other dependencies for this package, is not open-source, and must be purchased. See the [SNOPT Website](http://www.sbsi-sol-optimize.com/asp/sol_product_snopt.htm) for more information. @@ -12,11 +12,11 @@ Some of the tests contained within MotorModel require the use of SNOPT, which, u While the supporting MFEM and MISO libraries are made in C++, the code that is used to run an analysis is written in Python. Any work with Python must come after all of the above dependencies are installed. -Python must be installed as a systems package. Another package, patch, is also required to install one of the dependencies. Patch is included with WSL [confirm information], but may need to be manually installed if you are using another platform. +Python must be installed as a systems package. Another package, patch, is also required to install one of the dependencies. Patch is included with WSL, but may need to be manually installed if you are using another platform. ``` -sudo apt-get install python -sudo apt-get install patch +sudo apt install python +sudo apt install patch ``` ## Environment Setup @@ -30,11 +30,11 @@ python -m venv source /[path_to_motor_folder]/python source /[path_to_motor_folder]/python/bin/activate ``` -The source command must be repeated on each PC reboot, if Python needs to be used. +The source command must be repeated on each PC reboot, when Python is being used. ## Dependency Downloads and Installations -MotorModel, mphys, and omESP must all be downloaded and installed in the Python environment, and MISO must have its Python layer installed as well. +MotorModel, along with dependencies mphys and omESP, must be downloaded and installed within the Python environment, and MISO must have its Python layer installed as well. Enter the terminal and navigate to the motor folder. Use the following lines of code to download and install the various Python-based dependencies. @@ -65,7 +65,7 @@ cd ../.. ## Building PyOptSparse -PyOptSparse is the final installation for Python. This installation requires SNOPT. If SNOPT is not available, then the next step can not be completed. SNOPT is used for large-scale optimization problems, so it may be possible to use another package that has similar capabilities. The MotorModel tests and the below code assume that SNOPT is used, and they are not guaranteed to function with an alternative package. +PyOptSparse is the final installation for Python. This installation requires SNOPT. If SNOPT is not available, then the next step can not be completed. SNOPT is used for large-scale optimization problems, so it may be possible to use another package that has similar capabilities. The MotorModel tests and the below code assume that SNOPT is used, and they are not guaranteed to function properly with an alternative package. When SNOPT is acquired, the files must be placed in the motor folder so as to be used by the Python environment. @@ -81,4 +81,4 @@ cd .. ## Running an Analysis -[Info TBA] +At this time, there is an error preventing the running of an analysis. Further instructions will be added when the issue has been corrected. From 994f10c36e27a1f728f5c0d53aa7c071f9ac051d Mon Sep 17 00:00:00 2001 From: rzommers Date: Tue, 17 Dec 2024 12:06:59 -0500 Subject: [PATCH 09/19] Delete rtd/source/conf.py --- rtd/source/conf.py | 36 ------------------------------------ 1 file changed, 36 deletions(-) delete mode 100644 rtd/source/conf.py diff --git a/rtd/source/conf.py b/rtd/source/conf.py deleted file mode 100644 index c094b0b..0000000 --- a/rtd/source/conf.py +++ /dev/null @@ -1,36 +0,0 @@ -# Configuration file for the Sphinx documentation builder. - -# -- Project information - -project = 'MotorModel Setup' -copyright = 'TBA' -author = 'TBA' - -release = '0.1' -version = '0.1.0' - -# -- General configuration - -extensions = [ - 'sphinx.ext.duration', - 'sphinx.ext.doctest', - 'sphinx.ext.autodoc', - 'sphinx.ext.autosummary', - 'sphinx.ext.intersphinx', - "myst_parser", -] - -intersphinx_mapping = { - 'python': ('https://docs.python.org/3/', None), - 'sphinx': ('https://www.sphinx-doc.org/en/master/', None), -} -intersphinx_disabled_domains = ['std'] - -templates_path = ['_templates'] - -# -- Options for HTML output - -html_theme = 'sphinx_rtd_theme' - -# -- Options for EPUB output -epub_show_urls = 'footnote' From be9ae7d61d07186b489d66f43c6b4a0967af671c Mon Sep 17 00:00:00 2001 From: rzommers Date: Tue, 17 Dec 2024 12:07:16 -0500 Subject: [PATCH 10/19] Rename index.md to index.md --- rtd/{source => docs}/index.md | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename rtd/{source => docs}/index.md (100%) diff --git a/rtd/source/index.md b/rtd/docs/index.md similarity index 100% rename from rtd/source/index.md rename to rtd/docs/index.md From 933c0b1db483343d71b6ede1afd65f4d7e3ca444 Mon Sep 17 00:00:00 2001 From: rzommers Date: Tue, 17 Dec 2024 12:07:29 -0500 Subject: [PATCH 11/19] Delete rtd/Makefile --- rtd/Makefile | 20 -------------------- 1 file changed, 20 deletions(-) delete mode 100644 rtd/Makefile diff --git a/rtd/Makefile b/rtd/Makefile deleted file mode 100644 index d0c3cbf..0000000 --- a/rtd/Makefile +++ /dev/null @@ -1,20 +0,0 @@ -# Minimal makefile for Sphinx documentation -# - -# You can set these variables from the command line, and also -# from the environment for the first two. -SPHINXOPTS ?= -SPHINXBUILD ?= sphinx-build -SOURCEDIR = source -BUILDDIR = build - -# Put it first so that "make" without argument is like "make help". -help: - @$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) - -.PHONY: help Makefile - -# Catch-all target: route all unknown targets to Sphinx using the new -# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS). -%: Makefile - @$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) From 3a70ef664ba9859aa6d0edb2931f5b1a218c2b05 Mon Sep 17 00:00:00 2001 From: rzommers Date: Tue, 17 Dec 2024 12:07:36 -0500 Subject: [PATCH 12/19] Delete rtd/make.bat --- rtd/make.bat | 35 ----------------------------------- 1 file changed, 35 deletions(-) delete mode 100644 rtd/make.bat diff --git a/rtd/make.bat b/rtd/make.bat deleted file mode 100644 index 9534b01..0000000 --- a/rtd/make.bat +++ /dev/null @@ -1,35 +0,0 @@ -@ECHO OFF - -pushd %~dp0 - -REM Command file for Sphinx documentation - -if "%SPHINXBUILD%" == "" ( - set SPHINXBUILD=sphinx-build -) -set SOURCEDIR=source -set BUILDDIR=build - -if "%1" == "" goto help - -%SPHINXBUILD% >NUL 2>NUL -if errorlevel 9009 ( - echo. - echo.The 'sphinx-build' command was not found. Make sure you have Sphinx - echo.installed, then set the SPHINXBUILD environment variable to point - echo.to the full path of the 'sphinx-build' executable. Alternatively you - echo.may add the Sphinx directory to PATH. - echo. - echo.If you don't have Sphinx installed, grab it from - echo.http://sphinx-doc.org/ - exit /b 1 -) - -%SPHINXBUILD% -M %1 %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O% -goto end - -:help -%SPHINXBUILD% -M help %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O% - -:end -popd From f403ec8dde7f840bbb5e9dfb17f55eab8cb8cd83 Mon Sep 17 00:00:00 2001 From: rzommers Date: Tue, 17 Dec 2024 12:07:52 -0500 Subject: [PATCH 13/19] Update and rename rtd/requirements.txt to rtd/docs/requirements.txt --- rtd/docs/requirements.txt | 66 +++++++++++++++++++++++++++++++++++++++ rtd/requirements.txt | 4 --- 2 files changed, 66 insertions(+), 4 deletions(-) create mode 100644 rtd/docs/requirements.txt delete mode 100644 rtd/requirements.txt diff --git a/rtd/docs/requirements.txt b/rtd/docs/requirements.txt new file mode 100644 index 0000000..f6cb652 --- /dev/null +++ b/rtd/docs/requirements.txt @@ -0,0 +1,66 @@ +# +# This file is autogenerated by pip-compile with python 3.10 +# To update, run: +# +# pip-compile docs/requirements.in +# +click==8.1.3 + # via mkdocs +ghp-import==2.1.0 + # via mkdocs +griffe==0.22.0 + # via mkdocstrings-python +importlib-metadata==4.12.0 + # via mkdocs +jinja2==3.1.2 + # via + # mkdocs + # mkdocstrings +markdown==3.3.7 + # via + # markdown-include + # mkdocs + # mkdocs-autorefs + # mkdocstrings + # pymdown-extensions +markdown-include==0.6.0 + # via -r docs/requirements.in +markupsafe==2.1.1 + # via + # jinja2 + # mkdocstrings +mergedeep==1.3.4 + # via mkdocs +mkdocs==1.3.0 + # via + # -r docs/requirements.in + # mkdocs-autorefs + # mkdocstrings +mkdocs-autorefs==0.4.1 + # via mkdocstrings +mkdocstrings[python]==0.19.0 + # via + # -r docs/requirements.in + # mkdocstrings-python +mkdocstrings-python==0.7.1 + # via mkdocstrings +packaging==21.3 + # via mkdocs +pymdown-extensions==9.5 + # via mkdocstrings +pyparsing==3.0.9 + # via packaging +python-dateutil==2.8.2 + # via ghp-import +pyyaml==6.0 + # via + # mkdocs + # pyyaml-env-tag +pyyaml-env-tag==0.1 + # via mkdocs +six==1.16.0 + # via python-dateutil +watchdog==2.1.9 + # via mkdocs +zipp==3.8.0 + # via importlib-metadata diff --git a/rtd/requirements.txt b/rtd/requirements.txt deleted file mode 100644 index 2213189..0000000 --- a/rtd/requirements.txt +++ /dev/null @@ -1,4 +0,0 @@ -sphinx==8.1.3 -sphinx-rtd-theme==3.0.1 -markdown-it-py==3.0.0 -myst-parser==4.0.0 From a2b98a80776bc8556dce89b22b7e165d606f8e8e Mon Sep 17 00:00:00 2001 From: rzommers Date: Tue, 17 Dec 2024 12:08:13 -0500 Subject: [PATCH 14/19] Create requirements.in --- rtd/docs/requirements.in | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 rtd/docs/requirements.in diff --git a/rtd/docs/requirements.in b/rtd/docs/requirements.in new file mode 100644 index 0000000..bec300c --- /dev/null +++ b/rtd/docs/requirements.in @@ -0,0 +1,3 @@ +mkdocs +mkdocstrings[python] +markdown-include From 0e313bd469875ed0f3a239eb3f6eae0ee93d674c Mon Sep 17 00:00:00 2001 From: rzommers Date: Tue, 17 Dec 2024 12:08:44 -0500 Subject: [PATCH 15/19] Create mkdocs.yml --- rtd/mkdocs.yml | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 rtd/mkdocs.yml diff --git a/rtd/mkdocs.yml b/rtd/mkdocs.yml new file mode 100644 index 0000000..c83f581 --- /dev/null +++ b/rtd/mkdocs.yml @@ -0,0 +1,16 @@ +site_name: MotorModel Installation +theme: + name: readthedocs + highlightjs: true +plugins: + - search + - mkdocstrings: + handlers: + # See: https://mkdocstrings.github.io/python/usage/ + python: + options: + docstring_style: sphinx +markdown_extensions: + - markdown_include.include: + base_path: . + - admonition From e471a4c4a25e03175a8bf02f28905d1895c8812f Mon Sep 17 00:00:00 2001 From: rzommers Date: Tue, 17 Dec 2024 12:09:18 -0500 Subject: [PATCH 16/19] Update .readthedocs.yaml --- .readthedocs.yaml | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/.readthedocs.yaml b/.readthedocs.yaml index 3c72076..dc2a526 100644 --- a/.readthedocs.yaml +++ b/.readthedocs.yaml @@ -7,8 +7,7 @@ build: python: install: - - requirements: rtd/requirements.txt + - requirements: rtd/docs/requirements.txt -sphinx: - configuration: rtd/source/conf.py - fail_on_warning: false +mkdocs: + configuration: rtd/mkdocs.yml From 5a06f7ebf771368346139ae0f7db1c2755bbb8ce Mon Sep 17 00:00:00 2001 From: rzommers Date: Tue, 17 Dec 2024 14:18:13 -0500 Subject: [PATCH 17/19] Update index.md Python Wrapper explanation --- rtd/docs/index.md | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/rtd/docs/index.md b/rtd/docs/index.md index 8246116..4004833 100644 --- a/rtd/docs/index.md +++ b/rtd/docs/index.md @@ -4,7 +4,7 @@ This guide explains in a step-by-step approach the recommended way to install th The simulations within the MotorModel package use MISO, which is a C++ software library built on MFEM. Before continuing, MISO must be completely built, as well as MFEM and other dependencies. -Go to [MISO Installation](https://miso-installation.readthedocs.io/en/latest/) to find a guide on setting up MISO. It is strongly recommended that all downloads and builds are completed in one folder so that the eventual Python environment will be able to find all of the installed dependencies. This guide assumes that the formatting is the same as what's recommended in the MISO guide. +Go to [MISO Installation](https://miso-installation.readthedocs.io/en/latest/) to find a guide on setting up MISO. It is strongly recommended that all downloads and builds are completed in one folder so that the eventual Python environment will be able to find all of the installed dependencies. This guide assumes that the formatting is the same as what's recommended in the MISO guide. If you use this guide, make sure that MISO has its Python wrapper built by following the instructions. Some of the tests contained within MotorModel require the use of SNOPT, which, unlike the other dependencies for this package, is not open-source, and must be purchased. See the [SNOPT Website](http://www.sbsi-sol-optimize.com/asp/sol_product_snopt.htm) for more information. @@ -12,10 +12,12 @@ Some of the tests contained within MotorModel require the use of SNOPT, which, u While the supporting MFEM and MISO libraries are made in C++, the code that is used to run an analysis is written in Python. Any work with Python must come after all of the above dependencies are installed. -Python must be installed as a systems package. Another package, patch, is also required to install one of the dependencies. Patch is included with WSL, but may need to be manually installed if you are using another platform. +Python must be installed as a series of systems packages. Another package, patch, is also required to install one of the dependencies. Patch is included with WSL, but may need to be manually installed if you are using another platform. ``` -sudo apt install python +sudo apt install python3 +sudo apt install python3-pip +sudo apt install python3-mpi4py sudo apt install patch ``` From 8ac0e2ef4250aa1d05e3cbcaac11df04264f6831 Mon Sep 17 00:00:00 2001 From: rzommers Date: Tue, 17 Dec 2024 15:46:33 -0500 Subject: [PATCH 18/19] Update index.md --- rtd/docs/index.md | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/rtd/docs/index.md b/rtd/docs/index.md index 4004833..9636f3d 100644 --- a/rtd/docs/index.md +++ b/rtd/docs/index.md @@ -18,7 +18,10 @@ Python must be installed as a series of systems packages. Another package, patch sudo apt install python3 sudo apt install python3-pip sudo apt install python3-mpi4py +sudo apt install python3.10-venv sudo apt install patch +sudo apt install swig +sudo apt install libblas-dev liblapack-dev libopenblas-dev ``` ## Environment Setup @@ -46,12 +49,6 @@ pip install -e . cd ../Dependencies -git clone https://github.com/tuckerbabcock/MotorModel.git -cd MotorModel -git checkout 12d953921a4dc926ac6ef31018de61f35b664014 -pip install -e . -cd .. - git clone https://github.com/tuckerbabcock/mphys.git cd mphys git checkout c67212caca8ecb4a934b4b4bb05c1989b7041f03 @@ -62,6 +59,12 @@ git clone https://github.com/tuckerbabcock/omESP.git cd omESP git checkout b421974a6932780f5b80096228cb2bcf0d63c931 pip install -e . +cd .. + +git clone https://github.com/tuckerbabcock/MotorModel.git +cd MotorModel +git checkout 12d953921a4dc926ac6ef31018de61f35b664014 +pip install -e . cd ../.. ``` @@ -75,9 +78,10 @@ Enter the terminal and navigate to the motor folder. Use the following lines of ``` git clone https://github.com/OpenMDAO/build_pyoptsparse.git -cd build_pyoptsparse/ +cd build_pyoptsparse pip install -e . python build_pyoptsparse.py -s '/[path_to_motor_folder]/SNOPT' +export LD_LIBRARY_PATH=$VIRTUAL_ENV/lib cd .. ``` From 91190f9a65d7317d252e92152e7bb4afc8da5c0e Mon Sep 17 00:00:00 2001 From: rzommers Date: Sat, 21 Dec 2024 13:36:45 -0500 Subject: [PATCH 19/19] Update index.md Updated for ESP fix --- rtd/docs/index.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/rtd/docs/index.md b/rtd/docs/index.md index 9636f3d..34803c2 100644 --- a/rtd/docs/index.md +++ b/rtd/docs/index.md @@ -4,7 +4,7 @@ This guide explains in a step-by-step approach the recommended way to install th The simulations within the MotorModel package use MISO, which is a C++ software library built on MFEM. Before continuing, MISO must be completely built, as well as MFEM and other dependencies. -Go to [MISO Installation](https://miso-installation.readthedocs.io/en/latest/) to find a guide on setting up MISO. It is strongly recommended that all downloads and builds are completed in one folder so that the eventual Python environment will be able to find all of the installed dependencies. This guide assumes that the formatting is the same as what's recommended in the MISO guide. If you use this guide, make sure that MISO has its Python wrapper built by following the instructions. +Go to [MISO Installation](https://miso-installation.readthedocs.io/en/latest/) to find a guide on setting up MISO. It is strongly recommended that all downloads and builds are completed in one folder so that the eventual Python environment will be able to find all of the installed dependencies. This guide assumes that the formatting is the same as what's recommended in the MISO guide. If you use this guide, make sure that you follow the instructions to incorporate Python functionality. Some of the tests contained within MotorModel require the use of SNOPT, which, unlike the other dependencies for this package, is not open-source, and must be purchased. See the [SNOPT Website](http://www.sbsi-sol-optimize.com/asp/sol_product_snopt.htm) for more information. @@ -28,6 +28,8 @@ sudo apt install libblas-dev liblapack-dev libopenblas-dev A virtual environment must be made to be able to access Python libraries while in the terminal. All Python files must be kept in the same file location as the C++ dependencies. +If a Python environment has already been created, skip this step. + Enter the terminal and navigate to the motor folder. Use the following lines of code to create and activate a virtual Python environment. ```