Installation#
ELASPY can be installed in two ways: using a ZIP file or manually.
Using ZIP#
You can easily download all files from the GitHub repository. Follow these steps:
Navigate to the GitHub repository.
Select the green “Code” button, select “Local” and then “Download ZIP”. This downloads the whole repository to your local machine.
Open the ZIP and rename the resulting folder to
ELASPY
. Move the folder to a location of your preference, such as thedocuments
folder.Move to the
ELASPY
folder with the command line. For example, if you placed theELASPY
folder in thedocuments
folder, you can use the following command:
cd documents/ELASPY
Use an environment manager to create an environment in which you can run the code, such as Anaconda or Miniconda. You can use the following command to create an environment called
ELASPY
by using theenvironment.yml
file that is also part of yourELASPY
folder:
conda env create -f environment.yml
Installing the environment takes a few minutes.
Activate the environment. If you use Anaconda or Miniconda, you can use the following command:
conda activate ELASPY
Done! See the Quickstart for information on how to run your first simulation.
Note
If you use a different environment manager than Anaconda or Miniconda, please refer to the documentation of your environment manager on how to create an environment using a requirements.txt
or environment.yml
file.
Manually#
Create a folder on your desktop computer called
ELASPY
with three subfolders:data
,elaspy
andresults
.Download the data from the GitHub repository and place these in your local
data
folder.Download the Python files from the GitHub repository and place these in your local
elaspy
folder. If you also want to use the MEXCLP and/or advanced plotting scripts, download and place these Python files in separate folders in your localelaspy
folder namedmexclp
andadvanced_plotting
, respectively.Move to the
ELASPY
folder with the command line. For example, if you placed theELASPY
folder in the documents folder, you can use the following command:
cd documents/ELASPY
Use an environment manager to create an environment in which you can run the code, such as Anaconda or Miniconda. You can use the following command to create an environment called
ELASPY
by using theenvironment.yml
file that can be downloaded from the GitHub repository:
conda env create -f environment.yml
Installing the environment takes a few minutes.
Activate the environment. If you use Anaconda or Miniconda, you can use the following command:
conda activate ELASPY
Done! See the Quickstart for information on how to run your first simulation.
Note
If you use a different environment manager than Anaconda or Miniconda, please refer to the documentation of your environment manager on how to create an environment using a requirements.txt
or environment.yml
file.
Checking the installation#
You can check whether the installation was successful by running the included test suite. Follow these steps to do so:
Open the command line and move to the
ELASPY
folder.Run the tests by using the following command:
pytest elaspy/tests.py
If all tests pass: done! If not, please read the test output carefully to finish the installation.
Note
It might be the case that pytest provides some warnings in the test results. If these are DepreciationWarnings
of packages other than ELASPY
, you can ignore these.
Dependencies#
The package is dependent on several other Python packages, such as NumPy and pandas. These packages and their versions can be found in the requirement files (requirements.txt
and environment.yml
) in the GitHub repository.