Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding requirements.txt file to support pip venv #54

Closed
wants to merge 8 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,6 @@ data_files/debug_logs/lp_files/*
data_files/untracked_data/
.DS_Store
*.ipynb_checkpoints

# ignore the .idea folder from pycharm -- a pycharm specific config folder
.idea/*
6 changes: 6 additions & 0 deletions data_files/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# locally ignore all .dat files and newly added .sqlite db's
*.sqlite
*.dat
*.xlsx
*.log

14 changes: 14 additions & 0 deletions definitions.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
"""
top-level folder to provide project-wide definitions & references
"""

# Written by: J. F. Hyink
# [email protected]
# https://westernspark.us

# Created on: 6/28/23

import os

PROJECT_ROOT = os.path.dirname(os.path.abspath(__file__))

34 changes: 34 additions & 0 deletions main.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
"""
new entry point for running the model.
"""
# Written by: J. F. Hyink
# [email protected]
# https://westernspark.us

# Created on: 7/18/23


from temoa.temoa_model.temoa_model import temoa_create_model
from temoa.temoa_model.temoa_run import TemoaSolver

def runModelUI(config_filename):
"""This function launches the model run from the Temoa GUI"""
raise NotImplementedError
solver = TemoaSolver(model, config_filename)
for k in solver.createAndSolve():
yield k
# yield " " * 1024


def runModel():
"""This function launches the model run, and is invoked when called from
__main__.py"""

dummy = "" # If calling from command line, send empty string
model = temoa_create_model()
solver = TemoaSolver(model, dummy)
for k in solver.createAndSolve():
pass

if __name__ == '__main__':
runModel()
2 changes: 2 additions & 0 deletions output_files/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# ignore everything in the outputs
*
47 changes: 47 additions & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
# Requirements for core model functionality
# python=3.7.3
# tested using python 3.7.9.
# There was some compatibility issue (see dev notes) about the introduction of keyword "asynch" about
# this time and using 3.7.9 and pyomo 3.5.1 fixed it. So if using this file to set up, fetch 3.7.9 from
# python.org and use pip to install these requirements. Other deltas are noted below.

# to use pip to install (in a venv, if desired):
# $: pip install -r requirements.txt

pyomo==5.5.1
# pyomo.extras <-- not avaialable on PyPi. Does not appear to be used in project
xlwt
ipython
matplotlib
pandas
numpy
scipy
joblib
salib
pydoe
pyutilib==5.8
# glpk <-- Not in PyPi. Should be installed separately
# python-graphviz <-- appears as graphviz in pypi (below)
graphviz
ipykernel
jupyter
jupyter_contrib_nbextensions
seaborn
tabulate
xlsxwriter
plotly
pyam-iamc # <-- different name on PyPi

# Below required to update documentation
sphinx
# sphisphinx_rtd_theme <-- not available on PyPi
sphinxcontrib-htmlhelp
sphinxcontrib-serializinghtml
# nxcontrib-bibtex <-- not available on pypi
# cbc <-- solver should be installed separately, not available on PyPi

# new requirements
pytest



File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Loading