py-pilecore 0.6.0__tar.gz → 0.7.1__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of py-pilecore might be problematic. Click here for more details.

Files changed (49) hide show
  1. {py_pilecore-0.6.0/src/py_pilecore.egg-info → py_pilecore-0.7.1}/PKG-INFO +13 -19
  2. {py_pilecore-0.6.0 → py_pilecore-0.7.1}/README.md +2 -2
  3. {py_pilecore-0.6.0 → py_pilecore-0.7.1}/pyproject.toml +14 -19
  4. {py_pilecore-0.6.0 → py_pilecore-0.7.1/src/py_pilecore.egg-info}/PKG-INFO +13 -19
  5. {py_pilecore-0.6.0 → py_pilecore-0.7.1}/src/py_pilecore.egg-info/requires.txt +10 -15
  6. {py_pilecore-0.6.0 → py_pilecore-0.7.1}/src/pypilecore/_version.py +1 -1
  7. {py_pilecore-0.6.0 → py_pilecore-0.7.1}/src/pypilecore/input/grouper_properties.py +10 -3
  8. {py_pilecore-0.6.0 → py_pilecore-0.7.1}/src/pypilecore/input/soil_properties.py +11 -1
  9. {py_pilecore-0.6.0 → py_pilecore-0.7.1}/src/pypilecore/viewers/interactive_figures/utils.py +3 -2
  10. {py_pilecore-0.6.0 → py_pilecore-0.7.1}/LICENSE +0 -0
  11. {py_pilecore-0.6.0 → py_pilecore-0.7.1}/setup.cfg +0 -0
  12. {py_pilecore-0.6.0 → py_pilecore-0.7.1}/src/py_pilecore.egg-info/SOURCES.txt +0 -0
  13. {py_pilecore-0.6.0 → py_pilecore-0.7.1}/src/py_pilecore.egg-info/dependency_links.txt +0 -0
  14. {py_pilecore-0.6.0 → py_pilecore-0.7.1}/src/py_pilecore.egg-info/top_level.txt +0 -0
  15. {py_pilecore-0.6.0 → py_pilecore-0.7.1}/src/pypilecore/__init__.py +0 -0
  16. {py_pilecore-0.6.0 → py_pilecore-0.7.1}/src/pypilecore/api.py +0 -0
  17. {py_pilecore-0.6.0 → py_pilecore-0.7.1}/src/pypilecore/common/__init__.py +0 -0
  18. {py_pilecore-0.6.0 → py_pilecore-0.7.1}/src/pypilecore/common/piles/__init__.py +0 -0
  19. {py_pilecore-0.6.0 → py_pilecore-0.7.1}/src/pypilecore/common/piles/geometry/__init__.py +0 -0
  20. {py_pilecore-0.6.0 → py_pilecore-0.7.1}/src/pypilecore/common/piles/geometry/components/__init__.py +0 -0
  21. {py_pilecore-0.6.0 → py_pilecore-0.7.1}/src/pypilecore/common/piles/geometry/components/common.py +0 -0
  22. {py_pilecore-0.6.0 → py_pilecore-0.7.1}/src/pypilecore/common/piles/geometry/components/rectangle.py +0 -0
  23. {py_pilecore-0.6.0 → py_pilecore-0.7.1}/src/pypilecore/common/piles/geometry/components/round.py +0 -0
  24. {py_pilecore-0.6.0 → py_pilecore-0.7.1}/src/pypilecore/common/piles/geometry/main.py +0 -0
  25. {py_pilecore-0.6.0 → py_pilecore-0.7.1}/src/pypilecore/common/piles/geometry/materials.py +0 -0
  26. {py_pilecore-0.6.0 → py_pilecore-0.7.1}/src/pypilecore/common/piles/main.py +0 -0
  27. {py_pilecore-0.6.0 → py_pilecore-0.7.1}/src/pypilecore/common/piles/type.py +0 -0
  28. {py_pilecore-0.6.0 → py_pilecore-0.7.1}/src/pypilecore/exceptions.py +0 -0
  29. {py_pilecore-0.6.0 → py_pilecore-0.7.1}/src/pypilecore/input/__init__.py +0 -0
  30. {py_pilecore-0.6.0 → py_pilecore-0.7.1}/src/pypilecore/input/multi_cpt.py +0 -0
  31. {py_pilecore-0.6.0 → py_pilecore-0.7.1}/src/pypilecore/plot_utils.py +0 -0
  32. {py_pilecore-0.6.0 → py_pilecore-0.7.1}/src/pypilecore/results/__init__.py +0 -0
  33. {py_pilecore-0.6.0 → py_pilecore-0.7.1}/src/pypilecore/results/cases_multi_cpt_results.py +0 -0
  34. {py_pilecore-0.6.0 → py_pilecore-0.7.1}/src/pypilecore/results/grouper_result.py +0 -0
  35. {py_pilecore-0.6.0 → py_pilecore-0.7.1}/src/pypilecore/results/load_settlement.py +0 -0
  36. {py_pilecore-0.6.0 → py_pilecore-0.7.1}/src/pypilecore/results/multi_cpt_results.py +0 -0
  37. {py_pilecore-0.6.0 → py_pilecore-0.7.1}/src/pypilecore/results/post_processing.py +0 -0
  38. {py_pilecore-0.6.0 → py_pilecore-0.7.1}/src/pypilecore/results/result_definitions.py +0 -0
  39. {py_pilecore-0.6.0 → py_pilecore-0.7.1}/src/pypilecore/results/single_cpt_results.py +0 -0
  40. {py_pilecore-0.6.0 → py_pilecore-0.7.1}/src/pypilecore/results/soil_properties.py +0 -0
  41. {py_pilecore-0.6.0 → py_pilecore-0.7.1}/src/pypilecore/utils.py +0 -0
  42. {py_pilecore-0.6.0 → py_pilecore-0.7.1}/src/pypilecore/viewers/__init__.py +0 -0
  43. {py_pilecore-0.6.0 → py_pilecore-0.7.1}/src/pypilecore/viewers/interactive_figures/__init__.py +0 -0
  44. {py_pilecore-0.6.0 → py_pilecore-0.7.1}/src/pypilecore/viewers/interactive_figures/figure_cpt_group_results_versus_ptls.py +0 -0
  45. {py_pilecore-0.6.0 → py_pilecore-0.7.1}/src/pypilecore/viewers/interactive_figures/figure_cpt_results_plan_view.py +0 -0
  46. {py_pilecore-0.6.0 → py_pilecore-0.7.1}/src/pypilecore/viewers/interactive_figures/figure_cpt_results_versus_ptls.py +0 -0
  47. {py_pilecore-0.6.0 → py_pilecore-0.7.1}/src/pypilecore/viewers/viewer_cpt_group_results.py +0 -0
  48. {py_pilecore-0.6.0 → py_pilecore-0.7.1}/src/pypilecore/viewers/viewer_cpt_results.py +0 -0
  49. {py_pilecore-0.6.0 → py_pilecore-0.7.1}/src/pypilecore/viewers/viewer_cpt_results_plan_view.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: py-pilecore
