### Install Project Dependencies with Pipenv Source: https://github.com/patrickboateng/geolysis/wiki/Contributing-Guidelines Install all necessary project dependencies using pipenv. Ensure pipenv is installed first. ```shell pipenv install ``` -------------------------------- ### Install geolysis Package Source: https://github.com/patrickboateng/geolysis/blob/main/docs/index.md Install the geolysis package using pip. For Unix systems, use 'pip3 install geolysis'. ```shell pip install geolysis # "pip3 install geolysis" for unix systems ``` -------------------------------- ### Install geolysis Package Source: https://github.com/patrickboateng/geolysis/blob/main/README.md Install the geolysis library using pip. This command should be run in your terminal. ```shell pip install geolysis ``` -------------------------------- ### Create and Calculate Ultimate Bearing Capacity (Vesic) Source: https://github.com/patrickboateng/geolysis/blob/main/docs/user_guide/ultimate-bearing-capacity.md Use `create_ubc_4_all_soils` to initialize a bearing capacity calculation with Vesic's method. Specify soil properties, foundation dimensions, and shape. Then, call `ultimate_bearing_capacity` to get the result. ```python from geolysis.bearing_capacity.ubc import create_ubc_4_all_soils hansen_ubc = create_ubc_4_all_soils(friction_angle=20.0, cohesion=20.0, moist_unit_wgt=18.0, depth=1.5, width=2.0, shape="square", ubc_method="vesic") hansen_ubc.ultimate_bearing_capacity() ``` -------------------------------- ### Check geolysis Version in Python Shell Source: https://github.com/patrickboateng/geolysis/blob/main/docs/index.md Import the geolysis library and print its version to verify installation in a Python shell. ```python import geolysis as gl print(gl.__version__) ``` -------------------------------- ### Calculate Allowable Bearing Capacity with Bowles Method Source: https://github.com/patrickboateng/geolysis/blob/main/docs/user_guide/allowable-bearing-capacity.md Use this function to calculate the allowable bearing capacity for cohesionless soils using the Bowles method. Ensure you have the geolysis library installed. Specify corrected SPT N-value, tolerance settlement, foundation dimensions, shape, foundation type, and the ABC method. ```python from geolysis.bearing_capacity.abc import create_abc_4_cohesionless_soils bowles_abc = create_abc_4_cohesionless_soils(corrected_spt_n_value=17.0, tol_settlement=20.0, depth=1.5, width=1.2, shape="square", foundation_type="pad", abc_method="bowles") bowles_abc.allowable_bearing_capacity() 341.1 ``` -------------------------------- ### Run Project Tests Source: https://github.com/patrickboateng/geolysis/wiki/Contributing-Guidelines Execute all project tests using the make command to ensure the codebase is stable before making changes. ```shell make test ``` -------------------------------- ### Import Foundation Creation Source: https://github.com/patrickboateng/geolysis/wiki/Python-Code-Style-Guide Imports the function to create foundation details from the geolysis library. ```python from geolysis.foundation import create_foundation ``` -------------------------------- ### Class Documentation Structure Source: https://github.com/patrickboateng/geolysis/wiki/Python-Code-Style-Guide Illustrates the structure for documenting Python classes using docstrings, including short and long descriptions, and parameter/exception documentation. ```python class ClassName: """Short description of class. Long description of class. Example usage and other informations. """ def __init__(self, arg_1: str, arg_2: int) -> None: """ :param arg_1: Argument 1 description. :param arg_2: Argument 2 description. :raises ExcetionType: Description of why exception occurs. """ ``` -------------------------------- ### Function Documentation Structure Source: https://github.com/patrickboateng/geolysis/wiki/Python-Code-Style-Guide Demonstrates the standard format for documenting Python functions using docstrings, covering short/long descriptions, parameters, exceptions, and return values. ```python def function_name(arg_1: str, arg_2: int) -> ReturnType: """Short description of function. Long description of function. Example Usage and other informations. :param arg_1: Argument 1 description. :param arg_2: Argument 2 description. :raises ExcetionType: Description of why exception occurs. :return: Description of what is returned. """ ``` -------------------------------- ### Navigate to Geolysis Directory Source: https://github.com/patrickboateng/geolysis/wiki/Contributing-Guidelines Change your current directory to the cloned Geolysis project folder. ```shell cd geolysis ``` -------------------------------- ### Import Ultimate Bearing Capacity Function Source: https://github.com/patrickboateng/geolysis/blob/main/docs/index.md Import the function to create UBC for all soils from the geolysis.bearing_capacity.ubc module. ```python from geolysis.bearing_capacity.ubc import create_ubc_4_all_soils ``` -------------------------------- ### Constant Documentation Structure Source: https://github.com/patrickboateng/geolysis/wiki/Python-Code-Style-Guide Shows how to document constants in Python using a docstring immediately following the assignment, which is visible in mkdocs builds. ```python CONSTANT_NAME = value """Short constant description. Long constant description if any. Any other information if any. """ ``` -------------------------------- ### Import Allowable Bearing Capacity Source: https://github.com/patrickboateng/geolysis/wiki/Python-Code-Style-Guide Imports the function to create allowable bearing capacity for cohesionless soils from the geolysis library. ```python from geolysis.bearing_capacity.abc import create_abc_4_cohesionless_soils ``` -------------------------------- ### Import Ultimate Bearing Capacity Source: https://github.com/patrickboateng/geolysis/wiki/Python-Code-Style-Guide Imports the function to create ultimate bearing capacity for all soil types from the geolysis library. ```python from geolysis.bearing_capacity.ubc import create_ubc_4_all_soil_types ``` -------------------------------- ### Push Changes to Your Fork Source: https://github.com/patrickboateng/geolysis/wiki/Contributing-Guidelines Push your local branch with the new changes to your personal fork on GitHub. ```shell git push origin your-branch-name ``` -------------------------------- ### Check geolysis Version from Command Line Source: https://github.com/patrickboateng/geolysis/blob/main/docs/index.md Execute a Python command from the command line to check the geolysis version. Use 'python3' for Unix systems. ```shell python -c "import geolysis; print(geolysis.__version__)" # python3 for unix systems ``` -------------------------------- ### Clone Geolysis Repository Source: https://github.com/patrickboateng/geolysis/wiki/Contributing-Guidelines Clone the Geolysis project from GitHub to your local machine after forking it. ```shell git clone https://github.com/your-username/geolysis.git ``` -------------------------------- ### Add Upstream Remote Repository Source: https://github.com/patrickboateng/geolysis/wiki/Contributing-Guidelines Add the original Geolysis repository as a remote named 'upstream' to track its changes. ```shell git remote add upstream https://github.com/patrickboateng/geolysis.git ``` -------------------------------- ### Import SPT Analysis Components Source: https://github.com/patrickboateng/geolysis/wiki/Python-Code-Style-Guide Imports classes and functions for Standard Penetration Test (SPT) analysis, including corrections and the main SPT class, from the geolysis library. ```python from geolysis.spt import DilatancyCorrection from geolysis.spt import EnergyCorrection from geolysis.spt import SPT from geolysis.spt import create_overburden_pressure_correction ``` -------------------------------- ### View geolysis test coverage report Source: https://github.com/patrickboateng/geolysis/wiki/Contributing-Guidelines Display the text-based test coverage report for geolysis. This command requires `make testcov` to have been run first. ```sh make testreport ``` -------------------------------- ### Classify Soil Using AASHTO System in Python Source: https://github.com/patrickboateng/geolysis/blob/main/README.md Instantiate a classifier with soil properties and classify the soil according to the AASHTO system. The result includes the soil symbol, group index, and a description. ```python >>> from geolysis.soil_classifier import create_aashto_classifier >>> aashto_clf = create_aashto_classifier(liquid_limit=34.1, ... plastic_limit=21.1, ... fines=47.88, ) >>> clf = aashto_clf.classify() >>> clf.symbol 'A-6(4)' >>> clf.symbol_no_group_idx 'A-6' >>> clf.group_index '4' >>> clf.description 'Clayey soils' ``` -------------------------------- ### Import Soil Classifiers Source: https://github.com/patrickboateng/geolysis/wiki/Python-Code-Style-Guide Imports functions for creating USCS and AASHTO soil classifiers from the geolysis library. ```python from geolysis.soil_classifier import create_uscs_classifier from geolysis.soil_classifier import create_aashto_classifier ``` -------------------------------- ### Generate annotated HTML test coverage report Source: https://github.com/patrickboateng/geolysis/wiki/Contributing-Guidelines Generate an annotated HTML report detailing missed lines in the geolysis test coverage. Open `htmlcov/index.html` in a browser to view. ```sh make testreporthtml ``` -------------------------------- ### Measure geolysis test coverage Source: https://github.com/patrickboateng/geolysis/wiki/Contributing-Guidelines Measure the test coverage of the geolysis project using coverage.py. ```sh make testcov ``` -------------------------------- ### Pull Latest Changes from Upstream Source: https://github.com/patrickboateng/geolysis/wiki/Contributing-Guidelines Update your local main branch with the latest changes and tags from the upstream repository. ```shell git checkout main git pull upstream main --tags ``` -------------------------------- ### Create a New Feature Branch Source: https://github.com/patrickboateng/geolysis/wiki/Contributing-Guidelines Create a new Git branch for your contribution with a descriptive name. This branch name will be part of the merge message. ```shell git checkout -b your-branch-name ``` -------------------------------- ### Calculate SPT N-Design Values Source: https://github.com/patrickboateng/geolysis/blob/main/docs/user_guide/spt.md Calculates the design N-value for SPT tests using different methods like average, minimum, or weighted. Requires corrected SPT N-values as input. ```python >>> from geolysis.spt import SPT >>> spt = SPT(corrected_spt_n_values=[7.0, 15.0, 18.0], method="avg") >>> spt.n_design() 13.3 >>> spt.method = "min" >>> spt.n_design() 7.0 >>> spt.method = "wgt" >>> spt.n_design() 9.4 ``` -------------------------------- ### Apply SPT Overburden Pressure Correction Source: https://github.com/patrickboateng/geolysis/blob/main/docs/user_guide/spt.md Applies overburden pressure correction to a standardized SPT N-value using specified methods like 'gibbs'. Requires the standardized N-value and equivalent overburden pressure (eop). ```python >>> from geolysis.spt import create_overburden_pressure_correction >>> opc_corr = create_overburden_pressure_correction(std_spt_n_value=23, ... eop=100, ... opc_method="gibbs") >>> opc_corr.corrected_spt_n_value() 23.7 ``` -------------------------------- ### Perform All SPT Corrections Together Source: https://github.com/patrickboateng/geolysis/blob/main/docs/user_guide/spt.md Executes a comprehensive SPT N-value correction process, including energy, overburden pressure, and dilatancy corrections, with a single function call. Specify all necessary parameters for each correction type. ```python >>> from geolysis.spt import correct_spt_n_value >>> corrected_n = correct_spt_n_value(recorded_spt_n_value=30, ... energy_percentage=0.6, ... borehole_diameter=65.0, ... rod_length=3.0, ... eop=100, ... opc_method="gibbs", ... dilatancy_corr_method="non_water_aware") >>> corrected_n 19.1 ``` -------------------------------- ### USCS Soil Classification with Grading Source: https://github.com/patrickboateng/geolysis/blob/main/docs/user_guide/soil-classifier.md Classify soil using the USCS system with soil grading information. Requires liquid limit, plastic limit, fines, sand content, and particle size distribution (d10, d30, d60). ```python >>> from geolysis.soil_classifier import create_uscs_classifier >>> uscs_clf = create_uscs_classifier(liquid_limit=30.8, ... plastic_limit=20.7, ... fines=10.29, ... sand=81.89, ... d_10=0.07, ... d_30=0.3, ... d_60=0.8, ) >>> clf = uscs_clf.classify() >>> clf.symbol 'SW-SC' >>> clf.description 'Well graded sand with clay' ``` -------------------------------- ### USCS Soil Classification without Grading Source: https://github.com/patrickboateng/geolysis/blob/main/docs/user_guide/soil-classifier.md Classify soil using the USCS system without soil grading information. Requires liquid limit, plastic limit, fines, and sand content. ```python >>> uscs_clf = create_uscs_classifier(liquid_limit=34.1, ... plastic_limit=21.1, ... fines=47.88, ... sand=37.84, ) >>> clf = uscs_clf.classify() >>> clf.symbol 'SC' >>> clf.description 'Clayey sands' ``` -------------------------------- ### Perform SPT Energy Correction Source: https://github.com/patrickboateng/geolysis/blob/main/docs/user_guide/spt.md Corrects the recorded SPT N-value based on the energy percentage, borehole diameter, and rod length. Use this to standardize N-values to a common energy ratio. ```python >>> from geolysis.spt import EnergyCorrection >>> energy_corr = EnergyCorrection(recorded_spt_n_value=30, ... energy_percentage=0.6, ... borehole_diameter=65.0, ... rod_length=3.0) >>> energy_corr.standardized_spt_n_value() 22.5 ``` -------------------------------- ### AASHTO Soil Classification Source: https://github.com/patrickboateng/geolysis/blob/main/docs/user_guide/soil-classifier.md Classify soil using the AASHTO system. Requires liquid limit, plastic limit, and fines content. ```python >>> from geolysis.soil_classifier import create_aashto_classifier >>> aashto_clf = create_aashto_classifier(liquid_limit=30.2, ... plastic_limit=23.9, ... fines=11.18, ) >>> clf = aashto_clf.classify() >>> clf.symbol 'A-2-4(0)' >>> clf.symbol_no_group_idx 'A-2-4' >>> clf.group_index '0' >>> clf.description 'Silty or clayey gravel and sand' ``` -------------------------------- ### Apply SPT Dilatancy Correction Source: https://github.com/patrickboateng/geolysis/blob/main/docs/user_guide/spt.md Corrects the SPT N-value for dilatancy effects. This correction is applied to an already corrected SPT N-value. ```python >>> from geolysis.spt import DilatancyCorrection >>> dil_corr = DilatancyCorrection(corr_spt_n_value=17.7) >>> dil_corr.corrected_spt_n_value() 16.4 ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.