pygef

Parse soil measurement data

https://github.com/cemsbv/pygef

Science Score: 26.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
  • Academic publication links
  • Committers with academic emails
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (8.8%) to scientific vocabulary

Keywords

gef geotechnical-engineering pygef python

Keywords from Contributors

plagiarism-checker quantum-circuit snapshot-testing argument-parser projection genomics mot interactive zsh-plugin integral
Last synced: 6 months ago · JSON representation

Repository

Parse soil measurement data

Basic Info
Statistics
  • Stars: 34
  • Watchers: 2
  • Forks: 18
  • Open Issues: 11
  • Releases: 33
Topics
gef geotechnical-engineering pygef python
Created about 8 years ago · Last pushed 6 months ago
Metadata Files
Readme Changelog License

README.md

PYGEF

Code style: black PyPi Version GitHub stars Coverage Status

Simple parser for *.gef files. These are ASCII based files used for soil properties measurements. Compatible with Python 3.9.

Recently added the parsing of xml boreholes file, the xml parsing is still in a preliminary phase, not all the files are supported. If you find a file that doesn't work with pygef, please make an issue about it or PR :)

Installation

Latest stable version:

sh pip install pygef

Cutting-edge version (might break):

sh pip install git+https://github.com/cemsbv/pygef.git

CPT files

```python

from pygef import readcpt # read gef and xml files cptdata = readcpt("./my-cpt.xml") cptdata CPTData: {'broid': 'CPT000000099543', 'conediameter': 44, 'conesurfacearea': 1500, 'conesurfacequotient': 0.67, 'conetofrictionsleevedistance': 100, 'conetofrictionsleevesurfacearea': 22530, 'conetofrictionsleevesurfacequotient': 1.0, ... 'zlmporepressureu3after': None, 'zlmporepressureu3before': None} # access the underlying polars DataFrame under the data attribute cpt_data.data.head() shape: (5, 9) ┌────────────┬───────┬───────────┬────────────┬─────┬────────────┬────────────┬────────────┬────────────┐ │ penetratio ┆ depth ┆ elapsedTi ┆ coneResist ┆ ... ┆ inclinatio ┆ inclinatio ┆ localFrict ┆ frictionRa │ │ nLength ┆ --- ┆ me ┆ ance ┆ ┆ nNS ┆ nResultant ┆ ion ┆ tio │ │ --- ┆ f64 ┆ --- ┆ --- ┆ ┆ --- ┆ --- ┆ --- ┆ --- │ │ f64 ┆ ┆ f64 ┆ f64 ┆ ┆ i64 ┆ i64 ┆ f64 ┆ f64 │ ╞════════════╪═══════╪═══════════╪════════════╪═════╪════════════╪════════════╪════════════╪════════════╡ │ 0.0 ┆ 0.0 ┆ -9.99999 e ┆ -9.99999e5 ┆ ... ┆ -999999 ┆ -999999 ┆ -9.99999e5 ┆ -9.99999e5 │ │ ┆ ┆ 5 ┆ ┆ ┆ ┆ ┆ ┆ │ ├╌╌╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌╌╌┤ │ 0.02 ┆ 0.02 ┆ 11.0 ┆ 2.708 ┆ ... ┆ 0 ┆ 0 ┆ 0.03 ┆ 0.6 │ ├╌╌╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌╌╌┤ │ 0.04 ┆ 0.039 ┆ 13.0 ┆ 4.29 ┆ ... ┆ 0 ┆ 0 ┆ 0.039 ┆ 0.8 │ ├╌╌╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌╌╌┤ │ 0.06 ┆ 0.059 ┆ 15.0 ┆ 5.124 ┆ ... ┆ 0 ┆ 0 ┆ 0.045 ┆ 0.9 │ ├╌╌╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌╌╌┤ │ 0.08 ┆ 0.079 ┆ 17.0 ┆ 5.45 ┆ ... ┆ 0 ┆ 0 ┆ 0.049 ┆ 1.0 │ └────────────┴───────┴───────────┴────────────┴─────┴────────────┴────────────┴────────────┴────────────┘ ```

Bore files

