stouputils 1.0.23__tar.gz → 1.0.25__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.
- {stouputils-1.0.23 → stouputils-1.0.25}/PKG-INFO +1 -1
- stouputils-1.0.25/assets/continuous_delivery/pypi_module.gif +0 -0
- stouputils-1.0.25/assets/continuous_delivery/pyproject_module.gif +0 -0
- stouputils-1.0.25/copy_in_local.py +22 -0
- stouputils-1.0.25/full_routine.py +18 -0
- {stouputils-1.0.23 → stouputils-1.0.25}/pyproject.toml +15 -4
- stouputils-1.0.25/scripts/github_release.py +28 -0
- stouputils-1.0.23/build_all_in_one.py → stouputils-1.0.25/scripts/pypi_full_routine.py +1 -1
- stouputils-1.0.25/scripts/upgrade.py +11 -0
- stouputils-1.0.25/src/stouputils/continuous_delivery/pyproject.py +121 -0
- stouputils-1.0.23/all_in_one.py +0 -13
- stouputils-1.0.23/copy_in_local.py +0 -12
- stouputils-1.0.23/github_release.py +0 -26
- stouputils-1.0.23/src/stouputils/continuous_delivery/pyproject.py +0 -69
- stouputils-1.0.23/upgrade.py +0 -16
- {stouputils-1.0.23 → stouputils-1.0.25}/.github/workflows/documentation.yml +0 -0
- {stouputils-1.0.23 → stouputils-1.0.25}/.gitignore +0 -0
- {stouputils-1.0.23 → stouputils-1.0.25}/.python-version +0 -0
- {stouputils-1.0.23 → stouputils-1.0.25}/LICENSE +0 -0
- {stouputils-1.0.23 → stouputils-1.0.25}/README.md +0 -0
- {stouputils-1.0.23 → stouputils-1.0.25}/assets/all_doctests_module.gif +0 -0
- {stouputils-1.0.23 → stouputils-1.0.25}/assets/archive_module.gif +0 -0
- {stouputils-1.0.23 → stouputils-1.0.25}/assets/backup_module.gif +0 -0
- {stouputils-1.0.23 → stouputils-1.0.25}/assets/collections_module.gif +0 -0
- {stouputils-1.0.23 → stouputils-1.0.25}/assets/continuous_delivery/github_module.gif +0 -0
- {stouputils-1.0.23 → stouputils-1.0.25}/assets/ctx_module.gif +0 -0
- {stouputils-1.0.23 → stouputils-1.0.25}/assets/decorators_module_1.gif +0 -0
- {stouputils-1.0.23 → stouputils-1.0.25}/assets/decorators_module_2.gif +0 -0
- {stouputils-1.0.23 → stouputils-1.0.25}/assets/io_module.gif +0 -0
- {stouputils-1.0.23 → stouputils-1.0.25}/assets/parallel_module.gif +0 -0
- {stouputils-1.0.23 → stouputils-1.0.25}/assets/print_module.gif +0 -0
- {stouputils-1.0.23 → stouputils-1.0.25}/examples/all_doctests.py +0 -0
- {stouputils-1.0.23 → stouputils-1.0.25}/examples/archive/corrupted.zip +0 -0
- {stouputils-1.0.23 → stouputils-1.0.25}/examples/archive.py +0 -0
- {stouputils-1.0.23 → stouputils-1.0.25}/examples/collections.py +0 -0
- {stouputils-1.0.23 → stouputils-1.0.25}/examples/ctx.py +0 -0
- {stouputils-1.0.23 → stouputils-1.0.25}/examples/decorators_1.py +0 -0
- {stouputils-1.0.23 → stouputils-1.0.25}/examples/decorators_2.py +0 -0
- {stouputils-1.0.23 → stouputils-1.0.25}/examples/delta_backup.py +0 -0
- {stouputils-1.0.23 → stouputils-1.0.25}/examples/io.py +0 -0
- {stouputils-1.0.23 → stouputils-1.0.25}/examples/parallel.py +0 -0
- {stouputils-1.0.23 → stouputils-1.0.25}/examples/print.py +0 -0
- {stouputils-1.0.23 → stouputils-1.0.25}/scripts/create_docs.py +0 -0
- {stouputils-1.0.23 → stouputils-1.0.25}/src/stouputils/__init__.py +0 -0
- {stouputils-1.0.23 → stouputils-1.0.25}/src/stouputils/all_doctests.py +0 -0
- {stouputils-1.0.23 → stouputils-1.0.25}/src/stouputils/archive.py +0 -0
- {stouputils-1.0.23 → stouputils-1.0.25}/src/stouputils/backup.py +0 -0
- {stouputils-1.0.23 → stouputils-1.0.25}/src/stouputils/collections.py +0 -0
- {stouputils-1.0.23 → stouputils-1.0.25}/src/stouputils/continuous_delivery/__init__.py +0 -0
- {stouputils-1.0.23 → stouputils-1.0.25}/src/stouputils/continuous_delivery/cd_utils.py +0 -0
- {stouputils-1.0.23 → stouputils-1.0.25}/src/stouputils/continuous_delivery/github.py +0 -0
- {stouputils-1.0.23 → stouputils-1.0.25}/src/stouputils/continuous_delivery/pypi.py +0 -0
- {stouputils-1.0.23 → stouputils-1.0.25}/src/stouputils/ctx.py +0 -0
- {stouputils-1.0.23 → stouputils-1.0.25}/src/stouputils/decorators.py +0 -0
- {stouputils-1.0.23 → stouputils-1.0.25}/src/stouputils/dont_look/zip_file_override.py +0 -0
- {stouputils-1.0.23 → stouputils-1.0.25}/src/stouputils/io.py +0 -0
- {stouputils-1.0.23 → stouputils-1.0.25}/src/stouputils/parallel.py +0 -0
- {stouputils-1.0.23 → stouputils-1.0.25}/src/stouputils/print.py +0 -0
- {stouputils-1.0.23 → stouputils-1.0.25}/src/stouputils/py.typed +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: stouputils
|
|
3
|
-
Version: 1.0.
|
|
3
|
+
Version: 1.0.25
|
|
4
4
|
Summary: Stouputils is a collection of utility modules designed to simplify and enhance the development process. It includes a range of tools for tasks such as execution of doctests, display utilities, decorators, as well as context managers, and many more.
|
|
5
5
|
Project-URL: Homepage, https://github.com/Stoupy51/stouputils
|
|
6
6
|
Project-URL: Issues, https://github.com/Stoupy51/stouputils/issues
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
|
|
2
|
+
# Imports
|
|
3
|
+
import stouputils as stp
|
|
4
|
+
import shutil
|
|
5
|
+
|
|
6
|
+
# Constants
|
|
7
|
+
ROOT: str = stp.get_root_path(__file__)
|
|
8
|
+
SOURCE: str = f"{ROOT}/src/stouputils"
|
|
9
|
+
DESTINATION: str = "C:/Users/Alexandre-PC/AppData/Local/Programs/Python/Python310/Lib/site-packages/stouputils"
|
|
10
|
+
|
|
11
|
+
# Main
|
|
12
|
+
if __name__ == "__main__":
|
|
13
|
+
|
|
14
|
+
# Remove destination
|
|
15
|
+
shutil.rmtree(DESTINATION, ignore_errors=True)
|
|
16
|
+
|
|
17
|
+
# Copy source
|
|
18
|
+
shutil.copytree(SOURCE, DESTINATION)
|
|
19
|
+
|
|
20
|
+
# Info
|
|
21
|
+
stp.info("Copied stouputils to local Python's site-packages")
|
|
22
|
+
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
|
|
2
|
+
# Imports
|
|
3
|
+
import os
|
|
4
|
+
import sys
|
|
5
|
+
import stouputils as stp
|
|
6
|
+
|
|
7
|
+
# Constants
|
|
8
|
+
ROOT: str = stp.get_root_path(__file__)
|
|
9
|
+
|
|
10
|
+
# Main
|
|
11
|
+
if __name__ == "__main__":
|
|
12
|
+
|
|
13
|
+
# Increment version in pyproject.toml
|
|
14
|
+
stp.increment_version_from_pyproject(f"{ROOT}/pyproject.toml")
|
|
15
|
+
|
|
16
|
+
# PyPI full routine
|
|
17
|
+
os.system(f"{sys.executable} {ROOT}/scripts/pypi_full_routine.py")
|
|
18
|
+
|
|
@@ -1,15 +1,25 @@
|
|
|
1
|
+
|
|
1
2
|
[build-system]
|
|
2
|
-
requires = [
|
|
3
|
+
requires = ["hatchling"]
|
|
3
4
|
build-backend = "hatchling.build"
|
|
4
5
|
|
|
5
6
|
[project]
|
|
6
7
|
name = "stouputils"
|
|
7
|
-
version = "1.0.
|
|
8
|
+
version = "1.0.25"
|
|
8
9
|
description = "Stouputils is a collection of utility modules designed to simplify and enhance the development process. It includes a range of tools for tasks such as execution of doctests, display utilities, decorators, as well as context managers, and many more."
|
|
9
10
|
readme = "README.md"
|
|
10
11
|
requires-python = ">=3.10"
|
|
11
|
-
classifiers = [
|
|
12
|
-
|
|
12
|
+
classifiers = [
|
|
13
|
+
"Programming Language :: Python :: 3",
|
|
14
|
+
"License :: OSI Approved :: MIT License",
|
|
15
|
+
"Operating System :: OS Independent",
|
|
16
|
+
]
|
|
17
|
+
dependencies = [
|
|
18
|
+
"tqdm>=4.66.4",
|
|
19
|
+
"requests>=2.31.0",
|
|
20
|
+
"pyyaml",
|
|
21
|
+
"toml",
|
|
22
|
+
]
|
|
13
23
|
[[project.authors]]
|
|
14
24
|
name = "Stoupy51"
|
|
15
25
|
email = "stoupy51@gmail.com"
|
|
@@ -20,3 +30,4 @@ Issues = "https://github.com/Stoupy51/stouputils/issues"
|
|
|
20
30
|
|
|
21
31
|
[tool.pyright]
|
|
22
32
|
typeCheckingMode = "strict"
|
|
33
|
+
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
|
|
2
|
+
# Imports
|
|
3
|
+
import stouputils as stp
|
|
4
|
+
from typing import Any
|
|
5
|
+
|
|
6
|
+
# Constants
|
|
7
|
+
ROOT: str = stp.get_root_path(__file__, go_up=1)
|
|
8
|
+
CURRENT_VERSION: str = stp.get_version_from_pyproject(f"{ROOT}/pyproject.toml")
|
|
9
|
+
CREDENTIALS_PATH: str = "~/stouputils/credentials.yml"
|
|
10
|
+
GITHUB_CONFIG: dict[str, Any] = {
|
|
11
|
+
"project_name": "stouputils",
|
|
12
|
+
"version": CURRENT_VERSION,
|
|
13
|
+
"build_folder": f"{ROOT}/dist",
|
|
14
|
+
"endswith": [
|
|
15
|
+
f"{CURRENT_VERSION}.tar.gz",
|
|
16
|
+
f"{CURRENT_VERSION}-py3-none-any.whl",
|
|
17
|
+
],
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
# Main
|
|
21
|
+
if __name__ == "__main__":
|
|
22
|
+
|
|
23
|
+
# Get credentials
|
|
24
|
+
credentials: dict[str, Any] = stp.load_credentials(CREDENTIALS_PATH)
|
|
25
|
+
|
|
26
|
+
# Upload to GitHub
|
|
27
|
+
changelog: str = stp.upload_to_github(credentials, GITHUB_CONFIG)
|
|
28
|
+
|
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
""" Utilities for reading, writing and managing pyproject.toml files.
|
|
2
|
+
|
|
3
|
+
This module provides functions to handle pyproject.toml files, including reading,
|
|
4
|
+
writing, version management and TOML formatting capabilities.
|
|
5
|
+
|
|
6
|
+
- read_pyproject: Read the pyproject.toml file.
|
|
7
|
+
- write_pyproject: Write to the pyproject.toml file.
|
|
8
|
+
- format_toml_lists: Format TOML lists with proper indentation.
|
|
9
|
+
- increment_version_from_input: Increment the patch version number.
|
|
10
|
+
- increment_version_from_pyproject: Increment version in pyproject.toml.
|
|
11
|
+
- get_version_from_pyproject: Get version from pyproject.toml.
|
|
12
|
+
|
|
13
|
+
.. image:: https://raw.githubusercontent.com/Stoupy51/stouputils/refs/heads/main/assets/continuous_delivery/pyproject_module.gif
|
|
14
|
+
:alt: stouputils pyproject examples
|
|
15
|
+
"""
|
|
16
|
+
|
|
17
|
+
# Imports
|
|
18
|
+
from ..io import super_open
|
|
19
|
+
from typing import Any
|
|
20
|
+
import toml
|
|
21
|
+
|
|
22
|
+
def read_pyproject(pyproject_path: str) -> dict[str, Any]:
|
|
23
|
+
""" Read the pyproject.toml file.
|
|
24
|
+
|
|
25
|
+
Args:
|
|
26
|
+
pyproject_path: Path to the pyproject.toml file.
|
|
27
|
+
|
|
28
|
+
Returns:
|
|
29
|
+
dict[str, Any]: The content of the pyproject.toml file.
|
|
30
|
+
"""
|
|
31
|
+
return toml.load(pyproject_path)
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
def format_toml_lists(content: str) -> str:
|
|
35
|
+
""" Format TOML lists with indentation.
|
|
36
|
+
|
|
37
|
+
Args:
|
|
38
|
+
content (str): The content of the pyproject.toml file.
|
|
39
|
+
|
|
40
|
+
Returns:
|
|
41
|
+
str: The formatted content with properly indented lists.
|
|
42
|
+
"""
|
|
43
|
+
# Split the content into individual lines for processing
|
|
44
|
+
lines: list[str] = content.split("\n")
|
|
45
|
+
formatted_lines: list[str] = []
|
|
46
|
+
|
|
47
|
+
for line in lines:
|
|
48
|
+
# Check if line contains a list definition (has both [ ] and = characters)
|
|
49
|
+
if "[" in line and "]" in line and "=" in line:
|
|
50
|
+
# Only process simple lists that have one opening and closing bracket
|
|
51
|
+
if line.count("[") == 1 and line.count("]") == 1:
|
|
52
|
+
# Split into key and values parts
|
|
53
|
+
key, values = line.split("=", 1)
|
|
54
|
+
values = values.strip()
|
|
55
|
+
|
|
56
|
+
# Check if values portion is a list
|
|
57
|
+
if values.startswith("[") and values.endswith("]"):
|
|
58
|
+
# Parse list values, removing empty entries
|
|
59
|
+
values = [v.strip() for v in values[1:-1].split(",") if v.strip()]
|
|
60
|
+
|
|
61
|
+
# For lists with multiple items, format across multiple lines
|
|
62
|
+
if len(values) > 1:
|
|
63
|
+
formatted_lines.append(f"{key}= [")
|
|
64
|
+
for value in values:
|
|
65
|
+
formatted_lines.append(f"\t{value},")
|
|
66
|
+
formatted_lines.append("]")
|
|
67
|
+
# For single item lists, keep on one line
|
|
68
|
+
else:
|
|
69
|
+
formatted_lines.append(f"{key}= [{values[0]}]")
|
|
70
|
+
continue
|
|
71
|
+
|
|
72
|
+
# Keep non-list lines unchanged
|
|
73
|
+
formatted_lines.append(line)
|
|
74
|
+
|
|
75
|
+
# Rejoin all lines with newlines
|
|
76
|
+
return "\n".join(formatted_lines)
|
|
77
|
+
|
|
78
|
+
|
|
79
|
+
def write_pyproject(pyproject_path: str, pyproject_content: dict[str, Any]) -> None:
|
|
80
|
+
""" Write to the pyproject.toml file with properly indented lists. """
|
|
81
|
+
content: str = "\n" + toml.dumps(pyproject_content) + "\n"
|
|
82
|
+
content = format_toml_lists(content) # Apply formatting
|
|
83
|
+
|
|
84
|
+
with super_open(pyproject_path, "w") as file:
|
|
85
|
+
file.write(content)
|
|
86
|
+
|
|
87
|
+
|
|
88
|
+
def increment_version_from_input(version: str) -> str:
|
|
89
|
+
""" Increment the version.
|
|
90
|
+
|
|
91
|
+
Args:
|
|
92
|
+
version: The version to increment. (ex: "0.1.0")
|
|
93
|
+
|
|
94
|
+
Returns:
|
|
95
|
+
str: The incremented version. (ex: "0.1.1")
|
|
96
|
+
"""
|
|
97
|
+
version_parts: list[str] = version.split(".")
|
|
98
|
+
version_parts[-1] = str(int(version_parts[-1]) + 1)
|
|
99
|
+
return ".".join(version_parts)
|
|
100
|
+
|
|
101
|
+
def increment_version_from_pyproject(pyproject_path: str) -> None:
|
|
102
|
+
""" Increment the version in the pyproject.toml file.
|
|
103
|
+
|
|
104
|
+
Args:
|
|
105
|
+
pyproject_path: Path to the pyproject.toml file.
|
|
106
|
+
"""
|
|
107
|
+
pyproject_content: dict[str, Any] = read_pyproject(pyproject_path)
|
|
108
|
+
pyproject_content["project"]["version"] = increment_version_from_input(pyproject_content["project"]["version"])
|
|
109
|
+
write_pyproject(pyproject_path, pyproject_content)
|
|
110
|
+
|
|
111
|
+
def get_version_from_pyproject(pyproject_path: str) -> str:
|
|
112
|
+
""" Get the version from the pyproject.toml file.
|
|
113
|
+
|
|
114
|
+
Args:
|
|
115
|
+
pyproject_path: Path to the pyproject.toml file.
|
|
116
|
+
|
|
117
|
+
Returns:
|
|
118
|
+
str: The version. (ex: "0.1.0")
|
|
119
|
+
"""
|
|
120
|
+
return read_pyproject(pyproject_path)["project"]["version"]
|
|
121
|
+
|
stouputils-1.0.23/all_in_one.py
DELETED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
import os
|
|
3
|
-
import sys
|
|
4
|
-
commands = [
|
|
5
|
-
f"{sys.executable} upgrade.py", # Upgrade the version in pyproject.toml
|
|
6
|
-
f"{sys.executable} build_all_in_one.py", # Build the package and upload it
|
|
7
|
-
]
|
|
8
|
-
|
|
9
|
-
for command in commands:
|
|
10
|
-
if os.system(command) != 0:
|
|
11
|
-
print(f"Error while executing '{command}'")
|
|
12
|
-
exit(1)
|
|
13
|
-
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
import shutil
|
|
3
|
-
import os
|
|
4
|
-
|
|
5
|
-
source = os.path.dirname(os.path.realpath(__file__)).replace("\\","/") + "/src/stouputils"
|
|
6
|
-
destination = "C:/Users/Alexandre-PC/AppData/Local/Programs/Python/Python310/Lib/site-packages/stouputils"
|
|
7
|
-
|
|
8
|
-
shutil.rmtree(destination, ignore_errors=True)
|
|
9
|
-
shutil.copytree(source, destination)
|
|
10
|
-
os.system("clear")
|
|
11
|
-
print("\nCopied stouputils to local Python's site-packages\n")
|
|
12
|
-
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
# Imports
|
|
3
|
-
from stouputils import load_credentials, upload_to_github, clean_path
|
|
4
|
-
from typing import Any
|
|
5
|
-
from upgrade import current_version
|
|
6
|
-
import os
|
|
7
|
-
|
|
8
|
-
# Constants
|
|
9
|
-
ROOT: str = clean_path(os.path.dirname(os.path.abspath(__file__)))
|
|
10
|
-
CREDENTIALS_PATH: str = "~/stouputils/credentials.yml"
|
|
11
|
-
GITHUB_CONFIG: dict[str, Any] = {
|
|
12
|
-
"project_name": "stouputils",
|
|
13
|
-
"version": current_version,
|
|
14
|
-
"build_folder": f"{ROOT}/dist",
|
|
15
|
-
"endswith": [
|
|
16
|
-
f"{current_version}.tar.gz",
|
|
17
|
-
f"{current_version}-py3-none-any.whl",
|
|
18
|
-
],
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
# Get credentials
|
|
22
|
-
credentials: dict[str, Any] = load_credentials(CREDENTIALS_PATH)
|
|
23
|
-
|
|
24
|
-
# Upload to GitHub
|
|
25
|
-
changelog: str = upload_to_github(credentials, GITHUB_CONFIG)
|
|
26
|
-
|
|
@@ -1,69 +0,0 @@
|
|
|
1
|
-
""" This module contains utilities for reading and writing pyproject.toml files.
|
|
2
|
-
|
|
3
|
-
- read_pyproject: Read the pyproject.toml file.
|
|
4
|
-
- write_pyproject: Write to the pyproject.toml file.
|
|
5
|
-
|
|
6
|
-
.. image:: https://raw.githubusercontent.com/Stoupy51/stouputils/refs/heads/main/assets/continuous_delivery/pyproject_module.gif
|
|
7
|
-
:alt: stouputils pyproject examples
|
|
8
|
-
"""
|
|
9
|
-
|
|
10
|
-
# Imports
|
|
11
|
-
from ..io import super_open
|
|
12
|
-
from typing import Any
|
|
13
|
-
import toml
|
|
14
|
-
|
|
15
|
-
def read_pyproject(pyproject_path: str) -> dict[str, Any]:
|
|
16
|
-
""" Read the pyproject.toml file.
|
|
17
|
-
|
|
18
|
-
Args:
|
|
19
|
-
pyproject_path: Path to the pyproject.toml file.
|
|
20
|
-
|
|
21
|
-
Returns:
|
|
22
|
-
dict[str, Any]: The content of the pyproject.toml file.
|
|
23
|
-
"""
|
|
24
|
-
return toml.load(pyproject_path)
|
|
25
|
-
|
|
26
|
-
def write_pyproject(pyproject_path: str, pyproject_content: dict[str, Any]) -> None:
|
|
27
|
-
""" Write to the pyproject.toml file.
|
|
28
|
-
|
|
29
|
-
Args:
|
|
30
|
-
pyproject_path: Path to the pyproject.toml file.
|
|
31
|
-
pyproject_content: The content to write to the pyproject.toml file.
|
|
32
|
-
"""
|
|
33
|
-
with super_open(pyproject_path, "w") as file:
|
|
34
|
-
toml.dump(pyproject_content, file)
|
|
35
|
-
|
|
36
|
-
def increment_version(version: str) -> str:
|
|
37
|
-
""" Increment the version.
|
|
38
|
-
|
|
39
|
-
Args:
|
|
40
|
-
version: The version to increment. (ex: "0.1.0")
|
|
41
|
-
|
|
42
|
-
Returns:
|
|
43
|
-
str: The incremented version. (ex: "0.1.1")
|
|
44
|
-
"""
|
|
45
|
-
version_parts: list[str] = version.split(".")
|
|
46
|
-
version_parts[-1] = str(int(version_parts[-1]) + 1)
|
|
47
|
-
return ".".join(version_parts)
|
|
48
|
-
|
|
49
|
-
def increment_version_from_pyproject(pyproject_path: str) -> None:
|
|
50
|
-
""" Increment the version in the pyproject.toml file.
|
|
51
|
-
|
|
52
|
-
Args:
|
|
53
|
-
pyproject_path: Path to the pyproject.toml file.
|
|
54
|
-
"""
|
|
55
|
-
pyproject_content = read_pyproject(pyproject_path)
|
|
56
|
-
pyproject_content["project"]["version"] = increment_version(pyproject_content["project"]["version"])
|
|
57
|
-
write_pyproject(pyproject_path, pyproject_content)
|
|
58
|
-
|
|
59
|
-
def get_version_from_pyproject(pyproject_path: str) -> str:
|
|
60
|
-
""" Get the version from the pyproject.toml file.
|
|
61
|
-
|
|
62
|
-
Args:
|
|
63
|
-
pyproject_path: Path to the pyproject.toml file.
|
|
64
|
-
|
|
65
|
-
Returns:
|
|
66
|
-
str: The version. (ex: "0.1.0")
|
|
67
|
-
"""
|
|
68
|
-
return read_pyproject(pyproject_path)["project"]["version"]
|
|
69
|
-
|
stouputils-1.0.23/upgrade.py
DELETED
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
## Python script that modifies the pyproject.toml to go to the next version
|
|
3
|
-
# Imports
|
|
4
|
-
import stouputils as stp
|
|
5
|
-
|
|
6
|
-
# Constants
|
|
7
|
-
ROOT: str = stp.get_root_path(__file__)
|
|
8
|
-
PYPROJECT_PATH = f"{ROOT}/pyproject.toml"
|
|
9
|
-
CURRENT_VERSION: str = stp.get_version_from_pyproject(PYPROJECT_PATH)
|
|
10
|
-
|
|
11
|
-
# Main
|
|
12
|
-
if __name__ == "__main__":
|
|
13
|
-
|
|
14
|
-
# Increment version
|
|
15
|
-
stp.increment_version_from_pyproject(PYPROJECT_PATH)
|
|
16
|
-
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|