patme 0.4.8__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 (46) hide show
  1. patme-0.4.8/LICENSE +21 -0
  2. patme-0.4.8/LICENSES/MIT.txt +9 -0
  3. patme-0.4.8/PKG-INFO +171 -0
  4. patme-0.4.8/README.md +139 -0
  5. patme-0.4.8/pyproject.toml +74 -0
  6. patme-0.4.8/src/fa_pyutils.py +61 -0
  7. patme-0.4.8/src/patme/__init__.py +52 -0
  8. patme-0.4.8/src/patme/buildtools/__init__.py +7 -0
  9. patme-0.4.8/src/patme/buildtools/rce_releasecreator.py +336 -0
  10. patme-0.4.8/src/patme/buildtools/release.py +26 -0
  11. patme-0.4.8/src/patme/femtools/__init__.py +5 -0
  12. patme-0.4.8/src/patme/femtools/abqmsgfilechecker.py +137 -0
  13. patme-0.4.8/src/patme/femtools/fecall.py +1093 -0
  14. patme-0.4.8/src/patme/geometry/__init__.py +0 -0
  15. patme-0.4.8/src/patme/geometry/area.py +124 -0
  16. patme-0.4.8/src/patme/geometry/coordinatesystem.py +644 -0
  17. patme-0.4.8/src/patme/geometry/intersect.py +284 -0
  18. patme-0.4.8/src/patme/geometry/line.py +183 -0
  19. patme-0.4.8/src/patme/geometry/misc.py +420 -0
  20. patme-0.4.8/src/patme/geometry/plane.py +464 -0
  21. patme-0.4.8/src/patme/geometry/rotate.py +244 -0
  22. patme-0.4.8/src/patme/geometry/scale.py +152 -0
  23. patme-0.4.8/src/patme/geometry/shape2d.py +50 -0
  24. patme-0.4.8/src/patme/geometry/transformations.py +1831 -0
  25. patme-0.4.8/src/patme/geometry/translate.py +139 -0
  26. patme-0.4.8/src/patme/mechanics/__init__.py +4 -0
  27. patme-0.4.8/src/patme/mechanics/loads.py +435 -0
  28. patme-0.4.8/src/patme/mechanics/material.py +1336 -0
  29. patme-0.4.8/src/patme/service/__init__.py +7 -0
  30. patme-0.4.8/src/patme/service/decorators.py +85 -0
  31. patme-0.4.8/src/patme/service/duration.py +96 -0
  32. patme-0.4.8/src/patme/service/exceptionhook.py +104 -0
  33. patme-0.4.8/src/patme/service/exceptions.py +36 -0
  34. patme-0.4.8/src/patme/service/io/__init__.py +3 -0
  35. patme-0.4.8/src/patme/service/io/basewriter.py +122 -0
  36. patme-0.4.8/src/patme/service/logger.py +385 -0
  37. patme-0.4.8/src/patme/service/mathutils.py +109 -0
  38. patme-0.4.8/src/patme/service/misc.py +71 -0
  39. patme-0.4.8/src/patme/service/moveimports.py +217 -0
  40. patme-0.4.8/src/patme/service/stringutils.py +419 -0
  41. patme-0.4.8/src/patme/service/systemutils.py +290 -0
  42. patme-0.4.8/src/patme/sshtools/__init__.py +3 -0
  43. patme-0.4.8/src/patme/sshtools/cara.py +443 -0
  44. patme-0.4.8/src/patme/sshtools/clustercaller.py +435 -0
  45. patme-0.4.8/src/patme/sshtools/facluster.py +350 -0
  46. patme-0.4.8/src/patme/sshtools/sshcall.py +180 -0