```python

from pygef import readbore # read gef and xml files boredata = readbore("./my-bore.xml") boredata BoreData: {'boreholecompleted': True, 'borerockreached': False, 'data': (13, 8), 'deliveredlocation': Location(srsname='urn:ogc:def:crs:EPSG::28992', x=158322.139, y=444864.706), 'deliveredverticalpositiondatum': 'nap', 'deliveredverticalpositionoffset': 10.773, 'deliveredverticalpositionreferencepoint': 'maaiveld', 'descriptionprocedure': 'ISO14688d1v2019c2020', 'finalboredepth': 12.0, 'finalsampledepth': 12.0, 'researchreportdate': datetime.date(2021, 10, 19)} # access the underlying polars DataFrame under the data attribute boredata.data.head() shape: (5, 8) ┌────────────┬────────────┬────────────┬──────────┬────────────┬────────────┬────────────┬─────────┐ │ upperboun ┆ lowerboun ┆ geotechnic ┆ color ┆ dispersed_ ┆ organicma ┆ sandmedia ┆ soildi │ │ dary ┆ dary ┆ alsoilna ┆ --- ┆ inhomogeni ┆ tterconte ┆ nclass ┆ st │ │ --- ┆ --- ┆ me ┆ str ┆ ty ┆ ntclass ┆ --- ┆ --- │ │ f64 ┆ f64 ┆ --- ┆ ┆ --- ┆ --- ┆ str ┆ list[f6 │ │ ┆ ┆ str ┆ ┆ bool ┆ str ┆ ┆ 4] │ ╞════════════╪════════════╪════════════╪══════════╪════════════╪════════════╪════════════╪═════════╡ │ 0.0 ┆ 1.0 ┆ zwakGrindi ┆ donkergr ┆ false ┆ nietOrgani ┆ middelgrof ┆ [0.2, │ │ ┆ ┆ gZand ┆ ijs ┆ ┆ sch ┆ 420 tot630u ┆ 0.0, │ │ ┆ ┆ ┆ ┆ ┆ ┆ m ┆ ... │ │ ┆ ┆ ┆ ┆ ┆ ┆ ┆ 0.0] │ ├╌╌╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌┤ │ 1.0 ┆ 1.1 ┆ zwakGrindi ┆ donkergr ┆ false ┆ nietOrgani ┆ middelgrof ┆ [0.2, │ │ ┆ ┆ gZand ┆ ijs ┆ ┆ sch ┆ 420 tot630u ┆ 0.0, │ │ ┆ ┆ ┆ ┆ ┆ ┆ m ┆ ... │ │ ┆ ┆ ┆ ┆ ┆ ┆ ┆ 0.0] │ ├╌╌╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌┤ │ 1.1 ┆ 2.0 ┆ zwakZandig ┆ standaar ┆ false ┆ nietOrgani ┆ null ┆ [0.0, │ │ ┆ ┆ eKleiMetGr ┆ dBruin ┆ ┆ sch ┆ ┆ 0.1, │ │ ┆ ┆ ind ┆ ┆ ┆ ┆ ┆ ... │ │ ┆ ┆ ┆ ┆ ┆ ┆ ┆ 0.0] │ ├╌╌╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌┤ │ 2.0 ┆ 3.0 ┆ zwakZandig ┆ standaar ┆ false ┆ nietOrgani ┆ null ┆ [0.0, │ │ ┆ ┆ eKlei ┆ dGrijs ┆ ┆ sch ┆ ┆ 0.0, │ │ ┆ ┆ ┆ ┆ ┆ ┆ ┆ ... │ │ ┆ ┆ ┆ ┆ ┆ ┆ ┆ 0.0] │ ├╌╌╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌┤ │ 3.0 ┆ 4.0 ┆ zwakZandig ┆ donkergr ┆ false ┆ nietOrgani ┆ null ┆ [0.0, │ │ ┆ ┆ eKlei ┆ ijs ┆ ┆ sch ┆ ┆ 0.0, │ │ ┆ ┆ ┆ ┆ ┆ ┆ ┆ ... │ │ ┆ ┆ ┆ ┆ ┆ ┆ ┆ 0.0] │ └────────────┴────────────┴────────────┴──────────┴────────────┴────────────┴────────────┴─────────┘ ```

Plotting

To use the plotting functionality pygef needs to be installed with the [plot] feature.

sh pip install pygef[plot]

```python from pygef import readcpt, readbore from pygef.plotting import plotcpt, plotbore

plot cpt file

plotcpt(readcpt("myfile.xml"))

plot a bore file

plotbore(readbore("myfile.xml")) ```

Documentation

Build the docs:

```bash python -m pip install --upgrade pip setuptools pip install -r requirements.txt pip install .

sphinx-build -b html docs public ```

Format

We format our code with black and isort.

bash black --config "pyproject.toml" . isort --settings-path "pyproject.toml" .

Lint

To maintain code quality we use the GitHub super-linter.

To run the linters locally, run the following bash script from the root directory:

