Functions
src.utils.build.generate_version_file(version: str)
Generate version file using the version provided.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
version | str | Version string to use in the version file. | required |
Source code in src\utils\build.py
76 77 78 79 80 81 82 83 |
|
src.utils.build.make_directories(config: DistConfig) -> None
Make sure necessary directories exist.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
config | DistConfig | Config data from 'dist.yml'. | required |
Source code in src\utils\build.py
86 87 88 89 90 91 92 93 94 |
|
src.utils.build.copy_directory(src: Union[str, os.PathLike], dst: Union[str, os.PathLike], x_files: list[str], x_dirs: list[str], x_ext: Optional[list[str]] = None, recursive: bool = True) -> None
Copy a directory from src to dst.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
src | str | PathLike | Source directory to copy this directory from. | required |
dst | str | PathLike | Destination directory to copy this directory to. | required |
x_files | list[str] | Excluded file names. | required |
x_dirs | list[str] | Excluded directory names. | required |
x_ext | list[str] | None | Excluded extensions. | None |
recursive | bool | Will exclude all subdirectories if False. | True |
Source code in src\utils\build.py
97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 |
|
src.utils.build.copy_app_files(config: DistConfig) -> None
Copy necessary app files and directories.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
config | DistConfig | Config data from 'dist.yml'. | required |
Source code in src\utils\build.py
142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 |
|
src.utils.build.clear_build_files(clear_dist: bool = True) -> None
Clean out pycache and venv cache, remove previous build files.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
clear_dist | bool | Remove previous dist directory if True, otherwise skip. | True |
Source code in src\utils\build.py
170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 |
|
src.utils.build.build_zip(filename: str) -> None
Create a zip of this release.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
filename | str | Filename to use on zip archive. | required |
Source code in src\utils\build.py
196 197 198 199 200 201 202 203 204 205 206 207 |
|
src.utils.build.build_release(version: Optional[str] = None, console: bool = False, beta: bool = False, zipped: bool = True) -> None
Build the app to executable release.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
version | str | None | Version to use in zip name and GUI display. | None |
console | bool | Whether to enable console window when app is launched. | False |
beta | bool | Whether this is a beta release. | False |
zipped | bool | Whether to create a zip of this release. | True |
Source code in src\utils\build.py
210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 |
|
src.utils.build.get_python_modules(path: Path) -> list[str]
Get a list of python files within a directory.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
path | Path | Python module directory. | required |
Returns:
Type | Description |
---|---|
list[str] | List of module names. |
Source code in src\utils\build.py
261 262 263 264 265 266 267 268 269 270 271 272 273 |
|
src.utils.build.generate_mkdocs(path: str) -> None
Generates a markdown file for each submodule in a python module directory.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
path | str | Path to a python module directory. | required |
Source code in src\utils\build.py
276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 |
|
src.utils.build.generate_nav(headers: list[str], paths: list[str]) -> list[dict]
Generates the nav menu data for mkdocs.yml containing scanned modules.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
headers | list[str] | Displayed nav category headers. | required |
paths | list[str] | Directory path names for each section. | required |
Returns:
Type | Description |
---|---|
list[dict] | List of nav item objects. |
Source code in src\utils\build.py
324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 |
|
src.utils.build.update_mkdocs_yml(nav: list[dict]) -> None
Updates the mkdocs.yml file with the new nav list.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
nav | list[dict] | List of nav objects to insert into nav data in mkdocs.yml. | required |
Source code in src\utils\build.py
343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 |
|