Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/brightway-lca/brightway2-speedups
https://github.com/brightway-lca/brightway2-speedups
Last synced: about 2 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/brightway-lca/brightway2-speedups
- Owner: brightway-lca
- License: bsd-3-clause
- Created: 2020-03-11T08:10:34.000Z (almost 5 years ago)
- Default Branch: main
- Last Pushed: 2024-09-09T14:34:42.000Z (4 months ago)
- Last Synced: 2024-09-09T17:09:07.634Z (4 months ago)
- Language: Python
- Size: 208 KB
- Stars: 1
- Watchers: 2
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGES.md
- License: LICENSE
Awesome Lists containing this project
README
# Brightway2 speedups
A series of function written in [Cython](http://cython.org/) that speed up critical functions to improve the overall performance of the [Brightway2 life cycle assessment framework](https://brightwaylca.org).
In order to avoid having to have Cython as a dependency, this library includes both the `pyx` and Cython-generated `c` code, and is distributed as pre-compiled [wheels](https://pypi.python.org/pypi/wheel), except on Linux where access to a `C` compiler is assumed.
## Building `C` files
cython -t bw2speedups/_consolidate.pyx bw2speedups/_indexer.pyx bw2speedups/_find_first.pyx
## Building shared libraries
Although you can do this inplace, in my experience it is easier to just install the library in a temporary environment. You don't want to deal with `.so` files in the source repository.
## Testing
Install the library into a temporary environment, then manually run the separate test files, i.e. `python bw2speedupds/test/test_consolidate.py`. This isn't the most elegant, but it will do for now.
## Building wheels
pip install wheel
python setup.py bdist_wheelNote that this has to be done separately for each OS and environment, i.e. Windows 32-bit and 64-bit versions of Python are separate wheels, even with the same version of Windows.