bash docker run \ --env VALIDATE_ALL_CODEBASE=true \ --env DEFAULT_BRANCH=master \ --env RUN_LOCAL=true \ --env FIX_PYTHON_ISORT=true \ --env FIX_PYTHON_BLACK=true \ --env FIX_YAML_PRETTIER=true \ --env VALIDATE_JSCPD=false \ --env VALIDATE_CSS=false \ --env VALIDATE_BASH=false \ --env VALIDATE_YAML=false \ --env VALIDATE_PYTHON_PYLINT=false \ --env VALIDATE_NATURAL_LANGUAGE=false \ --env VALIDATE_MARKDOWN=false \ --env VALIDATE_MARKDOWN_PRETTIER=false \ --env LINTER_RULES_PATH=/ \ --env PYTHON_BLACK_CONFIG_FILE=pyproject.toml \ --env PYTHON_ISORT_CONFIG_FILE=pyproject.toml \ --env PYTHON_MYPY_CONFIG_FILE=pyproject.toml \ --env PYTHON_FLAKE8_CONFIG_FILE=.flake8 \ -v $(pwd):/tmp/lint ghcr.io/super-linter/super-linter:v8

UnitTest

Test the software with the use of coverage:

```bash python -m pip install --upgrade pip setuptools pip install -r requirements.txt pip install -e .[test] .[map] .[plot]

coverage run -m pytest ```

Requirements

Requirements are autogenerated by pip-compile with python 3.9

bash pip-compile --extra=plot --extra=test --extra=docs --extra=lint --extra=map --output-file=requirements.txt pyproject.toml

To update the requirements within the defined ranges, run:

bash pip-compile --upgrade --extra=plot --extra=test --extra=docs --extra=lint --extra=map --output-file=requirements.txt pyproject.toml

Owner

  • Name: CEMS
  • Login: cemsbv
  • Kind: organization
  • Email: info@cemsbv.nl
  • Location: Netherlands

CEMS offers geotechnical software as a service through REST APIs, to be used as a trusted component in scalable automated engineering processes.

GitHub Events

Total
  • Create event: 31
  • Release event: 1
  • Issues event: 5
  • Watch event: 4
  • Delete event: 31
  • Issue comment event: 84
  • Push event: 83
  • Pull request event: 61
Last Year
  • Create event: 31
  • Release event: 1
  • Issues event: 5
  • Watch event: 4
  • Delete event: 31
  • Issue comment event: 84
  • Push event: 83
  • Pull request event: 61

Committers

Last synced: 7 months ago

All Time
  • Total Commits: 432
  • Total Committers: 14
  • Avg Commits per committer: 30.857
  • Development Distribution Score (DDS): 0.692
Past Year
  • Commits: 44
  • Committers: 5
  • Avg Commits per committer: 8.8
  • Development Distribution Score (DDS): 0.568
Top Committers
Name Email Commits
ritchie46 r****6@g****m 133
Thomas Versteeg t@v****l 68
dependabot[bot] 4****] 66
martinapippi 4****i 51
Robin Wimmers r****s@c****o 49
Martina Pippi m****i@c****o 20
Thijs Lukkezen t****n@c****o 17
renovate[bot] 2****] 7
maarten-betman m****n@b****m 7
jmmaljaars 5****s 6
Sjonnie Boonstra s****a@a****u 4
tlukkezen 9****n 2
Rob van Putten b****l@g****m 1
Thomas van der Linden t****n@a****l 1
Committer Domains (Top 20 + Academic)

Issues and Pull Requests

Last synced: 6 months ago

All Time
  • Total issues: 34
  • Total pull requests: 219
  • Average time to close issues: 11 months
  • Average time to close pull requests: about 1 month
  • Total issue authors: 11
  • Total pull request authors: 8
  • Average comments per issue: 0.94
  • Average comments per pull request: 1.27
  • Merged pull requests: 111
  • Bot issues: 1
  • Bot pull requests: 160
Past Year
  • Issues: 6
  • Pull requests: 83
  • Average time to close issues: 1 day
  • Average time to close pull requests: 25 days
  • Issue authors: 5
  • Pull request authors: 5
  • Average comments per issue: 0.17
  • Average comments per pull request: 0.89
  • Merged pull requests: 31
  • Bot issues: 1
  • Bot pull requests: 76
Top Authors
Issue Authors
  • tlukkezen (10)
  • RDWimmers (7)
  • tversteeg (4)
  • mariosgeo (3)
  • martinapippi (3)
  • ritchie46 (2)
  • PabloVasconez (1)
  • Swoud (1)
  • renovate[bot] (1)
  • amo-mhp (1)
  • bro-wi (1)
Pull Request Authors
  • dependabot[bot] (133)
  • renovate[bot] (27)
  • RDWimmers (26)
  • ritchie46 (14)
  • tversteeg (8)
  • tlukkezen (8)
  • martinapippi (2)
  • maarten-betman (1)
Top Labels
Issue Labels
bug (14) python (5) good first issue (5) enhancement (3) dependencies (3) help wanted (2) wontfix (1)
Pull Request Labels
dependencies (138) python (128) github_actions (10) enhancement (4) bug (3) rust (2)

Packages

  • Total packages: 1
  • Total downloads:
    • pypi 3,768 last-month
  • Total dependent packages: 3
  • Total dependent repositories: 2
  • Total versions: 40
  • Total maintainers: 2
