forked from CCSI-Toolset/FOQUS
-
Notifications
You must be signed in to change notification settings - Fork 1
/
setup.py
164 lines (147 loc) · 5.74 KB
/
setup.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
#!/usr/bin/env python
#################################################################################
# FOQUS Copyright (c) 2012 - 2024, by the software owners: Oak Ridge Institute
# for Science and Education (ORISE), TRIAD National Security, LLC., Lawrence
# Livermore National Security, LLC., The Regents of the University of
# California, through Lawrence Berkeley National Laboratory, Battelle Memorial
# Institute, Pacific Northwest Division through Pacific Northwest National
# Laboratory, Carnegie Mellon University, West Virginia University, Boston
# University, the Trustees of Princeton University, The University of Texas at
# Austin, URS Energy & Construction, Inc., et al. All rights reserved.
#
# Please see the file LICENSE.md for full copyright and license information,
# respectively. This file is also available online at the URL
# "https://github.com/CCSI-Toolset/FOQUS".
#################################################################################
from setuptools import setup, find_packages
import sys
import os
import subprocess
import shutil
# default_version is the version if "git describe --tags" falls through
# Additional package info is set in foqus_lib/version/version.template.
# The version module, just makes it a bit easier for FOQUS to pull package info
default_version = "3.23.dev0"
try:
version = (
subprocess.check_output(
## Undo the 'n' here, this is just testing without having to put in a real tag ##
["ngit", "describe", "--tags", "--abbrev=0"]
)
.decode("utf-8")
.strip()
)
version = version.replace("-", ".dev", 1)
version = version.replace("-", "+", 1)
except:
version = default_version
# Write the version module
with open("foqus_lib/version/version.template", "r") as f:
verfile = f.read()
verfile = verfile.format(VERSION=version)
with open("foqus_lib/version/version.py", "w") as f:
f.write(verfile)
# now import version.
import foqus_lib.version.version as ver
print("Setting version as {0}".format(ver.version))
dist = setup(
name=ver.name,
version=ver.version,
license=ver.license,
description=ver.description,
author=ver.author,
author_email=ver.support,
maintainer=ver.maintainer,
maintainer_email=ver.maintainer_email,
url=ver.webpage,
packages=find_packages(),
py_modules=["pytest_qt_extras"],
package_data={
"": [
"*.template",
"*.json",
"*.dll",
"*.so",
"*.svg",
"*.png",
"*.html",
"*.gms",
"*.gpr",
"*.ccs",
"*.ico",
"*.R",
]
},
include_package_data=True,
scripts=["cloud/aws/foqus_service.py"],
entry_points={
"console_scripts": [
"foqus = foqus_lib.foqus:main",
"foqusPSUADEClient = foqus_lib.gui.ouu.foqusPSUADEClient:main",
],
},
# Required packages needed in the users env go here (non-versioned strongly preferred).
# requirements.txt should stay empty (other than the "-e .")
install_requires=[
"bokeh!=3.0.*,>=2.4.2",
"boto3",
"cma",
"dask[dataframe,distributed]", # <2024.3",
# prebuilt wheels not available on 3.11 for matplotlib<3.6 on: macos arm64, win32
# matplotlib>=3.8 has API incompatibilities with SDoE plots
# see CCSI-Toolset/FOQUS#1211 for more information
"matplotlib >= 3.6.0, <= 3.7.5",
"python-tsp==0.3.1",
"mplcursors",
"numpy",
"pandas",
"psutil",
"PyQt5==5.15.10",
"pywin32==306; sys_platform == 'win32'",
"requests",
"scipy",
"tqdm",
"TurbineClient ~= 4.0, >= 4.0.3",
"winshell; sys_platform == 'win32'",
"websocket_client>=1.1.0",
],
)
print(
f"""
==============================================================================
**Installed FOQUS {ver.version}**
**Optional additional software**
Optional software is not installed during the FOQUS installation, and is not
strictly required to run FOQUS, however this software is highly recommended.
Some FOQUS features will not be available without these packages.
PSUADE (Required for UQ features):
https://github.com/LLNL/psuade
PSUADE is required for FOQUS UQ and OUU features.
SimSinter (Required by Turbine):
https://github.com/CCSI-Toolset/SimSinter/releases
This provides a standard API for interacting with process simulation
software; currently it supports Aspen Plus, Aspen Custom Modeler, Excel,
and gPROMS. This is required for TurbineLite.
TurbineLite (Windows only, run Aspen, Excel, and gPROMS):
https://github.com/CCSI-Toolset/turb_sci_gate/releases
This requires SimSinter to be installed first. TurbineLite allows local
execution of Aspen Plus, ACM, Excel, and gPROMS nodes in FOQUS.
ALAMO (ALAMO Surogate models):
http://archimedes.cheme.cmu.edu/?q=alamo
ALAMO is software to develop algebraic surrogate models for complex
processes. Among other uses, these model can be used in algebraic modeling
languages such as GAMS, AMPL, and Pyomo. FOQUS provides an interface to
ALAMO allowing surrogates to be easily created from complex process models.
NLOpt Python (Additional optimization solvers):
https://nlopt.readthedocs.io/en/latest/NLopt_Installation/
FOQUS will make the NLOpt routines available if the NLOpt Python module is
installed. NLOpt can be installed through conda using the conda-forge
channel.
==============================================================================
To start FOQUS run (within this Anaconda env):
> foqus
To create a Windows Desktop shortcut for easy start-up of FOQUS,
run once (within this Anaconda env):
> foqus --make-shortcut
"""
)