3
- Version: 0.6.0
3
+ Version: 0.7.1
4
4
  Summary: Public python SDK for the CEMS PileCore web-API.
5
5
  License: MIT License
6
6
 
@@ -44,6 +44,7 @@ Requires-Dist: plotly-geo<2,>=1.0.0
44
44
  Provides-Extra: test
45
45
  Requires-Dist: coveralls; extra == "test"
46
46
  Requires-Dist: pytest; extra == "test"
47
+ Requires-Dist: openapi-core; extra == "test"
47
48
  Provides-Extra: docs
48
49
  Requires-Dist: Sphinx==6.1.3; extra == "docs"
49
50
  Requires-Dist: sphinx-autodoc-typehints==1.22; extra == "docs"
@@ -51,23 +52,16 @@ Requires-Dist: ipython==8.11.0; extra == "docs"
51
52
  Requires-Dist: asteroid-sphinx-theme==0.0.3; extra == "docs"
52
53
  Requires-Dist: sphinx_rtd_theme==1.2.0; extra == "docs"
53
54
  Provides-Extra: lint
54
- Requires-Dist: mypy==1.6.1; extra == "lint"
55
- Requires-Dist: mypy-extensions==1.0.0; extra == "lint"
56
- Requires-Dist: tomli==2.0.1; extra == "lint"
57
- Requires-Dist: typing_extensions==4.7.1; extra == "lint"
58
- Requires-Dist: black[jupyter]==23.10.1; extra == "lint"
59
- Requires-Dist: click==8.1.3; extra == "lint"
60
- Requires-Dist: packaging==23.2; extra == "lint"
61
- Requires-Dist: pathspec==0.11.1; extra == "lint"
62
- Requires-Dist: platformdirs==3.5.1; extra == "lint"
63
- Requires-Dist: tomli==2.0.1; extra == "lint"
64
- Requires-Dist: isort==5.12.0; extra == "lint"
55
+ Requires-Dist: ansible-lint==6.22.1; extra == "lint"
56
+ Requires-Dist: black==23.11.0; extra == "lint"
57
+ Requires-Dist: cfn-lint==0.83.3; extra == "lint"
58
+ Requires-Dist: cpplint==1.6.1; extra == "lint"
65
59
  Requires-Dist: flake8==6.0.0; extra == "lint"