pypi.org: pygef

Parse soil measurument data.

  • Documentation: https://pygef.readthedocs.io/
  • License: MIT License Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
  • Latest release: 0.12.1
    published 7 months ago
  • Versions: 40
  • Dependent Packages: 3
  • Dependent Repositories: 2
  • Downloads: 3,768 Last month
Rankings
Dependent packages count: 3.1%
Downloads: 6.2%
Average: 7.0%
Dependent repos count: 11.6%
Maintainers (2)
Last synced: 6 months ago

Dependencies

setup.py pypi
  • lxml ==4.9.1
  • matplotlib >=
  • polars >=
.github/workflows/deploy_docs.yaml actions
  • actions/checkout v3 composite
  • actions/setup-python v4 composite
  • peaceiris/actions-gh-pages v3 composite
.github/workflows/release_pypi.yaml actions
  • actions-rs/toolchain v1 composite
  • actions/checkout v3 composite
  • actions/setup-python v4 composite
  • messense/maturin-action v1 composite
.github/workflows/test.yaml actions
  • actions-rs/cargo v1.0.3 composite
  • actions-rs/toolchain v1.0.7 composite
  • actions/checkout v3 composite
  • actions/setup-python v4 composite
  • github/super-linter v4 composite
  • messense/maturin-action v1 composite
pyproject.toml pypi
  • gef-file-to-map >=0.1,<0.2
  • lxml >=4.9.1,<5.0
  • matplotlib >=3.6,<4.0
  • polars [pyarrow]>0.16.14,<0.19
requirements.txt pypi
  • affine ==2.4.0
  • alabaster ==0.7.13
  • asteroid-sphinx-theme ==0.0.3
  • asttokens ==2.2.1
  • attrs ==22.2.0
  • babel ==2.12.1
  • backcall ==0.2.0
  • black ==23.1.0
  • certifi ==2022.12.7
  • charset-normalizer ==3.1.0
  • click ==8.1.3
  • click-plugins ==1.1.1
  • cligj ==0.7.2
  • contextily ==1.3.0
  • contourpy ==1.0.7
  • coverage ==6.5.0
  • coveralls ==3.3.1
  • cycler ==0.11.0
  • decorator ==5.1.1
  • docopt ==0.6.2
  • docutils ==0.18.1
  • exceptiongroup ==1.1.1
  • executing ==1.2.0
  • fonttools ==4.39.4
  • gef-file-to-map ==0.1.0
  • geographiclib ==2.0
  • geopy ==2.3.0
  • idna ==3.4
  • imagesize ==1.4.1
  • importlib-metadata ==6.1.0
  • importlib-resources ==5.12.0
  • iniconfig ==2.0.0
  • ipython ==8.11.0
  • isort ==5.12.0
  • jedi ==0.18.2
  • jinja2 ==3.1.2
  • joblib ==1.2.0
  • kiwisolver ==1.4.4
  • lxml ==4.9.2
  • markupsafe ==2.1.2
  • matplotlib ==3.7.1
  • matplotlib-inline ==0.1.6
  • mercantile ==1.2.1
  • mypy-extensions ==1.0.0
  • numpy ==1.24.2
  • packaging ==23.0
  • parso ==0.8.3
  • pathspec ==0.11.1
  • pexpect ==4.8.0
  • pickleshare ==0.7.5
  • pillow ==9.5.0
  • platformdirs ==3.5.1
  • pluggy ==1.0.0
  • polars ==0.18.1
  • prompt-toolkit ==3.0.38
  • ptyprocess ==0.7.0
  • pure-eval ==0.2.2
  • pyarrow ==11.0.0
  • pygments ==2.14.0
  • pyparsing ==3.0.9
  • pytest ==7.2.2
  • python-dateutil ==2.8.2
  • rasterio ==1.3.6
  • requests ==2.31.0
  • six ==1.16.0
  • snowballstemmer ==2.2.0
  • snuggs ==1.4.7
  • sphinx ==6.1.3
  • sphinx-autodoc-typehints ==1.22
  • sphinx-rtd-theme ==1.2.0
  • sphinxcontrib-applehelp ==1.0.4
  • sphinxcontrib-devhelp ==1.0.2
  • sphinxcontrib-htmlhelp ==2.0.1
  • sphinxcontrib-jquery ==4.1
  • sphinxcontrib-jsmath ==1.0.1
  • sphinxcontrib-qthelp ==1.0.3
  • sphinxcontrib-serializinghtml ==1.1.5
  • stack-data ==0.6.2
  • tomli ==2.0.1
  • traitlets ==5.9.0
  • typing-extensions ==4.5.0
  • urllib3 ==1.26.15
  • wcwidth ==0.2.6
  • xyzservices ==2023.2.0
  • zipp ==3.15.0