[project] updating project structure

This commit is contained in:
wendtalexander
2024-09-27 14:21:13 +02:00
parent 8ef8ac7506
commit 5c3c2c407a
4 changed files with 133 additions and 79 deletions

View File

@@ -1,9 +1,10 @@
import tomlkit
import pathlib
def load_project_settings(project_root):
# Read the pyproject.toml file
with open(pathlib.Path.joinpath(project_root, 'pyproject.toml'), 'r') as f:
with open(pathlib.Path.joinpath(project_root, "pyproject.toml"), "r") as f:
pyproject_content = f.read()
# Parse the toml content
@@ -11,16 +12,16 @@ def load_project_settings(project_root):
# Access project settings
return {
'name': pyproject['tool']['poetry']['name'],
'version': pyproject['tool']['poetry']['version'],
'description': pyproject['tool']['poetry']['description'],
'authors': pyproject['tool']['poetry']['authors'],
'readme': pyproject['tool']['poetry']['authors'],
'licence': pyproject['tool']['poetry']['license'],
'organization': pyproject['tool']['poetry']['organization'],
'classifiers': pyproject['tool']['poetry']['classifiers'],
'copyright': pyproject['tool']['poetry']['copyright'],
"repository": pyproject['tool']['poetry']['repository'],
"name": pyproject["tool"]["poetry"]["name"],
"version": pyproject["tool"]["poetry"]["version"],
"description": pyproject["tool"]["poetry"]["description"],
"authors": pyproject["tool"]["poetry"]["authors"],
"readme": pyproject["tool"]["poetry"]["authors"],
"licence": pyproject["tool"]["poetry"]["license"],
"organization": pyproject["project"]["organization"],
"classifiers": pyproject["tool"]["poetry"]["classifiers"],
"copyright": pyproject["project"]["copyright"],
"repository": pyproject["tool"]["poetry"]["repository"],
}