66
- Requires-Dist: mccabe==0.7.0; extra == "lint"
67
- Requires-Dist: pycodestyle==2.10.0; extra == "lint"
68
- Requires-Dist: pyflakes==3.0.1; extra == "lint"
69
- Requires-Dist: pandas-stubs<3,>2; extra == "lint"
70
- Requires-Dist: types-tqdm<5,>4; extra == "lint"
60
+ Requires-Dist: isort==5.12.0; extra == "lint"
61
+ Requires-Dist: mypy==1.7.1; extra == "lint"
62
+ Requires-Dist: sqlfluff==2.3.5; extra == "lint"
63
+ Requires-Dist: yamllint==1.33.0; extra == "lint"
64
+ Requires-Dist: yq==3.2.3; extra == "lint"
71
65
 
72
66
  # py-pilecore
73
67
  Public python SDK for the CEMS PileCore web-API
@@ -103,7 +97,7 @@ Go to `personal-access-tokens` and create a new user token.
103
97
 
104
98
  ## Environment
105
99
 
106
- We recommend developing in Python3.10 with a clean virtual environment (using `virtualenv` or `conda`), installing the requirements from the requirements.txt file:
100
+ We recommend developing in Python3.11 with a clean virtual environment (using `virtualenv` or `conda`), installing the requirements from the requirements.txt file:
107
101
 
108
102
  Example using `virtualenv` and `pip` to install the dependencies in a new environment .env on Linux:
109
103
 
@@ -155,7 +149,7 @@ coverage run -m pytest
155
149
 
156
150
  ## Requirements
157
151
 
158
- Requirements are autogenerated by the `pip-compile` command with python 3.10
152
+ Requirements are autogenerated by the `pip-compile` command with python 3.11
159
153
 
160
154
  Install pip-tools with:
161
155
 
@@ -32,7 +32,7 @@ Go to `personal-access-tokens` and create a new user token.
32
32
 
33
33
  ## Environment
34
34
 
35
- We recommend developing in Python3.10 with a clean virtual environment (using `virtualenv` or `conda`), installing the requirements from the requirements.txt file:
35
+ We recommend developing in Python3.11 with a clean virtual environment (using `virtualenv` or `conda`), installing the requirements from the requirements.txt file:
36
36
 
37
37
  Example using `virtualenv` and `pip` to install the dependencies in a new environment .env on Linux:
38
38
 