patme-0.4.8/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2025 Freund, Sebastian
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,9 @@
1
+ MIT License
2
+
3
+ Copyright (c) <year> <copyright holders>
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
6
+
7
+ The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
8
+
9
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
patme-0.4.8/PKG-INFO ADDED
@@ -0,0 +1,171 @@
1
+ Metadata-Version: 2.4
2
+ Name: patme
3
+ Version: 0.4.8
4
+ Summary: Utilities for software builds, documentation, cluster interaction, calling fem tools, logging, exceptions and simple geometric and mechanical operations.
5
+ License: DLR 2025
6
+ License-File: LICENSE
7
+ License-File: LICENSES/MIT.txt
8
+ Keywords: fem,logger,exception,geometry,mechanics,material,cluster
9
+ Author: Sebastian Freund
10
+ Author-email: sebastian.freund@dlr.de
11
+ Maintainer: Garbade, Marc
12
+ Maintainer-email: <marc.garbade@dlr.de>
13
+ Requires-Python: >=3.10,<4.0
14
+ Classifier: License :: Other/Proprietary License
15
+ Classifier: Programming Language :: Python :: 3
16
+ Classifier: Programming Language :: Python :: 3.10
17
+ Classifier: Programming Language :: Python :: 3.11
18
+ Classifier: Programming Language :: Python :: 3.12
19
+ Classifier: Programming Language :: Python :: 3.13
20
+ Classifier: Programming Language :: Python :: 3.14
21
+ Requires-Dist: importlib_metadata
22
+ Requires-Dist: numpy (<2)
23
+ Requires-Dist: scipy
24
+ Requires-Dist: sshconf
25
+ Requires-Dist: tomlkit
26
+ Project-URL: Changelog, https://gitlab.dlr.de/sy-stm/software/patme/-/blob/master/changelog.md
27
+ Project-URL: Documentation, https://sy-stm.pages.gitlab.dlr.de/software/patme/
28
+ Project-URL: Homepage, https://gitlab.dlr.de/fa_sw/patme
29
+ Project-URL: Repository, https://gitlab.dlr.de/fa_sw/patme
30
+ Description-Content-Type: text/markdown
31
+
32
+ <!--
33
+ SPDX-FileCopyrightText: 2022 German Aerospace Center (DLR)
34
+
35
+ SPDX-License-Identifier: MIT
36
+ -->
37
+
38
+ # patme
39
+
40
+ Utilities for basic software engineering, geometry, mechanics support and infrastructure handling.
41
+
42
+ [![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.15591827.svg)](https://doi.org/10.5281/zenodo.15591827)
43
+ [![pipeline status](https://gitlab.dlr.de/sy-stm/software/patme/badges/master/pipeline.svg)](https://gitlab.dlr.de/sy-stm/software/patme/-/commits/master)
44
+ [![coverage report](https://gitlab.dlr.de/sy-stm/software/patme/badges/master/coverage.svg)](https://ggitlab.dlr.de/sy-stm/software/patme/-/commits/master)
45
+ [![Latest Release](https://gitlab.dlr.de/sy-stm/software/patme/-/badges/release.svg)](https://gitlab.dlr.de/sy-stm/software/patme/-/releases)
46
+
47
+ ## Features
48
+ The full documentation can be found [here](https://sy-stm.pages.gitlab.dlr.de/software/patme/).
49
+
50
+ ### Software Engineering Features
51
+ - software builds
52
+ - release automation
53
+ - build documentation (sphinx)
54
+ - logging
55
+
56
+ Planned items:
57
+ - exception hooks
58
+ - (potentially) decorators
59
+ - Create RCE components and push them on an RCE server
60
+
61
+ ### Common useful features
62
+ Planned items:
63
+ - Call FEM software
64
+ - Plot samples (Matplotlib, Latex-Pgfplots)
65
+
66
+ ### DLR-SY specific features
67
+ Planned items:
68
+ - SSH interface
69
+ - SSH based cluster interaction
70
+ - Run several jobs (FEM, python, matlab etc.) as samples with various parallelization options
71
+ - parallel local
72
+ - parallel remote
73
+ - asynchronous sampling (e.g. dependend on license availability)
74
+
75
+
76
+ software builds, documentation, cluster interaction, calling fem tools, logging, exceptions.
77
+
78
+
79
+
80
+ ## Installation
81
+
82
+ At least you require Python 3.
83
+
84
+ ### Installation from source
85
+ Get patme source from
86
+
87
+ > https://gitlab.dlr.de/sy-stm/software/patme.git
88
+
89
+ and add the /src folder to pythonpath in the environment variables
90
+
91
+ ### Installation as python package
92
+ Install it from [the gitlab packacke registry](https://gitlab.dlr.de/sy-stm/software/patme/-/packages)
93
+
94
+ You can download the latest artifact (*.whl) and install it using
95
+
96
+
97
+ > cd patme
98
+ > python setup.py install patme<version>.whl
99
+
100
+
101
+ ### Test the installation
102
+ In python execute:
103
+
104
+ > import patme
105
+
106
+ ### Developers
107
+
108
+ Developers may also install the pre-commit hook.
109
+
110
+ **Precommit**
111
+ 1. install the pre-commit
112
+ > pip install pre-commit
113
+ 2. In the patme folder
114
+ > pre-commit install
115
+
116
+ This enables the pre-commit hooks defined in _.pre-commit-config.yaml_
117
+ and eases your commits and successful pipline runs.
118
+
119
+
120
+ ## CI Pipeline and Jobs for Developers
121
+
122
+ If you encounter any failed job on the pipeline you can run them locally for more information.
123
+ (prerequisite: have _make_ and _poetry_ installed [e.g. conda install make poetry])
124
+
125
+ See all availabe make targets used for the ci-jobs
126
+
127
+ > make list
128
+
129
+ Find the target with matching names and execute them locally e.g.:
130
+ > make test
131
+
132
+ If **check-formatting** fails, run the following to fix issues.
133
+ > make formatting
134
+
135
+ If **check-license-metadata** fails, run
136
+ > make check-license-metadata
137
+
138
+ identify the corresponding filename and run the following (include the filename in $filename)
139
+ > poetry run reuse addheader --copyright="German Aerospace Center (DLR)" --license="MIT" $filename
140
+
141
+ ## Contributing to _patme_
142
+
143
+ We welcome your contribution!
144
+
145
+ If you want to provide a code change, please:
146
+
147
+ * Create a fork of the GitLab project.
148
+ * Develop the feature/patch
149
+ * Provide a merge request.
150
+
151
+ > If it is the first time that you contribute, please add yourself to the list
152
+ > of contributors below.
153
+
154
+
155
+ ## Citing
156
+
157
+ No citing required
158
+
159
+ ## License
160
+
161
+ MIT
162
+
163
+ ## Change Log
164
+
165
+ see [changelog](changelog.md)
166
+
167
+ ## Authors
168
+
169
+ [Sebastian Freund](mailto:sebastian.freund@dlr.de)
170
+ [Andreas Schuster](mailto:andreas.schuster@dlr.de)
171
+
patme-0.4.8/README.md ADDED
@@ -0,0 +1,139 @@
1
+ <!--
2
+ SPDX-FileCopyrightText: 2022 German Aerospace Center (DLR)
3
+
4
+ SPDX-License-Identifier: MIT
5
+ -->
6
+
7
+ # patme
8
+
9
+ Utilities for basic software engineering, geometry, mechanics support and infrastructure handling.
10
+
11
+ [![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.15591827.svg)](https://doi.org/10.5281/zenodo.15591827)
12
+ [![pipeline status](https://gitlab.dlr.de/sy-stm/software/patme/badges/master/pipeline.svg)](https://gitlab.dlr.de/sy-stm/software/patme/-/commits/master)
13
+ [![coverage report](https://gitlab.dlr.de/sy-stm/software/patme/badges/master/coverage.svg)](https://ggitlab.dlr.de/sy-stm/software/patme/-/commits/master)
14
+ [![Latest Release](https://gitlab.dlr.de/sy-stm/software/patme/-/badges/release.svg)](https://gitlab.dlr.de/sy-stm/software/patme/-/releases)
15
+
16
+ ## Features
17
+ The full documentation can be found [here](https://sy-stm.pages.gitlab.dlr.de/software/patme/).
18
+
19
+ ### Software Engineering Features
20
+ - software builds
21
+ - release automation
22
+ - build documentation (sphinx)
23
+ - logging
24
+
25
+ Planned items:
26
+ - exception hooks
27
+ - (potentially) decorators
28
+ - Create RCE components and push them on an RCE server
29
+
30
+ ### Common useful features
31
+ Planned items:
32
+ - Call FEM software
33
+ - Plot samples (Matplotlib, Latex-Pgfplots)
34
+
35
+ ### DLR-SY specific features
36
+ Planned items:
37
+ - SSH interface
38
+ - SSH based cluster interaction
39
+ - Run several jobs (FEM, python, matlab etc.) as samples with various parallelization options
40
+ - parallel local
41
+ - parallel remote
42
+ - asynchronous sampling (e.g. dependend on license availability)
43
+
44
+
45
+ software builds, documentation, cluster interaction, calling fem tools, logging, exceptions.
46
+
47
+
48
+
49
+ ## Installation
50
+
51
+ At least you require Python 3.
52
+
53
+ ### Installation from source
54
+ Get patme source from
55
+
56
+ > https://gitlab.dlr.de/sy-stm/software/patme.git
57
+
58
+ and add the /src folder to pythonpath in the environment variables
59
+
60
+ ### Installation as python package
61
+ Install it from [the gitlab packacke registry](https://gitlab.dlr.de/sy-stm/software/patme/-/packages)
62
+
63
+ You can download the latest artifact (*.whl) and install it using
64
+
65
+
66
+ > cd patme
67
+ > python setup.py install patme<version>.whl
68
+
69
+
70
+ ### Test the installation
71
+ In python execute:
72
+
73
+ > import patme
74
+
75
+ ### Developers
76
+
77
+ Developers may also install the pre-commit hook.
78
+
79
+ **Precommit**
80
+ 1. install the pre-commit
81
+ > pip install pre-commit
82
+ 2. In the patme folder
83
+ > pre-commit install
84
+
85
+ This enables the pre-commit hooks defined in _.pre-commit-config.yaml_
86
+ and eases your commits and successful pipline runs.
87
+
88
+
89
+ ## CI Pipeline and Jobs for Developers
90
+
91
+ If you encounter any failed job on the pipeline you can run them locally for more information.
92
+ (prerequisite: have _make_ and _poetry_ installed [e.g. conda install make poetry])
93
+
94
+ See all availabe make targets used for the ci-jobs
95
+
96
+ > make list
97
+
98
+ Find the target with matching names and execute them locally e.g.:
99
+ > make test
100
+
101
+ If **check-formatting** fails, run the following to fix issues.
102
+ > make formatting
103
+
104
+ If **check-license-metadata** fails, run
105
+ > make check-license-metadata
106
+
107
+ identify the corresponding filename and run the following (include the filename in $filename)
108
+ > poetry run reuse addheader --copyright="German Aerospace Center (DLR)" --license="MIT" $filename
109
+
110
+ ## Contributing to _patme_
111
+
112
+ We welcome your contribution!
113
+
114
+ If you want to provide a code change, please:
115
+
116
+ * Create a fork of the GitLab project.
117
+ * Develop the feature/patch
118
+ * Provide a merge request.
119
+
120
+ > If it is the first time that you contribute, please add yourself to the list
121
+ > of contributors below.
122
+
123
+
124
+ ## Citing
125
+
126
+ No citing required
127
+
128
+ ## License
129
+
130
+ MIT
131
+
132
+ ## Change Log
133
+
134
+ see [changelog](changelog.md)
135
+
136
+ ## Authors
137
+
138
+ [Sebastian Freund](mailto:sebastian.freund@dlr.de)
139
+ [Andreas Schuster](mailto:andreas.schuster@dlr.de)
@@ -0,0 +1,74 @@
1
+ # SPDX-FileCopyrightText: 2022 German Aerospace Center (DLR)
2
+ #
3
+ # SPDX-License-Identifier: MIT
4
+
5
+ [project]
6
+ name = "patme"
7
+ version = "0.4.8"
8
+ description = "Utilities for software builds, documentation, cluster interaction, calling fem tools, logging, exceptions and simple geometric and mechanical operations."
9
+ license = "DLR 2025"
10
+ authors = [
11
+ { name = "Sebastian Freund", email = "sebastian.freund@dlr.de" },
12
+ { name = "Andreas Schuster", email = "andreas.schuster@dlr.de" },
13
+ ]
14
+ maintainers = [
15
+ {name = "Garbade, Marc", email = "<marc.garbade@dlr.de>"}]
16
+ readme = "README.md"
17
+ keywords = ["fem", "logger", "exception", "geometry", "mechanics", "material", "cluster"]
18
+ requires-python = ">=3.10,<4.0"
19
+ dependencies = [
20
+ "numpy<2",
21
+ "scipy",
22
+ "importlib_metadata",
23
+ "tomlkit",
24
+ "sshconf"
25
+ ]
26
+
27
+ [project.urls]
28
+ Homepage = "https://gitlab.dlr.de/fa_sw/patme"
29
+ Changelog = "https://gitlab.dlr.de/sy-stm/software/patme/-/blob/master/changelog.md"
30
+ Repository = "https://gitlab.dlr.de/fa_sw/patme"
31
+ Documentation = "https://sy-stm.pages.gitlab.dlr.de/software/patme/"
32
+
33
+ [tool.poetry]
34
+ include = [{ path = "src"}]
35
+
36
+ [tool.poetry.scripts]
37
+ run-fe = "patme.femtools.fecall:run_fe_cli"
38
+ #sample-calculator = "sample_calculator.main:cmd_main"
39
+
40
+ [tool.poetry.group.opt.dependencies]
41
+ sshconf = [{version = "*", python = "^3.7", optional=true}]
42
+
43
+ [tool.poetry.group.dev.dependencies]
44
+ flake8 = "*"
45
+ black = "*"
46
+ isort = "*"
47
+ reuse = "*"
48
+ Sphinx = "*"
49
+ sphinx_rtd_theme = "*"
50
+ sphinxcontrib-bibtex = "*"
51
+ setuptools ="*" # due to problems with pybtex which sphinxcontrib-bibtex depends on. Check "make docs" on gitlab runner before removing it
52
+ pre-commit = "*"
53
+
54
+ [tool.poetry.group.test.dependencies]
55
+ pytest = "*"
56
+ pytest-cov = "*"
57
+
58
+ [tool.coverage.run]
59
+ branch = true
60
+
61
+ [tool.coverage.html]
62
+ directory = "build/htmlcov"
63
+
64
+ [tool.black]
65
+ line-length = 120
66
+ exclude = "docs"
67
+
68
+ [tool.isort]
69
+ line_length = 120
70
+ skip = "docs"
71
+ profile = 'black'
72
+
73
+ [tool.pytest.ini_options]
74
+ addopts = "--import-mode=importlib"
@@ -0,0 +1,61 @@
1
+ # Copyright (C) 2020 Deutsches Zentrum fuer Luft- und Raumfahrt(DLR, German Aerospace Center) <www.dlr.de>
2
+ # SPDX-FileCopyrightText: 2022 German Aerospace Center (DLR)
3
+ #
4
+ # SPDX-License-Identifier: MIT
5
+
6
+ # %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
7
+ # patme #
8
+ # %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
9
+ """
10
+ Top-level compatibility interface for former fa-pyutils as a standalone python package.
11
+
12
+ @note: patme
13
+ Created on 19.11.2024
14
+
15
+ @version: 1.0
16
+ ----------------------------------------------------------------------------------------------
17
+ @requires:
18
+ -
19
+
20
+ @change:
21
+ -
22
+
23
+ @author: garb_ma [DLR-SY,STM Braunschweig]
24
+ ----------------------------------------------------------------------------------------------
25
+ """
26
+
27
+ ## @package patme
28
+ # Top-level compatibility interface for patme defining a new alias as a python package.
29
+ ## @authors
30
+ # Marc Garbade
31
+ ## @date
32
+ # 19.11.2024
33
+
34
+ import os
35
+ import pkgutil
36
+ import sys
37
+
38
+ # List of all attributes and modules available during wild import
39
+ __all__ = []
40
+
41
+ # Create a valid package name
42
+ __package__ = os.path.splitext(os.path.basename(__file__))[0]
43
+
44
+ # Import deprecated module. Create an alias.
45
+ import patme
46
+
47
+ sys.modules[__package__] = patme
48
+
49
+ # Create a valid path identifier
50
+ __path__ = [__file__]
51
+
52
+ ## Iterate through all modules at runtime
53
+ # Source: https://stackoverflow.com/questions/3365740/how-to-import-all-submodules
54
+ for loader, module_name, is_pkg in pkgutil.walk_packages(patme.__path__):
55
+ __all__.append(module_name)
56
+ _module = loader.find_module(module_name).load_module(module_name)
57
+ globals()[module_name] = _module
58
+
59
+ if __name__ == "__main__":
60
+ sys.exit()
61
+ pass
@@ -0,0 +1,52 @@
1
+ # Copyright (C) 2020 Deutsches Zentrum fuer Luft- und Raumfahrt(DLR, German Aerospace Center) <www.dlr.de>
2
+ # SPDX-FileCopyrightText: 2022 German Aerospace Center (DLR)
3
+ #
4
+ # SPDX-License-Identifier: MIT
5
+
6
+ """
7
+ Utilities for software builds, documentation, cluster interaction, calling fem tools, logging, exceptions and simple geometric and mechanical operations.
8
+
9
+ """
10
+ from importlib import metadata
11
+ from pathlib import Path
12
+
13
+ import tomlkit
14
+
15
+ name = Path(__file__).parent.name
16
+
17
+
18
+ def getPyprojectMeta(initPath):
19
+ """Returns project data from pyproject.toml
20
+
21
+ :param initPath: path to the packages main __init__.py file
22
+ :return: dict with entries from tool.poetry in pyproject.toml
23
+ """
24
+ with open(Path(Path(initPath).parents[2], "pyproject.toml")) as pyproject:
25
+ file_contents = pyproject.read()
26
+
27
+ contents_dict = tomlkit.parse(file_contents)
28
+ try:
29
+ return contents_dict["project"]
30
+ except:
31
+ return contents_dict["tool"]["poetry"]
32
+
33
+
34
+ try:
35
+ # package is installed
36
+ version = metadata.version(name)
37
+ programDir = str(Path(__file__).parent)
38
+ except metadata.PackageNotFoundError:
39
+ # package is not installed, read pyproject.toml
40
+ try:
41
+ # We have the full GitLab repository
42
+ pkgMeta = getPyprojectMeta(__file__)
43
+ version = str(pkgMeta["version"])
44
+ programDir = str(Path(__file__).parents[3])
45
+ except FileNotFoundError:
46
+ # We have only the source code
47
+ version = str("version not provided")
48
+ programDir = str(Path(__file__).parent)
49
+
50
+
51
+ # Variables
52
+ epsilon = 1e-8
@@ -0,0 +1,7 @@
1
+ # SPDX-FileCopyrightText: 2022 German Aerospace Center (DLR)
2
+ #
3
+ # SPDX-License-Identifier: MIT
4
+
5
+ """
6
+ The modules of this package support the build and deployment of python packages.
7
+ """