Skip to main content

A framework for performing analysis based on a Bill of Materials (BOM) structure

Project description

Documentation Status Coverage

Quality gate

Bill of Materials Analysis

This repository allows for an engineering assembly to be represented in a Bill of Materials (BOM) structure for analysis. The aim was to reduce the cognative complexity of the various data sets that are required for input or output of an analysis workflow. The repository also includes a number of features to help with this analysis.

The motivation for this package comes from a desire to order complex system data used by analysis in a logical. The chosen method for ordering this data is the bill of materials as it provides a common framework used across engineering.

The bill of materials provides a hieracy of materials, components, and assemblies all of which can contain data that is important for the analysis. For example, a user may want to assess the mass of an assembly by summing the mass of all the components in that make it up.

The Bill of Materials can be plotted to help understand the system (taken from example):

tokamak
├── coil_set
│   ├── east
│   ├── north
│   ├── south
│   └── west
└── divertor

The data for each of the components can also be displayed easily:

================================================================================
| var           │ value   │ unit          │ description                        │
================================================================================
│ mass          │ 1000    │ metric_ton    │                                    │
================================================================================
│ configuration │ ST      │ dimensionless │                                    │
================================================================================
│ major_radius  │ 2       │ meter         │ the geometric centre of the plasma │
================================================================================    

Installation

The easiest way to install bom_analysis is using pip pip:

pip install bom_analysis

Help and Support

Testing

BOM Analysis contains a test suite that can be ran using pytest (must be installed). Three markers have been used to distiguish the different testing levels:

  • unittest: runs unit tests that generally only test an individual method by using mocking
  • integrationtest: runs the integration tests
  • regressiontest: tests bugs that have been indentified in other versions

The full test suite can be ran by navigating to the source directory and running pytest:

pytest 

It is possible to filter the tests by the markers:

pytest -m "unittest"

Or filter out markers:

pytest -m "not integrationtest and not regressiontest"

License

BSD 3

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

bom_analysis-1.0.0.tar.gz (47.5 kB view hashes)

Uploaded Source

Built Distribution

bom_analysis-1.0.0-py3-none-any.whl (51.1 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page