pymoca 0.10.0.dev3__tar.gz → 0.11.0__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.
Files changed (62) hide show
  1. {pymoca-0.10.0.dev3 → pymoca-0.11.0}/MANIFEST.in +0 -2
  2. pymoca-0.11.0/PKG-INFO +154 -0
  3. pymoca-0.11.0/README.md +76 -0
  4. pymoca-0.11.0/pyproject.toml +77 -0
  5. pymoca-0.11.0/setup.cfg +19 -0
  6. pymoca-0.11.0/src/pymoca/__init__.py +3 -0
  7. pymoca-0.11.0/src/pymoca/_version.py +683 -0
  8. {pymoca-0.10.0.dev3 → pymoca-0.11.0}/src/pymoca/ast.py +202 -134
  9. pymoca-0.11.0/src/pymoca/backends/casadi/_options.py +42 -0
  10. {pymoca-0.10.0.dev3 → pymoca-0.11.0}/src/pymoca/backends/casadi/alias_relation.py +2 -2
  11. {pymoca-0.10.0.dev3 → pymoca-0.11.0}/src/pymoca/backends/casadi/api.py +155 -123
  12. {pymoca-0.10.0.dev3 → pymoca-0.11.0}/src/pymoca/backends/casadi/generator.py +260 -174
  13. {pymoca-0.10.0.dev3 → pymoca-0.11.0}/src/pymoca/backends/casadi/model.py +443 -206
  14. {pymoca-0.10.0.dev3 → pymoca-0.11.0}/src/pymoca/backends/casadi/mtensor.py +8 -1
  15. {pymoca-0.10.0.dev3 → pymoca-0.11.0}/src/pymoca/backends/sympy/generator.py +53 -50
  16. {pymoca-0.10.0.dev3 → pymoca-0.11.0}/src/pymoca/backends/sympy/runtime.py +35 -27
  17. pymoca-0.11.0/src/pymoca/backends/xml/ModelicaXML/schemas/Equation_Statement_separate.xsd +156 -0
  18. pymoca-0.11.0/src/pymoca/backends/xml/ModelicaXML/schemas/Expression.xsd +129 -0
  19. pymoca-0.11.0/src/pymoca/backends/xml/ModelicaXML/schemas/Modelica.xsd +38 -0
  20. pymoca-0.11.0/src/pymoca/backends/xml/ModelicaXML/schemas/Types.xsd +139 -0
  21. {pymoca-0.10.0.dev3 → pymoca-0.11.0}/src/pymoca/backends/xml/analysis.py +9 -8
  22. {pymoca-0.10.0.dev3 → pymoca-0.11.0}/src/pymoca/backends/xml/generator.py +35 -56
  23. {pymoca-0.10.0.dev3 → pymoca-0.11.0}/src/pymoca/backends/xml/model.py +52 -41
  24. {pymoca-0.10.0.dev3 → pymoca-0.11.0}/src/pymoca/backends/xml/parser.py +126 -135
  25. {pymoca-0.10.0.dev3 → pymoca-0.11.0}/src/pymoca/backends/xml/sim_scipy.py +58 -56
  26. pymoca-0.11.0/src/pymoca/generated/ModelicaLexer.py +7261 -0
  27. {pymoca-0.10.0.dev3 → pymoca-0.11.0}/src/pymoca/generated/ModelicaListener.py +261 -347
  28. pymoca-0.11.0/src/pymoca/generated/ModelicaParser.py +15653 -0
  29. {pymoca-0.10.0.dev3 → pymoca-0.11.0}/src/pymoca/generated/ModelicaVisitor.py +134 -234
  30. {pymoca-0.10.0.dev3 → pymoca-0.11.0}/src/pymoca/parser.py +405 -99
  31. {pymoca-0.10.0.dev3 → pymoca-0.11.0}/src/pymoca/tree.py +344 -181
  32. pymoca-0.11.0/src/pymoca.egg-info/PKG-INFO +154 -0
  33. {pymoca-0.10.0.dev3 → pymoca-0.11.0}/src/pymoca.egg-info/SOURCES.txt +5 -3
  34. {pymoca-0.10.0.dev3 → pymoca-0.11.0}/src/pymoca.egg-info/requires.txt +4 -8
  35. pymoca-0.10.0.dev3/PKG-INFO +0 -46
  36. pymoca-0.10.0.dev3/README.md +0 -50
  37. pymoca-0.10.0.dev3/java/antlr-4.7-complete.jar +0 -0
  38. pymoca-0.10.0.dev3/setup.cfg +0 -45
  39. pymoca-0.10.0.dev3/setup.py +0 -140
  40. pymoca-0.10.0.dev3/src/pymoca/__init__.py +0 -4
  41. pymoca-0.10.0.dev3/src/pymoca/_version.py +0 -21
  42. pymoca-0.10.0.dev3/src/pymoca/backends/casadi/_options.py +0 -42
  43. pymoca-0.10.0.dev3/src/pymoca/generated/ModelicaLexer.py +0 -510
  44. pymoca-0.10.0.dev3/src/pymoca/generated/ModelicaParser.py +0 -7812
  45. pymoca-0.10.0.dev3/src/pymoca.egg-info/PKG-INFO +0 -46
  46. pymoca-0.10.0.dev3/versioneer.py +0 -1822
  47. {pymoca-0.10.0.dev3 → pymoca-0.11.0}/LICENSE +0 -0
  48. {pymoca-0.10.0.dev3 → pymoca-0.11.0}/doc/.gitignore +0 -0
  49. {pymoca-0.10.0.dev3 → pymoca-0.11.0}/doc/Makefile +0 -0
  50. {pymoca-0.10.0.dev3 → pymoca-0.11.0}/doc/make.bat +0 -0
  51. {pymoca-0.10.0.dev3 → pymoca-0.11.0}/doc/source/modules.rst +0 -0
  52. {pymoca-0.10.0.dev3 → pymoca-0.11.0}/doc/source/pymoca.generated.rst +0 -0
  53. {pymoca-0.10.0.dev3 → pymoca-0.11.0}/doc/source/pymoca.rst +0 -0
  54. {pymoca-0.10.0.dev3 → pymoca-0.11.0}/doc/source/setup.rst +0 -0
  55. {pymoca-0.10.0.dev3 → pymoca-0.11.0}/src/pymoca/Modelica.g4 +0 -0
  56. {pymoca-0.10.0.dev3 → pymoca-0.11.0}/src/pymoca/backends/__init__.py +0 -0
  57. {pymoca-0.10.0.dev3 → pymoca-0.11.0}/src/pymoca/backends/casadi/__init__.py +0 -0
  58. {pymoca-0.10.0.dev3 → pymoca-0.11.0}/src/pymoca/backends/sympy/__init__.py +0 -0
  59. {pymoca-0.10.0.dev3 → pymoca-0.11.0}/src/pymoca/backends/xml/__init__.py +0 -0
  60. {pymoca-0.10.0.dev3 → pymoca-0.11.0}/src/pymoca/generated/__init__.py +0 -0
  61. {pymoca-0.10.0.dev3 → pymoca-0.11.0}/src/pymoca.egg-info/dependency_links.txt +0 -0
  62. {pymoca-0.10.0.dev3 → pymoca-0.11.0}/src/pymoca.egg-info/top_level.txt +0 -0
