Giter Club home page Giter Club logo

Comments (6)

yoelcortes avatar yoelcortes commented on August 28, 2024

Fixed! There were some problems with versioning... again. This time I am making it so that if you update a lower level package like thermosteam, all higher level packages (e.g. biorefineries, and biosteam) are also updated. I actually wasn't doing this before thinking users may want control this (bad idea jaja).

Also, I found that depending on your version of numpy, your numba requirement may be different. So just in case, I also added the latest compatible versions of numpy and numba as requirements.

Also, if you find BioSTEAM useful, don't forget to "Star" it! ;)

from biosteam.

DmitryBachin avatar DmitryBachin commented on August 28, 2024

Thank you very much!

It still has issues, but the output is different. I will share it a bit later when I check that it is not a problem from my side.

I will star it when I finish reproducing the documentation ;-)

from biosteam.

yoelcortes avatar yoelcortes commented on August 28, 2024

Cool. Here are few things to take note of:

  • The tutorial results have not been updated. There were some enhancements on unit operations and thermodynamic calculations recently that changed the outputs. You'll see different numbers and warnings, but the overall results should be close.
  • The tutorial notebooks are not the tests. BioSTEAM uses doctests to make sure all unit operations and biorefineries are working well before making updates. You can run the following code to test biosteam:
    # First restart your kernel to make sure there is no cache
    from biosteam.tests import test_biosteam
    test_biosteam()
    # You should get a few warnings. Anything else that is printed out
    # should show the actual result and the expected result of tests that failed.
    # If nothing failed, nothing else is printed.
  • The code coverage is about 60%, mostly because things like diagrams and some optional features are not yet included in the tests.
  • After finishing the tutorial, you can go through each class and run the examples. If the numbers are different, this could be because process settings (e.g. price of utilities, temperature of utilities, chemical engineering plant cost index, etc.) are different from running biorefineries.
  • Some non-essential unit operations are not well documented, so you'll have to look at the source code for these.

from biosteam.

DmitryBachin avatar DmitryBachin commented on August 28, 2024

Thank you!
So the output:

---------------------------------------------------------------------------
ModuleNotFoundError                       Traceback (most recent call last)
~/.local/lib/python3.7/site-packages/lazypkg/__init__.py in __getattr__(self, name)
     52         try:
---> 53             attr = import_module('.'+name, self.__package__)
     54         except ModuleNotFoundError as Error:

~/opt/anaconda3/lib/python3.7/importlib/__init__.py in import_module(name, package)
    126             level += 1
--> 127     return _bootstrap._gcd_import(name[level:], package, level)
    128 

~/opt/anaconda3/lib/python3.7/importlib/_bootstrap.py in _gcd_import(name, package, level)

~/opt/anaconda3/lib/python3.7/importlib/_bootstrap.py in _find_and_load(name, import_)

~/opt/anaconda3/lib/python3.7/importlib/_bootstrap.py in _find_and_load_unlocked(name, import_)

ModuleNotFoundError: No module named 'biorefineries.lipidcane.lipidcane_sys'

During handling of the above exception, another exception occurred:

ModuleNotFoundError                       Traceback (most recent call last)
~/.local/lib/python3.7/site-packages/lazypkg/__init__.py in __getattr__(self, name)
     52         try:
---> 53             attr = import_module('.'+name, self.__package__)
     54         except ModuleNotFoundError as Error:

~/opt/anaconda3/lib/python3.7/importlib/__init__.py in import_module(name, package)
    126             level += 1
--> 127     return _bootstrap._gcd_import(name[level:], package, level)
    128 

~/opt/anaconda3/lib/python3.7/importlib/_bootstrap.py in _gcd_import(name, package, level)

~/opt/anaconda3/lib/python3.7/importlib/_bootstrap.py in _find_and_load(name, import_)

~/opt/anaconda3/lib/python3.7/importlib/_bootstrap.py in _find_and_load_unlocked(name, import_)

~/opt/anaconda3/lib/python3.7/importlib/_bootstrap.py in _load_unlocked(spec)

~/opt/anaconda3/lib/python3.7/importlib/_bootstrap_external.py in exec_module(self, module)

~/opt/anaconda3/lib/python3.7/importlib/_bootstrap.py in _call_with_frames_removed(f, *args, **kwds)

~/opt/anaconda3/lib/python3.7/site-packages/biorefineries/lipidcane/utils/__init__.py in <module>
      6 """
----> 7 from . import composition
      8 

~/opt/anaconda3/lib/python3.7/site-packages/biorefineries/lipidcane/utils/composition.py in <module>
     13 from biorefineries.lipidcane.system import lipid_cane
---> 14 from array_collections import tuple_array
     15 

ModuleNotFoundError: No module named 'array_collections'

During handling of the above exception, another exception occurred:

ModuleNotFoundError                       Traceback (most recent call last)
<ipython-input-3-a199e55e7f85> in <module>
----> 1 lipidcane_tea = LipidcaneTEA(system=lc.lipidcane_sys,
      2                              IRR=0.15,
      3                              duration=(2018, 2038),
      4                              depreciation='MACRS7',
      5                              income_tax=0.35,

~/.local/lib/python3.7/site-packages/lazypkg/__init__.py in __getattr__(self, name)
     60             unsearchable = self.__unsearchable
     61             for i in self.__all__:
---> 62                 module = getattr(self, i)
     63                 if (isinstance(module, ModuleType)
     64                     and i not in unsearchable

~/.local/lib/python3.7/site-packages/lazypkg/__init__.py in __getattr__(self, name)
     60             unsearchable = self.__unsearchable
     61             for i in self.__all__:
---> 62                 module = getattr(self, i)
     63                 if (isinstance(module, ModuleType)
     64                     and i not in unsearchable

~/.local/lib/python3.7/site-packages/lazypkg/__init__.py in __getattr__(self, name)
     54         except ModuleNotFoundError as Error:
     55             if name in attempts:
---> 56                 raise Error
     57             else:
     58                 attempts.add(name)

~/.local/lib/python3.7/site-packages/lazypkg/__init__.py in __getattr__(self, name)
     51         attempts = self.__import_attempts
     52         try:
---> 53             attr = import_module('.'+name, self.__package__)
     54         except ModuleNotFoundError as Error:
     55             if name in attempts:

~/opt/anaconda3/lib/python3.7/importlib/__init__.py in import_module(name, package)
    125                 break
    126             level += 1
--> 127     return _bootstrap._gcd_import(name[level:], package, level)
    128 
    129 

~/opt/anaconda3/lib/python3.7/importlib/_bootstrap.py in _gcd_import(name, package, level)

~/opt/anaconda3/lib/python3.7/importlib/_bootstrap.py in _find_and_load(name, import_)

~/opt/anaconda3/lib/python3.7/importlib/_bootstrap.py in _find_and_load_unlocked(name, import_)

~/opt/anaconda3/lib/python3.7/importlib/_bootstrap.py in _load_unlocked(spec)

~/opt/anaconda3/lib/python3.7/importlib/_bootstrap_external.py in exec_module(self, module)

~/opt/anaconda3/lib/python3.7/importlib/_bootstrap.py in _call_with_frames_removed(f, *args, **kwds)

~/opt/anaconda3/lib/python3.7/site-packages/biorefineries/lipidcane/utils/__init__.py in <module>
      5 @author: yoelr
      6 """
----> 7 from . import composition
      8 
      9 __all__ = (*composition.__all__,)

~/opt/anaconda3/lib/python3.7/site-packages/biorefineries/lipidcane/utils/composition.py in <module>
     12 from biorefineries.lipidcane.chemicals import pretreatment_chemicals
     13 from biorefineries.lipidcane.system import lipid_cane
---> 14 from array_collections import tuple_array
     15 
     16 __all__ = ('set_lipid_fraction',)

ModuleNotFoundError: No module named 'array_collections'

from biosteam.

yoelcortes avatar yoelcortes commented on August 28, 2024

Fixed! You can "pip install biorefineries==2.4.1" and try again.
"array_collections" is an old package I made. Didn't realize the lipidcane biorefinery still used it. I just removed all dependencies on that package. Thanks for posting!

from biosteam.

yoelcortes avatar yoelcortes commented on August 28, 2024

I'm assuming it worked. I'll be releasing BioSTEAM v2.5 in about two weaks with some power features on automatic creation of the complete system (with all internal recycles, process specifications, and facilities) and some extra documentation chapters with a complete biorefinery example. Hope you found BioSTEAM useful and can become an active user :)

from biosteam.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.