@@ -84,7 +84,7 @@ coverage run -m pytest
84
84
 
85
85
  ## Requirements
86
86
 
87
- Requirements are autogenerated by the `pip-compile` command with python 3.10
87
+ Requirements are autogenerated by the `pip-compile` command with python 3.11
88
88
 
89
89
  Install pip-tools with:
90
90
 
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "py-pilecore"
7
- version = "0.6.0"
7
+ version = "0.7.1"
8
8
  description = "Public python SDK for the CEMS PileCore web-API."
9
9
  requires-python = ">=3.9"
10
10
  dependencies = [
@@ -29,7 +29,7 @@ keywords = ["API", "PileCore", "CEMS", "CRUX"]
29
29
  repository = "https://github.com/cemsbv/py-pilecore"
30
30
 
31
31
  [project.optional-dependencies]
32
- test = ["coveralls", "pytest"]
32
+ test = ["coveralls", "pytest", "openapi-core"]
33
33
  docs = [
34
34
  "Sphinx==6.1.3",
35
35
  "sphinx-autodoc-typehints==1.22",
@@ -37,26 +37,21 @@ docs = [
37
37
  "asteroid-sphinx-theme==0.0.3",
38
38
  "sphinx_rtd_theme==1.2.0",
39
39
  ]
40
- # lint dependencies from github super-linter v5
40
+ # lint dependencies from github super-linter
41
41
  # See https://github.com/super-linter/super-linter/tree/main/dependencies/python
42
+ # Get a file with the latest requirements by running bash: `./get-super-linter-requirements.sh`
43
+ # ignoring because redundant: snakemake, snakefmt, pylint
42
44
  lint = [
43
- "mypy==1.6.1",
44
- "mypy-extensions==1.0.0",
45
- "tomli==2.0.1",
46
- "typing_extensions==4.7.1",
47
- "black[jupyter]==23.10.1",
48
- "click==8.1.3",
49
- "packaging==23.2",
50
- "pathspec==0.11.1",
51
- "platformdirs==3.5.1",
52
- "tomli==2.0.1,",
53
- "isort==5.12.0",
45
+ "ansible-lint==6.22.1",
46
+ "black==23.11.0",
47
+ "cfn-lint==0.83.3",
48
+ "cpplint==1.6.1",
54
49
  "flake8==6.0.0",
55
- "mccabe==0.7.0",
56
- "pycodestyle==2.10.0",
57
- "pyflakes==3.0.1",
58
- 'pandas-stubs>2,<3',
59
- 'types-tqdm>4,<5',
50
+ "isort==5.12.0",
51
+ "mypy==1.7.1",
52
+ "sqlfluff==2.3.5",
53
+ "yamllint==1.33.0",
54
+ "yq==3.2.3",
60
55
  ]
61
56
 
62
57
  [tool.isort]
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: py-pilecore
3
- Version: 0.6.0
3
+ Version: 0.7.1
4
4
  Summary: Public python SDK for the CEMS PileCore web-API.
5
5
  License: MIT License
6
6
 
@@ -44,6 +44,7 @@ Requires-Dist: plotly-geo<2,>=1.0.0
44
44
  Provides-Extra: test
45
45
  Requires-Dist: coveralls; extra == "test"
46
46
  Requires-Dist: pytest; extra == "test"
47
+ Requires-Dist: openapi-core; extra == "test"
47
48
  Provides-Extra: docs
48
49
  Requires-Dist: Sphinx==6.1.3; extra == "docs"
49
50
  Requires-Dist: sphinx-autodoc-typehints==1.22; extra == "docs"
@@ -51,23 +52,16 @@ Requires-Dist: ipython==8.11.0; extra == "docs"
51
52
  Requires-Dist: asteroid-sphinx-theme==0.0.3; extra == "docs"
52
53
  Requires-Dist: sphinx_rtd_theme==1.2.0; extra == "docs"
53
54
  Provides-Extra: lint
54
- Requires-Dist: mypy==1.6.1; extra == "lint"
55
- Requires-Dist: mypy-extensions==1.0.0; extra == "lint"
56
- Requires-Dist: tomli==2.0.1; extra == "lint"
57
- Requires-Dist: typing_extensions==4.7.1; extra == "lint"
58
- Requires-Dist: black[jupyter]==23.10.1; extra == "lint"
59
- Requires-Dist: click==8.1.3; extra == "lint"
60
- Requires-Dist: packaging==23.2; extra == "lint"
61
- Requires-Dist: pathspec==0.11.1; extra == "lint"
62
- Requires-Dist: platformdirs==3.5.1; extra == "lint"
63
- Requires-Dist: tomli==2.0.1; extra == "lint"
64
- Requires-Dist: isort==5.12.0; extra == "lint"
55
+ Requires-Dist: ansible-lint==6.22.1; extra == "lint"
56
+ Requires-Dist: black==23.11.0; extra == "lint"
57
+ Requires-Dist: cfn-lint==0.83.3; extra == "lint"
58
+ Requires-Dist: cpplint==1.6.1; extra == "lint"
65
59
  Requires-Dist: flake8==6.0.0; extra == "lint"
66
- Requires-Dist: mccabe==0.7.0; extra == "lint"
67
- Requires-Dist: pycodestyle==2.10.0; extra == "lint"
68
- Requires-Dist: pyflakes==3.0.1; extra == "lint"
69
- Requires-Dist: pandas-stubs<3,>2; extra == "lint"
70
- Requires-Dist: types-tqdm<5,>4; extra == "lint"
60
+ Requires-Dist: isort==5.12.0; extra == "lint"
61
+ Requires-Dist: mypy==1.7.1; extra == "lint"
62
+ Requires-Dist: sqlfluff==2.3.5; extra == "lint"
63
+ Requires-Dist: yamllint==1.33.0; extra == "lint"
64
+ Requires-Dist: yq==3.2.3; extra == "lint"
71
65
 
72
66
  # py-pilecore
73
67
  Public python SDK for the CEMS PileCore web-API
@@ -103,7 +97,7 @@ Go to `personal-access-tokens` and create a new user token.
103
97
 
104
98
  ## Environment
105
99
 
106
- We recommend developing in Python3.10 with a clean virtual environment (using `virtualenv` or `conda`), installing the requirements from the requirements.txt file:
100
+ We recommend developing in Python3.11 with a clean virtual environment (using `virtualenv` or `conda`), installing the requirements from the requirements.txt file:
107
101
 
108
102
  Example using `virtualenv` and `pip` to install the dependencies in a new environment .env on Linux:
109
103
 
@@ -155,7 +149,7 @@ coverage run -m pytest
155
149
 
156
150
  ## Requirements
157
151
 
158
- Requirements are autogenerated by the `pip-compile` command with python 3.10
152
+ Requirements are autogenerated by the `pip-compile` command with python 3.11
159
153
 
160
154
  Install pip-tools with:
161
155
 
@@ -19,23 +19,18 @@ asteroid-sphinx-theme==0.0.3
19
19
  sphinx_rtd_theme==1.2.0
20
20
 
21
21
  [lint]
22
- mypy==1.6.1
23
- mypy-extensions==1.0.0
24
- tomli==2.0.1
25
- typing_extensions==4.7.1
26
- black[jupyter]==23.10.1
27
- click==8.1.3
28
- packaging==23.2
29
- pathspec==0.11.1
30
- platformdirs==3.5.1
31
- isort==5.12.0
22
+ ansible-lint==6.22.1
23
+ black==23.11.0
24
+ cfn-lint==0.83.3
25
+ cpplint==1.6.1
32
26
  flake8==6.0.0
33
- mccabe==0.7.0
34
- pycodestyle==2.10.0
35
- pyflakes==3.0.1
36
- pandas-stubs<3,>2
37
- types-tqdm<5,>4
27
+ isort==5.12.0
28
+ mypy==1.7.1
29
+ sqlfluff==2.3.5
30
+ yamllint==1.33.0
31
+ yq==3.2.3
38
32
 
39
33
  [test]
40
34
  coveralls
41
35
  pytest
36
+ openapi-core
@@ -4,4 +4,4 @@ try:
4
4
  __version__ = version("py-pilecore")
5
5
  # during CI
6
6
  except PackageNotFoundError:
7
- __version__ = "0.6.0"
7
+ __version__ = "0.7.1"
@@ -74,7 +74,8 @@ def create_grouper_payload(
74
74
  Parameters
75
75
  ----------
76
76
  cpt_results_dict:
77
- Dictionary with key as CPT name and value a SingleCPTBearingResults class
77
+ Dictionary with key as CPT name and value a SingleCPTBearingResults class.
78
+ Should contain at least 2 entries.
78
79
  pile_load_uls
79
80
  ULS load in kN. Used to determine if a grouping configuration is valid.
80
81
  stiff_construction
@@ -131,12 +132,12 @@ def create_grouper_payload(
131
132
  ValueError:
132
133
  - if NaN values are present in negative friction, bottom or shaft bearing_capacity
133
134
 
134
-
135
135
  - if x or y coordinate is None
136
136
 
137
-
138
137
  - if pile tip levels don't macht for all SingleCPTBearingResults
139
138
 
139
+ - if less than 2 valid CPTs are provided
140
+
140
141
 
141
142
  Returns
142
143
  -------
@@ -212,6 +213,12 @@ def create_grouper_payload(
212
213
  },
213
214
  }
214
215
  )
216
+
217
+ if not len(cpt_objects) >= 2:
218
+ raise ValueError(
219
+ "The PileCore grouper requires at least 2 CPTs with valid bearing capacity."
220
+ )
221
+
215
222
  payload["cpt_objects"] = cpt_objects
216
223
 
217
224
  # validate pile tip levels
@@ -158,9 +158,19 @@ def create_soil_properties_payload(
158
158
  groundwater_level_nap=groundwater_level_nap
159
159
  if groundwater_level_nap is not None
160
160
  else cpt.delivered_vertical_position_offset - 1,
161
- coordinates=dict(x=cpt.delivered_location.x, y=cpt.delivered_location.y),
162
161
  )
163
162
 
163
+ # Optionally add coordinates
164
+ if (
165
+ cpt.delivered_location is not None
166
+ and cpt.delivered_location.x is not None
167
+ and cpt.delivered_location.y is not None
168
+ ):
169
+ soil_properties["coordinates"] = {
170
+ "x": cpt.delivered_location.x,
171
+ "y": cpt.delivered_location.y,
172
+ }
173
+
164
174
  # Optionally add cpt-specific friction-range parameters
165
175
  if (
166
176
  individual_negative_friction_range_nap is not None
@@ -1,5 +1,6 @@
1
1
  from typing import Any
2
2
 
3
+ import numpy as np
3
4
  import plotly
4
5
 
5
6
 
@@ -19,14 +20,14 @@ def get_continuous_color(colorscale: Any, intermed: float) -> Any:
19
20
  colorscale = plotly.colors.make_colorscale(viridis_colors, scale=scale)
20
21
 
21
22
  :param colorscale: A plotly continuous colorscale defined with RGB string colors.
22
- :param intermed: value in the range [0, 1]
23
+ :param intermed: value in the range [0, 1]. If `intermed` is NaN, it returns the first color in the colorscale.
23
24
  :return: color in rgb string format
24
25
  :rtype: str
25
26
  """
26
27
  if len(colorscale) < 1:
27
28
  raise ValueError("colorscale must have at least one color")
28
29
 
29
- if intermed <= 0 or len(colorscale) == 1:
30
+ if intermed <= 0 or len(colorscale) == 1 or np.isnan(intermed):
30
31
  return colorscale[0][1]
31
32
  if intermed >= 1:
32
33
  return colorscale[-1][1]
File without changes
File without changes