brinkpy 0.1.0__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.
- brinkpy-0.1.0/.gitignore +46 -0
- brinkpy-0.1.0/PKG-INFO +103 -0
- brinkpy-0.1.0/README.md +79 -0
- brinkpy-0.1.0/brinkpy/__init__.py +14 -0
- brinkpy-0.1.0/brinkpy/__main__.py +6 -0
- brinkpy-0.1.0/brinkpy/brinkpy.py +832 -0
- brinkpy-0.1.0/brinkpy/config/__init__.py +0 -0
- brinkpy-0.1.0/brinkpy/config/data_models.py +707 -0
- brinkpy-0.1.0/brinkpy/examples/problems/AT610Problem.py +80 -0
- brinkpy-0.1.0/brinkpy/examples/problems/AT622Problem.py +103 -0
- brinkpy-0.1.0/brinkpy/examples/problems/AT624Problem.py +110 -0
- brinkpy-0.1.0/brinkpy/examples/problems/AT625Problem.py +92 -0
- brinkpy-0.1.0/brinkpy/examples/problems/AT68Problem.py +85 -0
- brinkpy-0.1.0/brinkpy/examples/problems/AU1dProblem.py +72 -0
- brinkpy-0.1.0/brinkpy/examples/problems/AU2Problem.py +66 -0
- brinkpy-0.1.0/brinkpy/examples/problems/AU3Problem.py +64 -0
- brinkpy-0.1.0/brinkpy/examples/problems/Chan1Problem.py +78 -0
- brinkpy-0.1.0/brinkpy/examples/problems/Chan2Problem.py +96 -0
- brinkpy-0.1.0/brinkpy/examples/problems/Chan3Problem.py +84 -0
- brinkpy-0.1.0/brinkpy/examples/problems/Dai1Problem.py +67 -0
- brinkpy-0.1.0/brinkpy/examples/problems/Ji1Problem.py +114 -0
- brinkpy-0.1.0/brinkpy/examples/problems/Ji2Problem.py +100 -0
- brinkpy-0.1.0/brinkpy/examples/problems/PipecorrProblem.py +152 -0
- brinkpy-0.1.0/brinkpy/examples/problems/Sorensen81Problem.py +106 -0
- brinkpy-0.1.0/brinkpy/utils/__init__.py +0 -0
- brinkpy-0.1.0/brinkpy/utils/api_utils.py +844 -0
- brinkpy-0.1.0/brinkpy/utils/auth_cli.py +272 -0
- brinkpy-0.1.0/brinkpy/utils/icons.py +21 -0
- brinkpy-0.1.0/brinkpy/utils/path_helpers.py +87 -0
- brinkpy-0.1.0/brinkpy/utils/profile_management.py +339 -0
- brinkpy-0.1.0/brinkpy/utils/utilities.py +78 -0
- brinkpy-0.1.0/pyproject.toml +47 -0
brinkpy-0.1.0/.gitignore
ADDED
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
.vscode/
|
|
2
|
+
.env/
|
|
3
|
+
|
|
4
|
+
# Build and packaging artifacts
|
|
5
|
+
dist/
|
|
6
|
+
build/
|
|
7
|
+
*.egg-info/
|
|
8
|
+
pip-wheel-metadata/
|
|
9
|
+
|
|
10
|
+
# Stripe CLI app
|
|
11
|
+
stripe
|
|
12
|
+
|
|
13
|
+
# MkDocs generated site
|
|
14
|
+
site/
|
|
15
|
+
|
|
16
|
+
# Python cache and bytecode
|
|
17
|
+
__pycache__/
|
|
18
|
+
**/__pycache__/
|
|
19
|
+
*.py[cod]
|
|
20
|
+
|
|
21
|
+
# Test and analysis caches
|
|
22
|
+
.pytest_cache/
|
|
23
|
+
.mypy_cache/
|
|
24
|
+
.ruff_cache/
|
|
25
|
+
.coverage
|
|
26
|
+
htmlcov/
|
|
27
|
+
|
|
28
|
+
# Virtual environments
|
|
29
|
+
.venv/
|
|
30
|
+
venv/
|
|
31
|
+
env/
|
|
32
|
+
|
|
33
|
+
# Jupyter
|
|
34
|
+
.ipynb_checkpoints/
|
|
35
|
+
|
|
36
|
+
# OS files
|
|
37
|
+
.DS_Store
|
|
38
|
+
|
|
39
|
+
# Project-specific generated/output paths
|
|
40
|
+
results/
|
|
41
|
+
/problems/
|
|
42
|
+
!/brinkpy/examples/problems/
|
|
43
|
+
!/brinkpy/examples/problems/**
|
|
44
|
+
problems2/
|
|
45
|
+
profiles/*.yaml
|
|
46
|
+
requirements.txt
|
brinkpy-0.1.0/PKG-INFO
ADDED
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
Metadata-Version: 2.5
|
|
2
|
+
Name: brinkpy
|
|
3
|
+
Version: 0.1.0
|
|
4
|
+
Summary: Brinkpy CLI for reliability analysis, design optimization, and simulation.
|
|
5
|
+
Project-URL: Homepage, https://brinkpy.app
|
|
6
|
+
Project-URL: Documentation, https://brinkpy.app
|
|
7
|
+
Project-URL: Repository, https://github.com/BrinkPy/brinkpy-cli
|
|
8
|
+
Author: Cesar Carrasco
|
|
9
|
+
Requires-Python: >=3.10
|
|
10
|
+
Requires-Dist: filedialpy>=0.1.0
|
|
11
|
+
Requires-Dist: matplotlib>=3.7.0
|
|
12
|
+
Requires-Dist: numpy>=1.24.0
|
|
13
|
+
Requires-Dist: platformdirs>=3.0.0
|
|
14
|
+
Requires-Dist: pydantic-core>=2.10.0
|
|
15
|
+
Requires-Dist: pydantic>=2.0.0
|
|
16
|
+
Requires-Dist: pyjwt>=2.0.0
|
|
17
|
+
Requires-Dist: python-dotenv>=1.0.0
|
|
18
|
+
Requires-Dist: pyyaml>=6.0
|
|
19
|
+
Requires-Dist: requests>=2.31.0
|
|
20
|
+
Requires-Dist: rich>=13.0.0
|
|
21
|
+
Requires-Dist: typer>=0.9.0
|
|
22
|
+
Requires-Dist: typing-extensions>=4.7.0
|
|
23
|
+
Description-Content-Type: text/markdown
|
|
24
|
+
|
|
25
|
+
# Brinkpy CLI
|
|
26
|
+
|
|
27
|
+
Brinkpy CLI is a Python command-line tool for reliability analysis, reliability-based design optimization, and simulation workflows using profile-based configuration.
|
|
28
|
+
|
|
29
|
+
It supports First-Order Reliability Method (FORM), Second-Order Reliability Method (SORM), Inverse FORM, Inverse SORM, Monte Carlo simulation, and Importance Sampling for rare-event probability estimation. Workflows cover forward reliability evaluation, reliability-constrained design, and post-design simulation with a consistent problem-module interface and support for correlated non-normal variables via Nataf transformation.
|
|
30
|
+
|
|
31
|
+
Run outputs are designed for engineering decisions and reporting, including reliability metrics and design points, tabulated summaries (Excel/JSON), plot reports (PDF), and pickled Matplotlib figure objects for post-processing.
|
|
32
|
+
|
|
33
|
+
## What Brinkpy CLI Does
|
|
34
|
+
|
|
35
|
+
- Reliability analysis with FORM and SORM
|
|
36
|
+
- Reliability-based design with inverse FORM/SORM workflows
|
|
37
|
+
- Monte Carlo and importance sampling simulation
|
|
38
|
+
- Profile-based YAML configuration for repeatable runs
|
|
39
|
+
|
|
40
|
+
## Install and Quick Start
|
|
41
|
+
|
|
42
|
+
On first use, Brinkpy will prompt you to authenticate. If you do not already have an account, you can create one during the sign-in flow.
|
|
43
|
+
|
|
44
|
+
```zsh
|
|
45
|
+
# Install from PyPI
|
|
46
|
+
pip install brinkpy
|
|
47
|
+
|
|
48
|
+
# Show help
|
|
49
|
+
brinkpy --help
|
|
50
|
+
|
|
51
|
+
# Copy packaged example problems
|
|
52
|
+
brinkpy examples copy
|
|
53
|
+
|
|
54
|
+
# Run an analysis with the default profile
|
|
55
|
+
brinkpy analyze default --include-sorm --plot-rfad
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
## Profile Management
|
|
59
|
+
|
|
60
|
+
Profiles are YAML files under `profiles/` that control run options.
|
|
61
|
+
|
|
62
|
+
```zsh
|
|
63
|
+
# Create and edit a custom profile
|
|
64
|
+
brinkpy profile new custom
|
|
65
|
+
brinkpy profile nano custom
|
|
66
|
+
# or
|
|
67
|
+
brinkpy profile vim custom
|
|
68
|
+
|
|
69
|
+
# Validate, list, copy, rename
|
|
70
|
+
brinkpy profile validate custom
|
|
71
|
+
brinkpy profile list
|
|
72
|
+
brinkpy profile copy default mycopy
|
|
73
|
+
brinkpy profile rename oldname newname
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
## Full Documentation
|
|
77
|
+
|
|
78
|
+
Read the full documentation at:
|
|
79
|
+
|
|
80
|
+
- https://brinkpy.app/
|
|
81
|
+
|
|
82
|
+
## Requirements
|
|
83
|
+
|
|
84
|
+
- Python 3.10+
|
|
85
|
+
- Internet connection for API access and authentication
|
|
86
|
+
|
|
87
|
+
## Testing and Validation
|
|
88
|
+
|
|
89
|
+
Unit and integration tests are provided in the `tests/` directory.
|
|
90
|
+
|
|
91
|
+
```zsh
|
|
92
|
+
# Run unit tests
|
|
93
|
+
python -m unittest discover tests -p 'test_*.py' -v
|
|
94
|
+
|
|
95
|
+
# Run integration tests with real API calls
|
|
96
|
+
BRINKPY_RUN_API_TESTS=1 python -m unittest tests.test_cli_api_integration -v
|
|
97
|
+
```
|
|
98
|
+
|
|
99
|
+
See the [testing guide](https://github.com/BrinkPy/brinkpy-cli/blob/main/TESTING.md) for details on test structure and rate limit behavior.
|
|
100
|
+
|
|
101
|
+
## Notes
|
|
102
|
+
|
|
103
|
+
- Auth0 device flow uses public values (domain, client ID, audience). No client secret is used in the CLI.
|
brinkpy-0.1.0/README.md
ADDED
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
# Brinkpy CLI
|
|
2
|
+
|
|
3
|
+
Brinkpy CLI is a Python command-line tool for reliability analysis, reliability-based design optimization, and simulation workflows using profile-based configuration.
|
|
4
|
+
|
|
5
|
+
It supports First-Order Reliability Method (FORM), Second-Order Reliability Method (SORM), Inverse FORM, Inverse SORM, Monte Carlo simulation, and Importance Sampling for rare-event probability estimation. Workflows cover forward reliability evaluation, reliability-constrained design, and post-design simulation with a consistent problem-module interface and support for correlated non-normal variables via Nataf transformation.
|
|
6
|
+
|
|
7
|
+
Run outputs are designed for engineering decisions and reporting, including reliability metrics and design points, tabulated summaries (Excel/JSON), plot reports (PDF), and pickled Matplotlib figure objects for post-processing.
|
|
8
|
+
|
|
9
|
+
## What Brinkpy CLI Does
|
|
10
|
+
|
|
11
|
+
- Reliability analysis with FORM and SORM
|
|
12
|
+
- Reliability-based design with inverse FORM/SORM workflows
|
|
13
|
+
- Monte Carlo and importance sampling simulation
|
|
14
|
+
- Profile-based YAML configuration for repeatable runs
|
|
15
|
+
|
|
16
|
+
## Install and Quick Start
|
|
17
|
+
|
|
18
|
+
On first use, Brinkpy will prompt you to authenticate. If you do not already have an account, you can create one during the sign-in flow.
|
|
19
|
+
|
|
20
|
+
```zsh
|
|
21
|
+
# Install from PyPI
|
|
22
|
+
pip install brinkpy
|
|
23
|
+
|
|
24
|
+
# Show help
|
|
25
|
+
brinkpy --help
|
|
26
|
+
|
|
27
|
+
# Copy packaged example problems
|
|
28
|
+
brinkpy examples copy
|
|
29
|
+
|
|
30
|
+
# Run an analysis with the default profile
|
|
31
|
+
brinkpy analyze default --include-sorm --plot-rfad
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
## Profile Management
|
|
35
|
+
|
|
36
|
+
Profiles are YAML files under `profiles/` that control run options.
|
|
37
|
+
|
|
38
|
+
```zsh
|
|
39
|
+
# Create and edit a custom profile
|
|
40
|
+
brinkpy profile new custom
|
|
41
|
+
brinkpy profile nano custom
|
|
42
|
+
# or
|
|
43
|
+
brinkpy profile vim custom
|
|
44
|
+
|
|
45
|
+
# Validate, list, copy, rename
|
|
46
|
+
brinkpy profile validate custom
|
|
47
|
+
brinkpy profile list
|
|
48
|
+
brinkpy profile copy default mycopy
|
|
49
|
+
brinkpy profile rename oldname newname
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
## Full Documentation
|
|
53
|
+
|
|
54
|
+
Read the full documentation at:
|
|
55
|
+
|
|
56
|
+
- https://brinkpy.app/
|
|
57
|
+
|
|
58
|
+
## Requirements
|
|
59
|
+
|
|
60
|
+
- Python 3.10+
|
|
61
|
+
- Internet connection for API access and authentication
|
|
62
|
+
|
|
63
|
+
## Testing and Validation
|
|
64
|
+
|
|
65
|
+
Unit and integration tests are provided in the `tests/` directory.
|
|
66
|
+
|
|
67
|
+
```zsh
|
|
68
|
+
# Run unit tests
|
|
69
|
+
python -m unittest discover tests -p 'test_*.py' -v
|
|
70
|
+
|
|
71
|
+
# Run integration tests with real API calls
|
|
72
|
+
BRINKPY_RUN_API_TESTS=1 python -m unittest tests.test_cli_api_integration -v
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
See the [testing guide](https://github.com/BrinkPy/brinkpy-cli/blob/main/TESTING.md) for details on test structure and rate limit behavior.
|
|
76
|
+
|
|
77
|
+
## Notes
|
|
78
|
+
|
|
79
|
+
- Auth0 device flow uses public values (domain, client ID, audience). No client secret is used in the CLI.
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"""
|
|
2
|
+
Brinkpy CLI - Command-line interface for reliability analysis and design using the Brinkpy API.
|
|
3
|
+
Copyright (c) 2025 Cesar Carrasco. All rights reserved.
|
|
4
|
+
"""
|
|
5
|
+
|
|
6
|
+
__version__ = "0.1.0"
|
|
7
|
+
__author__ = "Cesar Carrasco"
|
|
8
|
+
__email__ = "reliafy.app@gmail.com" # Optional
|
|
9
|
+
__description__ = "Command-line interface for reliability analysis and design using the Brinkpy API"
|
|
10
|
+
|
|
11
|
+
# You can also expose main components if needed
|
|
12
|
+
from brinkpy.brinkpy import app as main
|
|
13
|
+
|
|
14
|
+
__all__ = ["main", "__version__"]
|