pymoca 0.10.0.dev6__tar.gz → 0.11.0.dev3__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {pymoca-0.10.0.dev6 → pymoca-0.11.0.dev3}/MANIFEST.in +0 -1
- pymoca-0.11.0.dev3/PKG-INFO +155 -0
- pymoca-0.11.0.dev3/README.md +77 -0
- pymoca-0.11.0.dev3/pyproject.toml +77 -0
- pymoca-0.11.0.dev3/setup.cfg +19 -0
- pymoca-0.11.0.dev3/src/pymoca/__init__.py +3 -0
- pymoca-0.11.0.dev3/src/pymoca/_version.py +683 -0
- {pymoca-0.10.0.dev6 → pymoca-0.11.0.dev3}/src/pymoca/ast.py +202 -134
- pymoca-0.11.0.dev3/src/pymoca/backends/casadi/_options.py +42 -0
- {pymoca-0.10.0.dev6 → pymoca-0.11.0.dev3}/src/pymoca/backends/casadi/alias_relation.py +2 -2
- {pymoca-0.10.0.dev6 → pymoca-0.11.0.dev3}/src/pymoca/backends/casadi/api.py +155 -123
- {pymoca-0.10.0.dev6 → pymoca-0.11.0.dev3}/src/pymoca/backends/casadi/generator.py +260 -174
- {pymoca-0.10.0.dev6 → pymoca-0.11.0.dev3}/src/pymoca/backends/casadi/model.py +443 -206
- {pymoca-0.10.0.dev6 → pymoca-0.11.0.dev3}/src/pymoca/backends/casadi/mtensor.py +8 -1
- {pymoca-0.10.0.dev6 → pymoca-0.11.0.dev3}/src/pymoca/backends/sympy/generator.py +53 -50
- {pymoca-0.10.0.dev6 → pymoca-0.11.0.dev3}/src/pymoca/backends/sympy/runtime.py +35 -27
- {pymoca-0.10.0.dev6 → pymoca-0.11.0.dev3}/src/pymoca/backends/xml/analysis.py +9 -8
- {pymoca-0.10.0.dev6 → pymoca-0.11.0.dev3}/src/pymoca/backends/xml/generator.py +35 -56
- {pymoca-0.10.0.dev6 → pymoca-0.11.0.dev3}/src/pymoca/backends/xml/model.py +52 -41
- {pymoca-0.10.0.dev6 → pymoca-0.11.0.dev3}/src/pymoca/backends/xml/parser.py +126 -135
- {pymoca-0.10.0.dev6 → pymoca-0.11.0.dev3}/src/pymoca/backends/xml/sim_scipy.py +58 -56
- pymoca-0.11.0.dev3/src/pymoca/generated/ModelicaLexer.py +7261 -0
- {pymoca-0.10.0.dev6 → pymoca-0.11.0.dev3}/src/pymoca/generated/ModelicaListener.py +261 -347
- pymoca-0.11.0.dev3/src/pymoca/generated/ModelicaParser.py +15653 -0
- {pymoca-0.10.0.dev6 → pymoca-0.11.0.dev3}/src/pymoca/generated/ModelicaVisitor.py +134 -234
- {pymoca-0.10.0.dev6 → pymoca-0.11.0.dev3}/src/pymoca/parser.py +405 -99
- {pymoca-0.10.0.dev6 → pymoca-0.11.0.dev3}/src/pymoca/tree.py +344 -181
- pymoca-0.11.0.dev3/src/pymoca.egg-info/PKG-INFO +155 -0
- {pymoca-0.10.0.dev6 → pymoca-0.11.0.dev3}/src/pymoca.egg-info/SOURCES.txt +1 -3
- {pymoca-0.10.0.dev6 → pymoca-0.11.0.dev3}/src/pymoca.egg-info/requires.txt +4 -8
- pymoca-0.10.0.dev6/PKG-INFO +0 -46
- pymoca-0.10.0.dev6/README.md +0 -50
- pymoca-0.10.0.dev6/java/antlr-4.7-complete.jar +0 -0
- pymoca-0.10.0.dev6/setup.cfg +0 -45
- pymoca-0.10.0.dev6/setup.py +0 -140
- pymoca-0.10.0.dev6/src/pymoca/__init__.py +0 -4
- pymoca-0.10.0.dev6/src/pymoca/_version.py +0 -21
- pymoca-0.10.0.dev6/src/pymoca/backends/casadi/_options.py +0 -42
- pymoca-0.10.0.dev6/src/pymoca/generated/ModelicaLexer.py +0 -510
- pymoca-0.10.0.dev6/src/pymoca/generated/ModelicaParser.py +0 -7812
- pymoca-0.10.0.dev6/src/pymoca.egg-info/PKG-INFO +0 -46
- pymoca-0.10.0.dev6/versioneer.py +0 -1822
- {pymoca-0.10.0.dev6 → pymoca-0.11.0.dev3}/LICENSE +0 -0
- {pymoca-0.10.0.dev6 → pymoca-0.11.0.dev3}/doc/.gitignore +0 -0
- {pymoca-0.10.0.dev6 → pymoca-0.11.0.dev3}/doc/Makefile +0 -0
- {pymoca-0.10.0.dev6 → pymoca-0.11.0.dev3}/doc/make.bat +0 -0
- {pymoca-0.10.0.dev6 → pymoca-0.11.0.dev3}/doc/source/modules.rst +0 -0
- {pymoca-0.10.0.dev6 → pymoca-0.11.0.dev3}/doc/source/pymoca.generated.rst +0 -0
- {pymoca-0.10.0.dev6 → pymoca-0.11.0.dev3}/doc/source/pymoca.rst +0 -0
- {pymoca-0.10.0.dev6 → pymoca-0.11.0.dev3}/doc/source/setup.rst +0 -0
- {pymoca-0.10.0.dev6 → pymoca-0.11.0.dev3}/src/pymoca/Modelica.g4 +0 -0
- {pymoca-0.10.0.dev6 → pymoca-0.11.0.dev3}/src/pymoca/backends/__init__.py +0 -0
- {pymoca-0.10.0.dev6 → pymoca-0.11.0.dev3}/src/pymoca/backends/casadi/__init__.py +0 -0
- {pymoca-0.10.0.dev6 → pymoca-0.11.0.dev3}/src/pymoca/backends/sympy/__init__.py +0 -0
- {pymoca-0.10.0.dev6 → pymoca-0.11.0.dev3}/src/pymoca/backends/xml/__init__.py +0 -0
- {pymoca-0.10.0.dev6 → pymoca-0.11.0.dev3}/src/pymoca/generated/__init__.py +0 -0
- {pymoca-0.10.0.dev6 → pymoca-0.11.0.dev3}/src/pymoca.egg-info/dependency_links.txt +0 -0
- {pymoca-0.10.0.dev6 → pymoca-0.11.0.dev3}/src/pymoca.egg-info/top_level.txt +0 -0
|
@@ -0,0 +1,155 @@
|
|
|
1
|
+
Metadata-Version: 2.1
|
|
2
|
+
Name: pymoca
|
|
3
|
+
Version: 0.11.0.dev3
|
|
4
|
+
Summary: A python/modelica based simulation environment.
|
|
5
|
+
Author: Pymoca Contributors
|
|
6
|
+
Maintainer-email: Jack Vreeken <jack@vreeken.me>, Kent Rutan <gs1150e@icloud.com>
|
|
7
|
+
License: Copyright (c) 2016-2021, James Goppert and the Pymoca contributors.
|
|
8
|
+
All rights reserved.
|
|
9
|
+
|
|
10
|
+
Redistribution and use in source and binary forms, with or without
|
|
11
|
+
modification, are permitted provided that the following conditions are met:
|
|
12
|
+
|
|
13
|
+
* Redistributions of source code must retain the above copyright notice, this
|
|
14
|
+
list of conditions and the following disclaimer.
|
|
15
|
+
|
|
16
|
+
* Redistributions in binary form must reproduce the above copyright notice,
|
|
17
|
+
this list of conditions and the following disclaimer in the documentation
|
|
18
|
+
and/or other materials provided with the distribution.
|
|
19
|
+
|
|
20
|
+
* Neither the name of pymoca nor the names of its
|
|
21
|
+
contributors may be used to endorse or promote products derived from
|
|
22
|
+
this software without specific prior written permission.
|
|
23
|
+
|
|
24
|
+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
|
25
|
+
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
|
26
|
+
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
|
27
|
+
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
|
|
28
|
+
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
|
29
|
+
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
|
30
|
+
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
|
31
|
+
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
|
32
|
+
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
|
33
|
+
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
Project-URL: homepage, https://github.com/pymoca/pymoca
|
|
37
|
+
Keywords: modelica,simulation,compiler
|
|
38
|
+
Classifier: Development Status :: 3 - Alpha
|
|
39
|
+
Classifier: Intended Audience :: Science/Research
|
|
40
|
+
Classifier: Intended Audience :: Developers
|
|
41
|
+
Classifier: License :: OSI Approved :: BSD License
|
|
42
|
+
Classifier: Programming Language :: Python
|
|
43
|
+
Classifier: Programming Language :: Python :: 3
|
|
44
|
+
Classifier: Programming Language :: Other
|
|
45
|
+
Classifier: Topic :: Software Development
|
|
46
|
+
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
|
|
47
|
+
Classifier: Topic :: Scientific/Engineering :: Mathematics
|
|
48
|
+
Classifier: Topic :: Scientific/Engineering :: Physics
|
|
49
|
+
Classifier: Topic :: Scientific/Engineering :: Visualization
|
|
50
|
+
Classifier: Operating System :: Microsoft :: Windows
|
|
51
|
+
Classifier: Operating System :: POSIX
|
|
52
|
+
Classifier: Operating System :: Unix
|
|
53
|
+
Classifier: Operating System :: MacOS
|
|
54
|
+
Classifier: Topic :: Software Development :: Code Generators
|
|
55
|
+
Classifier: Topic :: Software Development :: Compilers
|
|
56
|
+
Classifier: Topic :: Software Development :: Embedded Systems
|
|
57
|
+
Requires-Python: >=3.9
|
|
58
|
+
Description-Content-Type: text/markdown
|
|
59
|
+
License-File: LICENSE
|
|
60
|
+
Requires-Dist: numpy>=1.8.2
|
|
61
|
+
Requires-Dist: antlr4-python3-runtime==4.13.*
|
|
62
|
+
Provides-Extra: casadi
|
|
63
|
+
Requires-Dist: casadi>=3.4.0; extra == "casadi"
|
|
64
|
+
Requires-Dist: setuptools>=60.0.0; extra == "casadi"
|
|
65
|
+
Provides-Extra: lxml
|
|
66
|
+
Requires-Dist: lxml>=3.5.0; extra == "lxml"
|
|
67
|
+
Requires-Dist: scipy>=0.13.3; extra == "lxml"
|
|
68
|
+
Provides-Extra: sympy
|
|
69
|
+
Requires-Dist: sympy>=0.7.6.1; extra == "sympy"
|
|
70
|
+
Requires-Dist: scipy>=0.13.3; extra == "sympy"
|
|
71
|
+
Requires-Dist: jinja2>=2.10.1; extra == "sympy"
|
|
72
|
+
Provides-Extra: examples
|
|
73
|
+
Requires-Dist: jupyterlab; extra == "examples"
|
|
74
|
+
Requires-Dist: matplotlib; extra == "examples"
|
|
75
|
+
Requires-Dist: control<=0.10.0,>=0.9.3.post2; extra == "examples"
|
|
76
|
+
Provides-Extra: all
|
|
77
|
+
Requires-Dist: pymoca[casadi,examples,lxml,sympy]; extra == "all"
|
|
78
|
+
|
|
79
|
+
# <img alt="Pymoca" src="branding/icons/pymocalogo.svg" height="60">
|
|
80
|
+
|
|
81
|
+
A Modelica to computer algebra system (CAS) translator written in Python.
|
|
82
|
+
|
|
83
|
+
[](https://github.com/pymoca/pymoca/actions?query=workflow%3ACI)
|
|
84
|
+
[](https://codecov.io/gh/pymoca/pymoca)
|
|
85
|
+
[](https://zenodo.org/badge/latestdoi/20664755)
|
|
86
|
+
|
|
87
|
+
## Overview
|
|
88
|
+
Pymoca can be used in applications that need to translate [Modelica](https://modelica.org) mathematical models into other forms. Pymoca can "flatten" a model containing a connected set of components defined by object-oriented Modelica classes into a set of variables and simultaneous equations that are easier to further process for analysis or simulation. It is particularly suited to provide Modelica models in symbolic form to [computer algebra systems](https://en.wikipedia.org/wiki/Computer_algebra_system). A common use in this context is to provide differential and algebraic equations for use in [optimal control problems](https://en.wikipedia.org/wiki/Optimal_control). Pymoca can translate Modelica to [CasADi](https://web.casadi.org), [SymPy](https://www.sympy.org), and [ModelicaXML](https://github.com/modelica-association/ModelicaXML), but most development and usage has been with CasADi.
|
|
89
|
+
|
|
90
|
+
## Install
|
|
91
|
+
|
|
92
|
+
For parser support without backend dependencies:
|
|
93
|
+
```bash
|
|
94
|
+
pip install pymoca
|
|
95
|
+
```
|
|
96
|
+
|
|
97
|
+
Other options are:
|
|
98
|
+
```bash
|
|
99
|
+
pip install "pymoca[casadi]" # CasADi backend dependencies
|
|
100
|
+
pip install "pymoca[sympy]" # SymPy backend dependencies
|
|
101
|
+
pip install "pymoca[lxml]" # ModelicaXML backend dependencies
|
|
102
|
+
|
|
103
|
+
pip install "pymoca[examples]" # To run Jupyter notebook examples in the repo
|
|
104
|
+
|
|
105
|
+
pip install "pymoca[all]" # All of the above
|
|
106
|
+
```
|
|
107
|
+
|
|
108
|
+
## Usage
|
|
109
|
+
|
|
110
|
+
Pymoca reads and understands Modelica code (`pymoca.parser`) and provides access to an internal representation of the code called an Abstract Syntax Tree or AST (`pymoca.ast`). The AST is further processed to generate output in various formats (`pymoca.backends`). The `pymoca.tree` module provides functionality to transform the AST into a form that can be more easily used by the backends to generate the target output. In particular, `pymoca.tree` provides classes and functions to convert a hierarchical, object-oriented Modelica model of connected components into a "flat" system of equations and associated variables, parameters, and constants. Pymoca error checking is not always complete or easy to understand, so it is better to develop the Modelica code with other tools and then use Pymoca for translation.
|
|
111
|
+
|
|
112
|
+
The [test suite](test) contains examples showing how to use Pymoca and the subset of Modelica that it currently supports.
|
|
113
|
+
|
|
114
|
+
Here is an example using a simple spring and damper model from the test suite:
|
|
115
|
+
|
|
116
|
+
```Python
|
|
117
|
+
from pprint import pprint
|
|
118
|
+
|
|
119
|
+
import pymoca.parser
|
|
120
|
+
import pymoca.backends.casadi.generator as casadi_backend
|
|
121
|
+
|
|
122
|
+
|
|
123
|
+
MODELICA_MODEL = """
|
|
124
|
+
model Spring
|
|
125
|
+
Real x, v_x;
|
|
126
|
+
parameter Real c = 0.1;
|
|
127
|
+
parameter Real k = 2;
|
|
128
|
+
equation
|
|
129
|
+
der(x) = v_x;
|
|
130
|
+
der(v_x) = -k*x - c*v_x;
|
|
131
|
+
end Spring;
|
|
132
|
+
"""
|
|
133
|
+
|
|
134
|
+
print("Modelica Model:\n", MODELICA_MODEL)
|
|
135
|
+
|
|
136
|
+
print("\nEquations from the parsed AST in a JSON representation:")
|
|
137
|
+
ast = pymoca.parser.parse(MODELICA_MODEL)
|
|
138
|
+
pprint(ast.to_json(ast.classes["Spring"].equations))
|
|
139
|
+
|
|
140
|
+
print("\nGenerated CasADi model:")
|
|
141
|
+
casadi_model = casadi_backend.generate(ast, "Spring")
|
|
142
|
+
print(casadi_model)
|
|
143
|
+
```
|
|
144
|
+
|
|
145
|
+
Some more interesting examples are in Jupyter notebooks:
|
|
146
|
+
|
|
147
|
+
* [Casadi Example](test/notebooks/Casadi.ipynb)
|
|
148
|
+
* [Sympy Example](test/notebooks/Spring.ipynb)
|
|
149
|
+
|
|
150
|
+
## Roadmap
|
|
151
|
+
|
|
152
|
+
See the [GitHub Projects](https://github.com/orgs/pymoca/projects) for plans. In particular, see the [Info Panel in the Modelica Flattening project](https://github.com/orgs/pymoca/projects/1/views/1?pane=info) for an overview of a project getting some current focus. Breaking API changes are expected.
|
|
153
|
+
|
|
154
|
+
<!--- vim:ts=4:sw=4:expandtab:
|
|
155
|
+
!-->
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
# <img alt="Pymoca" src="branding/icons/pymocalogo.svg" height="60">
|
|
2
|
+
|
|
3
|
+
A Modelica to computer algebra system (CAS) translator written in Python.
|
|
4
|
+
|
|
5
|
+
[](https://github.com/pymoca/pymoca/actions?query=workflow%3ACI)
|
|
6
|
+
[](https://codecov.io/gh/pymoca/pymoca)
|
|
7
|
+
[](https://zenodo.org/badge/latestdoi/20664755)
|
|
8
|
+
|
|
9
|
+
## Overview
|
|
10
|
+
Pymoca can be used in applications that need to translate [Modelica](https://modelica.org) mathematical models into other forms. Pymoca can "flatten" a model containing a connected set of components defined by object-oriented Modelica classes into a set of variables and simultaneous equations that are easier to further process for analysis or simulation. It is particularly suited to provide Modelica models in symbolic form to [computer algebra systems](https://en.wikipedia.org/wiki/Computer_algebra_system). A common use in this context is to provide differential and algebraic equations for use in [optimal control problems](https://en.wikipedia.org/wiki/Optimal_control). Pymoca can translate Modelica to [CasADi](https://web.casadi.org), [SymPy](https://www.sympy.org), and [ModelicaXML](https://github.com/modelica-association/ModelicaXML), but most development and usage has been with CasADi.
|
|
11
|
+
|
|
12
|
+
## Install
|
|
13
|
+
|
|
14
|
+
For parser support without backend dependencies:
|
|
15
|
+
```bash
|
|
16
|
+
pip install pymoca
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
Other options are:
|
|
20
|
+
```bash
|
|
21
|
+
pip install "pymoca[casadi]" # CasADi backend dependencies
|
|
22
|
+
pip install "pymoca[sympy]" # SymPy backend dependencies
|
|
23
|
+
pip install "pymoca[lxml]" # ModelicaXML backend dependencies
|
|
24
|
+
|
|
25
|
+
pip install "pymoca[examples]" # To run Jupyter notebook examples in the repo
|
|
26
|
+
|
|
27
|
+
pip install "pymoca[all]" # All of the above
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
## Usage
|
|
31
|
+
|
|
32
|
+
Pymoca reads and understands Modelica code (`pymoca.parser`) and provides access to an internal representation of the code called an Abstract Syntax Tree or AST (`pymoca.ast`). The AST is further processed to generate output in various formats (`pymoca.backends`). The `pymoca.tree` module provides functionality to transform the AST into a form that can be more easily used by the backends to generate the target output. In particular, `pymoca.tree` provides classes and functions to convert a hierarchical, object-oriented Modelica model of connected components into a "flat" system of equations and associated variables, parameters, and constants. Pymoca error checking is not always complete or easy to understand, so it is better to develop the Modelica code with other tools and then use Pymoca for translation.
|
|
33
|
+
|
|
34
|
+
The [test suite](test) contains examples showing how to use Pymoca and the subset of Modelica that it currently supports.
|
|
35
|
+
|
|
36
|
+
Here is an example using a simple spring and damper model from the test suite:
|
|
37
|
+
|
|
38
|
+
```Python
|
|
39
|
+
from pprint import pprint
|
|
40
|
+
|
|
41
|
+
import pymoca.parser
|
|
42
|
+
import pymoca.backends.casadi.generator as casadi_backend
|
|
43
|
+
|
|
44
|
+
|
|
45
|
+
MODELICA_MODEL = """
|
|
46
|
+
model Spring
|
|
47
|
+
Real x, v_x;
|
|
48
|
+
parameter Real c = 0.1;
|
|
49
|
+
parameter Real k = 2;
|
|
50
|
+
equation
|
|
51
|
+
der(x) = v_x;
|
|
52
|
+
der(v_x) = -k*x - c*v_x;
|
|
53
|
+
end Spring;
|
|
54
|
+
"""
|
|
55
|
+
|
|
56
|
+
print("Modelica Model:\n", MODELICA_MODEL)
|
|
57
|
+
|
|
58
|
+
print("\nEquations from the parsed AST in a JSON representation:")
|
|
59
|
+
ast = pymoca.parser.parse(MODELICA_MODEL)
|
|
60
|
+
pprint(ast.to_json(ast.classes["Spring"].equations))
|
|
61
|
+
|
|
62
|
+
print("\nGenerated CasADi model:")
|
|
63
|
+
casadi_model = casadi_backend.generate(ast, "Spring")
|
|
64
|
+
print(casadi_model)
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
Some more interesting examples are in Jupyter notebooks:
|
|
68
|
+
|
|
69
|
+
* [Casadi Example](test/notebooks/Casadi.ipynb)
|
|
70
|
+
* [Sympy Example](test/notebooks/Spring.ipynb)
|
|
71
|
+
|
|
72
|
+
## Roadmap
|
|
73
|
+
|
|
74
|
+
See the [GitHub Projects](https://github.com/orgs/pymoca/projects) for plans. In particular, see the [Info Panel in the Modelica Flattening project](https://github.com/orgs/pymoca/projects/1/views/1?pane=info) for an overview of a project getting some current focus. Breaking API changes are expected.
|
|
75
|
+
|
|
76
|
+
<!--- vim:ts=4:sw=4:expandtab:
|
|
77
|
+
!-->
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
[build-system]
|
|
2
|
+
requires = ["setuptools", "versioneer[toml]==0.29"]
|
|
3
|
+
build-backend = "setuptools.build_meta"
|
|
4
|
+
|
|
5
|
+
[project]
|
|
6
|
+
name = "pymoca"
|
|
7
|
+
dynamic = ["version"]
|
|
8
|
+
license = { file = "LICENSE" }
|
|
9
|
+
description = "A python/modelica based simulation environment."
|
|
10
|
+
keywords = ["modelica", "simulation", "compiler"]
|
|
11
|
+
readme = "README.md"
|
|
12
|
+
authors = [{ name = "Pymoca Contributors" }]
|
|
13
|
+
maintainers = [
|
|
14
|
+
{ name = "Jack Vreeken", email = "jack@vreeken.me" },
|
|
15
|
+
{ name = "Kent Rutan", email = "gs1150e@icloud.com" },
|
|
16
|
+
]
|
|
17
|
+
requires-python = ">=3.9"
|
|
18
|
+
dependencies = ["numpy >= 1.8.2", "antlr4-python3-runtime == 4.13.*"]
|
|
19
|
+
classifiers = [
|
|
20
|
+
"Development Status :: 3 - Alpha",
|
|
21
|
+
"Intended Audience :: Science/Research",
|
|
22
|
+
"Intended Audience :: Developers",
|
|
23
|
+
"License :: OSI Approved :: BSD License",
|
|
24
|
+
"Programming Language :: Python",
|
|
25
|
+
"Programming Language :: Python :: 3",
|
|
26
|
+
"Programming Language :: Other",
|
|
27
|
+
"Topic :: Software Development",
|
|
28
|
+
"Topic :: Scientific/Engineering :: Artificial Intelligence",
|
|
29
|
+
"Topic :: Scientific/Engineering :: Mathematics",
|
|
30
|
+
"Topic :: Scientific/Engineering :: Physics",
|
|
31
|
+
"Topic :: Scientific/Engineering :: Visualization",
|
|
32
|
+
"Operating System :: Microsoft :: Windows",
|
|
33
|
+
"Operating System :: POSIX",
|
|
34
|
+
"Operating System :: Unix",
|
|
35
|
+
"Operating System :: MacOS",
|
|
36
|
+
"Topic :: Software Development :: Code Generators",
|
|
37
|
+
"Topic :: Software Development :: Compilers",
|
|
38
|
+
"Topic :: Software Development :: Embedded Systems",
|
|
39
|
+
]
|
|
40
|
+
|
|
41
|
+
[project.urls]
|
|
42
|
+
homepage = "https://github.com/pymoca/pymoca"
|
|
43
|
+
|
|
44
|
+
[project.optional-dependencies]
|
|
45
|
+
# Note that we need setuptools for the distutils.ccompiler dependency
|
|
46
|
+
# in the CasADi backend.
|
|
47
|
+
casadi = ["casadi>=3.4.0", "setuptools>=60.0.0"]
|
|
48
|
+
lxml = ["lxml>=3.5.0", "scipy>=0.13.3"]
|
|
49
|
+
sympy = ["sympy>=0.7.6.1", "scipy>=0.13.3", "jinja2>=2.10.1"]
|
|
50
|
+
examples = ["jupyterlab", "matplotlib", "control>=0.9.3.post2,<=0.10.0"]
|
|
51
|
+
all = ["pymoca[casadi,lxml,sympy,examples]"]
|
|
52
|
+
|
|
53
|
+
[tool.setuptools.dynamic]
|
|
54
|
+
version = { attr = "pymoca.__version__" }
|
|
55
|
+
|
|
56
|
+
# See the docstring in versioneer.py for instructions. Note that after changing
|
|
57
|
+
# this section, run `versioneer install --no-vendor`, commit the results.
|
|
58
|
+
|
|
59
|
+
[tool.versioneer]
|
|
60
|
+
VCS = "git"
|
|
61
|
+
style = "pep440"
|
|
62
|
+
versionfile_source = "src/pymoca/_version.py"
|
|
63
|
+
versionfile_build = "pymoca/_version.py"
|
|
64
|
+
tag_prefix = ""
|
|
65
|
+
parentdir_prefix = "pymoca-"
|
|
66
|
+
|
|
67
|
+
[tool.black]
|
|
68
|
+
line-length = 100
|
|
69
|
+
target-version = ['py39', 'py310', 'py311', 'py312', 'py313']
|
|
70
|
+
force-exclude = '''
|
|
71
|
+
(
|
|
72
|
+
src/pymoca/generated
|
|
73
|
+
| src/pymoca/_version.py
|
|
74
|
+
| test/generated
|
|
75
|
+
| test/libraries
|
|
76
|
+
)
|
|
77
|
+
'''
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
[metadata]
|
|
2
|
+
license_file = LICENSE
|
|
3
|
+
|
|
4
|
+
[flake8]
|
|
5
|
+
max-line-length = 100
|
|
6
|
+
exclude =
|
|
7
|
+
src/pymoca/generated,
|
|
8
|
+
src/pymoca/_version.py,
|
|
9
|
+
test/generated,
|
|
10
|
+
test/libraries,
|
|
11
|
+
ignore =
|
|
12
|
+
E203,
|
|
13
|
+
W503,
|
|
14
|
+
E501,
|
|
15
|
+
|
|
16
|
+
[egg_info]
|
|
17
|
+
tag_build =
|
|
18
|
+
tag_date = 0
|
|
19
|
+
|