Skip to content

Commit

Permalink
Reset commit history
Browse files Browse the repository at this point in the history
  • Loading branch information
yoelcortes committed Oct 20, 2020
0 parents commit cfd91f4
Show file tree
Hide file tree
Showing 221 changed files with 35,243 additions and 0 deletions.
Binary file added .DS_Store
Binary file not shown.
1 change: 1 addition & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
docs/* linguist-vendored
68 changes: 68 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
build
dist
biosteam.egg-info
**/__pycache__
*.pyc
*.pyo
.gitignore
.pypirc
dist
MANIFEST
.coverage
.coveralls.yml
htmlcov
_build
.cache
__pycache__
prof
*Pyreverse*
monkeytype.sqlite3
*.spyproject*

# Docs #
########
# No need to save these files
docs/tutorial/.ipynb_checkpoints
docs/.ipynb_checkpoints
docs/_build/*
docs/_static/*
docs/_templates/*

# Compiled source #
###################
*.com
*.class
*.dll
*.exe
*.o
*.so
*.idea
# Packages #
############
# it's better to unpack these files and commit the raw source
# git has its own built in compression methods
*.7z
*.dmg
#*.gz
*.iso
*.jar
*.rar
#*.tar
#*.zip

# Logs and databases #
######################
*.log
*.sql
*.sqlite

# mac OS generated files #
######################
.DS_Store
.DS_Store?
._*
.Spotlight-V100
.Trashes
ehthumbs.db
Thumbs.db
surfaces
8 changes: 8 additions & 0 deletions .readthedocs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# .readthedocs.yml

build:
image: latest

python:
version 3.7:
setup_py_install: true
31 changes: 31 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
language: c
os:
- linux
compiler:
- "3.7"
- "3.8"
branches:
only:
- master
matrix:
fast_finish: true
notifications:
email: false
install:
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then CONDA_OS='Linux'; else CONDA_OS='MacOSX'; fi;
- wget http://repo.continuum.io/miniconda/Miniconda3-latest-${CONDA_OS}-x86_64.sh -O miniconda.sh;
- bash miniconda.sh -b -p $HOME/miniconda
- export PATH="$HOME/miniconda/bin:$PATH"
- hash -r
- conda config --set always_yes yes --set changeps1 no
- conda update -q conda
- conda info -a
- conda create -q -n test-environment python=$CC numpy pandas scipy matplotlib pytest sympy pytz
- source activate test-environment
- pip install -r requirements_test.txt
- python setup.py -q install
- rm -rf biosteam
script:
- py.test . -v --cov-report html --cov=biosteam --cov-report term-missing -m "not slow"
after_success:
- coveralls
21 changes: 21 additions & 0 deletions AUTHORS.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
The BioSTEAM Project Contributors is composed of:

* Yoel Cortes-Pena (Main BioSTEAM author and maintainer)

* Developers who have contributed in person and through email, including:

* Bugrah Mirsat Sahin

* Lisa Pardini

* Brent Scheidemantle

* Rui Shi

* Sarang Sunil Bhagwat

* Yalin Li

* All other developers that have contributed to the biosteam repository:

https://github.com/BioSTEAMDevelopmentGroup/biosteam/graphs/contributors
56 changes: 56 additions & 0 deletions LICENSE.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
===================================================================================================
The BioSTEAM project is under the University of Illinois/NCSA Open Source License
===================================================================================================

Copyright (c) 2019-2020 Yoel Cortes-Peña and Jeremy Guest. All rights reserved.

Developed by: Yoel Cortes-Peña and BioSTEAM Development Group
University of Illinois at Urbana-Champaign
https://illinois.edu/

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and
associated documentation files (the "Software"), to deal with the Software without restriction,
including without limitation the rights to use, copy, modify, merge, publish, distribute,
sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

* Redistributions of source code must retain the above copyright notice, this list of conditions
and the following disclaimers.

* Redistributions in binary form must reproduce the above copyright notice, this list of
conditions and the following disclaimers in the documentation and/or other materials provided
with the distribution.

* Neither the names of Yoel Cortes-Peña, Jeremy Guest, the University of Illinois, nor the names
of its contributors may be used to endorse or promote products derived from this Software
without specific prior written permission.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT
NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
NONINFRINGEMENT. IN NO EVENT SHALL THE CONTRIBUTORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS WITH THE SOFTWARE.


===================================================================================================
Legacy MIT Licence (Versions 0.1-0.9)
===================================================================================================

Copyright (c) 2018-2019 Yoel Rene Cortes-Pena <yoelcortes@gmail.com> and Jeremy Guest
<jsguest@illinois.edu>

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and
associated documentation files (the "Software"), to deal in the Software without restriction,
including without limitation the rights to use, copy, modify, merge, publish, distribute,
sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or
substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT
NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT
OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

19 changes: 19 additions & 0 deletions MANIFEST.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
include LICENSE.txt AUTHORS README.rst pytest.ini
recursive-include biosteam *
recursive-include tests *
global-exclude .spyproject
global-exclude tests/.spyproject/*
global-exclude tests/.spyproject
global-exclude *__pycache__*
global-exclude *.py[co]
global-exclude *.nbi
global-exclude *.nbc
global-exclude *.coverage
global-exclude *.so
global-exclude *.ipynb_checkpoints
global-exclude ipynb_checkpoints
global-exclude *-checkpoint.ipynb
global-exclude *checkpoint*
global-exclude .*ipynb_checkpoints*
prune thermosteam/__pycache__
recursive-exclude docs *ipynb_checkpoints
79 changes: 79 additions & 0 deletions README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
=========================================================================
BioSTEAM: The Biorefinery Simulation and Techno-Economic Analysis Modules
=========================================================================

.. image:: http://img.shields.io/pypi/v/biosteam.svg?style=flat
:target: https://pypi.python.org/pypi/biosteam
:alt: Version_status
.. image:: http://img.shields.io/badge/docs-latest-brightgreen.svg?style=flat
:target: https://biosteam.readthedocs.io/en/latest/
:alt: Documentation
.. image:: http://img.shields.io/badge/license-UIUC-blue.svg?style=flat
:target: https://github.com/BioSTEAMDevelopmentGroup/biosteam/blob/master/LICENSE.txt
:alt: license
.. image:: https://img.shields.io/pypi/pyversions/biosteam.svg
:target: https://pypi.python.org/pypi/biosteam
:alt: Supported_versions
.. image:: https://zenodo.org/badge/164639830.svg
:target: https://zenodo.org/badge/latestdoi/164639830
.. image:: https://coveralls.io/repos/github/BioSTEAMDevelopmentGroup/biosteam/badge.svg?branch=master
:target: https://coveralls.io/github/BioSTEAMDevelopmentGroup/biosteam?branch=master


.. contents::

What is BioSTEAM?
-----------------

BioSTEAM is a fast and flexible package for the design, simulation, and techno-economic analysis of biorefineries under uncertainty [1]_. BioSTEAM's framework is built to streamline and automate early-stage technology evaluations and to enable rigorous sensitivity and uncertainty analyses. Complete biorefinery configurations are available at the `Bioindustrial-Park <https://github.com/BioSTEAMDevelopmentGroup/biosteam>`_ GitHub repository, BioSTEAM's premier repository for biorefinery models and results. The long-term growth and maintenance of BioSTEAM is supported through both community-led development and the research institutions invested in BioSTEAM, including the `Center for Advanced Bioenergy and Bioproducts Innovation (CABBI) <https://cabbi.bio/>`_. Through its open-source and community-lead platform, BioSTEAM aims to foster communication and transparency within the biorefinery research community for an integrated effort to expedite the evaluation of candidate biofuels and bioproducts.


Installation
------------

Get the latest version of BioSTEAM from `PyPI <https://pypi.python.org/pypi/biosteam/>`__. If you have an installation of Python with pip, simple install it with:

$ pip install biosteam

To get the git version, run:

$ git clone git://github.com/BioSTEAMDevelopmentGroup/biosteam

For help on common installtion issues, please visit the `documentation <https://biosteam.readthedocs.io/en/latest/Installation.html>`__.

Documentation
-------------

BioSTEAM's documentation is available on the web:

http://biosteam.readthedocs.io/

Bug reports
-----------

To report bugs, please use the BioSTEAM's Bug Tracker at:

https://github.com/BioSTEAMDevelopmentGroup/biosteam


License information
-------------------

See ``LICENSE.txt`` for information on the terms & conditions for usage
of this software, and a DISCLAIMER OF ALL WARRANTIES.

Although not required by the BioSTEAM license, if it is convenient for you,
please cite BioSTEAM if used in your work. Please also consider contributing
any changes you make back, and benefit the community.


About the authors
-----------------

BioSTEAM was created and developed by `Yoel Cortes-Pena <http://engineeringforsustainability.com/yoelcortespena>`__ as part of the `Guest Group <http://engineeringforsustainability.com/>`__ and the `Center for Advanced Bioenergy and Bioproducts Innovation (CABBI) <https://cabbi.bio/>`__ at the `University of Illinois at Urbana-Champaign (UIUC) <https://illinois.edu/>`__.

References
----------
.. [1] Cortes-Peña, Y.; Kumar, D.; Singh, V.; Guest, J. S. BioSTEAM: A Fast and Flexible Platform for the Design, Simulation, and Techno-Economic Analysis of Biorefineries under Uncertainty. ACS Sustainable Chem. Eng. 2020. https://doi.org/10.1021/acssuschemeng.9b07040.
44 changes: 44 additions & 0 deletions biosteam/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
# -*- coding: utf-8 -*-
# BioSTEAM: The Biorefinery Simulation and Techno-Economic Analysis Modules
# Copyright (C) 2020, Yoel Cortes-Pena <yoelcortes@gmail.com>
#
# This module is under the UIUC open-source license. See
# github.com/BioSTEAMDevelopmentGroup/biosteam/blob/master/LICENSE.txt
# for license details.
"""
"""

__version__ = '2.20.23'

#: Chemical engineering plant cost index (defaults to 567.5 at 2017)
CE = 567.5

# %% Initialize BioSTEAM

from flexsolve import speed_up
from ._heat_utility import HeatUtility, UtilityAgent
from ._power_utility import PowerUtility
from ._unit import Unit
from ._system import System
from ._tea import CombinedTEA, TEA
from ._flowsheet import Flowsheet, main_flowsheet
from ._network import Network
from . import utils
from . import units
from . import evaluation
from . import exceptions
from . import process_tools
from . import examples
from . import report
from . import digraph

__all__ = ('Unit', 'PowerUtility', 'HeatUtility', 'UtilityAgent',
'System', 'TEA', 'CombinedTEA', 'utils', 'units', 'evaluation',
'main_flowsheet', 'Flowsheet', 'CE', 'Chemical', 'Chemicals', 'Stream',
'MultiStream', 'settings', 'Network', 'exceptions', 'speed_up', 'report',
'digraph', 'process_tools', 'examples', *units.__all__, *evaluation.__all__
)

from thermosteam import Chemical, Chemicals, Thermo, Stream, MultiStream, settings
from .evaluation import *
from .units import *
43 changes: 43 additions & 0 deletions biosteam/_facility.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
# -*- coding: utf-8 -*-
# BioSTEAM: The Biorefinery Simulation and Techno-Economic Analysis Modules
# Copyright (C) 2020, Yoel Cortes-Pena <yoelcortes@gmail.com>
#
# This module is under the UIUC open-source license. See
# github.com/BioSTEAMDevelopmentGroup/biosteam/blob/master/LICENSE.txt
# for license details.
"""
"""
from ._unit import Unit

__all__ = ('Facility',)

def get_network_priority(facility):
return facility.network_priority

class Facility(Unit, isabstract=True,
new_graphics=False):

@staticmethod
def ordered_facilities(facilities):
"""Return facilitied ordered according to their network priority."""
return sorted(facilities, key=get_network_priority)

def __init_subclass__(cls,
isabstract=False,
new_graphics=True):
super().__init_subclass__(isabstract,
new_graphics)
if not hasattr(cls, 'network_priority'):
raise NotImplementedError('Facility subclasses must implement a '
'`network_priority` attribute to designate '
'the order of simulation relative to other '
'facilities')

def __init__(self, ID='', ins=None, outs=(), thermo=None):
Unit.__init__(self, ID, ins, outs, thermo)
self._system = None

@property
def system(self):
return self._system

Loading

0 comments on commit cfd91f4

Please sign in to comment.