Python package for Dimensional Analysis for Scientific Applications and Software Architecture (PyDASA).
Project description
PyDASA
Library to solve software architecture and physical problems with dimensionless analysis and the Pi-Theorem
Epic User Story
As a researcher, engineer, or software architect analyzing complex systems,
I want a comprehensive dimensional analysis library implementing the Buckingham Pi theorem,
So that I can systematically discover dimensionless relationships, validate models, and understand system behavior across physical, computational, and software architecture domains.
Core Capabilities
Dimensional Framework Management
- Manage fundamental dimensions beyond traditional physical units (L, M, T) .to include computational (T, S, N) and software architecture domains (T, D, E, C, A).
- Switch between frameworks for different problem domains.
Parameter and Variable Management
- Define dimensional parameters with complete specifications:
- Symbolic representation (name, LaTeX symbol).
- Dimensional formula (e.g., "L*T^-1" for velocity).
- Numerical ranges (min, max, mean, step)
- Classification (input, output, control).
- Statistical distributions and dependencies.
Unit System Integration
- Handle measurements across unit systems (imperial, metric, custom).
- Convert between units while maintaining dimensional consistency.
- Relate measurements to dimensional parameters.
Dimensionless Coefficient Discovery
- Generate dimensionless numbers using the Buckingham Pi theorem:
- Build relevance list: Identify mutually independent parameters influencing the phenomenon.
- Construct dimensional matrix: Arrange FDUs (rows) and variables (columns) into core and residual matrices.
- Transform to identity matrix: Apply linear transformations to the core matrix.
- Generate Pi coefficients: Combine residual and unity matrices to produce dimensionless groups.
- Classify coefficients by repeating vs. non-repeating parameters.
- Manage metadata: names, symbols, formulas, and parameter relationships.
Analysis and Simulation
- Verify similitude principles for model scaling and validation.
- Calculate coefficient ranges and parameter influence.
- Run Monte Carlo simulations to quantify uncertainty propagation.
- Perform sensitivity analysis to identify dominant parameters.
- Generate behavioral data for dimensionless relationships.
Data Export and Visualization Integration
- Export data formats compatible with pandas, matplotlib, seaborn.
- Structure results for integration with visualization libraries.
- Provide standardized outputs for dimensionless charts and parameter influence plots.
Emoji
- TODO ๐
- WORKING ๐ถ๐จโ๐ป
- DONE โ
- WARNING โ ๏ธ
Development Status
โ Completed
- Src: Merged buckinghamโdimensional, split config, moved parameter to elements, renamed datastructโstructs and handlersโworkflows
- Imports: Fixed 7 files (analysis, workflows, dimensional modules) to use new paths
- Code Quality: Fixed syntax errors, enhanced Enum validation, fixed frozen dataclass issues
- Tests: Updated test_basic.py and test_setup.py, all 16 core tests passing, structure aligned with src
- Decorator Migration: 100% complete - all core classes migrated to decorator-based validation (463+ tests passing)
- Elements: Variable, Coefficient, Basic, Fundamental, Measurement, Parameter
- Workflows: SensitivityAnalysis (21/21 tests โ), MonteCarloSimulation (14/14 tests โ), AnalysisEngine (27/27 tests โ)
- Validation System: Enhanced @validate_emptiness to handle dictionaries, lists, and all collections (not just strings)
- Package Configuration (v0.3.2):
- Added package-data to include JSON config files in distribution
- Exposed
__version__attribute in main module (7/7 package tests passing) - Configured semantic versioning for 0.x releases (major_on_zero=false)
- Updated CHANGELOG.md with recent changes
- Dimensional Analysis Fix:
- Fixed empty dimensional columns bug in CUSTOM framework variables
- Added validation in Matrix.create_matrix() to detect missing dimensions
- Fixed 5 test files (test_phenomena.py, test_scenario.py, test_simulation.py, test_practical.py, test_influence.py)
- All variables now properly initialize with schema and parse dimensions (130/130 tests passing)
- Documentation Structure:
- Integrated public folder subpages into main index.rst
- Reorganized navigation: Getting Started, User Guide, Design & Architecture, API Reference, Examples, Development, Project
- Documentation builds successfully with Sphinx
๐ถ In Progress
- Implementing Solver() class in workflows/phenomena.py
- Incremental testing and validation
๐ Pending
- context/: Unit conversion system (conversion.py, system.py, units.py)
- structs/: Complete test coverage for lists, tables, tools modules
- Tests: Coverage for context, structs modules
- Docs: Fill in stub content for documentation pages (basics.rst, architecture.rst, requirements.rst, etc.)
Src Path Structure
- pydasa
-
analysis: analysis and simulation modules, pending recheck๐!!!.
- scenario.py: contains the DimSensitivity class for understanding variance in the coefficients. โ
- simulation.py: monte carlo simulator for one coefficient (MonteCarloSim class). โ
-
context: unit conversion and measurement context (future scope)
- conversion.py: unit conversion handler for the solver. ๐
- system.py: system of units management. ๐
- units.py: unit definitions and operations. ๐
-
core: shared and core capabilities.
- basic.py: contains Foundation, SymBasis, IdxBasis classes, shared capabilities for entities with validation. โ
- constants.py: contains predefined dimensional frameworks (PHYSICAL, COMPUTATION, SOFTWARE) and FDU definitions. โ
- io.py: contains all the input/output functions for saving/loading data of the analysis. โ
- setup.py: contains global configuration (Framework, VarCardinality, CoefCardinality, AnaliticMode enums) and PyDASAConfig singleton. โ
- cfg/: configuration files folder
- default.json: default framework configurations. โ
-
dimensional: dimensional analysis core, pending recheck๐!!!.
- buckingham.py: contains the Coefficient class to represent dimensionless numbers (formerly vashchy.py). โ
- framework.py: contains the DimSchema class to manage and control FDUs in the solving process. UPDATING CODE NOW๐ถ๐จโ๐ป!!!.
- fundamental.py: contains Dimension class for Buckingham Pi-theorem specific operations. โ
- model.py: contains the DimMatrix class to solve the dimensional matrix. โ
-
elements: parameter and variable management with specification classes. โ
- parameter.py: contains Parameter class for dimensional parameter analysis with decorator-based validation. โ
- specs/: specification classes for different aspects of parameters
- conceptual.py: contains conceptual specifications (category, schema). โ
- numerical.py: contains numerical specifications (min, max, mean, dev, ranges). โ
- statistical.py: contains statistical specifications (distributions, dependencies). โ
- symbolic.py: contains symbolic specifications (dimensions, units, expressions). โ
-
structs: data structures and utilities, pending extensive tests๐!!!.
-
lists
- arlt.py: arraylist implementation. โ
- dllt.py: double linked list implementation. ๐
- ndlt.py: node list for double and single linked lists. โ
- sllt.py: single linked list implementation. โ
-
tables
- htme.py: entry used in the separate chaining hashtable. โ
- scht.py: separate chaining hashtable implementation. โ
-
tools
- hashing.py: hashing utilities for data structures. โ
- math.py: mathematical utilities for dimensional analysis. โ
- memory.py: memory management utilities. โ
-
types
- functions.py: function type definitions and utilities. โ
- generics.py: generic type definitions and type aliases. โ
-
-
workflows: analysis workflow handlers (formerly tasks). โ
- influence.py: contains the SensitivityAnalysis class (formerly SensitivityHandler) for understanding variance in the coefficients. โ
- phenomena.py: has the main Solver() class of the project. IMPORTANT๐!!!
- practical.py: contains the MonteCarloSimulation class (formerly MonteCarloHandler) to control all the Monte Carlo simulations. โ
-
serialization: parsing and serialization utilities. โ
- parser.py: contains LaTeX and formula parsing functions for better representation (formerly utils/latex.py). โ
-
validations: validation decorators, patterns, and error handling. โ
- decorators.py: contains all validation decorators (@validate_type, @validate_emptiness, @validate_choices, @validate_range, @validate_index, @validate_pattern, @validate_custom). Fully implemented with enhanced @validate_emptiness supporting strings, dicts, lists, and all collections. โ
- error.py: contains the generic error_handler() function and inspect_var() for all components. โ
- patterns.py: contains regex patterns for validation and parsing (formerly utils/patterns.py). โ
-
Tests Path Structure
- pydasa
-
analysis: shared analytic capabilities, pending updates๐!!!.
- test_scenario.py: tests for sensitivity analysis of the Coefficients (DimSensitivity class). โ
- test_simulation.py: tests for the Monte Carlo simulator for one coefficient (MonteCarloSim class). โ
-
context: shared unit of measure and system capabilities.
- test_conversion.py: tests for unit conversion handler. ๐
- test_system.py: tests for system of units management. ๐
- test_units.py: tests for unit definitions and operations. ๐
-
core: shared and core capabilities
- test_basic.py: tests for the Foundation, SymBasis, IdxBasis classes. โ
- test_constants.py: tests for predefined dimensional frameworks and FDU definitions. โ
- test_io.py: tests for all the input/output functions for saving/loading data. โ
- test_setup.py: tests for global configuration and PyDASAConfig singleton. โ
-
data: test fixtures and sample data
- test_data.py: contains test data for all PyDASA tests (fixtures and samples). โ
-
dimensional: main dimensiona analysis capabilities, pending updates๐!!!.
- test_buckingham.py: tests for the Coefficient class. โ
- test_framework.py: tests for the DimSchema class to manage and control FDUs. ๐ถ๐จโ๐ป
- test_fundamental.py: tests for the Dimension class. โ
- test_model.py: tests for the DimMatrix class to solve the dimensional matrix. โ
-
elements: parameter and variable tests with specification tests. โ
- test_parameter.py: tests for the Parameter class. โ
- specs/: specification class tests
- test_conceptual.py: tests for conceptual specifications. โ
- test_numerical.py: tests for numerical specifications. โ
- test_statistical.py: tests for statistical specifications. โ
- test_symbolic.py: tests for symbolic specifications. โ
-
structs: data structures tests, fundamental for unit of measure and conversions. ๐
-
lists
- test_arlt.py: tests for the arraylist. ๐
- test_dllt.py: tests for the double linked list. ๐
- test_ndlt.py: tests for the node list for double and single linked. ๐
- test_sllt.py: tests for the single linked list. ๐
-
tables
- test_htme.py: tests for the entry useful for the separate chaining hashtable. ๐
- test_scht.py: tests for the separate chaining hashtable. ๐
-
tools
- test_hashing.py: tests for hashing utilities. ๐
- test_math.py: tests for mathematical utilities. ๐
- test_memory.py: tests for memory management utilities. ๐
-
types
- test_functions.py: tests for function type definitions. ๐
- test_generics.py: tests for generic type definitions and type aliases. ๐
-
-
workflows (formerly tasks)
- test_influence.py: tests for the SensitivityAnalysis class (formerly SensitivityHandler) for understanding variance in the coefficients. All 21 tests passing. โ
- test_phenomena.py: tests for the main Solver() class of the project. ๐
- test_practical.py: tests for the MonteCarloSimulation class (formerly MonteCarloHandler) to control all the Monte Carlo simulations. All 14 tests passing. โ
-
serialization: parsing and serialization tests. โ
- test_parser.py: tests for LaTeX and formula parsing functions (formerly test_latex.py). โ
-
validations: validation decorators, patterns, and error handling tests. โ
- test_decorators.py: tests for all validation decorators (@validate_type, @validate_pattern, @validate_choices, etc.). โ
- test_error.py: tests for the generic error_handler() function and inspect_var() for all components. โ
- test_patterns.py: tests for regex patterns for validation and parsing. โ
-
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file pydasa-0.4.4.tar.gz.
File metadata
- Download URL: pydasa-0.4.4.tar.gz
- Upload date:
- Size: 110.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2721de409a5ffa702428d2d1f66186d653751984a71f7fc327535a88ce6590ce
|
|
| MD5 |
35677db50dbcbc9eeca77fac0113efaf
|
|
| BLAKE2b-256 |
866664f626c92ca8f1e3b38529c5baa2c04f50589b8a6142ae19e194896ae803
|
Provenance
The following attestation bundles were made for pydasa-0.4.4.tar.gz:
Publisher:
release.yml on DASA-Design/PyDASA
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pydasa-0.4.4.tar.gz -
Subject digest:
2721de409a5ffa702428d2d1f66186d653751984a71f7fc327535a88ce6590ce - Sigstore transparency entry: 799099271
- Sigstore integration time:
-
Permalink:
DASA-Design/PyDASA@90af05c4de755d2ced0e7a4d87bd995d8b418cae -
Branch / Tag:
refs/heads/main - Owner: https://github.com/DASA-Design
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@90af05c4de755d2ced0e7a4d87bd995d8b418cae -
Trigger Event:
push
-
Statement type:
File details
Details for the file pydasa-0.4.4-py3-none-any.whl.
File metadata
- Download URL: pydasa-0.4.4-py3-none-any.whl
- Upload date:
- Size: 133.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
16d049e62029e8558ac7b824b8e228aefcedc795cbdf8ef3698e536984e7aa7b
|
|
| MD5 |
8444aae2f615ee4bc482147b6d1342bd
|
|
| BLAKE2b-256 |
e1712ca6e99d97d73de2a32837f7b6675b42086fa28bac11ccfaa2c290a681ba
|
Provenance
The following attestation bundles were made for pydasa-0.4.4-py3-none-any.whl:
Publisher:
release.yml on DASA-Design/PyDASA
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pydasa-0.4.4-py3-none-any.whl -
Subject digest:
16d049e62029e8558ac7b824b8e228aefcedc795cbdf8ef3698e536984e7aa7b - Sigstore transparency entry: 799099275
- Sigstore integration time:
-
Permalink:
DASA-Design/PyDASA@90af05c4de755d2ced0e7a4d87bd995d8b418cae -
Branch / Tag:
refs/heads/main - Owner: https://github.com/DASA-Design
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@90af05c4de755d2ced0e7a4d87bd995d8b418cae -
Trigger Event:
push
-
Statement type: