BHoM / Python_Toolkit

GNU Lesser General Public License v3.0
3 stars 2 forks source link

requirements.txt not being generated correctly #106

Closed jamesramsden-bh closed 1 year ago

jamesramsden-bh commented 1 year ago

In the interim-fixes branch, the requirements.txt does not get set up correctly. To fix,

This is a priority fix as it prohibits the installation of the venv (without manually modifying the file anyway)

For reference, the following contents of requirements.txt result in a valid installation of the LB venv.

aiofiles aiohttp aiosignal aiosqlite anyio argon2-cffi argon2-cffi-bindings arrow astroid async-timeout asynctest attrs Babel backcall beautifulsoup4 bleach cached-property case-converter certifi cffi charset-normalizer click click-plugins colorama coverage cramjam cycler debugpy decorator defusedxml dill distlib dnspython docutils dragonfly-core==1.41.16 dragonfly-doe2==0.11.3 dragonfly-energy==1.23.23 dragonfly-radiance==0.2.54 dragonfly-schema==1.9.2 dragonfly-uwg==0.5.352 entrypoints et-xmlfile exceptiongroup fastjsonschema fastparquet filelock fonttools fortranformat fqdn frozenlist fsspec greenlet honeybee-core==1.55.15 honeybee-display==0.2.19 honeybee-energy==1.100.2 honeybee-energy-standards==2.2.6 honeybee-ies==0.7.1 honeybee-radiance==1.64.183 honeybee-radiance-command==1.22.2 honeybee-radiance-folder==2.11.11 honeybee-radiance-postprocess==0.4.219 honeybee-schema==1.53.2 honeybee-standards==2.0.6 honeybee-vtk==0.39.1 idna importlib-metadata importlib-resources iniconfig ipykernel ipython ipython-genutils isoduration isort jedi Jinja2 joblib json5 jsonpointer jsonschema jupyter-events jupyter-server jupyter_client jupyter_core jupyter_server_fileid jupyterlab jupyterlab-pygments jupyterlab_server kiwisolver ladybug-comfort==0.16.35 ladybug-core==0.41.25 ladybug-display==0.9.1 ladybug-geometry==1.27.1 ladybug-geometry-polyskel==1.4.18 ladybug-radiance==0.2.0 ladybug-rhino==1.39.14 lazy-object-proxy lbt-dragonfly==0.10.146 lbt-honeybee==0.7.238 lbt-ladybug==0.27.24 lbt-recipes==0.25.8 lockfile luigi MarkupSafe matplotlib matplotlib-inline mccabe meteostat mistune multidict mypy-extensions nbclassic nbclient nbconvert nbformat nest-asyncio notebook notebook_shim numexpr numpy opencv-python openpyxl packaging pandas pandas-downcast pandocfilters parso pathspec pickleshare Pillow pip-chill pkgutil_resolve_name platformdirs pluggy pollination-handlers==0.10.0 prometheus-client prompt-toolkit psutil pyarrow pycparser pydantic pydantic-openapi-helper Pygments pylint pymongo pyodbc pyparsing pyperclip pyrsistent pytest pytest-cov pytest-order python-daemon python-dateutil python-json-logger pytz pywin32 pywinpty PyYAML pyzmq queenbee==1.26.7 queenbee-local==0.5.4 requests rfc3339-validator rfc3986-validator scikit-learn scipy Send2Trash shapely six sniffio sockets soupsieve SQLAlchemy tables tenacity terminado threadpoolctl tinycss2 tomli tomlkit tornado tqdm traitlets typed-ast typing_extensions uri-template urllib3 uwg==5.8.11 virtualenv vtk wcwidth webcolors webencodings websocket-client wrapt wslink xlrd y-py yarl ypy-websocket zipp

tg359 commented 1 year ago

This issue is probably aligned with another issue encountered below. It're related to the @BHoM/ladybugtools_toolkit as a Python env being created off of the back of another existing full installation.

I think it's to do with change in file structure meaning the ./helpers directory is now a ./helpers.py file which confuses robocopy. It would probably be best to delete the PythonCode/*_Toolkit directory before copying files over for safety.

As a fun knock-on effect, after manually removing the files that stopped the installation first time round, BHoM installer encountered something like error 2830 (can't quite remember the exact code) due to a failed previous installation. I guess advice is to just delete the BHoM directory and reinstall when things like this happen, though I think changing the way that Python_Tk installs an environment might be necessary, being a bit more nuclear with the removal of old code and addition of new stuff.

tg359 commented 1 year ago

It might also be worth completely removing any dependency on Python_Toolkit as an installed package into BHoM venvs to avoid this from happening in the future also. We can still use the root BHoM Python install (which is effectively a full Python install, albeit manually built up from the zipped versions from the official Python source) for jupyter server, formatting via Black and maybe linting, but it might be a bit of a set-up required for IDEs ... which can also be overcome with some helpful config files for those using them.