@@ -1,8 +1,6 @@
1
1
  include LICENSE
2
2
  include README.md
3
3
  recursive-include doc *
4
- recursive-include java *
5
- include versioneer.py
6
4
  include src/pymoca/_version.py
7
5
  include src/pymoca/Modelica.g4
8
6
  include src/pymoca/backends/xml/ModelicaXML/schemas/*.xsd
pymoca-0.11.0/PKG-INFO ADDED
@@ -0,0 +1,154 @@
1
+ Metadata-Version: 2.1
2
+ Name: pymoca
3
+ Version: 0.11.0
4
+ Summary: A Modelica to computer algebra system (CAS) translator.
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="https://raw.githubusercontent.com/pymoca/pymoca/refs/heads/master/branding/icons/pymocalogo.svg" height="60">
80
+ A Modelica to computer algebra system (CAS) translator written in Python.
81
+
82
+ [![CI](https://github.com/pymoca/pymoca/workflows/CI/badge.svg)](https://github.com/pymoca/pymoca/actions?query=workflow%3ACI)
83
+ [![Coverage](https://codecov.io/gh/pymoca/pymoca/branch/master/graph/badge.svg)](https://codecov.io/gh/pymoca/pymoca)
84
+ [![DOI](https://zenodo.org/badge/20664755.svg)](https://zenodo.org/badge/latestdoi/20664755)
85
+
86
+ ## Overview
87
+ 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.
88
+
89
+ ## Install
90
+
91
+ For parser support without backend dependencies:
92
+ ```bash
93
+ pip install pymoca
94
+ ```
95
+
96
+ Other options are:
97
+ ```bash
98
+ pip install "pymoca[casadi]" # CasADi backend dependencies
99
+ pip install "pymoca[sympy]" # SymPy backend dependencies
100
+ pip install "pymoca[lxml]" # ModelicaXML backend dependencies
101
+
102
+ pip install "pymoca[examples]" # To run Jupyter notebook examples in the repo
103
+
104
+ pip install "pymoca[all]" # All of the above
105
+ ```
106
+
107
+ ## Usage
108
+
109
+ 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.
110
+
111
+ The [test suite](https://github.com/pymoca/pymoca/tree/master/test) contains examples showing how to use Pymoca and the subset of Modelica that it currently supports.
112
+
113
+ Here is an example using a simple spring and damper model from the test suite:
114
+
115
+ ```Python
116
+ from pprint import pprint
117
+
118
+ import pymoca.parser
119
+ import pymoca.backends.casadi.generator as casadi_backend
120
+
121
+
122
+ MODELICA_MODEL = """
123
+ model Spring
124
+ Real x, v_x;
125
+ parameter Real c = 0.1;
126
+ parameter Real k = 2;
127
+ equation
128
+ der(x) = v_x;
129
+ der(v_x) = -k*x - c*v_x;
130
+ end Spring;
131
+ """
132
+
133
+ print("Modelica Model:\n", MODELICA_MODEL)
134
+
135
+ print("\nEquations from the parsed AST in a JSON representation:")
136
+ ast = pymoca.parser.parse(MODELICA_MODEL)
137
+ pprint(ast.to_json(ast.classes["Spring"].equations))
138
+
139
+ print("\nGenerated CasADi model:")
140
+ casadi_model = casadi_backend.generate(ast, "Spring")
141
+ print(casadi_model)
142
+ ```
143
+
144
+ Some more interesting examples are in Jupyter notebooks:
145
+
146
+ * [Casadi Example](https://github.com/pymoca/pymoca/blob/master/test/notebooks/Casadi.ipynb)
147
+ * [Sympy Example](https://github.com/pymoca/pymoca/blob/master/test/notebooks/Spring.ipynb)
148
+
149
+ ## Roadmap
150
+
151
+ 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.
152
+
153
+ <!--- vim:ts=4:sw=4:expandtab:
154
+ !-->
@@ -0,0 +1,76 @@
1
+ # <img alt="Pymoca" src="https://raw.githubusercontent.com/pymoca/pymoca/refs/heads/master/branding/icons/pymocalogo.svg" height="60">
2
+ A Modelica to computer algebra system (CAS) translator written in Python.
3
+
4
+ [![CI](https://github.com/pymoca/pymoca/workflows/CI/badge.svg)](https://github.com/pymoca/pymoca/actions?query=workflow%3ACI)
5
+ [![Coverage](https://codecov.io/gh/pymoca/pymoca/branch/master/graph/badge.svg)](https://codecov.io/gh/pymoca/pymoca)
6
+ [![DOI](https://zenodo.org/badge/20664755.svg)](https://zenodo.org/badge/latestdoi/20664755)
7
+
8
+ ## Overview
9
+ 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.
10
+
11
+ ## Install
12
+
13
+ For parser support without backend dependencies:
14
+ ```bash
15
+ pip install pymoca
16
+ ```
17
+
18
+ Other options are:
19
+ ```bash
20
+ pip install "pymoca[casadi]" # CasADi backend dependencies
21
+ pip install "pymoca[sympy]" # SymPy backend dependencies
22
+ pip install "pymoca[lxml]" # ModelicaXML backend dependencies
23
+
24
+ pip install "pymoca[examples]" # To run Jupyter notebook examples in the repo
25
+
26
+ pip install "pymoca[all]" # All of the above
27
+ ```
28
+
29
+ ## Usage
30
+
31
+ 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.
32
+
33
+ The [test suite](https://github.com/pymoca/pymoca/tree/master/test) contains examples showing how to use Pymoca and the subset of Modelica that it currently supports.
34
+
35
+ Here is an example using a simple spring and damper model from the test suite:
36
+
37
+ ```Python
38
+ from pprint import pprint
39
+
40
+ import pymoca.parser
41
+ import pymoca.backends.casadi.generator as casadi_backend
42
+
43
+
44
+ MODELICA_MODEL = """
45
+ model Spring
46
+ Real x, v_x;
47
+ parameter Real c = 0.1;
48
+ parameter Real k = 2;
49
+ equation
50
+ der(x) = v_x;
51
+ der(v_x) = -k*x - c*v_x;
52
+ end Spring;
53
+ """
54
+
55
+ print("Modelica Model:\n", MODELICA_MODEL)
56
+
57
+ print("\nEquations from the parsed AST in a JSON representation:")
58
+ ast = pymoca.parser.parse(MODELICA_MODEL)
59
+ pprint(ast.to_json(ast.classes["Spring"].equations))
60
+
61
+ print("\nGenerated CasADi model:")
62
+ casadi_model = casadi_backend.generate(ast, "Spring")
63
+ print(casadi_model)
64
+ ```
65
+
66
+ Some more interesting examples are in Jupyter notebooks:
67
+
68
+ * [Casadi Example](https://github.com/pymoca/pymoca/blob/master/test/notebooks/Casadi.ipynb)
69
+ * [Sympy Example](https://github.com/pymoca/pymoca/blob/master/test/notebooks/Spring.ipynb)
70
+
71
+ ## Roadmap
72
+
73
+ 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.
74
+
75
+ <!--- vim:ts=4:sw=4:expandtab:
76
+ !-->
@@ -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 Modelica to computer algebra system (CAS) translator."
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
+
@@ -0,0 +1,3 @@
1
+ from . import _version
2
+
3
+ __version__ = _version.get_versions()["version"]