Skip to main content

Tools for soil liquefaction analysis

Project description

Testing Status https://circleci.com/gh/eng-tools/liquepy.svg?style=svg PyPi version https://coveralls.io/repos/github/eng-tools/liquepy/badge.svg License DOI

Liquepy

Python tools for solving problems related to soil liquefaction

Features

  • 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

Installation

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]

Contributors

How do I get set up?

  1. Run pip install -r requirements.txt

Code suggestions

  • 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.

Formatting

  • 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)

Testing

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:

  1. Install the check docs package: Run pip install collective.checkdocs

  2. Run the check docs package and fix the errors: Run python setup.py checkdocs

Deployment

To deploy the package to pypi.com you need to:

  1. Push to the pypi branch. This executes the tests on circleci.com

  2. 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

Python 3.10+ and numpy 2.x are required. See pyproject.toml for full dependency and build requirements.

Code style and formatting are enforced with black and isort via pre-commit hooks. To set up development tools:

pip install -r requirements.txt
pip install .[test,maps,sra,fig]
pip install pre-commit
pre-commit install

All code contributions should include complete docstrings and type annotations for public APIs.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

liquepy-0.6.34.tar.gz (84.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

liquepy-0.6.34-py3-none-any.whl (80.7 kB view details)

Uploaded Python 3

File details

Details for the file liquepy-0.6.34.tar.gz.

File metadata

  • Download URL: liquepy-0.6.34.tar.gz
  • Upload date:
  • Size: 84.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for liquepy-0.6.34.tar.gz
Algorithm Hash digest
SHA256 b37825ab2bfb4409fdd2940247b2aa547c34ce533fddf08beef9a7d10b72e663
MD5 5ab01476b85a835a2f8e3a83bacd761f
BLAKE2b-256 8a54c8d6963aaf1145d89d0a469750b8614b7b8b323c81d602980c53dc2d1d3e

See more details on using hashes here.

Provenance

The following attestation bundles were made for liquepy-0.6.34.tar.gz:

Publisher: release.yaml on eng-tools/liquepy

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file liquepy-0.6.34-py3-none-any.whl.

File metadata

  • Download URL: liquepy-0.6.34-py3-none-any.whl
  • Upload date:
  • Size: 80.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for liquepy-0.6.34-py3-none-any.whl
Algorithm Hash digest
SHA256 f64a573e37ec8893e83c7f351f1951c1a07713b23d6e2c91226bc3f0f7a0a322
MD5 e2ebaa9a155a6f61fbb834a28a5d3bab
BLAKE2b-256 d4233becc3361b021c76ae62aa2e370b2305507b2c39c2626da72165ab123652

See more details on using hashes here.

Provenance

The following attestation bundles were made for liquepy-0.6.34-py3-none-any.whl:

Publisher: release.yaml on eng-tools/liquepy

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page