Skip to main content

bw_graph_tools

PyPI Status Python Version [License][license]

Read the documentation at https://bw_graph_tools.readthedocs.io/ Tests Codecov

pre-commit Black

Installation

You can install bw_graph_tools via [pip] from [PyPI]:

$ pip install bw_graph_tools

Packages are also on conda at the channel cmutel.

Usage

bw_graph_tools has three main components: A graph traversal class NewNodeEachVisitGraphTraversal; a function to guess production exchanges using only bw_processing datapackages guess_production_exchanges; and a function to find the path from node A to node B with the largest amount of the reference product of A, get_path_from_matrix and it's sister path_as_brightway_objects.

NewNodeEachVisitGraphTraversal

Normally we construct matrices and solve the resulting set of linear equations to get a life cycle inventory or impact assessment result. The matrix approach is elegant, in that it simultaneously solves all equations and handles cycles in the graph, and much faster than graph traversal. However, in some cases we want to actually traverse the supply chain graph and calculate the individual impact of visiting nodes at that point in the graph. Graph traversal's use cases include:

  • Distinguishing between different paths to the same object

  • Convolving temporal distributions

If we add temporal information using bw_temporalis, then the same node can occur at different times depending on how the temporal dynamics its preceding path. For example:

Contributing

Contributions are very welcome. To learn more, see the [Contributor Guide].

License

Distributed under the terms of the [BSD 3 Clause license][license], bw_graph_tools is free and open source software.

Issues

If you encounter any problems, please [file an issue] along with a detailed description.

Documentation

  1. Install the conda environment from the file .docs/environment.yml
  2. Build the documentation locally by running:
sphinx-autobuild docs _build/html -a -j auto --open-browser

Metadata

Release files for bw-graph-tools 0.10

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for bw-graph-tools 0.10
File Size Uploaded
bw_graph_tools-0.10.tar.gz 38.2 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for bw-graph-tools 0.10
File Interpreter ABI Platform
bw_graph_tools-0.10-py3-none-any.whl Python 3 none any Details

Total release size: 71.5 kB

Release files / bw_graph_tools-0.10.tar.gz

Download URL bw_graph_tools-0.10.tar.gz
Size 38.2 kB
Tags Source
SHA-256 checksum
How to use checksums
9a0ba02feb82e3da0d73f921607136771a2dd170fbf3c4320cb3460dc03e623d
BLAKE2b-256 checksum
How to use checksums
a533fc8246ad5a210c6692d6dfbddb8298da741979f9b6115fc6e5990b900146
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.0

Release files / bw_graph_tools-0.10-py3-none-any.whl

Download URL bw_graph_tools-0.10-py3-none-any.whl
Size 33.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
d8f3fcf6a5671815128f2f4034ee977758439eca64a729e398f27e4b52aa0313
BLAKE2b-256 checksum
How to use checksums
644a96b7bd3060740d8b47f07ce6e5d241a061c6020269f9a9a1499c5105bc97
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.0

Release history Release notifications | RSS feed

This release

0.10 This release

2 release files

0.9

2 release files

0.8

2 release files

0.7

2 release files

0.6

2 release files

0.5

2 release files

0.4.1

2 release files

0.4

2 release files

0.3.1

2 release files

0.3

2 release files

0.2.5

2 release files

0.2.3

2 release files

0.2.2

2 release files

0.2.1

2 release files

0.1.1

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page