structural-lib-is456 0.9.5__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.
Files changed (60) hide show
  1. structural_lib_is456-0.9.5/LICENSE +21 -0
  2. structural_lib_is456-0.9.5/PKG-INFO +101 -0
  3. structural_lib_is456-0.9.5/README.md +68 -0
  4. structural_lib_is456-0.9.5/pyproject.toml +57 -0
  5. structural_lib_is456-0.9.5/setup.cfg +19 -0
  6. structural_lib_is456-0.9.5/structural_lib/__init__.py +65 -0
  7. structural_lib_is456-0.9.5/structural_lib/__main__.py +600 -0
  8. structural_lib_is456-0.9.5/structural_lib/api.py +267 -0
  9. structural_lib_is456-0.9.5/structural_lib/bbs.py +852 -0
  10. structural_lib_is456-0.9.5/structural_lib/compliance.py +430 -0
  11. structural_lib_is456-0.9.5/structural_lib/constants.py +17 -0
  12. structural_lib_is456-0.9.5/structural_lib/detailing.py +579 -0
  13. structural_lib_is456-0.9.5/structural_lib/ductile.py +97 -0
  14. structural_lib_is456-0.9.5/structural_lib/dxf_export.py +1018 -0
  15. structural_lib_is456-0.9.5/structural_lib/excel_integration.py +482 -0
  16. structural_lib_is456-0.9.5/structural_lib/flexure.py +589 -0
  17. structural_lib_is456-0.9.5/structural_lib/job_cli.py +38 -0
  18. structural_lib_is456-0.9.5/structural_lib/job_runner.py +209 -0
  19. structural_lib_is456-0.9.5/structural_lib/materials.py +106 -0
  20. structural_lib_is456-0.9.5/structural_lib/py.typed +1 -0
  21. structural_lib_is456-0.9.5/structural_lib/rebar_optimizer.py +282 -0
  22. structural_lib_is456-0.9.5/structural_lib/serviceability.py +349 -0
  23. structural_lib_is456-0.9.5/structural_lib/shear.py +128 -0
  24. structural_lib_is456-0.9.5/structural_lib/tables.py +92 -0
  25. structural_lib_is456-0.9.5/structural_lib/types.py +121 -0
  26. structural_lib_is456-0.9.5/structural_lib/utilities.py +52 -0
  27. structural_lib_is456-0.9.5/structural_lib_is456.egg-info/PKG-INFO +101 -0
  28. structural_lib_is456-0.9.5/structural_lib_is456.egg-info/SOURCES.txt +80 -0
  29. structural_lib_is456-0.9.5/structural_lib_is456.egg-info/dependency_links.txt +1 -0
  30. structural_lib_is456-0.9.5/structural_lib_is456.egg-info/requires.txt +11 -0
  31. structural_lib_is456-0.9.5/structural_lib_is456.egg-info/top_level.txt +1 -0
  32. structural_lib_is456-0.9.5/tests/test_api_and_utilities.py +60 -0
  33. structural_lib_is456-0.9.5/tests/test_api_entrypoints_is456.py +97 -0
  34. structural_lib_is456-0.9.5/tests/test_bbs.py +842 -0
  35. structural_lib_is456-0.9.5/tests/test_cli.py +586 -0
  36. structural_lib_is456-0.9.5/tests/test_compliance.py +107 -0
  37. structural_lib_is456-0.9.5/tests/test_compliance_validation.py +61 -0
  38. structural_lib_is456-0.9.5/tests/test_coverage_gaps.py +170 -0
  39. structural_lib_is456-0.9.5/tests/test_detailing.py +304 -0
  40. structural_lib_is456-0.9.5/tests/test_doubly_reinforced.py +85 -0
  41. structural_lib_is456-0.9.5/tests/test_ductile.py +76 -0
  42. structural_lib_is456-0.9.5/tests/test_dxf_export_edges.py +838 -0
  43. structural_lib_is456-0.9.5/tests/test_dxf_export_smoke.py +66 -0
  44. structural_lib_is456-0.9.5/tests/test_excel_integration.py +386 -0
  45. structural_lib_is456-0.9.5/tests/test_excel_integration_edges.py +516 -0
  46. structural_lib_is456-0.9.5/tests/test_findings_regressions.py +90 -0
  47. structural_lib_is456-0.9.5/tests/test_flanged_beam.py +136 -0
  48. structural_lib_is456-0.9.5/tests/test_flexure_edges_additional.py +178 -0
  49. structural_lib_is456-0.9.5/tests/test_golden_vectors_is456.py +95 -0
  50. structural_lib_is456-0.9.5/tests/test_input_validation.py +169 -0
  51. structural_lib_is456-0.9.5/tests/test_job_cli.py +73 -0
  52. structural_lib_is456-0.9.5/tests/test_job_runner_is456.py +182 -0
  53. structural_lib_is456-0.9.5/tests/test_materials_tables_edges.py +73 -0
  54. structural_lib_is456-0.9.5/tests/test_parity_vectors.py +409 -0
  55. structural_lib_is456-0.9.5/tests/test_property_invariants.py +312 -0
  56. structural_lib_is456-0.9.5/tests/test_rebar_optimizer.py +226 -0
  57. structural_lib_is456-0.9.5/tests/test_serviceability.py +129 -0
  58. structural_lib_is456-0.9.5/tests/test_structural.py +268 -0
  59. structural_lib_is456-0.9.5/tests/test_tables_and_materials_additional.py +507 -0
  60. structural_lib_is456-0.9.5/tests/test_verification_pack.py +157 -0
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2025 Pravin Surawase
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,101 @@
1
+ Metadata-Version: 2.4
2
+ Name: structural-lib-is456
3
+ Version: 0.9.5
4
+ Summary: IS 456 RC Beam Design Library (flexure, shear, ductile detailing, DXF export for RC beams)
5
+ Author: Pravin Surawase
6
+ License-Expression: MIT
7
+ Project-URL: Homepage, https://github.com/Pravin-surawase/structural_engineering_lib
8
+ Project-URL: Repository, https://github.com/Pravin-surawase/structural_engineering_lib
9
+ Project-URL: Documentation, https://github.com/Pravin-surawase/structural_engineering_lib/tree/main/docs
10
+ Project-URL: Changelog, https://github.com/Pravin-surawase/structural_engineering_lib/blob/main/CHANGELOG.md
11
+ Project-URL: Issues, https://github.com/Pravin-surawase/structural_engineering_lib/issues
12
+ Classifier: Development Status :: 3 - Alpha
13
+ Classifier: Intended Audience :: Developers
14
+ Classifier: Topic :: Scientific/Engineering
15
+ Classifier: Programming Language :: Python :: 3
16
+ Classifier: Programming Language :: Python :: 3.9
17
+ Classifier: Programming Language :: Python :: 3.10
18
+ Classifier: Programming Language :: Python :: 3.11
19
+ Classifier: Programming Language :: Python :: 3.12
20
+ Requires-Python: >=3.9
21
+ Description-Content-Type: text/markdown
22
+ License-File: LICENSE
23
+ Provides-Extra: dev
24
+ Requires-Dist: pytest; extra == "dev"
25
+ Requires-Dist: pytest-cov; extra == "dev"
26
+ Requires-Dist: black; extra == "dev"
27
+ Requires-Dist: mypy; extra == "dev"
28
+ Requires-Dist: pre-commit; extra == "dev"
29
+ Requires-Dist: ruff; extra == "dev"
30
+ Provides-Extra: dxf
31
+ Requires-Dist: ezdxf>=1.0; extra == "dxf"
32
+ Dynamic: license-file
33
+
34
+ # structural-lib-is456
35
+
36
+ IS 456 RC Beam Design Library (Python package).
37
+
38
+ **Version:** 0.9.4
39
+ **Tests:** 1680+ passing
40
+
41
+ For full project overview and usage examples, see the repository root `README.md`.
42
+
43
+ ## Quick Install
44
+
45
+ ```bash
46
+ # From PyPI (when published)
47
+ pip install structural-lib-is456
48
+
49
+ # From GitHub (pinned to release)
50
+ pip install "structural-lib-is456 @ git+https://github.com/Pravin-surawase/structural_engineering_lib.git@v0.9.4#subdirectory=Python"
51
+
52
+ # With DXF support
53
+ pip install "structural-lib-is456[dxf] @ git+https://github.com/Pravin-surawase/structural_engineering_lib.git@v0.9.4#subdirectory=Python"
54
+ ```
55
+
56
+ ## Quick Start: CLI Usage
57
+
58
+ The library provides a unified command-line interface:
59
+
60
+ ```bash
61
+ # Run beam design from CSV input
62
+ python -m structural_lib design input.csv -o results.json
63
+
64
+ # Generate bar bending schedule
65
+ python -m structural_lib bbs results.json -o bbs.csv
66
+
67
+ # Generate DXF drawings (requires ezdxf)
68
+ python -m structural_lib dxf results.json -o drawings.dxf
69
+
70
+ # Run complete job from specification
71
+ python -m structural_lib job job.json -o output/
72
+ ```
73
+
74
+ Run `python -m structural_lib --help` for more options.
75
+
76
+ ## Quick Start: Python API
77
+
78
+ ```python
79
+ from structural_lib import flexure, shear, api
80
+
81
+ # Single beam design
82
+ result = flexure.design_singly_reinforced(
83
+ b=230, d=450, d_total=500, mu_knm=100, fck=25, fy=500
84
+ )
85
+ print(f"Ast required: {result.ast_required:.0f} mm²")
86
+
87
+ # Multi-case compliance check
88
+ report = api.check_beam_is456(
89
+ units="IS456",
90
+ b_mm=230, D_mm=500, d_mm=450,
91
+ fck_nmm2=25, fy_nmm2=500,
92
+ cases=[{"case_id": "ULS-1", "mu_knm": 100, "vu_kn": 80}]
93
+ )
94
+ print(f"Governing case: {report.governing_case_id}")
95
+ ```
96
+
97
+ ## New in v0.9.4
98
+
99
+ - **Unified CLI:** `python -m structural_lib` with design/bbs/dxf/job subcommands
100
+ - **Cutting-stock optimizer:** `from structural_lib.rebar_optimizer import optimize_cutting_stock`
101
+ - **27 new CLI tests**
@@ -0,0 +1,68 @@
1
+ # structural-lib-is456
2
+
3
+ IS 456 RC Beam Design Library (Python package).
4
+
5
+ **Version:** 0.9.4
6
+ **Tests:** 1680+ passing
7
+
8
+ For full project overview and usage examples, see the repository root `README.md`.
9
+
10
+ ## Quick Install
11
+
12
+ ```bash
13
+ # From PyPI (when published)
14
+ pip install structural-lib-is456
15
+
16
+ # From GitHub (pinned to release)
17
+ pip install "structural-lib-is456 @ git+https://github.com/Pravin-surawase/structural_engineering_lib.git@v0.9.4#subdirectory=Python"
18
+
19
+ # With DXF support
20
+ pip install "structural-lib-is456[dxf] @ git+https://github.com/Pravin-surawase/structural_engineering_lib.git@v0.9.4#subdirectory=Python"
21
+ ```
22
+
23
+ ## Quick Start: CLI Usage
24
+
25
+ The library provides a unified command-line interface:
26
+
27
+ ```bash
28
+ # Run beam design from CSV input
29
+ python -m structural_lib design input.csv -o results.json
30
+
31
+ # Generate bar bending schedule
32
+ python -m structural_lib bbs results.json -o bbs.csv
33
+
34
+ # Generate DXF drawings (requires ezdxf)
35
+ python -m structural_lib dxf results.json -o drawings.dxf
36
+
37
+ # Run complete job from specification
38
+ python -m structural_lib job job.json -o output/
39
+ ```
40
+
41
+ Run `python -m structural_lib --help` for more options.
42
+
43
+ ## Quick Start: Python API
44
+
45
+ ```python
46
+ from structural_lib import flexure, shear, api
47
+
48
+ # Single beam design
49
+ result = flexure.design_singly_reinforced(
50
+ b=230, d=450, d_total=500, mu_knm=100, fck=25, fy=500
51
+ )
52
+ print(f"Ast required: {result.ast_required:.0f} mm²")
53
+
54
+ # Multi-case compliance check
55
+ report = api.check_beam_is456(
56
+ units="IS456",
57
+ b_mm=230, D_mm=500, d_mm=450,
58
+ fck_nmm2=25, fy_nmm2=500,
59
+ cases=[{"case_id": "ULS-1", "mu_knm": 100, "vu_kn": 80}]
60
+ )
61
+ print(f"Governing case: {report.governing_case_id}")
62
+ ```
63
+
64
+ ## New in v0.9.4
65
+
66
+ - **Unified CLI:** `python -m structural_lib` with design/bbs/dxf/job subcommands
67
+ - **Cutting-stock optimizer:** `from structural_lib.rebar_optimizer import optimize_cutting_stock`
68
+ - **27 new CLI tests**
@@ -0,0 +1,57 @@
1
+ [build-system]
2
+ requires = ["setuptools>=77.0"]
3
+ build-backend = "setuptools.build_meta"
4
+
5
+ [project]
6
+ name = "structural-lib-is456"
7
+ version = "0.9.5"
8
+ description = "IS 456 RC Beam Design Library (flexure, shear, ductile detailing, DXF export for RC beams)"
9
+ readme = "README.md"
10
+ requires-python = ">=3.9"
11
+ license = "MIT"
12
+ license-files = ["LICENSE"]
13
+ authors = [
14
+ { name = "Pravin Surawase" }
15
+ ]
16
+ classifiers = [
17
+ "Development Status :: 3 - Alpha",
18
+ "Intended Audience :: Developers",
19
+ "Topic :: Scientific/Engineering",
20
+ "Programming Language :: Python :: 3",
21
+ "Programming Language :: Python :: 3.9",
22
+ "Programming Language :: Python :: 3.10",
23
+ "Programming Language :: Python :: 3.11",
24
+ "Programming Language :: Python :: 3.12",
25
+ ]
26
+
27
+ [project.urls]
28
+ Homepage = "https://github.com/Pravin-surawase/structural_engineering_lib"
29
+ Repository = "https://github.com/Pravin-surawase/structural_engineering_lib"
30
+ Documentation = "https://github.com/Pravin-surawase/structural_engineering_lib/tree/main/docs"
31
+ Changelog = "https://github.com/Pravin-surawase/structural_engineering_lib/blob/main/CHANGELOG.md"
32
+ Issues = "https://github.com/Pravin-surawase/structural_engineering_lib/issues"
33
+
34
+ [project.optional-dependencies]
35
+ dev = ["pytest", "pytest-cov", "black", "mypy", "pre-commit", "ruff"]
36
+ dxf = ["ezdxf>=1.0"] # For DXF drawing generation
37
+
38
+ [tool.ruff]
39
+ target-version = "py39"
40
+ line-length = 88
41
+
42
+ [tool.ruff.lint]
43
+ select = ["F"]
44
+
45
+ [tool.mypy]
46
+ python_version = "3.9"
47
+ files = ["structural_lib"]
48
+ explicit_package_bases = true
49
+ ignore_missing_imports = true
50
+ warn_unused_ignores = true
51
+ warn_return_any = false
52
+ warn_redundant_casts = true
53
+ no_implicit_optional = false
54
+ check_untyped_defs = false
55
+ disallow_untyped_defs = false
56
+ disallow_incomplete_defs = false
57
+ show_error_codes = true
@@ -0,0 +1,19 @@
1
+ [options]
2
+ packages = find:
3
+ package_dir =
4
+ = .
5
+ include_package_data = True
6
+ python_requires = >=3.9
7
+ install_requires =
8
+
9
+ [options.package_data]
10
+ structural_lib =
11
+ py.typed
12
+
13
+ [options.packages.find]
14
+ where = .
15
+
16
+ [egg_info]
17
+ tag_build =
18
+ tag_date = 0
19
+
@@ -0,0 +1,65 @@
1
+ """
2
+ Package: structural_lib
3
+ Description: IS 456:2000 Structural Engineering Library
4
+ License: MIT
5
+
6
+ Version is read dynamically from pyproject.toml via importlib.metadata.
7
+ Use api.get_library_version() to get the current version.
8
+ """
9
+
10
+ from __future__ import annotations
11
+
12
+ import importlib
13
+ from importlib.metadata import PackageNotFoundError, version as _get_version
14
+ from types import ModuleType
15
+ from typing import Optional
16
+
17
+ # Dynamic version from installed package metadata
18
+ try:
19
+ __version__ = _get_version("structural-lib-is456")
20
+ except PackageNotFoundError:
21
+ __version__ = "0.0.0-dev" # Not installed, development mode
22
+
23
+ # Expose key modules
24
+ from . import constants
25
+ from . import types
26
+ from . import tables
27
+ from . import utilities
28
+ from . import materials
29
+ from . import flexure
30
+ from . import shear
31
+ from . import ductile
32
+ from . import api
33
+ from . import detailing
34
+ from . import serviceability
35
+ from . import compliance
36
+ from . import bbs
37
+
38
+ # DXF export is optional (requires ezdxf)
39
+ dxf_export: Optional[ModuleType]
40
+ try:
41
+ dxf_export = importlib.import_module(f"{__name__}.dxf_export")
42
+ except ImportError:
43
+ dxf_export = None
44
+
45
+ # Excel integration module
46
+ from . import excel_integration
47
+
48
+ __all__ = [
49
+ "__version__",
50
+ "api",
51
+ "bbs",
52
+ "compliance",
53
+ "constants",
54
+ "detailing",
55
+ "ductile",
56
+ "dxf_export",
57
+ "excel_integration",
58
+ "flexure",
59
+ "materials",
60
+ "serviceability",
61
+ "shear",
62
+ "tables",
63
+ "types",
64
+ "utilities",
65
+ ]