Python tools for solving problems related to soil liquefaction
- Triggering:
- Calculate liquefaction factor of safety according to Boulanger and Idriss (2014)
- Calculate expected lateral strain and volumetric strain according to Zhang et al (2002)
- Settlement:
- Calculate foundation settlement on liquefiable deposit according to Karamitros et al. (2013) or Bray et al. (2018)
- Element tests:
- Calculate the dissipated energy required to liquefy
- Site response analysis
- Perform equivalent linear site response analysis using the pysra package
pip install liquepy
Optional modules (sra, fig, spatial) require large third-party dependencies and therefore do not import unless dependencies are satisfied.
to install all dependencies for these optional modules run (example for installing sra dependencies)
pip install liquepy[sra]
- Run
pip install -r requirements.txt
- Implementations of published liquefaction methods should be written as calc_<property>_<first_author>[_et_al]_<date>() for two authors include both.
- Plotting and visualisation should be not included in computation objects. Instead plotting functions or objects should receive computation objects as inputs.
- Follow pep8 formatting standard (except for line character limit not strictly observed)
- Docstrings written in numpy format
- Tabulated data stored as comma separated or semi-colon separated files (not xlsx or xls)
Tests are run with pytest
- Locally run:
pytest
on the command line. - Tests are run on every push using travis, see the
.travis.yml
file
To test the docs:
- Install the check docs package: Run
pip install collective.checkdocs
- Run the check docs package and fix the errors: Run
python setup.py checkdocs
To deploy the package to pypi.com you need to:
- Push to the pypi branch. This executes the tests on circleci.com
- Create a git tag and push to github, run:
trigger_deploy.py
or manually:git tag 0.5.2 -m "version 0.5.2" git push --tags origin pypi