From 091ebd30e0f6fe3a9ad996fbc709e67790b2574d Mon Sep 17 00:00:00 2001 From: Tristan Gerrish Date: Mon, 12 Oct 2026 19:03:06 +0100 Subject: [PATCH 01/16] implemented UV & pre-commit formatting hook, without C# adjustments --- .gitignore | 5 +- Python_Engine/Python/README.md | 262 --- Python_Engine/Python/pyproject.toml | 66 +- Python_Engine/Python/run_tests.bat | 7 - Python_Engine/Python/scripts/build_docs.ps1 | 50 + Python_Engine/Python/scripts/install.ps1 | 50 + Python_Engine/Python/scripts/pre_commit.ps1 | 35 + Python_Engine/Python/scripts/run_tests.ps1 | 49 + Python_Engine/Python/scripts/shared.ps1 | 247 +++ Python_Engine/Python/scripts/uninstall.ps1 | 51 + .../bhom => }/assets/BHoM_Logo.png | Bin .../{python_toolkit => assets}/bhom.mplstyle | 0 .../bhom_dark.mplstyle | 0 .../bhom => }/assets/bhom_icon.png | Bin Python_Engine/Python/uv.lock | 1665 +++++++++++++++++ requirements.txt | Bin 0 -> 4206 bytes 16 files changed, 2181 insertions(+), 306 deletions(-) delete mode 100644 Python_Engine/Python/run_tests.bat create mode 100644 Python_Engine/Python/scripts/build_docs.ps1 create mode 100644 Python_Engine/Python/scripts/install.ps1 create mode 100644 Python_Engine/Python/scripts/pre_commit.ps1 create mode 100644 Python_Engine/Python/scripts/run_tests.ps1 create mode 100644 Python_Engine/Python/scripts/shared.ps1 create mode 100644 Python_Engine/Python/scripts/uninstall.ps1 rename Python_Engine/Python/src/{python_toolkit/bhom => }/assets/BHoM_Logo.png (100%) rename Python_Engine/Python/src/{python_toolkit => assets}/bhom.mplstyle (100%) rename Python_Engine/Python/src/{python_toolkit => assets}/bhom_dark.mplstyle (100%) rename Python_Engine/Python/src/{python_toolkit/bhom => }/assets/bhom_icon.png (100%) create mode 100644 Python_Engine/Python/uv.lock create mode 100644 requirements.txt diff --git a/.gitignore b/.gitignore index 48d3a171..a4770e87 100644 --- a/.gitignore +++ b/.gitignore @@ -147,7 +147,9 @@ instance/ .scrapy # Sphinx documentation -docs/_build/ +**/docs/_build/ +**/docs/index.rst +**/docs/autoapi # PyBuilder .pybuilder/ @@ -218,3 +220,4 @@ cython_debug/ # unignored files !example.sql + diff --git a/Python_Engine/Python/README.md b/Python_Engine/Python/README.md index bf482e26..e69de29b 100644 --- a/Python_Engine/Python/README.md +++ b/Python_Engine/Python/README.md @@ -1,262 +0,0 @@ -# Python_Toolkit - -The code contained here is intended to be used in conjunction with the Python_Toolkit, as part of a wider [BHoM](https://bhom.xyz/) installation. Its main purpose is to augment capabilities of the BHoM. - -# BHoM Python environments - -_Where guidelines are not explicitly given, code style standards and procedures should refer to the wider [BHoM code compliance guidance](https://github.com/BHoM/documentation/wiki/Code-Compliance)._ - -## Creation of a Python environment - -A BHoM toolkit can be associated with a Python environment. The toolkit needs to have a location where Python code associated with that toolkit exists - so the first step is in creating that location and structure. - -**In the example below we'll go through creating a Python environment for the `Example_Toolkit`**. - -### Structure - -All Python code within BHoM should be placed within the hosting toolkit, inside its `*_Engine` folder. Within this folder, the following directory structure should be created (files have been included here within `./example_toolkit`, though these are purely indicative and struictures can vary based on toolkit need): - -``` -. -├── ... -├── Example_Engine -│ └── Python -| ├── README.md -| ├── requirements.txt -| ├── setup.py -| ├── src -| | └── example_toolkit -| | ├── __init__.py -| | ├── module_a -| | | ├── __init__.py -| | | └── ... -| | └── ... -| └── tests -| ├── __init__.py -| ├── test_module_a.py -| └── ... -└── ... -``` - -### `setup.py` - -The `setup.py` file must be created alongside the code within a toolkit. This should contain teh following: - -```python -## setup.py ## -from pathlib import Path - -import setuptools -from win32api import HIWORD, LOWORD, GetFileVersionInfo - -TOOLKIT_NAME = "Example_Toolkit" - -def _bhom_version() -> str: - """Return the version of BHoM installed (using the BHoM.dll in the root BHoM directory.""" - info = GetFileVersionInfo("C:/ProgramData/BHoM/Assemblies/BHoM.dll", "\\") # pylint: disable=[no-name-in-module] - ms = info["FileVersionMS"] - ls = info["FileVersionLS"] - return f"{HIWORD(ms)}.{LOWORD(ms)}.{HIWORD(ls)}.{LOWORD(ls)}" # pylint: disable=[no-name-in-module] - -BHOM_VERSION = _bhom_version() - -here = Path(__file__).parent.resolve() -long_description = (here / "README.md").read_text(encoding="utf-8") -requirements = [ - i.strip() - for i in (here / "requirements.txt").read_text(encoding="utf-8-sig").splitlines() -] - -setuptools.setup( - name=TOOLKIT_NAME.lower(), - author="BHoM", - author_email="bhombot@burohappold.com", - description=f"A Python library that contains code intended to be used by the {TOOLKIT_NAME} Python environment for BHoM workflows.", - long_description=long_description, - long_description_content_type="text/markdown", - url=f"https://github.com/BHoM/{TOOLKIT_NAME}", - package_dir={"": "src"}, - packages=setuptools.find_packages(where="src", exclude=['tests']), - install_requires=requirements, - version=BHOM_VERSION, -) -``` - -### Enabling installation - -Two methods are required in the toolkit to which Python code is being added. The first is a `Query` method for the name of that toolkit: - -```C# -using BH.oM.Base.Attributes; - -using System.ComponentModel; - -namespace BH.Engine.Example -{ - public static partial class Query - { - [Description("Get the name of the current toolkit.")] - [Output("name", "The name of the current toolkit.")] - public static string ToolkitName() - { - return "Example_Toolkit"; - } - } -} -``` - -And the second is a `Compute` method called `ExampleToolkitPythonEnvironment` which installs the toolkits associated Python environment. In the method below, Python v3.7.9 is being used for this toolkits Python environment: - -```C# -using BH.oM.Base.Attributes; -using BH.oM.Python; - -using System.ComponentModel; - -namespace BH.Engine.Example -{ - public static partial class Compute - { - [Description("Install the Python virtualenv for the Example_Toolkit.")] - [Input("run", "Run the installation process for this BHoM Python environment.")] - [Output("env", "The Example_Toolkit Python environment, including any locally referenced BHoM code.")] - public static PythonEnvironment ExampleToolkitPythonEnvironment(bool run = false) - { - if (run) - { - return BH.Engine.Python.Compute.InstallVirtualenv( - name: Query.ToolkitName(), - pythonVersion: BH.oM.Python.Enums.PythonVersion.v3_7_9, // the version of Python to be used for this toolkits Python environment - localPackage: Path.Combine(Engine.Python.Query.CodeDirectory(), Query.ToolkitName()), - run: run - ); - } - return null; - } - } -} -``` - -Variations upon this can be made to reference external environments with known Python versions and installed packages also - with the [LadybugTools_Toolkit](https://github.com/BHoM/LadybugTools_Toolkit/blob/c005dc901459c4b779b329b65406d4a6c88f0965/LadybugTools_Engine/Compute/LadybugToolsToolkitPythonEnvironment.cs) showing how this is done. - -## Structure of Python code - -Unless otherwise specified, code style must follow guidance from [PEP8](https://peps.python.org/pep-0008/), unless otherwise stated in this document or in [BHoM C# guidance](https://github.com/BHoM/documentation/wiki/Coding-Style) (though some aspects of C# guidance are not applicable here due to differences between the two languages). - -### BHoM/Python specific style guidance - -- One method or class per file. -- As much as possible, your code should be logically organised into a collection of directories and subdirectories. -- Helper methods often don't fit into specific workflows and exist outside of packaged Python modules. These should be placed in a `./helpers` directory in the root of the toolkits Python code. -- Files named in snake_case. For example, a class called `AThing`, would be in a file called `a_thing.py`, and a method called `do_stuff` would be in a files called `do_stuff.py`. -- Imports at the top of files must be absolute, to remove all ambiguity. -- Type hints are required on all functions and classes (both inputs and outputs). -- Docstrings must be added for all classes and methods. If the method is wrapped by a class, then only a description of that method is required as a minimum (unless the method is a dunder method). -- Docstrings should be provided in [Google format](https://google.github.io/styleguide/pyguide.html#383-functions-and-methods). -- Default values should only be used where the defaults given are expected by a typical user of that code. If in doubt do not include a default. -- Where defaults are given, these are best placed in the method/class instantiation rather than reassigning to that variable upon checking if variable "is None" later in the code. -- Errors should be handled gracefully. When errors happen, the user should be told what went wrong and how to fix it. Broad Exceptions are allowed, although specific errors are preferable. Errors should also be captured at the lowest-possible level. - -## Testing - -The following guidelines are given for implementation of Python code testing. It is anticipated that the majority of testing can be undertaken automatically without need for human interaction. This does increase the time required to develop code - but will result in far better code overall as a result. Everything that can be reasonably tested should be done so. Dispensation may be given from the CI/CD lead where appropriate following suitable justification made by the code developer. - -The testing framework used in all BHoM Python code is `pytest`. In each BHoM toolkit, in the base of that toolkit is a ./.ci directory wherein tests should be placed. For example, in the `Example_Toolkit`, tests would be located in `./Example_Toolkit/.ci/unit_tests/python`. Tests should be created by the person that writes the code that is being tested, and subject to review by those undertaking the PR review. A passing unit test is required for PR approval. The reviewer needs to ensure that the testing procedure is sufficiently comprehensive as part of their approval. - -An example is given below for an appropriate candidate for testing: - -```python -## example_code.py ## -from typing import Union -def add(a: Union[int, float], b: Union[int, float]) -> float: - """Add two numbers together. - - Args: - a (Union[int, float]): The first number. - b (Union[int, float]): The second number. - - Returns: - Union[int, float]: The result of adding the inputs together. - """ - if (not isinstance(a, (int, float))) and (not isinstance(b, (int, float)): - raise TypeError(f"The combination of dtypes ({type(a)}, {type(b)}) passed are not valid for this method.") - return a + b -``` - -... with testing procedures defined to check that this method works as expected ... - -```python -## test_example_code.py ## -import pytest -from example_code import add - -def test_add(): - a = 1.5 - b = 2.5 - assert add(a, b) == 4.0 - -def test_add_fails(): - with pytest.raises(TypeError) as e_info: - add("1", 1) - -``` - -... and the command used to test this would be ... - -``` -python -m pytest ./test_example_code.py -``` - -Tests should be written so that: - -- Cases where a method runs correctly and returns a pre-defined result pass. -- Cases where the method handles errors gracefully and raises an expected error pass. -- In complex processes, tests may not be possible for all methods; however, it is expected that the lowest methods in that process are tested to reduce risk of error cascading through these processes. -- In complex processes that rely on external programs, assertions should be made at the beginning of testing that those programs are available to the testing methods. -- Where stochastic results are expected, use "fuzzy matching" to check for closeness of results (see [pytest.approx](https://docs.pytest.org/en/7.1.x/reference/reference.html#pytest-approx)) - -# Recommended development environment - -Python in the context of BHoM is intended to be used where C# may not be as rapid or best placed to give results. As such, it can be considered more of a "scripting" language - with scope for formalisation into properly formatted and discretised code as part of BHoM toolkits. Ultimately it is up to the developer how to write their code, but the following setup is suggested for those just starting. - -## IDE - -Use VSCode for Python code development. This editor provides extensibility via packages which enable the automation of a lot of repetitive actions. The plugins that are recommended are: - -- python -- pylance -- Prettier -- autoDocstring - -Additionally, the following user settings can be added to enable auto-formatting of code upon saving to PEP8 compliance using "black" (a requirement of all BHoM Python code). - -```json -{ - "python.formatting.provider": "black", - "python.defaultInterpreterPath": "C:/ProgramData/BHoM/Extensions/PythonEnvironments/Example_Toolkit/python.exe", - "editor.formatOnType": true, - "editor.formatOnSave": true, - "editor.codeActionsOnSave": { - "source.fixAll": true, - "source.organizeImports": true, - "source.sortMembers": true - }, - "python.formatting.blackPath": "C:/ProgramData/BHoM/Extensions/PythonEnvironments/Python_Toolkit/Scripts/black.exe", - "python.linting.pylintArgs": ["--disable=C0114"] -} -``` - -## Scripting/notebooks - -Jupyter notebooks provide a good testing environment for Python code development. The registered ipykernel associated with each BHoM Python environment enables creation of environment specific notebooks with access to all code contained therein. Once you've got the base BHoM Python environment installed, you can run a notebook server using - -```bash -C:/ProgramData/BHoM/Extensions/PythonEnvironments/Python_Toolkit/python.exe -m jupyter lab -``` - -During development it can be useful to reload changes in code rather than restarting the kernel each time you modify the source code. To do this, include the following in the first cell in a notebook and changes you make in the referenced \*.py files will be brought through into the notebook environment. - -```python -%load_ext autoreload -%autoreload 2 -``` diff --git a/Python_Engine/Python/pyproject.toml b/Python_Engine/Python/pyproject.toml index 6db0bd6c..e7ca9c55 100644 --- a/Python_Engine/Python/pyproject.toml +++ b/Python_Engine/Python/pyproject.toml @@ -1,54 +1,48 @@ [project] name = "python_toolkit" +version = "0.1.0" +description = "The core BHoM Python toolkit environment, containing essential tools and utilities." readme = "README.md" -dynamic = ["version", "description"] +requires-python = ">=3.10,<3.11" authors = [ { name = "BHoM", email = "bhombot@burohappold.com" } ] dependencies = [ - "case-converter", - "jupyterlab", "matplotlib", - "numpy", + "numpy", "pandas", "plotly", - "pytest>=8.3.5", - "pytest-cov>=6.0.0", - "pytest-order", - "virtualenv", "pythonnet", + "pytz", + "pywin32; sys_platform == 'win32'", ] -[urls] -source = "https://github.com/BHoM/Python_Toolkit" - [build-system] -requires = ["setuptools"] -build-backend = "setuptools.build_meta" +requires = ["hatchling"] +build-backend = "hatchling.build" + [dependency-groups] dev = [ - "black", - "ipykernel>=6.29.5", - "pylint>=3.3.5", - "pytest>=8.3.5", - "pytest-cov>=6.0.0", - "pytest-order", - "sphinx>=8.1.3", - "sphinx-bootstrap-theme>=0.8.1", - "sphinxcontrib-fulltoc>=1.2.0", - "sphinxcontrib-napoleon>=0.7", + "flask", + "furo", + "interrogate", + "ipykernel", + "line-profiler", + "memory-profiler", + "mypy", + "pydata-sphinx-theme", + "pydocstyle", + "pylint", + "pytest-benchmark", + "pytest-cov", + "pytest-dependency", + "pytest-xdist", + "pytest", + "ruff", + "sphinx-bootstrap-theme", + "sphinx", + "sphinx-autoapi", + "sphinxcontrib-fulltoc", + "sphinxcontrib-napoleon" ] - -[tool.setuptools] -package-dir = {"" = "src"} - -[tool.setuptools.packages.find] -where = ["src"] -exclude = ["tests"] - -[tool.setuptools.package-data] -"*" = ["*.mplstyle"] - -[tool.pytest.ini_options] -pythonpath = "src" diff --git a/Python_Engine/Python/run_tests.bat b/Python_Engine/Python/run_tests.bat deleted file mode 100644 index 18e46305..00000000 --- a/Python_Engine/Python/run_tests.bat +++ /dev/null @@ -1,7 +0,0 @@ -SET PYTHON_EXE=C:\ProgramData\BHoM\Extensions\PythonEnvironments\Python_Toolkit\v3_10\python.exe -SET TEST_DIR=C:\ProgramData\BHoM\Extensions\PythonCode\Python_Toolkit\tests - -@REM C:\ProgramData\BHoM\Extensions\PythonEnvironments\Python_Toolkit\v3_10\python.exe -m pytest --cov-report term --cov-report html:cov_html --cov python_toolkit -v C:\ProgramData\BHoM\Extensions\PythonCode\Python_Toolkit\tests - -"%PYTHON_EXE%" -m pytest --cov-report term --cov-report html:cov_html --cov python_toolkit -v "%TEST_DIR%" -cmd /k \ No newline at end of file diff --git a/Python_Engine/Python/scripts/build_docs.ps1 b/Python_Engine/Python/scripts/build_docs.ps1 new file mode 100644 index 00000000..6fed7fc4 --- /dev/null +++ b/Python_Engine/Python/scripts/build_docs.ps1 @@ -0,0 +1,50 @@ +param ( + [switch]$Serve, + [ValidateRange(1, 65535)] + [int]$Port = 8000 +) + +. "$PSScriptRoot\shared.ps1" + +function Build-Documentation { + param ( + [switch]$Serve, + [int]$Port + ) + + $functionName = $MyInvocation.MyCommand.Name + $workspaceRoot = Split-Path -Parent $PSScriptRoot + $docsDirectory = Join-Path $workspaceRoot "docs" + $configFile = Join-Path $docsDirectory "conf.py" + $outputDirectory = Join-Path $docsDirectory "_build\html" + $pythonExecutable = $null + + try { + if (-not (Test-Path $configFile -PathType Leaf)) { + throw "Sphinx configuration was not found at $configFile." + } + + $pythonExecutable = Get-LocalPythonExecutable + Write-InfoMessage -Message "Building HTML documentation using $configFile." -FunctionName $functionName + & $pythonExecutable -m sphinx -b html -c $docsDirectory $docsDirectory $outputDirectory + if ($LASTEXITCODE -ne 0) { + throw "Sphinx build failed with exit code $LASTEXITCODE." + } + Write-InfoMessage -Message "Documentation was built at $outputDirectory." -FunctionName $functionName + + if ($Serve) { + Write-InfoMessage -Message "Serving documentation at http://127.0.0.1:$Port/ (press Ctrl+C to stop)." -FunctionName $functionName + & $pythonExecutable -m http.server $Port --bind 127.0.0.1 --directory $outputDirectory + if ($LASTEXITCODE -ne 0) { + throw "The documentation server exited with code $LASTEXITCODE." + } + } + } + catch { + Write-ErrorMessage -Message "Documentation build or serve failed. $($_.Exception.Message)" -FunctionName $functionName -ThrowError + } +} + +if ($MyInvocation.InvocationName -ne '.') { + Build-Documentation -Serve:$Serve -Port $Port +} diff --git a/Python_Engine/Python/scripts/install.ps1 b/Python_Engine/Python/scripts/install.ps1 new file mode 100644 index 00000000..ab94076f --- /dev/null +++ b/Python_Engine/Python/scripts/install.ps1 @@ -0,0 +1,50 @@ +param ( + [switch]$Run +) + +. "$PSScriptRoot\shared.ps1" + +function Install-Package { + $functionName = $MyInvocation.MyCommand.Name + + $workspaceRoot = Split-Path -Parent $PSScriptRoot + $locationPushed = $false + $toolkitName = "Python Toolkit" + $installationComplete = $false + + try { + Push-Location $workspaceRoot + $locationPushed = $true + $tomlFile = Get-TomlFile + $toolkitName = Get-ToolkitName + Write-InfoMessage -Message "Starting installation process for $toolkitName." -FunctionName $functionName + + Write-InfoMessage -Message "Preparing UV and its command-line tools." -FunctionName $functionName + Install-UV + + Write-InfoMessage -Message "Syncing the Python environment from $tomlFile." -FunctionName $functionName + Sync-PythonEnvironment + + Write-InfoMessage -Message "Registering the Jupyter kernel." -FunctionName $functionName + Register-Kernel -KernelName $toolkitName + $installationComplete = $true + } + catch { + Write-ErrorMessage -Message "Installation failed for $toolkitName. $($_.Exception.Message)" -FunctionName $functionName -ThrowError + } + finally { + if ($locationPushed) { + Pop-Location + } + if ($installationComplete) { + Write-InfoMessage -Message "Installation process for $toolkitName completed successfully." -FunctionName $functionName + } + else { + Write-WarningMessage -Message "Installation process for $toolkitName did not complete." -FunctionName $functionName + } + } +} + +if ($Run -or $MyInvocation.InvocationName -ne '.') { + Install-Package +} diff --git a/Python_Engine/Python/scripts/pre_commit.ps1 b/Python_Engine/Python/scripts/pre_commit.ps1 new file mode 100644 index 00000000..ba58ed03 --- /dev/null +++ b/Python_Engine/Python/scripts/pre_commit.ps1 @@ -0,0 +1,35 @@ + +param ( + [switch]$Run, + [switch]$IncludeSkipped +) +. "$PSScriptRoot\shared.ps1" + +function Format-PythonFiles { + param ( + [switch]$IncludeSkipped + ) + + $workspaceRoot = Split-Path -Parent $PSScriptRoot + $pushedLocation = $false + + try { + Push-Location $workspaceRoot + $pushedLocation = $true + + Write-InfoMessage -Message "Formatting Python files in ./src" -FunctionName $MyInvocation.MyCommand.Name + & uv run ruff format ./src + Write-InfoMessage -Message "Formatting Python files in ./tests" -FunctionName $MyInvocation.MyCommand.Name + & uv run ruff format ./tests + + } + finally { + if ($pushedLocation) { + Pop-Location + } + } +} + +if ($Run -or $MyInvocation.InvocationName -ne '.') { + Format-PythonFiles +} diff --git a/Python_Engine/Python/scripts/run_tests.ps1 b/Python_Engine/Python/scripts/run_tests.ps1 new file mode 100644 index 00000000..9e1eccff --- /dev/null +++ b/Python_Engine/Python/scripts/run_tests.ps1 @@ -0,0 +1,49 @@ + +param ( + [switch]$Run, + [switch]$IncludeSkipped +) +. "$PSScriptRoot\shared.ps1" + +function Test-Code { + param ( + [switch]$IncludeSkipped + ) + + $functionName = $MyInvocation.MyCommand.Name + $workspaceRoot = Split-Path -Parent $PSScriptRoot + $previousSkipLongPytest = $env:SKIP_LONG_PYTEST + $pushedLocation = $false + + try { + Push-Location $workspaceRoot + $pushedLocation = $true + + $pythonExecutable = Get-LocalPythonExecutable + Write-InfoMessage -Message "Using Python executable: $pythonExecutable" -FunctionName $functionName + + if ($IncludeSkipped) { + $env:SKIP_LONG_PYTEST = "1" + } + else { + Remove-Item Env:SKIP_LONG_PYTEST -ErrorAction SilentlyContinue + } + + & $pythonExecutable -m pytest + } + finally { + if ($null -eq $previousSkipLongPytest) { + Remove-Item Env:SKIP_LONG_PYTEST -ErrorAction SilentlyContinue + } + else { + $env:SKIP_LONG_PYTEST = $previousSkipLongPytest + } + if ($pushedLocation) { + Pop-Location + } + } +} + +if ($Run -or $MyInvocation.InvocationName -ne '.') { + Test-Code -IncludeSkipped:$IncludeSkipped +} diff --git a/Python_Engine/Python/scripts/shared.ps1 b/Python_Engine/Python/scripts/shared.ps1 new file mode 100644 index 00000000..5b870080 --- /dev/null +++ b/Python_Engine/Python/scripts/shared.ps1 @@ -0,0 +1,247 @@ +function Write-InfoMessage { + param ( + [Parameter(Mandatory = $true)] + [string]$Message, + [string]$FunctionName = $MyInvocation.MyCommand.Name + ) + + Write-Host "- [$FunctionName] Info: $Message" -ForegroundColor Cyan +} + +function Write-WarningMessage { + param ( + [Parameter(Mandatory = $true)] + [string]$Message, + [string]$FunctionName = $MyInvocation.MyCommand.Name + ) + + Write-Host "- [$FunctionName] Warning: $Message" -ForegroundColor Magenta +} + +function Write-ErrorMessage { + param ( + [Parameter(Mandatory = $true)] + [string]$Message, + [Parameter(Mandatory = $false)] + [string]$FunctionName = $MyInvocation.MyCommand.Name, + [switch]$ThrowError + ) + + Write-Host "m- [$FunctionName] Error: $Message" -ForegroundColor Red + if ($ThrowError) { + throw $Message + } +} + +function Read-UserInput { + param ( + [Parameter(Mandatory = $true)] + [string]$Message + ) + + Write-Host $Message -ForegroundColor Yellow -NoNewline + return Read-Host +} + +function Get-LocalPythonExecutable { + $functionName = $MyInvocation.MyCommand.Name + $workspaceRoot = Split-Path -Parent $PSScriptRoot + $projectPython = Join-Path $workspaceRoot ".venv\Scripts\python.exe" + if (Test-Path $projectPython -PathType Leaf) { + Write-InfoMessage -Message "Using Python executable: $projectPython" -FunctionName $functionName + return $projectPython + } + else { + Write-ErrorMessage -Message "Local Python executable not found at $projectPython. Run the installation script first." -FunctionName $functionName -ThrowError + } +} + +function Get-TomlFile { + $workspaceRoot = Split-Path -Parent $PSScriptRoot + $tomlFile = Join-Path $workspaceRoot "pyproject.toml" + if (Test-Path $tomlFile -PathType Leaf) { + return $tomlFile + } + else { + throw "pyproject.toml file not found at $tomlFile." + } +} + +function Register-Kernel { + param ( + [Parameter(Mandatory = $true)] + [string]$KernelName, + [Parameter(Mandatory = $false)] + [string]$DisplayName + ) + + $functionName = $MyInvocation.MyCommand.Name + + $workspaceRoot = Split-Path -Parent $PSScriptRoot + $pythonExecutable = Get-LocalPythonExecutable + + if (-not $DisplayName) { + $DisplayName = "Python ($KernelName)" + } + + $locationPushed = $false + try { + Push-Location $workspaceRoot + $locationPushed = $true + Write-InfoMessage -Message "Creating $KernelName ($DisplayName) Jupyter kernel." -FunctionName $functionName + + & $pythonExecutable -m ipykernel install --user --name $KernelName --display-name $DisplayName + if ($LASTEXITCODE -ne 0) { + throw "Python failed to register the Jupyter kernel (exit code $LASTEXITCODE)." + } + } + catch { + Write-ErrorMessage -Message "Failed to create the $KernelName Jupyter kernel. $($_.Exception.Message)" -FunctionName $functionName -ThrowError + } + finally { + if ($locationPushed) { + Pop-Location + } + } +} + +function Unregister-Kernel { + param ( + [Parameter(Mandatory = $true)] + [string]$KernelName + ) + $functionName = $MyInvocation.MyCommand.Name + $workspaceRoot = Split-Path -Parent $PSScriptRoot + $pythonExecutable = Get-LocalPythonExecutable + + try { + Push-Location $workspaceRoot + try { + Write-InfoMessage -Message "Removing $KernelName Jupyter kernel." -FunctionName $functionName + + & $pythonExecutable -m jupyter kernelspec uninstall $KernelName -f + $uninstallExitCode = $LASTEXITCODE + if ($uninstallExitCode -ne 0) { + Write-WarningMessage -Message "Jupyter could not remove the kernel (exit code $uninstallExitCode); checking its files directly." -FunctionName $functionName + } + + $kernelPath = Join-Path $env:APPDATA "jupyter\kernels\$KernelName" + if (Test-Path $kernelPath) { + Remove-PathIfExists -Path $kernelPath -Description "the $KernelName Jupyter kernel" -FunctionName $functionName + } + else { + Write-InfoMessage -Message "No remaining Jupyter kernel files found for $KernelName." -FunctionName $functionName + } + } + finally { + Pop-Location + } + } + catch { + Write-ErrorMessage -Message "Failed to remove the $KernelName Jupyter kernel. $($_.Exception.Message)" -FunctionName $functionName -ThrowError + } +} + +function Get-ToolkitName { + $tomlFile = Get-TomlFile + $tomlContent = Get-Content -LiteralPath $tomlFile -ErrorAction Stop + foreach ($line in $tomlContent) { + if ($line -match '^\s*name\s*=\s*"([^"]+)"\s*$') { + return $matches[1] + } + } + throw "Project name was not found in $tomlFile." +} + +function Remove-PathIfExists { + param ( + [Parameter(Mandatory = $true)] + [string]$Path, + [Parameter(Mandatory = $true)] + [string]$Description, + [Parameter(Mandatory = $true)] + [string]$FunctionName + ) + + if (Test-Path $Path) { + try { + Remove-Item -LiteralPath $Path -Recurse -Force -ErrorAction Stop + Write-InfoMessage -Message "Removed ${Description}: $Path" -FunctionName $FunctionName + } + catch { + Write-ErrorMessage -Message "Could not remove ${Description} at $Path. $($_.Exception.Message)" -FunctionName $FunctionName -ThrowError + } + } +} + +function Install-UV { + + $functionName = $MyInvocation.MyCommand.Name + + # Attempt to run UV, and if not found, install it + if (-not (Get-Command uv -ErrorAction SilentlyContinue)) { + try { + Write-InfoMessage -Message "Installing UV." -FunctionName $functionName + & powershell.exe -NoProfile -ExecutionPolicy Bypass -Command "irm https://astral.sh/uv/install.ps1 | iex" + if ($LASTEXITCODE -ne 0) { + throw "UV installer exited with code $LASTEXITCODE." + } + } + catch { + Write-ErrorMessage -Message "Failed to install UV. $($_.Exception.Message)" -FunctionName $functionName -ThrowError + } + } + + try { + $uvBinPath = Join-Path $HOME ".local\bin" + if (Test-Path $uvBinPath -PathType Container) { + $env:Path = "$uvBinPath;$env:Path" + } + $uvCommand = Get-Command uv -ErrorAction SilentlyContinue + if (-not $uvCommand) { + throw "The UV executable is not available on PATH after installation." + } + Write-InfoMessage -Message "Using UV from $($uvCommand.Source)." -FunctionName $functionName + } + catch { + Write-ErrorMessage -Message "Could not locate UV. $($_.Exception.Message)" -FunctionName $functionName -ThrowError + } + + # install core tools + foreach ($tool in @("ruff", "jupyterlab", "sphinx")) { + try { + Write-InfoMessage -Message "Installing $tool to UV." -FunctionName $functionName + & uv tool install $tool + if ($LASTEXITCODE -ne 0) { + throw "uv tool install exited with code $LASTEXITCODE." + } + } + catch { + Write-ErrorMessage -Message "Failed to install $tool to UV. $($_.Exception.Message)" -FunctionName $functionName -ThrowError + } + } +} + +function Sync-PythonEnvironment { + $functionName = $MyInvocation.MyCommand.Name + $workspaceRoot = Split-Path -Parent $PSScriptRoot + $locationPushed = $false + + try { + Push-Location $workspaceRoot + $locationPushed = $true + Write-InfoMessage -Message "Installing Python packages with UV." -FunctionName $functionName + & uv sync + if ($LASTEXITCODE -ne 0) { + throw "uv sync exited with code $LASTEXITCODE." + } + } + catch { + Write-ErrorMessage -Message "Failed to sync the Python environment. $($_.Exception.Message)" -FunctionName $functionName -ThrowError + } + finally { + if ($locationPushed) { + Pop-Location + } + } +} diff --git a/Python_Engine/Python/scripts/uninstall.ps1 b/Python_Engine/Python/scripts/uninstall.ps1 new file mode 100644 index 00000000..e2f6977e --- /dev/null +++ b/Python_Engine/Python/scripts/uninstall.ps1 @@ -0,0 +1,51 @@ +param ( + [switch]$Run +) + +. "$PSScriptRoot\shared.ps1" + +function Uninstall-Package { + $functionName = $MyInvocation.MyCommand.Name + + $workspaceRoot = Split-Path -Parent $PSScriptRoot + $locationPushed = $false + $toolkitName = "Python Toolkit" + $uninstallationComplete = $false + + try { + Push-Location $workspaceRoot + $locationPushed = $true + $toolkitName = Get-ToolkitName + + $userInput = Read-UserInput -Message "Do you really want to uninstall the $toolkitName Python package? (y/n): " + if ($userInput -ne "y") { + Write-InfoMessage -Message "Uninstallation aborted by the user." -FunctionName $functionName + return + } + + Write-InfoMessage -Message "Removing the Jupyter kernel." -FunctionName $functionName + Unregister-Kernel -KernelName $toolkitName + + Write-InfoMessage -Message "Removing the project virtual environment." -FunctionName $functionName + Remove-PathIfExists -Path (Join-Path $workspaceRoot ".venv") -Description "the $toolkitName virtual environment" -FunctionName $functionName + $uninstallationComplete = $true + } + catch { + Write-ErrorMessage -Message "Uninstallation failed for $toolkitName. $($_.Exception.Message)" -FunctionName $functionName -ThrowError + } + finally { + if ($locationPushed) { + Pop-Location + } + if ($uninstallationComplete) { + Write-InfoMessage -Message "Uninstallation process for $toolkitName completed successfully." -FunctionName $functionName + } + elseif ($userInput -eq "y") { + Write-WarningMessage -Message "Uninstallation process for $toolkitName did not complete." -FunctionName $functionName + } + } +} + +if ($Run -or $MyInvocation.InvocationName -ne '.') { + Uninstall-Package +} diff --git a/Python_Engine/Python/src/python_toolkit/bhom/assets/BHoM_Logo.png b/Python_Engine/Python/src/assets/BHoM_Logo.png similarity index 100% rename from Python_Engine/Python/src/python_toolkit/bhom/assets/BHoM_Logo.png rename to Python_Engine/Python/src/assets/BHoM_Logo.png diff --git a/Python_Engine/Python/src/python_toolkit/bhom.mplstyle b/Python_Engine/Python/src/assets/bhom.mplstyle similarity index 100% rename from Python_Engine/Python/src/python_toolkit/bhom.mplstyle rename to Python_Engine/Python/src/assets/bhom.mplstyle diff --git a/Python_Engine/Python/src/python_toolkit/bhom_dark.mplstyle b/Python_Engine/Python/src/assets/bhom_dark.mplstyle similarity index 100% rename from Python_Engine/Python/src/python_toolkit/bhom_dark.mplstyle rename to Python_Engine/Python/src/assets/bhom_dark.mplstyle diff --git a/Python_Engine/Python/src/python_toolkit/bhom/assets/bhom_icon.png b/Python_Engine/Python/src/assets/bhom_icon.png similarity index 100% rename from Python_Engine/Python/src/python_toolkit/bhom/assets/bhom_icon.png rename to Python_Engine/Python/src/assets/bhom_icon.png diff --git a/Python_Engine/Python/uv.lock b/Python_Engine/Python/uv.lock new file mode 100644 index 00000000..6d78985c --- /dev/null +++ b/Python_Engine/Python/uv.lock @@ -0,0 +1,1665 @@ +version = 1 +revision = 1 +requires-python = "==3.10.*" + +[[package]] +name = "accessible-pygments" +version = "0.0.5" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "pygments" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/bc/c1/bbac6a50d02774f91572938964c582fff4270eee73ab822a4aeea4d8b11b/accessible_pygments-0.0.5.tar.gz", hash = "sha256:40918d3e6a2b619ad424cb91e556bd3bd8865443d9f22f1dcdf79e33c8046872", size = 1377899 } +wheels = [ + { url = "https://files.pythonhosted.org/packages/8d/3f/95338030883d8c8b91223b4e21744b04d11b161a3ef117295d8241f50ab4/accessible_pygments-0.0.5-py3-none-any.whl", hash = "sha256:88ae3211e68a1d0b011504b2ffc1691feafce124b845bd072ab6f9f66f34d4b7", size = 1395903 }, +] + +[[package]] +name = "alabaster" +version = "1.0.0" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/a6/f8/d9c74d0daf3f742840fd818d69cfae176fa332022fd44e3469487d5a9420/alabaster-1.0.0.tar.gz", hash = "sha256:c00dca57bca26fa62a6d7d0a9fcce65f3e026e9bfe33e9c538fd3fbb2144fd9e", size = 24210 } +wheels = [ + { url = "https://files.pythonhosted.org/packages/7e/b3/6b4067be973ae96ba0d615946e314c5ae35f9f993eca561b356540bb0c2b/alabaster-1.0.0-py3-none-any.whl", hash = "sha256:fc6786402dc3fcb2de3cabd5fe455a2db534b371124f1f21de8731783dec828b", size = 13929 }, +] + +[[package]] +name = "appnope" +version = "1.0.0" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/11/f7/a82489c2b6ebe32d3e2831895ae19c77861f0eadf3bb16034484d965dbb2/appnope-1.0.0.tar.gz", hash = "sha256:685db59cb6043c3c2e528adc0b3bce3a5f8d09bcf7492c6ea650d1b7421f3c49", size = 5454 } +wheels = [ + { url = "https://files.pythonhosted.org/packages/46/c7/6b687cb0f83d2a51017d47953f2ee430ffad6fec2a8ebc964e0718a33eb1/appnope-1.0.0-py3-none-any.whl", hash = "sha256:6fe0c04218aab65c54c4ff81638cdbf848d89f5653b74d68638a137f200dd16e", size = 4158 }, +] + +[[package]] +name = "ast-serialize" +version = "0.12.1" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/c2/1c/7257e6ec9382843915ce475558ce4492ccb5ed39122c256bb369c27e2ebf/ast_serialize-0.12.1.tar.gz", hash = "sha256:5285a390caf1c44368ae270f037f797b91427d138b7d43cad0f1fda4c83518d9", size = 954408 } +wheels = [ + { url = "https://files.pythonhosted.org/packages/16/05/ca16884f9498386f3646bb18be59f0e31d44e992d252d7d6f5e4f8ae1ee2/ast_serialize-0.12.1-cp315-abi3.abi3t-macosx_10_12_x86_64.whl", hash = "sha256:410233de149ab8414cb27c6fc73e9d2baa35d6f971672d540d752060d980ffb4", size = 1235686 }, + { url = "https://files.pythonhosted.org/packages/29/f2/34e87ed30e292cf365523712c4bcfef1967d9c3c2749de21b1f93b1fe0f3/ast_serialize-0.12.1-cp315-abi3.abi3t-macosx_11_0_arm64.whl", hash = "sha256:b9a2310845302f1a6bd45ae8a67d5760211103a8d66410b854bfa440d107e093", size = 1215598 }, + { url = "https://files.pythonhosted.org/packages/f8/dc/c498f41c957b6ff31b97ed8ceccf3a84f85af7debca1125183cab95bb58b/ast_serialize-0.12.1-cp315-abi3.abi3t-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:6ff65f40f49d5e1a1a043ba366081d59a4e26a9f5c1b07eb1170e172115da7ca", size = 1281911 }, + { url = "https://files.pythonhosted.org/packages/dc/60/70ccefae9d88058c4c234bf0aed93f54aca36eb74087736e76e9515aee96/ast_serialize-0.12.1-cp315-abi3.abi3t-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:536d783c4d91331f094e0a892221e619be5ffbe6fb6640885f14d7f226ec90ca", size = 1287296 }, + { url = "https://files.pythonhosted.org/packages/08/e9/4fc697879c7128e29f9dab2ed19a9b586a56b621e5ea4aee2ae28c18e116/ast_serialize-0.12.1-cp315-abi3.abi3t-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:c42d2d65f388d1960c5796231eb9bf5a988c46228633eb489605c4549ad16c52", size = 1532339 }, + { url = "https://files.pythonhosted.org/packages/8a/9e/9e2bd489731602a94dbd0c576ebe1cc487a2d0f6127be743f44711166f0d/ast_serialize-0.12.1-cp315-abi3.abi3t-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:a5628a12acc875fe7a167910f18d101dd101c2a7b1e6c2b6f7289ffaff25805c", size = 1308988 }, + { url = "https://files.pythonhosted.org/packages/3f/69/e9cae837bd766a66db6953ffb5fc7f04b1945e02b0a9e4c6a0b6acb08f17/ast_serialize-0.12.1-cp315-abi3.abi3t-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:9e855adfa5bb982b2e6fe09056b2d584f6dd4fce085d91a07d1155683751b6b5", size = 1303412 }, + { url = "https://files.pythonhosted.org/packages/b2/1e/5ef8c62d5031d93187ed0d8dade5d942de9920c3fbd678c7652362b9a7a2/ast_serialize-0.12.1-cp315-abi3.abi3t-manylinux_2_31_riscv64.whl", hash = "sha256:fafe1471e8aca6c87b4913b7b54ff97197adf702fbe28692284b929dfa62ff96", size = 1298466 }, + { url = "https://files.pythonhosted.org/packages/c2/f3/25ded60844a1a437edc840e597b6f81daf91dc4a26035416e14298d3a091/ast_serialize-0.12.1-cp315-abi3.abi3t-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:a5cac246474d2a703147d1605a6ac5ba0fa9e0a443cf1cf42513adf4df02686f", size = 1355617 }, + { url = "https://files.pythonhosted.org/packages/05/68/a0d3cc8d8042208a2cbef7b26483f4941b44dd5dd717bb19f20e4a4c0d66/ast_serialize-0.12.1-cp315-abi3.abi3t-musllinux_1_2_aarch64.whl", hash = "sha256:6e25cd319fb0d7b39fcac666784ec86708ccbc78d07a698b1400cf5ed40c045b", size = 1458949 }, + { url = "https://files.pythonhosted.org/packages/df/a0/5e4d355c48a9f125b8bec7b1b98d4d2dcd8324ff1d4dfcb03678a03c1414/ast_serialize-0.12.1-cp315-abi3.abi3t-musllinux_1_2_armv7l.whl", hash = "sha256:657a7354ea16ed4d29f8127ed477c6fee3915c111d135f020ca835a991438e90", size = 1562328 }, + { url = "https://files.pythonhosted.org/packages/8a/5f/3d40f6a7908200f2f0ed9ce1bad130d00e06d0405baa7918d4a4299b25dd/ast_serialize-0.12.1-cp315-abi3.abi3t-musllinux_1_2_i686.whl", hash = "sha256:9eb9de7e59621acdb3e66984f374272b33d56d15a04763e2fd0604211e1c8303", size = 1557751 }, + { url = "https://files.pythonhosted.org/packages/3f/13/d53e5a7e299d6dbaeab23a424eea2c98c821b46ed7b05abbe14743beeb63/ast_serialize-0.12.1-cp315-abi3.abi3t-musllinux_1_2_ppc64le.whl", hash = "sha256:09cc4d3103c1fc97f6845ba307af1db9cde5226bef47f8843220dde83f2276ba", size = 1666238 }, + { url = "https://files.pythonhosted.org/packages/37/5b/7638ee3ae35a64e4467160a37dc7565cddfe2a87f06cef2fd07c93cfd503/ast_serialize-0.12.1-cp315-abi3.abi3t-musllinux_1_2_riscv64.whl", hash = "sha256:c9e2a592706fd791c2271ce9c8f4e38c98d3ea0b4a86b511e09a4fe3ac44ab37", size = 1472620 }, + { url = "https://files.pythonhosted.org/packages/fc/e7/6e9e621e0e4a3be5a9a5f8b6961982964d2367013dbe64feb5adaa43e56d/ast_serialize-0.12.1-cp315-abi3.abi3t-musllinux_1_2_x86_64.whl", hash = "sha256:f4ac042e95a575432c1730ca4cb9183066a2074886a599f46c1f1b0955fb8198", size = 1500141 }, + { url = "https://files.pythonhosted.org/packages/4a/4f/3217da5b671711c09cc6be580095839cad539983662a6599405bd75c1a19/ast_serialize-0.12.1-cp315-abi3.abi3t-win32.whl", hash = "sha256:b3cd105995942cc6163a229674a86161ba1305f646493efd59bd6723a357ee14", size = 1118382 }, + { url = "https://files.pythonhosted.org/packages/80/1e/6074cf29dca8ceff27d50e845c88e7a2eaaa7f0b6f3972909e878d844737/ast_serialize-0.12.1-cp315-abi3.abi3t-win_amd64.whl", hash = "sha256:a9cd24a26126088693ca054547ea0a391398a29cf1a3a2bec1009b4b6acc8b82", size = 1158034 }, + { url = "https://files.pythonhosted.org/packages/92/a0/81ce428f9f3f1ca45f8b62c9711c30452bf8190476e8685cea0f72d8d008/ast_serialize-0.12.1-cp315-abi3.abi3t-win_arm64.whl", hash = "sha256:9649cd903db0dc047906c6dd740784a2ba665d54f7e43ba31457edbce76c9493", size = 1129437 }, + { url = "https://files.pythonhosted.org/packages/80/fb/1eabd2c0673283054468b1c6cb539aeb877636d6c84b280279f2d7a177a9/ast_serialize-0.12.1-cp39-abi3-macosx_10_12_x86_64.whl", hash = "sha256:98d91cd3a6cb76a39512ee090a539d1e3206b732ad8150eb38918cffa1ddf515", size = 1241515 }, + { url = "https://files.pythonhosted.org/packages/1b/d7/c56955934a431a0fa3e4e9aa7af4a53ceab2a61241005427545208945eb4/ast_serialize-0.12.1-cp39-abi3-macosx_11_0_arm64.whl", hash = "sha256:8a32f184ce3e4b1d0b06d642a1243281cf55b99e0323680b1b8f904029fd7700", size = 1228048 }, + { url = "https://files.pythonhosted.org/packages/1e/4e/2b2ca4602baf92f842316ea617423402089df4fbd2ea42571ba28725ba46/ast_serialize-0.12.1-cp39-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:e62126ac2be2d9340ac1b3ee7a0466a883ecbed634cff0929c88ca0b671483b7", size = 1292087 }, + { url = "https://files.pythonhosted.org/packages/d9/49/9ebd05218a87ca31f4f855d5e3df14239bba3c58f2aed9d02c7cba5d94f5/ast_serialize-0.12.1-cp39-abi3-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:0f93a70fa9826c04ea9f2c3a880f87f4cca09a828144ed5084682abd28110980", size = 1295355 }, + { url = "https://files.pythonhosted.org/packages/dc/09/6db7c4327e7a56aba805f7190d377a159fc0bf6bdefb410dc7860624dfa3/ast_serialize-0.12.1-cp39-abi3-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:1858887be56a64a2aea899423dfe43787c34c75c18b0d7497de8e618d54b2790", size = 1541231 }, + { url = "https://files.pythonhosted.org/packages/ed/85/7ab6097e5fe23cd4657b0e5a2fabb4f789f91e441a3ee40b3ca8b79be238/ast_serialize-0.12.1-cp39-abi3-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:89a2bc39a820bc7785b60c53a5742b4e8dd4c1a599294e2dd68fae545883d44a", size = 1317324 }, + { url = "https://files.pythonhosted.org/packages/c0/60/58961e7fd129e226ce36788fe328d20034f3105f5d3380df690050517737/ast_serialize-0.12.1-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:50a9eaedf1db4857dad7cc47dd757ed70bfcc40b89d44d516c4a2f0d5033bd76", size = 1311809 }, + { url = "https://files.pythonhosted.org/packages/15/c7/09d973db87d4575cba470fd80a3fa489322f7d6882546e43a4b21012468e/ast_serialize-0.12.1-cp39-abi3-manylinux_2_31_riscv64.whl", hash = "sha256:c30b609e8fea426b310543126de876592236a25aa8ebd59f1e2b323dd52a4085", size = 1306678 }, + { url = "https://files.pythonhosted.org/packages/84/27/84f69c22bcdaa5256b4fe43ff972fc117668fff8e68495807d5792eadcce/ast_serialize-0.12.1-cp39-abi3-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:7b1ad06513022cfa1337744959255af0ef16119d2beb1e547b67f37ad9433d4a", size = 1362009 }, + { url = "https://files.pythonhosted.org/packages/43/46/76ee342ef22cd6d82ccd6089d5e2f7163246de73d1816ccb4b6ec0550db6/ast_serialize-0.12.1-cp39-abi3-musllinux_1_2_aarch64.whl", hash = "sha256:6add54b495e37ae3cf3a1f0d5eaba364814eb72e93026adc41b7791e4b0d45d3", size = 1467959 }, + { url = "https://files.pythonhosted.org/packages/31/4d/18e48154bbf6058eed8d9b54fcebb2e130f8a380db1a2a202b4faac48626/ast_serialize-0.12.1-cp39-abi3-musllinux_1_2_armv7l.whl", hash = "sha256:5fc136cd08001b817ad0b3e7426f50a7d2b8982dc7c6491f0af78af4c3dd8672", size = 1571157 }, + { url = "https://files.pythonhosted.org/packages/34/76/6b16ddf0510e713613a5f5441b13407c1bde6158df04946b9f1fdc65add3/ast_serialize-0.12.1-cp39-abi3-musllinux_1_2_i686.whl", hash = "sha256:45a9e6b700bbd973d49942668a5cdbeffa693f2e250b8a5409abd1fa9d351854", size = 1566873 }, + { url = "https://files.pythonhosted.org/packages/75/33/9f6169ae7f60c2da4baec03450073d3f1edb39e95ab538be0d25a7d2f72e/ast_serialize-0.12.1-cp39-abi3-musllinux_1_2_ppc64le.whl", hash = "sha256:a1d8267f83c613ea0a31f2518df074bd62e98a4b3a4892f6a529d74e08e02dba", size = 1673030 }, + { url = "https://files.pythonhosted.org/packages/11/51/0d78755bd61d6cf8980f0cfdc7fa8ede38df46a5423c9f7a3da0cff587ec/ast_serialize-0.12.1-cp39-abi3-musllinux_1_2_riscv64.whl", hash = "sha256:9a0cbab9796e6ce841197feeba4008faa96b4cc7741129542fd81c882d7a4f01", size = 1480052 }, + { url = "https://files.pythonhosted.org/packages/01/ae/ad4c0e5129991f2761f388420c5ded37cb134ec5882e3e59043d33c1ad87/ast_serialize-0.12.1-cp39-abi3-musllinux_1_2_x86_64.whl", hash = "sha256:b4282695f1d51a3c6ef76560351bad5af880eff7d755aefea325bffb9bf68c25", size = 1508940 }, + { url = "https://files.pythonhosted.org/packages/38/6b/3299182794d38815ae6e9c7ede9bb8f2e4aa93c3578bed201c1ea746643a/ast_serialize-0.12.1-cp39-abi3-win32.whl", hash = "sha256:119d1b0cadaba4a6e475f9bbe79eecc79351e373142eabe7c353f0250d70aebb", size = 1125618 }, + { url = "https://files.pythonhosted.org/packages/86/14/5d4fb733c18a1d69e237c067b183842f3a7ea1c999a51ddc87093a281c88/ast_serialize-0.12.1-cp39-abi3-win_amd64.whl", hash = "sha256:3d6ed63d4fc1ec867b8cb522d58c36df0e8f05e487bea0ffd102043a37636d72", size = 1165798 }, + { url = "https://files.pythonhosted.org/packages/f1/f4/b54123680025c0b7253117418f023d1b2487f1102552acbdd9d8ee96b622/ast_serialize-0.12.1-cp39-abi3-win_arm64.whl", hash = "sha256:610a41351de68199de9a1434499083b4256c0df7658ec1cfc0a0a7b20b08d317", size = 1136560 }, +] + +[[package]] +name = "astroid" +version = "4.3.4" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "typing-extensions" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/2d/87/5732fa68bf100a095cfcbd108f919220d995db99e1a7502b8119a869fd62/astroid-4.3.4.tar.gz", hash = "sha256:d515a105722b72098bbe82d430d65e635f742b6cbac3bdfaf8b7c188b87c5e39", size = 444627 } +wheels = [ + { url = "https://files.pythonhosted.org/packages/16/d4/f23c0ac6e6de33ba5686cb21c672c95e0c2d3d4c9351f16d3b5fed818652/astroid-4.3.4-py3-none-any.whl", hash = "sha256:2bcd0d02648a443a4b818c952c3550091989daefac3c12d3b83b2289482e0818", size = 288310 }, +] + +[[package]] +name = "asttokens" +version = "3.0.2" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/25/1e/faf0f247f6f881b98fc4d6d07e14085cb89d13665084e6d6ac1dc2c03d0b/asttokens-3.0.2.tar.gz", hash = "sha256:3ecdbd8f2cc195f53ccada3a613538bb5f9ef6f6869129f13e03c30a677b8fe2", size = 63136 } +wheels = [ + { url = "https://files.pythonhosted.org/packages/d4/2b/04b8a15f3a1c77bc79ddf5c73875327f34b4fa75982df2b76e45e402d364/asttokens-3.0.2-py3-none-any.whl", hash = "sha256:9da13157f5b28becde0bd374fc677dcd3c290614264eff096f167c469cd9f933", size = 28702 }, +] + +[[package]] +name = "attrs" +version = "26.1.0" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/9a/8e/82a0fe20a541c03148528be8cac2408564a6c9a0cc7e9171802bc1d26985/attrs-26.1.0.tar.gz", hash = "sha256:d03ceb89cb322a8fd706d4fb91940737b6642aa36998fe130a9bc96c985eff32", size = 952055 } +wheels = [ + { url = "https://files.pythonhosted.org/packages/64/b4/17d4b0b2a2dc85a6df63d1157e028ed19f90d4cd97c36717afef2bc2f395/attrs-26.1.0-py3-none-any.whl", hash = "sha256:c647aa4a12dfbad9333ca4e71fe62ddc36f4e63b2d260a37a8b83d2f043ac309", size = 67548 }, +] + +[[package]] +name = "babel" +version = "2.18.0" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/7d/b2/51899539b6ceeeb420d40ed3cd4b7a40519404f9baf3d4ac99dc413a834b/babel-2.18.0.tar.gz", hash = "sha256:b80b99a14bd085fcacfa15c9165f651fbb3406e66cc603abf11c5750937c992d", size = 9959554 } +wheels = [ + { url = "https://files.pythonhosted.org/packages/77/f5/21d2de20e8b8b0408f0681956ca2c69f1320a3848ac50e6e7f39c6159675/babel-2.18.0-py3-none-any.whl", hash = "sha256:e2b422b277c2b9a9630c1d7903c2a00d0830c409c59ac8cae9081c92f1aeba35", size = 10196845 }, +] + +[[package]] +name = "beautifulsoup4" +version = "4.15.0" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "soupsieve" }, + { name = "typing-extensions" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/43/65/318323f98dbee45d42dff61d8f047181bc6f2268a9068cfad035a46be5af/beautifulsoup4-4.15.0.tar.gz", hash = "sha256:288e3ca7d54b06f2ac191970bc275c1939cb46d450b255bf6718b04aa37ab4f7", size = 632571 } +wheels = [ + { url = "https://files.pythonhosted.org/packages/88/c6/92fcd42f1ba33e1184263f25bfabf3d27c383410470f169e4b8163bf9c17/beautifulsoup4-4.15.0-py3-none-any.whl", hash = "sha256:d6f88de62e1d4e38ecb1077eb9724cd0eff29d2a08ca16a401e9b9e93f117cf9", size = 109924 }, +] + +[[package]] +name = "blinker" +version = "1.9.0" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/21/28/9b3f50ce0e048515135495f198351908d99540d69bfdc8c1d15b73dc55ce/blinker-1.9.0.tar.gz", hash = "sha256:b4ce2265a7abece45e7cc896e98dbebe6cead56bcf805a3d23136d145f5445bf", size = 22460 } +wheels = [ + { url = "https://files.pythonhosted.org/packages/10/cb/f2ad4230dc2eb1a74edf38f1a38b9b52277f75bef262d8908e60d957e13c/blinker-1.9.0-py3-none-any.whl", hash = "sha256:ba0efaa9080b619ff2f3459d1d500c57bddea4a6b424b60a91141db6fd2f08bc", size = 8458 }, +] + +[[package]] +name = "certifi" +version = "2026.7.22" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/a3/c2/24167ea9858356b47a87a50d39908bfdb72ceeefe0041586e704e5376b3a/certifi-2026.7.22.tar.gz", hash = "sha256:741e2c3b351ddf169a738da9f2c048608ff7f2c5cc02f1ebc6b118bb090d5d55", size = 138112 } +wheels = [ + { url = "https://files.pythonhosted.org/packages/0b/a7/71ac2cff56fec219ed242bb11b8efb69fcc4bec75db06fb7bfe35de520e6/certifi-2026.7.22-py3-none-any.whl", hash = "sha256:62f22742b58a1a33014a2b6b706588a8d7e2a88ae7bd1a6ebe8c992928483775", size = 136983 }, +] + +[[package]] +name = "cffi" +version = "2.1.1" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "pycparser", marker = "implementation_name != 'PyPy'" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/9e/ef/008a1939e372c06329a3fce4279c02f328488f3526744906eeec3da7ad5f/cffi-2.1.1.tar.gz", hash = "sha256:dd31f52ea1086513bb9df30f8fcee9b8918323ae067a3d5b78bc826a000712be", size = 530807 } +wheels = [ + { url = "https://files.pythonhosted.org/packages/b6/d2/2cde336b375f55c76ca670f0be3978cc048e31e24f3b4d7ce8473150a388/cffi-2.1.1-cp310-cp310-macosx_10_15_x86_64.whl", hash = "sha256:baed1e86cc735622097354b9d1281406caf42ff42a886d29faa8e8d1630333be", size = 183779 }, + { url = "https://files.pythonhosted.org/packages/94/1a/4b2f7c92293ba05cbd4a9a1b28faaf0326272d9488e6354657571c48a7aa/cffi-2.1.1-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:ca82be1a1d406ecfe1d25dc16cb33488e5a16bf4438c9fb590484ea29d92478b", size = 184178 }, + { url = "https://files.pythonhosted.org/packages/17/0b/ba385d8ccedf926c3cd06e8e2f327027da5afe5f0eb30f1f7bc43ac55125/cffi-2.1.1-cp310-cp310-manylinux1_i686.manylinux2014_i686.manylinux_2_17_i686.manylinux_2_5_i686.whl", hash = "sha256:42e2f76b9455f5a9a844f770bf3e200ed3da0e15f5df3db9c31fe80b04b3d004", size = 211037 }, + { url = "https://files.pythonhosted.org/packages/a3/b9/0f2e58b2cefa33255bff36935d42b13180fe559bba82596540eb404bde7d/cffi-2.1.1-cp310-cp310-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:5a59cc1c4442bc3d5c703bf720b51138d0bfc173618807c9ee2490a7541dd3d9", size = 218652 }, + { url = "https://files.pythonhosted.org/packages/37/15/180e0dab27b9312c7479003d14c9e547634b7dcb934e2cc4650e1b131a7a/cffi-2.1.1-cp310-cp310-manylinux2014_ppc64le.manylinux_2_17_ppc64le.whl", hash = "sha256:9f8d177621de5cb38ee3e731eda45d421db093ec0739f46a5594babda7987a98", size = 205422 }, + { url = "https://files.pythonhosted.org/packages/18/d4/03026f0c850cbbaa9030750490225b4a7f4d524ea4df72c3cc740a90f4ef/cffi-2.1.1-cp310-cp310-manylinux2014_s390x.manylinux_2_17_s390x.whl", hash = "sha256:75f80557d1389eddbd0de2681f6a390a0c5338c31ddaa821381c203fc3fd50d9", size = 205444 }, + { url = "https://files.pythonhosted.org/packages/75/77/60bebf6f818bec84210ac5b6979ce4eeadce6fbbaabc9c7ab23e506d1ce5/cffi-2.1.1-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:194cffa889098ced9976c3fc6340305e43f6303657d298da55366907c05c22d6", size = 218742 }, + { url = "https://files.pythonhosted.org/packages/b0/ae/679bf47e73fd77b352171727f07de559a003f14de5d02b904a6ec1fa73ca/cffi-2.1.1-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:5bb4e7ea95dcd6a014a6fef62e62467d67d8e582326443f3d68e71d6320a9fcf", size = 221054 }, + { url = "https://files.pythonhosted.org/packages/09/b8/eefc0e06913b70aa153bf74c946094a18f58fd4aff11b7f372bfdfdca050/cffi-2.1.1-cp310-cp310-musllinux_1_2_i686.whl", hash = "sha256:3d22a20b1fb1632cc72c22f95f7b0d2961c3e1c235f245ba4c606c4771035659", size = 213489 }, + { url = "https://files.pythonhosted.org/packages/6f/13/4e56852824a03cdf68523a35686f1c28eacd4bd30a7b0a78e682e6e6e1d3/cffi-2.1.1-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:1dea0e4d7d4f11f619fe8c1d76caf49e24405b4b5743c0e3be16a500ecd930c9", size = 220241 }, + { url = "https://files.pythonhosted.org/packages/99/7f/040f9e163e4acac3ee3d85b02d00b2576e7ca980d8785f0a3a5f1a9bf7f5/cffi-2.1.1-cp310-cp310-win32.whl", hash = "sha256:7ce713ace7c0e4520535b42b77eaa742c16dab813978064913e5a3cf82973b41", size = 174578 }, + { url = "https://files.pythonhosted.org/packages/ba/0b/644a2ec1a4eaba49c2939410bb1eb1d25b09d6d0582f5d2f95c537043725/cffi-2.1.1-cp310-cp310-win_amd64.whl", hash = "sha256:a48d62ab9d6f4f98c983223a547af44be6ca3691074c31cecced6facd3ba2dc1", size = 185082 }, +] + +[[package]] +name = "charset-normalizer" +version = "3.5.2" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/33/1c/f41d4e74c28ab327ff3acd36053f7ea506c55872d7a90b0fa71aa3ab0c89/charset_normalizer-3.5.2.tar.gz", hash = "sha256:39de2a259fc954455c57274dc94c79d5842774e1247a016aff30bc0efed0f4ef", size = 172659 } +wheels = [ + { url = "https://files.pythonhosted.org/packages/98/77/46e87bcfc45d25ab4db7cfc9bb544bfa3ffd302289ed31ae93f5433eb899/charset_normalizer-3.5.2-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:195c26fb65950f8fce54e26349852b7bdd7c5f120aeefbcc440b8a20faaed4a3", size = 373348 }, + { url = "https://files.pythonhosted.org/packages/52/fc/e518013affcc43c9f919c3ba41bffe9b4ee4aceb0a6462a6243efcca5f2d/charset_normalizer-3.5.2-cp310-cp310-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:9373ad13ef0d2c0fb761e04e55bfdee5a08b52cef2c882c8fbe9935b1517152e", size = 260860 }, + { url = "https://files.pythonhosted.org/packages/d5/ad/2a895c945ee61988dfd9ccee64f0b78dc09f29c9b34d1dd545246d78e0ad/charset_normalizer-3.5.2-cp310-cp310-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:ddf19c062bea7a0cc80f519243d2c01dd091be0cf952a0750d4ad576709559f5", size = 246491 }, + { url = "https://files.pythonhosted.org/packages/c9/05/5d958bc8ea503e26be25ada5430fd409cfb45dc22ff33f9f96e649613c99/charset_normalizer-3.5.2-cp310-cp310-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:3d14b50de6bf4d0edf857a9386836846f982b8f524e188e2e68b96d702bcf4aa", size = 290875 }, + { url = "https://files.pythonhosted.org/packages/55/e2/06bad57dfdb49cad92c0ba85b6b4fa5827a67df37897287cfef0553843c2/charset_normalizer-3.5.2-cp310-cp310-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:28a15fdad492a99b6eccfaaed66ef3f74050680545ea61ec8b2f4c538f1f1320", size = 286987 }, + { url = "https://files.pythonhosted.org/packages/c4/9f/9f52d2886d52645987d603425482c63c5045a3005db1354a7097e5ed1ae9/charset_normalizer-3.5.2-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:8a893cc101149f80a653f82062ebc95b34525a2614382e1da5458fe7c6997249", size = 271105 }, + { url = "https://files.pythonhosted.org/packages/4a/41/e05e19578b7b87e7db2c3ecb884bd09d065274ab41e1f535542e8bae9b06/charset_normalizer-3.5.2-cp310-cp310-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:619799369eeef6366ed3e8755a5670f4f2f0fb6b30a0fd7264dc0fdc2357058e", size = 269833 }, + { url = "https://files.pythonhosted.org/packages/c2/cd/fc7152414561ff78f9c61a4a627025f65fd244abaefc99ac4e75c6169b33/charset_normalizer-3.5.2-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:447441e76ec720b15e64418d32e092297340387053047c7c694f579efb0ee1d9", size = 263048 }, + { url = "https://files.pythonhosted.org/packages/71/71/fb379e399b1013962716a059d551e03bd80b3e02f05d81246886af6c0958/charset_normalizer-3.5.2-cp310-cp310-musllinux_1_2_armv7l.whl", hash = "sha256:62588a277bfb59def052abd940703fa35107152bf479781a878617d60faf8fb5", size = 249237 }, + { url = "https://files.pythonhosted.org/packages/33/4f/aeadccd6d20882909eb2597ec40eccc05d505e2262f14dc76d7620700657/charset_normalizer-3.5.2-cp310-cp310-musllinux_1_2_ppc64le.whl", hash = "sha256:44bd4fbb29dfbeba60e7d2bd000c59e4b21ddb3cc53912b14048d37092706d7c", size = 290756 }, + { url = "https://files.pythonhosted.org/packages/b9/7b/e8a92613236b257d3b75d532496eb21f68ad8231d7d56df94497e460112e/charset_normalizer-3.5.2-cp310-cp310-musllinux_1_2_riscv64.whl", hash = "sha256:30fcd120b732aa79317f08dee04d7de0847822e4cf7ee0e9f445bb958832252c", size = 269026 }, + { url = "https://files.pythonhosted.org/packages/ff/ac/21d5c6b972285c5f095ff78afdc99f3539e3985dfcf7ff1cfbe9e772f529/charset_normalizer-3.5.2-cp310-cp310-musllinux_1_2_s390x.whl", hash = "sha256:50e3adfb96fc189eb27b1cf62d3b598b89b4bb0420d93a3d3e42e137409011be", size = 287601 }, + { url = "https://files.pythonhosted.org/packages/59/72/263491ec1494a194b16fcbff88a0220f2af633738c79e92b4d7189226322/charset_normalizer-3.5.2-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:b736353c0a625bbd5fcec108576e2385db3496f4f771f785ff32e108d3c3bc45", size = 272660 }, + { url = "https://files.pythonhosted.org/packages/38/7a/81f1186c57e406233969ae96b5fd0c907254ab8b6e47da8ae24cd20fb9d7/charset_normalizer-3.5.2-cp310-cp310-win32.whl", hash = "sha256:f5833ad231be5eb6553de524a70f48d71b2c8563101750531e0b80184e175cd4", size = 187301 }, + { url = "https://files.pythonhosted.org/packages/ae/ab/fb8b5178fdf7bf68efa61cbe892286bc9f73846f26147d4725fb89388475/charset_normalizer-3.5.2-cp310-cp310-win_amd64.whl", hash = "sha256:1461ac396c4fdb983a675f20aa555624f0ee18ac83d832b9244ffff3d8055275", size = 215446 }, + { url = "https://files.pythonhosted.org/packages/36/40/e270b74e0d3f583d78d902960845a149e80eb7c737ee5613ccc6efc7264b/charset_normalizer-3.5.2-cp310-cp310-win_arm64.whl", hash = "sha256:c6708715abcf3c73b99508253e961a9967f02fe536532834149574eda6de0d1c", size = 203389 }, + { url = "https://files.pythonhosted.org/packages/8c/ab/176fbfd5b64939c55d652366aa5b9ef1d767af207a3aa6ebeb0d226c484d/charset_normalizer-3.5.2-cp37-abi3-macosx_10_9_universal2.whl", hash = "sha256:4275811936e2f06feff5e598fb42a1b7ae852da8e39605211892b56b81a34efd", size = 331815 }, + { url = "https://files.pythonhosted.org/packages/7e/84/371eac6b30bdbcbf2d632a1a01809103459216fcaae61b8b8d922c1bfb8a/charset_normalizer-3.5.2-cp37-abi3-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl", hash = "sha256:1c50fe28bbc2ced33386f298650d91218076c05420e6cbd790b913adc41659e7", size = 253276 }, + { url = "https://files.pythonhosted.org/packages/43/6f/c4fbae58febff71709c51bc7e18fdfa55341dc382704740f9f0cbf03817b/charset_normalizer-3.5.2-cp37-abi3-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:d19fbd981a488e22cd04883659ca6b08f50b5974f9fd7c95655ef6a043e5893f", size = 241239 }, + { url = "https://files.pythonhosted.org/packages/61/71/458c3f42164a07d0c5210798e9e704b39e540a6793b05aba67f3a35243a9/charset_normalizer-3.5.2-cp37-abi3-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:0fed1d06615f022ee3b13caf5e8b180cfea32bb2c5aded8a9d44277afc040f93", size = 231121 }, + { url = "https://files.pythonhosted.org/packages/09/54/ab9e89367076f6331bb6c65c4bf14a5361fa5191cb6561bf534f18504e1b/charset_normalizer-3.5.2-cp37-abi3-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:838dcc90063569a0448120554591a1d6c4a4ffe11babf048908793154ab86ade", size = 260350 }, + { url = "https://files.pythonhosted.org/packages/7c/c1/061431ecc688d9d76602502cb57cc01e691e682c18f1beb45f9673b5bbd2/charset_normalizer-3.5.2-cp37-abi3-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:2ce45c6627b22c47e390bc91a41c3d13032192e699fa0bea96e9671b373d69b0", size = 255430 }, + { url = "https://files.pythonhosted.org/packages/8d/1f/20c8949f0676f7ab811abdeb7f4d7f1cbc6e61ff20bef08b44edeb092bc8/charset_normalizer-3.5.2-cp37-abi3-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:0774bf9bf620249fee3e0b8b9fd3065de213be30f3aa94ce2494b3b638949e26", size = 250612 }, + { url = "https://files.pythonhosted.org/packages/2b/9e/46f2fa4c431fc98c4ae76a8cb5bdca54e0341e3cfc3fcfd8e82740250818/charset_normalizer-3.5.2-cp37-abi3-musllinux_1_2_aarch64.whl", hash = "sha256:1db38f4c5496827c1a501846d64d14c3b80c7e6714e406cd7dc36a9899fa1011", size = 242083 }, + { url = "https://files.pythonhosted.org/packages/bd/39/559be29a0c0f086e0bba6922babd38916cc5e0b58ced4de13ee01ea05508/charset_normalizer-3.5.2-cp37-abi3-musllinux_1_2_armv7l.whl", hash = "sha256:304d8e4d493af723536393eee0c689eb7813f4a474c8b479dee63f1fdd98f621", size = 232738 }, + { url = "https://files.pythonhosted.org/packages/ff/6c/387b0e4f756a282831c1d9fc6aeb6c51ca4507ca202767c8de15ce9b12e2/charset_normalizer-3.5.2-cp37-abi3-musllinux_1_2_ppc64le.whl", hash = "sha256:9b7f416ff0978e2f2249330527f0ad6fa02f4932e6199692d3b52da2048c19e4", size = 260703 }, + { url = "https://files.pythonhosted.org/packages/96/92/1fdf015f09ef449f50d3ac4b67c90887c9c318b727daa95cc4f866e6521d/charset_normalizer-3.5.2-cp37-abi3-musllinux_1_2_riscv64.whl", hash = "sha256:01077390b03f7988f11d700a2194e69b119741a86b1a638b1db88891e3eced8e", size = 247622 }, + { url = "https://files.pythonhosted.org/packages/dc/3c/8e7b8a5671ad5d433669fb2a76f1a0164df2d9b1718b0206bc2a16d840cc/charset_normalizer-3.5.2-cp37-abi3-musllinux_1_2_s390x.whl", hash = "sha256:7e841fb9010836c992c9f12fcbd43a831de93a5f726fc1ccd8ca1d0268c5014c", size = 257500 }, + { url = "https://files.pythonhosted.org/packages/b4/f0/45b579df5cabc1d5d53ea1cc35e8437d3ca768c0acccc7041517cb6fbb32/charset_normalizer-3.5.2-cp37-abi3-musllinux_1_2_x86_64.whl", hash = "sha256:9cae88599c7219005d879f98e5ed53341e9a122af585e1091200358a3003d2a0", size = 255100 }, + { url = "https://files.pythonhosted.org/packages/31/68/fdec18a343f5fb3f310588dd478b09ac4799e0b187dbade3a8cd776f03ef/charset_normalizer-3.5.2-cp37-abi3-win32.whl", hash = "sha256:01b0c0d2262a9e28e8484a278c7e1b5d650e3ac8cf2683d2967e25899f208bdf", size = 174499 }, + { url = "https://files.pythonhosted.org/packages/9d/8a/b618149cc5207943a0242068d7a27897f56a62947b5a039085f2a22029f8/charset_normalizer-3.5.2-cp37-abi3-win_amd64.whl", hash = "sha256:9f56f72050826f63dcee7a7f55b0a77168cb3bfc553fd405e7f8f9ece75a4036", size = 200092 }, + { url = "https://files.pythonhosted.org/packages/03/cf/4c66866fa9e2b1c78e3c911516d1de497a677b7ac60f1eceda74ce777ca3/charset_normalizer-3.5.2-cp37-abi3-win_arm64.whl", hash = "sha256:40ab6bffa02ae10a0581e6c198be7d2d8ca5c2a0c64e4ed3465d766df457573e", size = 294363 }, + { url = "https://files.pythonhosted.org/packages/fc/ad/d07d7862a62ffa6d79d68074d14823243dd235a77c45262acbf6adeb28bf/charset_normalizer-3.5.2-py3-none-any.whl", hash = "sha256:b6b751274acb69d77b3323d6b7dbaa3c7fdfc1eb829b7eb61d262f32e1af9685", size = 68872 }, +] + +[[package]] +name = "click" +version = "8.5.0" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/c7/0e/7fa0ef50764b67090eca4114772a2abf8b6148198475e54c660b97caeee6/click-8.5.0.tar.gz", hash = "sha256:ba0d2089de75ea0310e2dde03160e6ca10009947fb95a182f9b54021bb272e34", size = 382235 } +wheels = [ + { url = "https://files.pythonhosted.org/packages/58/50/6c0d534c5f134586a8e1ba4e330569e32f057e33372ae556463212fb4cd3/click-8.5.0-py3-none-any.whl", hash = "sha256:255bc9599cf7748b4b1a446ccc735421bd08a2ae529a8b88597d3de5664ee360", size = 125251 }, +] + +[[package]] +name = "clr-loader" +version = "0.3.1" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "cffi" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/e4/46/7eea92b6aa2d68af78e049cbecec5f757f1aad44ecdecdc16bbad7eead51/clr_loader-0.3.1.tar.gz", hash = "sha256:2e073e9aaf49d1ae2f56ecba27987ad5fb68be4bcd9dd34a5bed8f0e4e128366", size = 86805 } +wheels = [ + { url = "https://files.pythonhosted.org/packages/5e/da/ec1a6e36624000b6df0dd61183c42342ee5814c073315e802cadaad04d2f/clr_loader-0.3.1-py3-none-any.whl", hash = "sha256:cbad189de20d202a7d621956b0fc38049e13c9bf7ca2923441eff725cd121aa1", size = 55730 }, +] + +[[package]] +name = "colorama" +version = "0.4.6" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/d8/53/6f443c9a4a8358a93a6792e2acffb9d9d5cb0a5cfd8802644b7b1c9a02e4/colorama-0.4.6.tar.gz", hash = "sha256:08695f5cb7ed6e0531a20572697297273c47b8cae5a63ffc6d6ed5c201be6e44", size = 27697 } +wheels = [ + { url = "https://files.pythonhosted.org/packages/d1/d6/3965ed04c63042e047cb6a3e6ed1a63a35087b6a609aa3a15ed8ac56c221/colorama-0.4.6-py2.py3-none-any.whl", hash = "sha256:4f1d9991f5acc0ca119f9d443620b77f9d6b33703e51011c16baf57afb285fc6", size = 25335 }, +] + +[[package]] +name = "comm" +version = "0.2.3" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/4c/13/7d740c5849255756bc17888787313b61fd38a0a8304fc4f073dfc46122aa/comm-0.2.3.tar.gz", hash = "sha256:2dc8048c10962d55d7ad693be1e7045d891b7ce8d999c97963a5e3e99c055971", size = 6319 } +wheels = [ + { url = "https://files.pythonhosted.org/packages/60/97/891a0971e1e4a8c5d2b20bbe0e524dc04548d2307fee33cdeba148fd4fc7/comm-0.2.3-py3-none-any.whl", hash = "sha256:c615d91d75f7f04f095b30d1c1711babd43bdc6419c1be9886a85f2f4e489417", size = 7294 }, +] + +[[package]] +name = "contourpy" +version = "1.3.2" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "numpy" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/66/54/eb9bfc647b19f2009dd5c7f5ec51c4e6ca831725f1aea7a993034f483147/contourpy-1.3.2.tar.gz", hash = "sha256:b6945942715a034c671b7fc54f9588126b0b8bf23db2696e3ca8328f3ff0ab54", size = 13466130 } +wheels = [ + { url = "https://files.pythonhosted.org/packages/12/a3/da4153ec8fe25d263aa48c1a4cbde7f49b59af86f0b6f7862788c60da737/contourpy-1.3.2-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:ba38e3f9f330af820c4b27ceb4b9c7feee5fe0493ea53a8720f4792667465934", size = 268551 }, + { url = "https://files.pythonhosted.org/packages/2f/6c/330de89ae1087eb622bfca0177d32a7ece50c3ef07b28002de4757d9d875/contourpy-1.3.2-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:dc41ba0714aa2968d1f8674ec97504a8f7e334f48eeacebcaa6256213acb0989", size = 253399 }, + { url = "https://files.pythonhosted.org/packages/c1/bd/20c6726b1b7f81a8bee5271bed5c165f0a8e1f572578a9d27e2ccb763cb2/contourpy-1.3.2-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:9be002b31c558d1ddf1b9b415b162c603405414bacd6932d031c5b5a8b757f0d", size = 312061 }, + { url = "https://files.pythonhosted.org/packages/22/fc/a9665c88f8a2473f823cf1ec601de9e5375050f1958cbb356cdf06ef1ab6/contourpy-1.3.2-cp310-cp310-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:8d2e74acbcba3bfdb6d9d8384cdc4f9260cae86ed9beee8bd5f54fee49a430b9", size = 351956 }, + { url = "https://files.pythonhosted.org/packages/25/eb/9f0a0238f305ad8fb7ef42481020d6e20cf15e46be99a1fcf939546a177e/contourpy-1.3.2-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:e259bced5549ac64410162adc973c5e2fb77f04df4a439d00b478e57a0e65512", size = 320872 }, + { url = "https://files.pythonhosted.org/packages/32/5c/1ee32d1c7956923202f00cf8d2a14a62ed7517bdc0ee1e55301227fc273c/contourpy-1.3.2-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:ad687a04bc802cbe8b9c399c07162a3c35e227e2daccf1668eb1f278cb698631", size = 325027 }, + { url = "https://files.pythonhosted.org/packages/83/bf/9baed89785ba743ef329c2b07fd0611d12bfecbedbdd3eeecf929d8d3b52/contourpy-1.3.2-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:cdd22595308f53ef2f891040ab2b93d79192513ffccbd7fe19be7aa773a5e09f", size = 1306641 }, + { url = "https://files.pythonhosted.org/packages/d4/cc/74e5e83d1e35de2d28bd97033426b450bc4fd96e092a1f7a63dc7369b55d/contourpy-1.3.2-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:b4f54d6a2defe9f257327b0f243612dd051cc43825587520b1bf74a31e2f6ef2", size = 1374075 }, + { url = "https://files.pythonhosted.org/packages/0c/42/17f3b798fd5e033b46a16f8d9fcb39f1aba051307f5ebf441bad1ecf78f8/contourpy-1.3.2-cp310-cp310-win32.whl", hash = "sha256:f939a054192ddc596e031e50bb13b657ce318cf13d264f095ce9db7dc6ae81c0", size = 177534 }, + { url = "https://files.pythonhosted.org/packages/54/ec/5162b8582f2c994721018d0c9ece9dc6ff769d298a8ac6b6a652c307e7df/contourpy-1.3.2-cp310-cp310-win_amd64.whl", hash = "sha256:c440093bbc8fc21c637c03bafcbef95ccd963bc6e0514ad887932c18ca2a759a", size = 221188 }, + { url = "https://files.pythonhosted.org/packages/33/05/b26e3c6ecc05f349ee0013f0bb850a761016d89cec528a98193a48c34033/contourpy-1.3.2-pp310-pypy310_pp73-macosx_10_15_x86_64.whl", hash = "sha256:fd93cc7f3139b6dd7aab2f26a90dde0aa9fc264dbf70f6740d498a70b860b82c", size = 265681 }, + { url = "https://files.pythonhosted.org/packages/2b/25/ac07d6ad12affa7d1ffed11b77417d0a6308170f44ff20fa1d5aa6333f03/contourpy-1.3.2-pp310-pypy310_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:107ba8a6a7eec58bb475329e6d3b95deba9440667c4d62b9b6063942b61d7f16", size = 315101 }, + { url = "https://files.pythonhosted.org/packages/8f/4d/5bb3192bbe9d3f27e3061a6a8e7733c9120e203cb8515767d30973f71030/contourpy-1.3.2-pp310-pypy310_pp73-win_amd64.whl", hash = "sha256:ded1706ed0c1049224531b81128efbd5084598f18d8a2d9efae833edbd2b40ad", size = 220599 }, +] + +[[package]] +name = "coverage" +version = "7.16.2" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/2f/55/d1eaf3e73781174340a00dc1ba2aee8a65f82fadb18e2797b192b6b3925b/coverage-7.16.2.tar.gz", hash = "sha256:ca64d9f1f384f151b9511bec01126072acd2f313439f8ed015a22d8790aab6fa", size = 971999 } +wheels = [ + { url = "https://files.pythonhosted.org/packages/60/72/db17bf5f87568ab524413693385be2eeb03e652ab56c54ea05fa85515675/coverage-7.16.2-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:23219888477edd736b6fcaec1272d47d93b926e999641ffea7e53a1738e70b2b", size = 223670 }, + { url = "https://files.pythonhosted.org/packages/d1/e1/285727a8a74d48de256e8605413ee4cf82301228253ea58e5ab4270138b0/coverage-7.16.2-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:40c0f00899fe6181ae7f434ceb200e51f5ee4b8ed10e3b5f0b605f0cae15da87", size = 224191 }, + { url = "https://files.pythonhosted.org/packages/50/c7/c737b73bac9bf5034f5ff45a4237b7a189d417a4e36751faf5d10c082cbe/coverage-7.16.2-cp310-cp310-manylinux1_i686.manylinux_2_28_i686.manylinux_2_5_i686.whl", hash = "sha256:a4624f80732f6b427ac58f1f59c577a0994a12e8174b5af6a027b4b58795d4c3", size = 250921 }, + { url = "https://files.pythonhosted.org/packages/29/4e/e1d38d27817d91776ca543d01276a67eace3df675a673cac32b12c167d58/coverage-7.16.2-cp310-cp310-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl", hash = "sha256:191803c4996b499fcd78c2ad5e5f767dcc53cb4dc6de6d6a741b443a1821ef02", size = 252751 }, + { url = "https://files.pythonhosted.org/packages/0e/19/14a8e44cbb2ad36ae62aaa03c5eec4a06a7f7df220ea3776af26927acbe2/coverage-7.16.2-cp310-cp310-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:9fd670ac43b709c575aefc25bf52d8a598a3bc5017bddfd0a179152ab06a2deb", size = 254616 }, + { url = "https://files.pythonhosted.org/packages/f9/72/f5bcad0d9a9b450080032344fbff7ec60c1b0e3d38019f7735dee2b69645/coverage-7.16.2-cp310-cp310-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:705e5af11d34647efdc170c7840b6857c81cf74be96419a553f237e68e62cb72", size = 256541 }, + { url = "https://files.pythonhosted.org/packages/ae/9a/8c735234e8abb52bf5d063f98c780fa942e77c4c0225f9fcb9b33effc346/coverage-7.16.2-cp310-cp310-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:8afd9bf35cc6a1f22eb3634808fa8e0b91902459c5721ef2e4461dfe771d7f08", size = 251589 }, + { url = "https://files.pythonhosted.org/packages/35/6a/1bf6d32e55642d6972aa842640e0a8850e612d19ac7d05e2c32fa59dfd34/coverage-7.16.2-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:3f43bac1856ba269b905302778d4df433d6006489a192174ad77ac528e395032", size = 252660 }, + { url = "https://files.pythonhosted.org/packages/53/5b/05b1c0d0e9495cb056155a16066259adc1e935e7411a82a62779bf729975/coverage-7.16.2-cp310-cp310-musllinux_1_2_i686.whl", hash = "sha256:f8475460aa33ee28ac896ab1156d0bb3b6c639f7f8383c2677d3359eb35f8205", size = 250660 }, + { url = "https://files.pythonhosted.org/packages/05/33/5bc3db57fc9c56b4ef055725c38c34faa818a27d17d65e251371f7f0e3a0/coverage-7.16.2-cp310-cp310-musllinux_1_2_ppc64le.whl", hash = "sha256:d6276d78f6fca7d0ac066d5da4165c5acd07829e8305c2cb900b738fb3a75a72", size = 254479 }, + { url = "https://files.pythonhosted.org/packages/f6/0f/4a5de66daef26eb919213f63b84f45d5065ab2df94cd767fc7c1174ac5e2/coverage-7.16.2-cp310-cp310-musllinux_1_2_riscv64.whl", hash = "sha256:736fde09ea39646d11f8e3b76bd3425c075aa4dd45f24891970bb77c14ff20f5", size = 250940 }, + { url = "https://files.pythonhosted.org/packages/57/d3/84cd6a11e707e422194739e9734d947746efa5e5b3358ff2d601f823ee45/coverage-7.16.2-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:c85d54e7e8a2ca932fe8399301af9b8d5907ea2a455ffaff6e7d1208db83b943", size = 251543 }, + { url = "https://files.pythonhosted.org/packages/ab/bc/3d84c2e2a95f38e346ce3730d9f0e53114f4e8aace72e6e51e014afb9992/coverage-7.16.2-cp310-cp310-win32.whl", hash = "sha256:5139009b5efd2194fc168ee9362f0e191ba612ef5d29242f9269c22f9b8f80c7", size = 225732 }, + { url = "https://files.pythonhosted.org/packages/07/86/31f1f3170571a345ab9d8361a7b2f8e0c5698173fbecd1f7149b6e2089ee/coverage-7.16.2-cp310-cp310-win_amd64.whl", hash = "sha256:c3305c38a2fa21a4254f2ace7dd9ef5fc569c9a558b66e7017650b3d637fb95e", size = 226357 }, + { url = "https://files.pythonhosted.org/packages/3f/0c/7a64e1ac90541a8edf50daef0914848011fb057a5bf55284a4811e21939a/coverage-7.16.2-py3-none-any.whl", hash = "sha256:11d28e9123a9156cb405d8d27b44256c9a58fb5decc2073a8f17862057e3aa0f", size = 215754 }, +] + +[package.optional-dependencies] +toml = [ + { name = "tomli" }, +] + +[[package]] +name = "cycler" +version = "0.12.1" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/a9/95/a3dbbb5028f35eafb79008e7522a75244477d2838f38cbb722248dabc2a8/cycler-0.12.1.tar.gz", hash = "sha256:88bb128f02ba341da8ef447245a9e138fae777f6a23943da4540077d3601eb1c", size = 7615 } +wheels = [ + { url = "https://files.pythonhosted.org/packages/e7/05/c19819d5e3d95294a6f5947fb9b9629efb316b96de511b418c53d245aae6/cycler-0.12.1-py3-none-any.whl", hash = "sha256:85cef7cff222d8644161529808465972e51340599459b8ac3ccbac5a854e0d30", size = 8321 }, +] + +[[package]] +name = "debugpy" +version = "1.8.22" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/44/9d/3cb6693342acf96802dba89934a5b8da43c201d764ebd1f2c0514a3d42bd/debugpy-1.8.22.tar.gz", hash = "sha256:e489c7268e1c7b41e13b438d9c533d2a7af73fb59bf8cd30fead8286c1c39c4e", size = 1710877 } +wheels = [ + { url = "https://files.pythonhosted.org/packages/1a/e9/ced401ba1088e1d2b3228dbbcae33e15aa8c08a1368433bedebfa8efcb02/debugpy-1.8.22-cp310-cp310-macosx_15_0_x86_64.whl", hash = "sha256:fa47099176d1d612bef69e9f74658a5687a9f05bd80fb5710f99959bace85735", size = 2128369 }, + { url = "https://files.pythonhosted.org/packages/4f/97/5c8e839a7f73e92cd4a733408bb85bb764e829e52a9fb097f99d6e2cbbc0/debugpy-1.8.22-cp310-cp310-manylinux_2_34_x86_64.whl", hash = "sha256:7bf29e0d8ce80b100d37fb333e1b193b790d962739f3067796c2b03ffdc9afee", size = 3022081 }, + { url = "https://files.pythonhosted.org/packages/11/ed/fbb045d18a8b733a798bb834a03a20cd64f1446206d844b674bb638da6c3/debugpy-1.8.22-cp310-cp310-win32.whl", hash = "sha256:56b877b37ed73f0bf53ba7afc394816ff1eb5d701bae24a24ed9e1ea6f7ce34f", size = 5325298 }, + { url = "https://files.pythonhosted.org/packages/82/7f/633160132b80b424c6816391f239682435c6b77cdd58288d04b3443b9f80/debugpy-1.8.22-cp310-cp310-win_amd64.whl", hash = "sha256:1bd0c6df3c68c0a3f71db8baa3780a953abb65537ec4b3bc6b935ad5b3b3d45c", size = 5353598 }, + { url = "https://files.pythonhosted.org/packages/56/3d/c7dc9f35bc9e22cdb53679f844bee40fd5cff871862f60595869a433400d/debugpy-1.8.22-py2.py3-none-any.whl", hash = "sha256:a9e9d3550e15ca479c59333e90845029190531f0cacfedab3b815a57bd913947", size = 5374857 }, +] + +[[package]] +name = "decorator" +version = "5.3.1" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/60/8b/32f9823da46cde7df2087faa08cd98d01b908f8dcab982cdba9c84e85355/decorator-5.3.1.tar.gz", hash = "sha256:4cbcdd55a6efadb9dbea26b858f4fb3264567b52d69ca0d25b721b553f60ea82", size = 58084 } +wheels = [ + { url = "https://files.pythonhosted.org/packages/05/7f/798705f5296a58ca505d600456748d1be48078eac8a7050d8a98bc9edb89/decorator-5.3.1-py3-none-any.whl", hash = "sha256:f47fe6fdbd2edd623ecfe36875d37aba411624e2670dd395dddae1358689bb3c", size = 10365 }, +] + +[[package]] +name = "dill" +version = "0.4.1" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/81/e1/56027a71e31b02ddc53c7d65b01e68edf64dea2932122fe7746a516f75d5/dill-0.4.1.tar.gz", hash = "sha256:423092df4182177d4d8ba8290c8a5b640c66ab35ec7da59ccfa00f6fa3eea5fa", size = 187315 } +wheels = [ + { url = "https://files.pythonhosted.org/packages/1e/77/dc8c558f7593132cf8fefec57c4f60c83b16941c574ac5f619abb3ae7933/dill-0.4.1-py3-none-any.whl", hash = "sha256:1e1ce33e978ae97fcfcff5638477032b801c46c7c65cf717f95fbc2248f79a9d", size = 120019 }, +] + +[[package]] +name = "docutils" +version = "0.21.2" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/ae/ed/aefcc8cd0ba62a0560c3c18c33925362d46c6075480bfa4df87b28e169a9/docutils-0.21.2.tar.gz", hash = "sha256:3a6b18732edf182daa3cd12775bbb338cf5691468f91eeeb109deff6ebfa986f", size = 2204444 } +wheels = [ + { url = "https://files.pythonhosted.org/packages/8f/d7/9322c609343d929e75e7e5e6255e614fcc67572cfd083959cdef3b7aad79/docutils-0.21.2-py3-none-any.whl", hash = "sha256:dafca5b9e384f0e419294eb4d2ff9fa826435bf15f15b7bd45723e8ad76811b2", size = 587408 }, +] + +[[package]] +name = "exceptiongroup" +version = "1.3.1" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "typing-extensions" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/50/79/66800aadf48771f6b62f7eb014e352e5d06856655206165d775e675a02c9/exceptiongroup-1.3.1.tar.gz", hash = "sha256:8b412432c6055b0b7d14c310000ae93352ed6754f70fa8f7c34141f91c4e3219", size = 30371 } +wheels = [ + { url = "https://files.pythonhosted.org/packages/8a/0e/97c33bf5009bdbac74fd2beace167cab3f978feb69cc36f1ef79360d6c4e/exceptiongroup-1.3.1-py3-none-any.whl", hash = "sha256:a7a39a3bd276781e98394987d3a5701d0c4edffb633bb7a5144577f82c773598", size = 16740 }, +] + +[[package]] +name = "execnet" +version = "2.1.2" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/bf/89/780e11f9588d9e7128a3f87788354c7946a9cbb1401ad38a48c4db9a4f07/execnet-2.1.2.tar.gz", hash = "sha256:63d83bfdd9a23e35b9c6a3261412324f964c2ec8dcd8d3c6916ee9373e0befcd", size = 166622 } +wheels = [ + { url = "https://files.pythonhosted.org/packages/ab/84/02fc1827e8cdded4aa65baef11296a9bbe595c474f0d6d758af082d849fd/execnet-2.1.2-py3-none-any.whl", hash = "sha256:67fba928dd5a544b783f6056f449e5e3931a5c378b128bc18501f7ea79e296ec", size = 40708 }, +] + +[[package]] +name = "executing" +version = "2.3.0" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/52/92/8a611141e42930c0f194f7504063ab87dfe970cf1a5af28e7703df448734/executing-2.3.0.tar.gz", hash = "sha256:15919cb5d667e5cb4e099511971d00d659573fff2dd5c4e6cd8b71636c7858d2", size = 1338003 } +wheels = [ + { url = "https://files.pythonhosted.org/packages/4d/dd/8bc67e7d5ffc1d88aa5af511189dfb76dc4e1e5b808fab186146ef2663e5/executing-2.3.0-py3-none-any.whl", hash = "sha256:736e859c9f8701f11fcf516856f26f562e04776387824b43a35a1dfe21c84122", size = 29393 }, +] + +[[package]] +name = "flask" +version = "3.1.3" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "blinker" }, + { name = "click" }, + { name = "itsdangerous" }, + { name = "jinja2" }, + { name = "markupsafe" }, + { name = "werkzeug" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/26/00/35d85dcce6c57fdc871f3867d465d780f302a175ea360f62533f12b27e2b/flask-3.1.3.tar.gz", hash = "sha256:0ef0e52b8a9cd932855379197dd8f94047b359ca0a78695144304cb45f87c9eb", size = 759004 } +wheels = [ + { url = "https://files.pythonhosted.org/packages/7f/9c/34f6962f9b9e9c71f6e5ed806e0d0ff03c9d1b0b2340088a0cf4bce09b18/flask-3.1.3-py3-none-any.whl", hash = "sha256:f4bcbefc124291925f1a26446da31a5178f9483862233b23c0c96a20701f670c", size = 103424 }, +] + +[[package]] +name = "fonttools" +version = "4.65.0" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/77/51/d63c7e52163ac14393a35bd14bd7c0da95f8f74be5d7cc988092f9965129/fonttools-4.65.0.tar.gz", hash = "sha256:762ba5431358d0dbd4a01982484a1d494fb267e91f974cdcf20b80eab8560f6f", size = 3674467 } +wheels = [ + { url = "https://files.pythonhosted.org/packages/53/d9/1caaa015dd207da7ccd3feba87289997bd88334ea3e74a367cdc7b0e50a3/fonttools-4.65.0-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:93a73af2075036d36d7fbf856779c56a1b3b86ffcdae6abede7596604c42c156", size = 3095449 }, + { url = "https://files.pythonhosted.org/packages/20/d6/988cd9b33ae2d92b15a51d73eb77c991f7a0fe90a7bc74526e9669247789/fonttools-4.65.0-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:c130be2232e3caf8d2b476854ea78421ec1642917ff5ab695284bac31bbb072b", size = 2587697 }, + { url = "https://files.pythonhosted.org/packages/f8/6a/36f465a1c277131f9569f6a56fe99cf135391b4860b9c4f4b23e5b1cd5df/fonttools-4.65.0-cp310-cp310-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:e3944e0bdba42effb71959e43d91b599326b02b59c78310d5675e8a75525e7d8", size = 5313308 }, + { url = "https://files.pythonhosted.org/packages/ee/56/151b5e81d20c63834f48ad37a0cbbbe2f9b248e38f8d10387f0cf5219244/fonttools-4.65.0-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:fb53892b570f7f1f0055e75fc4de32673e32f749c4c8a606b63d5c436650e634", size = 5253649 }, + { url = "https://files.pythonhosted.org/packages/c8/22/6389215da9d4f98623aacdca9479c1030bbd516cb658e893bc54b61098ce/fonttools-4.65.0-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:a6c8d184e523580a7c55d21cde37176a3c91cb539cf06c2aa36ffc634fd75296", size = 5277745 }, + { url = "https://files.pythonhosted.org/packages/89/e3/c1037a1dfb7c8efe6f2a7d1951ebdde40cbbf82e9c5d796fcb03077e4790/fonttools-4.65.0-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:e5ceccaf2e57d83b753a2b5db5d94aa0a8071886d4afebd2d520c9683e6bef0e", size = 5413259 }, + { url = "https://files.pythonhosted.org/packages/44/b9/7dd72330168d39635c329f23a98279393b1e825e42a6db362e09897aad7b/fonttools-4.65.0-cp310-cp310-win32.whl", hash = "sha256:aff640a4fcb021fa83f9879d5bfa115b6931522dae991a24faa75888bd6aeff6", size = 1577124 }, + { url = "https://files.pythonhosted.org/packages/aa/c2/e959385b4626989b25b82b9f4f99e7c3ac68377d6846b376239b6f126966/fonttools-4.65.0-cp310-cp310-win_amd64.whl", hash = "sha256:5c1700a60e4ff23a0425d5a64abf43d092e6b55071354825781faf255904dcb4", size = 1633354 }, + { url = "https://files.pythonhosted.org/packages/e6/35/f894ceb867118c0261d0f69a9bd516b045a3754238f76c88a49513ac7a83/fonttools-4.65.0-py3-none-any.whl", hash = "sha256:3060b8c1fc2329fa20265b7c138614143ea7c1624e26c5c180c76aeb74deae6f", size = 1196441 }, +] + +[[package]] +name = "furo" +version = "2025.12.19" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "accessible-pygments" }, + { name = "beautifulsoup4" }, + { name = "pygments" }, + { name = "sphinx" }, + { name = "sphinx-basic-ng" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/ec/20/5f5ad4da6a5a27c80f2ed2ee9aee3f9e36c66e56e21c00fde467b2f8f88f/furo-2025.12.19.tar.gz", hash = "sha256:188d1f942037d8b37cd3985b955839fea62baa1730087dc29d157677c857e2a7", size = 1661473 } +wheels = [ + { url = "https://files.pythonhosted.org/packages/f4/b2/50e9b292b5cac13e9e81272c7171301abc753a60460d21505b606e15cf21/furo-2025.12.19-py3-none-any.whl", hash = "sha256:bb0ead5309f9500130665a26bee87693c41ce4dbdff864dbfb6b0dae4673d24f", size = 339262 }, +] + +[[package]] +name = "idna" +version = "3.20" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/f5/08/8eea9d4b8302028f3abb2c0813953f7aec26d33b7a8960ed760e65ff29fa/idna-3.20.tar.gz", hash = "sha256:a7db850025b95ded1eae8a46181a1a6c56c92c96f0e2b005d9ff8dc0210cab44", size = 216463 } +wheels = [ + { url = "https://files.pythonhosted.org/packages/58/a2/bb081bab032533a855d44de1d56f8e8426114ff1ba5d1f07a438a0a654f8/idna-3.20-py3-none-any.whl", hash = "sha256:ab7ae7122974553370f0bdb919e1a960b2cd1bc1ef0276416d896db81c14582c", size = 69583 }, +] + +[[package]] +name = "imagesize" +version = "2.0.1" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/fb/5e/513ff06670c84e7b9887c1fdf61b2d42b4f574a831f2f1d2222023049d8a/imagesize-2.0.1.tar.gz", hash = "sha256:b2ba6a4dea487a7ebcd53248d3476aca449d30db12a2dde5e0c5ca9624fd77e5", size = 1883774 } +wheels = [ + { url = "https://files.pythonhosted.org/packages/01/f9/575c8d760eae1fc99651b7cc5efd96ad5379ca4d6b53750b0fb4fe983f34/imagesize-2.0.1-py3-none-any.whl", hash = "sha256:ea0c9a0384df69ed86a943a15cde37d0360b82491b3910dc2215e202e62b5b02", size = 14794 }, +] + +[[package]] +name = "iniconfig" +version = "2.3.1" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/01/e1/2069291243c926a2ff1cd706c7f3eeb9b62144bf60f77c9fb9ff2fb26bd3/iniconfig-2.3.1.tar.gz", hash = "sha256:67f4b9c50da0dedf52af349e7749a80a9057a5031199791b906c3bb3ae878960", size = 21209 } +wheels = [ + { url = "https://files.pythonhosted.org/packages/56/43/4ca9e49d27a1fcf6bece6f6aec0ea46bb9112489b93d4b688fb415457bdb/iniconfig-2.3.1-py3-none-any.whl", hash = "sha256:9121e2c1fdb355232495be3194c8dfe87ccc2d5dee45947b78e68f499790d7a7", size = 7552 }, +] + +[[package]] +name = "interrogate" +version = "1.7.0" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "attrs" }, + { name = "click" }, + { name = "colorama" }, + { name = "py" }, + { name = "tabulate" }, + { name = "tomli" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/8b/22/74f7fcc96280eea46cf2bcbfa1354ac31de0e60a4be6f7966f12cef20893/interrogate-1.7.0.tar.gz", hash = "sha256:a320d6ec644dfd887cc58247a345054fc4d9f981100c45184470068f4b3719b0", size = 159636 } +wheels = [ + { url = "https://files.pythonhosted.org/packages/12/c9/6869a1dcf4aaf309b9543ec070be3ec3adebee7c9bec9af8c230494134b9/interrogate-1.7.0-py3-none-any.whl", hash = "sha256:b13ff4dd8403369670e2efe684066de9fcb868ad9d7f2b4095d8112142dc9d12", size = 46982 }, +] + +[[package]] +name = "ipykernel" +version = "7.3.0" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "appnope", marker = "sys_platform == 'darwin'" }, + { name = "comm" }, + { name = "debugpy" }, + { name = "ipython" }, + { name = "jupyter-client" }, + { name = "jupyter-core" }, + { name = "matplotlib-inline" }, + { name = "nest-asyncio2" }, + { name = "packaging" }, + { name = "psutil" }, + { name = "pyzmq" }, + { name = "tornado" }, + { name = "traitlets" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/3d/c4/e4a38f579de4225a561305666f7541cdabb30075def2aa1ac17bd73c1fb5/ipykernel-7.3.0.tar.gz", hash = "sha256:9acaaaf97d16355166e4085afe9d225bfbdf2b7ef520f9df3be8f2b248275e09", size = 184899 } +wheels = [ + { url = "https://files.pythonhosted.org/packages/3d/02/77b271f5dc58bfbc0b577c877b2365d1ffea2afe66a80c13f2312820348c/ipykernel-7.3.0-py3-none-any.whl", hash = "sha256:897eb64da762549ef610698fca5e9675195ec6ac8ec7f19d81ce1ca20c876057", size = 120583 }, +] + +[[package]] +name = "ipython" +version = "8.39.0" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "colorama", marker = "sys_platform == 'win32'" }, + { name = "decorator" }, + { name = "exceptiongroup" }, + { name = "jedi" }, + { name = "matplotlib-inline" }, + { name = "pexpect", marker = "sys_platform != 'emscripten' and sys_platform != 'win32'" }, + { name = "prompt-toolkit" }, + { name = "pygments" }, + { name = "stack-data" }, + { name = "traitlets" }, + { name = "typing-extensions" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/40/18/f8598d287006885e7136451fdea0755af4ebcbfe342836f24deefaed1164/ipython-8.39.0.tar.gz", hash = "sha256:4110ae96012c379b8b6db898a07e186c40a2a1ef5d57a7fa83166047d9da7624", size = 5513971 } +wheels = [ + { url = "https://files.pythonhosted.org/packages/c0/56/4cc7fc9e9e3f38fd324f24f8afe0ad8bb5fa41283f37f1aaf9de0612c968/ipython-8.39.0-py3-none-any.whl", hash = "sha256:bb3c51c4fa8148ab1dea07a79584d1c854e234ea44aa1283bcb37bc75054651f", size = 831849 }, +] + +[[package]] +name = "isort" +version = "9.0.2" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "mypy-extensions" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/da/cf/068066b8fdab91cd40bcd63e483137908710a3d25a4d3a01b538be45d9d6/isort-9.0.2.tar.gz", hash = "sha256:d2298980ce44350f11d9d24c8150eaef1883431ec203dddbb4e9b5c3ceb54c70", size = 685196 } +wheels = [ + { url = "https://files.pythonhosted.org/packages/58/16/02099475d03310b0a209ca4928bb0779fb273b97c8924a94a32c38cc1eeb/isort-9.0.2-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:b3e81cae981a52f94d5b31a474e1cbb033ea9cc850bc4c922117c0534a1864dd", size = 1070114 }, + { url = "https://files.pythonhosted.org/packages/f1/36/60423264e176965fc0002bbb0a0a8b4ac21d4ee32dfef9a490767d5a7eb4/isort-9.0.2-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:3cd67d39c3501d7227e8b229476da1d8679c03e0af97bd295876cf7070e5b709", size = 1625659 }, + { url = "https://files.pythonhosted.org/packages/20/75/b008785e61ccd53f6964501ef26a65c17ccc1c5ed9676dec6ebd2662cdb1/isort-9.0.2-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:288a320e6d52ba2d3447345390c8a8400591e4033ffbe4ce6bc3e50e5b4818e1", size = 1611889 }, + { url = "https://files.pythonhosted.org/packages/db/a1/da35cd0cf273d560c844f94e92f2b266e23b416edc8dd6b6db0934543863/isort-9.0.2-cp310-cp310-win_amd64.whl", hash = "sha256:67b12d9504e5bc6359bb3bb4493f36cf1093d15477c61c349f52f7d04209fb5d", size = 872900 }, + { url = "https://files.pythonhosted.org/packages/8b/c9/0849e74b868ef10312eecfc24278710e97dd14bc49c1df629d7df142d318/isort-9.0.2-py3-none-any.whl", hash = "sha256:6c29deeb39698a8717823b7f75b2ac58c5e8ab8dcf6cf31205a72a6617fb454e", size = 105052 }, +] + +[[package]] +name = "itsdangerous" +version = "2.2.0" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/9c/cb/8ac0172223afbccb63986cc25049b154ecfb5e85932587206f42317be31d/itsdangerous-2.2.0.tar.gz", hash = "sha256:e0050c0b7da1eea53ffaf149c0cfbb5c6e2e2b69c4bef22c81fa6eb73e5f6173", size = 54410 } +wheels = [ + { url = "https://files.pythonhosted.org/packages/04/96/92447566d16df59b2a776c0fb82dbc4d9e07cd95062562af01e408583fc4/itsdangerous-2.2.0-py3-none-any.whl", hash = "sha256:c6242fc49e35958c8b15141343aa660db5fc54d4f13a1db01a3f5891b98700ef", size = 16234 }, +] + +[[package]] +name = "jedi" +version = "0.20.0" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "parso" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/46/b7/a3635f6a2d7cf5b5dd98064fc1d5fbbafcb25477bcea204a3a92145d158b/jedi-0.20.0.tar.gz", hash = "sha256:c3f4ccbd276696f4b19c54618d4fb18f9fc24b0aef02acf704b23f487daa1011", size = 3119416 } +wheels = [ + { url = "https://files.pythonhosted.org/packages/9a/93/242e2eab5fe682ffcb8b0084bde703a41d51e17ee0f3a31ff0d9d813620a/jedi-0.20.0-py2.py3-none-any.whl", hash = "sha256:7bdd9c2634f56713299976f4cbd59cb3fa92165cc5e05ea811fb253480728b67", size = 4884812 }, +] + +[[package]] +name = "jinja2" +version = "3.1.6" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "markupsafe" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/df/bf/f7da0350254c0ed7c72f3e33cef02e048281fec7ecec5f032d4aac52226b/jinja2-3.1.6.tar.gz", hash = "sha256:0137fb05990d35f1275a587e9aee6d56da821fc83491a0fb838183be43f66d6d", size = 245115 } +wheels = [ + { url = "https://files.pythonhosted.org/packages/62/a1/3d680cbfd5f4b8f15abc1d571870c5fc3e594bb582bc3b64ea099db13e56/jinja2-3.1.6-py3-none-any.whl", hash = "sha256:85ece4451f492d0c13c5dd7c13a64681a86afae63a5f347908daf103ce6d2f67", size = 134899 }, +] + +[[package]] +name = "jupyter-client" +version = "8.10.0" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "jupyter-core" }, + { name = "python-dateutil" }, + { name = "pyzmq" }, + { name = "tornado" }, + { name = "traitlets" }, + { name = "typing-extensions" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/c5/2a/906772148a06e48885039e0250c340b770a55bbf37b08d6ee0449df369c3/jupyter_client-8.10.0.tar.gz", hash = "sha256:9f7116294dca55f1785be880057d44544db9b1567718d92cb33c58886afb9497", size = 360653 } +wheels = [ + { url = "https://files.pythonhosted.org/packages/0f/88/7c548de1f6c2ade7c931a3282da73f9274fa6a1531091be682f89c85efb9/jupyter_client-8.10.0-py3-none-any.whl", hash = "sha256:5f73f24f22fa25192cfff6b23c051932a2473a797b05734aff495b392103e14e", size = 110184 }, +] + +[[package]] +name = "jupyter-core" +version = "5.9.1" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "platformdirs" }, + { name = "traitlets" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/02/49/9d1284d0dc65e2c757b74c6687b6d319b02f822ad039e5c512df9194d9dd/jupyter_core-5.9.1.tar.gz", hash = "sha256:4d09aaff303b9566c3ce657f580bd089ff5c91f5f89cf7d8846c3cdf465b5508", size = 89814 } +wheels = [ + { url = "https://files.pythonhosted.org/packages/e7/e7/80988e32bf6f73919a113473a604f5a8f09094de312b9d52b79c2df7612b/jupyter_core-5.9.1-py3-none-any.whl", hash = "sha256:ebf87fdc6073d142e114c72c9e29a9d7ca03fad818c5d300ce2adc1fb0743407", size = 29032 }, +] + +[[package]] +name = "kiwisolver" +version = "1.5.1" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/ba/07/bd78e6a8fae171ea041ef5bba3ed21a003522fa088834b069b1909981f30/kiwisolver-1.5.1.tar.gz", hash = "sha256:f1303ef2eec81262a4b708c3e858afe58d7c75ad91c1c05266eda7673369859a", size = 104395 } +wheels = [ + { url = "https://files.pythonhosted.org/packages/23/54/1b8d2bc580414cc75b3a5b3d195981a6facacd8a8d986e589d0a3b51a709/kiwisolver-1.5.1-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:1acc7e5b7ef05e9da8bb70cd6c7c4513090213d2e1ad9720f599f0bf6c52aec5", size = 123362 }, + { url = "https://files.pythonhosted.org/packages/57/19/92c30f540dcfff86ff625389427c39b53a9aaea16420ddcc09b2ab8d1073/kiwisolver-1.5.1-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:bad20d4c69c851c982a1e3606f4c293edfd5a87885786c50082412240c4b1ffd", size = 66551 }, + { url = "https://files.pythonhosted.org/packages/30/ae/30b94088722e7bce8b821cd5ee935a87f80023e7243125f1accf98e39bf7/kiwisolver-1.5.1-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:0a4faea5c6db201c6a21391d2ac926ea97acf7dacdbc3c417189e1adb1a00837", size = 64076 }, + { url = "https://files.pythonhosted.org/packages/f1/0e/9f394d693be549fa3fab62498c2778294595991047adc3dcf10aa99b91c0/kiwisolver-1.5.1-cp310-cp310-manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:e05c2f7925f1d88778e53cb44f14e0223204a3bdd09a41664750363acfb1f2ef", size = 1628782 }, + { url = "https://files.pythonhosted.org/packages/64/96/26efc04348c0f332b6e6c471dff132bb8b18b2df494a1b65826601674e62/kiwisolver-1.5.1-cp310-cp310-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:c3a4e41e3096bf1f0f1b76e2ffd6d828d6547f574f702d59bdbef7acfa59db9c", size = 1228112 }, + { url = "https://files.pythonhosted.org/packages/5a/ac/df9ddc19ec972cd97b60b262dd2c4be28c6192b5a779cad429c6657ee680/kiwisolver-1.5.1-cp310-cp310-manylinux_2_24_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:f1d56ec54d257d05e0b50f5780d967540cd07beeaf9e5f645b26d50cce79f4d8", size = 1246756 }, + { url = "https://files.pythonhosted.org/packages/cf/de/c38a246b8a4f4b293c7291aa650917b05c5549b0d532749bc523296e90c4/kiwisolver-1.5.1-cp310-cp310-manylinux_2_24_s390x.manylinux_2_28_s390x.whl", hash = "sha256:8de6f2a4ce7e7bd27d23dd94abf0ccafe0e0e5cc9c764b0577191f2c25f08f26", size = 1295555 }, + { url = "https://files.pythonhosted.org/packages/b6/48/3c95a5232d8b5783050d8c8089b58bf1f57018f9135232d72c5aa6b0c01b/kiwisolver-1.5.1-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:16895f553ee6620a827d2da56b871f835fb70b9216cca5d188e885caf6e3bd23", size = 2179476 }, + { url = "https://files.pythonhosted.org/packages/e6/e9/b9e999336afc561b154e93682f597832bdc7446f2ee18b467c5b0e924867/kiwisolver-1.5.1-cp310-cp310-musllinux_1_2_ppc64le.whl", hash = "sha256:6b92f60017dda7d877fdc546438b5e28f31c523264f49cf5a48c1d0ce1a0dfbc", size = 2275258 }, + { url = "https://files.pythonhosted.org/packages/76/cd/c1c550796ada4a59644b8264b425fe332686d2a086c4729fcc640ececdfe/kiwisolver-1.5.1-cp310-cp310-musllinux_1_2_s390x.whl", hash = "sha256:7824b5e8bdbf0bccb4ccd37bbb115849a1dc45437fb4de8351385ed07c437ee0", size = 2443424 }, + { url = "https://files.pythonhosted.org/packages/b2/d4/30f641eb8e10f6ad5bb9af8a15ec8eea386162a6ef491e68995b8680ef4e/kiwisolver-1.5.1-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:aa7d00b1700966d2917e54d278aba86897890ca9276dd8b76cf6446b6c181b92", size = 2249457 }, + { url = "https://files.pythonhosted.org/packages/1c/d9/211e016f8aa5b5bf496dd3bd7ebab4b73b22d91f025f25e20156a44a77fc/kiwisolver-1.5.1-cp310-cp310-win_amd64.whl", hash = "sha256:96c30002424670b5e1e46495c2b8cbffef39cf77c1d79e76462029d50339785b", size = 70643 }, + { url = "https://files.pythonhosted.org/packages/9e/8e/ae7007266dea1fd93fcc48541042c1f6583958055de3b424a59ec16def25/kiwisolver-1.5.1-cp310-cp310-win_arm64.whl", hash = "sha256:f0f4a42db92d6ec7677ab9d12830a2a8ec145a9c6d15db2b593466bc875c78d7", size = 68215 }, + { url = "https://files.pythonhosted.org/packages/ba/f1/8bae9fac0f1837679ed59a5dd7e97e7eb943b738defa7cc0117ea0d107dc/kiwisolver-1.5.1-pp310-pypy310_pp73-macosx_10_15_x86_64.whl", hash = "sha256:a5716a33bfabb2c6ce27b6cf03253467b3804f83e215f4d202685cf93c6c9874", size = 59543 }, + { url = "https://files.pythonhosted.org/packages/c3/3e/42e3639d32ef3ac6ede80c39dc1d1df6224927409960d8f762b6cb504efe/kiwisolver-1.5.1-pp310-pypy310_pp73-macosx_11_0_arm64.whl", hash = "sha256:685929988b208a911f1285e2f8ed54210b0d681a3dc0f03e00d599d291986e7e", size = 57504 }, + { url = "https://files.pythonhosted.org/packages/e1/12/f4beaaceb740b96c363a8fa6f34dbdf37a58d9e5f15416427d7bf89c552a/kiwisolver-1.5.1-pp310-pypy310_pp73-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:e4e49f7e1a4e7191bdf9dc67a974db714501b1fc52c24324103d06a86abd5c08", size = 79885 }, + { url = "https://files.pythonhosted.org/packages/02/24/18d8a755acdae79c37ca2f1a925795aab67b9456c30c8569c377ea3abc77/kiwisolver-1.5.1-pp310-pypy310_pp73-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:f0a887b6565bbfe80efde2b7f6e8890d7d9bbdb11bdb17028a3690c32fe0621f", size = 77582 }, + { url = "https://files.pythonhosted.org/packages/df/a9/b86dde4f553ef74db0f9c32398614e24b2e8ec1d29a6ca04ae080d7dd29b/kiwisolver-1.5.1-pp310-pypy310_pp73-win_amd64.whl", hash = "sha256:1983f0974a750a6f6556f368ba11105d1d8369c735b944747c9f12ae5aea7aae", size = 98321 }, +] + +[[package]] +name = "librt" +version = "0.16.0" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/04/f5/9dc696772d241814bacac7880bac32f2930b5a6ebc1f85317b83161a011c/librt-0.16.0.tar.gz", hash = "sha256:ac38d6d8d66bf3d744148dbbc0b8e193e195a51e364ed55e224631f5721891fc", size = 219839 } +wheels = [ + { url = "https://files.pythonhosted.org/packages/ec/77/900294b3c9a81415323d81b3f3f271a7f5d7ed9d01e824fc38ffa49470b6/librt-0.16.0-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:96f576f2711f8519152ec76d0e599243555c1f07679fa73606ca8c8c868c0be6", size = 148668 }, + { url = "https://files.pythonhosted.org/packages/55/3b/c301e8cc47758e4518b93e926a0111080155cc79fa03651d202ac2025065/librt-0.16.0-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:2bec3818c7da7c96ceae0ef5915a3d16c52dd08f3ea913bf1fe8568c447c7978", size = 153562 }, + { url = "https://files.pythonhosted.org/packages/62/b1/4d5b98114a58bf17e3832cd33400e40f2582f68c2fb7ce25b4468cb1afd3/librt-0.16.0-cp310-cp310-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:64c79520414a3fdfc6aabd7593e6169afa14d5f8d9908d4b498db068868b08dd", size = 494337 }, + { url = "https://files.pythonhosted.org/packages/88/36/14223c9b0dc38982eb4f399732c8cb27b19c7e027ae0faef5ca51d08d19f/librt-0.16.0-cp310-cp310-manylinux2014_i686.manylinux_2_17_i686.manylinux_2_28_i686.whl", hash = "sha256:f81b5b19ce748ef68d4746656b7929762eb2fe99269b266e4be07e2ee4de7144", size = 485440 }, + { url = "https://files.pythonhosted.org/packages/ec/9e/d7155e6800d0c33e297e529b217649f7361d706491ebf9d2fc0fc627309e/librt-0.16.0-cp310-cp310-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:c71d1b76210a36729fedfc5115069b50a3d8619054745f8758fe5d6f19e86671", size = 498363 }, + { url = "https://files.pythonhosted.org/packages/d3/ce/d5f1fb9f913ac0979d6fc5db9fb9c0bf28cc3470988528957922f15ed40c/librt-0.16.0-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:473eebc7866bb0a0c8849a292b5e7157c1aba5d14d0f0f610c52158d6d964262", size = 515453 }, + { url = "https://files.pythonhosted.org/packages/b4/d4/ca0fca1a27c26080d1a25b2b31f271e532078a5719878c3daca0c3d4c539/librt-0.16.0-cp310-cp310-manylinux_2_34_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:4eb1313a19847089ee81e88742abedf285c60538816640b99742d8534b81d26a", size = 509537 }, + { url = "https://files.pythonhosted.org/packages/ee/c0/26807bf2221a53a2c66f2e23a5c4d57f1c0eaa4afed7cb81d841cf3d1903/librt-0.16.0-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:ebefd60b42e2a82b32d136bb5f7c94eadfcd29f772b547df6f3291d1ed855a1c", size = 532541 }, + { url = "https://files.pythonhosted.org/packages/0e/50/c329d509907e1bc061abeec3796f94d255d43ba25d28c3854d2138ed5ab2/librt-0.16.0-cp310-cp310-musllinux_1_2_i686.whl", hash = "sha256:6c5da27e8056439f927ea896735da60e616c477a8293feaa3233d4e7781a6726", size = 537059 }, + { url = "https://files.pythonhosted.org/packages/84/d6/4571b9c9e65d98e5503734166dce2fd3e216f526dc3c59a3773faa8a60e3/librt-0.16.0-cp310-cp310-musllinux_1_2_ppc64le.whl", hash = "sha256:67e718c7a43f8db325abbbf1404e2d535f12f8f7a1a82259568385cc5274b82a", size = 536614 }, + { url = "https://files.pythonhosted.org/packages/c8/d3/a2ed8a292e4ab7889792a9c3f4ad5d1caf6557afce7f6b452e77f8ed20b7/librt-0.16.0-cp310-cp310-musllinux_1_2_riscv64.whl", hash = "sha256:314e703f0c19320dc8094e7a784b9cf29e1b67402515abf580069a6363c0b4f1", size = 517199 }, + { url = "https://files.pythonhosted.org/packages/9e/24/276e5218b4b7adb6258a42b7403cb1b7cef25616238d0c2152288a9d2f53/librt-0.16.0-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:943c6bbecbdf7fa575a4f2952fcfd848c88ef95507c3fca411e89d4ac3ff8143", size = 558746 }, + { url = "https://files.pythonhosted.org/packages/7c/5c/9156df81a1726e1efc9567379def2b8777a6d56f464d2f1b760bf951b8af/librt-0.16.0-cp310-cp310-win32.whl", hash = "sha256:7cc365f006891afb006b52d5ee5ee74c09306ffa20e2f8705a32a4450af2f3ba", size = 104424 }, + { url = "https://files.pythonhosted.org/packages/0b/62/4fd172cb3f49ab2cf5ef17de519a93cfb935202c1270ba9d44c6a64178c3/librt-0.16.0-cp310-cp310-win_amd64.whl", hash = "sha256:0314058469f4d2fd279ce7c62ac274ac82c3918ef7db62ef0697c4c359370155", size = 124267 }, +] + +[[package]] +name = "line-profiler" +version = "5.0.2" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "tomli" }, + { name = "typing-extensions" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/03/b6/6d18ad201417a9c5168995541d0fd7981b5652b2b34f6e46a3a93c0f1beb/line_profiler-5.0.2.tar.gz", hash = "sha256:8d8a990c84c64bcde45af22af502d17bc0ae107be405ce41bba92af5c39c0000", size = 407075 } +wheels = [ + { url = "https://files.pythonhosted.org/packages/22/9c/d2ba5e1f7da98e3dff9c333dd914c284cd733827987e7ed6a039c7fc008c/line_profiler-5.0.2-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:1ab5d8de6d3c0381b477cc73dde9c36b6c52ba1928d6daba85ac9e790a3f0086", size = 651703 }, + { url = "https://files.pythonhosted.org/packages/1b/20/9f99d89ff0ad56e5e6190262ce16a8b2dad1f23b9dc0bc4da608fd42c16f/line_profiler-5.0.2-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:b45da5408286b5395ccb707d1cb2b5aeeb8828466cd2f62e8ab2d7cfb0e1b38c", size = 508846 }, + { url = "https://files.pythonhosted.org/packages/5a/44/04d4f21dd1ffca9911402a8cc0ded6f9d89dfd5d3f2a0498704502e5b9af/line_profiler-5.0.2-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:f6163a43474584db9da495d00869d51a66fdef3962ec3df76f998b1a89308123", size = 497428 }, + { url = "https://files.pythonhosted.org/packages/bd/61/7e4658db06e3e3c41713bc600fc26e22607b08969d6044dd640ca26613b1/line_profiler-5.0.2-cp310-cp310-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:a7759e9e4688ed1be1e674dee599500ba47f2f2c76f903184df615352bc182a8", size = 1486964 }, + { url = "https://files.pythonhosted.org/packages/03/2e/5507cf3190052906ba9fe77477cf655d446a9c517a41c290050e05cd1fec/line_profiler-5.0.2-cp310-cp310-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:e0f8b3b766bde49ca8c1e26b5ff9013358435106d11bc4838764e117d2bcd3ed", size = 1499663 }, + { url = "https://files.pythonhosted.org/packages/c0/d9/cb19fb7b899f30d2261bb792d8f9d1e0b6ba5b4f3fc94b45136fd412562a/line_profiler-5.0.2-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:42d4bef2ce9f2e2cc6b872034ef4bf2e18ec44f3a8a09bdf91232a74abe4074c", size = 2442445 }, + { url = "https://files.pythonhosted.org/packages/83/5d/9b1d142f41ae23b6da22954ec42c367491bcad356c3507f291c101522e88/line_profiler-5.0.2-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:7dd5942d091541803b38ebc4c9d7f375d43b93e41e811f2449a022fd5b24d283", size = 2525207 }, + { url = "https://files.pythonhosted.org/packages/68/a8/d9ac8429b74b1e30e22e2d51bc5d534864dd276ba856ea8ca32fca1f1198/line_profiler-5.0.2-cp310-cp310-win_amd64.whl", hash = "sha256:c22d1d8ee371e92149b5d9578e78072bcb36435adb62e84bf3bb0c173e14c6f6", size = 479862 }, +] + +[[package]] +name = "markupsafe" +version = "3.0.4" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/38/9b/e422a865e1d5d57d0e509b4e0bf1c1a70a7f6382c29a5aa428df994c8bc8/markupsafe-3.0.4.tar.gz", hash = "sha256:2e9ad7dd851bf45fab9f75cbff4cb493fee9979e8d8c7c9c3ee119022518edd6", size = 153777 } +wheels = [ + { url = "https://files.pythonhosted.org/packages/41/aa/9a65962e364bf19745f6bec7bde398fb1f5ca53ad2e734258e6198cc32ba/markupsafe-3.0.4-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:dd8ea6ebee7aedbf7c749fa80521d9ccf1ba473e0d1e14805caafbaad281c889", size = 11521 }, + { url = "https://files.pythonhosted.org/packages/14/36/927999a34b7d1def6957de89153d327fedc4030061940b5a468584e6c5a8/markupsafe-3.0.4-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:dff05cb7016dff1e9fd68f4122c127b65dfc59de5306cfb7ad92f956f230bee2", size = 12066 }, + { url = "https://files.pythonhosted.org/packages/17/54/69e7b0db9bd687bfd83451eed5666384d67cfed3be062bfc59a06a15474e/markupsafe-3.0.4-cp310-cp310-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:cf63c214fe879a65e69a386f915e36104fc84254ab141240f8854602d8e0be2a", size = 22081 }, + { url = "https://files.pythonhosted.org/packages/bd/14/f6f5c97903f7d2db76bbfaced31509a47d360a103b3aaf4849f6536591ec/markupsafe-3.0.4-cp310-cp310-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:2a6ef68ae94aed8721934072b27a3b654ea2100b97e4ab864cf1489c90926fbc", size = 26079 }, + { url = "https://files.pythonhosted.org/packages/d0/04/c3cc9b75f94f8b54d7e503c44cebd4b4a115ec1d6f1b996b999807daba99/markupsafe-3.0.4-cp310-cp310-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:fd9f8797427910198f95bced71ddfed61130d7e349213bfb8466c9c99e2c46a8", size = 22611 }, + { url = "https://files.pythonhosted.org/packages/00/26/c4708ed3b0f08e8e6d7cbce3314ac130cb5352d1f62951b6fef7878f2b1e/markupsafe-3.0.4-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:d1aca03ede943eb80ab3d63bb082c84b7aab85ea83bd0fd0c200260945fb49d9", size = 20712 }, + { url = "https://files.pythonhosted.org/packages/d9/b9/f3894d6aae3d7a52c9363317f4baf2fcadc052163d6dbc871266e32639ed/markupsafe-3.0.4-cp310-cp310-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:0764a13d34cae40db7bbf3a09b7e9b491bf4603e20b263a7a9d6b8e324975d0a", size = 20742 }, + { url = "https://files.pythonhosted.org/packages/59/7c/8e248ddbfe286ab6bddb462bdac0851cbb1510d2cbbb815a415fcb0511af/markupsafe-3.0.4-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:9388003072b95f2f1e3fd908604194d653ba21330d811961a78b7da1a77e9e36", size = 21560 }, + { url = "https://files.pythonhosted.org/packages/df/26/2353fef7d4bcf2b18e16bad81979fcecff2915156ca6882447917205b8e2/markupsafe-3.0.4-cp310-cp310-musllinux_1_2_armv7l.whl", hash = "sha256:8698d70a8081ee8c090dbb394768b5789a1da8b131b5499f89d071dd3cfaf6be", size = 20973 }, + { url = "https://files.pythonhosted.org/packages/67/6f/a9561d98d9a6ee3494b0b970a1c766e58bab128cc84841d56ec009456dbd/markupsafe-3.0.4-cp310-cp310-musllinux_1_2_ppc64le.whl", hash = "sha256:bf053da3c97a4bc5ecfbb218cdd2983febd91c617be8367d139882aa11e490aa", size = 22036 }, + { url = "https://files.pythonhosted.org/packages/55/83/6217df9192eca95af3ff0cad955c9854a93fa43b288cf7411ae24713eb52/markupsafe-3.0.4-cp310-cp310-musllinux_1_2_riscv64.whl", hash = "sha256:9438a2648b2195980cb2dd8e53ed7b8df91319e2d0b70ae61a9e1d1bc8d3bec9", size = 20314 }, + { url = "https://files.pythonhosted.org/packages/35/7c/9cd8081dae70e17fdab3558121fa618d459c7950c8abd8fc10fc024486d7/markupsafe-3.0.4-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:88d59b473bfb03259722600839af9bbd7fa13a2eb514beefeedb95997882f69a", size = 20780 }, + { url = "https://files.pythonhosted.org/packages/44/37/c5f2f45f4d8f0c24e4af7b9dc711640c888044cbf5f7e2ba2c0bb74cbb55/markupsafe-3.0.4-cp310-cp310-win32.whl", hash = "sha256:4a540e2d3192792fc84eced57bef37851ccb2b41f73291bb17408eea77bcd278", size = 14096 }, + { url = "https://files.pythonhosted.org/packages/50/50/394a1c61c9b9972cb4f76875c332af7109bd39bdad09d3a0ec5327a339dc/markupsafe-3.0.4-cp310-cp310-win_amd64.whl", hash = "sha256:5c22873ad1f0532ba40fa1727f3c0fc1bbbaab6d373d4cbe3f0dc74b2e2521c7", size = 14329 }, + { url = "https://files.pythonhosted.org/packages/d1/9a/86d03d2f32ba41a57baa124a7bcb76d0a6d39b1622e9bd4d550074e8b61a/markupsafe-3.0.4-cp310-cp310-win_arm64.whl", hash = "sha256:3d23795802fc8bd72534836d64489bbf0f67c088959091bdb22e10735a5107bf", size = 14196 }, +] + +[[package]] +name = "matplotlib" +version = "3.10.9" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "contourpy" }, + { name = "cycler" }, + { name = "fonttools" }, + { name = "kiwisolver" }, + { name = "numpy" }, + { name = "packaging" }, + { name = "pillow" }, + { name = "pyparsing" }, + { name = "python-dateutil" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/63/1b/4be5be87d43d327a0cf4de1a56e86f7f84c89312452406cf122efe2839e6/matplotlib-3.10.9.tar.gz", hash = "sha256:fd66508e8c6877d98e586654b608a0456db8d7e8a546eb1e2600efd957302358", size = 34811233 } +wheels = [ + { url = "https://files.pythonhosted.org/packages/18/6f/340b04986e67aac6f66c5145ce68bf72c64bed30f92c8913499a6e6b8f99/matplotlib-3.10.9-cp310-cp310-macosx_10_12_x86_64.whl", hash = "sha256:77210dce9cb8153dffc967efaae990543392563d5a376d4dd8539bebcb0ed217", size = 8296625 }, + { url = "https://files.pythonhosted.org/packages/bb/2f/127081eb83162053ebb9678ceac64220b93a663e0167432566e9c7c82aab/matplotlib-3.10.9-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:1e7698ac9868428e84d2c967424803b2472ff7167d9d6590d4204ed775343c3b", size = 8188790 }, + { url = "https://files.pythonhosted.org/packages/fc/b7/d8bcec2626c35f96972bff656299fef4578113ea6193c8fdad324710410c/matplotlib-3.10.9-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:1aa972116abb4c9d201bf245620b433726cb6856f3bef6a78f776a00f5c92d37", size = 8769389 }, + { url = "https://files.pythonhosted.org/packages/12/49/b78e214a527ea732033b7f4d37f7afb504d74ba9d134bd47938230dfb8b1/matplotlib-3.10.9-cp310-cp310-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:ae2f11957b27ce53497dd4d7b235c4d4f1faf383dfb39d0c5beb833bff883294", size = 9589657 }, + { url = "https://files.pythonhosted.org/packages/5f/15/5246f7b43beae19c74dfee651d58d6cc8112e06f77adb4e88cc04f2e3a23/matplotlib-3.10.9-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:b049278ddce116aaa1c1377ebf58adea909132dfce0281cf7e3a1ea9fc2e2c65", size = 9651983 }, + { url = "https://files.pythonhosted.org/packages/75/77/5acecfe672ba0fa1b8c0454f69ce155d1e6fc5852fa7206bf9afaf767121/matplotlib-3.10.9-cp310-cp310-win_amd64.whl", hash = "sha256:82834c3c292d24d3a8aae77cd2d20019de69d692a34a970e4fdb8d33e2ea3dda", size = 8199701 }, + { url = "https://files.pythonhosted.org/packages/2c/2b/0e92ad0ac446633f928a1563db4aa8add407e1924faf0ded5b95b35afb27/matplotlib-3.10.9-pp310-pypy310_pp73-macosx_10_15_x86_64.whl", hash = "sha256:1872fb212a05b729e649754a72d5da61d03e0554d76e80303b6f83d1d2c0552b", size = 8293058 }, + { url = "https://files.pythonhosted.org/packages/4b/23/74682fd369f5299ceda438fea2a0662e6383b85c9383fb9cdfcf04713e07/matplotlib-3.10.9-pp310-pypy310_pp73-macosx_11_0_arm64.whl", hash = "sha256:985f2238880e2e69093f588f5fe2e46771747febf0649f3cf7f7b7480875317f", size = 8186627 }, + { url = "https://files.pythonhosted.org/packages/ca/e8/368aab88f3c4cd8992800f31abfe0670c3e47540ba20a97e9fdbcde594b3/matplotlib-3.10.9-pp310-pypy310_pp73-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:6640f75af2c6148293caa0a2b39dd806a492dd66c8a8b04035813e33d0fd2585", size = 8764117 }, +] + +[[package]] +name = "matplotlib-inline" +version = "0.2.2" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "traitlets" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/bd/c0/9f7c9a46090390368a4d7bcb76bb87a4a36c421e4c0792cdb53486ffac7a/matplotlib_inline-0.2.2.tar.gz", hash = "sha256:72f3fe8fce36b70d4a5b612f899090cd0401deddc4ea90e1572b9f4bfb058c79", size = 8150 } +wheels = [ + { url = "https://files.pythonhosted.org/packages/41/09/5b161152e2d90f7b87f781c2e1267494aef9c32498df793f73ad0a0a494a/matplotlib_inline-0.2.2-py3-none-any.whl", hash = "sha256:3c821cf1c209f59fb2d2d64abbf5b23b67bcb2210d663f9918dd851c6da1fcf6", size = 9534 }, +] + +[[package]] +name = "mccabe" +version = "0.7.0" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/e7/ff/0ffefdcac38932a54d2b5eed4e0ba8a408f215002cd178ad1df0f2806ff8/mccabe-0.7.0.tar.gz", hash = "sha256:348e0240c33b60bbdf4e523192ef919f28cb2c3d7d5c7794f74009290f236325", size = 9658 } +wheels = [ + { url = "https://files.pythonhosted.org/packages/27/1a/1f68f9ba0c207934b35b86a8ca3aad8395a3d6dd7921c0686e23853ff5a9/mccabe-0.7.0-py2.py3-none-any.whl", hash = "sha256:6c2d30ab6be0e4a46919781807b4f0d834ebdd6c6e3dca0bda5a15f863427b6e", size = 7350 }, +] + +[[package]] +name = "memory-profiler" +version = "0.61.0" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "psutil" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/b2/88/e1907e1ca3488f2d9507ca8b0ae1add7b1cd5d3ca2bc8e5b329382ea2c7b/memory_profiler-0.61.0.tar.gz", hash = "sha256:4e5b73d7864a1d1292fb76a03e82a3e78ef934d06828a698d9dada76da2067b0", size = 35935 } +wheels = [ + { url = "https://files.pythonhosted.org/packages/49/26/aaca612a0634ceede20682e692a6c55e35a94c21ba36b807cc40fe910ae1/memory_profiler-0.61.0-py3-none-any.whl", hash = "sha256:400348e61031e3942ad4d4109d18753b2fb08c2f6fb8290671c5513a34182d84", size = 31803 }, +] + +[[package]] +name = "mypy" +version = "2.4.0" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "ast-serialize" }, + { name = "librt", marker = "platform_python_implementation != 'PyPy'" }, + { name = "mypy-extensions" }, + { name = "pathspec" }, + { name = "tomli" }, + { name = "typing-extensions" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/34/4e/64300736cf0a0373a27b94a91b664ee7382e36f77b0621bae6381da3e180/mypy-2.4.0.tar.gz", hash = "sha256:77bdaebd452f43fcfc4cc3ba94352a3ea537cd01e3f2d0879f48673d2ec00d6e", size = 4064425 } +wheels = [ + { url = "https://files.pythonhosted.org/packages/5c/0a/78c9ac93933e2ecd51d807021f78c03ffe98640f33951a8be159f5fd55bc/mypy-2.4.0-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:ffda5244fd1ad71a1e54405e35f50d09b80c3978efa120f58bd1252ae32c62d2", size = 14408618 }, + { url = "https://files.pythonhosted.org/packages/aa/4f/5f5f4429fd5a4218ce6268164a66afeed75c7e2ce5522a4d163faaa5fe85/mypy-2.4.0-cp310-cp310-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:615b03922d40e186fd1df73156473db0ba525c639bb4fd1cf28e1694879c9b23", size = 14552749 }, + { url = "https://files.pythonhosted.org/packages/54/78/fa1c319cd51db7a6027b46117460d5a361c6bba0c0f0f0670a2dab8ce2a5/mypy-2.4.0-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:13fa24f439c0e48a290a3922fa14ccd22f2762bae99d2142931b3e40a9055080", size = 15505846 }, + { url = "https://files.pythonhosted.org/packages/e2/5a/14c02690776fb04e9fa60b81173cb9ae6315e0745fad3813b303737f2f0c/mypy-2.4.0-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:3adef556a19eb3b630bf86a79c29d7da3d61e541472d0d897ca01b171c0abf8f", size = 15823059 }, + { url = "https://files.pythonhosted.org/packages/76/d8/d29afa819f8cb765018d6e2773e390a41ea4592f75abe417135969646857/mypy-2.4.0-cp310-cp310-win_amd64.whl", hash = "sha256:1dc0f64b0a92ae27a49d2175f0bacfa56e15bdc5b420cf92e0c1f79292219cbb", size = 11312927 }, + { url = "https://files.pythonhosted.org/packages/bc/c8/966dec4d80303855d824e6bf67fe1da812d88adfe4d75e24d8545dab4826/mypy-2.4.0-cp310-cp310-win_arm64.whl", hash = "sha256:4a378fc15fb33e321f04652c166ce73eeb8833a97c3d218132844e938cd93220", size = 10879252 }, + { url = "https://files.pythonhosted.org/packages/81/12/46ae8670c98a3cd0286ca5645c2f918f8f6be65edfed81b916010619f668/mypy-2.4.0-py3-none-any.whl", hash = "sha256:d01c5d26a352acc6d5cf3128225477e1e8465e8d3029d4c345807fbf7f3cf093", size = 2800734 }, +] + +[[package]] +name = "mypy-extensions" +version = "1.1.0" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/a2/6e/371856a3fb9d31ca8dac321cda606860fa4548858c0cc45d9d1d4ca2628b/mypy_extensions-1.1.0.tar.gz", hash = "sha256:52e68efc3284861e772bbcd66823fde5ae21fd2fdb51c62a211403730b916558", size = 6343 } +wheels = [ + { url = "https://files.pythonhosted.org/packages/79/7b/2c79738432f5c924bef5071f933bcc9efd0473bac3b4aa584a6f7c1c8df8/mypy_extensions-1.1.0-py3-none-any.whl", hash = "sha256:1be4cccdb0f2482337c4743e60421de3a356cd97508abadd57d47403e94f5505", size = 4963 }, +] + +[[package]] +name = "narwhals" +version = "2.27.1" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/bf/21/f64d6b2dbea7bf3f8c38cdc786dcc6ef012ca3d173ad208c782c9a7bedf6/narwhals-2.27.1.tar.gz", hash = "sha256:aed93076a3ea42d9c32c88e4eb5ea422a21937011cbe1f480f9572a523c82094", size = 735013 } +wheels = [ + { url = "https://files.pythonhosted.org/packages/d1/89/5d4c86da1130d9059681e5b6cd7645df5c10279a6a079c5c37dcb2cc6f3f/narwhals-2.27.1-py3-none-any.whl", hash = "sha256:d057df13f5852b8e157596e82eb5e955fad267425df5e420e0ee9863da483b31", size = 483211 }, +] + +[[package]] +name = "nest-asyncio2" +version = "1.7.4" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/32/2c/70e3b6bb2189cfd260280b7e1042bd622949a258663f95e887fada4ac1e6/nest_asyncio2-1.7.4.tar.gz", hash = "sha256:995b1409d926ec55e0876ea39a69bffdd8852cf1db3652c177e8c8ffdbcaf3cc", size = 16891 } +wheels = [ + { url = "https://files.pythonhosted.org/packages/09/ed/559d2915dce85794bc0c36064043da170da50cd98746dcbddd85d5932017/nest_asyncio2-1.7.4-py3-none-any.whl", hash = "sha256:86e77b52c3d1496b294af3c944b44213b9b82a12a5ee590c0acc4ca4692ef6c7", size = 8543 }, +] + +[[package]] +name = "numpy" +version = "2.2.6" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/76/21/7d2a95e4bba9dc13d043ee156a356c0a8f0c6309dff6b21b4d71a073b8a8/numpy-2.2.6.tar.gz", hash = "sha256:e29554e2bef54a90aa5cc07da6ce955accb83f21ab5de01a62c8478897b264fd", size = 20276440 } +wheels = [ + { url = "https://files.pythonhosted.org/packages/9a/3e/ed6db5be21ce87955c0cbd3009f2803f59fa08df21b5df06862e2d8e2bdd/numpy-2.2.6-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:b412caa66f72040e6d268491a59f2c43bf03eb6c96dd8f0307829feb7fa2b6fb", size = 21165245 }, + { url = "https://files.pythonhosted.org/packages/22/c2/4b9221495b2a132cc9d2eb862e21d42a009f5a60e45fc44b00118c174bff/numpy-2.2.6-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:8e41fd67c52b86603a91c1a505ebaef50b3314de0213461c7a6e99c9a3beff90", size = 14360048 }, + { url = "https://files.pythonhosted.org/packages/fd/77/dc2fcfc66943c6410e2bf598062f5959372735ffda175b39906d54f02349/numpy-2.2.6-cp310-cp310-macosx_14_0_arm64.whl", hash = "sha256:37e990a01ae6ec7fe7fa1c26c55ecb672dd98b19c3d0e1d1f326fa13cb38d163", size = 5340542 }, + { url = "https://files.pythonhosted.org/packages/7a/4f/1cb5fdc353a5f5cc7feb692db9b8ec2c3d6405453f982435efc52561df58/numpy-2.2.6-cp310-cp310-macosx_14_0_x86_64.whl", hash = "sha256:5a6429d4be8ca66d889b7cf70f536a397dc45ba6faeb5f8c5427935d9592e9cf", size = 6878301 }, + { url = "https://files.pythonhosted.org/packages/eb/17/96a3acd228cec142fcb8723bd3cc39c2a474f7dcf0a5d16731980bcafa95/numpy-2.2.6-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:efd28d4e9cd7d7a8d39074a4d44c63eda73401580c5c76acda2ce969e0a38e83", size = 14297320 }, + { url = "https://files.pythonhosted.org/packages/b4/63/3de6a34ad7ad6646ac7d2f55ebc6ad439dbbf9c4370017c50cf403fb19b5/numpy-2.2.6-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:fc7b73d02efb0e18c000e9ad8b83480dfcd5dfd11065997ed4c6747470ae8915", size = 16801050 }, + { url = "https://files.pythonhosted.org/packages/07/b6/89d837eddef52b3d0cec5c6ba0456c1bf1b9ef6a6672fc2b7873c3ec4e2e/numpy-2.2.6-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:74d4531beb257d2c3f4b261bfb0fc09e0f9ebb8842d82a7b4209415896adc680", size = 15807034 }, + { url = "https://files.pythonhosted.org/packages/01/c8/dc6ae86e3c61cfec1f178e5c9f7858584049b6093f843bca541f94120920/numpy-2.2.6-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:8fc377d995680230e83241d8a96def29f204b5782f371c532579b4f20607a289", size = 18614185 }, + { url = "https://files.pythonhosted.org/packages/5b/c5/0064b1b7e7c89137b471ccec1fd2282fceaae0ab3a9550f2568782d80357/numpy-2.2.6-cp310-cp310-win32.whl", hash = "sha256:b093dd74e50a8cba3e873868d9e93a85b78e0daf2e98c6797566ad8044e8363d", size = 6527149 }, + { url = "https://files.pythonhosted.org/packages/a3/dd/4b822569d6b96c39d1215dbae0582fd99954dcbcf0c1a13c61783feaca3f/numpy-2.2.6-cp310-cp310-win_amd64.whl", hash = "sha256:f0fd6321b839904e15c46e0d257fdd101dd7f530fe03fd6359c1ea63738703f3", size = 12904620 }, + { url = "https://files.pythonhosted.org/packages/9e/3b/d94a75f4dbf1ef5d321523ecac21ef23a3cd2ac8b78ae2aac40873590229/numpy-2.2.6-pp310-pypy310_pp73-macosx_10_15_x86_64.whl", hash = "sha256:0b605b275d7bd0c640cad4e5d30fa701a8d59302e127e5f79138ad62762c3e3d", size = 21040391 }, + { url = "https://files.pythonhosted.org/packages/17/f4/09b2fa1b58f0fb4f7c7963a1649c64c4d315752240377ed74d9cd878f7b5/numpy-2.2.6-pp310-pypy310_pp73-macosx_14_0_x86_64.whl", hash = "sha256:7befc596a7dc9da8a337f79802ee8adb30a552a94f792b9c9d18c840055907db", size = 6786754 }, + { url = "https://files.pythonhosted.org/packages/af/30/feba75f143bdc868a1cc3f44ccfa6c4b9ec522b36458e738cd00f67b573f/numpy-2.2.6-pp310-pypy310_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:ce47521a4754c8f4593837384bd3424880629f718d87c5d44f8ed763edd63543", size = 16643476 }, + { url = "https://files.pythonhosted.org/packages/37/48/ac2a9584402fb6c0cd5b5d1a91dcf176b15760130dd386bbafdbfe3640bf/numpy-2.2.6-pp310-pypy310_pp73-win_amd64.whl", hash = "sha256:d042d24c90c41b54fd506da306759e06e568864df8ec17ccc17e9e884634fd00", size = 12812666 }, +] + +[[package]] +name = "packaging" +version = "26.3" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/7d/fa/3944b40b07da9ce895c0e6303a5ab7d53da063554f534556b134a54d6093/packaging-26.3.tar.gz", hash = "sha256:94edc256424af38762eb31306eed28beb9f0efc50a8837492c9d6fd6004aed79", size = 313412 } +wheels = [ + { url = "https://files.pythonhosted.org/packages/63/34/ba1c580383c9eada3711951fef0795c80b829a078d72188184bcab9dd527/packaging-26.3-py3-none-any.whl", hash = "sha256:d7193f7c8e4e93f444fde0262bf90af30e16fa0ad0ad44cb553c87339b23cd1c", size = 129956 }, +] + +[[package]] +name = "pandas" +version = "2.3.3" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "numpy" }, + { name = "python-dateutil" }, + { name = "pytz" }, + { name = "tzdata" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/33/01/d40b85317f86cf08d853a4f495195c73815fdf205eef3993821720274518/pandas-2.3.3.tar.gz", hash = "sha256:e05e1af93b977f7eafa636d043f9f94c7ee3ac81af99c13508215942e64c993b", size = 4495223 } +wheels = [ + { url = "https://files.pythonhosted.org/packages/3d/f7/f425a00df4fcc22b292c6895c6831c0c8ae1d9fac1e024d16f98a9ce8749/pandas-2.3.3-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:376c6446ae31770764215a6c937f72d917f214b43560603cd60da6408f183b6c", size = 11555763 }, + { url = "https://files.pythonhosted.org/packages/13/4f/66d99628ff8ce7857aca52fed8f0066ce209f96be2fede6cef9f84e8d04f/pandas-2.3.3-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:e19d192383eab2f4ceb30b412b22ea30690c9e618f78870357ae1d682912015a", size = 10801217 }, + { url = "https://files.pythonhosted.org/packages/1d/03/3fc4a529a7710f890a239cc496fc6d50ad4a0995657dccc1d64695adb9f4/pandas-2.3.3-cp310-cp310-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:5caf26f64126b6c7aec964f74266f435afef1c1b13da3b0636c7518a1fa3e2b1", size = 12148791 }, + { url = "https://files.pythonhosted.org/packages/40/a8/4dac1f8f8235e5d25b9955d02ff6f29396191d4e665d71122c3722ca83c5/pandas-2.3.3-cp310-cp310-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:dd7478f1463441ae4ca7308a70e90b33470fa593429f9d4c578dd00d1fa78838", size = 12769373 }, + { url = "https://files.pythonhosted.org/packages/df/91/82cc5169b6b25440a7fc0ef3a694582418d875c8e3ebf796a6d6470aa578/pandas-2.3.3-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:4793891684806ae50d1288c9bae9330293ab4e083ccd1c5e383c34549c6e4250", size = 13200444 }, + { url = "https://files.pythonhosted.org/packages/10/ae/89b3283800ab58f7af2952704078555fa60c807fff764395bb57ea0b0dbd/pandas-2.3.3-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:28083c648d9a99a5dd035ec125d42439c6c1c525098c58af0fc38dd1a7a1b3d4", size = 13858459 }, + { url = "https://files.pythonhosted.org/packages/85/72/530900610650f54a35a19476eca5104f38555afccda1aa11a92ee14cb21d/pandas-2.3.3-cp310-cp310-win_amd64.whl", hash = "sha256:503cf027cf9940d2ceaa1a93cfb5f8c8c7e6e90720a2850378f0b3f3b1e06826", size = 11346086 }, +] + +[[package]] +name = "parso" +version = "0.8.7" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/30/4b/90c937815137d43ce71ba043cd3566221e9df6b9c805f24b5d138c9d40a7/parso-0.8.7.tar.gz", hash = "sha256:eaaac4c9fdd5e9e8852dc778d2d7405897ec510f2a298071453e5e3a07914bb1", size = 401824 } +wheels = [ + { url = "https://files.pythonhosted.org/packages/99/5d/8268b644392ee874ee82a635cd0df1773de230bde356c38de28e298392cc/parso-0.8.7-py2.py3-none-any.whl", hash = "sha256:a8926eb2a1b915486941fdbd31e86a4baf88fe8c210f25f2f35ecec5b574ca1c", size = 107025 }, +] + +[[package]] +name = "pathspec" +version = "1.1.1" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/5a/82/42f767fc1c1143d6fd36efb827202a2d997a375e160a71eb2888a925aac1/pathspec-1.1.1.tar.gz", hash = "sha256:17db5ecd524104a120e173814c90367a96a98d07c45b2e10c2f3919fff91bf5a", size = 135180 } +wheels = [ + { url = "https://files.pythonhosted.org/packages/f1/d9/7fb5aa316bc299258e68c73ba3bddbc499654a07f151cba08f6153988714/pathspec-1.1.1-py3-none-any.whl", hash = "sha256:a00ce642f577bf7f473932318056212bc4f8bfdf53128c78bbd5af0b9b20b189", size = 57328 }, +] + +[[package]] +name = "pexpect" +version = "4.9.0" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "ptyprocess" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/42/92/cc564bf6381ff43ce1f4d06852fc19a2f11d180f23dc32d9588bee2f149d/pexpect-4.9.0.tar.gz", hash = "sha256:ee7d41123f3c9911050ea2c2dac107568dc43b2d3b0c7557a33212c398ead30f", size = 166450 } +wheels = [ + { url = "https://files.pythonhosted.org/packages/9e/c3/059298687310d527a58bb01f3b1965787ee3b40dce76752eda8b44e9a2c5/pexpect-4.9.0-py2.py3-none-any.whl", hash = "sha256:7236d1e080e4936be2dc3e326cec0af72acf9212a7e1d060210e70a47e253523", size = 63772 }, +] + +[[package]] +name = "pillow" +version = "12.3.0" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/1c/3d/bb7fca845737cf9d7dbde16ed1843984665ff2e0a518f5db43e77ec540b9/pillow-12.3.0.tar.gz", hash = "sha256:3b8182a766685eaa002637e28b4ec8d6b18819a0c71f579bf0dbaa5830297cce", size = 47025035 } +wheels = [ + { url = "https://files.pythonhosted.org/packages/25/c2/669d88644cddb1485bd9534e63e8cf476c8e51cb3c3a1297677023505c0e/pillow-12.3.0-cp310-cp310-macosx_10_10_x86_64.whl", hash = "sha256:6c0016e7b354317c4e9e525b937ac8596c38d2d232b419529b9cd7a1cd46e39a", size = 5392418 }, + { url = "https://files.pythonhosted.org/packages/6b/ba/3762f376a2948e3036488d773a146e0ae6ecc2ca03ac20e2615bd0b2ba02/pillow-12.3.0-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:bcc33feacfaefce60c12fd500a277533bdc02b10a19f7f6d348763d8140bbba7", size = 4785287 }, + { url = "https://files.pythonhosted.org/packages/07/50/b5d688cc9c52d4482f3d5bcab6ce20bc2a74a85d2343841c907444a3be2c/pillow-12.3.0-cp310-cp310-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:5594fc43d548a7ed94949d139aa1341b270f1863f11cfd37f5a6c8b778a6b67f", size = 6253754 }, + { url = "https://files.pythonhosted.org/packages/4e/89/36f4cd76cf4baf05c50ababb976249153f18c959171c7f6ba09a6f217260/pillow-12.3.0-cp310-cp310-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:f0606c8bf2cdefea14a43530f7657cbbb7ecf1c4222512492ef4a4434a9501ec", size = 6925605 }, + { url = "https://files.pythonhosted.org/packages/eb/c0/4de58cf6633b9e3a6061ef4be6fb91fc3c90b812ece886f531e3c523d777/pillow-12.3.0-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:85f998ea1848bc6757289e739cfbdda3a04adfd58b02fc018ce54d754a5ce468", size = 6327788 }, + { url = "https://files.pythonhosted.org/packages/87/3c/14d53682a19550dbbaf3b598f807d5457646c510805a44c7d7891cd1cd1a/pillow-12.3.0-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:25b9b82bb22e6e2b3cd07b39c68b7b862001226cb3dff7130d1cb914121b39ed", size = 7036288 }, + { url = "https://files.pythonhosted.org/packages/38/1d/36279e3c77efe034e4cc2b0393ee74ffdb5a62391dacbf9b916154f5f0b8/pillow-12.3.0-cp310-cp310-win32.whl", hash = "sha256:37dc8f7bbb66efe481bb60defacef820c950c24713fb44962ed6aa2a50966de1", size = 6472396 }, + { url = "https://files.pythonhosted.org/packages/48/7c/8fa0039574c476d7c6fa57dd7c32a130436877c6ec1e5ce1cc8ec44878c1/pillow-12.3.0-cp310-cp310-win_amd64.whl", hash = "sha256:300557495eb45ebb8aec96c2da9c4be642fbf7cd937278b4013ba894ea8eb0eb", size = 7226887 }, + { url = "https://files.pythonhosted.org/packages/fa/17/e324be141d173c1c919428066c3259f21c1b8982e564e01a4a81e96dbdcf/pillow-12.3.0-cp310-cp310-win_arm64.whl", hash = "sha256:514435a37670e3e5e08f3945b68718b6ed329bb84367777e16f9f4dfe1e61a0f", size = 2568039 }, +] + +[[package]] +name = "platformdirs" +version = "4.12.4" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/90/a1/d5f9002a70298c64a789779077d8dd90c10aa1f47fe40c86802df874f2a6/platformdirs-4.12.4.tar.gz", hash = "sha256:63743c02414e755de4e31b8f68125c1407495b86c5a006e203c01ff8b9924250", size = 60010 } +wheels = [ + { url = "https://files.pythonhosted.org/packages/f4/ba/223e00b885e960edd5d4b4d178c88acce019bd5b83786093681b8c393492/platformdirs-4.12.4-py3-none-any.whl", hash = "sha256:78bfb9db2a8471ed7eebe3c3c932da413911042994e699b384fbb4493fa872d7", size = 32596 }, +] + +[[package]] +name = "plotly" +version = "7.1.0" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "narwhals" }, + { name = "packaging" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/49/c3/72b369f5ed7701b04ab0ea3dcf83e9bbce71c0b3bc6f07f87568550d09ea/plotly-7.1.0.tar.gz", hash = "sha256:f860166a4a3d78c69cb1f4a15f28a5c8283eade98a282a698f3bb853a449ace5", size = 6689315 } +wheels = [ + { url = "https://files.pythonhosted.org/packages/e5/7d/905a3a3d51087515719058c94cfbda2ff0fc14417c20d557ae3e82d8b250/plotly-7.1.0-py3-none-any.whl", hash = "sha256:dbb7fa18afce40d0a8e80d1bf162eceb3faa0ce5a77fe741ad09a74cf78f53f3", size = 9692368 }, +] + +[[package]] +name = "pluggy" +version = "1.6.0" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/f9/e2/3e91f31a7d2b083fe6ef3fa267035b518369d9511ffab804f839851d2779/pluggy-1.6.0.tar.gz", hash = "sha256:7dcc130b76258d33b90f61b658791dede3486c3e6bfb003ee5c9bfb396dd22f3", size = 69412 } +wheels = [ + { url = "https://files.pythonhosted.org/packages/54/20/4d324d65cc6d9205fabedc306948156824eb9f0ee1633355a8f7ec5c66bf/pluggy-1.6.0-py3-none-any.whl", hash = "sha256:e920276dd6813095e9377c0bc5566d94c932c33b27a3e3945d8389c374dd4746", size = 20538 }, +] + +[[package]] +name = "pockets" +version = "0.9.1" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "six" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/df/8e/0601097cfcce2e8c2297db5080e9719f549c2bd4b94420ddc8d3f848bbca/pockets-0.9.1.tar.gz", hash = "sha256:9320f1a3c6f7a9133fe3b571f283bcf3353cd70249025ae8d618e40e9f7e92b3", size = 24993 } +wheels = [ + { url = "https://files.pythonhosted.org/packages/e9/2f/a4583c70fbd8cd04910e2884bcc2bdd670e884061f7b4d70bc13e632a993/pockets-0.9.1-py2.py3-none-any.whl", hash = "sha256:68597934193c08a08eb2bf6a1d85593f627c22f9b065cc727a4f03f669d96d86", size = 26263 }, +] + +[[package]] +name = "prompt-toolkit" +version = "3.0.53" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "wcwidth" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/7d/ea/39b988c938f75cb75d7045b5c69f8bfed47ee2152c8837fb403de29d6fb8/prompt_toolkit-3.0.53.tar.gz", hash = "sha256:9ec8a0ad96d5c56148b3f914aa79c1564c3fde5d2e6b876e7bc327e353cf8fa6", size = 435492 } +wheels = [ + { url = "https://files.pythonhosted.org/packages/54/6f/84908cad2d6aa5144abcf7b42709fe4fdb459bc640ec7ac5786e7693dabc/prompt_toolkit-3.0.53-py3-none-any.whl", hash = "sha256:01c0891d7f9237d5e339f7d3e42cdae80b7534abb1c7c0e3352efba6231492f2", size = 392288 }, +] + +[[package]] +name = "psutil" +version = "7.2.2" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/aa/c6/d1ddf4abb55e93cebc4f2ed8b5d6dbad109ecb8d63748dd2b20ab5e57ebe/psutil-7.2.2.tar.gz", hash = "sha256:0746f5f8d406af344fd547f1c8daa5f5c33dbc293bb8d6a16d80b4bb88f59372", size = 493740 } +wheels = [ + { url = "https://files.pythonhosted.org/packages/e7/36/5ee6e05c9bd427237b11b3937ad82bb8ad2752d72c6969314590dd0c2f6e/psutil-7.2.2-cp36-abi3-macosx_10_9_x86_64.whl", hash = "sha256:ed0cace939114f62738d808fdcecd4c869222507e266e574799e9c0faa17d486", size = 129090 }, + { url = "https://files.pythonhosted.org/packages/80/c4/f5af4c1ca8c1eeb2e92ccca14ce8effdeec651d5ab6053c589b074eda6e1/psutil-7.2.2-cp36-abi3-macosx_11_0_arm64.whl", hash = "sha256:1a7b04c10f32cc88ab39cbf606e117fd74721c831c98a27dc04578deb0c16979", size = 129859 }, + { url = "https://files.pythonhosted.org/packages/b5/70/5d8df3b09e25bce090399cf48e452d25c935ab72dad19406c77f4e828045/psutil-7.2.2-cp36-abi3-manylinux2010_x86_64.manylinux_2_12_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:076a2d2f923fd4821644f5ba89f059523da90dc9014e85f8e45a5774ca5bc6f9", size = 155560 }, + { url = "https://files.pythonhosted.org/packages/63/65/37648c0c158dc222aba51c089eb3bdfa238e621674dc42d48706e639204f/psutil-7.2.2-cp36-abi3-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:b0726cecd84f9474419d67252add4ac0cd9811b04d61123054b9fb6f57df6e9e", size = 156997 }, + { url = "https://files.pythonhosted.org/packages/8e/13/125093eadae863ce03c6ffdbae9929430d116a246ef69866dad94da3bfbc/psutil-7.2.2-cp36-abi3-musllinux_1_2_aarch64.whl", hash = "sha256:fd04ef36b4a6d599bbdb225dd1d3f51e00105f6d48a28f006da7f9822f2606d8", size = 148972 }, + { url = "https://files.pythonhosted.org/packages/04/78/0acd37ca84ce3ddffaa92ef0f571e073faa6d8ff1f0559ab1272188ea2be/psutil-7.2.2-cp36-abi3-musllinux_1_2_x86_64.whl", hash = "sha256:b58fabe35e80b264a4e3bb23e6b96f9e45a3df7fb7eed419ac0e5947c61e47cc", size = 148266 }, + { url = "https://files.pythonhosted.org/packages/b4/90/e2159492b5426be0c1fef7acba807a03511f97c5f86b3caeda6ad92351a7/psutil-7.2.2-cp37-abi3-win_amd64.whl", hash = "sha256:eb7e81434c8d223ec4a219b5fc1c47d0417b12be7ea866e24fb5ad6e84b3d988", size = 137737 }, + { url = "https://files.pythonhosted.org/packages/8c/c7/7bb2e321574b10df20cbde462a94e2b71d05f9bbda251ef27d104668306a/psutil-7.2.2-cp37-abi3-win_arm64.whl", hash = "sha256:8c233660f575a5a89e6d4cb65d9f938126312bca76d8fe087b947b3a1aaac9ee", size = 134617 }, +] + +[[package]] +name = "ptyprocess" +version = "0.7.0" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/20/e5/16ff212c1e452235a90aeb09066144d0c5a6a8c0834397e03f5224495c4e/ptyprocess-0.7.0.tar.gz", hash = "sha256:5c5d0a3b48ceee0b48485e0c26037c0acd7d29765ca3fbb5cb3831d347423220", size = 70762 } +wheels = [ + { url = "https://files.pythonhosted.org/packages/22/a6/858897256d0deac81a172289110f31629fc4cee19b6f01283303e18c8db3/ptyprocess-0.7.0-py2.py3-none-any.whl", hash = "sha256:4b41f3967fce3af57cc7e94b888626c18bf37a083e3651ca8feeb66d492fef35", size = 13993 }, +] + +[[package]] +name = "pure-eval" +version = "0.2.4" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/da/9f/abfd2959e9261dd5217ca8551d4de211ca6ab26fe9b72cf44731ff6c4442/pure_eval-0.2.4.tar.gz", hash = "sha256:260c2774686e651b79f8b8e7fc9d80b3599ea6a66334b47d5f4abb69fc2c0ea1", size = 20563 } +wheels = [ + { url = "https://files.pythonhosted.org/packages/6d/18/83376915176eb058cb86470eb7396388a13350b09a8f233a79303bbcbc5b/pure_eval-0.2.4-py3-none-any.whl", hash = "sha256:96cae060a313cfaad51bb761278bfb0e62dc0248d9315a81173752dc546cd37a", size = 11893 }, +] + +[[package]] +name = "py" +version = "1.11.0" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/98/ff/fec109ceb715d2a6b4c4a85a61af3b40c723a961e8828319fbcb15b868dc/py-1.11.0.tar.gz", hash = "sha256:51c75c4126074b472f746a24399ad32f6053d1b34b68d2fa41e558e6f4a98719", size = 207796 } +wheels = [ + { url = "https://files.pythonhosted.org/packages/f6/f0/10642828a8dfb741e5f3fbaac830550a518a775c7fff6f04a007259b0548/py-1.11.0-py2.py3-none-any.whl", hash = "sha256:607c53218732647dff4acdfcd50cb62615cedf612e72d1724fb1a0cc6405b378", size = 98708 }, +] + +[[package]] +name = "py-cpuinfo2" +version = "10.1.1" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/dc/97/a8b1ddada14c8280a047c0746f95cb05d94a31b1a331cea22bcdc2b2a82d/py_cpuinfo2-10.1.1.tar.gz", hash = "sha256:7861133863663f16e06eca63b12904ef100b5760415e92372dac0162799a4771", size = 100840 } +wheels = [ + { url = "https://files.pythonhosted.org/packages/23/0a/ba69d2dde1ae12ef1d389ea5a216384c5ff6ef7a1e7a48d1e9b6686f6790/py_cpuinfo2-10.1.1-py3-none-any.whl", hash = "sha256:adc53396bfb206e6498d078ec2ab407f85799ecd819584ac36a8f80a2d4d762d", size = 23791 }, +] + +[[package]] +name = "pycparser" +version = "3.11" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/da/a8/c5fdbeee588bb8ada9458774f43adf1bdd30bd59157055142183e769a024/pycparser-3.11.tar.gz", hash = "sha256:d875f09c3507d00e1aba0eecc6dcadc1352f30fff09dc6bff2f1c2935e97c2bc", size = 113796 } +wheels = [ + { url = "https://files.pythonhosted.org/packages/90/11/0e6f11117525ff0eec40ebac3d313376f102df93ca44ad9e893ee85e4f89/pycparser-3.11-py3-none-any.whl", hash = "sha256:51d5a8ba2be0bbe440b99d2112604c95bbbc3c2748a64260186c541e1729cd80", size = 51178 }, +] + +[[package]] +name = "pydata-sphinx-theme" +version = "0.19.0" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "accessible-pygments" }, + { name = "babel" }, + { name = "beautifulsoup4" }, + { name = "docutils" }, + { name = "pygments" }, + { name = "sphinx" }, + { name = "typing-extensions" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/39/7e/e3defb93f30557ae825a3b3fbc2c6728301e5e9505a85e00d8503345c42c/pydata_sphinx_theme-0.19.0.tar.gz", hash = "sha256:148ba092bd6937b3321385dc482cc69a29ad2ede36547b4f010ade782bc6a062", size = 5004933 } +wheels = [ + { url = "https://files.pythonhosted.org/packages/54/77/bdb5a4c0e8e33c08f31fd175a5af0bc5e29f1b43ffa9e963f4c4f9bfbc97/pydata_sphinx_theme-0.19.0-py3-none-any.whl", hash = "sha256:5d7dfe3beb0facc88b5d78ff4a4c948f214cc0e03aae27e7fc58286e963b588b", size = 6201132 }, +] + +[[package]] +name = "pydocstyle" +version = "6.3.0" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "snowballstemmer" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/e9/5c/d5385ca59fd065e3c6a5fe19f9bc9d5ea7f2509fa8c9c22fb6b2031dd953/pydocstyle-6.3.0.tar.gz", hash = "sha256:7ce43f0c0ac87b07494eb9c0b462c0b73e6ff276807f204d6b53edc72b7e44e1", size = 36796 } +wheels = [ + { url = "https://files.pythonhosted.org/packages/36/ea/99ddefac41971acad68f14114f38261c1f27dac0b3ec529824ebc739bdaa/pydocstyle-6.3.0-py3-none-any.whl", hash = "sha256:118762d452a49d6b05e194ef344a55822987a462831ade91ec5c06fd2169d019", size = 38038 }, +] + +[[package]] +name = "pygments" +version = "2.21.0" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/49/2e/ced460408999b33da6b31b0021b0f37d329e202d4169aeb164493778f25b/pygments-2.21.0.tar.gz", hash = "sha256:610ca751c9bc2492b38eb9a38a7fbc93edbbb2d7182edaf34e66ae493dee5c8c", size = 5005329 } +wheels = [ + { url = "https://files.pythonhosted.org/packages/71/46/17f022dd3e953bf20a04a028a21ec746d942f8d2af30fa0f124fa0e6a684/pygments-2.21.0-py3-none-any.whl", hash = "sha256:2363c69b61c4a97c838da3b130dcd6468f4848992b21a82f2a63ec34377137d9", size = 1250147 }, +] + +[[package]] +name = "pylint" +version = "4.1.3" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "astroid" }, + { name = "colorama", marker = "sys_platform == 'win32'" }, + { name = "dill" }, + { name = "isort" }, + { name = "mccabe" }, + { name = "platformdirs" }, + { name = "tomli" }, + { name = "tomlkit" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/38/c9/0bde4152a05a7686b431ce216fe3f3698b0c0d94c20bfa256dd935b608f6/pylint-4.1.3.tar.gz", hash = "sha256:9928603068edfa0d1a3c167f174b099d4b97c3db75d32d0fcdd029770b4713a9", size = 1756180 } +wheels = [ + { url = "https://files.pythonhosted.org/packages/3f/ba/62b18e2e157d05f976bd490b349b55d8850c2a454a5c313c91af9d2e0baf/pylint-4.1.3-py3-none-any.whl", hash = "sha256:a85357cae24f33ad8d86c8f3daaa92c600ae4012b54a57299cee76000e9364cf", size = 588959 }, +] + +[[package]] +name = "pyparsing" +version = "3.3.3" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/e4/11/b213bebff182584360cb8d17c72c1677fec5c5c228de439e63bcf8ab1c8f/pyparsing-3.3.3.tar.gz", hash = "sha256:928ae7e20211f3b6f3915a72f06a0cfd29ab9d24279dd6346b6b1a7146397d36", size = 1050487 } +wheels = [ + { url = "https://files.pythonhosted.org/packages/38/bb/d215ee7c73b61497b28a5503f9f53523f294fcc936762b7caf90e0c1c2b5/pyparsing-3.3.3-py3-none-any.whl", hash = "sha256:ece8c00a69cf01b45d0b1dedabb469c90d8caf996d4fda40f147627a122849a4", size = 126420 }, +] + +[[package]] +name = "pytest" +version = "9.1.1" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "colorama", marker = "sys_platform == 'win32'" }, + { name = "exceptiongroup" }, + { name = "iniconfig" }, + { name = "packaging" }, + { name = "pluggy" }, + { name = "pygments" }, + { name = "tomli" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/e4/47/b9efed96c114afcfa3c9d3fe98a76a1d14c74a9e266d397cf6eb64be5e01/pytest-9.1.1.tar.gz", hash = "sha256:1088fbde8f2b49d95a549a195707afa7a76a3ce9bcadc26b6d71f0ffda5fe313", size = 1636369 } +wheels = [ + { url = "https://files.pythonhosted.org/packages/24/25/1de2678b631f5a49215c6c96fff41ba892b0a34df68d6d80292b1b48aa7f/pytest-9.1.1-py3-none-any.whl", hash = "sha256:37a86b45efb9a47a61a36449063e8e18d0cab3161329fc099eb21783169c4f0c", size = 386536 }, +] + +[[package]] +name = "pytest-benchmark" +version = "5.3.0" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "py-cpuinfo2" }, + { name = "pytest" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/63/8f/83a15e40dbc34a580ee56eb56983cae5394c6e94d50cf28fe268e457be25/pytest_benchmark-5.3.0.tar.gz", hash = "sha256:358444d4e89be901ee2b6404fb043ac3d7684002ad7f3563cc153fca6339c965", size = 375410 } +wheels = [ + { url = "https://files.pythonhosted.org/packages/eb/42/7e80f7cfa191e0a766d1de99b4661847415ad5db34f8209d81fd42175b59/pytest_benchmark-5.3.0-py3-none-any.whl", hash = "sha256:920ab1dfcffa718d49aa15ba144c7e357bda59216a0dc308016cc1c7236f719d", size = 48401 }, +] + +[[package]] +name = "pytest-cov" +version = "7.1.0" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "coverage", extra = ["toml"] }, + { name = "pluggy" }, + { name = "pytest" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/b1/51/a849f96e117386044471c8ec2bd6cfebacda285da9525c9106aeb28da671/pytest_cov-7.1.0.tar.gz", hash = "sha256:30674f2b5f6351aa09702a9c8c364f6a01c27aae0c1366ae8016160d1efc56b2", size = 55592 } +wheels = [ + { url = "https://files.pythonhosted.org/packages/9d/7a/d968e294073affff457b041c2be9868a40c1c71f4a35fcc1e45e5493067b/pytest_cov-7.1.0-py3-none-any.whl", hash = "sha256:a0461110b7865f9a271aa1b51e516c9a95de9d696734a2f71e3e78f46e1d4678", size = 22876 }, +] + +[[package]] +name = "pytest-dependency" +version = "0.6.1" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "pytest" }, + { name = "setuptools" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/c2/ea/84509533e0f6477960b8a9179d240d93c909c6543e4dd8209932026d7815/pytest_dependency-0.6.1.tar.gz", hash = "sha256:246c24d2a5fc743a942cec4408853640e56a05ba58d46e5b213a1d4b738a2464", size = 20837 } + +[[package]] +name = "pytest-xdist" +version = "3.8.0" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "execnet" }, + { name = "pytest" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/78/b4/439b179d1ff526791eb921115fca8e44e596a13efeda518b9d845a619450/pytest_xdist-3.8.0.tar.gz", hash = "sha256:7e578125ec9bc6050861aa93f2d59f1d8d085595d6551c2c90b6f4fad8d3a9f1", size = 88069 } +wheels = [ + { url = "https://files.pythonhosted.org/packages/ca/31/d4e37e9e550c2b92a9cbc2e4d0b7420a27224968580b5a447f420847c975/pytest_xdist-3.8.0-py3-none-any.whl", hash = "sha256:202ca578cfeb7370784a8c33d6d05bc6e13b4f25b5053c30a152269fd10f0b88", size = 46396 }, +] + +[[package]] +name = "python-dateutil" +version = "2.9.0.post0" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "six" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/66/c0/0c8b6ad9f17a802ee498c46e004a0eb49bc148f2fd230864601a86dcf6db/python-dateutil-2.9.0.post0.tar.gz", hash = "sha256:37dd54208da7e1cd875388217d5e00ebd4179249f90fb72437e91a35459a0ad3", size = 342432 } +wheels = [ + { url = "https://files.pythonhosted.org/packages/ec/57/56b9bcc3c9c6a792fcbaf139543cee77261f3651ca9da0c93f5c1221264b/python_dateutil-2.9.0.post0-py2.py3-none-any.whl", hash = "sha256:a8b2bc7bffae282281c8140a97d3aa9c14da0b136dfe83f850eea9a5f7470427", size = 229892 }, +] + +[[package]] +name = "python-toolkit" +version = "0.1.0" +source = { editable = "." } +dependencies = [ + { name = "matplotlib" }, + { name = "numpy" }, + { name = "pandas" }, + { name = "plotly" }, + { name = "pythonnet" }, + { name = "pytz" }, + { name = "pywin32", marker = "sys_platform == 'win32'" }, +] + +[package.dev-dependencies] +dev = [ + { name = "flask" }, + { name = "furo" }, + { name = "interrogate" }, + { name = "ipykernel" }, + { name = "line-profiler" }, + { name = "memory-profiler" }, + { name = "mypy" }, + { name = "pydata-sphinx-theme" }, + { name = "pydocstyle" }, + { name = "pylint" }, + { name = "pytest" }, + { name = "pytest-benchmark" }, + { name = "pytest-cov" }, + { name = "pytest-dependency" }, + { name = "pytest-xdist" }, + { name = "ruff" }, + { name = "sphinx" }, + { name = "sphinx-autoapi" }, + { name = "sphinx-bootstrap-theme" }, + { name = "sphinxcontrib-fulltoc" }, + { name = "sphinxcontrib-napoleon" }, +] + +[package.metadata] +requires-dist = [ + { name = "matplotlib" }, + { name = "numpy" }, + { name = "pandas" }, + { name = "plotly" }, + { name = "pythonnet" }, + { name = "pytz" }, + { name = "pywin32", marker = "sys_platform == 'win32'" }, +] + +[package.metadata.requires-dev] +dev = [ + { name = "flask" }, + { name = "furo" }, + { name = "interrogate" }, + { name = "ipykernel" }, + { name = "line-profiler" }, + { name = "memory-profiler" }, + { name = "mypy" }, + { name = "pydata-sphinx-theme" }, + { name = "pydocstyle" }, + { name = "pylint" }, + { name = "pytest" }, + { name = "pytest-benchmark" }, + { name = "pytest-cov" }, + { name = "pytest-dependency" }, + { name = "pytest-xdist" }, + { name = "ruff" }, + { name = "sphinx" }, + { name = "sphinx-autoapi" }, + { name = "sphinx-bootstrap-theme" }, + { name = "sphinxcontrib-fulltoc" }, + { name = "sphinxcontrib-napoleon" }, +] + +[[package]] +name = "pythonnet" +version = "3.1.0" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "clr-loader" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/05/57/da1992e44663b71365c6e842c8d7fa453d4ec45fb99a68cfee5b7e944d3c/pythonnet-3.1.0.tar.gz", hash = "sha256:7b34c382905d10a371509ffafd64cae0416305c28817738a9cd138336f4e9991", size = 250599 } +wheels = [ + { url = "https://files.pythonhosted.org/packages/ac/4b/52414f442624d2589f5374a48c08d5ae94f24bea67fc13a20a752884e5b7/pythonnet-3.1.0-cp310.cp311.cp312.cp313.cp314-none-any.whl", hash = "sha256:698dd88edc198819ad63b624a6ebe76208c7b46e4fe13626f65e484f0358d6ba", size = 217578 }, + { url = "https://files.pythonhosted.org/packages/db/67/031124fdcb937c266a3265118525bbf6dc13b8c79786d6a7290aecb6e7bb/pythonnet-3.1.0-cp310.cp311.cp312.cp313.cp314-none-win32.win_amd64.whl", hash = "sha256:7bdd4de03df3547a48122a3989265c8b31d5be0d19dadffa009eec7df8085e0b", size = 1644898 }, +] + +[[package]] +name = "pytz" +version = "2026.5" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/14/21/d83d6ef28c4c912c4bb4d1dcf591f7b8c6bde87b9c66f9f454677314e16d/pytz-2026.5.tar.gz", hash = "sha256:fa23724b9c486543b9ff54a327ee7569ac83ade54bb9afd0fc18676620401c86", size = 318572 } +wheels = [ + { url = "https://files.pythonhosted.org/packages/4f/ef/c66110d46fb800dda0bf33164182dfadabe26a90e4476844d502a23dca8e/pytz-2026.5-py2.py3-none-any.whl", hash = "sha256:e658af3757f9e26a9d25dd2aff38335acd92bc9104f890a894b2c1ba28311b03", size = 506342 }, +] + +[[package]] +name = "pywin32" +version = "312" +source = { registry = "https://pypi.org/simple" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/fe/1b/9cfdeac80ee45bebbbcb31f1b7b99a0d81a1c72de48d837be984e0e88b1d/pywin32-312-cp310-cp310-win32.whl", hash = "sha256:772235332b5d1024c696f11cea1ae4be7930f0a8b894bb43db14e3f435f1ff7e", size = 6361387 }, + { url = "https://files.pythonhosted.org/packages/33/b1/7afc96d041d982c27bc2df6f853d43f01fd273e3d39d04be3647ddeb533d/pywin32-312-cp310-cp310-win_amd64.whl", hash = "sha256:5dbc35d2b5320dc07f25fa31269cfb767471002b17de5eb067d03da68c7cb2db", size = 6926780 }, + { url = "https://files.pythonhosted.org/packages/ce/3a/4140da9ad54108e517f4a16b2d83da3033e08662144623e1239587cb7db6/pywin32-312-cp310-cp310-win_arm64.whl", hash = "sha256:3020656e34f1cf7faeb7bccd2b84653a607c6ff0c55ada85e6487d61716deabd", size = 4307203 }, +] + +[[package]] +name = "pyyaml" +version = "6.0.3" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/05/8e/961c0007c59b8dd7729d542c61a4d537767a59645b82a0b521206e1e25c2/pyyaml-6.0.3.tar.gz", hash = "sha256:d76623373421df22fb4cf8817020cbb7ef15c725b9d5e45f17e189bfc384190f", size = 130960 } +wheels = [ + { url = "https://files.pythonhosted.org/packages/f4/a0/39350dd17dd6d6c6507025c0e53aef67a9293a6d37d3511f23ea510d5800/pyyaml-6.0.3-cp310-cp310-macosx_10_13_x86_64.whl", hash = "sha256:214ed4befebe12df36bcc8bc2b64b396ca31be9304b8f59e25c11cf94a4c033b", size = 184227 }, + { url = "https://files.pythonhosted.org/packages/05/14/52d505b5c59ce73244f59c7a50ecf47093ce4765f116cdb98286a71eeca2/pyyaml-6.0.3-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:02ea2dfa234451bbb8772601d7b8e426c2bfa197136796224e50e35a78777956", size = 174019 }, + { url = "https://files.pythonhosted.org/packages/43/f7/0e6a5ae5599c838c696adb4e6330a59f463265bfa1e116cfd1fbb0abaaae/pyyaml-6.0.3-cp310-cp310-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:b30236e45cf30d2b8e7b3e85881719e98507abed1011bf463a8fa23e9c3e98a8", size = 740646 }, + { url = "https://files.pythonhosted.org/packages/2f/3a/61b9db1d28f00f8fd0ae760459a5c4bf1b941baf714e207b6eb0657d2578/pyyaml-6.0.3-cp310-cp310-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:66291b10affd76d76f54fad28e22e51719ef9ba22b29e1d7d03d6777a9174198", size = 840793 }, + { url = "https://files.pythonhosted.org/packages/7a/1e/7acc4f0e74c4b3d9531e24739e0ab832a5edf40e64fbae1a9c01941cabd7/pyyaml-6.0.3-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:9c7708761fccb9397fe64bbc0395abcae8c4bf7b0eac081e12b809bf47700d0b", size = 770293 }, + { url = "https://files.pythonhosted.org/packages/8b/ef/abd085f06853af0cd59fa5f913d61a8eab65d7639ff2a658d18a25d6a89d/pyyaml-6.0.3-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:418cf3f2111bc80e0933b2cd8cd04f286338bb88bdc7bc8e6dd775ebde60b5e0", size = 732872 }, + { url = "https://files.pythonhosted.org/packages/1f/15/2bc9c8faf6450a8b3c9fc5448ed869c599c0a74ba2669772b1f3a0040180/pyyaml-6.0.3-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:5e0b74767e5f8c593e8c9b5912019159ed0533c70051e9cce3e8b6aa699fcd69", size = 758828 }, + { url = "https://files.pythonhosted.org/packages/a3/00/531e92e88c00f4333ce359e50c19b8d1de9fe8d581b1534e35ccfbc5f393/pyyaml-6.0.3-cp310-cp310-win32.whl", hash = "sha256:28c8d926f98f432f88adc23edf2e6d4921ac26fb084b028c733d01868d19007e", size = 142415 }, + { url = "https://files.pythonhosted.org/packages/2a/fa/926c003379b19fca39dd4634818b00dec6c62d87faf628d1394e137354d4/pyyaml-6.0.3-cp310-cp310-win_amd64.whl", hash = "sha256:bdb2c67c6c1390b63c6ff89f210c8fd09d9a1217a465701eac7316313c915e4c", size = 158561 }, +] + +[[package]] +name = "pyzmq" +version = "27.2.0" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "cffi", marker = "implementation_name == 'pypy'" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/e7/8d/5b3d5631c2f4b4b8862f64cd0c9eb777b5710eeb5125b4be8dd0a200a4c0/pyzmq-27.2.0.tar.gz", hash = "sha256:54d4259d1bfae24ecdb5ca79f7acc2eac6c286a02d6a0ae617797cb45f0726d3", size = 292316 } +wheels = [ + { url = "https://files.pythonhosted.org/packages/38/de/c9d653d686ec686bac6ae5f953c784ffc4d2e4a33f9c20d0326aff549ca8/pyzmq-27.2.0-cp310-cp310-macosx_10_15_universal2.whl", hash = "sha256:480dba27b145373b5e103890f17969d891bc9e86746d6b8b29dd70b0d4addc62", size = 1458528 }, + { url = "https://files.pythonhosted.org/packages/13/3a/e3ae8e56fdb87cefbef655dc1d808d5ac76eacf40af850c5d78fd81a7faf/pyzmq-27.2.0-cp310-cp310-manylinux2014_i686.manylinux_2_17_i686.whl", hash = "sha256:722f0a6940be1a483c81029a271d950e04dc2ff113a42e21b3d2b7a0d8e59638", size = 985810 }, + { url = "https://files.pythonhosted.org/packages/03/ee/0ace0abf6315f3f481388826f1e9218802d9b5bb4a01bae5ce42018c3b4e/pyzmq-27.2.0-cp310-cp310-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:3ee556ed1cf836f96de9d5e545563116426d4a94f21b8041fdc79408eff18ebb", size = 713840 }, + { url = "https://files.pythonhosted.org/packages/3b/fd/aee8c87f4854a012e232a6557b1167b6cd207506f59f378954b2d8bb6ed1/pyzmq-27.2.0-cp310-cp310-manylinux_2_26_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:d64da42cae09e6b0c61368b4cc8ca80f23ce3af17584d08053f3dc957433d5ed", size = 888214 }, + { url = "https://files.pythonhosted.org/packages/94/2f/9be34eab874a26aa91315be0b27f94d43d35dad544cbdf28bcd41691afb2/pyzmq-27.2.0-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:376981d106598beb70be384f44d8f589832fd0051d184d38d10043da3cc3b080", size = 1705252 }, + { url = "https://files.pythonhosted.org/packages/7f/26/362344e337d6b5905d65d0c205e91090b39b3b5a59ec9b84dbe88a5dd60c/pyzmq-27.2.0-cp310-cp310-musllinux_1_2_i686.whl", hash = "sha256:40d96cb7a8f6a43aa9617c00215c2b73e1b5e4a1d6cbc9f5860ed7ac682599f0", size = 2075298 }, + { url = "https://files.pythonhosted.org/packages/1d/ee/3b76b91e2bb8c5c12f8ae9ee553eb6254ba0bb048c2f0dea7d945420a0d3/pyzmq-27.2.0-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:4ebc7889b31bc11c72e9f17ba3ebb0a8b0911cce413f41b498e55383a94819a3", size = 1926812 }, + { url = "https://files.pythonhosted.org/packages/9e/ae/83d0740f125a6ef91d5ed29e560679e4c5beeaa3ab1fc87e5fe1128c296d/pyzmq-27.2.0-cp310-cp310-win32.whl", hash = "sha256:650c6cd7cb39a069e7048261efe66fce8bf2e0052c831a7a099b7a0f2ea860d7", size = 571057 }, + { url = "https://files.pythonhosted.org/packages/ce/b3/3e99a7af1c25e84f68c6c7b16c51b664dd51e12d0bc3d252a48d298e9a08/pyzmq-27.2.0-cp310-cp310-win_amd64.whl", hash = "sha256:82a09aa67871d4f2fcafd47bf670fb93210b232a7c2d4b8a54676314edf04033", size = 643232 }, + { url = "https://files.pythonhosted.org/packages/06/cb/785d002a08e630807141b102fd2740cc11623c366bb4606465450bd12e03/pyzmq-27.2.0-cp310-cp310-win_arm64.whl", hash = "sha256:bad4813f270592cedf56977e31ac1fc374fb0f6f67ea5134a5e37c19cb429a8e", size = 567590 }, + { url = "https://files.pythonhosted.org/packages/57/8a/153532fa53db30e116118164f3af269a1f3966b3e2ba32c89b12fe864bd8/pyzmq-27.2.0-cp312-abi3-macosx_10_15_universal2.whl", hash = "sha256:591c8de5851c5ea372194469fe97587b97c3b641e9a70f31bb3474acbfde0241", size = 1431074 }, + { url = "https://files.pythonhosted.org/packages/c8/ef/c08b91248bb90a9efa81fa00ba81b69c157c74d0c5efbb2c319d91babb62/pyzmq-27.2.0-cp312-abi3-manylinux2014_i686.manylinux_2_17_i686.whl", hash = "sha256:00e73942ef12cecbc7951c4a9104bb8ffaed742abb13af2da6833d90dd368cef", size = 973915 }, + { url = "https://files.pythonhosted.org/packages/b4/78/a3a3a86c2b00fadb92ece1ca4f8f028d62b2ce9ac3526097239ab2d6fba9/pyzmq-27.2.0-cp312-abi3-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:1f8079d0521fe94bbb401fe9407578b28f3701627c8be2c9f7e0c5b77dcb0109", size = 697722 }, + { url = "https://files.pythonhosted.org/packages/62/2c/d5828306f795e8d34676d266823b74e2101e0ad3760d12083de3e02abbb2/pyzmq-27.2.0-cp312-abi3-manylinux_2_26_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:dea74fd65f1fc5f7fe167916a473ebe6ed6174e5e5d9de11ea6583661be6cf43", size = 872258 }, + { url = "https://files.pythonhosted.org/packages/09/52/51253b78fd8739293e283407eeecb14215c02c71b6519af21f6eed8e69cd/pyzmq-27.2.0-cp312-abi3-manylinux_2_38_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:dcc99ca132b667a4ed750afd42db4ea73288f18425a9b2e3c0af095665c491f5", size = 739591 }, + { url = "https://files.pythonhosted.org/packages/e6/3e/142c85b67a4c9678629b0cf6d5125b29663d75be69bfaa57a3cac344d780/pyzmq-27.2.0-cp312-abi3-musllinux_1_2_aarch64.whl", hash = "sha256:b8d5f66e4a8246cf77f7b8f7902af64f00553368fa0373c89d99b78f0ad79394", size = 1689031 }, + { url = "https://files.pythonhosted.org/packages/0e/ee/0776fb0f98ed1eb74d77240087fef0ab045b6ad15cb09555c6c5134c98ad/pyzmq-27.2.0-cp312-abi3-musllinux_1_2_i686.whl", hash = "sha256:d1526b42a2e725b84ed226f37becedc250c6347594e5ed304e4e9aff68c9aec3", size = 2059547 }, + { url = "https://files.pythonhosted.org/packages/aa/0e/ec77f691a4aebe29ab6329f996fb0e0270c876a3016086e3ca6ef733bcae/pyzmq-27.2.0-cp312-abi3-musllinux_1_2_x86_64.whl", hash = "sha256:f707bcf2c1d007d14d70531d4dd7b41060881c73efa845580bf6faaf9ea24d42", size = 1910457 }, + { url = "https://files.pythonhosted.org/packages/30/97/1f5530ff4fc271b4597048371d5af972c2baab51be132ba15874e0327a6a/pyzmq-27.2.0-cp312-abi3-win32.whl", hash = "sha256:fdaaa4ea3242f6ad298eb5177eb042aea5c73c30e76d20caee7b15af20d24ec2", size = 563450 }, + { url = "https://files.pythonhosted.org/packages/02/8b/b83f7780dad22e0878e4c7bd9158ebd24ed12bc3d5e3a471cd0576f77ded/pyzmq-27.2.0-cp312-abi3-win_amd64.whl", hash = "sha256:2c218c6ab8bc447ba62054b581fd30209689d199c6ecb253f79615ca74a38e12", size = 628633 }, + { url = "https://files.pythonhosted.org/packages/52/aa/3918b5ac7f9987bd9c421b065074fd7409ded88f856f2c704a24341877ec/pyzmq-27.2.0-cp312-abi3-win_arm64.whl", hash = "sha256:348d6fd3e4b81ae4580622ea8c2ea60224e84b2ac1b3be4482e6edc7de06e7a3", size = 556006 }, + { url = "https://files.pythonhosted.org/packages/8c/26/1a7cd2d8e4e3c27d83a46960e22101b69f527843be140cb3375267aa8ca6/pyzmq-27.2.0-pp310-pypy310_pp73-macosx_10_15_x86_64.whl", hash = "sha256:770a37f28ddfbe1d2c40a2e3ce37e5fd10831daa6ae9634105aa8a5d23507b00", size = 875015 }, + { url = "https://files.pythonhosted.org/packages/b8/ed/c8daf770ca31eb293bef40f801f05148e0a96ad538d55ec3bceb226c91ec/pyzmq-27.2.0-pp310-pypy310_pp73-macosx_11_0_arm64.whl", hash = "sha256:b398c5fe102b41e1559f7ffdae760aabd5f432d73b047b4ae0eac4e01cb594d2", size = 774400 }, + { url = "https://files.pythonhosted.org/packages/64/6f/b958b0785eb15ab7a78913e3df8de705dbf226ce1d0004998fa4872bdd59/pyzmq-27.2.0-pp310-pypy310_pp73-manylinux2014_i686.manylinux_2_17_i686.whl", hash = "sha256:0e1af01858d6dc0c09cea57f9cb1ddf4601f04897b6bb1efc3a2038123c87d79", size = 877993 }, + { url = "https://files.pythonhosted.org/packages/2d/5a/7a070d0e9911441061402013f0c64e5772ee781704c5dae093e6b051c6f6/pyzmq-27.2.0-pp310-pypy310_pp73-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:211350c3ccd4746bc5a85e8fe961bad1f7f2f274f67cf1f785fad7f96f562eea", size = 614493 }, + { url = "https://files.pythonhosted.org/packages/b3/28/833485224e1bd8960cbf3539db465ab2bf23b50de885dc4225a637480539/pyzmq-27.2.0-pp310-pypy310_pp73-manylinux_2_26_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:dde5e291548ca0f397623b5e523db5c90172b32aa4fd3ba464a79ea31a580b43", size = 780573 }, + { url = "https://files.pythonhosted.org/packages/90/8e/52239b9b5fe4f9cf77e272e6a8c548c01ba407d08d3aeeb3220816669ef1/pyzmq-27.2.0-pp310-pypy310_pp73-win_amd64.whl", hash = "sha256:94242bd4de6af7e74665e14a88630bccd615057f6acfaf08a3a432551d604645", size = 553963 }, +] + +[[package]] +name = "requests" +version = "2.34.2" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "certifi" }, + { name = "charset-normalizer" }, + { name = "idna" }, + { name = "urllib3" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/ac/c3/e2a2b89f2d3e2179abd6d00ebd70bff6273f37fb3e0cc209f48b39d00cbf/requests-2.34.2.tar.gz", hash = "sha256:f288924cae4e29463698d6d60bc6a4da69c89185ad1e0bcc4104f584e960b9ed", size = 142856 } +wheels = [ + { url = "https://files.pythonhosted.org/packages/a0/f4/c67b0b3f1b9245e8d266f0f112c500d50e5b4e83cb6f3b71b6528104182a/requests-2.34.2-py3-none-any.whl", hash = "sha256:2a0d60c172f83ac6ab31e4554906c0f3b3588d37b5cb939b1c061f4907e278e0", size = 73075 }, +] + +[[package]] +name = "ruff" +version = "0.17.0" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/e9/a7/70debb024dfacda67b8e560cc7511f52b34b9348a8cc8c1ec23036dcd51d/ruff-0.17.0.tar.gz", hash = "sha256:5cd03240d8208a557c2a9655a5cb07ebe36aa6bb35065f97d48c1f6adef5a322", size = 5320554 } +wheels = [ + { url = "https://files.pythonhosted.org/packages/bc/f8/ee5ab9da6089eae2a33e6008b01deb1eda19992c1c8e10661e98cee1640f/ruff-0.17.0-py3-none-linux_armv6l.whl", hash = "sha256:0e271826af9a20d18c6cfae8c51e82959167c24859686ddd3eb9a7f0842ce81e", size = 10148907 }, + { url = "https://files.pythonhosted.org/packages/9f/d9/2f81fb5a9d580afbb11b1c8ff915233a11f2a1b27405d7991f183c5e1976/ruff-0.17.0-py3-none-macosx_10_12_x86_64.whl", hash = "sha256:5f0ca4a40f81403689c04f12966e22f44e329ae362072d8f1587b7bda87f603b", size = 10224208 }, + { url = "https://files.pythonhosted.org/packages/a7/20/643f3c8f75594f937b2bf74801241c56a2e2b8e139d24dff8b66b28cdd7f/ruff-0.17.0-py3-none-macosx_11_0_arm64.whl", hash = "sha256:cbf7149e0927dc3295d5d64679a4765576eef71b00782b2ae969ef82274d6bb9", size = 9273324 }, + { url = "https://files.pythonhosted.org/packages/ec/91/627700b233d367736cb274f1bd0b47d1f2b12f68878192812bd875adadc3/ruff-0.17.0-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:13ee90156522998c3037059d8f66885c8adeeaf7643bdce2caceee196ecd23e0", size = 9953190 }, + { url = "https://files.pythonhosted.org/packages/cd/92/91f7b5ed39490f89d6cbf56e1f543c383667a725efa8e2c2dee0f01f5591/ruff-0.17.0-py3-none-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:3d8e4a002a94cd9d0dc48b51dc69d807a172b5b9bf2b668e656424dc5b55ead1", size = 9961746 }, + { url = "https://files.pythonhosted.org/packages/87/c5/7310f9fc63ce11ff6394edbd5e85433dfb0e14c9fbf6ccc97f1538491bc7/ruff-0.17.0-py3-none-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:c0b8a60c06a218c337e1161638d34757f83449243e2db161483ddf948e53ad14", size = 10625483 }, + { url = "https://files.pythonhosted.org/packages/a5/8d/97443f0dca4a03a0bc7629fd396fd494a1cb6666121e38c5075acb217d8f/ruff-0.17.0-py3-none-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:a330178bdffc4205dbf3bda11d93e059e388fd6546f8cdd304501a9160363c0d", size = 11350129 }, + { url = "https://files.pythonhosted.org/packages/9c/0a/c525efd9777be4b6b012e6969a3012648468e7e6c4b3e5b46af69f46e8eb/ruff-0.17.0-py3-none-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:7bb08489e234876fa2da67ae3ea938e9a2156da80293e0e4365abd6973d98329", size = 10906223 }, + { url = "https://files.pythonhosted.org/packages/2c/3c/4a01195d93420cad1175bedad13a515dc8a56f95a6e39789b92e582682f5/ruff-0.17.0-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:bc73e7c133e82d55b5f15897b2a442d72c0cb4a0c886c46801ce3c247150b60c", size = 10386314 }, + { url = "https://files.pythonhosted.org/packages/c7/72/1a3951665485a921f6375f91e754a1854d5a645d41acc3642668064ff64d/ruff-0.17.0-py3-none-manylinux_2_31_riscv64.whl", hash = "sha256:db4f74c533403ab70fe4007873f6ae0c9f94a8b03158cf48d78788e47cdbe399", size = 10565464 }, + { url = "https://files.pythonhosted.org/packages/90/8c/539b4d8c082f57e18db8ae2be85a460d77861c79dcd5798e32b536a6a06f/ruff-0.17.0-py3-none-musllinux_1_2_aarch64.whl", hash = "sha256:3d8cc360e666d1914e47b0777c6906d70cf18891a55532bd0a16844195d70859", size = 10079468 }, + { url = "https://files.pythonhosted.org/packages/e0/b8/84286966db79434e8c26b585b0a0f6897cb3ab1c51a4aa4df10c28488b62/ruff-0.17.0-py3-none-musllinux_1_2_armv7l.whl", hash = "sha256:d66de796b726c4801e05fa99a2a8d7a780e107be222486c304ab61765561e866", size = 9958556 }, + { url = "https://files.pythonhosted.org/packages/69/50/27b6eed27b83fcdd5bfa0d52b83231e29094754374698da404d094487ae3/ruff-0.17.0-py3-none-musllinux_1_2_i686.whl", hash = "sha256:c3f268baf004aea944f040623327119527ea231af15f7fb7890e82cea0679589", size = 10352173 }, + { url = "https://files.pythonhosted.org/packages/2a/fa/955399fd13044cd827862044117d784a59e3196f6cce7424908ac9a7f914/ruff-0.17.0-py3-none-musllinux_1_2_x86_64.whl", hash = "sha256:864b6c1acb6b0bccf94b5a3938a1531fd09aaca5e5659a2e7bf0f3cf2a685540", size = 10791761 }, + { url = "https://files.pythonhosted.org/packages/ae/bf/024e01e1f6aec87768696725e648ed5b438941341eea8f8100beb681961f/ruff-0.17.0-py3-none-win32.whl", hash = "sha256:5e50aa5b84decd9fe5b0bb0e6f71c3b592f1767ed09faa4b7207d933961e35cd", size = 9904112 }, + { url = "https://files.pythonhosted.org/packages/cc/77/1ee73df41dcc8d1cdb686ee4bc46ea29704ea175feb6b95c78420f631ab8/ruff-0.17.0-py3-none-win_amd64.whl", hash = "sha256:8ab76bcda86dfd28e13776cb5de3c7bcdcf1ae3d37ed761113d1a5a415dc134c", size = 10115585 }, + { url = "https://files.pythonhosted.org/packages/fd/71/eb4f0ccc844aece56963e8578df9c95d4c00f580547d52329d4035d3af18/ruff-0.17.0-py3-none-win_arm64.whl", hash = "sha256:c154c73ff43f9854395e24cac507af13078962e53d2b511605058d22af1fdb88", size = 9872035 }, +] + +[[package]] +name = "setuptools" +version = "84.0.0" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/6d/44/f5da03a8ef95d369145c5bb53050e7877c9f3d312e128605fd9504829143/setuptools-84.0.0.tar.gz", hash = "sha256:f4695c21257f0d9b537ec2692c941d02ee143b7cc1276941349a546573b2ef73", size = 1168449 } +wheels = [ + { url = "https://files.pythonhosted.org/packages/95/9c/c510029fc6ef33a6275cd2c5d3cecd6613dfd6aa401d57c54f1c18852ccf/setuptools-84.0.0-py3-none-any.whl", hash = "sha256:51a52592b3b99e102b609654876bd65f19f999935166d1352678931132b0c670", size = 818216 }, +] + +[[package]] +name = "six" +version = "1.17.0" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/94/e7/b2c673351809dca68a0e064b6af791aa332cf192da575fd474ed7d6f16a2/six-1.17.0.tar.gz", hash = "sha256:ff70335d468e7eb6ec65b95b99d3a2836546063f63acc5171de367e834932a81", size = 34031 } +wheels = [ + { url = "https://files.pythonhosted.org/packages/b7/ce/149a00dd41f10bc29e5921b496af8b574d8413afcd5e30dfa0ed46c2cc5e/six-1.17.0-py2.py3-none-any.whl", hash = "sha256:4721f391ed90541fddacab5acf947aa0d3dc7d27b2e1e8eda2be8970586c3274", size = 11050 }, +] + +[[package]] +name = "snowballstemmer" +version = "3.1.1" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/43/f8/0a71edf031f03c40db17503cb8ca78a69a171254e568e7db241b0ab57ea1/snowballstemmer-3.1.1.tar.gz", hash = "sha256:e07bbc54a0d798fe6010a12398422e62a8bfbba95c394fd0956ef58cb4d3e260", size = 123314 } +wheels = [ + { url = "https://files.pythonhosted.org/packages/4c/07/2ebca9b11fb9be7340a818d8d6f63feaebb146be2c4afbd6061701d6df6e/snowballstemmer-3.1.1-py3-none-any.whl", hash = "sha256:7e207fa178741da09cdee59d3ecec3827ad5f92b1fc5c9ff3755b639f71f5752", size = 104164 }, +] + +[[package]] +name = "soupsieve" +version = "2.10" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/71/c3/1b817965ac12dc002d7c9cd7dfffdd7d4fbf9b45763ef2ffe7b86ee94670/soupsieve-2.10.tar.gz", hash = "sha256:49e9380d7d2905463583bafe285e818c7366a9ed7b3aee221c1ac79c905d8bc0", size = 124337 } +wheels = [ + { url = "https://files.pythonhosted.org/packages/66/87/5ed59e1d0290564e2027ed066c52b059892c4637741337fc0967183c8d4d/soupsieve-2.10-py3-none-any.whl", hash = "sha256:8596eb8967d744174820280fa62b4542a2e955bfaccca73ed8a13c6eb8e9b502", size = 38019 }, +] + +[[package]] +name = "sphinx" +version = "8.1.3" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "alabaster" }, + { name = "babel" }, + { name = "colorama", marker = "sys_platform == 'win32'" }, + { name = "docutils" }, + { name = "imagesize" }, + { name = "jinja2" }, + { name = "packaging" }, + { name = "pygments" }, + { name = "requests" }, + { name = "snowballstemmer" }, + { name = "sphinxcontrib-applehelp" }, + { name = "sphinxcontrib-devhelp" }, + { name = "sphinxcontrib-htmlhelp" }, + { name = "sphinxcontrib-jsmath" }, + { name = "sphinxcontrib-qthelp" }, + { name = "sphinxcontrib-serializinghtml" }, + { name = "tomli" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/6f/6d/be0b61178fe2cdcb67e2a92fc9ebb488e3c51c4f74a36a7824c0adf23425/sphinx-8.1.3.tar.gz", hash = "sha256:43c1911eecb0d3e161ad78611bc905d1ad0e523e4ddc202a58a821773dc4c927", size = 8184611 } +wheels = [ + { url = "https://files.pythonhosted.org/packages/26/60/1ddff83a56d33aaf6f10ec8ce84b4c007d9368b21008876fceda7e7381ef/sphinx-8.1.3-py3-none-any.whl", hash = "sha256:09719015511837b76bf6e03e42eb7595ac8c2e41eeb9c29c5b755c6b677992a2", size = 3487125 }, +] + +[[package]] +name = "sphinx-autoapi" +version = "3.8.1" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "astroid" }, + { name = "jinja2" }, + { name = "pyyaml" }, + { name = "sphinx" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/09/5e/7b42f3f774aa116741b8031b740c854612ed7dd7d616695e934a2b7fb94f/sphinx_autoapi-3.8.1.tar.gz", hash = "sha256:04643fc50485039294ace8b660d0d1b821a1686824a975725a5106e8cf1fb30b", size = 58898 } +wheels = [ + { url = "https://files.pythonhosted.org/packages/72/4e/e49564ab6f38341921ae855451aed2ba9915f61c43780200d5aebb57ae4d/sphinx_autoapi-3.8.1-py3-none-any.whl", hash = "sha256:9a3bd3ee1ba82d537f1620a3922292d43ee8b9ff9c69bc198965ac4bcd5a6775", size = 35975 }, +] + +[[package]] +name = "sphinx-basic-ng" +version = "1.0.0b2" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "sphinx" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/98/0b/a866924ded68efec7a1759587a4e478aec7559d8165fac8b2ad1c0e774d6/sphinx_basic_ng-1.0.0b2.tar.gz", hash = "sha256:9ec55a47c90c8c002b5960c57492ec3021f5193cb26cebc2dc4ea226848651c9", size = 20736 } +wheels = [ + { url = "https://files.pythonhosted.org/packages/3c/dd/018ce05c532a22007ac58d4f45232514cd9d6dd0ee1dc374e309db830983/sphinx_basic_ng-1.0.0b2-py3-none-any.whl", hash = "sha256:eb09aedbabfb650607e9b4b68c9d240b90b1e1be221d6ad71d61c52e29f7932b", size = 22496 }, +] + +[[package]] +name = "sphinx-bootstrap-theme" +version = "0.8.1" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/4c/32/2c93f58beec8c85113fcbb3f1e213a1a773baaebfa064509a75d1d2f2320/sphinx-bootstrap-theme-0.8.1.tar.gz", hash = "sha256:683e3b735448dadd0149f76edecf95ff4bd9157787e9e77e0d048ca6f1d680df", size = 1209581 } +wheels = [ + { url = "https://files.pythonhosted.org/packages/3a/97/6b76343a692c6cf4481d3a900a0ee589499f8d642e7bcaf0192f9022305f/sphinx_bootstrap_theme-0.8.1-py2.py3-none-any.whl", hash = "sha256:6ef36206c211846ea6cbdb45bc85645578e7c62d0a883361181708f8b6ea743b", size = 1224297 }, +] + +[[package]] +name = "sphinxcontrib-applehelp" +version = "2.0.0" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/ba/6e/b837e84a1a704953c62ef8776d45c3e8d759876b4a84fe14eba2859106fe/sphinxcontrib_applehelp-2.0.0.tar.gz", hash = "sha256:2f29ef331735ce958efa4734873f084941970894c6090408b079c61b2e1c06d1", size = 20053 } +wheels = [ + { url = "https://files.pythonhosted.org/packages/5d/85/9ebeae2f76e9e77b952f4b274c27238156eae7979c5421fba91a28f4970d/sphinxcontrib_applehelp-2.0.0-py3-none-any.whl", hash = "sha256:4cd3f0ec4ac5dd9c17ec65e9ab272c9b867ea77425228e68ecf08d6b28ddbdb5", size = 119300 }, +] + +[[package]] +name = "sphinxcontrib-devhelp" +version = "2.0.0" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/f6/d2/5beee64d3e4e747f316bae86b55943f51e82bb86ecd325883ef65741e7da/sphinxcontrib_devhelp-2.0.0.tar.gz", hash = "sha256:411f5d96d445d1d73bb5d52133377b4248ec79db5c793ce7dbe59e074b4dd1ad", size = 12967 } +wheels = [ + { url = "https://files.pythonhosted.org/packages/35/7a/987e583882f985fe4d7323774889ec58049171828b58c2217e7f79cdf44e/sphinxcontrib_devhelp-2.0.0-py3-none-any.whl", hash = "sha256:aefb8b83854e4b0998877524d1029fd3e6879210422ee3780459e28a1f03a8a2", size = 82530 }, +] + +[[package]] +name = "sphinxcontrib-fulltoc" +version = "1.2.0" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/8e/a6/d1297db9b75650681e5429e92e13df139ee6b64303ff1b2eea4ebd32c0a9/sphinxcontrib-fulltoc-1.2.0.tar.gz", hash = "sha256:c845d62fc467f3135d4543e9f10e13ef91852683bd1c90fd19d07f9d36757cd9", size = 13752 } + +[[package]] +name = "sphinxcontrib-htmlhelp" +version = "2.1.0" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/43/93/983afd9aa001e5201eab16b5a444ed5b9b0a7a010541e0ddfbbfd0b2470c/sphinxcontrib_htmlhelp-2.1.0.tar.gz", hash = "sha256:c9e2916ace8aad64cc13a0d233ee22317f2b9025b9cf3295249fa985cc7082e9", size = 22617 } +wheels = [ + { url = "https://files.pythonhosted.org/packages/0a/7b/18a8c0bcec9182c05a0b3ec2a776bba4ead82750a55ff798e8d406dae604/sphinxcontrib_htmlhelp-2.1.0-py3-none-any.whl", hash = "sha256:166759820b47002d22914d64a075ce08f4c46818e17cfc9470a9786b759b19f8", size = 98705 }, +] + +[[package]] +name = "sphinxcontrib-jsmath" +version = "1.0.1" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/b2/e8/9ed3830aeed71f17c026a07a5097edcf44b692850ef215b161b8ad875729/sphinxcontrib-jsmath-1.0.1.tar.gz", hash = "sha256:a9925e4a4587247ed2191a22df5f6970656cb8ca2bd6284309578f2153e0c4b8", size = 5787 } +wheels = [ + { url = "https://files.pythonhosted.org/packages/c2/42/4c8646762ee83602e3fb3fbe774c2fac12f317deb0b5dbeeedd2d3ba4b77/sphinxcontrib_jsmath-1.0.1-py2.py3-none-any.whl", hash = "sha256:2ec2eaebfb78f3f2078e73666b1415417a116cc848b72e5172e596c871103178", size = 5071 }, +] + +[[package]] +name = "sphinxcontrib-napoleon" +version = "0.7" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "pockets" }, + { name = "six" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/fa/eb/ad89500f4cee83187596e07f43ad561f293e8e6e96996005c3319653b89f/sphinxcontrib-napoleon-0.7.tar.gz", hash = "sha256:407382beed396e9f2d7f3043fad6afda95719204a1e1a231ac865f40abcbfcf8", size = 21232 } +wheels = [ + { url = "https://files.pythonhosted.org/packages/75/f2/6b7627dfe7b4e418e295e254bb15c3a6455f11f8c0ad0d43113f678049c3/sphinxcontrib_napoleon-0.7-py2.py3-none-any.whl", hash = "sha256:711e41a3974bdf110a484aec4c1a556799eb0b3f3b897521a018ad7e2db13fef", size = 17151 }, +] + +[[package]] +name = "sphinxcontrib-qthelp" +version = "2.0.0" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/68/bc/9104308fc285eb3e0b31b67688235db556cd5b0ef31d96f30e45f2e51cae/sphinxcontrib_qthelp-2.0.0.tar.gz", hash = "sha256:4fe7d0ac8fc171045be623aba3e2a8f613f8682731f9153bb2e40ece16b9bbab", size = 17165 } +wheels = [ + { url = "https://files.pythonhosted.org/packages/27/83/859ecdd180cacc13b1f7e857abf8582a64552ea7a061057a6c716e790fce/sphinxcontrib_qthelp-2.0.0-py3-none-any.whl", hash = "sha256:b18a828cdba941ccd6ee8445dbe72ffa3ef8cbe7505d8cd1fa0d42d3f2d5f3eb", size = 88743 }, +] + +[[package]] +name = "sphinxcontrib-serializinghtml" +version = "2.0.0" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/3b/44/6716b257b0aa6bfd51a1b31665d1c205fb12cb5ad56de752dfa15657de2f/sphinxcontrib_serializinghtml-2.0.0.tar.gz", hash = "sha256:e9d912827f872c029017a53f0ef2180b327c3f7fd23c87229f7a8e8b70031d4d", size = 16080 } +wheels = [ + { url = "https://files.pythonhosted.org/packages/52/a7/d2782e4e3f77c8450f727ba74a8f12756d5ba823d81b941f1b04da9d033a/sphinxcontrib_serializinghtml-2.0.0-py3-none-any.whl", hash = "sha256:6e2cb0eef194e10c27ec0023bfeb25badbbb5868244cf5bc5bdc04e4464bf331", size = 92072 }, +] + +[[package]] +name = "stack-data" +version = "0.6.3" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "asttokens" }, + { name = "executing" }, + { name = "pure-eval" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/28/e3/55dcc2cfbc3ca9c29519eb6884dd1415ecb53b0e934862d3559ddcb7e20b/stack_data-0.6.3.tar.gz", hash = "sha256:836a778de4fec4dcd1dcd89ed8abff8a221f58308462e1c4aa2a3cf30148f0b9", size = 44707 } +wheels = [ + { url = "https://files.pythonhosted.org/packages/f1/7b/ce1eafaf1a76852e2ec9b22edecf1daa58175c090266e9f6c64afcd81d91/stack_data-0.6.3-py3-none-any.whl", hash = "sha256:d5558e0c25a4cb0853cddad3d77da9891a08cb85dd9f9f91b9f8cd66e511e695", size = 24521 }, +] + +[[package]] +name = "tabulate" +version = "0.10.0" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/46/58/8c37dea7bbf769b20d58e7ace7e5edfe65b849442b00ffcdd56be88697c6/tabulate-0.10.0.tar.gz", hash = "sha256:e2cfde8f79420f6deeffdeda9aaec3b6bc5abce947655d17ac662b126e48a60d", size = 91754 } +wheels = [ + { url = "https://files.pythonhosted.org/packages/99/55/db07de81b5c630da5cbf5c7df646580ca26dfaefa593667fc6f2fe016d2e/tabulate-0.10.0-py3-none-any.whl", hash = "sha256:f0b0622e567335c8fabaaa659f1b33bcb6ddfe2e496071b743aa113f8774f2d3", size = 39814 }, +] + +[[package]] +name = "tomli" +version = "2.5.0" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/b0/78/9ad63712633ed3ab5cc1a648d863d7e7da371e9425e209555a0fe711b695/tomli-2.5.0.tar.gz", hash = "sha256:264507556cd8b8c8e7c6ee037cdf443a463f03f4c958e57195e3d369711b8ff6", size = 17662 } +wheels = [ + { url = "https://files.pythonhosted.org/packages/60/3f/3e3f8fd0919249b0200c80fbc4f9a1e70be19f9883da71dfb7f8b9ab8aca/tomli-2.5.0-py3-none-any.whl", hash = "sha256:32a7b79ac57a2e83670ce329ccf675798bc5a2094783a63676866b70503f2e2b", size = 14765 }, +] + +[[package]] +name = "tomlkit" +version = "0.15.1" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/94/96/e07752635b98536177fa1f37671c8f3cdde2e724c6bcf6034b2cfb571565/tomlkit-0.15.1.tar.gz", hash = "sha256:e25bbf38843005246210a12982776f27f99cb9be67160e14434d0c0d21ee1e97", size = 180129 } +wheels = [ + { url = "https://files.pythonhosted.org/packages/13/bc/8c13eb66537dce1d2bd3a57132902f38d0e7f5bb46fa9f4daed9fe9d76ee/tomlkit-0.15.1-py3-none-any.whl", hash = "sha256:177a05aece5a8ca5266fd3c448abb47b8d352f09d477d3ca8332db4d89b24304", size = 49449 }, +] + +[[package]] +name = "tornado" +version = "6.5.10" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/06/61/53d562a57b28c08eda40b258c0f975e360541943ad7c7bef897a40caafda/tornado-6.5.10.tar.gz", hash = "sha256:a6b1ccd08c04b4a06fb5aeb381be99de5ad1e5375c1785e31d78c880feb57687", size = 537910 } +wheels = [ + { url = "https://files.pythonhosted.org/packages/cd/5b/ff5fc58fa2427c30dea74c90053f4fc5eda1e7f3833ed3ecc7147fe2b311/tornado-6.5.10-cp39-abi3-macosx_10_9_universal2.whl", hash = "sha256:9261783640e23258694a9ff0795df430a5a7b0a651d3dd53dd0969ad6be16da7", size = 465883 }, + { url = "https://files.pythonhosted.org/packages/ad/f5/cd7be26c34a3315532f3aef5f092465da8f59c334dd439d3c14aaef16461/tornado-6.5.10-cp39-abi3-macosx_10_9_x86_64.whl", hash = "sha256:83e6cf438b106c6b3852d70960967bb1b70c87438050dca0981e4b9aa751a4c1", size = 464046 }, + { url = "https://files.pythonhosted.org/packages/60/33/df6d7d04854a58619f8349a51e3edb138324130a7562b0bb21f115bb940f/tornado-6.5.10-cp39-abi3-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl", hash = "sha256:bdf942448169e5336451d0494d7e3d81cfa726d5aa312affdc4682dd62a62f6d", size = 467096 }, + { url = "https://files.pythonhosted.org/packages/29/17/cc35dff68272d685cffd8600ffafbd8067e7d05e7348d9f80caddffbbd5f/tornado-6.5.10-cp39-abi3-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:69acca6501eed74582b76dbbceee2a91613f54728e3e418346000d7103101676", size = 468067 }, + { url = "https://files.pythonhosted.org/packages/c3/01/6e5349b4e1a53a4b4972a6716785e1fe7407f312063c3972690af8ff301b/tornado-6.5.10-cp39-abi3-musllinux_1_2_aarch64.whl", hash = "sha256:66aaa3f57d30c6e6becee83ff28055d5930ac724214bde99393eefda83d5e015", size = 467901 }, + { url = "https://files.pythonhosted.org/packages/28/5e/b4facf94370dba006819c8d304376f8b9fbec6b935b5e51bf45823a9790b/tornado-6.5.10-cp39-abi3-musllinux_1_2_x86_64.whl", hash = "sha256:4bd192b959f9128fb99b8898148070ba4574c9589b78bce42d1851131fe85828", size = 467308 }, + { url = "https://files.pythonhosted.org/packages/56/ae/047938e828cafc8eca4c908fafb6588fee944e3af39a0af9d7b602499ae5/tornado-6.5.10-cp39-abi3-win32.whl", hash = "sha256:302eb1e0e3e159314eb591920529fdea80acca92df5510a2cec5bbd4f099ec72", size = 468387 }, + { url = "https://files.pythonhosted.org/packages/d8/d4/5901517f05affd752490f6a654ba31b7474664e8dd80bd045a00c220bd88/tornado-6.5.10-cp39-abi3-win_amd64.whl", hash = "sha256:37ae8f150cecfdbf747fc4e12f5e9a97ecd8cf1d4cdb3f119e2de84b11196918", size = 468828 }, + { url = "https://files.pythonhosted.org/packages/f3/1a/fd497f3a7f7b74bb04f4b94536b5c9f80742b5d50501fd27977652ddec16/tornado-6.5.10-cp39-abi3-win_arm64.whl", hash = "sha256:ce045d3c298fddd30e89a2777f97039d1b641eb9518ac7b26a4721903539c694", size = 467847 }, +] + +[[package]] +name = "traitlets" +version = "5.16.1" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/2c/2e/a7fbfe268c8a3b32546930c0297c101d65a4a14c304ad5790a9f478f0e4e/traitlets-5.16.1.tar.gz", hash = "sha256:ed900c2b631aa3a112811139fa97b8d2c3bad5e989656bba4b7e52c7852c18c1", size = 166137 } +wheels = [ + { url = "https://files.pythonhosted.org/packages/ad/66/0d785f0bc5e4315a96c989bb476d0fc07ea4f85132550c7b156ca2035d52/traitlets-5.16.1-py3-none-any.whl", hash = "sha256:f775618166caa0396c8e337099240f2bd3e5e917d203b2e6fbe21a58d3cb1f6b", size = 86211 }, +] + +[[package]] +name = "typing-extensions" +version = "4.16.0" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/f6/cc/6253133b5bb138fc3306cebfbda2c520f545d36b5be2c7255cc528bb45d6/typing_extensions-4.16.0.tar.gz", hash = "sha256:dc983d19a509c94dba722ee6abd33940f7c05a89e243c47e907eb4db6f1a43e5", size = 113555 } +wheels = [ + { url = "https://files.pythonhosted.org/packages/49/d3/b8441a820a491ddfc024b0b0cf0393375b75ea13866d9c66727e54c2fc80/typing_extensions-4.16.0-py3-none-any.whl", hash = "sha256:481caa481374e813c1b176ada14e97f1f67a4539ce9cfeb3f350d78d6370c2e8", size = 45571 }, +] + +[[package]] +name = "tzdata" +version = "2026.5" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/d9/68/f1b440335057bfce71b6e50a9d09445aa2ecbd08359a337976627b8409e7/tzdata-2026.5.tar.gz", hash = "sha256:8cc73c0a0bfca7dbfa59235d60b2eff82231dee33f53d206db1acd9173cfc0a7", size = 200404 } +wheels = [ + { url = "https://files.pythonhosted.org/packages/94/21/1e5995a1c920cce14e4bffae20c665ec10e7ed03ab25e006cd741092b718/tzdata-2026.5-py2.py3-none-any.whl", hash = "sha256:b683bd1b6659ddcd810ff02ad09ba821d4bf1065072805063eb35c49617905ac", size = 347996 }, +] + +[[package]] +name = "urllib3" +version = "2.8.0" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/e3/05/b17359e1cefb4f909b5e40b1b90a496d987258916dbbf88e842c729f510e/urllib3-2.8.0.tar.gz", hash = "sha256:63bf2ead4c879426ebf22ef2a781eeb4aa3b4ae798a0435506f8687fd5bb9b63", size = 458972 } +wheels = [ + { url = "https://files.pythonhosted.org/packages/92/9d/c4e665119135114480843e7ab388fa94d8480650450e6f8e26b70d323a4c/urllib3-2.8.0-py3-none-any.whl", hash = "sha256:0cf3cae568d36aa9576b28dfb35f11328f1cb974ca7647d9475ebb86c75ac6e3", size = 135717 }, +] + +[[package]] +name = "wcwidth" +version = "0.9.2" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/f0/b4/7830542634bb2d3e62aa3b586a72d5b3b6c91c3168929e7000ef3fed041d/wcwidth-0.9.2.tar.gz", hash = "sha256:ae0ef90b90f6af38b54f1fe6d58662ec33b3cb4b8391958a62416d654231727b", size = 955039 } +wheels = [ + { url = "https://files.pythonhosted.org/packages/59/1e/4532a81fb9dfbf4114a816775e0a36c3a64ee1d1f4bba2094e2da50be5dc/wcwidth-0.9.2-cp310-abi3-macosx_10_9_x86_64.whl", hash = "sha256:7ef5a940bd5e30bac6e721f1a48fce0cd7bb3ece19e9c5d139e72c76c35cfd07", size = 605343 }, + { url = "https://files.pythonhosted.org/packages/a0/07/cb6940e81134b7ed25fa312ee9ab536a63db0793b149f88a90e603ceace9/wcwidth-0.9.2-cp310-abi3-macosx_11_0_arm64.whl", hash = "sha256:ae0800c5339423cc53d33a266ad264b42ba8aaa16d4464f6e6b1bee607f50b17", size = 609960 }, + { url = "https://files.pythonhosted.org/packages/a4/80/15ad05d40bfa99155639fb9e13b3d77083aa0fab893c816db2543d29005c/wcwidth-0.9.2-cp310-abi3-manylinux1_i686.manylinux2014_i686.manylinux_2_17_i686.manylinux_2_5_i686.whl", hash = "sha256:9e542f1f8475b78452a295495d7a5bc3ead565112e9446a64dc93462a41c2a79", size = 762566 }, + { url = "https://files.pythonhosted.org/packages/bc/f0/b8ef7758003d66b60f093695831a86dcc726aac01ee6446ffcbda27b61e3/wcwidth-0.9.2-cp310-abi3-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:674b518af28d38ee645ff97b74f5760abee5fad4bac74413bfc4b881ef2ce724", size = 771632 }, + { url = "https://files.pythonhosted.org/packages/db/6c/f940133c71427c208575910e981942bd78c98b1f7cd0d1425ca4b7457c04/wcwidth-0.9.2-cp310-abi3-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:751bef0ab404b6a1dc028b56b4b85d46486be1c55833f80da533e42dc691f389", size = 769763 }, + { url = "https://files.pythonhosted.org/packages/92/8f/285f862826f721964ec7c42f81dc53d23afbd723a0f4cd989651f8218e25/wcwidth-0.9.2-cp310-abi3-musllinux_1_2_aarch64.whl", hash = "sha256:c3d80f39ba4653a595edae9aa46a509d14883790a8fc23c5db221ceb207f64b7", size = 782134 }, + { url = "https://files.pythonhosted.org/packages/c2/2d/64aa54882a5d556d3654c1f926d9118b797461033e23a158409941a37c8f/wcwidth-0.9.2-cp310-abi3-musllinux_1_2_i686.whl", hash = "sha256:0a47e03d8293590ecce66c45dc20ff7b4b885e3c78093722239585eca0d77ab2", size = 782851 }, + { url = "https://files.pythonhosted.org/packages/59/39/52389f6de7fe2e9c14ceb8253dd99034bd86e1c87847ea3c100a97dded9a/wcwidth-0.9.2-cp310-abi3-musllinux_1_2_x86_64.whl", hash = "sha256:67d901a4ad99249eb775b4ee4769ca97fa405d35a75f46e83166910a47003f04", size = 784621 }, + { url = "https://files.pythonhosted.org/packages/b3/8b/20225500a076ace27bbcc8a6fd7c55125133c57a618816c7b7b8b73070b1/wcwidth-0.9.2-cp310-abi3-win32.whl", hash = "sha256:ee1fd0db9d9fd711a70f3e7765e0e04c05d26982fa05361456163062549d7da4", size = 593123 }, + { url = "https://files.pythonhosted.org/packages/5a/d6/b0690f55ea0483530a18bac917fbadbf54f35122510446fc370f5f1c2453/wcwidth-0.9.2-cp310-abi3-win_amd64.whl", hash = "sha256:2a9746de704242bd4fdaabb31dd46b82f694a56a8d21081ad89b679a89da9fec", size = 597827 }, + { url = "https://files.pythonhosted.org/packages/e5/11/6ecf4e9e268ab1a4ec617ffcccc2ee4a71301625f5490912dbaba462fa9c/wcwidth-0.9.2-cp310-abi3-win_arm64.whl", hash = "sha256:b9c6ab615e03723b7f8760ea2f27758d656e7e13b51515c9dca5c3e8b04612fa", size = 598415 }, + { url = "https://files.pythonhosted.org/packages/9c/b4/0bfa065af506540d9d558e3e5548cff00bc1f9b24e6e2a8512498e8628de/wcwidth-0.9.2-py3-none-any.whl", hash = "sha256:89ca642c5bf0101157a09366be69fad0379db1f700ae39a920e103234573670e", size = 301667 }, +] + +[[package]] +name = "werkzeug" +version = "3.1.9" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "markupsafe" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/a4/34/4dd12fc8bb7d61c91467ec3efe415ffa7d5456f799954b40c5bbaeae470e/werkzeug-3.1.9.tar.gz", hash = "sha256:55ca7c70a75689be937aa27f8ff4b018f06ff4838fc73045560bf0f5a1291060", size = 940188 } +wheels = [ + { url = "https://files.pythonhosted.org/packages/a1/38/df03f564f43cec2684823f3cccae1a652ee7face1cbaa76fb223096e64d7/werkzeug-3.1.9-py3-none-any.whl", hash = "sha256:6392e50c78460ba618e5b21f08a71f59c99ce99cdc6cf6e3dd7e6ccca8754fab", size = 228700 }, +] diff --git a/requirements.txt b/requirements.txt new file mode 100644 index 0000000000000000000000000000000000000000..13699a48ed47077c9b6aa9bb1723da3fa932759f GIT binary patch literal 4206 zcmai%OK($25QTd^()<)hu?-AauwaWoLSieQ)M-yi>v%C6J;D>$M8KK^aP`{|C)p z8B2d#rt!HbhxRPz24`m*d3g*eGHfS;Lpch?P8OyiN5=bYixBxy@~>qkPxj#RT^rAm zO%%ggwjNp($gdQ!BgIN{LI@9C6c6EJFCTk(hAHr)(U0?EaW$57eUkOd8%Z4nl9Bu# z6~$cNYx&vfdoSCqBV|ZSsGRwWFBZ3UO05`faT!zK0L6!+|aP6w*XaC1KaOn#jUBtc=1A zr=5W-apluHNj4D^60ilQ)Pfq!C}mM3{~ zzVKBer&`w?2@&43C{{Xqlx!t5iNDHcvIz=jdMmW(nDMNIx$t4*PM>tvA()<>7;((b z2At4wWE}b^6gVvVpx?L3*GT`@Xki(Yna9_ivo+F`?u861 z$A~$t{Hk|Z4dlzS*36~7u3k?y#AKSt1B_3i1I$HE+}i*6bk*F6H#1Bgdb03MZ!r3l zH7kRc`b@EXMD3cbjCAeZ3J?8a%S28V$@Q@1?^2uIbv=?L`Z9BLu1Oa+f!V$8KI2Ss z^?Uu>HWQo33Nx+7jD?r5F_Yc(WQE$v3h4T=)@?AmP*-0v%DI>D<++!l8Uzc*^hqch z^$tG2=)X`J0%WUgbp>@;VR(>uk!xhJ;Gj1Jvn##=H^`xeP%s*Ol#p&(T?Qbl3zY{U& zdy4NMl-vgL&I2y2IZpN*T{_k`w~AZoFQt3Fm27p_;%X#k|G0+0S9#mZBXfJCNeJ^f z58c`Djs|xm=DVl8r-ZG6&eJM&*~z}G5g*-TG}vKU<}}D0`exytry|fwzL&dG2 zE=H4myAWGgN*rcsuT$)5?gmSJvQvNUbZ3&2>D{OHIzb;d*S}OYUDm-gXl3^ zfNwI#?Bd(qn7x6AVW;NNxEBxR&0T>VFekH(Y)$kFuN!r_>w&I>#k>s~d-9!UZWQsG zKb~=Z8?iAJ?>&8+6Kql;iR4SfGu1EuDmJE#@95O6^G)5E$w(HFrAaf=kb)Joz&tTa{M(^r^ gLF>6EnVXK@+SshS$eQdT_M4v)FE=`NLFssZ0>%hw8UO$Q literal 0 HcmV?d00001 From 1dd37814eff23cf029c4c911f7dda14e0e3e487a Mon Sep 17 00:00:00 2001 From: Tristan Gerrish Date: Thu, 22 Oct 2026 09:58:58 +0100 Subject: [PATCH 02/16] unsure what these changes are --- .../Compute/GenerateTOML.cs | 74 ++++++++++ .../Compute/BasePythonEnvironment.cs | 2 +- Python_Engine/Compute/Download.cs | 2 + Python_Engine/Compute/GenerateTOML.cs | 84 ++++++++++++ Python_Engine/Compute/Install.cs | 126 ++++++++++-------- Python_Engine/Compute/Remove.cs | 2 - Python_Engine/Compute/RequirementsTxt.cs | 1 + Python_Engine/Compute/Run.cs | 4 +- Python_Engine/Compute/UnzipFile.cs | 1 + Python_Engine/Compute/UpdateBHoMPackages.cs | 2 + Python_Engine/Compute/VirtualEnvironment.cs | 7 +- 11 files changed, 240 insertions(+), 65 deletions(-) create mode 100644 .ci/unit_tests/Python_Toolkit_Tests/Compute/GenerateTOML.cs create mode 100644 Python_Engine/Compute/GenerateTOML.cs diff --git a/.ci/unit_tests/Python_Toolkit_Tests/Compute/GenerateTOML.cs b/.ci/unit_tests/Python_Toolkit_Tests/Compute/GenerateTOML.cs new file mode 100644 index 00000000..8a47ee68 --- /dev/null +++ b/.ci/unit_tests/Python_Toolkit_Tests/Compute/GenerateTOML.cs @@ -0,0 +1,74 @@ +/* + * This file is part of the Buildings and Habitats object Model (BHoM) + * Copyright (c) 2015 - 2026, the respective contributors. All rights reserved. + * + * Each contributor holds copyright over their respective contributions. + * The project versioning (Git) records all such contribution source information. + * + * + * The BHoM is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3.0 of the License, or + * (at your option) any later version. + * + * The BHoM is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this code. If not, see . + */ + +using BH.oM.Python.Enums; +using NUnit.Framework; +using System; +using System.Collections.Generic; +using System.IO; + +namespace BH.Tests.Engine.Python.Compute +{ + public class GenerateTOMLTests + { + [Test] + [Description("Check whether the TOML file is generated as expected.")] + public void GeneratesTOMLWithRequestedVersionAndPackages() + { + string temporaryDirectory = Path.Combine(Path.GetTempPath(), $"BHoM_PythonToolkit_{Guid.NewGuid():N}"); + Directory.CreateDirectory(temporaryDirectory); + + try + { + List packages = ["numpy", "pandas"]; + string projectName = "test-project"; + string tomlPath = Path.Combine(temporaryDirectory, "pyproject.toml"); + + string generatedPath = BH.Engine.Python.Compute.GenerateTOML( + PythonVersion.v3_10, + projectName, + packages, + temporaryDirectory); + + Assert.That(generatedPath, Is.EqualTo(tomlPath)); + Assert.That(File.Exists(tomlPath), Is.True, "The TOML file should be created in the requested directory."); + + string toml = File.ReadAllText(tomlPath); + Assert.That(toml, Does.Contain("[project]")); + Assert.That(toml, Does.Contain($"name = \"{projectName}\"")); + Assert.That(toml, Does.Contain("version = \"0.1.0\"")); + Assert.That(toml, Does.Contain($"requires-python = \"{PythonVersion.v3_10}\"")); + Assert.That(toml, Does.Contain("\"numpy\"")); + Assert.That(toml, Does.Contain("\"pandas\"")); + } + finally + { + if (Directory.Exists(temporaryDirectory)) + { + Directory.Delete(temporaryDirectory, recursive: true); + } + } + } + + } +} + diff --git a/Python_Engine/Compute/BasePythonEnvironment.cs b/Python_Engine/Compute/BasePythonEnvironment.cs index 8ec03656..d28bae5c 100644 --- a/Python_Engine/Compute/BasePythonEnvironment.cs +++ b/Python_Engine/Compute/BasePythonEnvironment.cs @@ -51,7 +51,7 @@ public static PythonEnvironment BasePythonEnvironment( if (!Directory.Exists(Query.DirectoryEnvironments())) { - // create PythonEnvironments directory if it doesnt already exist + // create PythonEnvironments directory if it doesn't already exist Directory.CreateDirectory(Query.DirectoryEnvironments()); } diff --git a/Python_Engine/Compute/Download.cs b/Python_Engine/Compute/Download.cs index 054f03aa..d7562791 100644 --- a/Python_Engine/Compute/Download.cs +++ b/Python_Engine/Compute/Download.cs @@ -33,6 +33,7 @@ namespace BH.Engine.Python { public static partial class Compute { + [ToBeRemoved("10.0")] [Description("Download a file from a Url.")] [Input("fileUrl", "The file to download.")] [Input("targetDirectory", "The destination directory to download the file to.")] @@ -89,6 +90,7 @@ public static string DownloadFile( /******************************************************/ + [ToBeRemoved("10.0")] [Description("Download and install a specified version of python, and return the executable for it.")] [Input("version", "The version of python to download.")] [Output("pythonExecutable", "The executable (python.exe) for the python version that was installed.")] diff --git a/Python_Engine/Compute/GenerateTOML.cs b/Python_Engine/Compute/GenerateTOML.cs new file mode 100644 index 00000000..d422fa29 --- /dev/null +++ b/Python_Engine/Compute/GenerateTOML.cs @@ -0,0 +1,84 @@ +/* + * This file is part of the Buildings and Habitats object Model (BHoM) + * Copyright (c) 2015 - 2026, the respective contributors. All rights reserved. + * + * Each contributor holds copyright over their respective contributions. + * The project versioning (Git) records all such contribution source information. + * + * + * The BHoM is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3.0 of the License, or + * (at your option) any later version. + * + * The BHoM is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this code. If not, see . + */ + +using BH.oM.Base.Attributes; +using BH.oM.Python.Enums; +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.IO; +using System.Linq; +using System.Reflection; +using System.Text; + +namespace BH.Engine.Python +{ + public static partial class Compute + { + [Description("Generate a TOML file suitable for creating a Python environment. This is only intended for custom virtual environments, and should not be used for creation of toolkit-specific environments which should have their own fixed *.toml files where versioning and packages are managed centrally.")] + [Input("version", "The target version of python to be installed or retrieved.")] + [Input("name", "The name of the Python project.")] + [Input("packages", "A list of Python packages to be included in the environment.")] + [Input("directory", "The directory where the TOML file should be generated.")] + [Output("tomlFile", "The path to the generated TOML file.")] + public static string GenerateTOML( + PythonVersion version, + string name, + IEnumerable packages, + string directory + ) + { + if (string.IsNullOrWhiteSpace(directory)) + throw new ArgumentException("directory cannot be empty.", nameof(directory)); + Directory.CreateDirectory(directory); + + // get the Python version string + FieldInfo field = version.GetType().GetField(version.ToString()); + string pythonVersion = field?.GetCustomAttribute()?.Description; + var v = Version.Parse(pythonVersion); + string lower = $"{v.Major}.{v.Minor}"; + string upper = $"{v.Major}.{v.Minor + 1}"; + string pythonVersionString = $">={lower},<{upper}"; + + string filePath = Path.Combine(directory, "pyproject.toml"); + + var sb = new StringBuilder(); + + sb.AppendLine("[project]"); + sb.AppendLine($"name = \"{name}\""); + sb.AppendLine("version = \"0.1.0\""); + sb.AppendLine($"requires-python = \"{pythonVersionString}\""); + sb.AppendLine(); + + sb.AppendLine("dependencies = ["); + foreach (string package in packages ?? Enumerable.Empty()) + { + sb.AppendLine($" \"{package}\","); + } + sb.AppendLine("]"); + + File.WriteAllText(filePath, sb.ToString()); + + return filePath; + } + } +} diff --git a/Python_Engine/Compute/Install.cs b/Python_Engine/Compute/Install.cs index 7b7f0c91..ff3039e4 100644 --- a/Python_Engine/Compute/Install.cs +++ b/Python_Engine/Compute/Install.cs @@ -22,12 +22,10 @@ using BH.oM.Base.Attributes; using BH.oM.Python; -using System; using System.Collections.Generic; using System.ComponentModel; using System.Diagnostics; using System.IO; -using System.Xml.Linq; namespace BH.Engine.Python { @@ -43,33 +41,38 @@ List packages { if (!File.Exists(executable)) { - BH.Engine.Base.Compute.RecordError("Python executable not found at " + executable); + Base.Compute.RecordError("Python executable not found at " + executable); } if (packages.Count == 0) { - BH.Engine.Base.Compute.RecordError("No packages to install."); + Base.Compute.RecordError("No packages to install."); } + string startDirectory = Directory.GetParent(Directory.GetParent(executable).FullName).FullName; + string packagesString = string.Join(" ", packages); - System.Diagnostics.Process process = new System.Diagnostics.Process() + + ProcessStartInfo psi = new ProcessStartInfo { - StartInfo = new System.Diagnostics.ProcessStartInfo() - { - FileName = executable, - Arguments = $"-m pip install --no-warn-script-location {packagesString}", - UseShellExecute = false, - RedirectStandardError = true - } + FileName = "uv", + Arguments = $"pip install {packagesString}", + WorkingDirectory = startDirectory, + RedirectStandardOutput = true, + RedirectStandardError = true, + UseShellExecute = false, + CreateNoWindow = true }; - process.StartInfo.Environment["PYTHONHOME"] = ""; - using (Process p = Process.Start(process.StartInfo)) + using (Process process = Process.Start(psi)) { - string standardError = p.StandardError.ReadToEnd(); - p.WaitForExit(); - if (p.ExitCode != 0) - BH.Engine.Base.Compute.RecordError($"Error installing packages [{packagesString}].\n{standardError}"); - } + string output = process.StandardOutput.ReadToEnd(); + string error = process.StandardError.ReadToEnd(); + + process.WaitForExit(); + + if (process.ExitCode != 0) + BH.Engine.Base.Compute.RecordError($"Error installing packages [{packagesString}].\n{error}"); + }; } [Description("Install a list of packages to a given Python executable.")] @@ -93,33 +96,36 @@ string requirements { if (!File.Exists(executable)) { - BH.Engine.Base.Compute.RecordError($"Python executable not found at {executable}"); + Base.Compute.RecordError("Python executable not found at " + executable); } if (!File.Exists(requirements)) { - BH.Engine.Base.Compute.RecordError($"requirements.txt not found at {requirements}"); + Base.Compute.RecordError("requirements.txt not found at " + requirements); } - - System.Diagnostics.Process process = new System.Diagnostics.Process() + string startDirectory = Directory.GetParent(Directory.GetParent(executable).FullName).FullName; + + ProcessStartInfo psi = new ProcessStartInfo { - StartInfo = new System.Diagnostics.ProcessStartInfo() - { - FileName = executable, - Arguments = $"-m pip install --no-warn-script-location -r {Modify.AddQuotesIfRequired(requirements)}", - UseShellExecute = false, - RedirectStandardError = true, - } + FileName = "uv", + Arguments = $"pip install -r {requirements}", + WorkingDirectory = startDirectory, + RedirectStandardOutput = true, + RedirectStandardError = true, + UseShellExecute = false, + CreateNoWindow = true }; - process.StartInfo.Environment["PYTHONHOME"] = ""; - using (Process p = Process.Start(process.StartInfo)) + using (Process process = Process.Start(psi)) { - string standardError = p.StandardError.ReadToEnd(); - p.WaitForExit(); - if (p.ExitCode != 0) - BH.Engine.Base.Compute.RecordError($"Error installing packages from {requirements}.\n{standardError}"); - } + string output = process.StandardOutput.ReadToEnd(); + string error = process.StandardError.ReadToEnd(); + + process.WaitForExit(); + + if (process.ExitCode != 0) + BH.Engine.Base.Compute.RecordError($"Error installing requirements from \"{requirements}\".\n{error}"); + }; } [Description("Install packages from a requirements.txt file to a given Python environment.")] @@ -144,27 +150,36 @@ string packageDirectory { if (!File.Exists(executable)) { - BH.Engine.Base.Compute.RecordError("Python executable not found at " + executable); + Base.Compute.RecordError("Python executable not found at " + executable); } - - System.Diagnostics.Process process = new System.Diagnostics.Process() + + if (!Directory.Exists(packageDirectory)) { - StartInfo = new System.Diagnostics.ProcessStartInfo() - { - FileName = executable, - Arguments = $"-m pip install --no-warn-script-location -e {Modify.AddQuotesIfRequired(packageDirectory)}", - UseShellExecute = false, - RedirectStandardError = true, - } + Base.Compute.RecordError("packageDirectory not found at " + packageDirectory); + } + + string startDirectory = Directory.GetParent(Directory.GetParent(executable).FullName).FullName; + + ProcessStartInfo psi = new ProcessStartInfo + { + FileName = "uv", + Arguments = $"pip install --no-warn-script-location -e {Modify.AddQuotesIfRequired(packageDirectory)}", + WorkingDirectory = startDirectory, + RedirectStandardOutput = true, + RedirectStandardError = true, + UseShellExecute = false, + CreateNoWindow = true }; - process.StartInfo.Environment["PYTHONHOME"] = ""; - using (Process p = Process.Start(process.StartInfo)) + using (Process process = Process.Start(psi)) { - string standardError = p.StandardError.ReadToEnd(); - p.WaitForExit(); - if (p.ExitCode != 0) - BH.Engine.Base.Compute.RecordError($"Error installing package from \"{packageDirectory}\".\n{standardError}"); - } + string output = process.StandardOutput.ReadToEnd(); + string error = process.StandardError.ReadToEnd(); + + process.WaitForExit(); + + if (process.ExitCode != 0) + BH.Engine.Base.Compute.RecordError($"Error installing package from \"{packageDirectory}\".\n{error}"); + }; } [Description("Install a local Python package to a given Python environment.")] @@ -179,6 +194,3 @@ string packageDirectory } } } - - - diff --git a/Python_Engine/Compute/Remove.cs b/Python_Engine/Compute/Remove.cs index 46adb528..ca5688e6 100644 --- a/Python_Engine/Compute/Remove.cs +++ b/Python_Engine/Compute/Remove.cs @@ -23,7 +23,6 @@ using BH.oM.Base.Attributes; using BH.oM.Python.Enums; using System; -using System.Collections.Generic; using System.ComponentModel; using System.Diagnostics; using System.IO; @@ -32,7 +31,6 @@ namespace BH.Engine.Python { public static partial class Compute { - [Description("Remove a named BHoM Python kernel.")] [Input("kernelName", "The name of the kernel to remove.")] public static void RemoveKernel(string kernelName) diff --git a/Python_Engine/Compute/RequirementsTxt.cs b/Python_Engine/Compute/RequirementsTxt.cs index 7084732d..f49f31bf 100644 --- a/Python_Engine/Compute/RequirementsTxt.cs +++ b/Python_Engine/Compute/RequirementsTxt.cs @@ -30,6 +30,7 @@ namespace BH.Engine.Python { public static partial class Compute { + [ToBeRemoved("10.0")] [Description("Create a requirements.txt file from an existing Python executable.")] [Input("executable", "The path to the Python executable to create the requirements.txt file from.")] [Input("targetPath", "The path to the requirements.txt file to create. If not specified, the file will be created in the same directory as the executable.")] diff --git a/Python_Engine/Compute/Run.cs b/Python_Engine/Compute/Run.cs index 7340e693..771e869b 100644 --- a/Python_Engine/Compute/Run.cs +++ b/Python_Engine/Compute/Run.cs @@ -34,7 +34,8 @@ namespace BH.Engine.Python { public static partial class Compute - { + { + [ToBeRemoved("10.0")] [Description("Run a command via CMD and return stdout.")] [Input("command", "The command to be run.")] [Input("hideWindows", "Set to True to hide cmd windows.")] @@ -75,6 +76,7 @@ public static string RunCommandStdout(string command, bool hideWindows = true, s return stdout.Trim(); } + [ToBeRemoved("10.0")] [Description("Run a string containing Python code and return the output. The string passed should end with a \"print\" statement, and other print statements within it should be captured within the script to ensure only a single output string is passed back to this method.")] [Input("env", "The Python environment with which to run the Python script.")] [Input("pythonString", "The string containing the Python script.")] diff --git a/Python_Engine/Compute/UnzipFile.cs b/Python_Engine/Compute/UnzipFile.cs index 5c292a41..a4746744 100644 --- a/Python_Engine/Compute/UnzipFile.cs +++ b/Python_Engine/Compute/UnzipFile.cs @@ -29,6 +29,7 @@ namespace BH.Engine.Python { public static partial class Compute { + [ToBeRemoved("10.0")] //This method is no longer used by python toolkit, and perhaps should be removed or moved to the file toolkit instead. [Description("Extract the contents of an archive.")] [Input("archivePath", "The archive to extract.")] diff --git a/Python_Engine/Compute/UpdateBHoMPackages.cs b/Python_Engine/Compute/UpdateBHoMPackages.cs index c1f3024f..6ed02d25 100644 --- a/Python_Engine/Compute/UpdateBHoMPackages.cs +++ b/Python_Engine/Compute/UpdateBHoMPackages.cs @@ -36,6 +36,7 @@ namespace BH.Engine.Python { public static partial class Compute { + [ToBeRemoved("10.0")] [Description("Using the environment name (and version if the environment name is the base python environment), directly install/update missing BHoM packages.")] [Input("environmentName", "The name of the environment to update.")] [Input("version", "If the environment name is the name of the base python environment, the version that needs updating.")] @@ -66,6 +67,7 @@ public static void UpdateBHoMPackages(this string environmentName, PythonVersion /***************************************************/ + [ToBeRemoved("10.0")] [Description("Using a PythonEnvironment, directly install/update missing BHoM packages.")] [Input("environment", "The python environment to update.")] public static void UpdateBHoMPackages(this PythonEnvironment environment) diff --git a/Python_Engine/Compute/VirtualEnvironment.cs b/Python_Engine/Compute/VirtualEnvironment.cs index 6ed9dde7..4779cba4 100644 --- a/Python_Engine/Compute/VirtualEnvironment.cs +++ b/Python_Engine/Compute/VirtualEnvironment.cs @@ -20,7 +20,6 @@ * along with this code. If not, see . */ -using BH.Engine.Base; using BH.oM.Base.Attributes; using BH.oM.Python; using BH.oM.Python.Enums; @@ -28,7 +27,6 @@ using System.ComponentModel; using System.Diagnostics; using System.IO; -using System.Linq; namespace BH.Engine.Python { @@ -36,11 +34,12 @@ public static partial class Compute { [Description("Install a Python Virtual Environment of a given version and name.")] [Input("version", "The version of Python to use for this environment.")] - [Input("name", "The name of this virtualenv.")] + [Input("name", "The name of this venv.")] [Input("reload", "Reload the virtual environment rather than recreating it, if it already exists.")] - [Output("env", "The exectuble for the resultant virtualenv.")] + [Output("env", "The executable for the resultant venv.")] public static PythonEnvironment VirtualEnvironment(this PythonVersion version, string name, bool reload = true) { + # TODO - how to handle package versions defined in an associated requirements.txt file if (!Query.IsValidEnvironmentName(name)) { BH.Engine.Base.Compute.RecordError("A BHoM Python virtual environment cannot cannot contain invalid filepath characters."); From bf97b282a16666bc9ac8175f4ff07e09a25818e2 Mon Sep 17 00:00:00 2001 From: Tristan Gerrish Date: Thu, 22 Oct 2026 19:24:14 +0100 Subject: [PATCH 03/16] updated CS methods, untested --- .gitignore | 5 +- .../Compute/BasePythonEnvironment.cs | 86 ------- Python_Engine/Compute/Download.cs | 154 ------------ Python_Engine/Compute/GenerateTOML.cs | 84 ------- Python_Engine/Compute/Install.cs | 221 +++++++----------- Python_Engine/Compute/Remove.cs | 121 +++------- Python_Engine/Compute/RequirementsTxt.cs | 92 -------- Python_Engine/Compute/Run.cs | 50 ++-- Python_Engine/Compute/UnzipFile.cs | 87 ------- Python_Engine/Compute/UpdateBHoMPackages.cs | 84 +------ Python_Engine/Compute/VirtualEnvironment.cs | 128 ++++------ Python_Engine/Convert/ToPython.cs | 42 ---- Python_Engine/Modify/AddQuotesIfRequired.cs | 5 - Python_Engine/Python_Engine.csproj | 3 + Python_Engine/Query/Directory.cs | 35 +-- Python_Engine/Query/EmbeddableURL.cs | 97 -------- Python_Engine/Query/IsValidEnvironmentName.cs | 56 ----- Python_Engine/Query/ToolkitName.cs | 2 +- Python_Engine/Query/Version.cs | 3 - Python_Engine/Query/VirtualEnvironment.cs | 93 +++----- Python_oM/Enums/PythonVersion.cs | 137 ----------- Python_oM/PythonEnvironment.cs | 7 - requirements.txt | Bin 4206 -> 0 bytes 23 files changed, 247 insertions(+), 1345 deletions(-) delete mode 100644 Python_Engine/Compute/BasePythonEnvironment.cs delete mode 100644 Python_Engine/Compute/Download.cs delete mode 100644 Python_Engine/Compute/GenerateTOML.cs delete mode 100644 Python_Engine/Compute/RequirementsTxt.cs delete mode 100644 Python_Engine/Compute/UnzipFile.cs delete mode 100644 Python_Engine/Convert/ToPython.cs delete mode 100644 Python_Engine/Query/EmbeddableURL.cs delete mode 100644 Python_Engine/Query/IsValidEnvironmentName.cs delete mode 100644 Python_oM/Enums/PythonVersion.cs delete mode 100644 requirements.txt diff --git a/.gitignore b/.gitignore index a4770e87..f92923f1 100644 --- a/.gitignore +++ b/.gitignore @@ -218,6 +218,5 @@ dmypy.json # Cython debug symbols cython_debug/ -# unignored files -!example.sql - +# Additional directories to ignore +.benchmarks/ \ No newline at end of file diff --git a/Python_Engine/Compute/BasePythonEnvironment.cs b/Python_Engine/Compute/BasePythonEnvironment.cs deleted file mode 100644 index d28bae5c..00000000 --- a/Python_Engine/Compute/BasePythonEnvironment.cs +++ /dev/null @@ -1,86 +0,0 @@ -/* - * This file is part of the Buildings and Habitats object Model (BHoM) - * Copyright (c) 2015 - 2026, the respective contributors. All rights reserved. - * - * Each contributor holds copyright over their respective contributions. - * The project versioning (Git) records all such contribution source information. - * - * - * The BHoM is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as published by - * the Free Software Foundation, either version 3.0 of the License, or - * (at your option) any later version. - * - * The BHoM is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with this code. If not, see . - */ - -using BH.oM.Base.Attributes; -using BH.oM.Python; -using BH.oM.Python.Enums; -using System.Collections.Generic; -using System.ComponentModel; -using System.Diagnostics; -using System.IO; -using System.Linq; - -namespace BH.Engine.Python -{ - public static partial class Compute - { - [Description("Retrieve or reinstall the base Python Environment for BHoM workflows.")] - [Input("version", "The target version of python to be installed or retrieved.")] - [Input("reload", "Reload the base Python environment rather than recreating it, if it already exists.")] - [Input("run", "Start the installation/retrieval of the BHoM Base Python Environment.")] - [Output("env", "The base Python Environment for all BHoM workflows.")] - public static PythonEnvironment BasePythonEnvironment( - PythonVersion version = PythonVersion.v3_10, - bool reload = true, - bool run = false - ) - { - if (!run) - { - return null; - } - - if (!Directory.Exists(Query.DirectoryEnvironments())) - { - // create PythonEnvironments directory if it doesn't already exist - Directory.CreateDirectory(Query.DirectoryEnvironments()); - } - - // determine whether the base environment already exists - string targetExecutable = Path.Combine(Query.DirectoryBaseEnvironment(version), "python.exe"); - bool exists = File.Exists(targetExecutable); - - if (exists && reload) - { - PythonEnvironment env = new PythonEnvironment() { Name = Query.ToolkitName(), Executable = targetExecutable }; - UpdateBHoMPackages(env); - return env; - } - - if (exists && !reload) - // remove all existing environments and kernels - RemoveEverything(); - - // download and run the installer for the target Python version - string exe = version.DownloadPythonVersion(); - - // install essential packages into base environment - InstallPackages(exe, new List() { "virtualenv", "jupyterlab", "black", "pylint" }); - InstallPackageLocal(exe, Path.Combine(Query.DirectoryCode(), Query.ToolkitName())); - - return new PythonEnvironment() { Name = Query.ToolkitName(), Executable = exe }; - } - } -} - - - diff --git a/Python_Engine/Compute/Download.cs b/Python_Engine/Compute/Download.cs deleted file mode 100644 index d7562791..00000000 --- a/Python_Engine/Compute/Download.cs +++ /dev/null @@ -1,154 +0,0 @@ -/* - * This file is part of the Buildings and Habitats object Model (BHoM) - * Copyright (c) 2015 - 2026, the respective contributors. All rights reserved. - * - * Each contributor holds copyright over their respective contributions. - * The project versioning (Git) records all such contribution source information. - * - * - * The BHoM is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as published by - * the Free Software Foundation, either version 3.0 of the License, or - * (at your option) any later version. - * - * The BHoM is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with this code. If not, see . - */ - -using BH.oM.Base.Attributes; -using BH.oM.Python.Enums; -using System; -using System.ComponentModel; -using System.Diagnostics; -using System.IO; -using System.Reflection; -using System.Xml.Linq; - -namespace BH.Engine.Python -{ - public static partial class Compute - { - [ToBeRemoved("10.0")] - [Description("Download a file from a Url.")] - [Input("fileUrl", "The file to download.")] - [Input("targetDirectory", "The destination directory to download the file to.")] - [Input("filename", "An optional input to rename the downloaded file.")] - [Input("overwrite", "An optional input to overwrite the file if it already exists, otherwise if it does then return the existing file.")] - [Output("filePath", "The path to the downloaded file.")] - public static string DownloadFile( - string fileUrl, - string targetDirectory, - string filename = null, - bool overwrite = true - ) - { - if (string.IsNullOrWhiteSpace(fileUrl)) - { - BH.Engine.Base.Compute.RecordError($"The fileUrl cannot be null or empty."); - return null; - } - - - if (string.IsNullOrWhiteSpace(targetDirectory)) - { - BH.Engine.Base.Compute.RecordError($"The targetDirectory cannot be null or empty."); - return null; - } - - - if (!Directory.Exists(targetDirectory)) - { - BH.Engine.Base.Compute.RecordError($"The targetDirectory \"{targetDirectory}\" does not exist."); - return null; - } - - - if (string.IsNullOrWhiteSpace(filename)) - filename = Path.GetFileName(fileUrl); - - string filePath = Path.Combine(targetDirectory, filename); - - if (File.Exists(filePath)) - { - if (!overwrite) - return filePath; - File.Delete(filePath); - } - - using (var client = new System.Net.WebClient()) - { - client.DownloadFile(fileUrl, filePath); - } - - return filePath; - } - - /******************************************************/ - - [ToBeRemoved("10.0")] - [Description("Download and install a specified version of python, and return the executable for it.")] - [Input("version", "The version of python to download.")] - [Output("pythonExecutable", "The executable (python.exe) for the python version that was installed.")] - public static string DownloadPythonVersion(this PythonVersion version) - { - string url = version.EmbeddableURL(); - - string basePath = Path.Combine(Query.DirectoryBaseEnvironment(version)); - - if (File.Exists(Path.Combine(basePath, "python.exe"))) - return Path.Combine(basePath, "python.exe"); - - if (!Directory.Exists(basePath)) - Directory.CreateDirectory(basePath); - else - { - Directory.Delete(basePath, true); //if there are any files here already for some reason, remove them. - Directory.CreateDirectory(basePath); - } - - string installerFile = DownloadFile(url, basePath, "installer.exe"); - - using (Process install = new Process() - { - StartInfo = new ProcessStartInfo() - { - FileName = installerFile, - Arguments = $"/passive InstallAllUsers=0 InstallLauncherAllUsers=0 Include_launcher=0 Shortcuts=0 AssociateFiles=0 Include_tools=0 Include_test=0 TargetDir={Modify.AddQuotesIfRequired(basePath)}", - RedirectStandardError = true, - UseShellExecute = false, - } - }) - { - install.StartInfo.Environment["PYTHONHOME"] = ""; - install.Start(); - string stderr = install.StandardError.ReadToEnd(); - install.WaitForExit(); - if (install.ExitCode != 0) - { - BH.Engine.Base.Compute.RecordError($"Error installing python: {stderr}"); - return null; - } - } - - string pythonExePath = Path.Combine(basePath, "python.exe"); - - // It is possible for the installer to exit with ExitCode==0 without installing Python in the requested location. This can happen if the same version of Python appears to be installed elsewhere on the system. It can also happen if there was a 'dodgy' uninstall of a previous version. We've been unable to figure out where the installer is actually looking for existing installs. To fix dodgy uninstalls, run the installer again for the target version of Python (download links within EmbeddableURL.cs) and run a combination of 'repair' and 'uninstall' until it's gone. Installing the py launcher (via 'modify' in the installer) before attempting to uninstall could also help. - - if (!File.Exists(pythonExePath)) - { - BH.Engine.Base.Compute.RecordError($"The Python installer appears to have completed successfully, but \n{pythonExePath} does not exist. \nThis usually means that Python {version} already exists on your machine, but in a different location. \nThis toolkit is therefore unable to run any Python commands right now. \nTry uninstalling Python {version} from your system before running this BHoM method again."); - return null; - } - - return pythonExePath; - } - } -} - - - diff --git a/Python_Engine/Compute/GenerateTOML.cs b/Python_Engine/Compute/GenerateTOML.cs deleted file mode 100644 index d422fa29..00000000 --- a/Python_Engine/Compute/GenerateTOML.cs +++ /dev/null @@ -1,84 +0,0 @@ -/* - * This file is part of the Buildings and Habitats object Model (BHoM) - * Copyright (c) 2015 - 2026, the respective contributors. All rights reserved. - * - * Each contributor holds copyright over their respective contributions. - * The project versioning (Git) records all such contribution source information. - * - * - * The BHoM is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as published by - * the Free Software Foundation, either version 3.0 of the License, or - * (at your option) any later version. - * - * The BHoM is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with this code. If not, see . - */ - -using BH.oM.Base.Attributes; -using BH.oM.Python.Enums; -using System; -using System.Collections.Generic; -using System.ComponentModel; -using System.IO; -using System.Linq; -using System.Reflection; -using System.Text; - -namespace BH.Engine.Python -{ - public static partial class Compute - { - [Description("Generate a TOML file suitable for creating a Python environment. This is only intended for custom virtual environments, and should not be used for creation of toolkit-specific environments which should have their own fixed *.toml files where versioning and packages are managed centrally.")] - [Input("version", "The target version of python to be installed or retrieved.")] - [Input("name", "The name of the Python project.")] - [Input("packages", "A list of Python packages to be included in the environment.")] - [Input("directory", "The directory where the TOML file should be generated.")] - [Output("tomlFile", "The path to the generated TOML file.")] - public static string GenerateTOML( - PythonVersion version, - string name, - IEnumerable packages, - string directory - ) - { - if (string.IsNullOrWhiteSpace(directory)) - throw new ArgumentException("directory cannot be empty.", nameof(directory)); - Directory.CreateDirectory(directory); - - // get the Python version string - FieldInfo field = version.GetType().GetField(version.ToString()); - string pythonVersion = field?.GetCustomAttribute()?.Description; - var v = Version.Parse(pythonVersion); - string lower = $"{v.Major}.{v.Minor}"; - string upper = $"{v.Major}.{v.Minor + 1}"; - string pythonVersionString = $">={lower},<{upper}"; - - string filePath = Path.Combine(directory, "pyproject.toml"); - - var sb = new StringBuilder(); - - sb.AppendLine("[project]"); - sb.AppendLine($"name = \"{name}\""); - sb.AppendLine("version = \"0.1.0\""); - sb.AppendLine($"requires-python = \"{pythonVersionString}\""); - sb.AppendLine(); - - sb.AppendLine("dependencies = ["); - foreach (string package in packages ?? Enumerable.Empty()) - { - sb.AppendLine($" \"{package}\","); - } - sb.AppendLine("]"); - - File.WriteAllText(filePath, sb.ToString()); - - return filePath; - } - } -} diff --git a/Python_Engine/Compute/Install.cs b/Python_Engine/Compute/Install.cs index ff3039e4..ee7f572f 100644 --- a/Python_Engine/Compute/Install.cs +++ b/Python_Engine/Compute/Install.cs @@ -22,175 +22,130 @@ using BH.oM.Base.Attributes; using BH.oM.Python; +using System; using System.Collections.Generic; using System.ComponentModel; -using System.Diagnostics; using System.IO; namespace BH.Engine.Python { public static partial class Compute { - [Description("Install a list of packages to a given Python executable.")] - [Input("executable", "The Python executable to install the packages to.")] - [Input("packages", "The packages to install.")] - public static void InstallPackages( - string executable, - List packages - ) + [Description("Install UV, the Python manager used in these tools, and the ruff, jupyterlab and sphinx tools.")] + [Input("run", "Set to True to install UV and its core tools.")] + public static void InstallUV(bool run = false) { - if (!File.Exists(executable)) - { - Base.Compute.RecordError("Python executable not found at " + executable); - } + if (!run) + return; - if (packages.Count == 0) + try { - Base.Compute.RecordError("No packages to install."); + string uvBinPath = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.UserProfile), ".local", "bin"); + if (Directory.Exists(uvBinPath)) + Environment.SetEnvironmentVariable("PATH", uvBinPath + Path.PathSeparator + Environment.GetEnvironmentVariable("PATH")); + + int exitCode; + string location = RunCommandStdout("where.exe uv.exe", out exitCode); + if (exitCode != 0) + { + Base.Compute.RecordNote("Installing UV."); + string output = RunCommandStdout( + "powershell.exe -NoProfile -NonInteractive -ExecutionPolicy Bypass -Command \"$ErrorActionPreference = 'Stop'; irm https://astral.sh/uv/install.ps1 | iex\"", + out exitCode); + if (exitCode != 0) + { + Base.Compute.RecordError(exception: new Exception(), message: $"Failed to install UV (exit code {exitCode}).\n{output}"); + return; + } + + // The installer cannot update the environment of this already-running process. + if (Directory.Exists(uvBinPath)) + Environment.SetEnvironmentVariable("PATH", uvBinPath + Path.PathSeparator + Environment.GetEnvironmentVariable("PATH")); + + location = RunCommandStdout("where.exe uv.exe", out exitCode); + } + + if (exitCode != 0) + { + Base.Compute.RecordError(exception: new Exception(), message: $"Could not locate UV on PATH after installation.\n{location}"); + return; + } + + string uvExecutable = location.Split(new[] { '\r', '\n' }, StringSplitOptions.RemoveEmptyEntries)[0]; + + foreach (string tool in new[] { "ruff", "jupyterlab", "sphinx" }) + { + string output = RunCommandStdout($"\"\"{uvExecutable}\" tool install {tool}\"", out exitCode); + if (exitCode != 0) + { + Base.Compute.RecordError(exception: new Exception(), message: $"Failed to install {tool} to UV (exit code {exitCode}).\n{output}"); + } + } } - - string startDirectory = Directory.GetParent(Directory.GetParent(executable).FullName).FullName; - - string packagesString = string.Join(" ", packages); - - ProcessStartInfo psi = new ProcessStartInfo + catch (System.ComponentModel.Win32Exception ex) { - FileName = "uv", - Arguments = $"pip install {packagesString}", - WorkingDirectory = startDirectory, - RedirectStandardOutput = true, - RedirectStandardError = true, - UseShellExecute = false, - CreateNoWindow = true - }; - using (Process process = Process.Start(psi)) + Base.Compute.RecordError(exception: new Exception(), message: $"Could not run the UV installation command. {ex.Message}"); + } + catch (TimeoutException ex) { - string output = process.StandardOutput.ReadToEnd(); - string error = process.StandardError.ReadToEnd(); - - process.WaitForExit(); + Base.Compute.RecordError(exception: new Exception(), message: $"UV installation timed out. {ex.Message}"); + } + } - if (process.ExitCode != 0) - BH.Engine.Base.Compute.RecordError($"Error installing packages [{packagesString}].\n{error}"); - }; + [Description("Register a Jupyer kernel for a given venv.")] + [Input("venv", "The Python environment to install the packages to.")] + public static void InstallJupyterKernel(PythonEnvironment venv) + { + string cmd = $"{venv.Executable} -m ipykernel insatll --user --name {venv.Name} --display-name {venv.Name}"; + RunCommandStdout(command: cmd, hideWindows: true); } [Description("Install a list of packages to a given Python executable.")] - [Input("environment", "The Python environment to install the packages to.")] + [Input("venv", "The Python environment to install the packages to.")] [Input("packages", "The packages to install.")] + [Input("run", "Run this method.")] public static void InstallPackages( - this PythonEnvironment environment, - List packages + this PythonEnvironment venv, + List packages, + bool run = false ) { - InstallPackages(environment.Executable, packages); - } + string cmd = $"uv add {string.Join(" ", packages)}"; + string directory = Query.VirtualEnvironmentDirectory(venv.Name); - [Description("Install packages from a requirements.txt file to a given Python executable.")] - [Input("executable", "The Python executable to install the packages to.")] - [Input("requirements", "The requirements.txt file to install.")] - public static void InstallRequirements( - string executable, - string requirements - ) - { - if (!File.Exists(executable)) - { - Base.Compute.RecordError("Python executable not found at " + executable); + if (run) + { + string result = RunCommandStdout(cmd, out int exitCode, startDirectory: directory); } - - if (!File.Exists(requirements)) + else { - Base.Compute.RecordError("requirements.txt not found at " + requirements); + Base.Compute.RecordNote($"The following command will be executed from \"{directory}\": {cmd}"); } - - string startDirectory = Directory.GetParent(Directory.GetParent(executable).FullName).FullName; - - ProcessStartInfo psi = new ProcessStartInfo - { - FileName = "uv", - Arguments = $"pip install -r {requirements}", - WorkingDirectory = startDirectory, - RedirectStandardOutput = true, - RedirectStandardError = true, - UseShellExecute = false, - CreateNoWindow = true - }; - using (Process process = Process.Start(psi)) - { - string output = process.StandardOutput.ReadToEnd(); - string error = process.StandardError.ReadToEnd(); - - process.WaitForExit(); - - if (process.ExitCode != 0) - BH.Engine.Base.Compute.RecordError($"Error installing requirements from \"{requirements}\".\n{error}"); - }; - } - - [Description("Install packages from a requirements.txt file to a given Python environment.")] - [Input("environment", "The Python environment to install the packages to.")] - [Input("requirements", "The requirements.txt file to install.")] - public static void InstallRequirements( - this PythonEnvironment environment, - string requirements - ) - { - InstallRequirements(environment.Executable, requirements); } - - [Description("Install a local Python package to a given Python executable.")] - [Input("executable", "The Python executable to install the package to.")] + [Description("Install a local Python package to a given Python environment.")] + [Input("venv", "The Python environment to install the packages to.")] [Input("packageDirectory", "The package to install.")] + [Input("run", "Run this method.")] public static void InstallPackageLocal( - string executable, - string packageDirectory + this PythonEnvironment venv, + string packageDirectory, + bool run = false ) { - if (!File.Exists(executable)) - { - Base.Compute.RecordError("Python executable not found at " + executable); - } - if (!Directory.Exists(packageDirectory)) - { - Base.Compute.RecordError("packageDirectory not found at " + packageDirectory); - } + Base.Compute.RecordError($"{packageDirectory} not found."); - string startDirectory = Directory.GetParent(Directory.GetParent(executable).FullName).FullName; + string cmd = $"uv add --editable {packageDirectory}"; + string directory = Query.VirtualEnvironmentDirectory(venv.Name); - ProcessStartInfo psi = new ProcessStartInfo + if (run) { - FileName = "uv", - Arguments = $"pip install --no-warn-script-location -e {Modify.AddQuotesIfRequired(packageDirectory)}", - WorkingDirectory = startDirectory, - RedirectStandardOutput = true, - RedirectStandardError = true, - UseShellExecute = false, - CreateNoWindow = true - }; - using (Process process = Process.Start(psi)) - { - string output = process.StandardOutput.ReadToEnd(); - string error = process.StandardError.ReadToEnd(); - - process.WaitForExit(); - - if (process.ExitCode != 0) - BH.Engine.Base.Compute.RecordError($"Error installing package from \"{packageDirectory}\".\n{error}"); - }; - } - - [Description("Install a local Python package to a given Python environment.")] - [Input("environment", "The Python environment to install the packages to.")] - [Input("packageDirectory", "The package to install.")] - public static void InstallPackageLocal( - this PythonEnvironment environment, - string packageDirectory - ) - { - InstallPackageLocal(environment.Executable, packageDirectory); + string result = RunCommandStdout(cmd, out int exitCode, startDirectory: directory); + } + else { + Base.Compute.RecordNote($"The following command will be executed from \"{directory}\": {cmd}"); + } } } } diff --git a/Python_Engine/Compute/Remove.cs b/Python_Engine/Compute/Remove.cs index ca5688e6..070b88cb 100644 --- a/Python_Engine/Compute/Remove.cs +++ b/Python_Engine/Compute/Remove.cs @@ -21,121 +21,64 @@ */ using BH.oM.Base.Attributes; -using BH.oM.Python.Enums; -using System; +using BH.oM.Python; using System.ComponentModel; -using System.Diagnostics; using System.IO; namespace BH.Engine.Python { public static partial class Compute { - [Description("Remove a named BHoM Python kernel.")] - [Input("kernelName", "The name of the kernel to remove.")] - public static void RemoveKernel(string kernelName) + [Description("Remove the named Python virtual environment.")] + [Input("name", "The name of the Python virtual environment to remove.")] + [Input("run", "Run this method.")] + public static void RemoveVirtualEnvironment(string name, bool run = false) { - string kernelPath = Path.Combine(Query.DirectoryKernels(), kernelName.ToLower()); - if (Directory.Exists(kernelPath)) - Directory.Delete(kernelPath, true); - } - - [Description("Remove all BHoM Python kernels.")] - public static void RemoveAllKernels() - { - DirectoryInfo di = new DirectoryInfo(Query.DirectoryKernels()); - foreach (FileInfo file in di.EnumerateFiles()) - { - file.Delete(); - } - foreach (DirectoryInfo dir in di.EnumerateDirectories()) + if (!Query.VirtualEnvironmentExists(name)) { - dir.Delete(true); + Base.Compute.RecordError($"No Python environment named {name} exists."); + return; } - } - - [Description("Remove the named BHoM Python virtual environment.")] - [Input("envName", "The name of the BHoM Python virtual environment to remove.")] - public static void RemoveVirtualEnvironment(string envName) - { - string envPath = Path.Combine(Query.DirectoryEnvironments(), envName); - if (Directory.Exists(envPath)) - Directory.Delete(envPath, true); - RemoveKernel(envName); - } + string venvDirectory = Path.Combine(Query.DirectoryEnvironments(), name); - [Description("Remove all BHoM Python virtual environments.")] - public static void RemoveAllVirtualEnvironments() - { - DirectoryInfo di = new DirectoryInfo(Query.DirectoryEnvironments()); - foreach (DirectoryInfo dir in di.EnumerateDirectories()) + if (run) { - if (dir.Name != Query.ToolkitName()) + RemoveKernel(name, run); + + try { - RemoveVirtualEnvironment(dir.Name); + Directory.Delete(venvDirectory, true); + } + catch (IOException ex) + { + Base.Compute.RecordError($"Failed to remove virtual environment directory {venvDirectory}: {ex.Message}"); } - } } - [Description("Remove the base install for the python version specified.")] - [Input("version", "The base python version to remove.")] - public static void RemoveBaseVersion(PythonVersion version = PythonVersion.v3_10) + [Description("Remove the named Jupyter kernel.")] + [Input("name", "The name of the Jupyer kernel to remove.")] + [Input("run", "Run this method.")] + public static void RemoveKernel(string name, bool run = false) { - string basePath = Path.Combine(Query.DirectoryEnvironments(), Query.ToolkitName(), version.ToString()); - string baseInstaller = Path.Combine(basePath, "installer.exe"); - - // If the installer does not exist and the folder does - assume a bad/invalid install and just delete the entire folder. - if (!File.Exists(baseInstaller) && Directory.Exists(basePath)) - { - Directory.Delete(basePath, true); + if (!Query.VirtualEnvironmentExists(name)) + { + Base.Compute.RecordError($"No Python environment named {name} exists."); return; } - else if (!Directory.Exists(basePath)) - // If the base path doesn't exist there is nothing to remove. - return; - using (Process uninstall = new Process() - { - StartInfo = new ProcessStartInfo() - { - FileName = baseInstaller, - Arguments = "/uninstall /passive", - RedirectStandardError = true, - UseShellExecute = false, - } - }) + PythonEnvironment venv = Query.VirtualEnvironment(name); + string cmd = $"{venv.Executable} -m jupyter kernelspec uninstall {name} -f"; + + if (run) { - uninstall.StartInfo.Environment["PYTHONHOME"] = ""; - uninstall.Start(); - string stderr = uninstall.StandardError.ReadToEnd(); - uninstall.WaitForExit(); - if (uninstall.ExitCode != 0) - { - BH.Engine.Base.Compute.RecordError($"Error uninstalling python: {stderr}"); - return; - } + RunCommandStdout(command: cmd, hideWindows: true); } - - // Finally remove base folder as the installer may have missed something. - Directory.Delete(basePath, true); - } - - [Description("Completely remove all BHoM-related Python environments and kernels.")] - public static void RemoveEverything() - { - RemoveAllVirtualEnvironments(); - - //remove all python versions installed in base directory. - foreach (PythonVersion e in Enum.GetValues(typeof(PythonVersion))) + else { - if (e != PythonVersion.Undefined) - RemoveBaseVersion(e); + Base.Compute.RecordNote($"The following command will be executed: {cmd}"); } } } } - - - diff --git a/Python_Engine/Compute/RequirementsTxt.cs b/Python_Engine/Compute/RequirementsTxt.cs deleted file mode 100644 index f49f31bf..00000000 --- a/Python_Engine/Compute/RequirementsTxt.cs +++ /dev/null @@ -1,92 +0,0 @@ -/* - * This file is part of the Buildings and Habitats object Model (BHoM) - * Copyright (c) 2015 - 2026, the respective contributors. All rights reserved. - * - * Each contributor holds copyright over their respective contributions. - * The project versioning (Git) records all such contribution source information. - * - * - * The BHoM is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as published by - * the Free Software Foundation, either version 3.0 of the License, or - * (at your option) any later version. - * - * The BHoM is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with this code. If not, see . - */ - -using BH.oM.Base.Attributes; -using System; -using System.ComponentModel; -using System.Diagnostics; -using System.IO; - -namespace BH.Engine.Python -{ - public static partial class Compute - { - [ToBeRemoved("10.0")] - [Description("Create a requirements.txt file from an existing Python executable.")] - [Input("executable", "The path to the Python executable to create the requirements.txt file from.")] - [Input("targetPath", "The path to the requirements.txt file to create. If not specified, the file will be created in the same directory as the executable.")] - [Output("requirementsTxt", "The path to the requirements.txt file.")] - public static string RequirementsTxt( - string executable, - string targetPath = null - ) - { - if (!File.Exists(executable)) - { - BH.Engine.Base.Compute.RecordError($"The executable '{executable}' does not exist."); - return null; - } - - if (string.IsNullOrEmpty(targetPath)) - { - targetPath = Path.Combine(Path.GetDirectoryName(executable), "requirements.txt"); - } - else - { - if (!Directory.Exists(Path.GetDirectoryName(targetPath))) - { - BH.Engine.Base.Compute.RecordError($"The executable '{executable}' does not exist."); - return null; - } - } - - System.Diagnostics.Process process = new System.Diagnostics.Process() - { - StartInfo = new System.Diagnostics.ProcessStartInfo() - { - FileName = executable, - Arguments = $"-m pip freeze", - UseShellExecute = false, - RedirectStandardError = true, - RedirectStandardOutput = true - } - }; - - process.StartInfo.Environment["PYTHONHOME"] = ""; - using (Process p = Process.Start(process.StartInfo)) - { - StreamWriter sr = new StreamWriter(targetPath); - sr.Write(p.StandardOutput.ReadToEnd()); - string standardError = p.StandardError.ReadToEnd(); - p.WaitForExit(); - if (p.ExitCode != 0) - BH.Engine.Base.Compute.RecordError($"Error creating requirements.txt from \"{executable}\".\n{standardError}"); - sr.Close(); - } - - return targetPath; - } - } -} - - - diff --git a/Python_Engine/Compute/Run.cs b/Python_Engine/Compute/Run.cs index 771e869b..8dddea65 100644 --- a/Python_Engine/Compute/Run.cs +++ b/Python_Engine/Compute/Run.cs @@ -20,22 +20,16 @@ * along with this code. If not, see . */ -using BH.oM.Base; using BH.oM.Base.Attributes; -using BH.oM.Python; -using BH.oM.Python.Enums; using System.Collections.Generic; using System.ComponentModel; -using System.Diagnostics; using System.IO; using System.Linq; -using System.Threading.Tasks; namespace BH.Engine.Python { public static partial class Compute { - [ToBeRemoved("10.0")] [Description("Run a command via CMD and return stdout.")] [Input("command", "The command to be run.")] [Input("hideWindows", "Set to True to hide cmd windows.")] @@ -43,6 +37,12 @@ public static partial class Compute [Input("timeoutMinutes", "A number of minutes beyond which this command will timeout.")] [Output("stdout", "The StandardOutput from the command that was run. If the process failed, then StandardError will be returned here instead.")] public static string RunCommandStdout(string command, bool hideWindows = true, string startDirectory = null, double timeoutMinutes = 5) + { + int exitCode; + return RunCommandStdout(command, out exitCode, hideWindows, startDirectory, timeoutMinutes); + } + + private static string RunCommandStdout(string command, out int exitCode, bool hideWindows = true, string startDirectory = null, double timeoutMinutes = 5) { System.Diagnostics.Process process = new System.Diagnostics.Process(); @@ -53,7 +53,12 @@ public static string RunCommandStdout(string command, bool hideWindows = true, s process.StartInfo.WindowStyle = System.Diagnostics.ProcessWindowStyle.Hidden; commandMode = "/C"; } - process.StartInfo.Environment["PYTHONHOME"] = ""; + + // override some commonly used user/system environment variables to avoid some potential weirdness + List sysVariables = new List() { "PYTHONHOME", "PYTHONPATH" }; + foreach (var sysVar in sysVariables) + process.StartInfo.Environment[sysVar] = ""; + process.StartInfo.FileName = "cmd.exe"; process.StartInfo.RedirectStandardOutput = true; process.StartInfo.RedirectStandardError = true; @@ -61,27 +66,31 @@ public static string RunCommandStdout(string command, bool hideWindows = true, s process.StartInfo.Arguments = $"{commandMode} {command}"; process.Start(); - // To avoid deadlocks, always read the output stream first and then wait. - string stdout = process.StandardOutput.ReadToEnd(); - string stderr = process.StandardError.ReadToEnd(); + // Read both streams concurrently so verbose commands cannot block on a full buffer. + var stdoutTask = process.StandardOutput.ReadToEndAsync(); + var stderrTask = process.StandardError.ReadToEndAsync(); - int millisecondsToWait = (int)timeoutMinutes * 60 * 1000; - process.WaitForExit(millisecondsToWait); - - if (process.ExitCode != 0) + int millisecondsToWait = checked((int)(timeoutMinutes * 60 * 1000)); + if (!process.WaitForExit(millisecondsToWait)) { - return stderr.Trim(); + process.Kill(); + process.Dispose(); + throw new System.TimeoutException($"Command exceeded {timeoutMinutes} minutes."); } - return stdout.Trim(); + string stdout = stdoutTask.GetAwaiter().GetResult(); + string stderr = stderrTask.GetAwaiter().GetResult(); + exitCode = process.ExitCode; + process.Dispose(); + + return (exitCode != 0 ? stderr : stdout).Trim(); } - [ToBeRemoved("10.0")] [Description("Run a string containing Python code and return the output. The string passed should end with a \"print\" statement, and other print statements within it should be captured within the script to ensure only a single output string is passed back to this method.")] [Input("env", "The Python environment with which to run the Python script.")] [Input("pythonString", "The string containing the Python script.")] [Output("result", "The stdout data from the executed Python script.")] - public static string RunPythonString(this oM.Python.PythonEnvironment env, string pythonString) + public static string RunPythonString(this oM.Python.PythonEnvironment venv, string pythonString) { if (!pythonString.Split('\n').Last().Contains("print")) { @@ -95,12 +104,9 @@ public static string RunPythonString(this oM.Python.PythonEnvironment env, strin outputFile.WriteLine(pythonString); } - string cmd = $"{Modify.AddQuotesIfRequired(env.Executable)} {scriptFile}"; + string cmd = $"{Modify.AddQuotesIfRequired(venv.Executable)} {scriptFile}"; return RunCommandStdout(cmd, hideWindows: true); } } } - - - diff --git a/Python_Engine/Compute/UnzipFile.cs b/Python_Engine/Compute/UnzipFile.cs deleted file mode 100644 index a4746744..00000000 --- a/Python_Engine/Compute/UnzipFile.cs +++ /dev/null @@ -1,87 +0,0 @@ -/* - * This file is part of the Buildings and Habitats object Model (BHoM) - * Copyright (c) 2015 - 2026, the respective contributors. All rights reserved. - * - * Each contributor holds copyright over their respective contributions. - * The project versioning (Git) records all such contribution source information. - * - * - * The BHoM is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as published by - * the Free Software Foundation, either version 3.0 of the License, or - * (at your option) any later version. - * - * The BHoM is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with this code. If not, see . - */ - -using BH.oM.Base.Attributes; -using System; -using System.ComponentModel; -using System.IO; - -namespace BH.Engine.Python -{ - public static partial class Compute - { - [ToBeRemoved("10.0")] - //This method is no longer used by python toolkit, and perhaps should be removed or moved to the file toolkit instead. - [Description("Extract the contents of an archive.")] - [Input("archivePath", "The archive to extract.")] - [Input("targetDirectory", "The destination directory to extract into.")] - [Input("targetName", "An optional input to rename the archive directory.")] - [Input("delete", "An optional input to delete the archive after extraction.")] - public static void UnzipFile( - string archivePath, - string targetDirectory, - string targetName = null, - bool delete = false - ) - { - if (string.IsNullOrWhiteSpace(archivePath)) - { - BH.Engine.Base.Compute.RecordError($"The archivePath cannot be null or empty."); - } - - if (string.IsNullOrWhiteSpace(targetDirectory)) - { - BH.Engine.Base.Compute.RecordError($"The targetDirectory cannot be null or empty."); - } - - if (!File.Exists(archivePath)) - { - BH.Engine.Base.Compute.RecordError($"The archivePath '{archivePath}' does not exist."); - } - - if (!Directory.Exists(targetDirectory)) - { - BH.Engine.Base.Compute.RecordError($"The targetDirectory '{targetDirectory}' does not exist."); - } - - if (string.IsNullOrWhiteSpace(targetName)) - { - targetName = Path.GetFileNameWithoutExtension(archivePath); - } - - string targetPath = Path.Combine(targetDirectory, targetName); - - if (Directory.Exists(targetPath)) - { - BH.Engine.Base.Compute.RecordError($"The targetPath '{targetPath}' already exists."); - } - - System.IO.Compression.ZipFile.ExtractToDirectory(archivePath, targetPath); - - if (delete) - File.Delete(archivePath); - } - } -} - - - diff --git a/Python_Engine/Compute/UpdateBHoMPackages.cs b/Python_Engine/Compute/UpdateBHoMPackages.cs index 6ed02d25..7c8e28de 100644 --- a/Python_Engine/Compute/UpdateBHoMPackages.cs +++ b/Python_Engine/Compute/UpdateBHoMPackages.cs @@ -20,93 +20,23 @@ * along with this code. If not, see . */ -using BH.oM.Base; using BH.oM.Base.Attributes; using BH.oM.Python; -using BH.oM.Python.Enums; -using System; -using System.Collections.Generic; using System.ComponentModel; -using System.Diagnostics; using System.IO; -using System.Linq; -using System.Text; namespace BH.Engine.Python { public static partial class Compute { - [ToBeRemoved("10.0")] - [Description("Using the environment name (and version if the environment name is the base python environment), directly install/update missing BHoM packages.")] - [Input("environmentName", "The name of the environment to update.")] - [Input("version", "If the environment name is the name of the base python environment, the version that needs updating.")] - public static void UpdateBHoMPackages(this string environmentName, PythonVersion version = PythonVersion.Undefined) + [Description("Perform an update on the provided Python environment.")] + [Input("venv", "The Python environment to update.")] + public static void UpdateBHoMPackages(this PythonEnvironment venv) { - //construct the expected PythonEnvironment and pass to UpdateBHoMPackages - PythonEnvironment env = new PythonEnvironment() - { - Name = environmentName, - }; + string cmd = "uv sync"; + string directory = Path.Combine(Query.DirectoryEnvironments(), venv.Name); - //python version is only used if the environment name is this toolkits name. - if (environmentName == Query.ToolkitName()) - { - if (version == PythonVersion.Undefined) - { - BH.Engine.Base.Compute.RecordError("The version must be specified when updating BHoM packages for a base python environment. No updates have occurred."); - return; - } - - env.Executable = Path.Combine(Query.DirectoryBaseEnvironment(version), "python.exe"); - } - else - env.Executable = Query.VirtualEnvironmentExecutable(environmentName); - - UpdateBHoMPackages(env); - } - - /***************************************************/ - - [ToBeRemoved("10.0")] - [Description("Using a PythonEnvironment, directly install/update missing BHoM packages.")] - [Input("environment", "The python environment to update.")] - public static void UpdateBHoMPackages(this PythonEnvironment environment) - { - if (!File.Exists(environment.Executable)) - { - BH.Engine.Base.Compute.RecordError($"Given environment or base install {environment.Executable} does not exist."); - return; - } - - //`python -m pip list -e --format json` lists all environment packages that are editable installs. - //As all BHoM packages are editable installs, this handily lists all the packages that should be updated if necessary. - //side effect of updating other editable installs if they have changed, but I suspect this won't be a problem as anyone who has these would update packages manually instead. - System.Diagnostics.Process process = new System.Diagnostics.Process() - { - StartInfo = new System.Diagnostics.ProcessStartInfo() - { - FileName = environment.Executable, - Arguments = $"-m pip list -e --format json", - UseShellExecute = false, - RedirectStandardOutput = true, - } - }; - - process.StartInfo.Environment["PYTHONHOME"] = ""; - string stdOut; - - using (Process p = Process.Start(process.StartInfo)) - { - stdOut = p.StandardOutput.ReadToEnd(); - p.WaitForExit(); - } - - stdOut = stdOut.TrimEnd('\r', '\n'); - - IEnumerable objs = Serialiser.Convert.FromJsonArray(stdOut).OfType(); - - foreach (CustomObject obj in objs) - InstallPackageLocal(environment, (string)obj.CustomData["editable_project_location"]); + RunCommandStdout(cmd, out int exitCode, startDirectory: directory); } } -} \ No newline at end of file +} diff --git a/Python_Engine/Compute/VirtualEnvironment.cs b/Python_Engine/Compute/VirtualEnvironment.cs index 4779cba4..064259d4 100644 --- a/Python_Engine/Compute/VirtualEnvironment.cs +++ b/Python_Engine/Compute/VirtualEnvironment.cs @@ -1,4 +1,4 @@ -/* +/* * This file is part of the Buildings and Habitats object Model (BHoM) * Copyright (c) 2015 - 2026, the respective contributors. All rights reserved. * @@ -22,117 +22,83 @@ using BH.oM.Base.Attributes; using BH.oM.Python; -using BH.oM.Python.Enums; -using System.Collections.Generic; using System.ComponentModel; -using System.Diagnostics; using System.IO; namespace BH.Engine.Python { public static partial class Compute { - [Description("Install a Python Virtual Environment of a given version and name.")] + [Description("Create a Python Virtual Environment of a given version and name.")] [Input("version", "The version of Python to use for this environment.")] [Input("name", "The name of this venv.")] [Input("reload", "Reload the virtual environment rather than recreating it, if it already exists.")] - [Output("env", "The executable for the resultant venv.")] - public static PythonEnvironment VirtualEnvironment(this PythonVersion version, string name, bool reload = true) + [Output("venv", "The executable for the resultant venv.")] + public static PythonEnvironment VirtualEnvironment(string version, string name, bool reload = true) { - # TODO - how to handle package versions defined in an associated requirements.txt file - if (!Query.IsValidEnvironmentName(name)) + if (Query.VirtualEnvironmentExists(name)) { - BH.Engine.Base.Compute.RecordError("A BHoM Python virtual environment cannot cannot contain invalid filepath characters."); - return null; + if (reload) + { + return new PythonEnvironment() { Executable = Query.VirtualEnvironmentExecutable(name), Name = name }; + } + else + { + RemoveVirtualEnvironment(name: name, run: true); + RemoveKernel(name: name, run: true); + } } - if (version == PythonVersion.Undefined) - { - BH.Engine.Base.Compute.RecordError("Please provide a valid Python version."); - return null; - } + InstallUV(true); // ensure UV is installed - string targetExecutable = Query.VirtualEnvironmentExecutable(name); - string targetDirectory = Query.VirtualEnvironmentDirectory(name); - string versionExecutable = Path.Combine(Query.DirectoryBaseEnvironment(version), "python.exe"); + string directory = Path.Combine(Query.DirectoryEnvironments(), name); + string cmd = $"uv venv {Path.Combine(directory, "venv")} --python {version}"; + RunCommandStdout(cmd, out int exitCode, startDirectory: directory); - bool exists = Query.VirtualEnvironmentExists(name); + PythonEnvironment venv = new PythonEnvironment() { Executable = Query.VirtualEnvironmentExecutable(name), Name = name }; - if (exists && reload) - { - PythonEnvironment env = new PythonEnvironment() { Name = name, Executable = targetExecutable }; - UpdateBHoMPackages(env); - return env; - } + InstallJupyterKernel(venv: venv); - if (exists && !reload) - { - // remove all existing environments and kernels - RemoveVirtualEnvironment(name); - RemoveKernel(name); - } + return venv; + } - if (!File.Exists(versionExecutable)) + [Description("Create a Python Virtual Environment from a TOML file. This will create the venv alongside that TOML file.")] + [Input("tomlFile", "The path to a TOML file containing venv configuration.")] + [Input("reload", "Reload the virtual environment rather than recreating it, if it already exists.")] + [Output("venv", "The executable for the resultant venv.")] + public static PythonEnvironment VirtualEnvironment(string tomlFile, bool reload = true) + { + if (!File.Exists(tomlFile)) { - // The output here should be the same, but to be sure replace the value. - BH.Engine.Base.Compute.RecordNote($"The base environment for the requested version {version} has been installed as it was not present."); - versionExecutable = BasePythonEnvironment(version, run: true)?.Executable; - - if (versionExecutable == null) // If the executable is null, then python wasn't installed correctly, so return null - the error message for downloading the version should suffice. - return null; + Base.Compute.RecordError($"TOML file not found at {tomlFile}"); + return null; } - // create the venv from the base environment - Process process = new Process() + string name = Directory.GetParent(tomlFile).Name; + if (Query.VirtualEnvironmentExists(name)) { - StartInfo = new ProcessStartInfo() + if (reload) { - FileName = Modify.AddQuotesIfRequired(versionExecutable), - Arguments = $"-m virtualenv --python={Modify.AddQuotesIfRequired(versionExecutable)} {Modify.AddQuotesIfRequired(targetDirectory)}", - RedirectStandardError = true, - UseShellExecute = false, + return new PythonEnvironment() { Executable = Query.VirtualEnvironmentExecutable(name), Name = name }; + } + else + { + RemoveVirtualEnvironment(name); + RemoveKernel(name); } - }; - - process.StartInfo.Environment["PYTHONHOME"] = ""; - - using (Process p = Process.Start(process.StartInfo)) - { - string standardError = p.StandardError.ReadToEnd(); - p.WaitForExit(); - if (p.ExitCode != 0) - BH.Engine.Base.Compute.RecordError($"Error creating virtual environment.\n{standardError}"); } - // install ipykernel, pytest and black into new virtualenv - InstallPackages(targetExecutable, new List() { "ipykernel", "pytest", "black" }); + InstallUV(true); // ensure UV is installed - // register the virtualenv with the base environment - Process process2 = new Process() - { - StartInfo = new ProcessStartInfo() - { - FileName = targetExecutable, - Arguments = $"-m ipykernel install --name={name} --user", //--user adds the kernel to %appdata%/jupyter/kernels, rather than to the virtualenv/share/jupyter/kernels - RedirectStandardError = true, - UseShellExecute = false, - } - }; + string directory = Path.Combine(Query.DirectoryEnvironments(), name); + string cmd = "uv sync --all-packages"; + RunCommandStdout(cmd, out int exitCode, startDirectory: directory); - process2.StartInfo.Environment["PYTHONHOME"] = ""; + PythonEnvironment venv = new PythonEnvironment() { Executable = Query.VirtualEnvironmentExecutable(name), Name = name }; - using (Process p = Process.Start(process2.StartInfo)) - { - string standardError = p.StandardError.ReadToEnd(); - p.WaitForExit(); - if (p.ExitCode != 0) - BH.Engine.Base.Compute.RecordError($"Error registering the \"{name}\" virtual environment.\n{standardError}"); - } + InstallJupyterKernel(venv: venv); - return new PythonEnvironment() { Executable = targetExecutable, Name = name }; + return venv; } } } - - - diff --git a/Python_Engine/Convert/ToPython.cs b/Python_Engine/Convert/ToPython.cs deleted file mode 100644 index 193669df..00000000 --- a/Python_Engine/Convert/ToPython.cs +++ /dev/null @@ -1,42 +0,0 @@ -/* - * This file is part of the Buildings and Habitats object Model (BHoM) - * Copyright (c) 2015 - 2026, the respective contributors. All rights reserved. - * - * Each contributor holds copyright over their respective contributions. - * The project versioning (Git) records all such contribution source information. - * - * - * The BHoM is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as published by - * the Free Software Foundation, either version 3.0 of the License, or - * (at your option) any later version. - * - * The BHoM is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with this code. If not, see . - */ - -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using BH.oM.Base.Attributes; - -namespace BH.Engine.Python -{ - public static partial class Convert - { - // TODO - REMOVE THIS METHOD, NO LONGER REQUIRED, PLUS IT HAS AN OLD ToBeRemoved TAG - [ToBeRemoved("5.3", "This method included in order to fool versioning into playing nicely.")] - public static bool ToPython(this T[,] input) - { - return false; - } - } -} - diff --git a/Python_Engine/Modify/AddQuotesIfRequired.cs b/Python_Engine/Modify/AddQuotesIfRequired.cs index ad54d616..fcd31693 100644 --- a/Python_Engine/Modify/AddQuotesIfRequired.cs +++ b/Python_Engine/Modify/AddQuotesIfRequired.cs @@ -44,8 +44,3 @@ public static string AddQuotesIfRequired(this string path) } } } - - - - - diff --git a/Python_Engine/Python_Engine.csproj b/Python_Engine/Python_Engine.csproj index ca4230df..c8e13db5 100644 --- a/Python_Engine/Python_Engine.csproj +++ b/Python_Engine/Python_Engine.csproj @@ -35,6 +35,9 @@ False + + + diff --git a/Python_Engine/Query/Directory.cs b/Python_Engine/Query/Directory.cs index e81943e2..69338391 100644 --- a/Python_Engine/Query/Directory.cs +++ b/Python_Engine/Query/Directory.cs @@ -36,47 +36,14 @@ public static string DirectoryExtensions() return Path.Combine(System.IO.Directory.GetParent(BH.Engine.Base.Query.BHoMFolder()).FullName, "Extensions"); } - [Description("The location where any BHoM-related Python kernels reside.")] - [Output("path", "The location where any BHoM-related Python kernels reside.")] - public static string DirectoryKernels() - { - - string dir = Path.Combine(System.Environment.GetFolderPath(System.Environment.SpecialFolder.ApplicationData), "jupyter", "kernels"); - if (!Directory.Exists(dir)) - Directory.CreateDirectory(dir); - return dir; - } - - [Description("The location where any BHoM-related Python code resides.")] - [Output("path", "The location where any BHoM-related Python code resides.")] - public static string DirectoryCode() - { - string dir = Path.Combine(Query.DirectoryExtensions(), "PythonCode"); - if (!Directory.Exists(dir)) - Directory.CreateDirectory(dir); - return dir; - } - [Description("The location where any BHoM-related Python environment (or virtualenv) resides.")] [Output("path", "The location where any BHoM-related Python environment (or virtualenv) resides.")] public static string DirectoryEnvironments() { - string dir = Path.Combine(Query.DirectoryExtensions(), "PythonEnvironments"); + string dir = Path.Combine(Query.DirectoryExtensions(), "Python"); if (!Directory.Exists(dir)) Directory.CreateDirectory(dir); return dir; } - - [Description("The location where the base Python environment exists.")] - [Input("version", "The python version to get the base environment for.")] - [Output("path", "The location where the base Python environment exists.")] - public static string DirectoryBaseEnvironment(this PythonVersion version) - { - return Path.Combine(Query.DirectoryEnvironments(), Query.ToolkitName(), version.ToString()); - } } } - - - - diff --git a/Python_Engine/Query/EmbeddableURL.cs b/Python_Engine/Query/EmbeddableURL.cs deleted file mode 100644 index 16cdee12..00000000 --- a/Python_Engine/Query/EmbeddableURL.cs +++ /dev/null @@ -1,97 +0,0 @@ -/* - * This file is part of the Buildings and Habitats object Model (BHoM) - * Copyright (c) 2015 - 2026, the respective contributors. All rights reserved. - * - * Each contributor holds copyright over their respective contributions. - * The project versioning (Git) records all such contribution source information. - * - * - * The BHoM is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as published by - * the Free Software Foundation, either version 3.0 of the License, or - * (at your option) any later version. - * - * The BHoM is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with this code. If not, see . - */ - -using BH.oM.Python.Enums; -using BH.oM.Base.Attributes; -using System.Collections.Generic; -using System.ComponentModel; - -namespace BH.Engine.Python -{ - public static partial class Query - { - [Description("Get the URL for the embeddable package containing the given version of Python.")] - [Input("version", "The version of Python to retrieve the URL.")] - [Output("url", "The url for the matching Python version.")] - public static string EmbeddableURL(this PythonVersion version) - { - // See the PythonVersion enum for why most of these are commented out. - Dictionary versions = new Dictionary() - { - //{ PythonVersion.v3_7_2, "https://www.python.org/ftp/python/3.7.2/python-3.7.2rc1-amd64.exe" }, - /*{ PythonVersion.v3_7_3, "https://www.python.org/ftp/python/3.7.3/python-3.7.3rc1-amd64.exe" }, - { PythonVersion.v3_7_4, "https://www.python.org/ftp/python/3.7.4/python-3.7.4rc2-amd64.exe" }, - { PythonVersion.v3_7_5, "https://www.python.org/ftp/python/3.7.5/python-3.7.5rc1-amd64.exe" }, - { PythonVersion.v3_7_6, "https://www.python.org/ftp/python/3.7.6/python-3.7.6rc1-amd64.exe" }, - { PythonVersion.v3_7_7, "https://www.python.org/ftp/python/3.7.7/python-3.7.7rc1-amd64.exe" }, - { PythonVersion.v3_7_8, "https://www.python.org/ftp/python/3.7.8/python-3.7.8rc1-amd64.exe" },*/ - { PythonVersion.v3_7, "https://www.python.org/ftp/python/3.7.9/python-3.7.9-amd64.exe" }, - /*{ PythonVersion.v3_8_0, "https://www.python.org/ftp/python/3.8.0/python-3.8.0rc1-amd64.exe" }, - { PythonVersion.v3_8_1, "https://www.python.org/ftp/python/3.8.1/python-3.8.1rc1-amd64.exe" }, - { PythonVersion.v3_8_2, "https://www.python.org/ftp/python/3.8.2/python-3.8.2rc2-amd64.exe" }, - { PythonVersion.v3_8_3, "https://www.python.org/ftp/python/3.8.3/python-3.8.3rc1-amd64.exe" }, - { PythonVersion.v3_8_4, "https://www.python.org/ftp/python/3.8.4/python-3.8.4rc1-amd64.exe" }, - { PythonVersion.v3_8_5, "https://www.python.org/ftp/python/3.8.5/python-3.8.5-amd64.exe" }, - { PythonVersion.v3_8_6, "https://www.python.org/ftp/python/3.8.6/python-3.8.6rc1-amd64.exe" }, - { PythonVersion.v3_8_7, "https://www.python.org/ftp/python/3.8.7/python-3.8.7rc1-amd64.exe" }, - { PythonVersion.v3_8_8, "https://www.python.org/ftp/python/3.8.8/python-3.8.8rc1-amd64.exe" },*/ - { PythonVersion.v3_8, "https://www.python.org/ftp/python/3.8.9/python-3.8.9-amd64.exe" }, - /*{ PythonVersion.v3_9_0, "https://www.python.org/ftp/python/3.9.0/python-3.9.0rc2-amd64.exe" }, - { PythonVersion.v3_9_1, "https://www.python.org/ftp/python/3.9.1/python-3.9.1rc1-amd64.exe" }, - { PythonVersion.v3_9_2, "https://www.python.org/ftp/python/3.9.2/python-3.9.2rc1-amd64.exe" }, - { PythonVersion.v3_9_3, "https://www.python.org/ftp/python/3.9.3/python-3.9.3-amd64.exe" }, - { PythonVersion.v3_9_4, "https://www.python.org/ftp/python/3.9.4/python-3.9.4-amd64.exe" }, - { PythonVersion.v3_9_5, "https://www.python.org/ftp/python/3.9.5/python-3.9.5-amd64.exe" }, - { PythonVersion.v3_9_6, "https://www.python.org/ftp/python/3.9.6/python-3.9.6-amd64.exe" }, - { PythonVersion.v3_9_7, "https://www.python.org/ftp/python/3.9.7/python-3.9.7-amd64.exe" }, - { PythonVersion.v3_9_8, "https://www.python.org/ftp/python/3.9.8/python-3.9.8-amd64.exe" }, - { PythonVersion.v3_9_9, "https://www.python.org/ftp/python/3.9.9/python-3.9.9-amd64.exe" },*/ - { PythonVersion.v3_9, "https://www.python.org/ftp/python/3.9.10/python-3.9.10-amd64.exe" }, - /*{ PythonVersion.v3_10_0, "https://www.python.org/ftp/python/3.10.0/python-3.10.0rc2-amd64.exe" }, - { PythonVersion.v3_10_1, "https://www.python.org/ftp/python/3.10.1/python-3.10.1-amd64.exe" }, - { PythonVersion.v3_10_2, "https://www.python.org/ftp/python/3.10.2/python-3.10.2-amd64.exe" }, - { PythonVersion.v3_10_3, "https://www.python.org/ftp/python/3.10.3/python-3.10.3-amd64.exe" }, - { PythonVersion.v3_10_4, "https://www.python.org/ftp/python/3.10.4/python-3.10.4-amd64.exe" }, - { PythonVersion.v3_10_5, "https://www.python.org/ftp/python/3.10.5/python-3.10.5-amd64.exe" }, - { PythonVersion.v3_10_6, "https://www.python.org/ftp/python/3.10.6/python-3.10.6-amd64.exe" }, - { PythonVersion.v3_10_7, "https://www.python.org/ftp/python/3.10.7/python-3.10.7-amd64.exe" }, - { PythonVersion.v3_10_8, "https://www.python.org/ftp/python/3.10.8/python-3.10.8-amd64.exe" }, - { PythonVersion.v3_10_9, "https://www.python.org/ftp/python/3.10.9/python-3.10.9-amd64.exe" }, - { PythonVersion.v3_10_10, "https://www.python.org/ftp/python/3.10.10/python-3.10.10-amd64.exe" },*/ - { PythonVersion.v3_10, "https://www.python.org/ftp/python/3.10.11/python-3.10.11-amd64.exe" }, - /*{ PythonVersion.v3_11_0, "https://www.python.org/ftp/python/3.11.0/python-3.11.0rc2-amd64.exe" }, - { PythonVersion.v3_11_1, "https://www.python.org/ftp/python/3.11.1/python-3.11.1-amd64.exe" }, - { PythonVersion.v3_11_2, "https://www.python.org/ftp/python/3.11.2/python-3.11.2-amd64.exe" }, - { PythonVersion.v3_11_3, "https://www.python.org/ftp/python/3.11.3/python-3.11.3-amd64.exe" },*/ - { PythonVersion.v3_11, "https://www.python.org/ftp/python/3.11.4/python-3.11.4-amd64.exe" }, - { PythonVersion.v3_12, "https://www.python.org/ftp/python/3.12.3/python-3.12.3-amd64.exe" }, - { PythonVersion.v3_13, "https://www.python.org/ftp/python/3.13.12/python-3.13.12-amd64.exe" }, - }; - - return versions[version]; - } - } -} - - - - diff --git a/Python_Engine/Query/IsValidEnvironmentName.cs b/Python_Engine/Query/IsValidEnvironmentName.cs deleted file mode 100644 index 16625a65..00000000 --- a/Python_Engine/Query/IsValidEnvironmentName.cs +++ /dev/null @@ -1,56 +0,0 @@ -/* - * This file is part of the Buildings and Habitats object Model (BHoM) - * Copyright (c) 2015 - 2026, the respective contributors. All rights reserved. - * - * Each contributor holds copyright over their respective contributions. - * The project versioning (Git) records all such contribution source information. - * - * - * The BHoM is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as published by - * the Free Software Foundation, either version 3.0 of the License, or - * (at your option) any later version. - * - * The BHoM is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with this code. If not, see . - */ - -using BH.oM.Python.Enums; -using BH.oM.Python; -using BH.oM.Base.Attributes; - -using System.ComponentModel; -using System.IO; -using System.Linq; -using System; -using System.Collections.Generic; - -namespace BH.Engine.Python -{ - public static partial class Query - { - [Description("Check whether a string is valid as BHoM Python Environment name.")] - [Input("name", "The name given to the BHoM Python Environment.")] - [Output("valid", "True if valid, False if not.")] - public static bool IsValidEnvironmentName(string name) - { - List invalidChars = new List() { ' ' }; - invalidChars.AddRange(Path.GetInvalidPathChars().ToList()); - invalidChars.AddRange(Path.GetInvalidFileNameChars().ToList()); - if (name.Any(x => invalidChars.Contains(x))) - { - return false; - } - return true; - } - } -} - - - - diff --git a/Python_Engine/Query/ToolkitName.cs b/Python_Engine/Query/ToolkitName.cs index c0088f6b..e8e3ba38 100644 --- a/Python_Engine/Query/ToolkitName.cs +++ b/Python_Engine/Query/ToolkitName.cs @@ -32,7 +32,7 @@ public static partial class Query [Output("name", "The name of this toolkit.")] public static string ToolkitName() { - return "Python_Toolkit"; + return "python_toolkit"; } } } diff --git a/Python_Engine/Query/Version.cs b/Python_Engine/Query/Version.cs index 7e2db22d..30d29ac0 100644 --- a/Python_Engine/Query/Version.cs +++ b/Python_Engine/Query/Version.cs @@ -84,6 +84,3 @@ public static PythonVersion Version(string pythonExecutable) } } } - - - diff --git a/Python_Engine/Query/VirtualEnvironment.cs b/Python_Engine/Query/VirtualEnvironment.cs index f20f0e19..c3eafce5 100644 --- a/Python_Engine/Query/VirtualEnvironment.cs +++ b/Python_Engine/Query/VirtualEnvironment.cs @@ -20,82 +20,65 @@ * along with this code. If not, see . */ -using BH.oM.Python.Enums; using BH.oM.Python; using BH.oM.Base.Attributes; using System.ComponentModel; using System.IO; -using System.Linq; -using System; -using System.Collections.Generic; namespace BH.Engine.Python { public static partial class Query { - [Description("Check whether a named BHoM Python virtual environment exists.")] - [Input("envName", "The name given to the BHoM Python Environment.")] - [Input("pythonVersion", "The version to check against.")] - [Output("exists", "True if exists, False if not.")] - public static bool VirtualEnvironmentExists(string envName, PythonVersion pythonVersion = PythonVersion.Undefined) - { - string executable = VirtualEnvironmentExecutable(envName); - bool directoryExists = Directory.Exists(VirtualEnvironmentDirectory(envName)); - bool executableExists = File.Exists(executable); - bool kernelExists = Directory.Exists(VirtualEnvironmentKernel(envName)); - bool versionMatches = false; - - if (executableExists) - versionMatches = Version(executable) == pythonVersion; - - if (pythonVersion == PythonVersion.Undefined) - return directoryExists && executableExists && kernelExists; - - return directoryExists && executableExists && kernelExists && versionMatches; - } + [Description("Get the path to the named Python virtual environment executable.")] + [Input("name", "The name given to the Python Environment.")] + [Output("executable", "The path to the executable.")] + public static string VirtualEnvironmentExecutable(string name) + { + string exePath = Path.Combine(Query.DirectoryEnvironments(), name, "venv", "Scripts", "python.exe"); + if (!File.Exists(exePath)) + Base.Compute.RecordError($"{exePath} was not found."); - [Description("Get the path to the named BHoM Python virtual environment kernel.")] - [Input("envName", "The name given to the BHoM Python Environment.")] - [Output("kernelDirectory", "The path to the kernel directory.")] - public static string VirtualEnvironmentKernel(string envName) - { - return Path.Combine(Query.DirectoryKernels(), envName.ToLower()); + return exePath; } - [Description("Get the path to the named BHoM Python virtual environment executable.")] - [Input("envName", "The name given to the BHoM Python Environment.")] - [Output("executable", "The path to the executable.")] - public static string VirtualEnvironmentExecutable(string envName) + [Description("Check whether a named Python virtual environment exists.")] + [Input("name", "The name given to the Python Environment.")] + [Output("exists", "True if exists, False if not.")] + public static bool VirtualEnvironmentExists(string name) { - return Path.Combine(Query.DirectoryEnvironments(), envName, "Scripts", "python.exe"); + string expectedVenvPath = Path.Combine(Query.DirectoryEnvironments(), name, "venv"); + + if (Directory.Exists(expectedVenvPath) & File.Exists(VirtualEnvironmentExecutable(name))) + return true; + + return false; } - [Description("Get the path to the named BHoM Python virtual environment.")] - [Input("envName", "The name given to the BHoM Python Environment.")] - [Output("directory", "The directory where the virtual environment is located.")] - public static string VirtualEnvironmentDirectory(string envName) + [Description("Get the named Python virtual environment.")] + [Input("name", "The name given to the Python Environment.")] + [Output("environment", "The Python Environment.")] + public static PythonEnvironment VirtualEnvironment(string name) { - return Path.Combine(Query.DirectoryEnvironments(), envName); - } + if (!VirtualEnvironmentExists(name)) + Base.Compute.RecordError($"{name} was not found in {Query.DirectoryEnvironments()}"); - [Description("Get the named BHoM Python virtual environment.")] - [Input("envName", "The name given to the BHoM Python Environment.")] - [Output("environment", "The BHoM Python Environment.")] - public static PythonEnvironment VirtualEnvironment(string envName) - { - if (!VirtualEnvironmentExists(envName)) - return null; - return new PythonEnvironment() { - Name = envName, - Executable = VirtualEnvironmentExecutable(envName), + Name = name, + Executable = VirtualEnvironmentExecutable(name), }; } - } -} - - + [Description("Get a named Python virtual environment.")] + [Input("name", "The name given to the Python Environment.")] + [Output("directory", "The directory in which the venv resides.")] + public static string VirtualEnvironmentDirectory(string name) + { + if (!VirtualEnvironmentExists(name)) + Base.Compute.RecordError($"{name} was not found in {Query.DirectoryEnvironments()}"); + return Path.Combine(Query.DirectoryEnvironments(), name); + } + } +} diff --git a/Python_oM/Enums/PythonVersion.cs b/Python_oM/Enums/PythonVersion.cs deleted file mode 100644 index 301febe1..00000000 --- a/Python_oM/Enums/PythonVersion.cs +++ /dev/null @@ -1,137 +0,0 @@ -/* - * This file is part of the Buildings and Habitats object Model (BHoM) - * Copyright (c) 2015 - 2026, the respective contributors. All rights reserved. - * - * Each contributor holds copyright over their respective contributions. - * The project versioning (Git) records all such contribution source information. - * - * - * The BHoM is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as published by - * the Free Software Foundation, either version 3.0 of the License, or - * (at your option) any later version. - * - * The BHoM is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with this code. If not, see . - */ - -using System.ComponentModel; - -namespace BH.oM.Python.Enums -{ - // There are multiple specific versions here that are commented out - When installing, only one specific version (e.g 3.10.x) per minor python version (e.g 3.x) can be installed, and changes between specific versions are usually bug fixes and not breaking. however the specific versions are kept commented for posterity. - public enum PythonVersion - { - [Description("Undefined")] - Undefined, - /*[Description("3.7.0")] - v3_7_0, - [Description("3.7.1")] - v3_7_1, - [Description("3.7.2")] - v3_7_2, - [Description("3.7.3")] - v3_7_3, - [Description("3.7.4")] - v3_7_4, - [Description("3.7.5")] - v3_7_5, - [Description("3.7.6")] - v3_7_6, - [Description("3.7.7")] - v3_7_7, - [Description("3.7.8")] - v3_7_8,*/ - [Description("3.7")] //3.7.9 - v3_7, - /*[Description("3.8.0")] - v3_8_0, - [Description("3.8.1")] - v3_8_1, - [Description("3.8.2")] - v3_8_2, - [Description("3.8.3")] - v3_8_3, - [Description("3.8.4")] - v3_8_4, - [Description("3.8.5")] - v3_8_5, - [Description("3.8.6")] - v3_8_6, - [Description("3.8.7")] - v3_8_7, - [Description("3.8.8")] - v3_8_8,*/ - [Description("3.8")] //3.8.9 - v3_8, - //[Description("3.8.10")] - //v3_8_10, - /*[Description("3.9.0")] - v3_9_0, - [Description("3.9.1")] - v3_9_1, - [Description("3.9.2")] - v3_9_2, - [Description("3.9.3")] - v3_9_3, - [Description("3.9.4")] - v3_9_4, - [Description("3.9.5")] - v3_9_5, - [Description("3.9.6")] - v3_9_6, - [Description("3.9.7")] - v3_9_7, - [Description("3.9.8")] - v3_9_8, - [Description("3.9.9")] - v3_9_9,*/ - [Description("3.9")] //3.9.10 - v3_9, - /*[Description("3.10.0")] - v3_10_0, - [Description("3.10.1")] - v3_10_1, - [Description("3.10.2")] - v3_10_2, - [Description("3.10.3")] - v3_10_3, - [Description("3.10.4")] - v3_10_4, - [Description("3.10.5")] - v3_10_5, - [Description("3.10.6")] - v3_10_6, - [Description("3.10.7")] - v3_10_7, - [Description("3.10.8")] - v3_10_8, - [Description("3.10.9")] - v3_10_9, - [Description("3.10.10")] - v3_10_10,*/ - [Description("3.10")] //3.10.11 - v3_10, - /*[Description("3.11.0")] - v3_11_0, - [Description("3.11.1")] - v3_11_1, - [Description("3.11.2")] - v3_11_2, - [Description("3.11.3")] - v3_11_3,*/ - [Description("3.11")] //3.11.4 - v3_11, - [Description("3.12")] - v3_12, - [Description("3.13")] - v3_13, - } -} - - diff --git a/Python_oM/PythonEnvironment.cs b/Python_oM/PythonEnvironment.cs index 7740cb3f..7f81cb67 100644 --- a/Python_oM/PythonEnvironment.cs +++ b/Python_oM/PythonEnvironment.cs @@ -22,8 +22,6 @@ using BH.oM.Base; -using BH.oM.Python.Enums; -using System.Collections.Generic; using System.ComponentModel; namespace BH.oM.Python @@ -37,8 +35,3 @@ public class PythonEnvironment : IObject public virtual string Executable { get; set; } = string.Empty; } } - - - - - diff --git a/requirements.txt b/requirements.txt deleted file mode 100644 index 13699a48ed47077c9b6aa9bb1723da3fa932759f..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 4206 zcmai%OK($25QTd^()<)hu?-AauwaWoLSieQ)M-yi>v%C6J;D>$M8KK^aP`{|C)p z8B2d#rt!HbhxRPz24`m*d3g*eGHfS;Lpch?P8OyiN5=bYixBxy@~>qkPxj#RT^rAm zO%%ggwjNp($gdQ!BgIN{LI@9C6c6EJFCTk(hAHr)(U0?EaW$57eUkOd8%Z4nl9Bu# z6~$cNYx&vfdoSCqBV|ZSsGRwWFBZ3UO05`faT!zK0L6!+|aP6w*XaC1KaOn#jUBtc=1A zr=5W-apluHNj4D^60ilQ)Pfq!C}mM3{~ zzVKBer&`w?2@&43C{{Xqlx!t5iNDHcvIz=jdMmW(nDMNIx$t4*PM>tvA()<>7;((b z2At4wWE}b^6gVvVpx?L3*GT`@Xki(Yna9_ivo+F`?u861 z$A~$t{Hk|Z4dlzS*36~7u3k?y#AKSt1B_3i1I$HE+}i*6bk*F6H#1Bgdb03MZ!r3l zH7kRc`b@EXMD3cbjCAeZ3J?8a%S28V$@Q@1?^2uIbv=?L`Z9BLu1Oa+f!V$8KI2Ss z^?Uu>HWQo33Nx+7jD?r5F_Yc(WQE$v3h4T=)@?AmP*-0v%DI>D<++!l8Uzc*^hqch z^$tG2=)X`J0%WUgbp>@;VR(>uk!xhJ;Gj1Jvn##=H^`xeP%s*Ol#p&(T?Qbl3zY{U& zdy4NMl-vgL&I2y2IZpN*T{_k`w~AZoFQt3Fm27p_;%X#k|G0+0S9#mZBXfJCNeJ^f z58c`Djs|xm=DVl8r-ZG6&eJM&*~z}G5g*-TG}vKU<}}D0`exytry|fwzL&dG2 zE=H4myAWGgN*rcsuT$)5?gmSJvQvNUbZ3&2>D{OHIzb;d*S}OYUDm-gXl3^ zfNwI#?Bd(qn7x6AVW;NNxEBxR&0T>VFekH(Y)$kFuN!r_>w&I>#k>s~d-9!UZWQsG zKb~=Z8?iAJ?>&8+6Kql;iR4SfGu1EuDmJE#@95O6^G)5E$w(HFrAaf=kb)Joz&tTa{M(^r^ gLF>6EnVXK@+SshS$eQdT_M4v)FE=`NLFssZ0>%hw8UO$Q From 691bd6c64919471b422f30938b793feb4f043611 Mon Sep 17 00:00:00 2001 From: Tristan Gerrish Date: Fri, 23 Oct 2026 15:17:59 +0100 Subject: [PATCH 04/16] C# methods functional, with end-to-end tests available --- .../Compute/VirtualEnvironment.cs | 137 ++++++++++++++++++ .../Python_Engine_Test.csproj | 41 ++++++ .../Query/DirectoryEnvironments.cs | 24 +++ .../Query/DirectoryExtensions.cs | 24 +++ .../Compute/GenerateTOML.cs | 74 ---------- .../Python_Toolkit_Tests.csproj | 24 +++ .../Python_Toolkit_Tests.sln | 44 ++++++ Python_Engine/Compute/Install.cs | 91 +++++------- Python_Engine/Compute/Remove.cs | 10 +- Python_Engine/Compute/Run.cs | 122 +++++++++++----- Python_Engine/Compute/UpdateBHoMPackages.cs | 2 +- Python_Engine/Compute/VirtualEnvironment.cs | 50 ++++++- Python_Engine/Python_Engine.csproj | 3 +- Python_Engine/Query/Directory.cs | 1 + Python_Engine/Query/Version.cs | 53 ++----- Python_Engine/Query/VirtualEnvironment.cs | 10 +- Python_oM/Python_oM.csproj | 3 +- 17 files changed, 486 insertions(+), 227 deletions(-) create mode 100644 .ci/unit_tests/Python_Engine_Test/Compute/VirtualEnvironment.cs create mode 100644 .ci/unit_tests/Python_Engine_Test/Python_Engine_Test.csproj create mode 100644 .ci/unit_tests/Python_Engine_Test/Query/DirectoryEnvironments.cs create mode 100644 .ci/unit_tests/Python_Engine_Test/Query/DirectoryExtensions.cs delete mode 100644 .ci/unit_tests/Python_Toolkit_Tests/Compute/GenerateTOML.cs create mode 100644 .ci/unit_tests/Python_Toolkit_Tests/Python_Toolkit_Tests.csproj create mode 100644 .ci/unit_tests/Python_Toolkit_Tests/Python_Toolkit_Tests.sln diff --git a/.ci/unit_tests/Python_Engine_Test/Compute/VirtualEnvironment.cs b/.ci/unit_tests/Python_Engine_Test/Compute/VirtualEnvironment.cs new file mode 100644 index 00000000..d2548736 --- /dev/null +++ b/.ci/unit_tests/Python_Engine_Test/Compute/VirtualEnvironment.cs @@ -0,0 +1,137 @@ + +using NUnit; +using NUnit.Framework; +using FluentAssertions; +using BH.oM.Python; + +namespace BH.Tests.Engine.Python.Compute +{ + public class VirtualEnvironmentTests + { + [Test] + public void VirtualEnvironment_FromTOML() + { + string envName = "test_from_toml"; + string envDirectory = BH.Engine.Python.Query.DirectoryEnvironments(); + + // pre-run clean-up + try + { + BH.Engine.Python.Compute.RemoveVirtualEnvironment(name: envName, true); + } + catch { + // do it the manual way, if there is no env to remove, it'll throw an error + Directory.Delete(path: Path.Combine(envDirectory, envName), recursive: true); + } + + // create the test directory + string testDirectory = Path.Combine(envDirectory, envName); + Directory.CreateDirectory(testDirectory); + + // create dummy README file + File.WriteAllText(Path.Combine(testDirectory, "README.md"), ""); + + // create dummy TOML file + List lines = + [ + "[project]", + $"name = \"{envName}\"", + "version = \"0.1.0\"", + "description = \"A test environment.\"", + "readme = \"README.md\"", + "requires-python = \">=3.10,<3.11\"", + "authors = [", + " { name = \"BHoM\", email = \"bhombot@burohappold.com\" }", + "]", + "dependencies = [\"matplotlib\"]", + "[build-system]", + "requires = [\"hatchling\"]", + "build-backend = \"hatchling.build\"", + "", + "[dependency-groups]", + "dev = [\"ipykernel\", \"ruff\"]", + "[tool.hatch.build.targets.wheel]", + $"packages = [\"src/{envName}\"]" + ]; + + string tomlFileContent = string.Join(Environment.NewLine, lines); + string tomlFile = Path.Combine(testDirectory, "pyproject.toml"); + File.WriteAllText(tomlFile, tomlFileContent); + + // create a dummy Python package + string packageDir = Path.Combine(testDirectory, "src", envName); + Directory.CreateDirectory(packageDir); + File.WriteAllText(Path.Combine(packageDir, "__init__.py"), ""); + + // run the method + PythonEnvironment venv = BH.Engine.Python.Compute.VirtualEnvironment(tomlFile: tomlFile, reload: false); + + // ensure that ipykernel is installed + string result = BH.Engine.Python.Compute.RunPythonString(venv: venv, "import ipykernel"); + result.ToLower().Should().NotContainAny(["error", "exception"]); + + // assert that the virtual environment was created correctly + venv.Should().NotBeNull(); + venv.Name.Should().Be(envName); + File.Exists(venv.Executable).Should().BeTrue(); + + // run again, reloading this time + PythonEnvironment reloadedVenv = BH.Engine.Python.Compute.VirtualEnvironment(tomlFile: tomlFile, reload: true); + + // assert that the virtual environment was created correctly + reloadedVenv.Should().NotBeNull(); + reloadedVenv.Name.Should().Be(envName); + reloadedVenv.Executable.Should().Be(Path.Combine(testDirectory, ".venv", "Scripts", "python.exe")); + File.Exists(reloadedVenv.Executable).Should().BeTrue(); + + // clean-up + BH.Engine.Python.Compute.RemoveVirtualEnvironment(name: envName, true); + } + + [Test] + public void VirtualEnvironment_FromTargetVersion() + { + string targetVersion = "3.11"; + string envName = "test_from_target_version"; + string envDirectory = BH.Engine.Python.Query.DirectoryEnvironments(); + + // pre-run clean-up + try + { + BH.Engine.Python.Compute.RemoveVirtualEnvironment(name: envName, true); + } + catch + { + // do it the manual way, if there is no env to remove, it'll throw an error + Directory.Delete(path: Path.Combine(envDirectory, envName), recursive: true); + } + + // run the method + PythonEnvironment venv = BH.Engine.Python.Compute.VirtualEnvironment(version: targetVersion, name: envName, reload: false); + + // add a package + BH.Engine.Python.Compute.InstallPackages(venv, ["matplotlib"], true); + + // ensure that ipykernel is installed + string result = BH.Engine.Python.Compute.RunPythonString(venv: venv, "import ipykernel;import matplotlib"); + result.ToLower().Should().NotContainAny(["error", "exception"]); + + // assert that the virtual environment was created correctly + venv.Should().NotBeNull(); + venv.Name.Should().Be(envName); + File.Exists(venv.Executable).Should().BeTrue(); + + // run again, reloading this time + PythonEnvironment reloadedVenv = BH.Engine.Python.Compute.VirtualEnvironment(version: targetVersion, name: envName, reload: true); + + // assert that the virtual environment was created correctly + reloadedVenv.Should().NotBeNull(); + reloadedVenv.Name.Should().Be(envName); + reloadedVenv.Executable.Should().Be(Path.Combine(envDirectory, envName, ".venv", "Scripts", "python.exe")); + File.Exists(reloadedVenv.Executable).Should().BeTrue(); + + // clean-up + BH.Engine.Python.Compute.RemoveVirtualEnvironment(name: envName, true); + } + } +} \ No newline at end of file diff --git a/.ci/unit_tests/Python_Engine_Test/Python_Engine_Test.csproj b/.ci/unit_tests/Python_Engine_Test/Python_Engine_Test.csproj new file mode 100644 index 00000000..1a39960b --- /dev/null +++ b/.ci/unit_tests/Python_Engine_Test/Python_Engine_Test.csproj @@ -0,0 +1,41 @@ + + + + net9.0 + latest + enable + enable + false + BH.Tests.Engine.Python + + + + + + + + + + + + + + + + + + + ..\..\..\..\..\..\..\..\..\ProgramData\BHoM\Assemblies\BHoM.dll + True + + + ..\..\..\..\..\..\..\..\..\ProgramData\BHoM\Assemblies\BHoM_Engine.dll + True + + + + + + + + diff --git a/.ci/unit_tests/Python_Engine_Test/Query/DirectoryEnvironments.cs b/.ci/unit_tests/Python_Engine_Test/Query/DirectoryEnvironments.cs new file mode 100644 index 00000000..0429d51d --- /dev/null +++ b/.ci/unit_tests/Python_Engine_Test/Query/DirectoryEnvironments.cs @@ -0,0 +1,24 @@ + +using NUnit; +using NUnit.Framework; +using FluentAssertions; + +namespace BH.Tests.Engine.Python.Query +{ + public class DirectoryEnvironmentsTests + { + [Test] + public void DirectoryEnvironments() + { + string environmentsDirectory = "C:\\ProgramData\\BHoM\\Extensions\\Python"; + + var result = new DirectoryInfo(BH.Engine.Python.Query.DirectoryEnvironments()); + + Assert.That(result, Is.Not.Null); + + result.FullName.Should().Be(environmentsDirectory); + + Directory.Exists(environmentsDirectory).Should().BeTrue(); + } + } +} \ No newline at end of file diff --git a/.ci/unit_tests/Python_Engine_Test/Query/DirectoryExtensions.cs b/.ci/unit_tests/Python_Engine_Test/Query/DirectoryExtensions.cs new file mode 100644 index 00000000..0cac6241 --- /dev/null +++ b/.ci/unit_tests/Python_Engine_Test/Query/DirectoryExtensions.cs @@ -0,0 +1,24 @@ + +using NUnit; +using NUnit.Framework; +using FluentAssertions; + +namespace BH.Tests.Engine.Python.Query +{ + public class DirectoryExtensionTests + { + [Test] + public void DirectoryExtension() + { + string extensionsDirectory = "C:\\ProgramData\\BHoM\\Extensions"; + + var result = new DirectoryInfo(BH.Engine.Python.Query.DirectoryExtensions()); + + Assert.That(result, Is.Not.Null); + + result.FullName.Should().Be(extensionsDirectory); + + Directory.Exists(extensionsDirectory).Should().BeTrue(); + } + } +} \ No newline at end of file diff --git a/.ci/unit_tests/Python_Toolkit_Tests/Compute/GenerateTOML.cs b/.ci/unit_tests/Python_Toolkit_Tests/Compute/GenerateTOML.cs deleted file mode 100644 index 8a47ee68..00000000 --- a/.ci/unit_tests/Python_Toolkit_Tests/Compute/GenerateTOML.cs +++ /dev/null @@ -1,74 +0,0 @@ -/* - * This file is part of the Buildings and Habitats object Model (BHoM) - * Copyright (c) 2015 - 2026, the respective contributors. All rights reserved. - * - * Each contributor holds copyright over their respective contributions. - * The project versioning (Git) records all such contribution source information. - * - * - * The BHoM is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as published by - * the Free Software Foundation, either version 3.0 of the License, or - * (at your option) any later version. - * - * The BHoM is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with this code. If not, see . - */ - -using BH.oM.Python.Enums; -using NUnit.Framework; -using System; -using System.Collections.Generic; -using System.IO; - -namespace BH.Tests.Engine.Python.Compute -{ - public class GenerateTOMLTests - { - [Test] - [Description("Check whether the TOML file is generated as expected.")] - public void GeneratesTOMLWithRequestedVersionAndPackages() - { - string temporaryDirectory = Path.Combine(Path.GetTempPath(), $"BHoM_PythonToolkit_{Guid.NewGuid():N}"); - Directory.CreateDirectory(temporaryDirectory); - - try - { - List packages = ["numpy", "pandas"]; - string projectName = "test-project"; - string tomlPath = Path.Combine(temporaryDirectory, "pyproject.toml"); - - string generatedPath = BH.Engine.Python.Compute.GenerateTOML( - PythonVersion.v3_10, - projectName, - packages, - temporaryDirectory); - - Assert.That(generatedPath, Is.EqualTo(tomlPath)); - Assert.That(File.Exists(tomlPath), Is.True, "The TOML file should be created in the requested directory."); - - string toml = File.ReadAllText(tomlPath); - Assert.That(toml, Does.Contain("[project]")); - Assert.That(toml, Does.Contain($"name = \"{projectName}\"")); - Assert.That(toml, Does.Contain("version = \"0.1.0\"")); - Assert.That(toml, Does.Contain($"requires-python = \"{PythonVersion.v3_10}\"")); - Assert.That(toml, Does.Contain("\"numpy\"")); - Assert.That(toml, Does.Contain("\"pandas\"")); - } - finally - { - if (Directory.Exists(temporaryDirectory)) - { - Directory.Delete(temporaryDirectory, recursive: true); - } - } - } - - } -} - diff --git a/.ci/unit_tests/Python_Toolkit_Tests/Python_Toolkit_Tests.csproj b/.ci/unit_tests/Python_Toolkit_Tests/Python_Toolkit_Tests.csproj new file mode 100644 index 00000000..6042ffe3 --- /dev/null +++ b/.ci/unit_tests/Python_Toolkit_Tests/Python_Toolkit_Tests.csproj @@ -0,0 +1,24 @@ + + + + net9.0 + latest + enable + enable + false + Debug;Release;Test + + + + + + + + + + + + + + + diff --git a/.ci/unit_tests/Python_Toolkit_Tests/Python_Toolkit_Tests.sln b/.ci/unit_tests/Python_Toolkit_Tests/Python_Toolkit_Tests.sln new file mode 100644 index 00000000..38c37425 --- /dev/null +++ b/.ci/unit_tests/Python_Toolkit_Tests/Python_Toolkit_Tests.sln @@ -0,0 +1,44 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 17 +VisualStudioVersion = 17.14.37806.7 d17.14 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Python_oM", "..\..\..\Python_oM\Python_oM.csproj", "{2D4E37A4-3636-E5BB-2C2C-F692C9282A24}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Python_Engine", "..\..\..\Python_Engine\Python_Engine.csproj", "{4B79A366-3679-57AC-7233-9150E52F7157}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Python_Engine_Test", "..\Python_Engine_Test\Python_Engine_Test.csproj", "{C87C6B79-3858-424A-B18B-080C162AE16F}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + Test|Any CPU = Test|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {2D4E37A4-3636-E5BB-2C2C-F692C9282A24}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {2D4E37A4-3636-E5BB-2C2C-F692C9282A24}.Debug|Any CPU.Build.0 = Debug|Any CPU + {2D4E37A4-3636-E5BB-2C2C-F692C9282A24}.Release|Any CPU.ActiveCfg = Release|Any CPU + {2D4E37A4-3636-E5BB-2C2C-F692C9282A24}.Release|Any CPU.Build.0 = Release|Any CPU + {2D4E37A4-3636-E5BB-2C2C-F692C9282A24}.Test|Any CPU.ActiveCfg = Test|Any CPU + {2D4E37A4-3636-E5BB-2C2C-F692C9282A24}.Test|Any CPU.Build.0 = Test|Any CPU + {4B79A366-3679-57AC-7233-9150E52F7157}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {4B79A366-3679-57AC-7233-9150E52F7157}.Debug|Any CPU.Build.0 = Debug|Any CPU + {4B79A366-3679-57AC-7233-9150E52F7157}.Release|Any CPU.ActiveCfg = Release|Any CPU + {4B79A366-3679-57AC-7233-9150E52F7157}.Release|Any CPU.Build.0 = Release|Any CPU + {4B79A366-3679-57AC-7233-9150E52F7157}.Test|Any CPU.ActiveCfg = Test|Any CPU + {4B79A366-3679-57AC-7233-9150E52F7157}.Test|Any CPU.Build.0 = Test|Any CPU + {C87C6B79-3858-424A-B18B-080C162AE16F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {C87C6B79-3858-424A-B18B-080C162AE16F}.Debug|Any CPU.Build.0 = Debug|Any CPU + {C87C6B79-3858-424A-B18B-080C162AE16F}.Release|Any CPU.ActiveCfg = Release|Any CPU + {C87C6B79-3858-424A-B18B-080C162AE16F}.Release|Any CPU.Build.0 = Release|Any CPU + {C87C6B79-3858-424A-B18B-080C162AE16F}.Test|Any CPU.ActiveCfg = Debug|Any CPU + {C87C6B79-3858-424A-B18B-080C162AE16F}.Test|Any CPU.Build.0 = Debug|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {E2BBA55C-F689-4F28-9E95-C6AE8CE47293} + EndGlobalSection +EndGlobal diff --git a/Python_Engine/Compute/Install.cs b/Python_Engine/Compute/Install.cs index ee7f572f..26347f26 100644 --- a/Python_Engine/Compute/Install.cs +++ b/Python_Engine/Compute/Install.cs @@ -38,66 +38,42 @@ public static void InstallUV(bool run = false) if (!run) return; - try + string uvBinPath = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.UserProfile), ".local", "bin"); + if (Directory.Exists(uvBinPath)) + Environment.SetEnvironmentVariable("PATH", uvBinPath + Path.PathSeparator + Environment.GetEnvironmentVariable("PATH")); + + string location = RunCommandStdout(command: "where.exe uv.exe"); + if (!location.EndsWith("uv.exe")) { - string uvBinPath = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.UserProfile), ".local", "bin"); + Base.Compute.RecordNote("Installing UV."); + string output = RunCommandStdout( + command: "powershell.exe -NoProfile -NonInteractive -ExecutionPolicy Bypass -Command \"$ErrorActionPreference = 'Stop'; irm https://astral.sh/uv/install.ps1 | iex\"" + ); + + // The installer cannot update the environment of this already-running process. if (Directory.Exists(uvBinPath)) Environment.SetEnvironmentVariable("PATH", uvBinPath + Path.PathSeparator + Environment.GetEnvironmentVariable("PATH")); - int exitCode; - string location = RunCommandStdout("where.exe uv.exe", out exitCode); - if (exitCode != 0) - { - Base.Compute.RecordNote("Installing UV."); - string output = RunCommandStdout( - "powershell.exe -NoProfile -NonInteractive -ExecutionPolicy Bypass -Command \"$ErrorActionPreference = 'Stop'; irm https://astral.sh/uv/install.ps1 | iex\"", - out exitCode); - if (exitCode != 0) - { - Base.Compute.RecordError(exception: new Exception(), message: $"Failed to install UV (exit code {exitCode}).\n{output}"); - return; - } - - // The installer cannot update the environment of this already-running process. - if (Directory.Exists(uvBinPath)) - Environment.SetEnvironmentVariable("PATH", uvBinPath + Path.PathSeparator + Environment.GetEnvironmentVariable("PATH")); - - location = RunCommandStdout("where.exe uv.exe", out exitCode); - } - - if (exitCode != 0) - { - Base.Compute.RecordError(exception: new Exception(), message: $"Could not locate UV on PATH after installation.\n{location}"); - return; - } - - string uvExecutable = location.Split(new[] { '\r', '\n' }, StringSplitOptions.RemoveEmptyEntries)[0]; - - foreach (string tool in new[] { "ruff", "jupyterlab", "sphinx" }) - { - string output = RunCommandStdout($"\"\"{uvExecutable}\" tool install {tool}\"", out exitCode); - if (exitCode != 0) - { - Base.Compute.RecordError(exception: new Exception(), message: $"Failed to install {tool} to UV (exit code {exitCode}).\n{output}"); - } - } - } - catch (System.ComponentModel.Win32Exception ex) - { - Base.Compute.RecordError(exception: new Exception(), message: $"Could not run the UV installation command. {ex.Message}"); + location = RunCommandStdout("where.exe uv.exe"); } - catch (TimeoutException ex) + + string uvExecutable = location.Split(new[] { '\r', '\n' }, StringSplitOptions.RemoveEmptyEntries)[0]; + + foreach (string tool in new[] { "ruff", "jupyterlab", "sphinx" }) { - Base.Compute.RecordError(exception: new Exception(), message: $"UV installation timed out. {ex.Message}"); + RunCommandStdout($"\"\"{uvExecutable}\" tool install {tool}\""); } } [Description("Register a Jupyer kernel for a given venv.")] [Input("venv", "The Python environment to install the packages to.")] - public static void InstallJupyterKernel(PythonEnvironment venv) + public static void InstallJupyterKernel(this PythonEnvironment venv) { - string cmd = $"{venv.Executable} -m ipykernel insatll --user --name {venv.Name} --display-name {venv.Name}"; - RunCommandStdout(command: cmd, hideWindows: true); + venv.InstallPackages(packages: new List() { "ipykernel" }, true); + string directory = Query.VirtualEnvironmentDirectory(venv.Name); + + string cmd = $"{venv.Executable} -m ipykernel install --user --name {venv.Name} --display-name {venv.Name}"; + RunCommandStdout(command: cmd, startDirectory: directory); } [Description("Install a list of packages to a given Python executable.")] @@ -110,12 +86,15 @@ public static void InstallPackages( bool run = false ) { - string cmd = $"uv add {string.Join(" ", packages)}"; string directory = Query.VirtualEnvironmentDirectory(venv.Name); + bool isProject = File.Exists(Path.Combine(directory, "pyproject.toml")); + + string uvCommand = isProject ? "add" : "pip install"; + string cmd = $"uv {uvCommand} {string.Join(" ", packages)}"; if (run) - { - string result = RunCommandStdout(cmd, out int exitCode, startDirectory: directory); + { + RunCommandStdout(command: cmd, startDirectory: directory); } else { @@ -136,14 +115,18 @@ public static void InstallPackageLocal( if (!Directory.Exists(packageDirectory)) Base.Compute.RecordError($"{packageDirectory} not found."); - string cmd = $"uv add --editable {packageDirectory}"; string directory = Query.VirtualEnvironmentDirectory(venv.Name); + bool isProject = File.Exists(Path.Combine(directory, "pyproject.toml")); + + string uvCommand = isProject ? "add --editable" : "pip install -e"; + string cmd = $"uv {uvCommand} {packageDirectory}"; if (run) { - string result = RunCommandStdout(cmd, out int exitCode, startDirectory: directory); + RunCommandStdout(command: cmd, startDirectory: directory); } - else { + else + { Base.Compute.RecordNote($"The following command will be executed from \"{directory}\": {cmd}"); } } diff --git a/Python_Engine/Compute/Remove.cs b/Python_Engine/Compute/Remove.cs index 070b88cb..432a3247 100644 --- a/Python_Engine/Compute/Remove.cs +++ b/Python_Engine/Compute/Remove.cs @@ -20,8 +20,10 @@ * along with this code. If not, see . */ +using BH.oM.Base; using BH.oM.Base.Attributes; using BH.oM.Python; +using System; using System.ComponentModel; using System.IO; @@ -46,7 +48,7 @@ public static void RemoveVirtualEnvironment(string name, bool run = false) { RemoveKernel(name, run); - try + try { Directory.Delete(venvDirectory, true); } @@ -63,17 +65,17 @@ public static void RemoveVirtualEnvironment(string name, bool run = false) public static void RemoveKernel(string name, bool run = false) { if (!Query.VirtualEnvironmentExists(name)) - { + { Base.Compute.RecordError($"No Python environment named {name} exists."); return; } PythonEnvironment venv = Query.VirtualEnvironment(name); - string cmd = $"{venv.Executable} -m jupyter kernelspec uninstall {name} -f"; + string cmd = $"{venv.Executable} -m jupyter kernelspec uninstall {name.ToLower()} -f"; if (run) { - RunCommandStdout(command: cmd, hideWindows: true); + RunCommandStdout(command: cmd, hideWindow: true); } else { diff --git a/Python_Engine/Compute/Run.cs b/Python_Engine/Compute/Run.cs index 8dddea65..54b9a3bd 100644 --- a/Python_Engine/Compute/Run.cs +++ b/Python_Engine/Compute/Run.cs @@ -21,69 +21,111 @@ */ using BH.oM.Base.Attributes; +using System; using System.Collections.Generic; using System.ComponentModel; +using System.Diagnostics; using System.IO; using System.Linq; +using System.Threading.Tasks; namespace BH.Engine.Python { public static partial class Compute - { + { [Description("Run a command via CMD and return stdout.")] [Input("command", "The command to be run.")] [Input("hideWindows", "Set to True to hide cmd windows.")] [Input("startDirectory", "The directory in which the command should be run.")] [Input("timeoutMinutes", "A number of minutes beyond which this command will timeout.")] - [Output("stdout", "The StandardOutput from the command that was run. If the process failed, then StandardError will be returned here instead.")] - public static string RunCommandStdout(string command, bool hideWindows = true, string startDirectory = null, double timeoutMinutes = 5) + [Output("stdout", "The StandardOutput from the command that was run, if the process was successful.")] + public static string RunCommandStdout( + string command, + bool hideWindow = true, + string startDirectory = null, + double timeoutMinutes = 5 + ) { - int exitCode; - return RunCommandStdout(command, out exitCode, hideWindows, startDirectory, timeoutMinutes); - } - - private static string RunCommandStdout(string command, out int exitCode, bool hideWindows = true, string startDirectory = null, double timeoutMinutes = 5) - { - System.Diagnostics.Process process = new System.Diagnostics.Process(); + if (string.IsNullOrWhiteSpace(startDirectory)) + { + startDirectory = Environment.CurrentDirectory; + } - string commandMode = "/K"; - if (hideWindows) + if (!Directory.Exists(startDirectory)) { - process.StartInfo.CreateNoWindow = true; - process.StartInfo.WindowStyle = System.Diagnostics.ProcessWindowStyle.Hidden; - commandMode = "/C"; + throw new DirectoryNotFoundException( + string.Format("Working directory does not exist: '{0}'", startDirectory)); } - // override some commonly used user/system environment variables to avoid some potential weirdness - List sysVariables = new List() { "PYTHONHOME", "PYTHONPATH" }; - foreach (var sysVar in sysVariables) - process.StartInfo.Environment[sysVar] = ""; + var process = new Process(); + + try + { + process.StartInfo.FileName = "cmd.exe"; + process.StartInfo.Arguments = string.Format("/C \"{0}\"", command); + process.StartInfo.WorkingDirectory = startDirectory; + + process.StartInfo.UseShellExecute = false; + process.StartInfo.RedirectStandardOutput = true; + process.StartInfo.RedirectStandardError = true; + process.StartInfo.CreateNoWindow = hideWindow; + process.StartInfo.WindowStyle = + hideWindow + ? ProcessWindowStyle.Hidden + : ProcessWindowStyle.Normal; + + // Avoid environment-variable interference. + process.StartInfo.EnvironmentVariables["PYTHONHOME"] = string.Empty; + process.StartInfo.EnvironmentVariables["PYTHONPATH"] = string.Empty; + + process.Start(); - process.StartInfo.FileName = "cmd.exe"; - process.StartInfo.RedirectStandardOutput = true; - process.StartInfo.RedirectStandardError = true; - process.StartInfo.UseShellExecute = false; - process.StartInfo.Arguments = $"{commandMode} {command}"; - process.Start(); + var stdoutTask = process.StandardOutput.ReadToEndAsync(); + var stderrTask = process.StandardError.ReadToEndAsync(); - // Read both streams concurrently so verbose commands cannot block on a full buffer. - var stdoutTask = process.StandardOutput.ReadToEndAsync(); - var stderrTask = process.StandardError.ReadToEndAsync(); + int timeoutMs = checked((int)(timeoutMinutes * 60 * 1000)); - int millisecondsToWait = checked((int)(timeoutMinutes * 60 * 1000)); - if (!process.WaitForExit(millisecondsToWait)) + if (!process.WaitForExit(timeoutMs)) + { + try + { + process.Kill(); + } + catch + { + // Ignore if already exited. + } + + throw new TimeoutException( + string.Format( + "Command exceeded timeout of {0} minutes.", + timeoutMinutes)); + } + + // Ensure async reads have completed. + Task.WaitAll(stdoutTask, stderrTask); + + string stdout = stdoutTask.Result.Trim(); + string stderr = stderrTask.Result.Trim(); + + int exitCode = process.ExitCode; + string output = exitCode == 0 ? stdout : stderr; + + if (exitCode != 0) + { + string message = $"Failed to execute {command} (exit code {exitCode}).\n{output}"; + BH.Engine.Base.Compute.RecordError( + exception: new InvalidOperationException(message), + message: message); + } + + return output; + + } + finally { - process.Kill(); process.Dispose(); - throw new System.TimeoutException($"Command exceeded {timeoutMinutes} minutes."); } - - string stdout = stdoutTask.GetAwaiter().GetResult(); - string stderr = stderrTask.GetAwaiter().GetResult(); - exitCode = process.ExitCode; - process.Dispose(); - - return (exitCode != 0 ? stderr : stdout).Trim(); } [Description("Run a string containing Python code and return the output. The string passed should end with a \"print\" statement, and other print statements within it should be captured within the script to ensure only a single output string is passed back to this method.")] @@ -106,7 +148,7 @@ public static string RunPythonString(this oM.Python.PythonEnvironment venv, stri string cmd = $"{Modify.AddQuotesIfRequired(venv.Executable)} {scriptFile}"; - return RunCommandStdout(cmd, hideWindows: true); + return RunCommandStdout(command: cmd); } } } diff --git a/Python_Engine/Compute/UpdateBHoMPackages.cs b/Python_Engine/Compute/UpdateBHoMPackages.cs index 7c8e28de..57e6ff66 100644 --- a/Python_Engine/Compute/UpdateBHoMPackages.cs +++ b/Python_Engine/Compute/UpdateBHoMPackages.cs @@ -36,7 +36,7 @@ public static void UpdateBHoMPackages(this PythonEnvironment venv) string cmd = "uv sync"; string directory = Path.Combine(Query.DirectoryEnvironments(), venv.Name); - RunCommandStdout(cmd, out int exitCode, startDirectory: directory); + RunCommandStdout(cmd, startDirectory: directory); } } } diff --git a/Python_Engine/Compute/VirtualEnvironment.cs b/Python_Engine/Compute/VirtualEnvironment.cs index 064259d4..874ed269 100644 --- a/Python_Engine/Compute/VirtualEnvironment.cs +++ b/Python_Engine/Compute/VirtualEnvironment.cs @@ -22,8 +22,10 @@ using BH.oM.Base.Attributes; using BH.oM.Python; +using System; using System.ComponentModel; using System.IO; +using System.Text.RegularExpressions; namespace BH.Engine.Python { @@ -40,7 +42,13 @@ public static PythonEnvironment VirtualEnvironment(string version, string name, { if (reload) { - return new PythonEnvironment() { Executable = Query.VirtualEnvironmentExecutable(name), Name = name }; + PythonEnvironment existingVenv = new PythonEnvironment() { Executable = Query.VirtualEnvironmentExecutable(name), Name = name }; + string existingVersion = Query.Version(existingVenv); + if (existingVersion != version) + { + BH.Engine.Base.Compute.RecordError($"The requested environment already exists using Python {existingVersion}, but is being requested with Python {version}. Either provide a different name, a matching version, or remove the existing environment."); + } + return existingVenv; } else { @@ -52,8 +60,10 @@ public static PythonEnvironment VirtualEnvironment(string version, string name, InstallUV(true); // ensure UV is installed string directory = Path.Combine(Query.DirectoryEnvironments(), name); - string cmd = $"uv venv {Path.Combine(directory, "venv")} --python {version}"; - RunCommandStdout(cmd, out int exitCode, startDirectory: directory); + Directory.CreateDirectory(directory); + + string cmd = $"uv venv {Path.Combine(directory, ".venv")} --python {version}"; + RunCommandStdout(command: cmd, startDirectory: directory); PythonEnvironment venv = new PythonEnvironment() { Executable = Query.VirtualEnvironmentExecutable(name), Name = name }; @@ -68,18 +78,44 @@ public static PythonEnvironment VirtualEnvironment(string version, string name, [Output("venv", "The executable for the resultant venv.")] public static PythonEnvironment VirtualEnvironment(string tomlFile, bool reload = true) { + string name = Directory.GetParent(tomlFile).Name; + string directory = Path.Combine(Query.DirectoryEnvironments(), name); + + // a package must have an associated TOML file, a README.md and a src/ if (!File.Exists(tomlFile)) { Base.Compute.RecordError($"TOML file not found at {tomlFile}"); return null; } - string name = Directory.GetParent(tomlFile).Name; + string readmeFile = Path.Combine(directory, "README.md"); + if (!File.Exists(readmeFile)) + { + Base.Compute.RecordError($"README.md file not found at {readmeFile}"); + return null; + } + + // get the package name from the TOML file + string packageName = Regex.Match( + File.ReadAllText(tomlFile), + "^name\\s*=\\s*\"([^\"]+)\"", + RegexOptions.Multiline) + .Groups[1] + .Value; + + string packageFile = Path.Combine(directory, "src", packageName, "__init__.py"); + if (!File.Exists(packageFile)) + { + Base.Compute.RecordError($"A Python package must contain a .\\src\\{packageName}\\__init__.py file."); + return null; + } + if (Query.VirtualEnvironmentExists(name)) { if (reload) { - return new PythonEnvironment() { Executable = Query.VirtualEnvironmentExecutable(name), Name = name }; + PythonEnvironment existingVenv = new PythonEnvironment() { Executable = Query.VirtualEnvironmentExecutable(name), Name = name }; + return existingVenv; } else { @@ -90,9 +126,9 @@ public static PythonEnvironment VirtualEnvironment(string tomlFile, bool reload InstallUV(true); // ensure UV is installed - string directory = Path.Combine(Query.DirectoryEnvironments(), name); + string cmd = "uv sync --all-packages"; - RunCommandStdout(cmd, out int exitCode, startDirectory: directory); + RunCommandStdout(cmd, startDirectory: directory); PythonEnvironment venv = new PythonEnvironment() { Executable = Query.VirtualEnvironmentExecutable(name), Name = name }; diff --git a/Python_Engine/Python_Engine.csproj b/Python_Engine/Python_Engine.csproj index c8e13db5..a7b78601 100644 --- a/Python_Engine/Python_Engine.csproj +++ b/Python_Engine/Python_Engine.csproj @@ -9,6 +9,7 @@ BH.Engine.Python 10.0.0.0 ..\Build\ + Debug;Release;Test @@ -39,7 +40,7 @@ - + diff --git a/Python_Engine/Query/Directory.cs b/Python_Engine/Query/Directory.cs index 69338391..b902c3c7 100644 --- a/Python_Engine/Query/Directory.cs +++ b/Python_Engine/Query/Directory.cs @@ -21,6 +21,7 @@ */ using BH.oM.Base.Attributes; +using BH.oM.Python; using BH.oM.Python.Enums; using System.ComponentModel; using System.IO; diff --git a/Python_Engine/Query/Version.cs b/Python_Engine/Query/Version.cs index 30d29ac0..40abb5a9 100644 --- a/Python_Engine/Query/Version.cs +++ b/Python_Engine/Query/Version.cs @@ -21,6 +21,7 @@ */ using BH.oM.Base.Attributes; +using BH.oM.Python; using BH.oM.Python.Enums; using System; using System.Collections.Generic; @@ -36,51 +37,23 @@ public static partial class Query [Description("Gets the Python version for the requested Python executable.")] [Input("pythonExecutable", "Path to python.exe.")] [Output("version", "Python version of the requested Python executable.")] - public static PythonVersion Version(string pythonExecutable) + public static string Version(string pythonExecutable) { - if (!File.Exists(pythonExecutable)) + if (!File.Exists(pythonExecutable)) { - return PythonVersion.Undefined; + BH.Engine.Base.Compute.RecordError(new FileNotFoundException(), $"No file found at {pythonExecutable}"); } - Process process = new Process() - { - StartInfo = new ProcessStartInfo() - { - FileName = pythonExecutable, - Arguments = $"--version", - RedirectStandardError = true, - RedirectStandardOutput = true, - UseShellExecute = false, - } - }; - - try - { - string versionString; - using (Process p = Process.Start(process.StartInfo)) - { - string standardError = p.StandardError.ReadToEnd(); - versionString = p.StandardOutput.ReadToEnd().TrimEnd(); - p.WaitForExit(); - if (p.ExitCode != 0) - { - BH.Engine.Base.Compute.RecordError($"Error getting Python version.\n{standardError}"); - return PythonVersion.Undefined; - } - } - - List strings = versionString.Replace("Python ", "").Replace(".", "_").Split('_').ToList(); - strings.RemoveAt(strings.Count - 1); - string enumParseable = "v" + strings.Aggregate((a, b) => $"{a}_{b}"); - - return (PythonVersion)Enum.Parse(typeof(PythonVersion), enumParseable); - } - catch - { - return PythonVersion.Undefined; - } + string result = BH.Engine.Python.Compute.RunCommandStdout(command: $"{pythonExecutable} --version"); + return result.Replace("Python ", ""); + } + [Description("Get the Python version for the installed PythonEnvironment.")] + [Input("venv", "The PythonEnvironment.")] + [Output("version", "Python version of the installed PythonEnvironment.")] + public static string Version(this PythonEnvironment venv) + { + return Version(venv.Executable); } } } diff --git a/Python_Engine/Query/VirtualEnvironment.cs b/Python_Engine/Query/VirtualEnvironment.cs index c3eafce5..32bc37d2 100644 --- a/Python_Engine/Query/VirtualEnvironment.cs +++ b/Python_Engine/Query/VirtualEnvironment.cs @@ -34,8 +34,8 @@ public static partial class Query [Input("name", "The name given to the Python Environment.")] [Output("executable", "The path to the executable.")] public static string VirtualEnvironmentExecutable(string name) - { - string exePath = Path.Combine(Query.DirectoryEnvironments(), name, "venv", "Scripts", "python.exe"); + { + string exePath = Path.Combine(Query.DirectoryEnvironments(), name, ".venv", "Scripts", "python.exe"); if (!File.Exists(exePath)) Base.Compute.RecordError($"{exePath} was not found."); @@ -47,11 +47,11 @@ public static string VirtualEnvironmentExecutable(string name) [Output("exists", "True if exists, False if not.")] public static bool VirtualEnvironmentExists(string name) { - string expectedVenvPath = Path.Combine(Query.DirectoryEnvironments(), name, "venv"); - + string expectedVenvPath = Path.Combine(Query.DirectoryEnvironments(), name, ".venv"); + if (Directory.Exists(expectedVenvPath) & File.Exists(VirtualEnvironmentExecutable(name))) return true; - + return false; } diff --git a/Python_oM/Python_oM.csproj b/Python_oM/Python_oM.csproj index c9a7e568..d28aace7 100644 --- a/Python_oM/Python_oM.csproj +++ b/Python_oM/Python_oM.csproj @@ -10,6 +10,7 @@ BH.oM.Python 10.0.0.0 ..\Build\ + Debug;Release;Test @@ -21,7 +22,7 @@ - + From ed81027415b8a201938f2d700656d42ba2732c0c Mon Sep 17 00:00:00 2001 From: Tristan Gerrish Date: Mon, 2 Nov 2026 12:38:22 +0000 Subject: [PATCH 05/16] updated gitignore --- .gitignore | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index f92923f1..2ce1d0e1 100644 --- a/.gitignore +++ b/.gitignore @@ -219,4 +219,7 @@ dmypy.json cython_debug/ # Additional directories to ignore -.benchmarks/ \ No newline at end of file +.benchmarks/ + +# UV +uv.lock From de4b4a071de75b3c396e76d14fce86aab526719f Mon Sep 17 00:00:00 2001 From: Tristan Gerrish Date: Mon, 2 Nov 2026 12:41:01 +0000 Subject: [PATCH 06/16] updated UV methods, copilot assisted tests added --- .../Python_Engine_Test/Compute/Install.cs | 228 ++++ .../Compute/InstallRemoveTestBase.cs | 221 ++++ .../Python_Engine_Test/Compute/Pytest.cs | 101 ++ .../Python_Engine_Test/Compute/Remove.cs | 130 ++ .../Python_Engine_Test/Compute/Run.cs | 89 ++ .../Compute/VirtualEnvironment.cs | 224 ++-- .../Python_Engine_Test/Query/Directory.cs | 51 + .../Query/DirectoryEnvironments.cs | 24 - .../Query/DirectoryExtensions.cs | 24 - .../Python_Toolkit_Tests.csproj | 24 - .../Python_Toolkit_Tests.sln | 44 - Python_Engine/Compute/Install.cs | 127 +- Python_Engine/Compute/Remove.cs | 55 +- Python_Engine/Compute/Run.cs | 88 +- Python_Engine/Compute/UpdateBHoMPackages.cs | 2 +- Python_Engine/Compute/VirtualEnvironment.cs | 55 +- Python_Engine/Python/Dockerfile | 36 +- Python_Engine/Python/pyproject.toml | 2 +- Python_Engine/Python/scripts/pre_commit.ps1 | 4 +- Python_Engine/Python/scripts/shared.ps1 | 32 +- Python_Engine/Python/uv.lock | 1058 ++++++++--------- Python_Engine/Python_Engine.csproj | 2 +- Python_Engine/Query/Directory.cs | 12 +- Python_Engine/Query/UVExecutable.cs | 38 + Python_Engine/Query/Version.cs | 13 +- Python_Engine/Query/VirtualEnvironment.cs | 11 +- Python_Toolkit.sln | 6 + README.md | 8 +- 28 files changed, 1813 insertions(+), 896 deletions(-) create mode 100644 .ci/unit_tests/Python_Engine_Test/Compute/Install.cs create mode 100644 .ci/unit_tests/Python_Engine_Test/Compute/InstallRemoveTestBase.cs create mode 100644 .ci/unit_tests/Python_Engine_Test/Compute/Pytest.cs create mode 100644 .ci/unit_tests/Python_Engine_Test/Compute/Remove.cs create mode 100644 .ci/unit_tests/Python_Engine_Test/Compute/Run.cs create mode 100644 .ci/unit_tests/Python_Engine_Test/Query/Directory.cs delete mode 100644 .ci/unit_tests/Python_Engine_Test/Query/DirectoryEnvironments.cs delete mode 100644 .ci/unit_tests/Python_Engine_Test/Query/DirectoryExtensions.cs delete mode 100644 .ci/unit_tests/Python_Toolkit_Tests/Python_Toolkit_Tests.csproj delete mode 100644 .ci/unit_tests/Python_Toolkit_Tests/Python_Toolkit_Tests.sln create mode 100644 Python_Engine/Query/UVExecutable.cs diff --git a/.ci/unit_tests/Python_Engine_Test/Compute/Install.cs b/.ci/unit_tests/Python_Engine_Test/Compute/Install.cs new file mode 100644 index 00000000..c44df2d6 --- /dev/null +++ b/.ci/unit_tests/Python_Engine_Test/Compute/Install.cs @@ -0,0 +1,228 @@ +/* + * This file is part of the Buildings and Habitats object Model (BHoM) + * Copyright (c) 2015 - 2026, the respective contributors. All rights reserved. + * + * Each contributor holds copyright over their respective contributions. + * The project versioning (Git) records all such contribution source information. + * + * + * The BHoM is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3.0 of the License, or + * (at your option) any later version. + * + * The BHoM is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this code. If not, see . + */ + +using FluentAssertions; +using EngineCompute = BH.Engine.Python.Compute; +using EngineQuery = BH.Engine.Python.Query; + +namespace BH.Tests.Engine.Python.Compute +{ + [NonParallelizable] + public class InstallTests : InstallRemoveTestBase + { + [Test] + public void InstallPythonToolkitVenv_InstallsAndReloadsToolkitEnvironment() + { + DirectoryInfo? repository = new DirectoryInfo(TestContext.CurrentContext.TestDirectory); + while (repository != null && !File.Exists(Path.Combine(repository.FullName, "Python_Engine", "Python", "pyproject.toml"))) + repository = repository.Parent; + repository.Should().NotBeNull("the toolkit sources must be available"); + string source = Path.Combine(repository!.FullName, "Python_Engine", "Python"); + string directory = Path.Combine(EngineQuery.DirectoryEnvironments(), EngineQuery.ToolkitName()); + + WithIsolatedDirectory(directory, () => + { + foreach (string file in new[] { "pyproject.toml", "README.md" }) + File.Copy(Path.Combine(source, file), Path.Combine(directory, file)); + string sourceFolder = Path.Combine(source, "src"); + foreach (string file in Directory.EnumerateFiles(sourceFolder, "*", SearchOption.AllDirectories)) + { + string relative = Path.GetRelativePath(sourceFolder, file); + if (relative.Split(Path.DirectorySeparatorChar).Contains("__pycache__")) + continue; + string destination = Path.Combine(directory, "src", relative); + Directory.CreateDirectory(Path.GetDirectoryName(destination)!); + File.Copy(file, destination); + } + + try + { + var venv = EngineCompute.InstallPythonToolkitVenv(run: true, reload: false); + + venv.Should().NotBeNull(); + venv.Name.Should().Be(EngineQuery.ToolkitName()); + venv.Executable.Should().Be(Path.Combine(directory, ".venv", "Scripts", "python.exe")); + File.Exists(venv.Executable).Should().BeTrue(); + EngineCompute.RunPythonString(venv, + "import importlib.metadata; print(importlib.metadata.version('python_toolkit'))") + .Should().Be(BH.Engine.Base.Query.BHoMVersion()); + File.Exists(Path.Combine(m_Root, "jupyter", "kernels", venv.Name.ToLowerInvariant(), "kernel.json")).Should().BeTrue(); + EngineCompute.InstallPythonToolkitVenv(run: true, reload: true).Executable.Should().Be(venv.Executable); + AssertNoErrors(); + } + finally + { + string kernel = Path.Combine(m_Root, "jupyter", "kernels", EngineQuery.ToolkitName().ToLowerInvariant(), "kernel.json"); + if (File.Exists(kernel) && EngineQuery.VirtualEnvironmentExists(EngineQuery.ToolkitName())) + EngineCompute.RemoveJupyterKernel(EngineQuery.ToolkitName(), run: true); + } + }); + } + + [Test] + public void InstallUV_InstallsMissingTools() + { + PrepareToolPackages(); + + EngineCompute.InstallUV(run: true); + + string tools = Run(BH.Engine.Python.Query.UVExecutable(), "tool", "list"); + foreach (string tool in new[] { "ruff", "jupyterlab", "sphinx" }) + tools.Should().Contain(tool + " v1.0.0"); + AssertNoErrors(); + } + + [Test] + public void InstallUV_SkipsExistingTools() + { + PrepareToolPackages(); + EngineCompute.InstallUV(run: true); + string[] receipts = Directory.GetFiles(Path.Combine(m_Root, "tools"), "uv-receipt.toml", SearchOption.AllDirectories); + receipts.Should().HaveCount(3); + var timestamps = receipts.ToDictionary(path => path, File.GetLastWriteTimeUtc); + + EngineCompute.InstallUV(run: true); + + Environment.GetEnvironmentVariable("PATH")!.Split(Path.PathSeparator)[0] + .Should().Be(BH.Engine.Python.Query.DirectoryTools()); + BH.Engine.Python.Query.UVExecutable().Should() + .Be(Path.Combine(BH.Engine.Python.Query.DirectoryTools(), "uv.exe")); + foreach (var receipt in timestamps) + File.GetLastWriteTimeUtc(receipt.Key).Should().Be(receipt.Value); + AssertNoErrors(); + } + + [Test] + public void InstallPackages_SkipsSatisfiedVersion() + { + PreparePackageVersions(); + EngineCompute.InstallPackages(m_Environment, new() { "bhom-repeat-package==1.0.0" }, run: true); + string metadata = PackageMetadata("bhom_repeat_package", "1.0.0"); + DateTime timestamp = File.GetLastWriteTimeUtc(metadata); + + EngineCompute.InstallPackages(m_Environment, new() { "bhom-repeat-package>=1,<2" }, run: true); + + File.GetLastWriteTimeUtc(metadata).Should().Be(timestamp); + AssertNoErrors(); + } + + [Test] + public void InstallPackages_ChangesUnsatisfiedVersion() + { + PreparePackageVersions(); + EngineCompute.InstallPackages(m_Environment, new() { "bhom-repeat-package==1.0.0" }, run: true); + + EngineCompute.InstallPackages(m_Environment, new() { "bhom-repeat-package==2.0.0" }, run: true); + + File.Exists(PackageMetadata("bhom_repeat_package", "2.0.0")).Should().BeTrue(); + File.Exists(PackageMetadata("bhom_repeat_package", "1.0.0")).Should().BeFalse(); + AssertNoErrors(); + } + + [Test] + public void InstallPackages_RegistersAlreadyInstalledProjectDependency() + { + PreparePackageVersions(); + EngineCompute.InstallPackages(m_Environment, new() { "bhom-repeat-package==1.0.0" }, run: true); + string metadata = PackageMetadata("bhom_repeat_package", "1.0.0"); + DateTime timestamp = File.GetLastWriteTimeUtc(metadata); + CreateProject(); + + EngineCompute.InstallPackages(m_Environment, new() { "bhom-repeat-package==1.0.0" }, run: true); + + File.ReadAllText(Path.Combine(m_Root, "pyproject.toml")).Should().Contain("bhom-repeat-package==1.0.0"); + File.GetLastWriteTimeUtc(metadata).Should().Be(timestamp); + AssertNoErrors(); + } + + [Test] + public void InstallPackageLocal_SkipsSameUnchangedEditableSource() + { + string source = CreateLocalPackage("source with spaces"); + EngineCompute.InstallPackageLocal(m_Environment, source, run: true); + string metadata = PackageMetadata("bhom_local_package", "1.0.0"); + File.Exists(metadata).Should().BeTrue(); + DateTime timestamp = File.GetLastWriteTimeUtc(metadata); + + EngineCompute.InstallPackageLocal(m_Environment, source, run: true); + + File.GetLastWriteTimeUtc(metadata).Should().Be(timestamp); + AssertNoErrors(); + } + + [Test] + public void InstallPackageLocal_ReplacesDifferentEditableSource() + { + string first = CreateLocalPackage("first"); + string second = CreateLocalPackage("second"); + EngineCompute.InstallPackageLocal(m_Environment, first, run: true); + + EngineCompute.InstallPackageLocal(m_Environment, second, run: true); + + string directUrl = Path.Combine(Path.GetDirectoryName(PackageMetadata("bhom_local_package", "1.0.0"))!, "direct_url.json"); + File.ReadAllText(directUrl).Should().Contain(new Uri(second + Path.DirectorySeparatorChar).AbsoluteUri.TrimEnd('/')); + AssertNoErrors(); + } + + [Test] + public void InstallPackageLocal_UpdatesChangedVersion() + { + string source = CreateLocalPackage("local"); + EngineCompute.InstallPackageLocal(m_Environment, source, run: true); + string project = Path.Combine(source, "pyproject.toml"); + File.WriteAllText(project, File.ReadAllText(project).Replace("1.0.0", "2.0.0")); + + EngineCompute.InstallPackageLocal(m_Environment, source, run: true); + + File.Exists(PackageMetadata("bhom_local_package", "2.0.0")).Should().BeTrue(); + File.Exists(PackageMetadata("bhom_local_package", "1.0.0")).Should().BeFalse(); + AssertNoErrors(); + } + + [Test] + public void InstallPackageLocal_RegistersProjectDependency() + { + string source = CreateLocalPackage("local"); + EngineCompute.InstallPackageLocal(m_Environment, source, run: true); + CreateProject(); + + EngineCompute.InstallPackageLocal(m_Environment, source, run: true); + + File.ReadAllText(Path.Combine(m_Root, "pyproject.toml")).Should().Contain("bhom-local-package"); + AssertNoErrors(); + } + + [Test] + public void InstallJupyterKernel_SkipsExistingRegistration() + { + EngineCompute.InstallJupyterKernel(m_Environment); + string kernel = Path.Combine(m_Root, "jupyter", "kernels", m_Environment.Name, "kernel.json"); + File.Exists(kernel).Should().BeTrue(); + DateTime timestamp = File.GetLastWriteTimeUtc(kernel); + + EngineCompute.InstallJupyterKernel(m_Environment); + + File.GetLastWriteTimeUtc(kernel).Should().Be(timestamp); + AssertNoErrors(); + } + } +} diff --git a/.ci/unit_tests/Python_Engine_Test/Compute/InstallRemoveTestBase.cs b/.ci/unit_tests/Python_Engine_Test/Compute/InstallRemoveTestBase.cs new file mode 100644 index 00000000..0c112576 --- /dev/null +++ b/.ci/unit_tests/Python_Engine_Test/Compute/InstallRemoveTestBase.cs @@ -0,0 +1,221 @@ +/* + * This file is part of the Buildings and Habitats object Model (BHoM) + * Copyright (c) 2015 - 2026, the respective contributors. All rights reserved. + * + * Each contributor holds copyright over their respective contributions. + * The project versioning (Git) records all such contribution source information. + * + * + * The BHoM is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3.0 of the License, or + * (at your option) any later version. + * + * The BHoM is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this code. If not, see . + */ + +using FluentAssertions; +using BH.oM.Python; +using BH.oM.Base.Debugging; +using System.Diagnostics; +using System.IO.Compression; +using EngineQuery = BH.Engine.Python.Query; + +namespace BH.Tests.Engine.Python.Compute +{ + public abstract class InstallRemoveTestBase + { + protected string m_Root = null!; + protected PythonEnvironment m_Environment = null!; + private readonly Dictionary m_OriginalVariables = new(); + + [OneTimeSetUp] + public void EnsureManagedUV() + { + string? originalPath = Environment.GetEnvironmentVariable("PATH"); + try + { + BH.Engine.Base.Compute.ClearCurrentEvents(); + BH.Engine.Python.Compute.InstallUV(run: true); + File.Exists(EngineQuery.UVExecutable()).Should().BeTrue(); + AssertNoErrors(); + } + finally + { + Environment.SetEnvironmentVariable("PATH", originalPath); + BH.Engine.Base.Compute.ClearCurrentEvents(); + } + } + + [SetUp] + public void SetUp() + { + string name = "bhom_install_remove_" + Guid.NewGuid().ToString("N"); + m_Root = Path.Combine(EngineQuery.DirectoryEnvironments(), name); + Directory.CreateDirectory(m_Root); + m_Environment = new PythonEnvironment + { + Name = name, + Executable = Path.Combine(m_Root, ".venv", "Scripts", "python.exe") + }; + Run(EngineQuery.UVExecutable(), "venv", "--no-project", "--no-python-downloads", Path.Combine(m_Root, ".venv")); + SetVariable("JUPYTER_DATA_DIR", Path.Combine(m_Root, "jupyter")); + SetVariable("JUPYTER_PATH", Path.Combine(m_Root, "jupyter")); + SetVariable("UV_TOOL_DIR", Path.Combine(m_Root, "tools")); + SetVariable("UV_TOOL_BIN_DIR", Path.Combine(m_Root, "bin")); + SetVariable("UV_CACHE_DIR", Path.Combine(m_Root, "cache")); + string conflictingUV = Path.Combine(m_Root, "conflicting-uv"); + Directory.CreateDirectory(conflictingUV); + File.WriteAllText(Path.Combine(conflictingUV, "uv.cmd"), "@echo UV from PATH must not be used 1>&2\r\n@exit /b 99\r\n"); + SetVariable("PATH", conflictingUV + Path.PathSeparator + Environment.GetEnvironmentVariable("PATH")); + BH.Engine.Base.Compute.ClearCurrentEvents(); + } + + [TearDown] + public void TearDown() + { + foreach (var variable in m_OriginalVariables) + Environment.SetEnvironmentVariable(variable.Key, variable.Value); + m_OriginalVariables.Clear(); + if (Directory.Exists(m_Root)) + Directory.Delete(m_Root, true); + BH.Engine.Base.Compute.ClearCurrentEvents(); + } + + protected void PrepareToolPackages() + { + foreach (string tool in new[] { "ruff", "jupyterlab", "sphinx" }) + CreateWheel(tool, "1.0.0"); + SetVariable("UV_FIND_LINKS", Path.Combine(m_Root, "wheels")); + SetVariable("UV_OFFLINE", "true"); + } + + protected void PreparePackageVersions() + { + CreateWheel("bhom_repeat_package", "1.0.0"); + CreateWheel("bhom_repeat_package", "2.0.0"); + SetVariable("UV_FIND_LINKS", Path.Combine(m_Root, "wheels")); + SetVariable("UV_OFFLINE", "true"); + } + + private void CreateWheel(string name, string version) + { + string wheels = Path.Combine(m_Root, "wheels"); + Directory.CreateDirectory(wheels); + using var archive = ZipFile.Open(Path.Combine(wheels, $"{name}-{version}-py3-none-any.whl"), ZipArchiveMode.Create); + string info = $"{name}-{version}.dist-info"; + var files = new Dictionary + { + [$"{name}.py"] = "def main():\n pass\n", + [$"{info}/METADATA"] = $"Metadata-Version: 2.1\nName: {name.Replace('_', '-')}\nVersion: {version}\n", + [$"{info}/WHEEL"] = "Wheel-Version: 1.0\nGenerator: BHoM-tests\nRoot-Is-Purelib: true\nTag: py3-none-any\n", + [$"{info}/entry_points.txt"] = $"[console_scripts]\n{name} = {name}:main\n" + }; + files[$"{info}/RECORD"] = string.Join("\n", files.Keys.Select(path => path + ",,")) + $"\n{info}/RECORD,,\n"; + foreach (var file in files) + { + using var writer = new StreamWriter(archive.CreateEntry(file.Key).Open()); + writer.Write(file.Value); + } + } + + protected string CreateLocalPackage(string folder) + { + string source = Path.Combine(m_Root, folder); + Directory.CreateDirectory(source); + File.WriteAllText(Path.Combine(source, "pyproject.toml"), + "[build-system]\nrequires = [\"setuptools\"]\nbuild-backend = \"setuptools.build_meta\"\n" + + "[project]\nname = \"bhom-local-package\"\nversion = \"1.0.0\"\n"); + File.WriteAllText(Path.Combine(source, "bhom_local_package.py"), "VALUE = 1\n"); + return source; + } + + protected void CreateProject() + { + File.WriteAllText(Path.Combine(m_Root, "pyproject.toml"), + "[project]\nname = \"bhom-test-project\"\nversion = \"1.0.0\"\nrequires-python = \">=3.10\"\ndependencies = []\n"); + } + + protected string PackageMetadata(string name, string version) + { + return Path.Combine(m_Root, ".venv", "Lib", "site-packages", $"{name}-{version}.dist-info", "METADATA"); + } + + protected void SetVariable(string name, string value) + { + if (!m_OriginalVariables.ContainsKey(name)) + m_OriginalVariables.Add(name, Environment.GetEnvironmentVariable(name)); + Environment.SetEnvironmentVariable(name, value); + } + + protected static void WithIsolatedDirectory(string directory, Action test) + { + string backup = directory + ".test-backup-" + Guid.NewGuid().ToString("N"); + bool existed = Directory.Exists(directory); + if (existed) + Directory.Move(directory, backup); + try + { + Directory.CreateDirectory(directory); + test(); + } + finally + { + try + { + if (Directory.Exists(directory)) + Directory.Delete(directory, true); + } + finally + { + if (existed) + Directory.Move(backup, directory); + } + } + } + + protected static void AssertNoErrors() + { + BH.Engine.Base.Query.CurrentEvents().Where(e => e.Type == EventType.Error).Select(e => e.Message).Should().BeEmpty(); + } + + protected static void AssertWarningWithoutErrors() + { + AssertNoErrors(); + BH.Engine.Base.Query.CurrentEvents().Should().Contain(e => e.Type == EventType.Warning); + } + + protected static string Run(string executable, params string[] arguments) + { + using var process = new Process + { + StartInfo = new ProcessStartInfo(executable) + { + UseShellExecute = false, + RedirectStandardOutput = true, + RedirectStandardError = true, + CreateNoWindow = true + } + }; + foreach (string argument in arguments) + process.StartInfo.ArgumentList.Add(argument); + process.Start(); + Task stdout = process.StandardOutput.ReadToEndAsync(); + Task stderr = process.StandardError.ReadToEndAsync(); + if (!process.WaitForExit(120000)) + { + process.Kill(entireProcessTree: true); + Assert.Fail($"Test command timed out: {executable} {string.Join(" ", arguments)}"); + } + Task.WaitAll(stdout, stderr); + process.ExitCode.Should().Be(0, stderr.Result); + return stdout.Result.Trim(); + } + } +} diff --git a/.ci/unit_tests/Python_Engine_Test/Compute/Pytest.cs b/.ci/unit_tests/Python_Engine_Test/Compute/Pytest.cs new file mode 100644 index 00000000..36157922 --- /dev/null +++ b/.ci/unit_tests/Python_Engine_Test/Compute/Pytest.cs @@ -0,0 +1,101 @@ +/* + * This file is part of the Buildings and Habitats object Model (BHoM) + * Copyright (c) 2015 - 2026, the respective contributors. All rights reserved. + * + * Each contributor holds copyright over their respective contributions. + * The project versioning (Git) records all such contribution source information. + * + * + * The BHoM is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3.0 of the License, or + * (at your option) any later version. + * + * The BHoM is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this code. If not, see . + */ + +using FluentAssertions; +using BH.oM.Base.Debugging; +using System.Text.RegularExpressions; +using EngineCompute = BH.Engine.Python.Compute; +using EngineQuery = BH.Engine.Python.Query; + +namespace BH.Tests.Engine.Python.Compute +{ + [NonParallelizable] + public class Pytest + { + [Test, Order(9999)] + public void Execute_Pytests() + { + DirectoryInfo? repository = new DirectoryInfo(TestContext.CurrentContext.TestDirectory); + while (repository != null && !File.Exists(Path.Combine(repository.FullName, "Python_Engine", "Python", "pyproject.toml"))) + repository = repository.Parent; + repository.Should().NotBeNull("the toolkit sources must be available to run pytest"); + + string source = Path.Combine(repository!.FullName, "Python_Engine", "Python"); + string name = "bhom_pytest_" + Guid.NewGuid().ToString("N"); + string directory = Path.Combine(EngineQuery.DirectoryEnvironments(), name); + BH.Engine.Base.Compute.ClearCurrentEvents(); + + try + { + Directory.CreateDirectory(directory); + foreach (string file in new[] { "pyproject.toml", "README.md" }) + File.Copy(Path.Combine(source, file), Path.Combine(directory, file)); + foreach (string folder in new[] { "src", "tests" }) + { + string sourceFolder = Path.Combine(source, folder); + foreach (string file in Directory.EnumerateFiles(sourceFolder, "*", SearchOption.AllDirectories)) + { + string relative = Path.GetRelativePath(sourceFolder, file); + if (relative.Split(Path.DirectorySeparatorChar).Contains("__pycache__")) + continue; + string destination = Path.Combine(directory, folder, relative); + Directory.CreateDirectory(Path.GetDirectoryName(destination)!); + File.Copy(file, destination); + } + } + + var venv = EngineCompute.VirtualEnvironment(Path.Combine(directory, "pyproject.toml"), reload: false); + venv.Should().NotBeNull("environment installation must succeed: {0}", + string.Join(Environment.NewLine, BH.Engine.Base.Query.CurrentEvents().Where(e => e.Type == EventType.Error).Select(e => e.Message))); + + // Sync explicitly: a reloaded environment is not guaranteed to include dev dependencies. + var sync = EngineCompute.RunCommandStdout( + $"\"{EngineQuery.UVExecutable()}\" sync --all-packages --group dev", startDirectory: directory); + sync.Item3.Should().Be(0, "dev dependency installation must succeed:\n{0}\n{1}", sync.Item1, sync.Item2); + + var result = EngineCompute.RunCommandStdout( + $"set \"SKIP_LONG_PYTEST=1\" && \"{venv.Executable}\" -m pytest -ra", + startDirectory: directory, timeoutMinutes: 10); + string output = result.Item1 + Environment.NewLine + result.Item2; + TestContext.Progress.WriteLine(output); + + Match warnings = Regex.Match(output, + @"(?ms)^=+[ \t]*warnings summary[ \t]*=+\r?\n(?.*?)(?=^=+|\z)"); + if (warnings.Success) + BH.Engine.Base.Compute.RecordWarning(warnings.Groups["warnings"].Value.Trim()); + if (result.Item3 != 0) + BH.Engine.Base.Compute.RecordError($"Pytest failed (exit code {result.Item3}).\n{output}"); + + result.Item3.Should().Be(0, "pytest must pass:\n{0}", output); + BH.Engine.Base.Query.CurrentEvents().Where(e => e.Type == EventType.Error) + .Select(e => e.Message).Should().BeEmpty(); + } + finally + { + if (EngineQuery.VirtualEnvironmentExists(name)) + EngineCompute.RemoveVirtualEnvironment(name, run: true); + if (Directory.Exists(directory)) + Directory.Delete(directory, true); + } + } + } +} \ No newline at end of file diff --git a/.ci/unit_tests/Python_Engine_Test/Compute/Remove.cs b/.ci/unit_tests/Python_Engine_Test/Compute/Remove.cs new file mode 100644 index 00000000..74f2ac23 --- /dev/null +++ b/.ci/unit_tests/Python_Engine_Test/Compute/Remove.cs @@ -0,0 +1,130 @@ +/* + * This file is part of the Buildings and Habitats object Model (BHoM) + * Copyright (c) 2015 - 2026, the respective contributors. All rights reserved. + * + * Each contributor holds copyright over their respective contributions. + * The project versioning (Git) records all such contribution source information. + * + * + * The BHoM is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3.0 of the License, or + * (at your option) any later version. + * + * The BHoM is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this code. If not, see . + */ + +using FluentAssertions; +using EngineCompute = BH.Engine.Python.Compute; +using EngineQuery = BH.Engine.Python.Query; + +namespace BH.Tests.Engine.Python.Compute +{ + [NonParallelizable] + public class RemoveTests : InstallRemoveTestBase + { + [Test] + public void RemoveKernel_WarnsWhenEnvironmentDoesNotExist() + { + EngineCompute.RemoveJupyterKernel(m_Environment.Name + "_missing", run: true); + + AssertWarningWithoutErrors(); + } + + [Test] + public void RemoveKernel_WarnsWhenKernelDoesNotExist() + { + EngineCompute.RemoveJupyterKernel(m_Environment.Name, run: true); + + AssertWarningWithoutErrors(); + } + + [Test] + public void RemoveKernel_RemovesExistingKernelThenWarnsOnRepeat() + { + EngineCompute.InstallJupyterKernel(m_Environment); + AssertNoErrors(); + BH.Engine.Base.Compute.ClearCurrentEvents(); + + EngineCompute.RemoveJupyterKernel(m_Environment.Name, run: true); + + Directory.Exists(Path.Combine(m_Root, "jupyter", "kernels", m_Environment.Name)).Should().BeFalse(); + AssertNoErrors(); + EngineCompute.RemoveJupyterKernel(m_Environment.Name, run: true); + AssertWarningWithoutErrors(); + } + + [Test] + public void RemoveVirtualEnvironment_WarnsWhenEnvironmentDoesNotExist() + { + EngineCompute.RemoveVirtualEnvironment(m_Environment.Name + "_missing", run: true); + + AssertWarningWithoutErrors(); + } + + [Test] + public void RemoveVirtualEnvironment_RemovesEnvironmentWithoutKernelThenWarnsOnRepeat() + { + EngineCompute.RemoveVirtualEnvironment(m_Environment.Name, run: true); + + Directory.Exists(m_Root).Should().BeFalse(); + AssertWarningWithoutErrors(); + BH.Engine.Base.Compute.ClearCurrentEvents(); + EngineCompute.RemoveVirtualEnvironment(m_Environment.Name, run: true); + AssertWarningWithoutErrors(); + } + + [Test] + public void RemoveUV_WarnsWhenManagedUVDoesNotExist() + { + CheckUVRemoval(managedUVExists: false); + } + + [Test] + public void RemoveUV_RemovesManagedToolsAndIgnoresExternalUV() + { + CheckUVRemoval(managedUVExists: true); + } + + private void CheckUVRemoval(bool managedUVExists) + { + string toolsDirectory = EngineQuery.DirectoryTools(); + string externalDirectory = Path.Combine(m_Root, "external-uv"); + Directory.CreateDirectory(externalDirectory); + string externalUV = Path.Combine(externalDirectory, "uv.exe"); + File.Copy(EngineQuery.UVExecutable(), externalUV); + byte[] externalBytes = File.ReadAllBytes(externalUV); + SetVariable("PATH", externalDirectory + Path.PathSeparator + Environment.GetEnvironmentVariable("PATH")); + + WithIsolatedDirectory(toolsDirectory, () => + { + string marker = Path.Combine(toolsDirectory, "other-tool.txt"); + File.WriteAllText(marker, "preserve when UV is missing"); + if (managedUVExists) + File.Copy(externalUV, EngineQuery.UVExecutable()); + + EngineCompute.RemoveUV(run: true); + + if (managedUVExists) + { + Directory.Exists(toolsDirectory).Should().BeFalse(); + AssertNoErrors(); + BH.Engine.Base.Query.CurrentEvents().Should().BeEmpty(); + } + else + { + File.Exists(marker).Should().BeTrue(); + AssertWarningWithoutErrors(); + } + File.ReadAllBytes(externalUV).Should().Equal(externalBytes); + Run(externalUV, "--version").Should().StartWith("uv "); + }); + } + } +} diff --git a/.ci/unit_tests/Python_Engine_Test/Compute/Run.cs b/.ci/unit_tests/Python_Engine_Test/Compute/Run.cs new file mode 100644 index 00000000..ec2544e4 --- /dev/null +++ b/.ci/unit_tests/Python_Engine_Test/Compute/Run.cs @@ -0,0 +1,89 @@ +/* + * This file is part of the Buildings and Habitats object Model (BHoM) + * Copyright (c) 2015 - 2026, the respective contributors. All rights reserved. + * + * Each contributor holds copyright over their respective contributions. + * The project versioning (Git) records all such contribution source information. + * + * + * The BHoM is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3.0 of the License, or + * (at your option) any later version. + * + * The BHoM is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this code. If not, see . + */ + +using BH.oM.Base.Debugging; +using FluentAssertions; +using System.Diagnostics; +using EngineCompute = BH.Engine.Python.Compute; + +namespace BH.Tests.Engine.Python.Compute +{ + [NonParallelizable] + public class RunTests + { + [SetUp] + [TearDown] + public void CleanUp() + { + BH.Engine.Base.Compute.ClearCurrentEvents(); + } + + [TestCase(0)] + [TestCase(7)] + public void RunCommandStdout_ReturnsBothStreamsAndExitCode(int exitCode) + { + SynchronizationContext? original = SynchronizationContext.Current; + try + { + SynchronizationContext.SetSynchronizationContext(new NonPumpingContext()); + var result = EngineCompute.RunCommandStdout( + $"(for /L %i in (1,1,2000) do @(echo output& echo diagnostic 1>&2)) & exit /b {exitCode}"); + + result.Should().NotBeNull("failed commands must still return both streams and their exit code"); + result.Item1.Split('\n').Should().HaveCount(2000); + result.Item2.Split('\n').Should().HaveCount(2000); + result.Item1.Should().StartWith("output").And.EndWith("output"); + result.Item2.Should().StartWith("diagnostic").And.EndWith("diagnostic"); + result.Item3.Should().Be(exitCode); + BH.Engine.Base.Query.CurrentEvents().Any(e => e.Type == EventType.Error).Should().Be(exitCode != 0); + } + finally + { + SynchronizationContext.SetSynchronizationContext(original); + } + } + + [Test] + public void RunCommandStdout_TimeoutRetainsBothStreams() + { + Stopwatch timer = Stopwatch.StartNew(); + var result = EngineCompute.RunCommandStdout( + "echo started & echo diagnostic 1>&2 & powershell.exe -NoProfile -NonInteractive -Command \"Start-Sleep -Seconds 30\"", + timeoutMinutes: 0.02); + + result.Should().NotBeNull("timeouts must still return captured streams and exit code -1"); + result.Item1.Should().Be("started"); + result.Item2.Should().Be("diagnostic"); + result.Item3.Should().Be(-1); + timer.Elapsed.Should().BeLessThan(TimeSpan.FromSeconds(10)); + BH.Engine.Base.Query.CurrentEvents().Should().Contain(e => e.Type == EventType.Error && e.Message.Contains("timeout")); + } + + private sealed class NonPumpingContext : SynchronizationContext + { + public override void Post(SendOrPostCallback callback, object? state) + { + throw new InvalidOperationException("The command runner captured the host synchronization context."); + } + } + } +} diff --git a/.ci/unit_tests/Python_Engine_Test/Compute/VirtualEnvironment.cs b/.ci/unit_tests/Python_Engine_Test/Compute/VirtualEnvironment.cs index d2548736..7c921ad2 100644 --- a/.ci/unit_tests/Python_Engine_Test/Compute/VirtualEnvironment.cs +++ b/.ci/unit_tests/Python_Engine_Test/Compute/VirtualEnvironment.cs @@ -1,137 +1,139 @@ - -using NUnit; -using NUnit.Framework; -using FluentAssertions; +/* + * This file is part of the Buildings and Habitats object Model (BHoM) + * Copyright (c) 2015 - 2026, the respective contributors. All rights reserved. + * + * Each contributor holds copyright over their respective contributions. + * The project versioning (Git) records all such contribution source information. + * + * + * The BHoM is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3.0 of the License, or + * (at your option) any later version. + * + * The BHoM is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this code. If not, see . + */ + +using BH.oM.Base.Debugging; using BH.oM.Python; +using FluentAssertions; +using EngineCompute = BH.Engine.Python.Compute; +using EngineQuery = BH.Engine.Python.Query; namespace BH.Tests.Engine.Python.Compute { + [NonParallelizable] public class VirtualEnvironmentTests { - [Test] - public void VirtualEnvironment_FromTOML() - { - string envName = "test_from_toml"; - string envDirectory = BH.Engine.Python.Query.DirectoryEnvironments(); + private readonly Dictionary m_OriginalVariables = []; + private string m_TestDirectory = null!; + private string m_Name = null!; + private string m_Directory = null!; - // pre-run clean-up - try + [OneTimeSetUp] + public void SetUpTools() + { + m_TestDirectory = Path.Combine(Path.GetTempPath(), "bhom_lifecycle_" + Guid.NewGuid().ToString("N")); + foreach (string variable in new[] { "UV_TOOL_DIR", "UV_TOOL_BIN_DIR", "JUPYTER_DATA_DIR", "JUPYTER_PATH" }) { - BH.Engine.Python.Compute.RemoveVirtualEnvironment(name: envName, true); + m_OriginalVariables[variable] = Environment.GetEnvironmentVariable(variable); + Environment.SetEnvironmentVariable(variable, Path.Combine(m_TestDirectory, variable)); } - catch { - // do it the manual way, if there is no env to remove, it'll throw an error - Directory.Delete(path: Path.Combine(envDirectory, envName), recursive: true); - } - - // create the test directory - string testDirectory = Path.Combine(envDirectory, envName); - Directory.CreateDirectory(testDirectory); - - // create dummy README file - File.WriteAllText(Path.Combine(testDirectory, "README.md"), ""); - - // create dummy TOML file - List lines = - [ - "[project]", - $"name = \"{envName}\"", - "version = \"0.1.0\"", - "description = \"A test environment.\"", - "readme = \"README.md\"", - "requires-python = \">=3.10,<3.11\"", - "authors = [", - " { name = \"BHoM\", email = \"bhombot@burohappold.com\" }", - "]", - "dependencies = [\"matplotlib\"]", - "[build-system]", - "requires = [\"hatchling\"]", - "build-backend = \"hatchling.build\"", - "", - "[dependency-groups]", - "dev = [\"ipykernel\", \"ruff\"]", - "[tool.hatch.build.targets.wheel]", - $"packages = [\"src/{envName}\"]" - ]; + } - string tomlFileContent = string.Join(Environment.NewLine, lines); - string tomlFile = Path.Combine(testDirectory, "pyproject.toml"); - File.WriteAllText(tomlFile, tomlFileContent); + [SetUp] + public void SetUp() + { + m_Name = "bhom_lifecycle_" + Guid.NewGuid().ToString("N"); + m_Directory = Path.Combine(EngineQuery.DirectoryEnvironments(), m_Name); + BH.Engine.Base.Compute.ClearCurrentEvents(); + } - // create a dummy Python package - string packageDir = Path.Combine(testDirectory, "src", envName); - Directory.CreateDirectory(packageDir); - File.WriteAllText(Path.Combine(packageDir, "__init__.py"), ""); - - // run the method - PythonEnvironment venv = BH.Engine.Python.Compute.VirtualEnvironment(tomlFile: tomlFile, reload: false); + [TearDown] + public void CleanUpEnvironment() + { + if (EngineQuery.VirtualEnvironmentExists(m_Name)) + EngineCompute.RemoveVirtualEnvironment(m_Name, run: true); + if (Directory.Exists(m_Directory)) + Directory.Delete(m_Directory, true); + BH.Engine.Base.Compute.ClearCurrentEvents(); + } - // ensure that ipykernel is installed - string result = BH.Engine.Python.Compute.RunPythonString(venv: venv, "import ipykernel"); - result.ToLower().Should().NotContainAny(["error", "exception"]); + [OneTimeTearDown] + public void CleanUpTools() + { + foreach (var variable in m_OriginalVariables) + Environment.SetEnvironmentVariable(variable.Key, variable.Value); + if (Directory.Exists(m_TestDirectory)) + Directory.Delete(m_TestDirectory, true); + if (Directory.Exists(EngineQuery.DirectoryTools())) + Directory.Delete(EngineQuery.DirectoryTools(), true); + } - // assert that the virtual environment was created correctly + [Test] + public void FromTargetVersion_CreatesReloadsAndRemovesEnvironmentAndKernel() + { + PythonEnvironment venv = EngineCompute.VirtualEnvironment("3.11", m_Name); venv.Should().NotBeNull(); - venv.Name.Should().Be(envName); File.Exists(venv.Executable).Should().BeTrue(); + EngineQuery.Version(venv).Should().StartWith("3.11."); + EngineCompute.RunPythonString(venv, "import ipykernel; print('ready')").Should().Be("ready"); + EngineCompute.VirtualEnvironment("3.11", m_Name, reload: true).Executable.Should().Be(venv.Executable); + File.Exists(KernelFile()).Should().BeTrue(); - // run again, reloading this time - PythonEnvironment reloadedVenv = BH.Engine.Python.Compute.VirtualEnvironment(tomlFile: tomlFile, reload: true); - - // assert that the virtual environment was created correctly - reloadedVenv.Should().NotBeNull(); - reloadedVenv.Name.Should().Be(envName); - reloadedVenv.Executable.Should().Be(Path.Combine(testDirectory, ".venv", "Scripts", "python.exe")); - File.Exists(reloadedVenv.Executable).Should().BeTrue(); + EngineCompute.RemoveVirtualEnvironment(m_Name, run: true); - // clean-up - BH.Engine.Python.Compute.RemoveVirtualEnvironment(name: envName, true); + Directory.Exists(m_Directory).Should().BeFalse(); + File.Exists(KernelFile()).Should().BeFalse(); + AssertNoErrors(); } [Test] - public void VirtualEnvironment_FromTargetVersion() + public void FromTOML_InstallsBHoMVersionRecreatesAndRemovesEnvironment() { - string targetVersion = "3.11"; - string envName = "test_from_target_version"; - string envDirectory = BH.Engine.Python.Query.DirectoryEnvironments(); - - // pre-run clean-up - try - { - BH.Engine.Python.Compute.RemoveVirtualEnvironment(name: envName, true); - } - catch - { - // do it the manual way, if there is no env to remove, it'll throw an error - Directory.Delete(path: Path.Combine(envDirectory, envName), recursive: true); - } - - // run the method - PythonEnvironment venv = BH.Engine.Python.Compute.VirtualEnvironment(version: targetVersion, name: envName, reload: false); - - // add a package - BH.Engine.Python.Compute.InstallPackages(venv, ["matplotlib"], true); - - // ensure that ipykernel is installed - string result = BH.Engine.Python.Compute.RunPythonString(venv: venv, "import ipykernel;import matplotlib"); - result.ToLower().Should().NotContainAny(["error", "exception"]); - - // assert that the virtual environment was created correctly + string packageDirectory = Path.Combine(m_Directory, "src", m_Name); + Directory.CreateDirectory(packageDirectory); + File.WriteAllText(Path.Combine(packageDirectory, "__init__.py"), ""); + File.WriteAllText(Path.Combine(m_Directory, "README.md"), ""); + string tomlFile = Path.Combine(m_Directory, "pyproject.toml"); + File.WriteAllText(tomlFile, + $"[project]\nname = '{m_Name}'\nversion = '0.1.0' # project version\nreadme = 'README.md'\n" + + "requires-python = '>=3.11,<3.12'\ndependencies = []\n" + + "[build-system]\nrequires = ['hatchling']\nbuild-backend = 'hatchling.build'\n" + + "[tool.bhom]\nversion = 'leave-this-alone'\n"); + + PythonEnvironment venv = EngineCompute.VirtualEnvironment(tomlFile, reload: false); venv.Should().NotBeNull(); - venv.Name.Should().Be(envName); - File.Exists(venv.Executable).Should().BeTrue(); - - // run again, reloading this time - PythonEnvironment reloadedVenv = BH.Engine.Python.Compute.VirtualEnvironment(version: targetVersion, name: envName, reload: true); + string version = BH.Engine.Base.Query.BHoMVersion(); + File.ReadAllText(tomlFile).Should().Contain($"version = \"{version}\" # project version") + .And.Contain("version = 'leave-this-alone'"); + EngineCompute.RunPythonString(venv, + $"import importlib.metadata; print(importlib.metadata.version('{m_Name}'))").Should().Be(version); + + EngineCompute.VirtualEnvironment(tomlFile, reload: false).Should().NotBeNull(); + File.Exists(Path.Combine(packageDirectory, "__init__.py")).Should().BeTrue(); + EngineCompute.VirtualEnvironment(tomlFile, reload: true).Executable.Should().Be(venv.Executable); + EngineCompute.RemoveVirtualEnvironment(m_Name, run: true); + + Directory.Exists(m_Directory).Should().BeFalse(); + File.Exists(KernelFile()).Should().BeFalse(); + AssertNoErrors(); + } - // assert that the virtual environment was created correctly - reloadedVenv.Should().NotBeNull(); - reloadedVenv.Name.Should().Be(envName); - reloadedVenv.Executable.Should().Be(Path.Combine(envDirectory, envName, ".venv", "Scripts", "python.exe")); - File.Exists(reloadedVenv.Executable).Should().BeTrue(); + private string KernelFile() + { + return Path.Combine(Environment.GetEnvironmentVariable("JUPYTER_DATA_DIR")!, "kernels", m_Name, "kernel.json"); + } - // clean-up - BH.Engine.Python.Compute.RemoveVirtualEnvironment(name: envName, true); + private static void AssertNoErrors() + { + BH.Engine.Base.Query.CurrentEvents().Where(e => e.Type == EventType.Error).Select(e => e.Message).Should().BeEmpty(); } } -} \ No newline at end of file +} diff --git a/.ci/unit_tests/Python_Engine_Test/Query/Directory.cs b/.ci/unit_tests/Python_Engine_Test/Query/Directory.cs new file mode 100644 index 00000000..bcca18c8 --- /dev/null +++ b/.ci/unit_tests/Python_Engine_Test/Query/Directory.cs @@ -0,0 +1,51 @@ +/* + * This file is part of the Buildings and Habitats object Model (BHoM) + * Copyright (c) 2015 - 2026, the respective contributors. All rights reserved. + * + * Each contributor holds copyright over their respective contributions. + * The project versioning (Git) records all such contribution source information. + * + * + * The BHoM is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3.0 of the License, or + * (at your option) any later version. + * + * The BHoM is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this code. If not, see . + */ + +using FluentAssertions; + +namespace BH.Tests.Engine.Python.Query +{ + public class Directory_Tests + { + [Test] + public void DirectoryExtension() + { + string extensionsDirectory = "C:\\ProgramData\\BHoM\\Extensions"; + var result = new DirectoryInfo(BH.Engine.Python.Query.DirectoryExtensions()); + + Assert.That(result, Is.Not.Null); + result.FullName.Should().Be(extensionsDirectory); + Directory.Exists(extensionsDirectory).Should().BeTrue(); + } + + [Test] + public void DirectoryEnvironments() + { + string environmentsDirectory = "C:\\ProgramData\\BHoM\\Extensions\\Python"; + var result = new DirectoryInfo(BH.Engine.Python.Query.DirectoryEnvironments()); + + Assert.That(result, Is.Not.Null); + result.FullName.Should().Be(environmentsDirectory); + Directory.Exists(environmentsDirectory).Should().BeTrue(); + } + } +} \ No newline at end of file diff --git a/.ci/unit_tests/Python_Engine_Test/Query/DirectoryEnvironments.cs b/.ci/unit_tests/Python_Engine_Test/Query/DirectoryEnvironments.cs deleted file mode 100644 index 0429d51d..00000000 --- a/.ci/unit_tests/Python_Engine_Test/Query/DirectoryEnvironments.cs +++ /dev/null @@ -1,24 +0,0 @@ - -using NUnit; -using NUnit.Framework; -using FluentAssertions; - -namespace BH.Tests.Engine.Python.Query -{ - public class DirectoryEnvironmentsTests - { - [Test] - public void DirectoryEnvironments() - { - string environmentsDirectory = "C:\\ProgramData\\BHoM\\Extensions\\Python"; - - var result = new DirectoryInfo(BH.Engine.Python.Query.DirectoryEnvironments()); - - Assert.That(result, Is.Not.Null); - - result.FullName.Should().Be(environmentsDirectory); - - Directory.Exists(environmentsDirectory).Should().BeTrue(); - } - } -} \ No newline at end of file diff --git a/.ci/unit_tests/Python_Engine_Test/Query/DirectoryExtensions.cs b/.ci/unit_tests/Python_Engine_Test/Query/DirectoryExtensions.cs deleted file mode 100644 index 0cac6241..00000000 --- a/.ci/unit_tests/Python_Engine_Test/Query/DirectoryExtensions.cs +++ /dev/null @@ -1,24 +0,0 @@ - -using NUnit; -using NUnit.Framework; -using FluentAssertions; - -namespace BH.Tests.Engine.Python.Query -{ - public class DirectoryExtensionTests - { - [Test] - public void DirectoryExtension() - { - string extensionsDirectory = "C:\\ProgramData\\BHoM\\Extensions"; - - var result = new DirectoryInfo(BH.Engine.Python.Query.DirectoryExtensions()); - - Assert.That(result, Is.Not.Null); - - result.FullName.Should().Be(extensionsDirectory); - - Directory.Exists(extensionsDirectory).Should().BeTrue(); - } - } -} \ No newline at end of file diff --git a/.ci/unit_tests/Python_Toolkit_Tests/Python_Toolkit_Tests.csproj b/.ci/unit_tests/Python_Toolkit_Tests/Python_Toolkit_Tests.csproj deleted file mode 100644 index 6042ffe3..00000000 --- a/.ci/unit_tests/Python_Toolkit_Tests/Python_Toolkit_Tests.csproj +++ /dev/null @@ -1,24 +0,0 @@ - - - - net9.0 - latest - enable - enable - false - Debug;Release;Test - - - - - - - - - - - - - - - diff --git a/.ci/unit_tests/Python_Toolkit_Tests/Python_Toolkit_Tests.sln b/.ci/unit_tests/Python_Toolkit_Tests/Python_Toolkit_Tests.sln deleted file mode 100644 index 38c37425..00000000 --- a/.ci/unit_tests/Python_Toolkit_Tests/Python_Toolkit_Tests.sln +++ /dev/null @@ -1,44 +0,0 @@ - -Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio Version 17 -VisualStudioVersion = 17.14.37806.7 d17.14 -MinimumVisualStudioVersion = 10.0.40219.1 -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Python_oM", "..\..\..\Python_oM\Python_oM.csproj", "{2D4E37A4-3636-E5BB-2C2C-F692C9282A24}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Python_Engine", "..\..\..\Python_Engine\Python_Engine.csproj", "{4B79A366-3679-57AC-7233-9150E52F7157}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Python_Engine_Test", "..\Python_Engine_Test\Python_Engine_Test.csproj", "{C87C6B79-3858-424A-B18B-080C162AE16F}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Any CPU = Debug|Any CPU - Release|Any CPU = Release|Any CPU - Test|Any CPU = Test|Any CPU - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {2D4E37A4-3636-E5BB-2C2C-F692C9282A24}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {2D4E37A4-3636-E5BB-2C2C-F692C9282A24}.Debug|Any CPU.Build.0 = Debug|Any CPU - {2D4E37A4-3636-E5BB-2C2C-F692C9282A24}.Release|Any CPU.ActiveCfg = Release|Any CPU - {2D4E37A4-3636-E5BB-2C2C-F692C9282A24}.Release|Any CPU.Build.0 = Release|Any CPU - {2D4E37A4-3636-E5BB-2C2C-F692C9282A24}.Test|Any CPU.ActiveCfg = Test|Any CPU - {2D4E37A4-3636-E5BB-2C2C-F692C9282A24}.Test|Any CPU.Build.0 = Test|Any CPU - {4B79A366-3679-57AC-7233-9150E52F7157}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {4B79A366-3679-57AC-7233-9150E52F7157}.Debug|Any CPU.Build.0 = Debug|Any CPU - {4B79A366-3679-57AC-7233-9150E52F7157}.Release|Any CPU.ActiveCfg = Release|Any CPU - {4B79A366-3679-57AC-7233-9150E52F7157}.Release|Any CPU.Build.0 = Release|Any CPU - {4B79A366-3679-57AC-7233-9150E52F7157}.Test|Any CPU.ActiveCfg = Test|Any CPU - {4B79A366-3679-57AC-7233-9150E52F7157}.Test|Any CPU.Build.0 = Test|Any CPU - {C87C6B79-3858-424A-B18B-080C162AE16F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {C87C6B79-3858-424A-B18B-080C162AE16F}.Debug|Any CPU.Build.0 = Debug|Any CPU - {C87C6B79-3858-424A-B18B-080C162AE16F}.Release|Any CPU.ActiveCfg = Release|Any CPU - {C87C6B79-3858-424A-B18B-080C162AE16F}.Release|Any CPU.Build.0 = Release|Any CPU - {C87C6B79-3858-424A-B18B-080C162AE16F}.Test|Any CPU.ActiveCfg = Debug|Any CPU - {C87C6B79-3858-424A-B18B-080C162AE16F}.Test|Any CPU.Build.0 = Debug|Any CPU - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection - GlobalSection(ExtensibilityGlobals) = postSolution - SolutionGuid = {E2BBA55C-F689-4F28-9E95-C6AE8CE47293} - EndGlobalSection -EndGlobal diff --git a/Python_Engine/Compute/Install.cs b/Python_Engine/Compute/Install.cs index 26347f26..58de3aa5 100644 --- a/Python_Engine/Compute/Install.cs +++ b/Python_Engine/Compute/Install.cs @@ -26,57 +26,70 @@ using System.Collections.Generic; using System.ComponentModel; using System.IO; +using System.Linq; namespace BH.Engine.Python { public static partial class Compute { - [Description("Install UV, the Python manager used in these tools, and the ruff, jupyterlab and sphinx tools.")] + [Description("Install UV in the BHoM tools directory and add that directory to the process PATH. Install any missing ruff, jupyterlab and sphinx tools; UV installations elsewhere are not used.")] [Input("run", "Set to True to install UV and its core tools.")] public static void InstallUV(bool run = false) { if (!run) return; - string uvBinPath = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.UserProfile), ".local", "bin"); - if (Directory.Exists(uvBinPath)) - Environment.SetEnvironmentVariable("PATH", uvBinPath + Path.PathSeparator + Environment.GetEnvironmentVariable("PATH")); + string toolsDirectory = Query.DirectoryTools(); - string location = RunCommandStdout(command: "where.exe uv.exe"); - if (!location.EndsWith("uv.exe")) + string uvExecutable = Query.UVExecutable(); + if (!File.Exists(uvExecutable)) { - Base.Compute.RecordNote("Installing UV."); - string output = RunCommandStdout( - command: "powershell.exe -NoProfile -NonInteractive -ExecutionPolicy Bypass -Command \"$ErrorActionPreference = 'Stop'; irm https://astral.sh/uv/install.ps1 | iex\"" - ); - - // The installer cannot update the environment of this already-running process. - if (Directory.Exists(uvBinPath)) - Environment.SetEnvironmentVariable("PATH", uvBinPath + Path.PathSeparator + Environment.GetEnvironmentVariable("PATH")); - - location = RunCommandStdout("where.exe uv.exe"); + var installation = RunCommandStdout( + command: $"powershell.exe -NoProfile -NonInteractive -ExecutionPolicy Bypass -Command \"$ErrorActionPreference = 'Stop'; $env:UV_INSTALL_DIR = '{toolsDirectory.Replace("'", "''")}'; $env:UV_NO_MODIFY_PATH = '1'; irm https://astral.sh/uv/install.ps1 | iex\""); + if (installation.Item3 != 0) + return; + if (!File.Exists(uvExecutable)) + { + Base.Compute.RecordError($"UV installation did not produce an executable at {uvExecutable}."); + return; + } } - string uvExecutable = location.Split(new[] { '\r', '\n' }, StringSplitOptions.RemoveEmptyEntries)[0]; + string[] otherPaths = (Environment.GetEnvironmentVariable("PATH") ?? string.Empty).Split(Path.PathSeparator) + .Where(directory => !string.Equals(directory.Trim().Trim('"'), toolsDirectory, StringComparison.OrdinalIgnoreCase)) + .ToArray(); + Environment.SetEnvironmentVariable("PATH", string.Join(Path.PathSeparator.ToString(), new[] { toolsDirectory }.Concat(otherPaths))); + + var installedTools = RunCommandStdout($"\"{uvExecutable}\" tool list"); + if (installedTools.Item3 != 0) + return; + var installedNames = new HashSet( + installedTools.Item1.Split(new[] { '\r', '\n' }, StringSplitOptions.RemoveEmptyEntries) + .Where(line => !line.StartsWith("-")) + .Select(line => line.Split(' ')[0]), StringComparer.OrdinalIgnoreCase); foreach (string tool in new[] { "ruff", "jupyterlab", "sphinx" }) { - RunCommandStdout($"\"\"{uvExecutable}\" tool install {tool}\""); + if (!installedNames.Contains(tool)) + RunCommandStdout($"\"{uvExecutable}\" tool install {tool}"); } } - [Description("Register a Jupyer kernel for a given venv.")] + [Description("Register a Jupyter kernel for a given venv unless that kernel already exists.")] [Input("venv", "The Python environment to install the packages to.")] public static void InstallJupyterKernel(this PythonEnvironment venv) { + if (JupyterKernelExists(venv, venv.Name, true) != false) + return; + venv.InstallPackages(packages: new List() { "ipykernel" }, true); string directory = Query.VirtualEnvironmentDirectory(venv.Name); - string cmd = $"{venv.Executable} -m ipykernel install --user --name {venv.Name} --display-name {venv.Name}"; + string cmd = $"\"{venv.Executable}\" -m ipykernel install --user --name \"{venv.Name}\" --display-name \"{venv.Name}\""; RunCommandStdout(command: cmd, startDirectory: directory); } - [Description("Install a list of packages to a given Python executable.")] + [Description("Install a list of packages to a given Python executable. UV retains satisfied versions and registers project dependencies when applicable.")] [Input("venv", "The Python environment to install the packages to.")] [Input("packages", "The packages to install.")] [Input("run", "Run this method.")] @@ -90,7 +103,7 @@ public static void InstallPackages( bool isProject = File.Exists(Path.Combine(directory, "pyproject.toml")); string uvCommand = isProject ? "add" : "pip install"; - string cmd = $"uv {uvCommand} {string.Join(" ", packages)}"; + string cmd = $"\"{Query.UVExecutable()}\" {uvCommand} --python \"{venv.Executable}\" {string.Join(" ", packages.Select(package => $"\"{package}\""))}"; if (run) { @@ -102,7 +115,7 @@ public static void InstallPackages( } } - [Description("Install a local Python package to a given Python environment.")] + [Description("Install a local editable Python package. An unchanged installation from the same directory is retained; project dependencies are still registered.")] [Input("venv", "The Python environment to install the packages to.")] [Input("packageDirectory", "The package to install.")] [Input("run", "Run this method.")] @@ -113,16 +126,43 @@ public static void InstallPackageLocal( ) { if (!Directory.Exists(packageDirectory)) + { Base.Compute.RecordError($"{packageDirectory} not found."); + return; + } + packageDirectory = Path.GetFullPath(packageDirectory); string directory = Query.VirtualEnvironmentDirectory(venv.Name); bool isProject = File.Exists(Path.Combine(directory, "pyproject.toml")); - string uvCommand = isProject ? "add --editable" : "pip install -e"; - string cmd = $"uv {uvCommand} {packageDirectory}"; + string uvCommand = isProject ? "add" : "pip install"; + string cmd = $"\"{Query.UVExecutable()}\" {uvCommand} --python \"{venv.Executable}\" --editable \"{packageDirectory}\""; if (run) { + if (!isProject) + { + // Explicit local paths are otherwise always reinstalled by UV. + string script = "import importlib.metadata as m,json,pathlib,sys; " + + "p=pathlib.Path(sys.argv[1]).resolve(); " + + "sources=[p/f for f in ('pyproject.toml','setup.py','setup.cfg') if (p/f).exists()]; " + + "print(any((lambda u: u.get('dir_info',{}).get('editable',False) and " + + "u.get('url','').rstrip('/').lower()==p.as_uri().rstrip('/').lower() and " + + "all(f.stat().st_mtime<=pathlib.Path(d.locate_file(x)).stat().st_mtime for f in sources))" + + "(json.loads(d.read_text('direct_url.json') or '{}')) " + + "for d in m.distributions() for x in (d.files or []) if str(x).endswith('.dist-info/METADATA')))"; + var installed = RunCommandStdout( + $"\"{venv.Executable}\" -c \"{script}\" \"{packageDirectory}\"", startDirectory: directory); + if (installed.Item3 != 0) + return; + if (installed.Item1 == "True") + return; + if (installed.Item1 != "False") + { + Base.Compute.RecordError($"Could not check the local package installation in {venv.Name}."); + return; + } + } RunCommandStdout(command: cmd, startDirectory: directory); } else @@ -130,5 +170,42 @@ public static void InstallPackageLocal( Base.Compute.RecordNote($"The following command will be executed from \"{directory}\": {cmd}"); } } + + private static bool? JupyterKernelExists(PythonEnvironment venv, string name, bool requireMatchingExecutable = false) + { + string script = "import importlib.util,pathlib,sys; " + + "available=importlib.util.find_spec('jupyter_client') is not None; " + + "manager=__import__('jupyter_client.kernelspec',fromlist=['KernelSpecManager']).KernelSpecManager() if available else None; " + + "exists=available and sys.argv[1].lower() in manager.find_kernel_specs(); " + + "print(exists and (sys.argv[2]=='False' or " + + "pathlib.Path(manager.get_kernel_spec(sys.argv[1].lower()).argv[0]).resolve()==pathlib.Path(sys.executable).resolve()))"; + var result = RunCommandStdout($"\"{venv.Executable}\" -c \"{script}\" \"{name}\" {requireMatchingExecutable}"); + if (result.Item3 != 0) + return null; + if (result.Item1 == "True") + return true; + if (result.Item1 == "False") + return false; + + Base.Compute.RecordError($"Could not check whether Jupyter kernel {name} exists."); + return null; + } + + [Description("Install the Python_Toolkit Python venv.")] + [Input("run", "Run this method.")] + [Input("reload", "Reload the virtual environment rather than recreating it, if it already exists.")] + [Output("venv", "The resultant venv.")] + public static PythonEnvironment InstallPythonToolkitVenv( + bool run = false, + bool reload = true + ) + { + string tomlFile = Path.Combine(Query.DirectoryEnvironments(), Query.ToolkitName(), "pyproject.toml"); + if (run) + { + return VirtualEnvironment(tomlFile: tomlFile, reload: reload); + } + return null; + } } } diff --git a/Python_Engine/Compute/Remove.cs b/Python_Engine/Compute/Remove.cs index 432a3247..c122dbc9 100644 --- a/Python_Engine/Compute/Remove.cs +++ b/Python_Engine/Compute/Remove.cs @@ -20,10 +20,8 @@ * along with this code. If not, see . */ -using BH.oM.Base; using BH.oM.Base.Attributes; using BH.oM.Python; -using System; using System.ComponentModel; using System.IO; @@ -31,14 +29,14 @@ namespace BH.Engine.Python { public static partial class Compute { - [Description("Remove the named Python virtual environment.")] + [Description("Remove the named Python virtual environment. Missing environments produce a warning instead of an error.")] [Input("name", "The name of the Python virtual environment to remove.")] [Input("run", "Run this method.")] public static void RemoveVirtualEnvironment(string name, bool run = false) { if (!Query.VirtualEnvironmentExists(name)) { - Base.Compute.RecordError($"No Python environment named {name} exists."); + Base.Compute.RecordWarning($"No Python environment named {name} exists."); return; } @@ -46,7 +44,7 @@ public static void RemoveVirtualEnvironment(string name, bool run = false) if (run) { - RemoveKernel(name, run); + RemoveJupyterKernel(name, run); try { @@ -59,28 +57,65 @@ public static void RemoveVirtualEnvironment(string name, bool run = false) } } - [Description("Remove the named Jupyter kernel.")] + [Description("Remove the named Jupyter kernel. Missing environments or kernels produce a warning instead of an error.")] [Input("name", "The name of the Jupyer kernel to remove.")] [Input("run", "Run this method.")] - public static void RemoveKernel(string name, bool run = false) + public static void RemoveJupyterKernel(string name, bool run = false) { if (!Query.VirtualEnvironmentExists(name)) { - Base.Compute.RecordError($"No Python environment named {name} exists."); + Base.Compute.RecordWarning($"No Python environment named {name} exists."); return; } PythonEnvironment venv = Query.VirtualEnvironment(name); - string cmd = $"{venv.Executable} -m jupyter kernelspec uninstall {name.ToLower()} -f"; + bool? exists = JupyterKernelExists(venv, name); + if (exists != true) + { + if (exists == false) + Base.Compute.RecordWarning($"No Jupyter kernel named {name} exists."); + return; + } + + string cmd = $"\"{venv.Executable}\" -m jupyter kernelspec uninstall \"{name.ToLowerInvariant()}\" -f"; if (run) { - RunCommandStdout(command: cmd, hideWindow: true); + RunCommandStdout(command: cmd, hideWindows: true); } else { Base.Compute.RecordNote($"The following command will be executed: {cmd}"); } } + + [Description("Remove UV from the BHoM tools directory. Missing installations produce a warning; installations elsewhere are not removed.")] + [Input("run", "Run this method")] + public static void RemoveUV(bool run = false) + { + string toolsDirectory = Query.DirectoryTools(); + + if (!File.Exists(Query.UVExecutable())) + { + Base.Compute.RecordWarning($"UV is not currently installed in {toolsDirectory}."); + return; + } + + if (run) + { + try + { + Directory.Delete(toolsDirectory, true); + } + catch (IOException ex) + { + Base.Compute.RecordError($"Failed to remove UV tools directory {toolsDirectory}: {ex.Message}"); + } + } + else + { + Base.Compute.RecordNote($"UV (and all other associated tools) will be removed from {toolsDirectory}."); + } + } } } diff --git a/Python_Engine/Compute/Run.cs b/Python_Engine/Compute/Run.cs index 54b9a3bd..89655802 100644 --- a/Python_Engine/Compute/Run.cs +++ b/Python_Engine/Compute/Run.cs @@ -21,6 +21,7 @@ */ using BH.oM.Base.Attributes; +using BH.oM.Base; using System; using System.Collections.Generic; using System.ComponentModel; @@ -33,15 +34,17 @@ namespace BH.Engine.Python { public static partial class Compute { - [Description("Run a command via CMD and return stdout.")] + [Description("Run a command via CMD and return both output streams and the exit code.")] [Input("command", "The command to be run.")] [Input("hideWindows", "Set to True to hide cmd windows.")] [Input("startDirectory", "The directory in which the command should be run.")] [Input("timeoutMinutes", "A number of minutes beyond which this command will timeout.")] - [Output("stdout", "The StandardOutput from the command that was run, if the process was successful.")] - public static string RunCommandStdout( + [MultiOutput(0, "stdout", "The command's standard output, including on failure.")] + [MultiOutput(1, "stderr", "The command's standard error, including on success.")] + [MultiOutput(2, "exitCode", "The process exit code. Zero indicates success; -1 indicates a timeout.")] + public static Output RunCommandStdout( string command, - bool hideWindow = true, + bool hideWindows = true, string startDirectory = null, double timeoutMinutes = 5 ) @@ -57,9 +60,7 @@ public static string RunCommandStdout( string.Format("Working directory does not exist: '{0}'", startDirectory)); } - var process = new Process(); - - try + using (Process process = new Process()) { process.StartInfo.FileName = "cmd.exe"; process.StartInfo.Arguments = string.Format("/C \"{0}\"", command); @@ -68,11 +69,8 @@ public static string RunCommandStdout( process.StartInfo.UseShellExecute = false; process.StartInfo.RedirectStandardOutput = true; process.StartInfo.RedirectStandardError = true; - process.StartInfo.CreateNoWindow = hideWindow; - process.StartInfo.WindowStyle = - hideWindow - ? ProcessWindowStyle.Hidden - : ProcessWindowStyle.Normal; + process.StartInfo.CreateNoWindow = hideWindows; + process.StartInfo.WindowStyle = hideWindows ? ProcessWindowStyle.Hidden : ProcessWindowStyle.Normal; // Avoid environment-variable interference. process.StartInfo.EnvironmentVariables["PYTHONHOME"] = string.Empty; @@ -80,51 +78,62 @@ public static string RunCommandStdout( process.Start(); - var stdoutTask = process.StandardOutput.ReadToEndAsync(); - var stderrTask = process.StandardError.ReadToEndAsync(); + StreamReader stdoutReader = process.StandardOutput; + StreamReader stderrReader = process.StandardError; + + // Start reads without inheriting the host's UI synchronization context. + Task outputTask = Task.Run(async () => + { + Task stdoutTask = stdoutReader.ReadToEndAsync(); + Task stderrTask = stderrReader.ReadToEndAsync(); + + return await Task.WhenAll(stdoutTask, stderrTask).ConfigureAwait(false); + }); int timeoutMs = checked((int)(timeoutMinutes * 60 * 1000)); - if (!process.WaitForExit(timeoutMs)) + bool timedOut = !process.WaitForExit(timeoutMs); + if (timedOut) { - try + // Kill descendants too, so inherited pipe handles cannot keep the reads open. + using (Process terminator = Process.Start(new ProcessStartInfo { - process.Kill(); - } - catch + FileName = "taskkill.exe", + Arguments = $"/PID {process.Id} /T /F", + UseShellExecute = false, + CreateNoWindow = true, + RedirectStandardOutput = true, + RedirectStandardError = true + })) { - // Ignore if already exited. + Task killStdout = terminator.StandardOutput.ReadToEndAsync(); + Task killStderr = terminator.StandardError.ReadToEndAsync(); + terminator.WaitForExit(); + Task.WaitAll(killStdout, killStderr); + if (terminator.ExitCode != 0 && !process.HasExited) + throw new InvalidOperationException($"Could not terminate timed-out command: {killStderr.GetAwaiter().GetResult()}"); } - - throw new TimeoutException( - string.Format( - "Command exceeded timeout of {0} minutes.", - timeoutMinutes)); + process.WaitForExit(); + BH.Engine.Base.Compute.RecordError(new TimeoutException(), $"Command exceeded timeout of {timeoutMinutes} minutes.\nCommand: {command}"); } // Ensure async reads have completed. - Task.WaitAll(stdoutTask, stderrTask); + string[] results = outputTask.GetAwaiter().GetResult(); - string stdout = stdoutTask.Result.Trim(); - string stderr = stderrTask.Result.Trim(); + string stdout = results[0].Trim(); + string stderr = results[1].Trim(); - int exitCode = process.ExitCode; - string output = exitCode == 0 ? stdout : stderr; + int exitCode = timedOut ? -1 : process.ExitCode; - if (exitCode != 0) + if (!timedOut && exitCode != 0) { - string message = $"Failed to execute {command} (exit code {exitCode}).\n{output}"; + string message = $"Failed to execute {command} (exit code {exitCode}).\n{stdout}\n{stderr}"; BH.Engine.Base.Compute.RecordError( exception: new InvalidOperationException(message), message: message); } - return output; - - } - finally - { - process.Dispose(); + return new Output { Item1 = stdout, Item2 = stderr, Item3 = exitCode }; } } @@ -148,7 +157,8 @@ public static string RunPythonString(this oM.Python.PythonEnvironment venv, stri string cmd = $"{Modify.AddQuotesIfRequired(venv.Executable)} {scriptFile}"; - return RunCommandStdout(command: cmd); + Output result = RunCommandStdout(command: cmd); + return result.Item3 == 0 ? result.Item1 : result.Item2; } } } diff --git a/Python_Engine/Compute/UpdateBHoMPackages.cs b/Python_Engine/Compute/UpdateBHoMPackages.cs index 57e6ff66..5fbebc2b 100644 --- a/Python_Engine/Compute/UpdateBHoMPackages.cs +++ b/Python_Engine/Compute/UpdateBHoMPackages.cs @@ -33,7 +33,7 @@ public static partial class Compute [Input("venv", "The Python environment to update.")] public static void UpdateBHoMPackages(this PythonEnvironment venv) { - string cmd = "uv sync"; + string cmd = $"\"{Query.UVExecutable()}\" sync"; string directory = Path.Combine(Query.DirectoryEnvironments(), venv.Name); RunCommandStdout(cmd, startDirectory: directory); diff --git a/Python_Engine/Compute/VirtualEnvironment.cs b/Python_Engine/Compute/VirtualEnvironment.cs index 874ed269..8d52f835 100644 --- a/Python_Engine/Compute/VirtualEnvironment.cs +++ b/Python_Engine/Compute/VirtualEnvironment.cs @@ -35,7 +35,7 @@ public static partial class Compute [Input("version", "The version of Python to use for this environment.")] [Input("name", "The name of this venv.")] [Input("reload", "Reload the virtual environment rather than recreating it, if it already exists.")] - [Output("venv", "The executable for the resultant venv.")] + [Output("venv", "The resultant venv.")] public static PythonEnvironment VirtualEnvironment(string version, string name, bool reload = true) { if (Query.VirtualEnvironmentExists(name)) @@ -44,16 +44,16 @@ public static PythonEnvironment VirtualEnvironment(string version, string name, { PythonEnvironment existingVenv = new PythonEnvironment() { Executable = Query.VirtualEnvironmentExecutable(name), Name = name }; string existingVersion = Query.Version(existingVenv); - if (existingVersion != version) + if (existingVersion == null || (existingVersion != version && !existingVersion.StartsWith(version + ".", StringComparison.Ordinal))) { BH.Engine.Base.Compute.RecordError($"The requested environment already exists using Python {existingVersion}, but is being requested with Python {version}. Either provide a different name, a matching version, or remove the existing environment."); + return null; } return existingVenv; } else { RemoveVirtualEnvironment(name: name, run: true); - RemoveKernel(name: name, run: true); } } @@ -62,8 +62,9 @@ public static PythonEnvironment VirtualEnvironment(string version, string name, string directory = Path.Combine(Query.DirectoryEnvironments(), name); Directory.CreateDirectory(directory); - string cmd = $"uv venv {Path.Combine(directory, ".venv")} --python {version}"; - RunCommandStdout(command: cmd, startDirectory: directory); + string cmd = $"\"{Query.UVExecutable()}\" venv \"{Path.Combine(directory, ".venv")}\" --python \"{version}\""; + if (RunCommandStdout(command: cmd, startDirectory: directory).Item3 != 0) + return null; PythonEnvironment venv = new PythonEnvironment() { Executable = Query.VirtualEnvironmentExecutable(name), Name = name }; @@ -72,10 +73,10 @@ public static PythonEnvironment VirtualEnvironment(string version, string name, return venv; } - [Description("Create a Python Virtual Environment from a TOML file. This will create the venv alongside that TOML file.")] + [Description("Create a Python Virtual Environment from a TOML file in the named BHoM environment directory. Before installation, set the project's version to the current BHoM version.")] [Input("tomlFile", "The path to a TOML file containing venv configuration.")] [Input("reload", "Reload the virtual environment rather than recreating it, if it already exists.")] - [Output("venv", "The executable for the resultant venv.")] + [Output("venv", "The resultant venv.")] public static PythonEnvironment VirtualEnvironment(string tomlFile, bool reload = true) { string name = Directory.GetParent(tomlFile).Name; @@ -95,13 +96,15 @@ public static PythonEnvironment VirtualEnvironment(string tomlFile, bool reload return null; } - // get the package name from the TOML file - string packageName = Regex.Match( - File.ReadAllText(tomlFile), - "^name\\s*=\\s*\"([^\"]+)\"", - RegexOptions.Multiline) - .Groups[1] - .Value; + string toml = File.ReadAllText(tomlFile); + Match project = Regex.Match(toml, @"(?ms)^[ \t]*\[project\][ \t]*(?:#[^\r\n]*)?\r?\n(?.*?)(?=^[ \t]*\[|\z)"); + string packageName = Regex.Match(project.Groups["content"].Value, + @"(?m)^[ \t]*name[ \t]*=[ \t]*['""](?[^'""\r\n]+)['""]").Groups["name"].Value; + if (!project.Success || string.IsNullOrWhiteSpace(packageName)) + { + Base.Compute.RecordError($"A [project] section with a package name is required in {tomlFile}."); + return null; + } string packageFile = Path.Combine(directory, "src", packageName, "__init__.py"); if (!File.Exists(packageFile)) @@ -110,6 +113,14 @@ public static PythonEnvironment VirtualEnvironment(string tomlFile, bool reload return null; } + string projectContent = project.Groups["content"].Value; + Regex versionField = new Regex(@"(?m)^(?[ \t]*version[ \t]*=[ \t]*)(?['""])[^'""\r\n]*\k"); + if (!versionField.IsMatch(projectContent)) + { + Base.Compute.RecordError($"A static [project] version is required in {tomlFile}."); + return null; + } + if (Query.VirtualEnvironmentExists(name)) { if (reload) @@ -119,16 +130,22 @@ public static PythonEnvironment VirtualEnvironment(string tomlFile, bool reload } else { - RemoveVirtualEnvironment(name); - RemoveKernel(name); + RemoveJupyterKernel(name, run: true); + // Retain the TOML file and package sources while recreating the environment. + Directory.Delete(Path.Combine(directory, ".venv"), true); } } - InstallUV(true); // ensure UV is installed + string updatedProject = versionField.Replace(projectContent, + match => match.Groups["prefix"].Value + $"\"{BH.Engine.Base.Query.BHoMVersion()}\"", 1); + Group content = project.Groups["content"]; + File.WriteAllText(tomlFile, toml.Substring(0, content.Index) + updatedProject + toml.Substring(content.Index + content.Length)); + InstallUV(true); // ensure UV is installed - string cmd = "uv sync --all-packages"; - RunCommandStdout(cmd, startDirectory: directory); + string cmd = $"\"{Query.UVExecutable()}\" sync --all-packages"; + if (RunCommandStdout(cmd, startDirectory: directory).Item3 != 0) + return null; PythonEnvironment venv = new PythonEnvironment() { Executable = Query.VirtualEnvironmentExecutable(name), Name = name }; diff --git a/Python_Engine/Python/Dockerfile b/Python_Engine/Python/Dockerfile index dde75b24..e7a25a8b 100644 --- a/Python_Engine/Python/Dockerfile +++ b/Python_Engine/Python/Dockerfile @@ -1,22 +1,26 @@ -FROM python:3.10-slim -COPY . /Python_Toolkit +# syntax=docker/dockerfile:1 -#requires build argument --build-context bhom-assemblies C:/ProgramData/BHoM/Assemblies -COPY --from=bhom-assemblies . /bin/BHoM/Assemblies +FROM ghcr.io/astral-sh/uv:latest AS uv +FROM mcr.microsoft.com/dotnet/aspnet:10.0-bookworm-slim AS dotnet -#install .net core 8.0, and set the pythonnet runtime to the .net core CLR -RUN apt-get update \ - && apt-get install -y wget - -RUN wget https://packages.microsoft.com/config/debian/13/packages-microsoft-prod.deb -O packages-microsoft-prod.deb -RUN dpkg -i packages-microsoft-prod.deb -RUN rm packages-microsoft-prod.deb +FROM python:3.10-slim-bookworm -RUN apt-get update \ - && apt-get install -y aspnetcore-runtime-10.0 +COPY --from=uv /uv /opt/BHoM/Extensions/Python/tools/uv +COPY --from=dotnet /usr/share/dotnet /usr/share/dotnet -ENV PYTHONNET_RUNTIME="coreclr" +ENV DOTNET_ROOT=/usr/share/dotnet \ + PYTHONNET_RUNTIME=coreclr \ + UV_PYTHON_DOWNLOADS=never \ + UV_LINK_MODE=copy \ + PATH="/opt/BHoM/Extensions/Python/Python_Toolkit/.venv/bin:/opt/BHoM/Extensions/Python/tools:/usr/share/dotnet:${PATH}" \ + PYTHONPATH="/opt/BHoM/Assemblies" -RUN pip3 install ./Python_Toolkit +WORKDIR /opt/BHoM/Extensions/Python/Python_Toolkit -RUN rm ./Python_Toolkit -rf \ No newline at end of file +# Requires the bhom-assemblies named build context. +COPY --from=bhom-assemblies . /opt/BHoM/Assemblies + +COPY pyproject.toml README.md ./ +COPY src ./src + +RUN /opt/BHoM/Extensions/Python/tools/uv sync --no-dev --no-editable diff --git a/Python_Engine/Python/pyproject.toml b/Python_Engine/Python/pyproject.toml index e7ca9c55..b388b131 100644 --- a/Python_Engine/Python/pyproject.toml +++ b/Python_Engine/Python/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "python_toolkit" -version = "0.1.0" +version = "999.999.999" description = "The core BHoM Python toolkit environment, containing essential tools and utilities." readme = "README.md" requires-python = ">=3.10,<3.11" diff --git a/Python_Engine/Python/scripts/pre_commit.ps1 b/Python_Engine/Python/scripts/pre_commit.ps1 index ba58ed03..8b9198c0 100644 --- a/Python_Engine/Python/scripts/pre_commit.ps1 +++ b/Python_Engine/Python/scripts/pre_commit.ps1 @@ -18,9 +18,9 @@ function Format-PythonFiles { $pushedLocation = $true Write-InfoMessage -Message "Formatting Python files in ./src" -FunctionName $MyInvocation.MyCommand.Name - & uv run ruff format ./src + & (Get-UVExecutable) run ruff format .\src Write-InfoMessage -Message "Formatting Python files in ./tests" -FunctionName $MyInvocation.MyCommand.Name - & uv run ruff format ./tests + & (Get-UVExecutable) run ruff format .\tests } finally { diff --git a/Python_Engine/Python/scripts/shared.ps1 b/Python_Engine/Python/scripts/shared.ps1 index 5b870080..cea9f6ea 100644 --- a/Python_Engine/Python/scripts/shared.ps1 +++ b/Python_Engine/Python/scripts/shared.ps1 @@ -174,15 +174,20 @@ function Remove-PathIfExists { } } -function Install-UV { +function Get-UVExecutable { + return Join-Path $env:ProgramData "BHoM\Extensions\Python\tools\uv.exe" +} +function Install-UV { $functionName = $MyInvocation.MyCommand.Name + $uvExecutable = Get-UVExecutable + $uvBinPath = Split-Path -Parent $uvExecutable - # Attempt to run UV, and if not found, install it - if (-not (Get-Command uv -ErrorAction SilentlyContinue)) { + if (-not (Test-Path -LiteralPath $uvExecutable -PathType Leaf)) { try { - Write-InfoMessage -Message "Installing UV." -FunctionName $functionName - & powershell.exe -NoProfile -ExecutionPolicy Bypass -Command "irm https://astral.sh/uv/install.ps1 | iex" + Write-InfoMessage -Message "Installing UV in $uvBinPath." -FunctionName $functionName + $escapedDirectory = $uvBinPath.Replace("'", "''") + & powershell.exe -NoProfile -NonInteractive -ExecutionPolicy Bypass -Command "`$ErrorActionPreference = 'Stop'; `$env:UV_INSTALL_DIR = '$escapedDirectory'; `$env:UV_NO_MODIFY_PATH = '1'; irm https://astral.sh/uv/install.ps1 | iex" if ($LASTEXITCODE -ne 0) { throw "UV installer exited with code $LASTEXITCODE." } @@ -193,15 +198,12 @@ function Install-UV { } try { - $uvBinPath = Join-Path $HOME ".local\bin" - if (Test-Path $uvBinPath -PathType Container) { - $env:Path = "$uvBinPath;$env:Path" - } - $uvCommand = Get-Command uv -ErrorAction SilentlyContinue - if (-not $uvCommand) { - throw "The UV executable is not available on PATH after installation." + if (-not (Test-Path -LiteralPath $uvExecutable -PathType Leaf)) { + throw "The UV executable was not installed at $uvExecutable." } - Write-InfoMessage -Message "Using UV from $($uvCommand.Source)." -FunctionName $functionName + $otherPaths = @($env:Path -split ';' | Where-Object { $_.Trim().Trim('"') -ine $uvBinPath }) + $env:Path = (@($uvBinPath) + $otherPaths) -join ';' + Write-InfoMessage -Message "Using UV from $uvExecutable." -FunctionName $functionName } catch { Write-ErrorMessage -Message "Could not locate UV. $($_.Exception.Message)" -FunctionName $functionName -ThrowError @@ -211,7 +213,7 @@ function Install-UV { foreach ($tool in @("ruff", "jupyterlab", "sphinx")) { try { Write-InfoMessage -Message "Installing $tool to UV." -FunctionName $functionName - & uv tool install $tool + & $uvExecutable tool install $tool if ($LASTEXITCODE -ne 0) { throw "uv tool install exited with code $LASTEXITCODE." } @@ -231,7 +233,7 @@ function Sync-PythonEnvironment { Push-Location $workspaceRoot $locationPushed = $true Write-InfoMessage -Message "Installing Python packages with UV." -FunctionName $functionName - & uv sync + & (Get-UVExecutable) sync if ($LASTEXITCODE -ne 0) { throw "uv sync exited with code $LASTEXITCODE." } diff --git a/Python_Engine/Python/uv.lock b/Python_Engine/Python/uv.lock index 6d78985c..ba688ca9 100644 --- a/Python_Engine/Python/uv.lock +++ b/Python_Engine/Python/uv.lock @@ -1,5 +1,5 @@ version = 1 -revision = 1 +revision = 5 requires-python = "==3.10.*" [[package]] @@ -9,71 +9,71 @@ source = { registry = "https://pypi.org/simple" } dependencies = [ { name = "pygments" }, ] -sdist = { url = "https://files.pythonhosted.org/packages/bc/c1/bbac6a50d02774f91572938964c582fff4270eee73ab822a4aeea4d8b11b/accessible_pygments-0.0.5.tar.gz", hash = "sha256:40918d3e6a2b619ad424cb91e556bd3bd8865443d9f22f1dcdf79e33c8046872", size = 1377899 } +sdist = { url = "https://files.pythonhosted.org/packages/bc/c1/bbac6a50d02774f91572938964c582fff4270eee73ab822a4aeea4d8b11b/accessible_pygments-0.0.5.tar.gz", hash = "sha256:40918d3e6a2b619ad424cb91e556bd3bd8865443d9f22f1dcdf79e33c8046872", size = 1377899, upload-time = "2024-05-10T11:23:10.216Z" } wheels = [ - { url = "https://files.pythonhosted.org/packages/8d/3f/95338030883d8c8b91223b4e21744b04d11b161a3ef117295d8241f50ab4/accessible_pygments-0.0.5-py3-none-any.whl", hash = "sha256:88ae3211e68a1d0b011504b2ffc1691feafce124b845bd072ab6f9f66f34d4b7", size = 1395903 }, + { url = "https://files.pythonhosted.org/packages/8d/3f/95338030883d8c8b91223b4e21744b04d11b161a3ef117295d8241f50ab4/accessible_pygments-0.0.5-py3-none-any.whl", hash = "sha256:88ae3211e68a1d0b011504b2ffc1691feafce124b845bd072ab6f9f66f34d4b7", size = 1395903, upload-time = "2024-05-10T11:23:08.421Z" }, ] [[package]] name = "alabaster" version = "1.0.0" source = { registry = "https://pypi.org/simple" } -sdist = { url = "https://files.pythonhosted.org/packages/a6/f8/d9c74d0daf3f742840fd818d69cfae176fa332022fd44e3469487d5a9420/alabaster-1.0.0.tar.gz", hash = "sha256:c00dca57bca26fa62a6d7d0a9fcce65f3e026e9bfe33e9c538fd3fbb2144fd9e", size = 24210 } +sdist = { url = "https://files.pythonhosted.org/packages/a6/f8/d9c74d0daf3f742840fd818d69cfae176fa332022fd44e3469487d5a9420/alabaster-1.0.0.tar.gz", hash = "sha256:c00dca57bca26fa62a6d7d0a9fcce65f3e026e9bfe33e9c538fd3fbb2144fd9e", size = 24210, upload-time = "2024-07-26T18:15:03.762Z" } wheels = [ - { url = "https://files.pythonhosted.org/packages/7e/b3/6b4067be973ae96ba0d615946e314c5ae35f9f993eca561b356540bb0c2b/alabaster-1.0.0-py3-none-any.whl", hash = "sha256:fc6786402dc3fcb2de3cabd5fe455a2db534b371124f1f21de8731783dec828b", size = 13929 }, + { url = "https://files.pythonhosted.org/packages/7e/b3/6b4067be973ae96ba0d615946e314c5ae35f9f993eca561b356540bb0c2b/alabaster-1.0.0-py3-none-any.whl", hash = "sha256:fc6786402dc3fcb2de3cabd5fe455a2db534b371124f1f21de8731783dec828b", size = 13929, upload-time = "2024-07-26T18:15:02.05Z" }, ] [[package]] name = "appnope" version = "1.0.0" source = { registry = "https://pypi.org/simple" } -sdist = { url = "https://files.pythonhosted.org/packages/11/f7/a82489c2b6ebe32d3e2831895ae19c77861f0eadf3bb16034484d965dbb2/appnope-1.0.0.tar.gz", hash = "sha256:685db59cb6043c3c2e528adc0b3bce3a5f8d09bcf7492c6ea650d1b7421f3c49", size = 5454 } +sdist = { url = "https://files.pythonhosted.org/packages/11/f7/a82489c2b6ebe32d3e2831895ae19c77861f0eadf3bb16034484d965dbb2/appnope-1.0.0.tar.gz", hash = "sha256:685db59cb6043c3c2e528adc0b3bce3a5f8d09bcf7492c6ea650d1b7421f3c49", size = 5454, upload-time = "2026-08-20T21:36:13.748Z" } wheels = [ - { url = "https://files.pythonhosted.org/packages/46/c7/6b687cb0f83d2a51017d47953f2ee430ffad6fec2a8ebc964e0718a33eb1/appnope-1.0.0-py3-none-any.whl", hash = "sha256:6fe0c04218aab65c54c4ff81638cdbf848d89f5653b74d68638a137f200dd16e", size = 4158 }, + { url = "https://files.pythonhosted.org/packages/46/c7/6b687cb0f83d2a51017d47953f2ee430ffad6fec2a8ebc964e0718a33eb1/appnope-1.0.0-py3-none-any.whl", hash = "sha256:6fe0c04218aab65c54c4ff81638cdbf848d89f5653b74d68638a137f200dd16e", size = 4158, upload-time = "2026-08-20T21:36:12.444Z" }, ] [[package]] name = "ast-serialize" version = "0.12.1" source = { registry = "https://pypi.org/simple" } -sdist = { url = "https://files.pythonhosted.org/packages/c2/1c/7257e6ec9382843915ce475558ce4492ccb5ed39122c256bb369c27e2ebf/ast_serialize-0.12.1.tar.gz", hash = "sha256:5285a390caf1c44368ae270f037f797b91427d138b7d43cad0f1fda4c83518d9", size = 954408 } -wheels = [ - { url = "https://files.pythonhosted.org/packages/16/05/ca16884f9498386f3646bb18be59f0e31d44e992d252d7d6f5e4f8ae1ee2/ast_serialize-0.12.1-cp315-abi3.abi3t-macosx_10_12_x86_64.whl", hash = "sha256:410233de149ab8414cb27c6fc73e9d2baa35d6f971672d540d752060d980ffb4", size = 1235686 }, - { url = "https://files.pythonhosted.org/packages/29/f2/34e87ed30e292cf365523712c4bcfef1967d9c3c2749de21b1f93b1fe0f3/ast_serialize-0.12.1-cp315-abi3.abi3t-macosx_11_0_arm64.whl", hash = "sha256:b9a2310845302f1a6bd45ae8a67d5760211103a8d66410b854bfa440d107e093", size = 1215598 }, - { url = "https://files.pythonhosted.org/packages/f8/dc/c498f41c957b6ff31b97ed8ceccf3a84f85af7debca1125183cab95bb58b/ast_serialize-0.12.1-cp315-abi3.abi3t-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:6ff65f40f49d5e1a1a043ba366081d59a4e26a9f5c1b07eb1170e172115da7ca", size = 1281911 }, - { url = "https://files.pythonhosted.org/packages/dc/60/70ccefae9d88058c4c234bf0aed93f54aca36eb74087736e76e9515aee96/ast_serialize-0.12.1-cp315-abi3.abi3t-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:536d783c4d91331f094e0a892221e619be5ffbe6fb6640885f14d7f226ec90ca", size = 1287296 }, - { url = "https://files.pythonhosted.org/packages/08/e9/4fc697879c7128e29f9dab2ed19a9b586a56b621e5ea4aee2ae28c18e116/ast_serialize-0.12.1-cp315-abi3.abi3t-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:c42d2d65f388d1960c5796231eb9bf5a988c46228633eb489605c4549ad16c52", size = 1532339 }, - { url = "https://files.pythonhosted.org/packages/8a/9e/9e2bd489731602a94dbd0c576ebe1cc487a2d0f6127be743f44711166f0d/ast_serialize-0.12.1-cp315-abi3.abi3t-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:a5628a12acc875fe7a167910f18d101dd101c2a7b1e6c2b6f7289ffaff25805c", size = 1308988 }, - { url = "https://files.pythonhosted.org/packages/3f/69/e9cae837bd766a66db6953ffb5fc7f04b1945e02b0a9e4c6a0b6acb08f17/ast_serialize-0.12.1-cp315-abi3.abi3t-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:9e855adfa5bb982b2e6fe09056b2d584f6dd4fce085d91a07d1155683751b6b5", size = 1303412 }, - { url = "https://files.pythonhosted.org/packages/b2/1e/5ef8c62d5031d93187ed0d8dade5d942de9920c3fbd678c7652362b9a7a2/ast_serialize-0.12.1-cp315-abi3.abi3t-manylinux_2_31_riscv64.whl", hash = "sha256:fafe1471e8aca6c87b4913b7b54ff97197adf702fbe28692284b929dfa62ff96", size = 1298466 }, - { url = "https://files.pythonhosted.org/packages/c2/f3/25ded60844a1a437edc840e597b6f81daf91dc4a26035416e14298d3a091/ast_serialize-0.12.1-cp315-abi3.abi3t-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:a5cac246474d2a703147d1605a6ac5ba0fa9e0a443cf1cf42513adf4df02686f", size = 1355617 }, - { url = "https://files.pythonhosted.org/packages/05/68/a0d3cc8d8042208a2cbef7b26483f4941b44dd5dd717bb19f20e4a4c0d66/ast_serialize-0.12.1-cp315-abi3.abi3t-musllinux_1_2_aarch64.whl", hash = "sha256:6e25cd319fb0d7b39fcac666784ec86708ccbc78d07a698b1400cf5ed40c045b", size = 1458949 }, - { url = "https://files.pythonhosted.org/packages/df/a0/5e4d355c48a9f125b8bec7b1b98d4d2dcd8324ff1d4dfcb03678a03c1414/ast_serialize-0.12.1-cp315-abi3.abi3t-musllinux_1_2_armv7l.whl", hash = "sha256:657a7354ea16ed4d29f8127ed477c6fee3915c111d135f020ca835a991438e90", size = 1562328 }, - { url = "https://files.pythonhosted.org/packages/8a/5f/3d40f6a7908200f2f0ed9ce1bad130d00e06d0405baa7918d4a4299b25dd/ast_serialize-0.12.1-cp315-abi3.abi3t-musllinux_1_2_i686.whl", hash = "sha256:9eb9de7e59621acdb3e66984f374272b33d56d15a04763e2fd0604211e1c8303", size = 1557751 }, - { url = "https://files.pythonhosted.org/packages/3f/13/d53e5a7e299d6dbaeab23a424eea2c98c821b46ed7b05abbe14743beeb63/ast_serialize-0.12.1-cp315-abi3.abi3t-musllinux_1_2_ppc64le.whl", hash = "sha256:09cc4d3103c1fc97f6845ba307af1db9cde5226bef47f8843220dde83f2276ba", size = 1666238 }, - { url = "https://files.pythonhosted.org/packages/37/5b/7638ee3ae35a64e4467160a37dc7565cddfe2a87f06cef2fd07c93cfd503/ast_serialize-0.12.1-cp315-abi3.abi3t-musllinux_1_2_riscv64.whl", hash = "sha256:c9e2a592706fd791c2271ce9c8f4e38c98d3ea0b4a86b511e09a4fe3ac44ab37", size = 1472620 }, - { url = "https://files.pythonhosted.org/packages/fc/e7/6e9e621e0e4a3be5a9a5f8b6961982964d2367013dbe64feb5adaa43e56d/ast_serialize-0.12.1-cp315-abi3.abi3t-musllinux_1_2_x86_64.whl", hash = "sha256:f4ac042e95a575432c1730ca4cb9183066a2074886a599f46c1f1b0955fb8198", size = 1500141 }, - { url = "https://files.pythonhosted.org/packages/4a/4f/3217da5b671711c09cc6be580095839cad539983662a6599405bd75c1a19/ast_serialize-0.12.1-cp315-abi3.abi3t-win32.whl", hash = "sha256:b3cd105995942cc6163a229674a86161ba1305f646493efd59bd6723a357ee14", size = 1118382 }, - { url = "https://files.pythonhosted.org/packages/80/1e/6074cf29dca8ceff27d50e845c88e7a2eaaa7f0b6f3972909e878d844737/ast_serialize-0.12.1-cp315-abi3.abi3t-win_amd64.whl", hash = "sha256:a9cd24a26126088693ca054547ea0a391398a29cf1a3a2bec1009b4b6acc8b82", size = 1158034 }, - { url = "https://files.pythonhosted.org/packages/92/a0/81ce428f9f3f1ca45f8b62c9711c30452bf8190476e8685cea0f72d8d008/ast_serialize-0.12.1-cp315-abi3.abi3t-win_arm64.whl", hash = "sha256:9649cd903db0dc047906c6dd740784a2ba665d54f7e43ba31457edbce76c9493", size = 1129437 }, - { url = "https://files.pythonhosted.org/packages/80/fb/1eabd2c0673283054468b1c6cb539aeb877636d6c84b280279f2d7a177a9/ast_serialize-0.12.1-cp39-abi3-macosx_10_12_x86_64.whl", hash = "sha256:98d91cd3a6cb76a39512ee090a539d1e3206b732ad8150eb38918cffa1ddf515", size = 1241515 }, - { url = "https://files.pythonhosted.org/packages/1b/d7/c56955934a431a0fa3e4e9aa7af4a53ceab2a61241005427545208945eb4/ast_serialize-0.12.1-cp39-abi3-macosx_11_0_arm64.whl", hash = "sha256:8a32f184ce3e4b1d0b06d642a1243281cf55b99e0323680b1b8f904029fd7700", size = 1228048 }, - { url = "https://files.pythonhosted.org/packages/1e/4e/2b2ca4602baf92f842316ea617423402089df4fbd2ea42571ba28725ba46/ast_serialize-0.12.1-cp39-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:e62126ac2be2d9340ac1b3ee7a0466a883ecbed634cff0929c88ca0b671483b7", size = 1292087 }, - { url = "https://files.pythonhosted.org/packages/d9/49/9ebd05218a87ca31f4f855d5e3df14239bba3c58f2aed9d02c7cba5d94f5/ast_serialize-0.12.1-cp39-abi3-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:0f93a70fa9826c04ea9f2c3a880f87f4cca09a828144ed5084682abd28110980", size = 1295355 }, - { url = "https://files.pythonhosted.org/packages/dc/09/6db7c4327e7a56aba805f7190d377a159fc0bf6bdefb410dc7860624dfa3/ast_serialize-0.12.1-cp39-abi3-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:1858887be56a64a2aea899423dfe43787c34c75c18b0d7497de8e618d54b2790", size = 1541231 }, - { url = "https://files.pythonhosted.org/packages/ed/85/7ab6097e5fe23cd4657b0e5a2fabb4f789f91e441a3ee40b3ca8b79be238/ast_serialize-0.12.1-cp39-abi3-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:89a2bc39a820bc7785b60c53a5742b4e8dd4c1a599294e2dd68fae545883d44a", size = 1317324 }, - { url = "https://files.pythonhosted.org/packages/c0/60/58961e7fd129e226ce36788fe328d20034f3105f5d3380df690050517737/ast_serialize-0.12.1-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:50a9eaedf1db4857dad7cc47dd757ed70bfcc40b89d44d516c4a2f0d5033bd76", size = 1311809 }, - { url = "https://files.pythonhosted.org/packages/15/c7/09d973db87d4575cba470fd80a3fa489322f7d6882546e43a4b21012468e/ast_serialize-0.12.1-cp39-abi3-manylinux_2_31_riscv64.whl", hash = "sha256:c30b609e8fea426b310543126de876592236a25aa8ebd59f1e2b323dd52a4085", size = 1306678 }, - { url = "https://files.pythonhosted.org/packages/84/27/84f69c22bcdaa5256b4fe43ff972fc117668fff8e68495807d5792eadcce/ast_serialize-0.12.1-cp39-abi3-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:7b1ad06513022cfa1337744959255af0ef16119d2beb1e547b67f37ad9433d4a", size = 1362009 }, - { url = "https://files.pythonhosted.org/packages/43/46/76ee342ef22cd6d82ccd6089d5e2f7163246de73d1816ccb4b6ec0550db6/ast_serialize-0.12.1-cp39-abi3-musllinux_1_2_aarch64.whl", hash = "sha256:6add54b495e37ae3cf3a1f0d5eaba364814eb72e93026adc41b7791e4b0d45d3", size = 1467959 }, - { url = "https://files.pythonhosted.org/packages/31/4d/18e48154bbf6058eed8d9b54fcebb2e130f8a380db1a2a202b4faac48626/ast_serialize-0.12.1-cp39-abi3-musllinux_1_2_armv7l.whl", hash = "sha256:5fc136cd08001b817ad0b3e7426f50a7d2b8982dc7c6491f0af78af4c3dd8672", size = 1571157 }, - { url = "https://files.pythonhosted.org/packages/34/76/6b16ddf0510e713613a5f5441b13407c1bde6158df04946b9f1fdc65add3/ast_serialize-0.12.1-cp39-abi3-musllinux_1_2_i686.whl", hash = "sha256:45a9e6b700bbd973d49942668a5cdbeffa693f2e250b8a5409abd1fa9d351854", size = 1566873 }, - { url = "https://files.pythonhosted.org/packages/75/33/9f6169ae7f60c2da4baec03450073d3f1edb39e95ab538be0d25a7d2f72e/ast_serialize-0.12.1-cp39-abi3-musllinux_1_2_ppc64le.whl", hash = "sha256:a1d8267f83c613ea0a31f2518df074bd62e98a4b3a4892f6a529d74e08e02dba", size = 1673030 }, - { url = "https://files.pythonhosted.org/packages/11/51/0d78755bd61d6cf8980f0cfdc7fa8ede38df46a5423c9f7a3da0cff587ec/ast_serialize-0.12.1-cp39-abi3-musllinux_1_2_riscv64.whl", hash = "sha256:9a0cbab9796e6ce841197feeba4008faa96b4cc7741129542fd81c882d7a4f01", size = 1480052 }, - { url = "https://files.pythonhosted.org/packages/01/ae/ad4c0e5129991f2761f388420c5ded37cb134ec5882e3e59043d33c1ad87/ast_serialize-0.12.1-cp39-abi3-musllinux_1_2_x86_64.whl", hash = "sha256:b4282695f1d51a3c6ef76560351bad5af880eff7d755aefea325bffb9bf68c25", size = 1508940 }, - { url = "https://files.pythonhosted.org/packages/38/6b/3299182794d38815ae6e9c7ede9bb8f2e4aa93c3578bed201c1ea746643a/ast_serialize-0.12.1-cp39-abi3-win32.whl", hash = "sha256:119d1b0cadaba4a6e475f9bbe79eecc79351e373142eabe7c353f0250d70aebb", size = 1125618 }, - { url = "https://files.pythonhosted.org/packages/86/14/5d4fb733c18a1d69e237c067b183842f3a7ea1c999a51ddc87093a281c88/ast_serialize-0.12.1-cp39-abi3-win_amd64.whl", hash = "sha256:3d6ed63d4fc1ec867b8cb522d58c36df0e8f05e487bea0ffd102043a37636d72", size = 1165798 }, - { url = "https://files.pythonhosted.org/packages/f1/f4/b54123680025c0b7253117418f023d1b2487f1102552acbdd9d8ee96b622/ast_serialize-0.12.1-cp39-abi3-win_arm64.whl", hash = "sha256:610a41351de68199de9a1434499083b4256c0df7658ec1cfc0a0a7b20b08d317", size = 1136560 }, +sdist = { url = "https://files.pythonhosted.org/packages/c2/1c/7257e6ec9382843915ce475558ce4492ccb5ed39122c256bb369c27e2ebf/ast_serialize-0.12.1.tar.gz", hash = "sha256:5285a390caf1c44368ae270f037f797b91427d138b7d43cad0f1fda4c83518d9", size = 954408, upload-time = "2026-10-03T12:25:00.221Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/16/05/ca16884f9498386f3646bb18be59f0e31d44e992d252d7d6f5e4f8ae1ee2/ast_serialize-0.12.1-cp315-abi3.abi3t-macosx_10_12_x86_64.whl", hash = "sha256:410233de149ab8414cb27c6fc73e9d2baa35d6f971672d540d752060d980ffb4", size = 1235686, upload-time = "2026-10-03T12:23:55.863Z" }, + { url = "https://files.pythonhosted.org/packages/29/f2/34e87ed30e292cf365523712c4bcfef1967d9c3c2749de21b1f93b1fe0f3/ast_serialize-0.12.1-cp315-abi3.abi3t-macosx_11_0_arm64.whl", hash = "sha256:b9a2310845302f1a6bd45ae8a67d5760211103a8d66410b854bfa440d107e093", size = 1215598, upload-time = "2026-10-03T12:23:57.48Z" }, + { url = "https://files.pythonhosted.org/packages/f8/dc/c498f41c957b6ff31b97ed8ceccf3a84f85af7debca1125183cab95bb58b/ast_serialize-0.12.1-cp315-abi3.abi3t-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:6ff65f40f49d5e1a1a043ba366081d59a4e26a9f5c1b07eb1170e172115da7ca", size = 1281911, upload-time = "2026-10-03T12:23:58.954Z" }, + { url = "https://files.pythonhosted.org/packages/dc/60/70ccefae9d88058c4c234bf0aed93f54aca36eb74087736e76e9515aee96/ast_serialize-0.12.1-cp315-abi3.abi3t-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:536d783c4d91331f094e0a892221e619be5ffbe6fb6640885f14d7f226ec90ca", size = 1287296, upload-time = "2026-10-03T12:24:00.429Z" }, + { url = "https://files.pythonhosted.org/packages/08/e9/4fc697879c7128e29f9dab2ed19a9b586a56b621e5ea4aee2ae28c18e116/ast_serialize-0.12.1-cp315-abi3.abi3t-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:c42d2d65f388d1960c5796231eb9bf5a988c46228633eb489605c4549ad16c52", size = 1532339, upload-time = "2026-10-03T12:24:02.053Z" }, + { url = "https://files.pythonhosted.org/packages/8a/9e/9e2bd489731602a94dbd0c576ebe1cc487a2d0f6127be743f44711166f0d/ast_serialize-0.12.1-cp315-abi3.abi3t-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:a5628a12acc875fe7a167910f18d101dd101c2a7b1e6c2b6f7289ffaff25805c", size = 1308988, upload-time = "2026-10-03T12:24:03.61Z" }, + { url = "https://files.pythonhosted.org/packages/3f/69/e9cae837bd766a66db6953ffb5fc7f04b1945e02b0a9e4c6a0b6acb08f17/ast_serialize-0.12.1-cp315-abi3.abi3t-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:9e855adfa5bb982b2e6fe09056b2d584f6dd4fce085d91a07d1155683751b6b5", size = 1303412, upload-time = "2026-10-03T12:24:05.62Z" }, + { url = "https://files.pythonhosted.org/packages/b2/1e/5ef8c62d5031d93187ed0d8dade5d942de9920c3fbd678c7652362b9a7a2/ast_serialize-0.12.1-cp315-abi3.abi3t-manylinux_2_31_riscv64.whl", hash = "sha256:fafe1471e8aca6c87b4913b7b54ff97197adf702fbe28692284b929dfa62ff96", size = 1298466, upload-time = "2026-10-03T12:24:07.242Z" }, + { url = "https://files.pythonhosted.org/packages/c2/f3/25ded60844a1a437edc840e597b6f81daf91dc4a26035416e14298d3a091/ast_serialize-0.12.1-cp315-abi3.abi3t-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:a5cac246474d2a703147d1605a6ac5ba0fa9e0a443cf1cf42513adf4df02686f", size = 1355617, upload-time = "2026-10-03T12:24:09.125Z" }, + { url = "https://files.pythonhosted.org/packages/05/68/a0d3cc8d8042208a2cbef7b26483f4941b44dd5dd717bb19f20e4a4c0d66/ast_serialize-0.12.1-cp315-abi3.abi3t-musllinux_1_2_aarch64.whl", hash = "sha256:6e25cd319fb0d7b39fcac666784ec86708ccbc78d07a698b1400cf5ed40c045b", size = 1458949, upload-time = "2026-10-03T12:24:10.772Z" }, + { url = "https://files.pythonhosted.org/packages/df/a0/5e4d355c48a9f125b8bec7b1b98d4d2dcd8324ff1d4dfcb03678a03c1414/ast_serialize-0.12.1-cp315-abi3.abi3t-musllinux_1_2_armv7l.whl", hash = "sha256:657a7354ea16ed4d29f8127ed477c6fee3915c111d135f020ca835a991438e90", size = 1562328, upload-time = "2026-10-03T12:24:12.404Z" }, + { url = "https://files.pythonhosted.org/packages/8a/5f/3d40f6a7908200f2f0ed9ce1bad130d00e06d0405baa7918d4a4299b25dd/ast_serialize-0.12.1-cp315-abi3.abi3t-musllinux_1_2_i686.whl", hash = "sha256:9eb9de7e59621acdb3e66984f374272b33d56d15a04763e2fd0604211e1c8303", size = 1557751, upload-time = "2026-10-03T12:24:14.455Z" }, + { url = "https://files.pythonhosted.org/packages/3f/13/d53e5a7e299d6dbaeab23a424eea2c98c821b46ed7b05abbe14743beeb63/ast_serialize-0.12.1-cp315-abi3.abi3t-musllinux_1_2_ppc64le.whl", hash = "sha256:09cc4d3103c1fc97f6845ba307af1db9cde5226bef47f8843220dde83f2276ba", size = 1666238, upload-time = "2026-10-03T12:24:16.171Z" }, + { url = "https://files.pythonhosted.org/packages/37/5b/7638ee3ae35a64e4467160a37dc7565cddfe2a87f06cef2fd07c93cfd503/ast_serialize-0.12.1-cp315-abi3.abi3t-musllinux_1_2_riscv64.whl", hash = "sha256:c9e2a592706fd791c2271ce9c8f4e38c98d3ea0b4a86b511e09a4fe3ac44ab37", size = 1472620, upload-time = "2026-10-03T12:24:18.053Z" }, + { url = "https://files.pythonhosted.org/packages/fc/e7/6e9e621e0e4a3be5a9a5f8b6961982964d2367013dbe64feb5adaa43e56d/ast_serialize-0.12.1-cp315-abi3.abi3t-musllinux_1_2_x86_64.whl", hash = "sha256:f4ac042e95a575432c1730ca4cb9183066a2074886a599f46c1f1b0955fb8198", size = 1500141, upload-time = "2026-10-03T12:24:20.036Z" }, + { url = "https://files.pythonhosted.org/packages/4a/4f/3217da5b671711c09cc6be580095839cad539983662a6599405bd75c1a19/ast_serialize-0.12.1-cp315-abi3.abi3t-win32.whl", hash = "sha256:b3cd105995942cc6163a229674a86161ba1305f646493efd59bd6723a357ee14", size = 1118382, upload-time = "2026-10-03T12:24:21.599Z" }, + { url = "https://files.pythonhosted.org/packages/80/1e/6074cf29dca8ceff27d50e845c88e7a2eaaa7f0b6f3972909e878d844737/ast_serialize-0.12.1-cp315-abi3.abi3t-win_amd64.whl", hash = "sha256:a9cd24a26126088693ca054547ea0a391398a29cf1a3a2bec1009b4b6acc8b82", size = 1158034, upload-time = "2026-10-03T12:24:23.316Z" }, + { url = "https://files.pythonhosted.org/packages/92/a0/81ce428f9f3f1ca45f8b62c9711c30452bf8190476e8685cea0f72d8d008/ast_serialize-0.12.1-cp315-abi3.abi3t-win_arm64.whl", hash = "sha256:9649cd903db0dc047906c6dd740784a2ba665d54f7e43ba31457edbce76c9493", size = 1129437, upload-time = "2026-10-03T12:24:25.044Z" }, + { url = "https://files.pythonhosted.org/packages/80/fb/1eabd2c0673283054468b1c6cb539aeb877636d6c84b280279f2d7a177a9/ast_serialize-0.12.1-cp39-abi3-macosx_10_12_x86_64.whl", hash = "sha256:98d91cd3a6cb76a39512ee090a539d1e3206b732ad8150eb38918cffa1ddf515", size = 1241515, upload-time = "2026-10-03T12:24:28.493Z" }, + { url = "https://files.pythonhosted.org/packages/1b/d7/c56955934a431a0fa3e4e9aa7af4a53ceab2a61241005427545208945eb4/ast_serialize-0.12.1-cp39-abi3-macosx_11_0_arm64.whl", hash = "sha256:8a32f184ce3e4b1d0b06d642a1243281cf55b99e0323680b1b8f904029fd7700", size = 1228048, upload-time = "2026-10-03T12:24:30.556Z" }, + { url = "https://files.pythonhosted.org/packages/1e/4e/2b2ca4602baf92f842316ea617423402089df4fbd2ea42571ba28725ba46/ast_serialize-0.12.1-cp39-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:e62126ac2be2d9340ac1b3ee7a0466a883ecbed634cff0929c88ca0b671483b7", size = 1292087, upload-time = "2026-10-03T12:24:32.45Z" }, + { url = "https://files.pythonhosted.org/packages/d9/49/9ebd05218a87ca31f4f855d5e3df14239bba3c58f2aed9d02c7cba5d94f5/ast_serialize-0.12.1-cp39-abi3-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:0f93a70fa9826c04ea9f2c3a880f87f4cca09a828144ed5084682abd28110980", size = 1295355, upload-time = "2026-10-03T12:24:34.423Z" }, + { url = "https://files.pythonhosted.org/packages/dc/09/6db7c4327e7a56aba805f7190d377a159fc0bf6bdefb410dc7860624dfa3/ast_serialize-0.12.1-cp39-abi3-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:1858887be56a64a2aea899423dfe43787c34c75c18b0d7497de8e618d54b2790", size = 1541231, upload-time = "2026-10-03T12:24:36.05Z" }, + { url = "https://files.pythonhosted.org/packages/ed/85/7ab6097e5fe23cd4657b0e5a2fabb4f789f91e441a3ee40b3ca8b79be238/ast_serialize-0.12.1-cp39-abi3-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:89a2bc39a820bc7785b60c53a5742b4e8dd4c1a599294e2dd68fae545883d44a", size = 1317324, upload-time = "2026-10-03T12:24:37.737Z" }, + { url = "https://files.pythonhosted.org/packages/c0/60/58961e7fd129e226ce36788fe328d20034f3105f5d3380df690050517737/ast_serialize-0.12.1-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:50a9eaedf1db4857dad7cc47dd757ed70bfcc40b89d44d516c4a2f0d5033bd76", size = 1311809, upload-time = "2026-10-03T12:24:39.306Z" }, + { url = "https://files.pythonhosted.org/packages/15/c7/09d973db87d4575cba470fd80a3fa489322f7d6882546e43a4b21012468e/ast_serialize-0.12.1-cp39-abi3-manylinux_2_31_riscv64.whl", hash = "sha256:c30b609e8fea426b310543126de876592236a25aa8ebd59f1e2b323dd52a4085", size = 1306678, upload-time = "2026-10-03T12:24:40.891Z" }, + { url = "https://files.pythonhosted.org/packages/84/27/84f69c22bcdaa5256b4fe43ff972fc117668fff8e68495807d5792eadcce/ast_serialize-0.12.1-cp39-abi3-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:7b1ad06513022cfa1337744959255af0ef16119d2beb1e547b67f37ad9433d4a", size = 1362009, upload-time = "2026-10-03T12:24:42.809Z" }, + { url = "https://files.pythonhosted.org/packages/43/46/76ee342ef22cd6d82ccd6089d5e2f7163246de73d1816ccb4b6ec0550db6/ast_serialize-0.12.1-cp39-abi3-musllinux_1_2_aarch64.whl", hash = "sha256:6add54b495e37ae3cf3a1f0d5eaba364814eb72e93026adc41b7791e4b0d45d3", size = 1467959, upload-time = "2026-10-03T12:24:44.496Z" }, + { url = "https://files.pythonhosted.org/packages/31/4d/18e48154bbf6058eed8d9b54fcebb2e130f8a380db1a2a202b4faac48626/ast_serialize-0.12.1-cp39-abi3-musllinux_1_2_armv7l.whl", hash = "sha256:5fc136cd08001b817ad0b3e7426f50a7d2b8982dc7c6491f0af78af4c3dd8672", size = 1571157, upload-time = "2026-10-03T12:24:46.156Z" }, + { url = "https://files.pythonhosted.org/packages/34/76/6b16ddf0510e713613a5f5441b13407c1bde6158df04946b9f1fdc65add3/ast_serialize-0.12.1-cp39-abi3-musllinux_1_2_i686.whl", hash = "sha256:45a9e6b700bbd973d49942668a5cdbeffa693f2e250b8a5409abd1fa9d351854", size = 1566873, upload-time = "2026-10-03T12:24:48.542Z" }, + { url = "https://files.pythonhosted.org/packages/75/33/9f6169ae7f60c2da4baec03450073d3f1edb39e95ab538be0d25a7d2f72e/ast_serialize-0.12.1-cp39-abi3-musllinux_1_2_ppc64le.whl", hash = "sha256:a1d8267f83c613ea0a31f2518df074bd62e98a4b3a4892f6a529d74e08e02dba", size = 1673030, upload-time = "2026-10-03T12:24:50.566Z" }, + { url = "https://files.pythonhosted.org/packages/11/51/0d78755bd61d6cf8980f0cfdc7fa8ede38df46a5423c9f7a3da0cff587ec/ast_serialize-0.12.1-cp39-abi3-musllinux_1_2_riscv64.whl", hash = "sha256:9a0cbab9796e6ce841197feeba4008faa96b4cc7741129542fd81c882d7a4f01", size = 1480052, upload-time = "2026-10-03T12:24:52.277Z" }, + { url = "https://files.pythonhosted.org/packages/01/ae/ad4c0e5129991f2761f388420c5ded37cb134ec5882e3e59043d33c1ad87/ast_serialize-0.12.1-cp39-abi3-musllinux_1_2_x86_64.whl", hash = "sha256:b4282695f1d51a3c6ef76560351bad5af880eff7d755aefea325bffb9bf68c25", size = 1508940, upload-time = "2026-10-03T12:24:53.846Z" }, + { url = "https://files.pythonhosted.org/packages/38/6b/3299182794d38815ae6e9c7ede9bb8f2e4aa93c3578bed201c1ea746643a/ast_serialize-0.12.1-cp39-abi3-win32.whl", hash = "sha256:119d1b0cadaba4a6e475f9bbe79eecc79351e373142eabe7c353f0250d70aebb", size = 1125618, upload-time = "2026-10-03T12:24:55.405Z" }, + { url = "https://files.pythonhosted.org/packages/86/14/5d4fb733c18a1d69e237c067b183842f3a7ea1c999a51ddc87093a281c88/ast_serialize-0.12.1-cp39-abi3-win_amd64.whl", hash = "sha256:3d6ed63d4fc1ec867b8cb522d58c36df0e8f05e487bea0ffd102043a37636d72", size = 1165798, upload-time = "2026-10-03T12:24:57.052Z" }, + { url = "https://files.pythonhosted.org/packages/f1/f4/b54123680025c0b7253117418f023d1b2487f1102552acbdd9d8ee96b622/ast_serialize-0.12.1-cp39-abi3-win_arm64.whl", hash = "sha256:610a41351de68199de9a1434499083b4256c0df7658ec1cfc0a0a7b20b08d317", size = 1136560, upload-time = "2026-10-03T12:24:58.689Z" }, ] [[package]] @@ -83,36 +83,36 @@ source = { registry = "https://pypi.org/simple" } dependencies = [ { name = "typing-extensions" }, ] -sdist = { url = "https://files.pythonhosted.org/packages/2d/87/5732fa68bf100a095cfcbd108f919220d995db99e1a7502b8119a869fd62/astroid-4.3.4.tar.gz", hash = "sha256:d515a105722b72098bbe82d430d65e635f742b6cbac3bdfaf8b7c188b87c5e39", size = 444627 } +sdist = { url = "https://files.pythonhosted.org/packages/2d/87/5732fa68bf100a095cfcbd108f919220d995db99e1a7502b8119a869fd62/astroid-4.3.4.tar.gz", hash = "sha256:d515a105722b72098bbe82d430d65e635f742b6cbac3bdfaf8b7c188b87c5e39", size = 444627, upload-time = "2026-10-08T09:36:44.122Z" } wheels = [ - { url = "https://files.pythonhosted.org/packages/16/d4/f23c0ac6e6de33ba5686cb21c672c95e0c2d3d4c9351f16d3b5fed818652/astroid-4.3.4-py3-none-any.whl", hash = "sha256:2bcd0d02648a443a4b818c952c3550091989daefac3c12d3b83b2289482e0818", size = 288310 }, + { url = "https://files.pythonhosted.org/packages/16/d4/f23c0ac6e6de33ba5686cb21c672c95e0c2d3d4c9351f16d3b5fed818652/astroid-4.3.4-py3-none-any.whl", hash = "sha256:2bcd0d02648a443a4b818c952c3550091989daefac3c12d3b83b2289482e0818", size = 288310, upload-time = "2026-10-08T09:36:42.284Z" }, ] [[package]] name = "asttokens" version = "3.0.2" source = { registry = "https://pypi.org/simple" } -sdist = { url = "https://files.pythonhosted.org/packages/25/1e/faf0f247f6f881b98fc4d6d07e14085cb89d13665084e6d6ac1dc2c03d0b/asttokens-3.0.2.tar.gz", hash = "sha256:3ecdbd8f2cc195f53ccada3a613538bb5f9ef6f6869129f13e03c30a677b8fe2", size = 63136 } +sdist = { url = "https://files.pythonhosted.org/packages/25/1e/faf0f247f6f881b98fc4d6d07e14085cb89d13665084e6d6ac1dc2c03d0b/asttokens-3.0.2.tar.gz", hash = "sha256:3ecdbd8f2cc195f53ccada3a613538bb5f9ef6f6869129f13e03c30a677b8fe2", size = 63136, upload-time = "2026-07-12T03:31:49.084Z" } wheels = [ - { url = "https://files.pythonhosted.org/packages/d4/2b/04b8a15f3a1c77bc79ddf5c73875327f34b4fa75982df2b76e45e402d364/asttokens-3.0.2-py3-none-any.whl", hash = "sha256:9da13157f5b28becde0bd374fc677dcd3c290614264eff096f167c469cd9f933", size = 28702 }, + { url = "https://files.pythonhosted.org/packages/d4/2b/04b8a15f3a1c77bc79ddf5c73875327f34b4fa75982df2b76e45e402d364/asttokens-3.0.2-py3-none-any.whl", hash = "sha256:9da13157f5b28becde0bd374fc677dcd3c290614264eff096f167c469cd9f933", size = 28702, upload-time = "2026-07-12T03:31:47.542Z" }, ] [[package]] name = "attrs" version = "26.1.0" source = { registry = "https://pypi.org/simple" } -sdist = { url = "https://files.pythonhosted.org/packages/9a/8e/82a0fe20a541c03148528be8cac2408564a6c9a0cc7e9171802bc1d26985/attrs-26.1.0.tar.gz", hash = "sha256:d03ceb89cb322a8fd706d4fb91940737b6642aa36998fe130a9bc96c985eff32", size = 952055 } +sdist = { url = "https://files.pythonhosted.org/packages/9a/8e/82a0fe20a541c03148528be8cac2408564a6c9a0cc7e9171802bc1d26985/attrs-26.1.0.tar.gz", hash = "sha256:d03ceb89cb322a8fd706d4fb91940737b6642aa36998fe130a9bc96c985eff32", size = 952055, upload-time = "2026-03-19T14:22:25.026Z" } wheels = [ - { url = "https://files.pythonhosted.org/packages/64/b4/17d4b0b2a2dc85a6df63d1157e028ed19f90d4cd97c36717afef2bc2f395/attrs-26.1.0-py3-none-any.whl", hash = "sha256:c647aa4a12dfbad9333ca4e71fe62ddc36f4e63b2d260a37a8b83d2f043ac309", size = 67548 }, + { url = "https://files.pythonhosted.org/packages/64/b4/17d4b0b2a2dc85a6df63d1157e028ed19f90d4cd97c36717afef2bc2f395/attrs-26.1.0-py3-none-any.whl", hash = "sha256:c647aa4a12dfbad9333ca4e71fe62ddc36f4e63b2d260a37a8b83d2f043ac309", size = 67548, upload-time = "2026-03-19T14:22:23.645Z" }, ] [[package]] name = "babel" version = "2.18.0" source = { registry = "https://pypi.org/simple" } -sdist = { url = "https://files.pythonhosted.org/packages/7d/b2/51899539b6ceeeb420d40ed3cd4b7a40519404f9baf3d4ac99dc413a834b/babel-2.18.0.tar.gz", hash = "sha256:b80b99a14bd085fcacfa15c9165f651fbb3406e66cc603abf11c5750937c992d", size = 9959554 } +sdist = { url = "https://files.pythonhosted.org/packages/7d/b2/51899539b6ceeeb420d40ed3cd4b7a40519404f9baf3d4ac99dc413a834b/babel-2.18.0.tar.gz", hash = "sha256:b80b99a14bd085fcacfa15c9165f651fbb3406e66cc603abf11c5750937c992d", size = 9959554, upload-time = "2026-02-01T12:30:56.078Z" } wheels = [ - { url = "https://files.pythonhosted.org/packages/77/f5/21d2de20e8b8b0408f0681956ca2c69f1320a3848ac50e6e7f39c6159675/babel-2.18.0-py3-none-any.whl", hash = "sha256:e2b422b277c2b9a9630c1d7903c2a00d0830c409c59ac8cae9081c92f1aeba35", size = 10196845 }, + { url = "https://files.pythonhosted.org/packages/77/f5/21d2de20e8b8b0408f0681956ca2c69f1320a3848ac50e6e7f39c6159675/babel-2.18.0-py3-none-any.whl", hash = "sha256:e2b422b277c2b9a9630c1d7903c2a00d0830c409c59ac8cae9081c92f1aeba35", size = 10196845, upload-time = "2026-02-01T12:30:53.445Z" }, ] [[package]] @@ -123,27 +123,27 @@ dependencies = [ { name = "soupsieve" }, { name = "typing-extensions" }, ] -sdist = { url = "https://files.pythonhosted.org/packages/43/65/318323f98dbee45d42dff61d8f047181bc6f2268a9068cfad035a46be5af/beautifulsoup4-4.15.0.tar.gz", hash = "sha256:288e3ca7d54b06f2ac191970bc275c1939cb46d450b255bf6718b04aa37ab4f7", size = 632571 } +sdist = { url = "https://files.pythonhosted.org/packages/43/65/318323f98dbee45d42dff61d8f047181bc6f2268a9068cfad035a46be5af/beautifulsoup4-4.15.0.tar.gz", hash = "sha256:288e3ca7d54b06f2ac191970bc275c1939cb46d450b255bf6718b04aa37ab4f7", size = 632571, upload-time = "2026-06-07T16:44:20.453Z" } wheels = [ - { url = "https://files.pythonhosted.org/packages/88/c6/92fcd42f1ba33e1184263f25bfabf3d27c383410470f169e4b8163bf9c17/beautifulsoup4-4.15.0-py3-none-any.whl", hash = "sha256:d6f88de62e1d4e38ecb1077eb9724cd0eff29d2a08ca16a401e9b9e93f117cf9", size = 109924 }, + { url = "https://files.pythonhosted.org/packages/88/c6/92fcd42f1ba33e1184263f25bfabf3d27c383410470f169e4b8163bf9c17/beautifulsoup4-4.15.0-py3-none-any.whl", hash = "sha256:d6f88de62e1d4e38ecb1077eb9724cd0eff29d2a08ca16a401e9b9e93f117cf9", size = 109924, upload-time = "2026-06-07T16:44:21.566Z" }, ] [[package]] name = "blinker" version = "1.9.0" source = { registry = "https://pypi.org/simple" } -sdist = { url = "https://files.pythonhosted.org/packages/21/28/9b3f50ce0e048515135495f198351908d99540d69bfdc8c1d15b73dc55ce/blinker-1.9.0.tar.gz", hash = "sha256:b4ce2265a7abece45e7cc896e98dbebe6cead56bcf805a3d23136d145f5445bf", size = 22460 } +sdist = { url = "https://files.pythonhosted.org/packages/21/28/9b3f50ce0e048515135495f198351908d99540d69bfdc8c1d15b73dc55ce/blinker-1.9.0.tar.gz", hash = "sha256:b4ce2265a7abece45e7cc896e98dbebe6cead56bcf805a3d23136d145f5445bf", size = 22460, upload-time = "2024-11-08T17:25:47.436Z" } wheels = [ - { url = "https://files.pythonhosted.org/packages/10/cb/f2ad4230dc2eb1a74edf38f1a38b9b52277f75bef262d8908e60d957e13c/blinker-1.9.0-py3-none-any.whl", hash = "sha256:ba0efaa9080b619ff2f3459d1d500c57bddea4a6b424b60a91141db6fd2f08bc", size = 8458 }, + { url = "https://files.pythonhosted.org/packages/10/cb/f2ad4230dc2eb1a74edf38f1a38b9b52277f75bef262d8908e60d957e13c/blinker-1.9.0-py3-none-any.whl", hash = "sha256:ba0efaa9080b619ff2f3459d1d500c57bddea4a6b424b60a91141db6fd2f08bc", size = 8458, upload-time = "2024-11-08T17:25:46.184Z" }, ] [[package]] name = "certifi" version = "2026.7.22" source = { registry = "https://pypi.org/simple" } -sdist = { url = "https://files.pythonhosted.org/packages/a3/c2/24167ea9858356b47a87a50d39908bfdb72ceeefe0041586e704e5376b3a/certifi-2026.7.22.tar.gz", hash = "sha256:741e2c3b351ddf169a738da9f2c048608ff7f2c5cc02f1ebc6b118bb090d5d55", size = 138112 } +sdist = { url = "https://files.pythonhosted.org/packages/a3/c2/24167ea9858356b47a87a50d39908bfdb72ceeefe0041586e704e5376b3a/certifi-2026.7.22.tar.gz", hash = "sha256:741e2c3b351ddf169a738da9f2c048608ff7f2c5cc02f1ebc6b118bb090d5d55", size = 138112, upload-time = "2026-07-22T03:35:12.644Z" } wheels = [ - { url = "https://files.pythonhosted.org/packages/0b/a7/71ac2cff56fec219ed242bb11b8efb69fcc4bec75db06fb7bfe35de520e6/certifi-2026.7.22-py3-none-any.whl", hash = "sha256:62f22742b58a1a33014a2b6b706588a8d7e2a88ae7bd1a6ebe8c992928483775", size = 136983 }, + { url = "https://files.pythonhosted.org/packages/0b/a7/71ac2cff56fec219ed242bb11b8efb69fcc4bec75db06fb7bfe35de520e6/certifi-2026.7.22-py3-none-any.whl", hash = "sha256:62f22742b58a1a33014a2b6b706588a8d7e2a88ae7bd1a6ebe8c992928483775", size = 136983, upload-time = "2026-07-22T03:35:11.276Z" }, ] [[package]] @@ -153,70 +153,70 @@ source = { registry = "https://pypi.org/simple" } dependencies = [ { name = "pycparser", marker = "implementation_name != 'PyPy'" }, ] -sdist = { url = "https://files.pythonhosted.org/packages/9e/ef/008a1939e372c06329a3fce4279c02f328488f3526744906eeec3da7ad5f/cffi-2.1.1.tar.gz", hash = "sha256:dd31f52ea1086513bb9df30f8fcee9b8918323ae067a3d5b78bc826a000712be", size = 530807 } +sdist = { url = "https://files.pythonhosted.org/packages/9e/ef/008a1939e372c06329a3fce4279c02f328488f3526744906eeec3da7ad5f/cffi-2.1.1.tar.gz", hash = "sha256:dd31f52ea1086513bb9df30f8fcee9b8918323ae067a3d5b78bc826a000712be", size = 530807, upload-time = "2026-08-03T21:21:18.939Z" } wheels = [ - { url = "https://files.pythonhosted.org/packages/b6/d2/2cde336b375f55c76ca670f0be3978cc048e31e24f3b4d7ce8473150a388/cffi-2.1.1-cp310-cp310-macosx_10_15_x86_64.whl", hash = "sha256:baed1e86cc735622097354b9d1281406caf42ff42a886d29faa8e8d1630333be", size = 183779 }, - { url = "https://files.pythonhosted.org/packages/94/1a/4b2f7c92293ba05cbd4a9a1b28faaf0326272d9488e6354657571c48a7aa/cffi-2.1.1-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:ca82be1a1d406ecfe1d25dc16cb33488e5a16bf4438c9fb590484ea29d92478b", size = 184178 }, - { url = "https://files.pythonhosted.org/packages/17/0b/ba385d8ccedf926c3cd06e8e2f327027da5afe5f0eb30f1f7bc43ac55125/cffi-2.1.1-cp310-cp310-manylinux1_i686.manylinux2014_i686.manylinux_2_17_i686.manylinux_2_5_i686.whl", hash = "sha256:42e2f76b9455f5a9a844f770bf3e200ed3da0e15f5df3db9c31fe80b04b3d004", size = 211037 }, - { url = "https://files.pythonhosted.org/packages/a3/b9/0f2e58b2cefa33255bff36935d42b13180fe559bba82596540eb404bde7d/cffi-2.1.1-cp310-cp310-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:5a59cc1c4442bc3d5c703bf720b51138d0bfc173618807c9ee2490a7541dd3d9", size = 218652 }, - { url = "https://files.pythonhosted.org/packages/37/15/180e0dab27b9312c7479003d14c9e547634b7dcb934e2cc4650e1b131a7a/cffi-2.1.1-cp310-cp310-manylinux2014_ppc64le.manylinux_2_17_ppc64le.whl", hash = "sha256:9f8d177621de5cb38ee3e731eda45d421db093ec0739f46a5594babda7987a98", size = 205422 }, - { url = "https://files.pythonhosted.org/packages/18/d4/03026f0c850cbbaa9030750490225b4a7f4d524ea4df72c3cc740a90f4ef/cffi-2.1.1-cp310-cp310-manylinux2014_s390x.manylinux_2_17_s390x.whl", hash = "sha256:75f80557d1389eddbd0de2681f6a390a0c5338c31ddaa821381c203fc3fd50d9", size = 205444 }, - { url = "https://files.pythonhosted.org/packages/75/77/60bebf6f818bec84210ac5b6979ce4eeadce6fbbaabc9c7ab23e506d1ce5/cffi-2.1.1-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:194cffa889098ced9976c3fc6340305e43f6303657d298da55366907c05c22d6", size = 218742 }, - { url = "https://files.pythonhosted.org/packages/b0/ae/679bf47e73fd77b352171727f07de559a003f14de5d02b904a6ec1fa73ca/cffi-2.1.1-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:5bb4e7ea95dcd6a014a6fef62e62467d67d8e582326443f3d68e71d6320a9fcf", size = 221054 }, - { url = "https://files.pythonhosted.org/packages/09/b8/eefc0e06913b70aa153bf74c946094a18f58fd4aff11b7f372bfdfdca050/cffi-2.1.1-cp310-cp310-musllinux_1_2_i686.whl", hash = "sha256:3d22a20b1fb1632cc72c22f95f7b0d2961c3e1c235f245ba4c606c4771035659", size = 213489 }, - { url = "https://files.pythonhosted.org/packages/6f/13/4e56852824a03cdf68523a35686f1c28eacd4bd30a7b0a78e682e6e6e1d3/cffi-2.1.1-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:1dea0e4d7d4f11f619fe8c1d76caf49e24405b4b5743c0e3be16a500ecd930c9", size = 220241 }, - { url = "https://files.pythonhosted.org/packages/99/7f/040f9e163e4acac3ee3d85b02d00b2576e7ca980d8785f0a3a5f1a9bf7f5/cffi-2.1.1-cp310-cp310-win32.whl", hash = "sha256:7ce713ace7c0e4520535b42b77eaa742c16dab813978064913e5a3cf82973b41", size = 174578 }, - { url = "https://files.pythonhosted.org/packages/ba/0b/644a2ec1a4eaba49c2939410bb1eb1d25b09d6d0582f5d2f95c537043725/cffi-2.1.1-cp310-cp310-win_amd64.whl", hash = "sha256:a48d62ab9d6f4f98c983223a547af44be6ca3691074c31cecced6facd3ba2dc1", size = 185082 }, + { url = "https://files.pythonhosted.org/packages/b6/d2/2cde336b375f55c76ca670f0be3978cc048e31e24f3b4d7ce8473150a388/cffi-2.1.1-cp310-cp310-macosx_10_15_x86_64.whl", hash = "sha256:baed1e86cc735622097354b9d1281406caf42ff42a886d29faa8e8d1630333be", size = 183779, upload-time = "2026-08-03T21:19:15.602Z" }, + { url = "https://files.pythonhosted.org/packages/94/1a/4b2f7c92293ba05cbd4a9a1b28faaf0326272d9488e6354657571c48a7aa/cffi-2.1.1-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:ca82be1a1d406ecfe1d25dc16cb33488e5a16bf4438c9fb590484ea29d92478b", size = 184178, upload-time = "2026-08-03T21:19:16.67Z" }, + { url = "https://files.pythonhosted.org/packages/17/0b/ba385d8ccedf926c3cd06e8e2f327027da5afe5f0eb30f1f7bc43ac55125/cffi-2.1.1-cp310-cp310-manylinux1_i686.manylinux2014_i686.manylinux_2_17_i686.manylinux_2_5_i686.whl", hash = "sha256:42e2f76b9455f5a9a844f770bf3e200ed3da0e15f5df3db9c31fe80b04b3d004", size = 211037, upload-time = "2026-08-03T21:19:17.705Z" }, + { url = "https://files.pythonhosted.org/packages/a3/b9/0f2e58b2cefa33255bff36935d42b13180fe559bba82596540eb404bde7d/cffi-2.1.1-cp310-cp310-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:5a59cc1c4442bc3d5c703bf720b51138d0bfc173618807c9ee2490a7541dd3d9", size = 218652, upload-time = "2026-08-03T21:19:18.735Z" }, + { url = "https://files.pythonhosted.org/packages/37/15/180e0dab27b9312c7479003d14c9e547634b7dcb934e2cc4650e1b131a7a/cffi-2.1.1-cp310-cp310-manylinux2014_ppc64le.manylinux_2_17_ppc64le.whl", hash = "sha256:9f8d177621de5cb38ee3e731eda45d421db093ec0739f46a5594babda7987a98", size = 205422, upload-time = "2026-08-03T21:19:19.96Z" }, + { url = "https://files.pythonhosted.org/packages/18/d4/03026f0c850cbbaa9030750490225b4a7f4d524ea4df72c3cc740a90f4ef/cffi-2.1.1-cp310-cp310-manylinux2014_s390x.manylinux_2_17_s390x.whl", hash = "sha256:75f80557d1389eddbd0de2681f6a390a0c5338c31ddaa821381c203fc3fd50d9", size = 205444, upload-time = "2026-08-03T21:19:21.246Z" }, + { url = "https://files.pythonhosted.org/packages/75/77/60bebf6f818bec84210ac5b6979ce4eeadce6fbbaabc9c7ab23e506d1ce5/cffi-2.1.1-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:194cffa889098ced9976c3fc6340305e43f6303657d298da55366907c05c22d6", size = 218742, upload-time = "2026-08-03T21:19:22.523Z" }, + { url = "https://files.pythonhosted.org/packages/b0/ae/679bf47e73fd77b352171727f07de559a003f14de5d02b904a6ec1fa73ca/cffi-2.1.1-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:5bb4e7ea95dcd6a014a6fef62e62467d67d8e582326443f3d68e71d6320a9fcf", size = 221054, upload-time = "2026-08-03T21:19:23.694Z" }, + { url = "https://files.pythonhosted.org/packages/09/b8/eefc0e06913b70aa153bf74c946094a18f58fd4aff11b7f372bfdfdca050/cffi-2.1.1-cp310-cp310-musllinux_1_2_i686.whl", hash = "sha256:3d22a20b1fb1632cc72c22f95f7b0d2961c3e1c235f245ba4c606c4771035659", size = 213489, upload-time = "2026-08-03T21:19:24.922Z" }, + { url = "https://files.pythonhosted.org/packages/6f/13/4e56852824a03cdf68523a35686f1c28eacd4bd30a7b0a78e682e6e6e1d3/cffi-2.1.1-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:1dea0e4d7d4f11f619fe8c1d76caf49e24405b4b5743c0e3be16a500ecd930c9", size = 220241, upload-time = "2026-08-03T21:19:26.214Z" }, + { url = "https://files.pythonhosted.org/packages/99/7f/040f9e163e4acac3ee3d85b02d00b2576e7ca980d8785f0a3a5f1a9bf7f5/cffi-2.1.1-cp310-cp310-win32.whl", hash = "sha256:7ce713ace7c0e4520535b42b77eaa742c16dab813978064913e5a3cf82973b41", size = 174578, upload-time = "2026-08-03T21:19:27.338Z" }, + { url = "https://files.pythonhosted.org/packages/ba/0b/644a2ec1a4eaba49c2939410bb1eb1d25b09d6d0582f5d2f95c537043725/cffi-2.1.1-cp310-cp310-win_amd64.whl", hash = "sha256:a48d62ab9d6f4f98c983223a547af44be6ca3691074c31cecced6facd3ba2dc1", size = 185082, upload-time = "2026-08-03T21:19:28.409Z" }, ] [[package]] name = "charset-normalizer" version = "3.5.2" source = { registry = "https://pypi.org/simple" } -sdist = { url = "https://files.pythonhosted.org/packages/33/1c/f41d4e74c28ab327ff3acd36053f7ea506c55872d7a90b0fa71aa3ab0c89/charset_normalizer-3.5.2.tar.gz", hash = "sha256:39de2a259fc954455c57274dc94c79d5842774e1247a016aff30bc0efed0f4ef", size = 172659 } -wheels = [ - { url = "https://files.pythonhosted.org/packages/98/77/46e87bcfc45d25ab4db7cfc9bb544bfa3ffd302289ed31ae93f5433eb899/charset_normalizer-3.5.2-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:195c26fb65950f8fce54e26349852b7bdd7c5f120aeefbcc440b8a20faaed4a3", size = 373348 }, - { url = "https://files.pythonhosted.org/packages/52/fc/e518013affcc43c9f919c3ba41bffe9b4ee4aceb0a6462a6243efcca5f2d/charset_normalizer-3.5.2-cp310-cp310-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:9373ad13ef0d2c0fb761e04e55bfdee5a08b52cef2c882c8fbe9935b1517152e", size = 260860 }, - { url = "https://files.pythonhosted.org/packages/d5/ad/2a895c945ee61988dfd9ccee64f0b78dc09f29c9b34d1dd545246d78e0ad/charset_normalizer-3.5.2-cp310-cp310-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:ddf19c062bea7a0cc80f519243d2c01dd091be0cf952a0750d4ad576709559f5", size = 246491 }, - { url = "https://files.pythonhosted.org/packages/c9/05/5d958bc8ea503e26be25ada5430fd409cfb45dc22ff33f9f96e649613c99/charset_normalizer-3.5.2-cp310-cp310-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:3d14b50de6bf4d0edf857a9386836846f982b8f524e188e2e68b96d702bcf4aa", size = 290875 }, - { url = "https://files.pythonhosted.org/packages/55/e2/06bad57dfdb49cad92c0ba85b6b4fa5827a67df37897287cfef0553843c2/charset_normalizer-3.5.2-cp310-cp310-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:28a15fdad492a99b6eccfaaed66ef3f74050680545ea61ec8b2f4c538f1f1320", size = 286987 }, - { url = "https://files.pythonhosted.org/packages/c4/9f/9f52d2886d52645987d603425482c63c5045a3005db1354a7097e5ed1ae9/charset_normalizer-3.5.2-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:8a893cc101149f80a653f82062ebc95b34525a2614382e1da5458fe7c6997249", size = 271105 }, - { url = "https://files.pythonhosted.org/packages/4a/41/e05e19578b7b87e7db2c3ecb884bd09d065274ab41e1f535542e8bae9b06/charset_normalizer-3.5.2-cp310-cp310-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:619799369eeef6366ed3e8755a5670f4f2f0fb6b30a0fd7264dc0fdc2357058e", size = 269833 }, - { url = "https://files.pythonhosted.org/packages/c2/cd/fc7152414561ff78f9c61a4a627025f65fd244abaefc99ac4e75c6169b33/charset_normalizer-3.5.2-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:447441e76ec720b15e64418d32e092297340387053047c7c694f579efb0ee1d9", size = 263048 }, - { url = "https://files.pythonhosted.org/packages/71/71/fb379e399b1013962716a059d551e03bd80b3e02f05d81246886af6c0958/charset_normalizer-3.5.2-cp310-cp310-musllinux_1_2_armv7l.whl", hash = "sha256:62588a277bfb59def052abd940703fa35107152bf479781a878617d60faf8fb5", size = 249237 }, - { url = "https://files.pythonhosted.org/packages/33/4f/aeadccd6d20882909eb2597ec40eccc05d505e2262f14dc76d7620700657/charset_normalizer-3.5.2-cp310-cp310-musllinux_1_2_ppc64le.whl", hash = "sha256:44bd4fbb29dfbeba60e7d2bd000c59e4b21ddb3cc53912b14048d37092706d7c", size = 290756 }, - { url = "https://files.pythonhosted.org/packages/b9/7b/e8a92613236b257d3b75d532496eb21f68ad8231d7d56df94497e460112e/charset_normalizer-3.5.2-cp310-cp310-musllinux_1_2_riscv64.whl", hash = "sha256:30fcd120b732aa79317f08dee04d7de0847822e4cf7ee0e9f445bb958832252c", size = 269026 }, - { url = "https://files.pythonhosted.org/packages/ff/ac/21d5c6b972285c5f095ff78afdc99f3539e3985dfcf7ff1cfbe9e772f529/charset_normalizer-3.5.2-cp310-cp310-musllinux_1_2_s390x.whl", hash = "sha256:50e3adfb96fc189eb27b1cf62d3b598b89b4bb0420d93a3d3e42e137409011be", size = 287601 }, - { url = "https://files.pythonhosted.org/packages/59/72/263491ec1494a194b16fcbff88a0220f2af633738c79e92b4d7189226322/charset_normalizer-3.5.2-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:b736353c0a625bbd5fcec108576e2385db3496f4f771f785ff32e108d3c3bc45", size = 272660 }, - { url = "https://files.pythonhosted.org/packages/38/7a/81f1186c57e406233969ae96b5fd0c907254ab8b6e47da8ae24cd20fb9d7/charset_normalizer-3.5.2-cp310-cp310-win32.whl", hash = "sha256:f5833ad231be5eb6553de524a70f48d71b2c8563101750531e0b80184e175cd4", size = 187301 }, - { url = "https://files.pythonhosted.org/packages/ae/ab/fb8b5178fdf7bf68efa61cbe892286bc9f73846f26147d4725fb89388475/charset_normalizer-3.5.2-cp310-cp310-win_amd64.whl", hash = "sha256:1461ac396c4fdb983a675f20aa555624f0ee18ac83d832b9244ffff3d8055275", size = 215446 }, - { url = "https://files.pythonhosted.org/packages/36/40/e270b74e0d3f583d78d902960845a149e80eb7c737ee5613ccc6efc7264b/charset_normalizer-3.5.2-cp310-cp310-win_arm64.whl", hash = "sha256:c6708715abcf3c73b99508253e961a9967f02fe536532834149574eda6de0d1c", size = 203389 }, - { url = "https://files.pythonhosted.org/packages/8c/ab/176fbfd5b64939c55d652366aa5b9ef1d767af207a3aa6ebeb0d226c484d/charset_normalizer-3.5.2-cp37-abi3-macosx_10_9_universal2.whl", hash = "sha256:4275811936e2f06feff5e598fb42a1b7ae852da8e39605211892b56b81a34efd", size = 331815 }, - { url = "https://files.pythonhosted.org/packages/7e/84/371eac6b30bdbcbf2d632a1a01809103459216fcaae61b8b8d922c1bfb8a/charset_normalizer-3.5.2-cp37-abi3-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl", hash = "sha256:1c50fe28bbc2ced33386f298650d91218076c05420e6cbd790b913adc41659e7", size = 253276 }, - { url = "https://files.pythonhosted.org/packages/43/6f/c4fbae58febff71709c51bc7e18fdfa55341dc382704740f9f0cbf03817b/charset_normalizer-3.5.2-cp37-abi3-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:d19fbd981a488e22cd04883659ca6b08f50b5974f9fd7c95655ef6a043e5893f", size = 241239 }, - { url = "https://files.pythonhosted.org/packages/61/71/458c3f42164a07d0c5210798e9e704b39e540a6793b05aba67f3a35243a9/charset_normalizer-3.5.2-cp37-abi3-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:0fed1d06615f022ee3b13caf5e8b180cfea32bb2c5aded8a9d44277afc040f93", size = 231121 }, - { url = "https://files.pythonhosted.org/packages/09/54/ab9e89367076f6331bb6c65c4bf14a5361fa5191cb6561bf534f18504e1b/charset_normalizer-3.5.2-cp37-abi3-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:838dcc90063569a0448120554591a1d6c4a4ffe11babf048908793154ab86ade", size = 260350 }, - { url = "https://files.pythonhosted.org/packages/7c/c1/061431ecc688d9d76602502cb57cc01e691e682c18f1beb45f9673b5bbd2/charset_normalizer-3.5.2-cp37-abi3-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:2ce45c6627b22c47e390bc91a41c3d13032192e699fa0bea96e9671b373d69b0", size = 255430 }, - { url = "https://files.pythonhosted.org/packages/8d/1f/20c8949f0676f7ab811abdeb7f4d7f1cbc6e61ff20bef08b44edeb092bc8/charset_normalizer-3.5.2-cp37-abi3-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:0774bf9bf620249fee3e0b8b9fd3065de213be30f3aa94ce2494b3b638949e26", size = 250612 }, - { url = "https://files.pythonhosted.org/packages/2b/9e/46f2fa4c431fc98c4ae76a8cb5bdca54e0341e3cfc3fcfd8e82740250818/charset_normalizer-3.5.2-cp37-abi3-musllinux_1_2_aarch64.whl", hash = "sha256:1db38f4c5496827c1a501846d64d14c3b80c7e6714e406cd7dc36a9899fa1011", size = 242083 }, - { url = "https://files.pythonhosted.org/packages/bd/39/559be29a0c0f086e0bba6922babd38916cc5e0b58ced4de13ee01ea05508/charset_normalizer-3.5.2-cp37-abi3-musllinux_1_2_armv7l.whl", hash = "sha256:304d8e4d493af723536393eee0c689eb7813f4a474c8b479dee63f1fdd98f621", size = 232738 }, - { url = "https://files.pythonhosted.org/packages/ff/6c/387b0e4f756a282831c1d9fc6aeb6c51ca4507ca202767c8de15ce9b12e2/charset_normalizer-3.5.2-cp37-abi3-musllinux_1_2_ppc64le.whl", hash = "sha256:9b7f416ff0978e2f2249330527f0ad6fa02f4932e6199692d3b52da2048c19e4", size = 260703 }, - { url = "https://files.pythonhosted.org/packages/96/92/1fdf015f09ef449f50d3ac4b67c90887c9c318b727daa95cc4f866e6521d/charset_normalizer-3.5.2-cp37-abi3-musllinux_1_2_riscv64.whl", hash = "sha256:01077390b03f7988f11d700a2194e69b119741a86b1a638b1db88891e3eced8e", size = 247622 }, - { url = "https://files.pythonhosted.org/packages/dc/3c/8e7b8a5671ad5d433669fb2a76f1a0164df2d9b1718b0206bc2a16d840cc/charset_normalizer-3.5.2-cp37-abi3-musllinux_1_2_s390x.whl", hash = "sha256:7e841fb9010836c992c9f12fcbd43a831de93a5f726fc1ccd8ca1d0268c5014c", size = 257500 }, - { url = "https://files.pythonhosted.org/packages/b4/f0/45b579df5cabc1d5d53ea1cc35e8437d3ca768c0acccc7041517cb6fbb32/charset_normalizer-3.5.2-cp37-abi3-musllinux_1_2_x86_64.whl", hash = "sha256:9cae88599c7219005d879f98e5ed53341e9a122af585e1091200358a3003d2a0", size = 255100 }, - { url = "https://files.pythonhosted.org/packages/31/68/fdec18a343f5fb3f310588dd478b09ac4799e0b187dbade3a8cd776f03ef/charset_normalizer-3.5.2-cp37-abi3-win32.whl", hash = "sha256:01b0c0d2262a9e28e8484a278c7e1b5d650e3ac8cf2683d2967e25899f208bdf", size = 174499 }, - { url = "https://files.pythonhosted.org/packages/9d/8a/b618149cc5207943a0242068d7a27897f56a62947b5a039085f2a22029f8/charset_normalizer-3.5.2-cp37-abi3-win_amd64.whl", hash = "sha256:9f56f72050826f63dcee7a7f55b0a77168cb3bfc553fd405e7f8f9ece75a4036", size = 200092 }, - { url = "https://files.pythonhosted.org/packages/03/cf/4c66866fa9e2b1c78e3c911516d1de497a677b7ac60f1eceda74ce777ca3/charset_normalizer-3.5.2-cp37-abi3-win_arm64.whl", hash = "sha256:40ab6bffa02ae10a0581e6c198be7d2d8ca5c2a0c64e4ed3465d766df457573e", size = 294363 }, - { url = "https://files.pythonhosted.org/packages/fc/ad/d07d7862a62ffa6d79d68074d14823243dd235a77c45262acbf6adeb28bf/charset_normalizer-3.5.2-py3-none-any.whl", hash = "sha256:b6b751274acb69d77b3323d6b7dbaa3c7fdfc1eb829b7eb61d262f32e1af9685", size = 68872 }, +sdist = { url = "https://files.pythonhosted.org/packages/33/1c/f41d4e74c28ab327ff3acd36053f7ea506c55872d7a90b0fa71aa3ab0c89/charset_normalizer-3.5.2.tar.gz", hash = "sha256:39de2a259fc954455c57274dc94c79d5842774e1247a016aff30bc0efed0f4ef", size = 172659, upload-time = "2026-09-30T04:39:23.398Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/98/77/46e87bcfc45d25ab4db7cfc9bb544bfa3ffd302289ed31ae93f5433eb899/charset_normalizer-3.5.2-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:195c26fb65950f8fce54e26349852b7bdd7c5f120aeefbcc440b8a20faaed4a3", size = 373348, upload-time = "2026-09-30T04:34:42.843Z" }, + { url = "https://files.pythonhosted.org/packages/52/fc/e518013affcc43c9f919c3ba41bffe9b4ee4aceb0a6462a6243efcca5f2d/charset_normalizer-3.5.2-cp310-cp310-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:9373ad13ef0d2c0fb761e04e55bfdee5a08b52cef2c882c8fbe9935b1517152e", size = 260860, upload-time = "2026-09-30T04:34:44.817Z" }, + { url = "https://files.pythonhosted.org/packages/d5/ad/2a895c945ee61988dfd9ccee64f0b78dc09f29c9b34d1dd545246d78e0ad/charset_normalizer-3.5.2-cp310-cp310-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:ddf19c062bea7a0cc80f519243d2c01dd091be0cf952a0750d4ad576709559f5", size = 246491, upload-time = "2026-09-30T04:34:46.227Z" }, + { url = "https://files.pythonhosted.org/packages/c9/05/5d958bc8ea503e26be25ada5430fd409cfb45dc22ff33f9f96e649613c99/charset_normalizer-3.5.2-cp310-cp310-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:3d14b50de6bf4d0edf857a9386836846f982b8f524e188e2e68b96d702bcf4aa", size = 290875, upload-time = "2026-09-30T04:34:47.691Z" }, + { url = "https://files.pythonhosted.org/packages/55/e2/06bad57dfdb49cad92c0ba85b6b4fa5827a67df37897287cfef0553843c2/charset_normalizer-3.5.2-cp310-cp310-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:28a15fdad492a99b6eccfaaed66ef3f74050680545ea61ec8b2f4c538f1f1320", size = 286987, upload-time = "2026-09-30T04:34:49.356Z" }, + { url = "https://files.pythonhosted.org/packages/c4/9f/9f52d2886d52645987d603425482c63c5045a3005db1354a7097e5ed1ae9/charset_normalizer-3.5.2-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:8a893cc101149f80a653f82062ebc95b34525a2614382e1da5458fe7c6997249", size = 271105, upload-time = "2026-09-30T04:34:50.957Z" }, + { url = "https://files.pythonhosted.org/packages/4a/41/e05e19578b7b87e7db2c3ecb884bd09d065274ab41e1f535542e8bae9b06/charset_normalizer-3.5.2-cp310-cp310-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:619799369eeef6366ed3e8755a5670f4f2f0fb6b30a0fd7264dc0fdc2357058e", size = 269833, upload-time = "2026-09-30T04:34:52.623Z" }, + { url = "https://files.pythonhosted.org/packages/c2/cd/fc7152414561ff78f9c61a4a627025f65fd244abaefc99ac4e75c6169b33/charset_normalizer-3.5.2-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:447441e76ec720b15e64418d32e092297340387053047c7c694f579efb0ee1d9", size = 263048, upload-time = "2026-09-30T04:34:54.013Z" }, + { url = "https://files.pythonhosted.org/packages/71/71/fb379e399b1013962716a059d551e03bd80b3e02f05d81246886af6c0958/charset_normalizer-3.5.2-cp310-cp310-musllinux_1_2_armv7l.whl", hash = "sha256:62588a277bfb59def052abd940703fa35107152bf479781a878617d60faf8fb5", size = 249237, upload-time = "2026-09-30T04:34:55.373Z" }, + { url = "https://files.pythonhosted.org/packages/33/4f/aeadccd6d20882909eb2597ec40eccc05d505e2262f14dc76d7620700657/charset_normalizer-3.5.2-cp310-cp310-musllinux_1_2_ppc64le.whl", hash = "sha256:44bd4fbb29dfbeba60e7d2bd000c59e4b21ddb3cc53912b14048d37092706d7c", size = 290756, upload-time = "2026-09-30T04:34:56.867Z" }, + { url = "https://files.pythonhosted.org/packages/b9/7b/e8a92613236b257d3b75d532496eb21f68ad8231d7d56df94497e460112e/charset_normalizer-3.5.2-cp310-cp310-musllinux_1_2_riscv64.whl", hash = "sha256:30fcd120b732aa79317f08dee04d7de0847822e4cf7ee0e9f445bb958832252c", size = 269026, upload-time = "2026-09-30T04:34:58.278Z" }, + { url = "https://files.pythonhosted.org/packages/ff/ac/21d5c6b972285c5f095ff78afdc99f3539e3985dfcf7ff1cfbe9e772f529/charset_normalizer-3.5.2-cp310-cp310-musllinux_1_2_s390x.whl", hash = "sha256:50e3adfb96fc189eb27b1cf62d3b598b89b4bb0420d93a3d3e42e137409011be", size = 287601, upload-time = "2026-09-30T04:34:59.703Z" }, + { url = "https://files.pythonhosted.org/packages/59/72/263491ec1494a194b16fcbff88a0220f2af633738c79e92b4d7189226322/charset_normalizer-3.5.2-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:b736353c0a625bbd5fcec108576e2385db3496f4f771f785ff32e108d3c3bc45", size = 272660, upload-time = "2026-09-30T04:35:01.26Z" }, + { url = "https://files.pythonhosted.org/packages/38/7a/81f1186c57e406233969ae96b5fd0c907254ab8b6e47da8ae24cd20fb9d7/charset_normalizer-3.5.2-cp310-cp310-win32.whl", hash = "sha256:f5833ad231be5eb6553de524a70f48d71b2c8563101750531e0b80184e175cd4", size = 187301, upload-time = "2026-09-30T04:35:02.659Z" }, + { url = "https://files.pythonhosted.org/packages/ae/ab/fb8b5178fdf7bf68efa61cbe892286bc9f73846f26147d4725fb89388475/charset_normalizer-3.5.2-cp310-cp310-win_amd64.whl", hash = "sha256:1461ac396c4fdb983a675f20aa555624f0ee18ac83d832b9244ffff3d8055275", size = 215446, upload-time = "2026-09-30T04:35:04.011Z" }, + { url = "https://files.pythonhosted.org/packages/36/40/e270b74e0d3f583d78d902960845a149e80eb7c737ee5613ccc6efc7264b/charset_normalizer-3.5.2-cp310-cp310-win_arm64.whl", hash = "sha256:c6708715abcf3c73b99508253e961a9967f02fe536532834149574eda6de0d1c", size = 203389, upload-time = "2026-09-30T04:35:05.577Z" }, + { url = "https://files.pythonhosted.org/packages/8c/ab/176fbfd5b64939c55d652366aa5b9ef1d767af207a3aa6ebeb0d226c484d/charset_normalizer-3.5.2-cp37-abi3-macosx_10_9_universal2.whl", hash = "sha256:4275811936e2f06feff5e598fb42a1b7ae852da8e39605211892b56b81a34efd", size = 331815, upload-time = "2026-09-30T04:38:26.216Z" }, + { url = "https://files.pythonhosted.org/packages/7e/84/371eac6b30bdbcbf2d632a1a01809103459216fcaae61b8b8d922c1bfb8a/charset_normalizer-3.5.2-cp37-abi3-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl", hash = "sha256:1c50fe28bbc2ced33386f298650d91218076c05420e6cbd790b913adc41659e7", size = 253276, upload-time = "2026-09-30T04:38:28.032Z" }, + { url = "https://files.pythonhosted.org/packages/43/6f/c4fbae58febff71709c51bc7e18fdfa55341dc382704740f9f0cbf03817b/charset_normalizer-3.5.2-cp37-abi3-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:d19fbd981a488e22cd04883659ca6b08f50b5974f9fd7c95655ef6a043e5893f", size = 241239, upload-time = "2026-09-30T04:38:29.732Z" }, + { url = "https://files.pythonhosted.org/packages/61/71/458c3f42164a07d0c5210798e9e704b39e540a6793b05aba67f3a35243a9/charset_normalizer-3.5.2-cp37-abi3-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:0fed1d06615f022ee3b13caf5e8b180cfea32bb2c5aded8a9d44277afc040f93", size = 231121, upload-time = "2026-09-30T04:38:31.462Z" }, + { url = "https://files.pythonhosted.org/packages/09/54/ab9e89367076f6331bb6c65c4bf14a5361fa5191cb6561bf534f18504e1b/charset_normalizer-3.5.2-cp37-abi3-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:838dcc90063569a0448120554591a1d6c4a4ffe11babf048908793154ab86ade", size = 260350, upload-time = "2026-09-30T04:38:33.239Z" }, + { url = "https://files.pythonhosted.org/packages/7c/c1/061431ecc688d9d76602502cb57cc01e691e682c18f1beb45f9673b5bbd2/charset_normalizer-3.5.2-cp37-abi3-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:2ce45c6627b22c47e390bc91a41c3d13032192e699fa0bea96e9671b373d69b0", size = 255430, upload-time = "2026-09-30T04:38:34.865Z" }, + { url = "https://files.pythonhosted.org/packages/8d/1f/20c8949f0676f7ab811abdeb7f4d7f1cbc6e61ff20bef08b44edeb092bc8/charset_normalizer-3.5.2-cp37-abi3-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:0774bf9bf620249fee3e0b8b9fd3065de213be30f3aa94ce2494b3b638949e26", size = 250612, upload-time = "2026-09-30T04:38:36.649Z" }, + { url = "https://files.pythonhosted.org/packages/2b/9e/46f2fa4c431fc98c4ae76a8cb5bdca54e0341e3cfc3fcfd8e82740250818/charset_normalizer-3.5.2-cp37-abi3-musllinux_1_2_aarch64.whl", hash = "sha256:1db38f4c5496827c1a501846d64d14c3b80c7e6714e406cd7dc36a9899fa1011", size = 242083, upload-time = "2026-09-30T04:38:38.26Z" }, + { url = "https://files.pythonhosted.org/packages/bd/39/559be29a0c0f086e0bba6922babd38916cc5e0b58ced4de13ee01ea05508/charset_normalizer-3.5.2-cp37-abi3-musllinux_1_2_armv7l.whl", hash = "sha256:304d8e4d493af723536393eee0c689eb7813f4a474c8b479dee63f1fdd98f621", size = 232738, upload-time = "2026-09-30T04:38:39.81Z" }, + { url = "https://files.pythonhosted.org/packages/ff/6c/387b0e4f756a282831c1d9fc6aeb6c51ca4507ca202767c8de15ce9b12e2/charset_normalizer-3.5.2-cp37-abi3-musllinux_1_2_ppc64le.whl", hash = "sha256:9b7f416ff0978e2f2249330527f0ad6fa02f4932e6199692d3b52da2048c19e4", size = 260703, upload-time = "2026-09-30T04:38:41.346Z" }, + { url = "https://files.pythonhosted.org/packages/96/92/1fdf015f09ef449f50d3ac4b67c90887c9c318b727daa95cc4f866e6521d/charset_normalizer-3.5.2-cp37-abi3-musllinux_1_2_riscv64.whl", hash = "sha256:01077390b03f7988f11d700a2194e69b119741a86b1a638b1db88891e3eced8e", size = 247622, upload-time = "2026-09-30T04:38:42.937Z" }, + { url = "https://files.pythonhosted.org/packages/dc/3c/8e7b8a5671ad5d433669fb2a76f1a0164df2d9b1718b0206bc2a16d840cc/charset_normalizer-3.5.2-cp37-abi3-musllinux_1_2_s390x.whl", hash = "sha256:7e841fb9010836c992c9f12fcbd43a831de93a5f726fc1ccd8ca1d0268c5014c", size = 257500, upload-time = "2026-09-30T04:38:44.604Z" }, + { url = "https://files.pythonhosted.org/packages/b4/f0/45b579df5cabc1d5d53ea1cc35e8437d3ca768c0acccc7041517cb6fbb32/charset_normalizer-3.5.2-cp37-abi3-musllinux_1_2_x86_64.whl", hash = "sha256:9cae88599c7219005d879f98e5ed53341e9a122af585e1091200358a3003d2a0", size = 255100, upload-time = "2026-09-30T04:38:46.289Z" }, + { url = "https://files.pythonhosted.org/packages/31/68/fdec18a343f5fb3f310588dd478b09ac4799e0b187dbade3a8cd776f03ef/charset_normalizer-3.5.2-cp37-abi3-win32.whl", hash = "sha256:01b0c0d2262a9e28e8484a278c7e1b5d650e3ac8cf2683d2967e25899f208bdf", size = 174499, upload-time = "2026-09-30T04:38:47.999Z" }, + { url = "https://files.pythonhosted.org/packages/9d/8a/b618149cc5207943a0242068d7a27897f56a62947b5a039085f2a22029f8/charset_normalizer-3.5.2-cp37-abi3-win_amd64.whl", hash = "sha256:9f56f72050826f63dcee7a7f55b0a77168cb3bfc553fd405e7f8f9ece75a4036", size = 200092, upload-time = "2026-09-30T04:38:49.707Z" }, + { url = "https://files.pythonhosted.org/packages/03/cf/4c66866fa9e2b1c78e3c911516d1de497a677b7ac60f1eceda74ce777ca3/charset_normalizer-3.5.2-cp37-abi3-win_arm64.whl", hash = "sha256:40ab6bffa02ae10a0581e6c198be7d2d8ca5c2a0c64e4ed3465d766df457573e", size = 294363, upload-time = "2026-09-30T04:38:51.312Z" }, + { url = "https://files.pythonhosted.org/packages/fc/ad/d07d7862a62ffa6d79d68074d14823243dd235a77c45262acbf6adeb28bf/charset_normalizer-3.5.2-py3-none-any.whl", hash = "sha256:b6b751274acb69d77b3323d6b7dbaa3c7fdfc1eb829b7eb61d262f32e1af9685", size = 68872, upload-time = "2026-09-30T04:39:21.828Z" }, ] [[package]] name = "click" version = "8.5.0" source = { registry = "https://pypi.org/simple" } -sdist = { url = "https://files.pythonhosted.org/packages/c7/0e/7fa0ef50764b67090eca4114772a2abf8b6148198475e54c660b97caeee6/click-8.5.0.tar.gz", hash = "sha256:ba0d2089de75ea0310e2dde03160e6ca10009947fb95a182f9b54021bb272e34", size = 382235 } +sdist = { url = "https://files.pythonhosted.org/packages/c7/0e/7fa0ef50764b67090eca4114772a2abf8b6148198475e54c660b97caeee6/click-8.5.0.tar.gz", hash = "sha256:ba0d2089de75ea0310e2dde03160e6ca10009947fb95a182f9b54021bb272e34", size = 382235, upload-time = "2026-08-26T13:33:14.56Z" } wheels = [ - { url = "https://files.pythonhosted.org/packages/58/50/6c0d534c5f134586a8e1ba4e330569e32f057e33372ae556463212fb4cd3/click-8.5.0-py3-none-any.whl", hash = "sha256:255bc9599cf7748b4b1a446ccc735421bd08a2ae529a8b88597d3de5664ee360", size = 125251 }, + { url = "https://files.pythonhosted.org/packages/58/50/6c0d534c5f134586a8e1ba4e330569e32f057e33372ae556463212fb4cd3/click-8.5.0-py3-none-any.whl", hash = "sha256:255bc9599cf7748b4b1a446ccc735421bd08a2ae529a8b88597d3de5664ee360", size = 125251, upload-time = "2026-08-26T13:33:12.928Z" }, ] [[package]] @@ -226,27 +226,27 @@ source = { registry = "https://pypi.org/simple" } dependencies = [ { name = "cffi" }, ] -sdist = { url = "https://files.pythonhosted.org/packages/e4/46/7eea92b6aa2d68af78e049cbecec5f757f1aad44ecdecdc16bbad7eead51/clr_loader-0.3.1.tar.gz", hash = "sha256:2e073e9aaf49d1ae2f56ecba27987ad5fb68be4bcd9dd34a5bed8f0e4e128366", size = 86805 } +sdist = { url = "https://files.pythonhosted.org/packages/e4/46/7eea92b6aa2d68af78e049cbecec5f757f1aad44ecdecdc16bbad7eead51/clr_loader-0.3.1.tar.gz", hash = "sha256:2e073e9aaf49d1ae2f56ecba27987ad5fb68be4bcd9dd34a5bed8f0e4e128366", size = 86805, upload-time = "2026-04-18T17:49:44.287Z" } wheels = [ - { url = "https://files.pythonhosted.org/packages/5e/da/ec1a6e36624000b6df0dd61183c42342ee5814c073315e802cadaad04d2f/clr_loader-0.3.1-py3-none-any.whl", hash = "sha256:cbad189de20d202a7d621956b0fc38049e13c9bf7ca2923441eff725cd121aa1", size = 55730 }, + { url = "https://files.pythonhosted.org/packages/5e/da/ec1a6e36624000b6df0dd61183c42342ee5814c073315e802cadaad04d2f/clr_loader-0.3.1-py3-none-any.whl", hash = "sha256:cbad189de20d202a7d621956b0fc38049e13c9bf7ca2923441eff725cd121aa1", size = 55730, upload-time = "2026-04-18T17:49:42.99Z" }, ] [[package]] name = "colorama" version = "0.4.6" source = { registry = "https://pypi.org/simple" } -sdist = { url = "https://files.pythonhosted.org/packages/d8/53/6f443c9a4a8358a93a6792e2acffb9d9d5cb0a5cfd8802644b7b1c9a02e4/colorama-0.4.6.tar.gz", hash = "sha256:08695f5cb7ed6e0531a20572697297273c47b8cae5a63ffc6d6ed5c201be6e44", size = 27697 } +sdist = { url = "https://files.pythonhosted.org/packages/d8/53/6f443c9a4a8358a93a6792e2acffb9d9d5cb0a5cfd8802644b7b1c9a02e4/colorama-0.4.6.tar.gz", hash = "sha256:08695f5cb7ed6e0531a20572697297273c47b8cae5a63ffc6d6ed5c201be6e44", size = 27697, upload-time = "2022-10-25T02:36:22.414Z" } wheels = [ - { url = "https://files.pythonhosted.org/packages/d1/d6/3965ed04c63042e047cb6a3e6ed1a63a35087b6a609aa3a15ed8ac56c221/colorama-0.4.6-py2.py3-none-any.whl", hash = "sha256:4f1d9991f5acc0ca119f9d443620b77f9d6b33703e51011c16baf57afb285fc6", size = 25335 }, + { url = "https://files.pythonhosted.org/packages/d1/d6/3965ed04c63042e047cb6a3e6ed1a63a35087b6a609aa3a15ed8ac56c221/colorama-0.4.6-py2.py3-none-any.whl", hash = "sha256:4f1d9991f5acc0ca119f9d443620b77f9d6b33703e51011c16baf57afb285fc6", size = 25335, upload-time = "2022-10-25T02:36:20.889Z" }, ] [[package]] name = "comm" version = "0.2.3" source = { registry = "https://pypi.org/simple" } -sdist = { url = "https://files.pythonhosted.org/packages/4c/13/7d740c5849255756bc17888787313b61fd38a0a8304fc4f073dfc46122aa/comm-0.2.3.tar.gz", hash = "sha256:2dc8048c10962d55d7ad693be1e7045d891b7ce8d999c97963a5e3e99c055971", size = 6319 } +sdist = { url = "https://files.pythonhosted.org/packages/4c/13/7d740c5849255756bc17888787313b61fd38a0a8304fc4f073dfc46122aa/comm-0.2.3.tar.gz", hash = "sha256:2dc8048c10962d55d7ad693be1e7045d891b7ce8d999c97963a5e3e99c055971", size = 6319, upload-time = "2025-07-25T14:02:04.452Z" } wheels = [ - { url = "https://files.pythonhosted.org/packages/60/97/891a0971e1e4a8c5d2b20bbe0e524dc04548d2307fee33cdeba148fd4fc7/comm-0.2.3-py3-none-any.whl", hash = "sha256:c615d91d75f7f04f095b30d1c1711babd43bdc6419c1be9886a85f2f4e489417", size = 7294 }, + { url = "https://files.pythonhosted.org/packages/60/97/891a0971e1e4a8c5d2b20bbe0e524dc04548d2307fee33cdeba148fd4fc7/comm-0.2.3-py3-none-any.whl", hash = "sha256:c615d91d75f7f04f095b30d1c1711babd43bdc6419c1be9886a85f2f4e489417", size = 7294, upload-time = "2025-07-25T14:02:02.896Z" }, ] [[package]] @@ -256,44 +256,44 @@ source = { registry = "https://pypi.org/simple" } dependencies = [ { name = "numpy" }, ] -sdist = { url = "https://files.pythonhosted.org/packages/66/54/eb9bfc647b19f2009dd5c7f5ec51c4e6ca831725f1aea7a993034f483147/contourpy-1.3.2.tar.gz", hash = "sha256:b6945942715a034c671b7fc54f9588126b0b8bf23db2696e3ca8328f3ff0ab54", size = 13466130 } +sdist = { url = "https://files.pythonhosted.org/packages/66/54/eb9bfc647b19f2009dd5c7f5ec51c4e6ca831725f1aea7a993034f483147/contourpy-1.3.2.tar.gz", hash = "sha256:b6945942715a034c671b7fc54f9588126b0b8bf23db2696e3ca8328f3ff0ab54", size = 13466130, upload-time = "2025-04-15T17:47:53.79Z" } wheels = [ - { url = "https://files.pythonhosted.org/packages/12/a3/da4153ec8fe25d263aa48c1a4cbde7f49b59af86f0b6f7862788c60da737/contourpy-1.3.2-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:ba38e3f9f330af820c4b27ceb4b9c7feee5fe0493ea53a8720f4792667465934", size = 268551 }, - { url = "https://files.pythonhosted.org/packages/2f/6c/330de89ae1087eb622bfca0177d32a7ece50c3ef07b28002de4757d9d875/contourpy-1.3.2-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:dc41ba0714aa2968d1f8674ec97504a8f7e334f48eeacebcaa6256213acb0989", size = 253399 }, - { url = "https://files.pythonhosted.org/packages/c1/bd/20c6726b1b7f81a8bee5271bed5c165f0a8e1f572578a9d27e2ccb763cb2/contourpy-1.3.2-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:9be002b31c558d1ddf1b9b415b162c603405414bacd6932d031c5b5a8b757f0d", size = 312061 }, - { url = "https://files.pythonhosted.org/packages/22/fc/a9665c88f8a2473f823cf1ec601de9e5375050f1958cbb356cdf06ef1ab6/contourpy-1.3.2-cp310-cp310-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:8d2e74acbcba3bfdb6d9d8384cdc4f9260cae86ed9beee8bd5f54fee49a430b9", size = 351956 }, - { url = "https://files.pythonhosted.org/packages/25/eb/9f0a0238f305ad8fb7ef42481020d6e20cf15e46be99a1fcf939546a177e/contourpy-1.3.2-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:e259bced5549ac64410162adc973c5e2fb77f04df4a439d00b478e57a0e65512", size = 320872 }, - { url = "https://files.pythonhosted.org/packages/32/5c/1ee32d1c7956923202f00cf8d2a14a62ed7517bdc0ee1e55301227fc273c/contourpy-1.3.2-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:ad687a04bc802cbe8b9c399c07162a3c35e227e2daccf1668eb1f278cb698631", size = 325027 }, - { url = "https://files.pythonhosted.org/packages/83/bf/9baed89785ba743ef329c2b07fd0611d12bfecbedbdd3eeecf929d8d3b52/contourpy-1.3.2-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:cdd22595308f53ef2f891040ab2b93d79192513ffccbd7fe19be7aa773a5e09f", size = 1306641 }, - { url = "https://files.pythonhosted.org/packages/d4/cc/74e5e83d1e35de2d28bd97033426b450bc4fd96e092a1f7a63dc7369b55d/contourpy-1.3.2-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:b4f54d6a2defe9f257327b0f243612dd051cc43825587520b1bf74a31e2f6ef2", size = 1374075 }, - { url = "https://files.pythonhosted.org/packages/0c/42/17f3b798fd5e033b46a16f8d9fcb39f1aba051307f5ebf441bad1ecf78f8/contourpy-1.3.2-cp310-cp310-win32.whl", hash = "sha256:f939a054192ddc596e031e50bb13b657ce318cf13d264f095ce9db7dc6ae81c0", size = 177534 }, - { url = "https://files.pythonhosted.org/packages/54/ec/5162b8582f2c994721018d0c9ece9dc6ff769d298a8ac6b6a652c307e7df/contourpy-1.3.2-cp310-cp310-win_amd64.whl", hash = "sha256:c440093bbc8fc21c637c03bafcbef95ccd963bc6e0514ad887932c18ca2a759a", size = 221188 }, - { url = "https://files.pythonhosted.org/packages/33/05/b26e3c6ecc05f349ee0013f0bb850a761016d89cec528a98193a48c34033/contourpy-1.3.2-pp310-pypy310_pp73-macosx_10_15_x86_64.whl", hash = "sha256:fd93cc7f3139b6dd7aab2f26a90dde0aa9fc264dbf70f6740d498a70b860b82c", size = 265681 }, - { url = "https://files.pythonhosted.org/packages/2b/25/ac07d6ad12affa7d1ffed11b77417d0a6308170f44ff20fa1d5aa6333f03/contourpy-1.3.2-pp310-pypy310_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:107ba8a6a7eec58bb475329e6d3b95deba9440667c4d62b9b6063942b61d7f16", size = 315101 }, - { url = "https://files.pythonhosted.org/packages/8f/4d/5bb3192bbe9d3f27e3061a6a8e7733c9120e203cb8515767d30973f71030/contourpy-1.3.2-pp310-pypy310_pp73-win_amd64.whl", hash = "sha256:ded1706ed0c1049224531b81128efbd5084598f18d8a2d9efae833edbd2b40ad", size = 220599 }, + { url = "https://files.pythonhosted.org/packages/12/a3/da4153ec8fe25d263aa48c1a4cbde7f49b59af86f0b6f7862788c60da737/contourpy-1.3.2-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:ba38e3f9f330af820c4b27ceb4b9c7feee5fe0493ea53a8720f4792667465934", size = 268551, upload-time = "2025-04-15T17:34:46.581Z" }, + { url = "https://files.pythonhosted.org/packages/2f/6c/330de89ae1087eb622bfca0177d32a7ece50c3ef07b28002de4757d9d875/contourpy-1.3.2-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:dc41ba0714aa2968d1f8674ec97504a8f7e334f48eeacebcaa6256213acb0989", size = 253399, upload-time = "2025-04-15T17:34:51.427Z" }, + { url = "https://files.pythonhosted.org/packages/c1/bd/20c6726b1b7f81a8bee5271bed5c165f0a8e1f572578a9d27e2ccb763cb2/contourpy-1.3.2-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:9be002b31c558d1ddf1b9b415b162c603405414bacd6932d031c5b5a8b757f0d", size = 312061, upload-time = "2025-04-15T17:34:55.961Z" }, + { url = "https://files.pythonhosted.org/packages/22/fc/a9665c88f8a2473f823cf1ec601de9e5375050f1958cbb356cdf06ef1ab6/contourpy-1.3.2-cp310-cp310-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:8d2e74acbcba3bfdb6d9d8384cdc4f9260cae86ed9beee8bd5f54fee49a430b9", size = 351956, upload-time = "2025-04-15T17:35:00.992Z" }, + { url = "https://files.pythonhosted.org/packages/25/eb/9f0a0238f305ad8fb7ef42481020d6e20cf15e46be99a1fcf939546a177e/contourpy-1.3.2-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:e259bced5549ac64410162adc973c5e2fb77f04df4a439d00b478e57a0e65512", size = 320872, upload-time = "2025-04-15T17:35:06.177Z" }, + { url = "https://files.pythonhosted.org/packages/32/5c/1ee32d1c7956923202f00cf8d2a14a62ed7517bdc0ee1e55301227fc273c/contourpy-1.3.2-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:ad687a04bc802cbe8b9c399c07162a3c35e227e2daccf1668eb1f278cb698631", size = 325027, upload-time = "2025-04-15T17:35:11.244Z" }, + { url = "https://files.pythonhosted.org/packages/83/bf/9baed89785ba743ef329c2b07fd0611d12bfecbedbdd3eeecf929d8d3b52/contourpy-1.3.2-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:cdd22595308f53ef2f891040ab2b93d79192513ffccbd7fe19be7aa773a5e09f", size = 1306641, upload-time = "2025-04-15T17:35:26.701Z" }, + { url = "https://files.pythonhosted.org/packages/d4/cc/74e5e83d1e35de2d28bd97033426b450bc4fd96e092a1f7a63dc7369b55d/contourpy-1.3.2-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:b4f54d6a2defe9f257327b0f243612dd051cc43825587520b1bf74a31e2f6ef2", size = 1374075, upload-time = "2025-04-15T17:35:43.204Z" }, + { url = "https://files.pythonhosted.org/packages/0c/42/17f3b798fd5e033b46a16f8d9fcb39f1aba051307f5ebf441bad1ecf78f8/contourpy-1.3.2-cp310-cp310-win32.whl", hash = "sha256:f939a054192ddc596e031e50bb13b657ce318cf13d264f095ce9db7dc6ae81c0", size = 177534, upload-time = "2025-04-15T17:35:46.554Z" }, + { url = "https://files.pythonhosted.org/packages/54/ec/5162b8582f2c994721018d0c9ece9dc6ff769d298a8ac6b6a652c307e7df/contourpy-1.3.2-cp310-cp310-win_amd64.whl", hash = "sha256:c440093bbc8fc21c637c03bafcbef95ccd963bc6e0514ad887932c18ca2a759a", size = 221188, upload-time = "2025-04-15T17:35:50.064Z" }, + { url = "https://files.pythonhosted.org/packages/33/05/b26e3c6ecc05f349ee0013f0bb850a761016d89cec528a98193a48c34033/contourpy-1.3.2-pp310-pypy310_pp73-macosx_10_15_x86_64.whl", hash = "sha256:fd93cc7f3139b6dd7aab2f26a90dde0aa9fc264dbf70f6740d498a70b860b82c", size = 265681, upload-time = "2025-04-15T17:44:59.314Z" }, + { url = "https://files.pythonhosted.org/packages/2b/25/ac07d6ad12affa7d1ffed11b77417d0a6308170f44ff20fa1d5aa6333f03/contourpy-1.3.2-pp310-pypy310_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:107ba8a6a7eec58bb475329e6d3b95deba9440667c4d62b9b6063942b61d7f16", size = 315101, upload-time = "2025-04-15T17:45:04.165Z" }, + { url = "https://files.pythonhosted.org/packages/8f/4d/5bb3192bbe9d3f27e3061a6a8e7733c9120e203cb8515767d30973f71030/contourpy-1.3.2-pp310-pypy310_pp73-win_amd64.whl", hash = "sha256:ded1706ed0c1049224531b81128efbd5084598f18d8a2d9efae833edbd2b40ad", size = 220599, upload-time = "2025-04-15T17:45:08.456Z" }, ] [[package]] name = "coverage" version = "7.16.2" source = { registry = "https://pypi.org/simple" } -sdist = { url = "https://files.pythonhosted.org/packages/2f/55/d1eaf3e73781174340a00dc1ba2aee8a65f82fadb18e2797b192b6b3925b/coverage-7.16.2.tar.gz", hash = "sha256:ca64d9f1f384f151b9511bec01126072acd2f313439f8ed015a22d8790aab6fa", size = 971999 } -wheels = [ - { url = "https://files.pythonhosted.org/packages/60/72/db17bf5f87568ab524413693385be2eeb03e652ab56c54ea05fa85515675/coverage-7.16.2-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:23219888477edd736b6fcaec1272d47d93b926e999641ffea7e53a1738e70b2b", size = 223670 }, - { url = "https://files.pythonhosted.org/packages/d1/e1/285727a8a74d48de256e8605413ee4cf82301228253ea58e5ab4270138b0/coverage-7.16.2-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:40c0f00899fe6181ae7f434ceb200e51f5ee4b8ed10e3b5f0b605f0cae15da87", size = 224191 }, - { url = "https://files.pythonhosted.org/packages/50/c7/c737b73bac9bf5034f5ff45a4237b7a189d417a4e36751faf5d10c082cbe/coverage-7.16.2-cp310-cp310-manylinux1_i686.manylinux_2_28_i686.manylinux_2_5_i686.whl", hash = "sha256:a4624f80732f6b427ac58f1f59c577a0994a12e8174b5af6a027b4b58795d4c3", size = 250921 }, - { url = "https://files.pythonhosted.org/packages/29/4e/e1d38d27817d91776ca543d01276a67eace3df675a673cac32b12c167d58/coverage-7.16.2-cp310-cp310-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl", hash = "sha256:191803c4996b499fcd78c2ad5e5f767dcc53cb4dc6de6d6a741b443a1821ef02", size = 252751 }, - { url = "https://files.pythonhosted.org/packages/0e/19/14a8e44cbb2ad36ae62aaa03c5eec4a06a7f7df220ea3776af26927acbe2/coverage-7.16.2-cp310-cp310-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:9fd670ac43b709c575aefc25bf52d8a598a3bc5017bddfd0a179152ab06a2deb", size = 254616 }, - { url = "https://files.pythonhosted.org/packages/f9/72/f5bcad0d9a9b450080032344fbff7ec60c1b0e3d38019f7735dee2b69645/coverage-7.16.2-cp310-cp310-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:705e5af11d34647efdc170c7840b6857c81cf74be96419a553f237e68e62cb72", size = 256541 }, - { url = "https://files.pythonhosted.org/packages/ae/9a/8c735234e8abb52bf5d063f98c780fa942e77c4c0225f9fcb9b33effc346/coverage-7.16.2-cp310-cp310-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:8afd9bf35cc6a1f22eb3634808fa8e0b91902459c5721ef2e4461dfe771d7f08", size = 251589 }, - { url = "https://files.pythonhosted.org/packages/35/6a/1bf6d32e55642d6972aa842640e0a8850e612d19ac7d05e2c32fa59dfd34/coverage-7.16.2-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:3f43bac1856ba269b905302778d4df433d6006489a192174ad77ac528e395032", size = 252660 }, - { url = "https://files.pythonhosted.org/packages/53/5b/05b1c0d0e9495cb056155a16066259adc1e935e7411a82a62779bf729975/coverage-7.16.2-cp310-cp310-musllinux_1_2_i686.whl", hash = "sha256:f8475460aa33ee28ac896ab1156d0bb3b6c639f7f8383c2677d3359eb35f8205", size = 250660 }, - { url = "https://files.pythonhosted.org/packages/05/33/5bc3db57fc9c56b4ef055725c38c34faa818a27d17d65e251371f7f0e3a0/coverage-7.16.2-cp310-cp310-musllinux_1_2_ppc64le.whl", hash = "sha256:d6276d78f6fca7d0ac066d5da4165c5acd07829e8305c2cb900b738fb3a75a72", size = 254479 }, - { url = "https://files.pythonhosted.org/packages/f6/0f/4a5de66daef26eb919213f63b84f45d5065ab2df94cd767fc7c1174ac5e2/coverage-7.16.2-cp310-cp310-musllinux_1_2_riscv64.whl", hash = "sha256:736fde09ea39646d11f8e3b76bd3425c075aa4dd45f24891970bb77c14ff20f5", size = 250940 }, - { url = "https://files.pythonhosted.org/packages/57/d3/84cd6a11e707e422194739e9734d947746efa5e5b3358ff2d601f823ee45/coverage-7.16.2-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:c85d54e7e8a2ca932fe8399301af9b8d5907ea2a455ffaff6e7d1208db83b943", size = 251543 }, - { url = "https://files.pythonhosted.org/packages/ab/bc/3d84c2e2a95f38e346ce3730d9f0e53114f4e8aace72e6e51e014afb9992/coverage-7.16.2-cp310-cp310-win32.whl", hash = "sha256:5139009b5efd2194fc168ee9362f0e191ba612ef5d29242f9269c22f9b8f80c7", size = 225732 }, - { url = "https://files.pythonhosted.org/packages/07/86/31f1f3170571a345ab9d8361a7b2f8e0c5698173fbecd1f7149b6e2089ee/coverage-7.16.2-cp310-cp310-win_amd64.whl", hash = "sha256:c3305c38a2fa21a4254f2ace7dd9ef5fc569c9a558b66e7017650b3d637fb95e", size = 226357 }, - { url = "https://files.pythonhosted.org/packages/3f/0c/7a64e1ac90541a8edf50daef0914848011fb057a5bf55284a4811e21939a/coverage-7.16.2-py3-none-any.whl", hash = "sha256:11d28e9123a9156cb405d8d27b44256c9a58fb5decc2073a8f17862057e3aa0f", size = 215754 }, +sdist = { url = "https://files.pythonhosted.org/packages/2f/55/d1eaf3e73781174340a00dc1ba2aee8a65f82fadb18e2797b192b6b3925b/coverage-7.16.2.tar.gz", hash = "sha256:ca64d9f1f384f151b9511bec01126072acd2f313439f8ed015a22d8790aab6fa", size = 971999, upload-time = "2026-09-27T12:29:01.118Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/60/72/db17bf5f87568ab524413693385be2eeb03e652ab56c54ea05fa85515675/coverage-7.16.2-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:23219888477edd736b6fcaec1272d47d93b926e999641ffea7e53a1738e70b2b", size = 223670, upload-time = "2026-09-27T12:25:34.675Z" }, + { url = "https://files.pythonhosted.org/packages/d1/e1/285727a8a74d48de256e8605413ee4cf82301228253ea58e5ab4270138b0/coverage-7.16.2-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:40c0f00899fe6181ae7f434ceb200e51f5ee4b8ed10e3b5f0b605f0cae15da87", size = 224191, upload-time = "2026-09-27T12:25:36.476Z" }, + { url = "https://files.pythonhosted.org/packages/50/c7/c737b73bac9bf5034f5ff45a4237b7a189d417a4e36751faf5d10c082cbe/coverage-7.16.2-cp310-cp310-manylinux1_i686.manylinux_2_28_i686.manylinux_2_5_i686.whl", hash = "sha256:a4624f80732f6b427ac58f1f59c577a0994a12e8174b5af6a027b4b58795d4c3", size = 250921, upload-time = "2026-09-27T12:25:37.857Z" }, + { url = "https://files.pythonhosted.org/packages/29/4e/e1d38d27817d91776ca543d01276a67eace3df675a673cac32b12c167d58/coverage-7.16.2-cp310-cp310-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl", hash = "sha256:191803c4996b499fcd78c2ad5e5f767dcc53cb4dc6de6d6a741b443a1821ef02", size = 252751, upload-time = "2026-09-27T12:25:39.291Z" }, + { url = "https://files.pythonhosted.org/packages/0e/19/14a8e44cbb2ad36ae62aaa03c5eec4a06a7f7df220ea3776af26927acbe2/coverage-7.16.2-cp310-cp310-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:9fd670ac43b709c575aefc25bf52d8a598a3bc5017bddfd0a179152ab06a2deb", size = 254616, upload-time = "2026-09-27T12:25:40.506Z" }, + { url = "https://files.pythonhosted.org/packages/f9/72/f5bcad0d9a9b450080032344fbff7ec60c1b0e3d38019f7735dee2b69645/coverage-7.16.2-cp310-cp310-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:705e5af11d34647efdc170c7840b6857c81cf74be96419a553f237e68e62cb72", size = 256541, upload-time = "2026-09-27T12:25:41.785Z" }, + { url = "https://files.pythonhosted.org/packages/ae/9a/8c735234e8abb52bf5d063f98c780fa942e77c4c0225f9fcb9b33effc346/coverage-7.16.2-cp310-cp310-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:8afd9bf35cc6a1f22eb3634808fa8e0b91902459c5721ef2e4461dfe771d7f08", size = 251589, upload-time = "2026-09-27T12:25:43.269Z" }, + { url = "https://files.pythonhosted.org/packages/35/6a/1bf6d32e55642d6972aa842640e0a8850e612d19ac7d05e2c32fa59dfd34/coverage-7.16.2-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:3f43bac1856ba269b905302778d4df433d6006489a192174ad77ac528e395032", size = 252660, upload-time = "2026-09-27T12:25:45.051Z" }, + { url = "https://files.pythonhosted.org/packages/53/5b/05b1c0d0e9495cb056155a16066259adc1e935e7411a82a62779bf729975/coverage-7.16.2-cp310-cp310-musllinux_1_2_i686.whl", hash = "sha256:f8475460aa33ee28ac896ab1156d0bb3b6c639f7f8383c2677d3359eb35f8205", size = 250660, upload-time = "2026-09-27T12:25:46.51Z" }, + { url = "https://files.pythonhosted.org/packages/05/33/5bc3db57fc9c56b4ef055725c38c34faa818a27d17d65e251371f7f0e3a0/coverage-7.16.2-cp310-cp310-musllinux_1_2_ppc64le.whl", hash = "sha256:d6276d78f6fca7d0ac066d5da4165c5acd07829e8305c2cb900b738fb3a75a72", size = 254479, upload-time = "2026-09-27T12:25:47.819Z" }, + { url = "https://files.pythonhosted.org/packages/f6/0f/4a5de66daef26eb919213f63b84f45d5065ab2df94cd767fc7c1174ac5e2/coverage-7.16.2-cp310-cp310-musllinux_1_2_riscv64.whl", hash = "sha256:736fde09ea39646d11f8e3b76bd3425c075aa4dd45f24891970bb77c14ff20f5", size = 250940, upload-time = "2026-09-27T12:25:49.227Z" }, + { url = "https://files.pythonhosted.org/packages/57/d3/84cd6a11e707e422194739e9734d947746efa5e5b3358ff2d601f823ee45/coverage-7.16.2-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:c85d54e7e8a2ca932fe8399301af9b8d5907ea2a455ffaff6e7d1208db83b943", size = 251543, upload-time = "2026-09-27T12:25:50.554Z" }, + { url = "https://files.pythonhosted.org/packages/ab/bc/3d84c2e2a95f38e346ce3730d9f0e53114f4e8aace72e6e51e014afb9992/coverage-7.16.2-cp310-cp310-win32.whl", hash = "sha256:5139009b5efd2194fc168ee9362f0e191ba612ef5d29242f9269c22f9b8f80c7", size = 225732, upload-time = "2026-09-27T12:25:51.945Z" }, + { url = "https://files.pythonhosted.org/packages/07/86/31f1f3170571a345ab9d8361a7b2f8e0c5698173fbecd1f7149b6e2089ee/coverage-7.16.2-cp310-cp310-win_amd64.whl", hash = "sha256:c3305c38a2fa21a4254f2ace7dd9ef5fc569c9a558b66e7017650b3d637fb95e", size = 226357, upload-time = "2026-09-27T12:25:53.272Z" }, + { url = "https://files.pythonhosted.org/packages/3f/0c/7a64e1ac90541a8edf50daef0914848011fb057a5bf55284a4811e21939a/coverage-7.16.2-py3-none-any.whl", hash = "sha256:11d28e9123a9156cb405d8d27b44256c9a58fb5decc2073a8f17862057e3aa0f", size = 215754, upload-time = "2026-09-27T12:28:59.075Z" }, ] [package.optional-dependencies] @@ -305,49 +305,49 @@ toml = [ name = "cycler" version = "0.12.1" source = { registry = "https://pypi.org/simple" } -sdist = { url = "https://files.pythonhosted.org/packages/a9/95/a3dbbb5028f35eafb79008e7522a75244477d2838f38cbb722248dabc2a8/cycler-0.12.1.tar.gz", hash = "sha256:88bb128f02ba341da8ef447245a9e138fae777f6a23943da4540077d3601eb1c", size = 7615 } +sdist = { url = "https://files.pythonhosted.org/packages/a9/95/a3dbbb5028f35eafb79008e7522a75244477d2838f38cbb722248dabc2a8/cycler-0.12.1.tar.gz", hash = "sha256:88bb128f02ba341da8ef447245a9e138fae777f6a23943da4540077d3601eb1c", size = 7615, upload-time = "2023-10-07T05:32:18.335Z" } wheels = [ - { url = "https://files.pythonhosted.org/packages/e7/05/c19819d5e3d95294a6f5947fb9b9629efb316b96de511b418c53d245aae6/cycler-0.12.1-py3-none-any.whl", hash = "sha256:85cef7cff222d8644161529808465972e51340599459b8ac3ccbac5a854e0d30", size = 8321 }, + { url = "https://files.pythonhosted.org/packages/e7/05/c19819d5e3d95294a6f5947fb9b9629efb316b96de511b418c53d245aae6/cycler-0.12.1-py3-none-any.whl", hash = "sha256:85cef7cff222d8644161529808465972e51340599459b8ac3ccbac5a854e0d30", size = 8321, upload-time = "2023-10-07T05:32:16.783Z" }, ] [[package]] name = "debugpy" version = "1.8.22" source = { registry = "https://pypi.org/simple" } -sdist = { url = "https://files.pythonhosted.org/packages/44/9d/3cb6693342acf96802dba89934a5b8da43c201d764ebd1f2c0514a3d42bd/debugpy-1.8.22.tar.gz", hash = "sha256:e489c7268e1c7b41e13b438d9c533d2a7af73fb59bf8cd30fead8286c1c39c4e", size = 1710877 } +sdist = { url = "https://files.pythonhosted.org/packages/44/9d/3cb6693342acf96802dba89934a5b8da43c201d764ebd1f2c0514a3d42bd/debugpy-1.8.22.tar.gz", hash = "sha256:e489c7268e1c7b41e13b438d9c533d2a7af73fb59bf8cd30fead8286c1c39c4e", size = 1710877, upload-time = "2026-09-15T21:44:02.578Z" } wheels = [ - { url = "https://files.pythonhosted.org/packages/1a/e9/ced401ba1088e1d2b3228dbbcae33e15aa8c08a1368433bedebfa8efcb02/debugpy-1.8.22-cp310-cp310-macosx_15_0_x86_64.whl", hash = "sha256:fa47099176d1d612bef69e9f74658a5687a9f05bd80fb5710f99959bace85735", size = 2128369 }, - { url = "https://files.pythonhosted.org/packages/4f/97/5c8e839a7f73e92cd4a733408bb85bb764e829e52a9fb097f99d6e2cbbc0/debugpy-1.8.22-cp310-cp310-manylinux_2_34_x86_64.whl", hash = "sha256:7bf29e0d8ce80b100d37fb333e1b193b790d962739f3067796c2b03ffdc9afee", size = 3022081 }, - { url = "https://files.pythonhosted.org/packages/11/ed/fbb045d18a8b733a798bb834a03a20cd64f1446206d844b674bb638da6c3/debugpy-1.8.22-cp310-cp310-win32.whl", hash = "sha256:56b877b37ed73f0bf53ba7afc394816ff1eb5d701bae24a24ed9e1ea6f7ce34f", size = 5325298 }, - { url = "https://files.pythonhosted.org/packages/82/7f/633160132b80b424c6816391f239682435c6b77cdd58288d04b3443b9f80/debugpy-1.8.22-cp310-cp310-win_amd64.whl", hash = "sha256:1bd0c6df3c68c0a3f71db8baa3780a953abb65537ec4b3bc6b935ad5b3b3d45c", size = 5353598 }, - { url = "https://files.pythonhosted.org/packages/56/3d/c7dc9f35bc9e22cdb53679f844bee40fd5cff871862f60595869a433400d/debugpy-1.8.22-py2.py3-none-any.whl", hash = "sha256:a9e9d3550e15ca479c59333e90845029190531f0cacfedab3b815a57bd913947", size = 5374857 }, + { url = "https://files.pythonhosted.org/packages/1a/e9/ced401ba1088e1d2b3228dbbcae33e15aa8c08a1368433bedebfa8efcb02/debugpy-1.8.22-cp310-cp310-macosx_15_0_x86_64.whl", hash = "sha256:fa47099176d1d612bef69e9f74658a5687a9f05bd80fb5710f99959bace85735", size = 2128369, upload-time = "2026-09-15T21:44:04.775Z" }, + { url = "https://files.pythonhosted.org/packages/4f/97/5c8e839a7f73e92cd4a733408bb85bb764e829e52a9fb097f99d6e2cbbc0/debugpy-1.8.22-cp310-cp310-manylinux_2_34_x86_64.whl", hash = "sha256:7bf29e0d8ce80b100d37fb333e1b193b790d962739f3067796c2b03ffdc9afee", size = 3022081, upload-time = "2026-09-15T21:44:06.382Z" }, + { url = "https://files.pythonhosted.org/packages/11/ed/fbb045d18a8b733a798bb834a03a20cd64f1446206d844b674bb638da6c3/debugpy-1.8.22-cp310-cp310-win32.whl", hash = "sha256:56b877b37ed73f0bf53ba7afc394816ff1eb5d701bae24a24ed9e1ea6f7ce34f", size = 5325298, upload-time = "2026-09-15T21:44:08.267Z" }, + { url = "https://files.pythonhosted.org/packages/82/7f/633160132b80b424c6816391f239682435c6b77cdd58288d04b3443b9f80/debugpy-1.8.22-cp310-cp310-win_amd64.whl", hash = "sha256:1bd0c6df3c68c0a3f71db8baa3780a953abb65537ec4b3bc6b935ad5b3b3d45c", size = 5353598, upload-time = "2026-09-15T21:44:10.125Z" }, + { url = "https://files.pythonhosted.org/packages/56/3d/c7dc9f35bc9e22cdb53679f844bee40fd5cff871862f60595869a433400d/debugpy-1.8.22-py2.py3-none-any.whl", hash = "sha256:a9e9d3550e15ca479c59333e90845029190531f0cacfedab3b815a57bd913947", size = 5374857, upload-time = "2026-09-15T21:44:54.454Z" }, ] [[package]] name = "decorator" version = "5.3.1" source = { registry = "https://pypi.org/simple" } -sdist = { url = "https://files.pythonhosted.org/packages/60/8b/32f9823da46cde7df2087faa08cd98d01b908f8dcab982cdba9c84e85355/decorator-5.3.1.tar.gz", hash = "sha256:4cbcdd55a6efadb9dbea26b858f4fb3264567b52d69ca0d25b721b553f60ea82", size = 58084 } +sdist = { url = "https://files.pythonhosted.org/packages/60/8b/32f9823da46cde7df2087faa08cd98d01b908f8dcab982cdba9c84e85355/decorator-5.3.1.tar.gz", hash = "sha256:4cbcdd55a6efadb9dbea26b858f4fb3264567b52d69ca0d25b721b553f60ea82", size = 58084, upload-time = "2026-05-18T06:03:28.057Z" } wheels = [ - { url = "https://files.pythonhosted.org/packages/05/7f/798705f5296a58ca505d600456748d1be48078eac8a7050d8a98bc9edb89/decorator-5.3.1-py3-none-any.whl", hash = "sha256:f47fe6fdbd2edd623ecfe36875d37aba411624e2670dd395dddae1358689bb3c", size = 10365 }, + { url = "https://files.pythonhosted.org/packages/05/7f/798705f5296a58ca505d600456748d1be48078eac8a7050d8a98bc9edb89/decorator-5.3.1-py3-none-any.whl", hash = "sha256:f47fe6fdbd2edd623ecfe36875d37aba411624e2670dd395dddae1358689bb3c", size = 10365, upload-time = "2026-05-18T06:03:26.517Z" }, ] [[package]] name = "dill" version = "0.4.1" source = { registry = "https://pypi.org/simple" } -sdist = { url = "https://files.pythonhosted.org/packages/81/e1/56027a71e31b02ddc53c7d65b01e68edf64dea2932122fe7746a516f75d5/dill-0.4.1.tar.gz", hash = "sha256:423092df4182177d4d8ba8290c8a5b640c66ab35ec7da59ccfa00f6fa3eea5fa", size = 187315 } +sdist = { url = "https://files.pythonhosted.org/packages/81/e1/56027a71e31b02ddc53c7d65b01e68edf64dea2932122fe7746a516f75d5/dill-0.4.1.tar.gz", hash = "sha256:423092df4182177d4d8ba8290c8a5b640c66ab35ec7da59ccfa00f6fa3eea5fa", size = 187315, upload-time = "2026-01-19T02:36:56.85Z" } wheels = [ - { url = "https://files.pythonhosted.org/packages/1e/77/dc8c558f7593132cf8fefec57c4f60c83b16941c574ac5f619abb3ae7933/dill-0.4.1-py3-none-any.whl", hash = "sha256:1e1ce33e978ae97fcfcff5638477032b801c46c7c65cf717f95fbc2248f79a9d", size = 120019 }, + { url = "https://files.pythonhosted.org/packages/1e/77/dc8c558f7593132cf8fefec57c4f60c83b16941c574ac5f619abb3ae7933/dill-0.4.1-py3-none-any.whl", hash = "sha256:1e1ce33e978ae97fcfcff5638477032b801c46c7c65cf717f95fbc2248f79a9d", size = 120019, upload-time = "2026-01-19T02:36:55.663Z" }, ] [[package]] name = "docutils" version = "0.21.2" source = { registry = "https://pypi.org/simple" } -sdist = { url = "https://files.pythonhosted.org/packages/ae/ed/aefcc8cd0ba62a0560c3c18c33925362d46c6075480bfa4df87b28e169a9/docutils-0.21.2.tar.gz", hash = "sha256:3a6b18732edf182daa3cd12775bbb338cf5691468f91eeeb109deff6ebfa986f", size = 2204444 } +sdist = { url = "https://files.pythonhosted.org/packages/ae/ed/aefcc8cd0ba62a0560c3c18c33925362d46c6075480bfa4df87b28e169a9/docutils-0.21.2.tar.gz", hash = "sha256:3a6b18732edf182daa3cd12775bbb338cf5691468f91eeeb109deff6ebfa986f", size = 2204444, upload-time = "2024-04-23T18:57:18.24Z" } wheels = [ - { url = "https://files.pythonhosted.org/packages/8f/d7/9322c609343d929e75e7e5e6255e614fcc67572cfd083959cdef3b7aad79/docutils-0.21.2-py3-none-any.whl", hash = "sha256:dafca5b9e384f0e419294eb4d2ff9fa826435bf15f15b7bd45723e8ad76811b2", size = 587408 }, + { url = "https://files.pythonhosted.org/packages/8f/d7/9322c609343d929e75e7e5e6255e614fcc67572cfd083959cdef3b7aad79/docutils-0.21.2-py3-none-any.whl", hash = "sha256:dafca5b9e384f0e419294eb4d2ff9fa826435bf15f15b7bd45723e8ad76811b2", size = 587408, upload-time = "2024-04-23T18:57:14.835Z" }, ] [[package]] @@ -357,27 +357,27 @@ source = { registry = "https://pypi.org/simple" } dependencies = [ { name = "typing-extensions" }, ] -sdist = { url = "https://files.pythonhosted.org/packages/50/79/66800aadf48771f6b62f7eb014e352e5d06856655206165d775e675a02c9/exceptiongroup-1.3.1.tar.gz", hash = "sha256:8b412432c6055b0b7d14c310000ae93352ed6754f70fa8f7c34141f91c4e3219", size = 30371 } +sdist = { url = "https://files.pythonhosted.org/packages/50/79/66800aadf48771f6b62f7eb014e352e5d06856655206165d775e675a02c9/exceptiongroup-1.3.1.tar.gz", hash = "sha256:8b412432c6055b0b7d14c310000ae93352ed6754f70fa8f7c34141f91c4e3219", size = 30371, upload-time = "2025-11-21T23:01:54.787Z" } wheels = [ - { url = "https://files.pythonhosted.org/packages/8a/0e/97c33bf5009bdbac74fd2beace167cab3f978feb69cc36f1ef79360d6c4e/exceptiongroup-1.3.1-py3-none-any.whl", hash = "sha256:a7a39a3bd276781e98394987d3a5701d0c4edffb633bb7a5144577f82c773598", size = 16740 }, + { url = "https://files.pythonhosted.org/packages/8a/0e/97c33bf5009bdbac74fd2beace167cab3f978feb69cc36f1ef79360d6c4e/exceptiongroup-1.3.1-py3-none-any.whl", hash = "sha256:a7a39a3bd276781e98394987d3a5701d0c4edffb633bb7a5144577f82c773598", size = 16740, upload-time = "2025-11-21T23:01:53.443Z" }, ] [[package]] name = "execnet" version = "2.1.2" source = { registry = "https://pypi.org/simple" } -sdist = { url = "https://files.pythonhosted.org/packages/bf/89/780e11f9588d9e7128a3f87788354c7946a9cbb1401ad38a48c4db9a4f07/execnet-2.1.2.tar.gz", hash = "sha256:63d83bfdd9a23e35b9c6a3261412324f964c2ec8dcd8d3c6916ee9373e0befcd", size = 166622 } +sdist = { url = "https://files.pythonhosted.org/packages/bf/89/780e11f9588d9e7128a3f87788354c7946a9cbb1401ad38a48c4db9a4f07/execnet-2.1.2.tar.gz", hash = "sha256:63d83bfdd9a23e35b9c6a3261412324f964c2ec8dcd8d3c6916ee9373e0befcd", size = 166622, upload-time = "2025-11-12T09:56:37.75Z" } wheels = [ - { url = "https://files.pythonhosted.org/packages/ab/84/02fc1827e8cdded4aa65baef11296a9bbe595c474f0d6d758af082d849fd/execnet-2.1.2-py3-none-any.whl", hash = "sha256:67fba928dd5a544b783f6056f449e5e3931a5c378b128bc18501f7ea79e296ec", size = 40708 }, + { url = "https://files.pythonhosted.org/packages/ab/84/02fc1827e8cdded4aa65baef11296a9bbe595c474f0d6d758af082d849fd/execnet-2.1.2-py3-none-any.whl", hash = "sha256:67fba928dd5a544b783f6056f449e5e3931a5c378b128bc18501f7ea79e296ec", size = 40708, upload-time = "2025-11-12T09:56:36.333Z" }, ] [[package]] name = "executing" version = "2.3.0" source = { registry = "https://pypi.org/simple" } -sdist = { url = "https://files.pythonhosted.org/packages/52/92/8a611141e42930c0f194f7504063ab87dfe970cf1a5af28e7703df448734/executing-2.3.0.tar.gz", hash = "sha256:15919cb5d667e5cb4e099511971d00d659573fff2dd5c4e6cd8b71636c7858d2", size = 1338003 } +sdist = { url = "https://files.pythonhosted.org/packages/52/92/8a611141e42930c0f194f7504063ab87dfe970cf1a5af28e7703df448734/executing-2.3.0.tar.gz", hash = "sha256:15919cb5d667e5cb4e099511971d00d659573fff2dd5c4e6cd8b71636c7858d2", size = 1338003, upload-time = "2026-10-10T14:06:04.64Z" } wheels = [ - { url = "https://files.pythonhosted.org/packages/4d/dd/8bc67e7d5ffc1d88aa5af511189dfb76dc4e1e5b808fab186146ef2663e5/executing-2.3.0-py3-none-any.whl", hash = "sha256:736e859c9f8701f11fcf516856f26f562e04776387824b43a35a1dfe21c84122", size = 29393 }, + { url = "https://files.pythonhosted.org/packages/4d/dd/8bc67e7d5ffc1d88aa5af511189dfb76dc4e1e5b808fab186146ef2663e5/executing-2.3.0-py3-none-any.whl", hash = "sha256:736e859c9f8701f11fcf516856f26f562e04776387824b43a35a1dfe21c84122", size = 29393, upload-time = "2026-10-10T14:06:02.777Z" }, ] [[package]] @@ -392,26 +392,26 @@ dependencies = [ { name = "markupsafe" }, { name = "werkzeug" }, ] -sdist = { url = "https://files.pythonhosted.org/packages/26/00/35d85dcce6c57fdc871f3867d465d780f302a175ea360f62533f12b27e2b/flask-3.1.3.tar.gz", hash = "sha256:0ef0e52b8a9cd932855379197dd8f94047b359ca0a78695144304cb45f87c9eb", size = 759004 } +sdist = { url = "https://files.pythonhosted.org/packages/26/00/35d85dcce6c57fdc871f3867d465d780f302a175ea360f62533f12b27e2b/flask-3.1.3.tar.gz", hash = "sha256:0ef0e52b8a9cd932855379197dd8f94047b359ca0a78695144304cb45f87c9eb", size = 759004, upload-time = "2026-02-19T05:00:57.678Z" } wheels = [ - { url = "https://files.pythonhosted.org/packages/7f/9c/34f6962f9b9e9c71f6e5ed806e0d0ff03c9d1b0b2340088a0cf4bce09b18/flask-3.1.3-py3-none-any.whl", hash = "sha256:f4bcbefc124291925f1a26446da31a5178f9483862233b23c0c96a20701f670c", size = 103424 }, + { url = "https://files.pythonhosted.org/packages/7f/9c/34f6962f9b9e9c71f6e5ed806e0d0ff03c9d1b0b2340088a0cf4bce09b18/flask-3.1.3-py3-none-any.whl", hash = "sha256:f4bcbefc124291925f1a26446da31a5178f9483862233b23c0c96a20701f670c", size = 103424, upload-time = "2026-02-19T05:00:56.027Z" }, ] [[package]] name = "fonttools" version = "4.65.0" source = { registry = "https://pypi.org/simple" } -sdist = { url = "https://files.pythonhosted.org/packages/77/51/d63c7e52163ac14393a35bd14bd7c0da95f8f74be5d7cc988092f9965129/fonttools-4.65.0.tar.gz", hash = "sha256:762ba5431358d0dbd4a01982484a1d494fb267e91f974cdcf20b80eab8560f6f", size = 3674467 } +sdist = { url = "https://files.pythonhosted.org/packages/77/51/d63c7e52163ac14393a35bd14bd7c0da95f8f74be5d7cc988092f9965129/fonttools-4.65.0.tar.gz", hash = "sha256:762ba5431358d0dbd4a01982484a1d494fb267e91f974cdcf20b80eab8560f6f", size = 3674467, upload-time = "2026-09-10T15:35:54.955Z" } wheels = [ - { url = "https://files.pythonhosted.org/packages/53/d9/1caaa015dd207da7ccd3feba87289997bd88334ea3e74a367cdc7b0e50a3/fonttools-4.65.0-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:93a73af2075036d36d7fbf856779c56a1b3b86ffcdae6abede7596604c42c156", size = 3095449 }, - { url = "https://files.pythonhosted.org/packages/20/d6/988cd9b33ae2d92b15a51d73eb77c991f7a0fe90a7bc74526e9669247789/fonttools-4.65.0-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:c130be2232e3caf8d2b476854ea78421ec1642917ff5ab695284bac31bbb072b", size = 2587697 }, - { url = "https://files.pythonhosted.org/packages/f8/6a/36f465a1c277131f9569f6a56fe99cf135391b4860b9c4f4b23e5b1cd5df/fonttools-4.65.0-cp310-cp310-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:e3944e0bdba42effb71959e43d91b599326b02b59c78310d5675e8a75525e7d8", size = 5313308 }, - { url = "https://files.pythonhosted.org/packages/ee/56/151b5e81d20c63834f48ad37a0cbbbe2f9b248e38f8d10387f0cf5219244/fonttools-4.65.0-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:fb53892b570f7f1f0055e75fc4de32673e32f749c4c8a606b63d5c436650e634", size = 5253649 }, - { url = "https://files.pythonhosted.org/packages/c8/22/6389215da9d4f98623aacdca9479c1030bbd516cb658e893bc54b61098ce/fonttools-4.65.0-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:a6c8d184e523580a7c55d21cde37176a3c91cb539cf06c2aa36ffc634fd75296", size = 5277745 }, - { url = "https://files.pythonhosted.org/packages/89/e3/c1037a1dfb7c8efe6f2a7d1951ebdde40cbbf82e9c5d796fcb03077e4790/fonttools-4.65.0-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:e5ceccaf2e57d83b753a2b5db5d94aa0a8071886d4afebd2d520c9683e6bef0e", size = 5413259 }, - { url = "https://files.pythonhosted.org/packages/44/b9/7dd72330168d39635c329f23a98279393b1e825e42a6db362e09897aad7b/fonttools-4.65.0-cp310-cp310-win32.whl", hash = "sha256:aff640a4fcb021fa83f9879d5bfa115b6931522dae991a24faa75888bd6aeff6", size = 1577124 }, - { url = "https://files.pythonhosted.org/packages/aa/c2/e959385b4626989b25b82b9f4f99e7c3ac68377d6846b376239b6f126966/fonttools-4.65.0-cp310-cp310-win_amd64.whl", hash = "sha256:5c1700a60e4ff23a0425d5a64abf43d092e6b55071354825781faf255904dcb4", size = 1633354 }, - { url = "https://files.pythonhosted.org/packages/e6/35/f894ceb867118c0261d0f69a9bd516b045a3754238f76c88a49513ac7a83/fonttools-4.65.0-py3-none-any.whl", hash = "sha256:3060b8c1fc2329fa20265b7c138614143ea7c1624e26c5c180c76aeb74deae6f", size = 1196441 }, + { url = "https://files.pythonhosted.org/packages/53/d9/1caaa015dd207da7ccd3feba87289997bd88334ea3e74a367cdc7b0e50a3/fonttools-4.65.0-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:93a73af2075036d36d7fbf856779c56a1b3b86ffcdae6abede7596604c42c156", size = 3095449, upload-time = "2026-09-10T15:33:04.814Z" }, + { url = "https://files.pythonhosted.org/packages/20/d6/988cd9b33ae2d92b15a51d73eb77c991f7a0fe90a7bc74526e9669247789/fonttools-4.65.0-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:c130be2232e3caf8d2b476854ea78421ec1642917ff5ab695284bac31bbb072b", size = 2587697, upload-time = "2026-09-10T15:33:07.653Z" }, + { url = "https://files.pythonhosted.org/packages/f8/6a/36f465a1c277131f9569f6a56fe99cf135391b4860b9c4f4b23e5b1cd5df/fonttools-4.65.0-cp310-cp310-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:e3944e0bdba42effb71959e43d91b599326b02b59c78310d5675e8a75525e7d8", size = 5313308, upload-time = "2026-09-10T15:33:09.975Z" }, + { url = "https://files.pythonhosted.org/packages/ee/56/151b5e81d20c63834f48ad37a0cbbbe2f9b248e38f8d10387f0cf5219244/fonttools-4.65.0-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:fb53892b570f7f1f0055e75fc4de32673e32f749c4c8a606b63d5c436650e634", size = 5253649, upload-time = "2026-09-10T15:33:12.225Z" }, + { url = "https://files.pythonhosted.org/packages/c8/22/6389215da9d4f98623aacdca9479c1030bbd516cb658e893bc54b61098ce/fonttools-4.65.0-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:a6c8d184e523580a7c55d21cde37176a3c91cb539cf06c2aa36ffc634fd75296", size = 5277745, upload-time = "2026-09-10T15:33:14.783Z" }, + { url = "https://files.pythonhosted.org/packages/89/e3/c1037a1dfb7c8efe6f2a7d1951ebdde40cbbf82e9c5d796fcb03077e4790/fonttools-4.65.0-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:e5ceccaf2e57d83b753a2b5db5d94aa0a8071886d4afebd2d520c9683e6bef0e", size = 5413259, upload-time = "2026-09-10T15:33:17.619Z" }, + { url = "https://files.pythonhosted.org/packages/44/b9/7dd72330168d39635c329f23a98279393b1e825e42a6db362e09897aad7b/fonttools-4.65.0-cp310-cp310-win32.whl", hash = "sha256:aff640a4fcb021fa83f9879d5bfa115b6931522dae991a24faa75888bd6aeff6", size = 1577124, upload-time = "2026-09-10T15:33:19.864Z" }, + { url = "https://files.pythonhosted.org/packages/aa/c2/e959385b4626989b25b82b9f4f99e7c3ac68377d6846b376239b6f126966/fonttools-4.65.0-cp310-cp310-win_amd64.whl", hash = "sha256:5c1700a60e4ff23a0425d5a64abf43d092e6b55071354825781faf255904dcb4", size = 1633354, upload-time = "2026-09-10T15:33:21.963Z" }, + { url = "https://files.pythonhosted.org/packages/e6/35/f894ceb867118c0261d0f69a9bd516b045a3754238f76c88a49513ac7a83/fonttools-4.65.0-py3-none-any.whl", hash = "sha256:3060b8c1fc2329fa20265b7c138614143ea7c1624e26c5c180c76aeb74deae6f", size = 1196441, upload-time = "2026-09-10T15:35:52.347Z" }, ] [[package]] @@ -425,36 +425,36 @@ dependencies = [ { name = "sphinx" }, { name = "sphinx-basic-ng" }, ] -sdist = { url = "https://files.pythonhosted.org/packages/ec/20/5f5ad4da6a5a27c80f2ed2ee9aee3f9e36c66e56e21c00fde467b2f8f88f/furo-2025.12.19.tar.gz", hash = "sha256:188d1f942037d8b37cd3985b955839fea62baa1730087dc29d157677c857e2a7", size = 1661473 } +sdist = { url = "https://files.pythonhosted.org/packages/ec/20/5f5ad4da6a5a27c80f2ed2ee9aee3f9e36c66e56e21c00fde467b2f8f88f/furo-2025.12.19.tar.gz", hash = "sha256:188d1f942037d8b37cd3985b955839fea62baa1730087dc29d157677c857e2a7", size = 1661473, upload-time = "2025-12-19T17:34:40.889Z" } wheels = [ - { url = "https://files.pythonhosted.org/packages/f4/b2/50e9b292b5cac13e9e81272c7171301abc753a60460d21505b606e15cf21/furo-2025.12.19-py3-none-any.whl", hash = "sha256:bb0ead5309f9500130665a26bee87693c41ce4dbdff864dbfb6b0dae4673d24f", size = 339262 }, + { url = "https://files.pythonhosted.org/packages/f4/b2/50e9b292b5cac13e9e81272c7171301abc753a60460d21505b606e15cf21/furo-2025.12.19-py3-none-any.whl", hash = "sha256:bb0ead5309f9500130665a26bee87693c41ce4dbdff864dbfb6b0dae4673d24f", size = 339262, upload-time = "2025-12-19T17:34:38.905Z" }, ] [[package]] name = "idna" version = "3.20" source = { registry = "https://pypi.org/simple" } -sdist = { url = "https://files.pythonhosted.org/packages/f5/08/8eea9d4b8302028f3abb2c0813953f7aec26d33b7a8960ed760e65ff29fa/idna-3.20.tar.gz", hash = "sha256:a7db850025b95ded1eae8a46181a1a6c56c92c96f0e2b005d9ff8dc0210cab44", size = 216463 } +sdist = { url = "https://files.pythonhosted.org/packages/f5/08/8eea9d4b8302028f3abb2c0813953f7aec26d33b7a8960ed760e65ff29fa/idna-3.20.tar.gz", hash = "sha256:a7db850025b95ded1eae8a46181a1a6c56c92c96f0e2b005d9ff8dc0210cab44", size = 216463, upload-time = "2026-09-17T14:11:04.752Z" } wheels = [ - { url = "https://files.pythonhosted.org/packages/58/a2/bb081bab032533a855d44de1d56f8e8426114ff1ba5d1f07a438a0a654f8/idna-3.20-py3-none-any.whl", hash = "sha256:ab7ae7122974553370f0bdb919e1a960b2cd1bc1ef0276416d896db81c14582c", size = 69583 }, + { url = "https://files.pythonhosted.org/packages/58/a2/bb081bab032533a855d44de1d56f8e8426114ff1ba5d1f07a438a0a654f8/idna-3.20-py3-none-any.whl", hash = "sha256:ab7ae7122974553370f0bdb919e1a960b2cd1bc1ef0276416d896db81c14582c", size = 69583, upload-time = "2026-09-17T14:11:03.168Z" }, ] [[package]] name = "imagesize" version = "2.0.1" source = { registry = "https://pypi.org/simple" } -sdist = { url = "https://files.pythonhosted.org/packages/fb/5e/513ff06670c84e7b9887c1fdf61b2d42b4f574a831f2f1d2222023049d8a/imagesize-2.0.1.tar.gz", hash = "sha256:b2ba6a4dea487a7ebcd53248d3476aca449d30db12a2dde5e0c5ca9624fd77e5", size = 1883774 } +sdist = { url = "https://files.pythonhosted.org/packages/fb/5e/513ff06670c84e7b9887c1fdf61b2d42b4f574a831f2f1d2222023049d8a/imagesize-2.0.1.tar.gz", hash = "sha256:b2ba6a4dea487a7ebcd53248d3476aca449d30db12a2dde5e0c5ca9624fd77e5", size = 1883774, upload-time = "2026-08-24T12:35:19.13Z" } wheels = [ - { url = "https://files.pythonhosted.org/packages/01/f9/575c8d760eae1fc99651b7cc5efd96ad5379ca4d6b53750b0fb4fe983f34/imagesize-2.0.1-py3-none-any.whl", hash = "sha256:ea0c9a0384df69ed86a943a15cde37d0360b82491b3910dc2215e202e62b5b02", size = 14794 }, + { url = "https://files.pythonhosted.org/packages/01/f9/575c8d760eae1fc99651b7cc5efd96ad5379ca4d6b53750b0fb4fe983f34/imagesize-2.0.1-py3-none-any.whl", hash = "sha256:ea0c9a0384df69ed86a943a15cde37d0360b82491b3910dc2215e202e62b5b02", size = 14794, upload-time = "2026-08-24T12:35:12.548Z" }, ] [[package]] name = "iniconfig" version = "2.3.1" source = { registry = "https://pypi.org/simple" } -sdist = { url = "https://files.pythonhosted.org/packages/01/e1/2069291243c926a2ff1cd706c7f3eeb9b62144bf60f77c9fb9ff2fb26bd3/iniconfig-2.3.1.tar.gz", hash = "sha256:67f4b9c50da0dedf52af349e7749a80a9057a5031199791b906c3bb3ae878960", size = 21209 } +sdist = { url = "https://files.pythonhosted.org/packages/01/e1/2069291243c926a2ff1cd706c7f3eeb9b62144bf60f77c9fb9ff2fb26bd3/iniconfig-2.3.1.tar.gz", hash = "sha256:67f4b9c50da0dedf52af349e7749a80a9057a5031199791b906c3bb3ae878960", size = 21209, upload-time = "2026-10-06T22:48:38.076Z" } wheels = [ - { url = "https://files.pythonhosted.org/packages/56/43/4ca9e49d27a1fcf6bece6f6aec0ea46bb9112489b93d4b688fb415457bdb/iniconfig-2.3.1-py3-none-any.whl", hash = "sha256:9121e2c1fdb355232495be3194c8dfe87ccc2d5dee45947b78e68f499790d7a7", size = 7552 }, + { url = "https://files.pythonhosted.org/packages/56/43/4ca9e49d27a1fcf6bece6f6aec0ea46bb9112489b93d4b688fb415457bdb/iniconfig-2.3.1-py3-none-any.whl", hash = "sha256:9121e2c1fdb355232495be3194c8dfe87ccc2d5dee45947b78e68f499790d7a7", size = 7552, upload-time = "2026-10-06T22:48:36.959Z" }, ] [[package]] @@ -469,9 +469,9 @@ dependencies = [ { name = "tabulate" }, { name = "tomli" }, ] -sdist = { url = "https://files.pythonhosted.org/packages/8b/22/74f7fcc96280eea46cf2bcbfa1354ac31de0e60a4be6f7966f12cef20893/interrogate-1.7.0.tar.gz", hash = "sha256:a320d6ec644dfd887cc58247a345054fc4d9f981100c45184470068f4b3719b0", size = 159636 } +sdist = { url = "https://files.pythonhosted.org/packages/8b/22/74f7fcc96280eea46cf2bcbfa1354ac31de0e60a4be6f7966f12cef20893/interrogate-1.7.0.tar.gz", hash = "sha256:a320d6ec644dfd887cc58247a345054fc4d9f981100c45184470068f4b3719b0", size = 159636, upload-time = "2024-04-07T22:30:46.217Z" } wheels = [ - { url = "https://files.pythonhosted.org/packages/12/c9/6869a1dcf4aaf309b9543ec070be3ec3adebee7c9bec9af8c230494134b9/interrogate-1.7.0-py3-none-any.whl", hash = "sha256:b13ff4dd8403369670e2efe684066de9fcb868ad9d7f2b4095d8112142dc9d12", size = 46982 }, + { url = "https://files.pythonhosted.org/packages/12/c9/6869a1dcf4aaf309b9543ec070be3ec3adebee7c9bec9af8c230494134b9/interrogate-1.7.0-py3-none-any.whl", hash = "sha256:b13ff4dd8403369670e2efe684066de9fcb868ad9d7f2b4095d8112142dc9d12", size = 46982, upload-time = "2024-04-07T22:30:44.277Z" }, ] [[package]] @@ -493,9 +493,9 @@ dependencies = [ { name = "tornado" }, { name = "traitlets" }, ] -sdist = { url = "https://files.pythonhosted.org/packages/3d/c4/e4a38f579de4225a561305666f7541cdabb30075def2aa1ac17bd73c1fb5/ipykernel-7.3.0.tar.gz", hash = "sha256:9acaaaf97d16355166e4085afe9d225bfbdf2b7ef520f9df3be8f2b248275e09", size = 184899 } +sdist = { url = "https://files.pythonhosted.org/packages/3d/c4/e4a38f579de4225a561305666f7541cdabb30075def2aa1ac17bd73c1fb5/ipykernel-7.3.0.tar.gz", hash = "sha256:9acaaaf97d16355166e4085afe9d225bfbdf2b7ef520f9df3be8f2b248275e09", size = 184899, upload-time = "2026-06-10T08:41:25.481Z" } wheels = [ - { url = "https://files.pythonhosted.org/packages/3d/02/77b271f5dc58bfbc0b577c877b2365d1ffea2afe66a80c13f2312820348c/ipykernel-7.3.0-py3-none-any.whl", hash = "sha256:897eb64da762549ef610698fca5e9675195ec6ac8ec7f19d81ce1ca20c876057", size = 120583 }, + { url = "https://files.pythonhosted.org/packages/3d/02/77b271f5dc58bfbc0b577c877b2365d1ffea2afe66a80c13f2312820348c/ipykernel-7.3.0-py3-none-any.whl", hash = "sha256:897eb64da762549ef610698fca5e9675195ec6ac8ec7f19d81ce1ca20c876057", size = 120583, upload-time = "2026-06-10T08:41:23.648Z" }, ] [[package]] @@ -515,9 +515,9 @@ dependencies = [ { name = "traitlets" }, { name = "typing-extensions" }, ] -sdist = { url = "https://files.pythonhosted.org/packages/40/18/f8598d287006885e7136451fdea0755af4ebcbfe342836f24deefaed1164/ipython-8.39.0.tar.gz", hash = "sha256:4110ae96012c379b8b6db898a07e186c40a2a1ef5d57a7fa83166047d9da7624", size = 5513971 } +sdist = { url = "https://files.pythonhosted.org/packages/40/18/f8598d287006885e7136451fdea0755af4ebcbfe342836f24deefaed1164/ipython-8.39.0.tar.gz", hash = "sha256:4110ae96012c379b8b6db898a07e186c40a2a1ef5d57a7fa83166047d9da7624", size = 5513971, upload-time = "2026-03-27T10:02:13.94Z" } wheels = [ - { url = "https://files.pythonhosted.org/packages/c0/56/4cc7fc9e9e3f38fd324f24f8afe0ad8bb5fa41283f37f1aaf9de0612c968/ipython-8.39.0-py3-none-any.whl", hash = "sha256:bb3c51c4fa8148ab1dea07a79584d1c854e234ea44aa1283bcb37bc75054651f", size = 831849 }, + { url = "https://files.pythonhosted.org/packages/c0/56/4cc7fc9e9e3f38fd324f24f8afe0ad8bb5fa41283f37f1aaf9de0612c968/ipython-8.39.0-py3-none-any.whl", hash = "sha256:bb3c51c4fa8148ab1dea07a79584d1c854e234ea44aa1283bcb37bc75054651f", size = 831849, upload-time = "2026-03-27T10:02:07.846Z" }, ] [[package]] @@ -527,22 +527,22 @@ source = { registry = "https://pypi.org/simple" } dependencies = [ { name = "mypy-extensions" }, ] -sdist = { url = "https://files.pythonhosted.org/packages/da/cf/068066b8fdab91cd40bcd63e483137908710a3d25a4d3a01b538be45d9d6/isort-9.0.2.tar.gz", hash = "sha256:d2298980ce44350f11d9d24c8150eaef1883431ec203dddbb4e9b5c3ceb54c70", size = 685196 } +sdist = { url = "https://files.pythonhosted.org/packages/da/cf/068066b8fdab91cd40bcd63e483137908710a3d25a4d3a01b538be45d9d6/isort-9.0.2.tar.gz", hash = "sha256:d2298980ce44350f11d9d24c8150eaef1883431ec203dddbb4e9b5c3ceb54c70", size = 685196, upload-time = "2026-09-28T19:21:58.07Z" } wheels = [ - { url = "https://files.pythonhosted.org/packages/58/16/02099475d03310b0a209ca4928bb0779fb273b97c8924a94a32c38cc1eeb/isort-9.0.2-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:b3e81cae981a52f94d5b31a474e1cbb033ea9cc850bc4c922117c0534a1864dd", size = 1070114 }, - { url = "https://files.pythonhosted.org/packages/f1/36/60423264e176965fc0002bbb0a0a8b4ac21d4ee32dfef9a490767d5a7eb4/isort-9.0.2-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:3cd67d39c3501d7227e8b229476da1d8679c03e0af97bd295876cf7070e5b709", size = 1625659 }, - { url = "https://files.pythonhosted.org/packages/20/75/b008785e61ccd53f6964501ef26a65c17ccc1c5ed9676dec6ebd2662cdb1/isort-9.0.2-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:288a320e6d52ba2d3447345390c8a8400591e4033ffbe4ce6bc3e50e5b4818e1", size = 1611889 }, - { url = "https://files.pythonhosted.org/packages/db/a1/da35cd0cf273d560c844f94e92f2b266e23b416edc8dd6b6db0934543863/isort-9.0.2-cp310-cp310-win_amd64.whl", hash = "sha256:67b12d9504e5bc6359bb3bb4493f36cf1093d15477c61c349f52f7d04209fb5d", size = 872900 }, - { url = "https://files.pythonhosted.org/packages/8b/c9/0849e74b868ef10312eecfc24278710e97dd14bc49c1df629d7df142d318/isort-9.0.2-py3-none-any.whl", hash = "sha256:6c29deeb39698a8717823b7f75b2ac58c5e8ab8dcf6cf31205a72a6617fb454e", size = 105052 }, + { url = "https://files.pythonhosted.org/packages/58/16/02099475d03310b0a209ca4928bb0779fb273b97c8924a94a32c38cc1eeb/isort-9.0.2-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:b3e81cae981a52f94d5b31a474e1cbb033ea9cc850bc4c922117c0534a1864dd", size = 1070114, upload-time = "2026-09-28T19:20:58.339Z" }, + { url = "https://files.pythonhosted.org/packages/f1/36/60423264e176965fc0002bbb0a0a8b4ac21d4ee32dfef9a490767d5a7eb4/isort-9.0.2-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:3cd67d39c3501d7227e8b229476da1d8679c03e0af97bd295876cf7070e5b709", size = 1625659, upload-time = "2026-09-28T19:21:00.076Z" }, + { url = "https://files.pythonhosted.org/packages/20/75/b008785e61ccd53f6964501ef26a65c17ccc1c5ed9676dec6ebd2662cdb1/isort-9.0.2-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:288a320e6d52ba2d3447345390c8a8400591e4033ffbe4ce6bc3e50e5b4818e1", size = 1611889, upload-time = "2026-09-28T19:21:01.732Z" }, + { url = "https://files.pythonhosted.org/packages/db/a1/da35cd0cf273d560c844f94e92f2b266e23b416edc8dd6b6db0934543863/isort-9.0.2-cp310-cp310-win_amd64.whl", hash = "sha256:67b12d9504e5bc6359bb3bb4493f36cf1093d15477c61c349f52f7d04209fb5d", size = 872900, upload-time = "2026-09-28T19:21:03.597Z" }, + { url = "https://files.pythonhosted.org/packages/8b/c9/0849e74b868ef10312eecfc24278710e97dd14bc49c1df629d7df142d318/isort-9.0.2-py3-none-any.whl", hash = "sha256:6c29deeb39698a8717823b7f75b2ac58c5e8ab8dcf6cf31205a72a6617fb454e", size = 105052, upload-time = "2026-09-28T19:21:56.512Z" }, ] [[package]] name = "itsdangerous" version = "2.2.0" source = { registry = "https://pypi.org/simple" } -sdist = { url = "https://files.pythonhosted.org/packages/9c/cb/8ac0172223afbccb63986cc25049b154ecfb5e85932587206f42317be31d/itsdangerous-2.2.0.tar.gz", hash = "sha256:e0050c0b7da1eea53ffaf149c0cfbb5c6e2e2b69c4bef22c81fa6eb73e5f6173", size = 54410 } +sdist = { url = "https://files.pythonhosted.org/packages/9c/cb/8ac0172223afbccb63986cc25049b154ecfb5e85932587206f42317be31d/itsdangerous-2.2.0.tar.gz", hash = "sha256:e0050c0b7da1eea53ffaf149c0cfbb5c6e2e2b69c4bef22c81fa6eb73e5f6173", size = 54410, upload-time = "2024-04-16T21:28:15.614Z" } wheels = [ - { url = "https://files.pythonhosted.org/packages/04/96/92447566d16df59b2a776c0fb82dbc4d9e07cd95062562af01e408583fc4/itsdangerous-2.2.0-py3-none-any.whl", hash = "sha256:c6242fc49e35958c8b15141343aa660db5fc54d4f13a1db01a3f5891b98700ef", size = 16234 }, + { url = "https://files.pythonhosted.org/packages/04/96/92447566d16df59b2a776c0fb82dbc4d9e07cd95062562af01e408583fc4/itsdangerous-2.2.0-py3-none-any.whl", hash = "sha256:c6242fc49e35958c8b15141343aa660db5fc54d4f13a1db01a3f5891b98700ef", size = 16234, upload-time = "2024-04-16T21:28:14.499Z" }, ] [[package]] @@ -552,9 +552,9 @@ source = { registry = "https://pypi.org/simple" } dependencies = [ { name = "parso" }, ] -sdist = { url = "https://files.pythonhosted.org/packages/46/b7/a3635f6a2d7cf5b5dd98064fc1d5fbbafcb25477bcea204a3a92145d158b/jedi-0.20.0.tar.gz", hash = "sha256:c3f4ccbd276696f4b19c54618d4fb18f9fc24b0aef02acf704b23f487daa1011", size = 3119416 } +sdist = { url = "https://files.pythonhosted.org/packages/46/b7/a3635f6a2d7cf5b5dd98064fc1d5fbbafcb25477bcea204a3a92145d158b/jedi-0.20.0.tar.gz", hash = "sha256:c3f4ccbd276696f4b19c54618d4fb18f9fc24b0aef02acf704b23f487daa1011", size = 3119416, upload-time = "2026-05-01T23:38:47.814Z" } wheels = [ - { url = "https://files.pythonhosted.org/packages/9a/93/242e2eab5fe682ffcb8b0084bde703a41d51e17ee0f3a31ff0d9d813620a/jedi-0.20.0-py2.py3-none-any.whl", hash = "sha256:7bdd9c2634f56713299976f4cbd59cb3fa92165cc5e05ea811fb253480728b67", size = 4884812 }, + { url = "https://files.pythonhosted.org/packages/9a/93/242e2eab5fe682ffcb8b0084bde703a41d51e17ee0f3a31ff0d9d813620a/jedi-0.20.0-py2.py3-none-any.whl", hash = "sha256:7bdd9c2634f56713299976f4cbd59cb3fa92165cc5e05ea811fb253480728b67", size = 4884812, upload-time = "2026-05-01T23:38:43.919Z" }, ] [[package]] @@ -564,9 +564,9 @@ source = { registry = "https://pypi.org/simple" } dependencies = [ { name = "markupsafe" }, ] -sdist = { url = "https://files.pythonhosted.org/packages/df/bf/f7da0350254c0ed7c72f3e33cef02e048281fec7ecec5f032d4aac52226b/jinja2-3.1.6.tar.gz", hash = "sha256:0137fb05990d35f1275a587e9aee6d56da821fc83491a0fb838183be43f66d6d", size = 245115 } +sdist = { url = "https://files.pythonhosted.org/packages/df/bf/f7da0350254c0ed7c72f3e33cef02e048281fec7ecec5f032d4aac52226b/jinja2-3.1.6.tar.gz", hash = "sha256:0137fb05990d35f1275a587e9aee6d56da821fc83491a0fb838183be43f66d6d", size = 245115, upload-time = "2025-03-05T20:05:02.478Z" } wheels = [ - { url = "https://files.pythonhosted.org/packages/62/a1/3d680cbfd5f4b8f15abc1d571870c5fc3e594bb582bc3b64ea099db13e56/jinja2-3.1.6-py3-none-any.whl", hash = "sha256:85ece4451f492d0c13c5dd7c13a64681a86afae63a5f347908daf103ce6d2f67", size = 134899 }, + { url = "https://files.pythonhosted.org/packages/62/a1/3d680cbfd5f4b8f15abc1d571870c5fc3e594bb582bc3b64ea099db13e56/jinja2-3.1.6-py3-none-any.whl", hash = "sha256:85ece4451f492d0c13c5dd7c13a64681a86afae63a5f347908daf103ce6d2f67", size = 134899, upload-time = "2025-03-05T20:05:00.369Z" }, ] [[package]] @@ -581,9 +581,9 @@ dependencies = [ { name = "traitlets" }, { name = "typing-extensions" }, ] -sdist = { url = "https://files.pythonhosted.org/packages/c5/2a/906772148a06e48885039e0250c340b770a55bbf37b08d6ee0449df369c3/jupyter_client-8.10.0.tar.gz", hash = "sha256:9f7116294dca55f1785be880057d44544db9b1567718d92cb33c58886afb9497", size = 360653 } +sdist = { url = "https://files.pythonhosted.org/packages/c5/2a/906772148a06e48885039e0250c340b770a55bbf37b08d6ee0449df369c3/jupyter_client-8.10.0.tar.gz", hash = "sha256:9f7116294dca55f1785be880057d44544db9b1567718d92cb33c58886afb9497", size = 360653, upload-time = "2026-08-28T12:17:10.854Z" } wheels = [ - { url = "https://files.pythonhosted.org/packages/0f/88/7c548de1f6c2ade7c931a3282da73f9274fa6a1531091be682f89c85efb9/jupyter_client-8.10.0-py3-none-any.whl", hash = "sha256:5f73f24f22fa25192cfff6b23c051932a2473a797b05734aff495b392103e14e", size = 110184 }, + { url = "https://files.pythonhosted.org/packages/0f/88/7c548de1f6c2ade7c931a3282da73f9274fa6a1531091be682f89c85efb9/jupyter_client-8.10.0-py3-none-any.whl", hash = "sha256:5f73f24f22fa25192cfff6b23c051932a2473a797b05734aff495b392103e14e", size = 110184, upload-time = "2026-08-28T12:17:09.028Z" }, ] [[package]] @@ -594,57 +594,57 @@ dependencies = [ { name = "platformdirs" }, { name = "traitlets" }, ] -sdist = { url = "https://files.pythonhosted.org/packages/02/49/9d1284d0dc65e2c757b74c6687b6d319b02f822ad039e5c512df9194d9dd/jupyter_core-5.9.1.tar.gz", hash = "sha256:4d09aaff303b9566c3ce657f580bd089ff5c91f5f89cf7d8846c3cdf465b5508", size = 89814 } +sdist = { url = "https://files.pythonhosted.org/packages/02/49/9d1284d0dc65e2c757b74c6687b6d319b02f822ad039e5c512df9194d9dd/jupyter_core-5.9.1.tar.gz", hash = "sha256:4d09aaff303b9566c3ce657f580bd089ff5c91f5f89cf7d8846c3cdf465b5508", size = 89814, upload-time = "2025-10-16T19:19:18.444Z" } wheels = [ - { url = "https://files.pythonhosted.org/packages/e7/e7/80988e32bf6f73919a113473a604f5a8f09094de312b9d52b79c2df7612b/jupyter_core-5.9.1-py3-none-any.whl", hash = "sha256:ebf87fdc6073d142e114c72c9e29a9d7ca03fad818c5d300ce2adc1fb0743407", size = 29032 }, + { url = "https://files.pythonhosted.org/packages/e7/e7/80988e32bf6f73919a113473a604f5a8f09094de312b9d52b79c2df7612b/jupyter_core-5.9.1-py3-none-any.whl", hash = "sha256:ebf87fdc6073d142e114c72c9e29a9d7ca03fad818c5d300ce2adc1fb0743407", size = 29032, upload-time = "2025-10-16T19:19:16.783Z" }, ] [[package]] name = "kiwisolver" version = "1.5.1" source = { registry = "https://pypi.org/simple" } -sdist = { url = "https://files.pythonhosted.org/packages/ba/07/bd78e6a8fae171ea041ef5bba3ed21a003522fa088834b069b1909981f30/kiwisolver-1.5.1.tar.gz", hash = "sha256:f1303ef2eec81262a4b708c3e858afe58d7c75ad91c1c05266eda7673369859a", size = 104395 } -wheels = [ - { url = "https://files.pythonhosted.org/packages/23/54/1b8d2bc580414cc75b3a5b3d195981a6facacd8a8d986e589d0a3b51a709/kiwisolver-1.5.1-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:1acc7e5b7ef05e9da8bb70cd6c7c4513090213d2e1ad9720f599f0bf6c52aec5", size = 123362 }, - { url = "https://files.pythonhosted.org/packages/57/19/92c30f540dcfff86ff625389427c39b53a9aaea16420ddcc09b2ab8d1073/kiwisolver-1.5.1-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:bad20d4c69c851c982a1e3606f4c293edfd5a87885786c50082412240c4b1ffd", size = 66551 }, - { url = "https://files.pythonhosted.org/packages/30/ae/30b94088722e7bce8b821cd5ee935a87f80023e7243125f1accf98e39bf7/kiwisolver-1.5.1-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:0a4faea5c6db201c6a21391d2ac926ea97acf7dacdbc3c417189e1adb1a00837", size = 64076 }, - { url = "https://files.pythonhosted.org/packages/f1/0e/9f394d693be549fa3fab62498c2778294595991047adc3dcf10aa99b91c0/kiwisolver-1.5.1-cp310-cp310-manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:e05c2f7925f1d88778e53cb44f14e0223204a3bdd09a41664750363acfb1f2ef", size = 1628782 }, - { url = "https://files.pythonhosted.org/packages/64/96/26efc04348c0f332b6e6c471dff132bb8b18b2df494a1b65826601674e62/kiwisolver-1.5.1-cp310-cp310-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:c3a4e41e3096bf1f0f1b76e2ffd6d828d6547f574f702d59bdbef7acfa59db9c", size = 1228112 }, - { url = "https://files.pythonhosted.org/packages/5a/ac/df9ddc19ec972cd97b60b262dd2c4be28c6192b5a779cad429c6657ee680/kiwisolver-1.5.1-cp310-cp310-manylinux_2_24_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:f1d56ec54d257d05e0b50f5780d967540cd07beeaf9e5f645b26d50cce79f4d8", size = 1246756 }, - { url = "https://files.pythonhosted.org/packages/cf/de/c38a246b8a4f4b293c7291aa650917b05c5549b0d532749bc523296e90c4/kiwisolver-1.5.1-cp310-cp310-manylinux_2_24_s390x.manylinux_2_28_s390x.whl", hash = "sha256:8de6f2a4ce7e7bd27d23dd94abf0ccafe0e0e5cc9c764b0577191f2c25f08f26", size = 1295555 }, - { url = "https://files.pythonhosted.org/packages/b6/48/3c95a5232d8b5783050d8c8089b58bf1f57018f9135232d72c5aa6b0c01b/kiwisolver-1.5.1-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:16895f553ee6620a827d2da56b871f835fb70b9216cca5d188e885caf6e3bd23", size = 2179476 }, - { url = "https://files.pythonhosted.org/packages/e6/e9/b9e999336afc561b154e93682f597832bdc7446f2ee18b467c5b0e924867/kiwisolver-1.5.1-cp310-cp310-musllinux_1_2_ppc64le.whl", hash = "sha256:6b92f60017dda7d877fdc546438b5e28f31c523264f49cf5a48c1d0ce1a0dfbc", size = 2275258 }, - { url = "https://files.pythonhosted.org/packages/76/cd/c1c550796ada4a59644b8264b425fe332686d2a086c4729fcc640ececdfe/kiwisolver-1.5.1-cp310-cp310-musllinux_1_2_s390x.whl", hash = "sha256:7824b5e8bdbf0bccb4ccd37bbb115849a1dc45437fb4de8351385ed07c437ee0", size = 2443424 }, - { url = "https://files.pythonhosted.org/packages/b2/d4/30f641eb8e10f6ad5bb9af8a15ec8eea386162a6ef491e68995b8680ef4e/kiwisolver-1.5.1-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:aa7d00b1700966d2917e54d278aba86897890ca9276dd8b76cf6446b6c181b92", size = 2249457 }, - { url = "https://files.pythonhosted.org/packages/1c/d9/211e016f8aa5b5bf496dd3bd7ebab4b73b22d91f025f25e20156a44a77fc/kiwisolver-1.5.1-cp310-cp310-win_amd64.whl", hash = "sha256:96c30002424670b5e1e46495c2b8cbffef39cf77c1d79e76462029d50339785b", size = 70643 }, - { url = "https://files.pythonhosted.org/packages/9e/8e/ae7007266dea1fd93fcc48541042c1f6583958055de3b424a59ec16def25/kiwisolver-1.5.1-cp310-cp310-win_arm64.whl", hash = "sha256:f0f4a42db92d6ec7677ab9d12830a2a8ec145a9c6d15db2b593466bc875c78d7", size = 68215 }, - { url = "https://files.pythonhosted.org/packages/ba/f1/8bae9fac0f1837679ed59a5dd7e97e7eb943b738defa7cc0117ea0d107dc/kiwisolver-1.5.1-pp310-pypy310_pp73-macosx_10_15_x86_64.whl", hash = "sha256:a5716a33bfabb2c6ce27b6cf03253467b3804f83e215f4d202685cf93c6c9874", size = 59543 }, - { url = "https://files.pythonhosted.org/packages/c3/3e/42e3639d32ef3ac6ede80c39dc1d1df6224927409960d8f762b6cb504efe/kiwisolver-1.5.1-pp310-pypy310_pp73-macosx_11_0_arm64.whl", hash = "sha256:685929988b208a911f1285e2f8ed54210b0d681a3dc0f03e00d599d291986e7e", size = 57504 }, - { url = "https://files.pythonhosted.org/packages/e1/12/f4beaaceb740b96c363a8fa6f34dbdf37a58d9e5f15416427d7bf89c552a/kiwisolver-1.5.1-pp310-pypy310_pp73-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:e4e49f7e1a4e7191bdf9dc67a974db714501b1fc52c24324103d06a86abd5c08", size = 79885 }, - { url = "https://files.pythonhosted.org/packages/02/24/18d8a755acdae79c37ca2f1a925795aab67b9456c30c8569c377ea3abc77/kiwisolver-1.5.1-pp310-pypy310_pp73-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:f0a887b6565bbfe80efde2b7f6e8890d7d9bbdb11bdb17028a3690c32fe0621f", size = 77582 }, - { url = "https://files.pythonhosted.org/packages/df/a9/b86dde4f553ef74db0f9c32398614e24b2e8ec1d29a6ca04ae080d7dd29b/kiwisolver-1.5.1-pp310-pypy310_pp73-win_amd64.whl", hash = "sha256:1983f0974a750a6f6556f368ba11105d1d8369c735b944747c9f12ae5aea7aae", size = 98321 }, +sdist = { url = "https://files.pythonhosted.org/packages/ba/07/bd78e6a8fae171ea041ef5bba3ed21a003522fa088834b069b1909981f30/kiwisolver-1.5.1.tar.gz", hash = "sha256:f1303ef2eec81262a4b708c3e858afe58d7c75ad91c1c05266eda7673369859a", size = 104395, upload-time = "2026-08-28T10:28:27.153Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/23/54/1b8d2bc580414cc75b3a5b3d195981a6facacd8a8d986e589d0a3b51a709/kiwisolver-1.5.1-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:1acc7e5b7ef05e9da8bb70cd6c7c4513090213d2e1ad9720f599f0bf6c52aec5", size = 123362, upload-time = "2026-08-28T10:24:43.402Z" }, + { url = "https://files.pythonhosted.org/packages/57/19/92c30f540dcfff86ff625389427c39b53a9aaea16420ddcc09b2ab8d1073/kiwisolver-1.5.1-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:bad20d4c69c851c982a1e3606f4c293edfd5a87885786c50082412240c4b1ffd", size = 66551, upload-time = "2026-08-28T10:24:44.768Z" }, + { url = "https://files.pythonhosted.org/packages/30/ae/30b94088722e7bce8b821cd5ee935a87f80023e7243125f1accf98e39bf7/kiwisolver-1.5.1-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:0a4faea5c6db201c6a21391d2ac926ea97acf7dacdbc3c417189e1adb1a00837", size = 64076, upload-time = "2026-08-28T10:24:46.184Z" }, + { url = "https://files.pythonhosted.org/packages/f1/0e/9f394d693be549fa3fab62498c2778294595991047adc3dcf10aa99b91c0/kiwisolver-1.5.1-cp310-cp310-manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:e05c2f7925f1d88778e53cb44f14e0223204a3bdd09a41664750363acfb1f2ef", size = 1628782, upload-time = "2026-08-28T10:24:47.91Z" }, + { url = "https://files.pythonhosted.org/packages/64/96/26efc04348c0f332b6e6c471dff132bb8b18b2df494a1b65826601674e62/kiwisolver-1.5.1-cp310-cp310-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:c3a4e41e3096bf1f0f1b76e2ffd6d828d6547f574f702d59bdbef7acfa59db9c", size = 1228112, upload-time = "2026-08-28T10:24:49.503Z" }, + { url = "https://files.pythonhosted.org/packages/5a/ac/df9ddc19ec972cd97b60b262dd2c4be28c6192b5a779cad429c6657ee680/kiwisolver-1.5.1-cp310-cp310-manylinux_2_24_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:f1d56ec54d257d05e0b50f5780d967540cd07beeaf9e5f645b26d50cce79f4d8", size = 1246756, upload-time = "2026-08-28T10:24:51.225Z" }, + { url = "https://files.pythonhosted.org/packages/cf/de/c38a246b8a4f4b293c7291aa650917b05c5549b0d532749bc523296e90c4/kiwisolver-1.5.1-cp310-cp310-manylinux_2_24_s390x.manylinux_2_28_s390x.whl", hash = "sha256:8de6f2a4ce7e7bd27d23dd94abf0ccafe0e0e5cc9c764b0577191f2c25f08f26", size = 1295555, upload-time = "2026-08-28T10:24:52.953Z" }, + { url = "https://files.pythonhosted.org/packages/b6/48/3c95a5232d8b5783050d8c8089b58bf1f57018f9135232d72c5aa6b0c01b/kiwisolver-1.5.1-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:16895f553ee6620a827d2da56b871f835fb70b9216cca5d188e885caf6e3bd23", size = 2179476, upload-time = "2026-08-28T10:24:54.568Z" }, + { url = "https://files.pythonhosted.org/packages/e6/e9/b9e999336afc561b154e93682f597832bdc7446f2ee18b467c5b0e924867/kiwisolver-1.5.1-cp310-cp310-musllinux_1_2_ppc64le.whl", hash = "sha256:6b92f60017dda7d877fdc546438b5e28f31c523264f49cf5a48c1d0ce1a0dfbc", size = 2275258, upload-time = "2026-08-28T10:24:56.186Z" }, + { url = "https://files.pythonhosted.org/packages/76/cd/c1c550796ada4a59644b8264b425fe332686d2a086c4729fcc640ececdfe/kiwisolver-1.5.1-cp310-cp310-musllinux_1_2_s390x.whl", hash = "sha256:7824b5e8bdbf0bccb4ccd37bbb115849a1dc45437fb4de8351385ed07c437ee0", size = 2443424, upload-time = "2026-08-28T10:24:58.093Z" }, + { url = "https://files.pythonhosted.org/packages/b2/d4/30f641eb8e10f6ad5bb9af8a15ec8eea386162a6ef491e68995b8680ef4e/kiwisolver-1.5.1-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:aa7d00b1700966d2917e54d278aba86897890ca9276dd8b76cf6446b6c181b92", size = 2249457, upload-time = "2026-08-28T10:25:00.223Z" }, + { url = "https://files.pythonhosted.org/packages/1c/d9/211e016f8aa5b5bf496dd3bd7ebab4b73b22d91f025f25e20156a44a77fc/kiwisolver-1.5.1-cp310-cp310-win_amd64.whl", hash = "sha256:96c30002424670b5e1e46495c2b8cbffef39cf77c1d79e76462029d50339785b", size = 70643, upload-time = "2026-08-28T10:25:01.888Z" }, + { url = "https://files.pythonhosted.org/packages/9e/8e/ae7007266dea1fd93fcc48541042c1f6583958055de3b424a59ec16def25/kiwisolver-1.5.1-cp310-cp310-win_arm64.whl", hash = "sha256:f0f4a42db92d6ec7677ab9d12830a2a8ec145a9c6d15db2b593466bc875c78d7", size = 68215, upload-time = "2026-08-28T10:25:03.136Z" }, + { url = "https://files.pythonhosted.org/packages/ba/f1/8bae9fac0f1837679ed59a5dd7e97e7eb943b738defa7cc0117ea0d107dc/kiwisolver-1.5.1-pp310-pypy310_pp73-macosx_10_15_x86_64.whl", hash = "sha256:a5716a33bfabb2c6ce27b6cf03253467b3804f83e215f4d202685cf93c6c9874", size = 59543, upload-time = "2026-08-28T10:28:13.794Z" }, + { url = "https://files.pythonhosted.org/packages/c3/3e/42e3639d32ef3ac6ede80c39dc1d1df6224927409960d8f762b6cb504efe/kiwisolver-1.5.1-pp310-pypy310_pp73-macosx_11_0_arm64.whl", hash = "sha256:685929988b208a911f1285e2f8ed54210b0d681a3dc0f03e00d599d291986e7e", size = 57504, upload-time = "2026-08-28T10:28:15.074Z" }, + { url = "https://files.pythonhosted.org/packages/e1/12/f4beaaceb740b96c363a8fa6f34dbdf37a58d9e5f15416427d7bf89c552a/kiwisolver-1.5.1-pp310-pypy310_pp73-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:e4e49f7e1a4e7191bdf9dc67a974db714501b1fc52c24324103d06a86abd5c08", size = 79885, upload-time = "2026-08-28T10:28:16.345Z" }, + { url = "https://files.pythonhosted.org/packages/02/24/18d8a755acdae79c37ca2f1a925795aab67b9456c30c8569c377ea3abc77/kiwisolver-1.5.1-pp310-pypy310_pp73-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:f0a887b6565bbfe80efde2b7f6e8890d7d9bbdb11bdb17028a3690c32fe0621f", size = 77582, upload-time = "2026-08-28T10:28:17.719Z" }, + { url = "https://files.pythonhosted.org/packages/df/a9/b86dde4f553ef74db0f9c32398614e24b2e8ec1d29a6ca04ae080d7dd29b/kiwisolver-1.5.1-pp310-pypy310_pp73-win_amd64.whl", hash = "sha256:1983f0974a750a6f6556f368ba11105d1d8369c735b944747c9f12ae5aea7aae", size = 98321, upload-time = "2026-08-28T10:28:19.087Z" }, ] [[package]] name = "librt" version = "0.16.0" source = { registry = "https://pypi.org/simple" } -sdist = { url = "https://files.pythonhosted.org/packages/04/f5/9dc696772d241814bacac7880bac32f2930b5a6ebc1f85317b83161a011c/librt-0.16.0.tar.gz", hash = "sha256:ac38d6d8d66bf3d744148dbbc0b8e193e195a51e364ed55e224631f5721891fc", size = 219839 } +sdist = { url = "https://files.pythonhosted.org/packages/04/f5/9dc696772d241814bacac7880bac32f2930b5a6ebc1f85317b83161a011c/librt-0.16.0.tar.gz", hash = "sha256:ac38d6d8d66bf3d744148dbbc0b8e193e195a51e364ed55e224631f5721891fc", size = 219839, upload-time = "2026-09-29T00:55:32.891Z" } wheels = [ - { url = "https://files.pythonhosted.org/packages/ec/77/900294b3c9a81415323d81b3f3f271a7f5d7ed9d01e824fc38ffa49470b6/librt-0.16.0-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:96f576f2711f8519152ec76d0e599243555c1f07679fa73606ca8c8c868c0be6", size = 148668 }, - { url = "https://files.pythonhosted.org/packages/55/3b/c301e8cc47758e4518b93e926a0111080155cc79fa03651d202ac2025065/librt-0.16.0-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:2bec3818c7da7c96ceae0ef5915a3d16c52dd08f3ea913bf1fe8568c447c7978", size = 153562 }, - { url = "https://files.pythonhosted.org/packages/62/b1/4d5b98114a58bf17e3832cd33400e40f2582f68c2fb7ce25b4468cb1afd3/librt-0.16.0-cp310-cp310-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:64c79520414a3fdfc6aabd7593e6169afa14d5f8d9908d4b498db068868b08dd", size = 494337 }, - { url = "https://files.pythonhosted.org/packages/88/36/14223c9b0dc38982eb4f399732c8cb27b19c7e027ae0faef5ca51d08d19f/librt-0.16.0-cp310-cp310-manylinux2014_i686.manylinux_2_17_i686.manylinux_2_28_i686.whl", hash = "sha256:f81b5b19ce748ef68d4746656b7929762eb2fe99269b266e4be07e2ee4de7144", size = 485440 }, - { url = "https://files.pythonhosted.org/packages/ec/9e/d7155e6800d0c33e297e529b217649f7361d706491ebf9d2fc0fc627309e/librt-0.16.0-cp310-cp310-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:c71d1b76210a36729fedfc5115069b50a3d8619054745f8758fe5d6f19e86671", size = 498363 }, - { url = "https://files.pythonhosted.org/packages/d3/ce/d5f1fb9f913ac0979d6fc5db9fb9c0bf28cc3470988528957922f15ed40c/librt-0.16.0-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:473eebc7866bb0a0c8849a292b5e7157c1aba5d14d0f0f610c52158d6d964262", size = 515453 }, - { url = "https://files.pythonhosted.org/packages/b4/d4/ca0fca1a27c26080d1a25b2b31f271e532078a5719878c3daca0c3d4c539/librt-0.16.0-cp310-cp310-manylinux_2_34_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:4eb1313a19847089ee81e88742abedf285c60538816640b99742d8534b81d26a", size = 509537 }, - { url = "https://files.pythonhosted.org/packages/ee/c0/26807bf2221a53a2c66f2e23a5c4d57f1c0eaa4afed7cb81d841cf3d1903/librt-0.16.0-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:ebefd60b42e2a82b32d136bb5f7c94eadfcd29f772b547df6f3291d1ed855a1c", size = 532541 }, - { url = "https://files.pythonhosted.org/packages/0e/50/c329d509907e1bc061abeec3796f94d255d43ba25d28c3854d2138ed5ab2/librt-0.16.0-cp310-cp310-musllinux_1_2_i686.whl", hash = "sha256:6c5da27e8056439f927ea896735da60e616c477a8293feaa3233d4e7781a6726", size = 537059 }, - { url = "https://files.pythonhosted.org/packages/84/d6/4571b9c9e65d98e5503734166dce2fd3e216f526dc3c59a3773faa8a60e3/librt-0.16.0-cp310-cp310-musllinux_1_2_ppc64le.whl", hash = "sha256:67e718c7a43f8db325abbbf1404e2d535f12f8f7a1a82259568385cc5274b82a", size = 536614 }, - { url = "https://files.pythonhosted.org/packages/c8/d3/a2ed8a292e4ab7889792a9c3f4ad5d1caf6557afce7f6b452e77f8ed20b7/librt-0.16.0-cp310-cp310-musllinux_1_2_riscv64.whl", hash = "sha256:314e703f0c19320dc8094e7a784b9cf29e1b67402515abf580069a6363c0b4f1", size = 517199 }, - { url = "https://files.pythonhosted.org/packages/9e/24/276e5218b4b7adb6258a42b7403cb1b7cef25616238d0c2152288a9d2f53/librt-0.16.0-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:943c6bbecbdf7fa575a4f2952fcfd848c88ef95507c3fca411e89d4ac3ff8143", size = 558746 }, - { url = "https://files.pythonhosted.org/packages/7c/5c/9156df81a1726e1efc9567379def2b8777a6d56f464d2f1b760bf951b8af/librt-0.16.0-cp310-cp310-win32.whl", hash = "sha256:7cc365f006891afb006b52d5ee5ee74c09306ffa20e2f8705a32a4450af2f3ba", size = 104424 }, - { url = "https://files.pythonhosted.org/packages/0b/62/4fd172cb3f49ab2cf5ef17de519a93cfb935202c1270ba9d44c6a64178c3/librt-0.16.0-cp310-cp310-win_amd64.whl", hash = "sha256:0314058469f4d2fd279ce7c62ac274ac82c3918ef7db62ef0697c4c359370155", size = 124267 }, + { url = "https://files.pythonhosted.org/packages/ec/77/900294b3c9a81415323d81b3f3f271a7f5d7ed9d01e824fc38ffa49470b6/librt-0.16.0-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:96f576f2711f8519152ec76d0e599243555c1f07679fa73606ca8c8c868c0be6", size = 148668, upload-time = "2026-09-29T00:44:20.282Z" }, + { url = "https://files.pythonhosted.org/packages/55/3b/c301e8cc47758e4518b93e926a0111080155cc79fa03651d202ac2025065/librt-0.16.0-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:2bec3818c7da7c96ceae0ef5915a3d16c52dd08f3ea913bf1fe8568c447c7978", size = 153562, upload-time = "2026-09-29T00:44:21.672Z" }, + { url = "https://files.pythonhosted.org/packages/62/b1/4d5b98114a58bf17e3832cd33400e40f2582f68c2fb7ce25b4468cb1afd3/librt-0.16.0-cp310-cp310-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:64c79520414a3fdfc6aabd7593e6169afa14d5f8d9908d4b498db068868b08dd", size = 494337, upload-time = "2026-09-29T00:44:23.096Z" }, + { url = "https://files.pythonhosted.org/packages/88/36/14223c9b0dc38982eb4f399732c8cb27b19c7e027ae0faef5ca51d08d19f/librt-0.16.0-cp310-cp310-manylinux2014_i686.manylinux_2_17_i686.manylinux_2_28_i686.whl", hash = "sha256:f81b5b19ce748ef68d4746656b7929762eb2fe99269b266e4be07e2ee4de7144", size = 485440, upload-time = "2026-09-29T00:44:24.555Z" }, + { url = "https://files.pythonhosted.org/packages/ec/9e/d7155e6800d0c33e297e529b217649f7361d706491ebf9d2fc0fc627309e/librt-0.16.0-cp310-cp310-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:c71d1b76210a36729fedfc5115069b50a3d8619054745f8758fe5d6f19e86671", size = 498363, upload-time = "2026-09-29T00:44:26.03Z" }, + { url = "https://files.pythonhosted.org/packages/d3/ce/d5f1fb9f913ac0979d6fc5db9fb9c0bf28cc3470988528957922f15ed40c/librt-0.16.0-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:473eebc7866bb0a0c8849a292b5e7157c1aba5d14d0f0f610c52158d6d964262", size = 515453, upload-time = "2026-09-29T00:44:27.566Z" }, + { url = "https://files.pythonhosted.org/packages/b4/d4/ca0fca1a27c26080d1a25b2b31f271e532078a5719878c3daca0c3d4c539/librt-0.16.0-cp310-cp310-manylinux_2_34_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:4eb1313a19847089ee81e88742abedf285c60538816640b99742d8534b81d26a", size = 509537, upload-time = "2026-09-29T00:44:29.14Z" }, + { url = "https://files.pythonhosted.org/packages/ee/c0/26807bf2221a53a2c66f2e23a5c4d57f1c0eaa4afed7cb81d841cf3d1903/librt-0.16.0-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:ebefd60b42e2a82b32d136bb5f7c94eadfcd29f772b547df6f3291d1ed855a1c", size = 532541, upload-time = "2026-09-29T00:44:30.745Z" }, + { url = "https://files.pythonhosted.org/packages/0e/50/c329d509907e1bc061abeec3796f94d255d43ba25d28c3854d2138ed5ab2/librt-0.16.0-cp310-cp310-musllinux_1_2_i686.whl", hash = "sha256:6c5da27e8056439f927ea896735da60e616c477a8293feaa3233d4e7781a6726", size = 537059, upload-time = "2026-09-29T00:44:32.102Z" }, + { url = "https://files.pythonhosted.org/packages/84/d6/4571b9c9e65d98e5503734166dce2fd3e216f526dc3c59a3773faa8a60e3/librt-0.16.0-cp310-cp310-musllinux_1_2_ppc64le.whl", hash = "sha256:67e718c7a43f8db325abbbf1404e2d535f12f8f7a1a82259568385cc5274b82a", size = 536614, upload-time = "2026-09-29T00:44:33.653Z" }, + { url = "https://files.pythonhosted.org/packages/c8/d3/a2ed8a292e4ab7889792a9c3f4ad5d1caf6557afce7f6b452e77f8ed20b7/librt-0.16.0-cp310-cp310-musllinux_1_2_riscv64.whl", hash = "sha256:314e703f0c19320dc8094e7a784b9cf29e1b67402515abf580069a6363c0b4f1", size = 517199, upload-time = "2026-09-29T00:44:35.115Z" }, + { url = "https://files.pythonhosted.org/packages/9e/24/276e5218b4b7adb6258a42b7403cb1b7cef25616238d0c2152288a9d2f53/librt-0.16.0-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:943c6bbecbdf7fa575a4f2952fcfd848c88ef95507c3fca411e89d4ac3ff8143", size = 558746, upload-time = "2026-09-29T00:44:36.656Z" }, + { url = "https://files.pythonhosted.org/packages/7c/5c/9156df81a1726e1efc9567379def2b8777a6d56f464d2f1b760bf951b8af/librt-0.16.0-cp310-cp310-win32.whl", hash = "sha256:7cc365f006891afb006b52d5ee5ee74c09306ffa20e2f8705a32a4450af2f3ba", size = 104424, upload-time = "2026-09-29T00:44:38.123Z" }, + { url = "https://files.pythonhosted.org/packages/0b/62/4fd172cb3f49ab2cf5ef17de519a93cfb935202c1270ba9d44c6a64178c3/librt-0.16.0-cp310-cp310-win_amd64.whl", hash = "sha256:0314058469f4d2fd279ce7c62ac274ac82c3918ef7db62ef0697c4c359370155", size = 124267, upload-time = "2026-09-29T00:44:39.455Z" }, ] [[package]] @@ -655,39 +655,39 @@ dependencies = [ { name = "tomli" }, { name = "typing-extensions" }, ] -sdist = { url = "https://files.pythonhosted.org/packages/03/b6/6d18ad201417a9c5168995541d0fd7981b5652b2b34f6e46a3a93c0f1beb/line_profiler-5.0.2.tar.gz", hash = "sha256:8d8a990c84c64bcde45af22af502d17bc0ae107be405ce41bba92af5c39c0000", size = 407075 } +sdist = { url = "https://files.pythonhosted.org/packages/03/b6/6d18ad201417a9c5168995541d0fd7981b5652b2b34f6e46a3a93c0f1beb/line_profiler-5.0.2.tar.gz", hash = "sha256:8d8a990c84c64bcde45af22af502d17bc0ae107be405ce41bba92af5c39c0000", size = 407075, upload-time = "2026-02-23T23:31:20.698Z" } wheels = [ - { url = "https://files.pythonhosted.org/packages/22/9c/d2ba5e1f7da98e3dff9c333dd914c284cd733827987e7ed6a039c7fc008c/line_profiler-5.0.2-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:1ab5d8de6d3c0381b477cc73dde9c36b6c52ba1928d6daba85ac9e790a3f0086", size = 651703 }, - { url = "https://files.pythonhosted.org/packages/1b/20/9f99d89ff0ad56e5e6190262ce16a8b2dad1f23b9dc0bc4da608fd42c16f/line_profiler-5.0.2-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:b45da5408286b5395ccb707d1cb2b5aeeb8828466cd2f62e8ab2d7cfb0e1b38c", size = 508846 }, - { url = "https://files.pythonhosted.org/packages/5a/44/04d4f21dd1ffca9911402a8cc0ded6f9d89dfd5d3f2a0498704502e5b9af/line_profiler-5.0.2-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:f6163a43474584db9da495d00869d51a66fdef3962ec3df76f998b1a89308123", size = 497428 }, - { url = "https://files.pythonhosted.org/packages/bd/61/7e4658db06e3e3c41713bc600fc26e22607b08969d6044dd640ca26613b1/line_profiler-5.0.2-cp310-cp310-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:a7759e9e4688ed1be1e674dee599500ba47f2f2c76f903184df615352bc182a8", size = 1486964 }, - { url = "https://files.pythonhosted.org/packages/03/2e/5507cf3190052906ba9fe77477cf655d446a9c517a41c290050e05cd1fec/line_profiler-5.0.2-cp310-cp310-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:e0f8b3b766bde49ca8c1e26b5ff9013358435106d11bc4838764e117d2bcd3ed", size = 1499663 }, - { url = "https://files.pythonhosted.org/packages/c0/d9/cb19fb7b899f30d2261bb792d8f9d1e0b6ba5b4f3fc94b45136fd412562a/line_profiler-5.0.2-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:42d4bef2ce9f2e2cc6b872034ef4bf2e18ec44f3a8a09bdf91232a74abe4074c", size = 2442445 }, - { url = "https://files.pythonhosted.org/packages/83/5d/9b1d142f41ae23b6da22954ec42c367491bcad356c3507f291c101522e88/line_profiler-5.0.2-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:7dd5942d091541803b38ebc4c9d7f375d43b93e41e811f2449a022fd5b24d283", size = 2525207 }, - { url = "https://files.pythonhosted.org/packages/68/a8/d9ac8429b74b1e30e22e2d51bc5d534864dd276ba856ea8ca32fca1f1198/line_profiler-5.0.2-cp310-cp310-win_amd64.whl", hash = "sha256:c22d1d8ee371e92149b5d9578e78072bcb36435adb62e84bf3bb0c173e14c6f6", size = 479862 }, + { url = "https://files.pythonhosted.org/packages/22/9c/d2ba5e1f7da98e3dff9c333dd914c284cd733827987e7ed6a039c7fc008c/line_profiler-5.0.2-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:1ab5d8de6d3c0381b477cc73dde9c36b6c52ba1928d6daba85ac9e790a3f0086", size = 651703, upload-time = "2026-02-23T23:29:45.092Z" }, + { url = "https://files.pythonhosted.org/packages/1b/20/9f99d89ff0ad56e5e6190262ce16a8b2dad1f23b9dc0bc4da608fd42c16f/line_profiler-5.0.2-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:b45da5408286b5395ccb707d1cb2b5aeeb8828466cd2f62e8ab2d7cfb0e1b38c", size = 508846, upload-time = "2026-02-23T23:29:47.341Z" }, + { url = "https://files.pythonhosted.org/packages/5a/44/04d4f21dd1ffca9911402a8cc0ded6f9d89dfd5d3f2a0498704502e5b9af/line_profiler-5.0.2-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:f6163a43474584db9da495d00869d51a66fdef3962ec3df76f998b1a89308123", size = 497428, upload-time = "2026-02-23T23:29:49.008Z" }, + { url = "https://files.pythonhosted.org/packages/bd/61/7e4658db06e3e3c41713bc600fc26e22607b08969d6044dd640ca26613b1/line_profiler-5.0.2-cp310-cp310-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:a7759e9e4688ed1be1e674dee599500ba47f2f2c76f903184df615352bc182a8", size = 1486964, upload-time = "2026-02-23T23:29:50.849Z" }, + { url = "https://files.pythonhosted.org/packages/03/2e/5507cf3190052906ba9fe77477cf655d446a9c517a41c290050e05cd1fec/line_profiler-5.0.2-cp310-cp310-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:e0f8b3b766bde49ca8c1e26b5ff9013358435106d11bc4838764e117d2bcd3ed", size = 1499663, upload-time = "2026-02-23T23:29:53.578Z" }, + { url = "https://files.pythonhosted.org/packages/c0/d9/cb19fb7b899f30d2261bb792d8f9d1e0b6ba5b4f3fc94b45136fd412562a/line_profiler-5.0.2-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:42d4bef2ce9f2e2cc6b872034ef4bf2e18ec44f3a8a09bdf91232a74abe4074c", size = 2442445, upload-time = "2026-02-23T23:29:55.952Z" }, + { url = "https://files.pythonhosted.org/packages/83/5d/9b1d142f41ae23b6da22954ec42c367491bcad356c3507f291c101522e88/line_profiler-5.0.2-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:7dd5942d091541803b38ebc4c9d7f375d43b93e41e811f2449a022fd5b24d283", size = 2525207, upload-time = "2026-02-23T23:29:57.671Z" }, + { url = "https://files.pythonhosted.org/packages/68/a8/d9ac8429b74b1e30e22e2d51bc5d534864dd276ba856ea8ca32fca1f1198/line_profiler-5.0.2-cp310-cp310-win_amd64.whl", hash = "sha256:c22d1d8ee371e92149b5d9578e78072bcb36435adb62e84bf3bb0c173e14c6f6", size = 479862, upload-time = "2026-02-23T23:29:59.178Z" }, ] [[package]] name = "markupsafe" version = "3.0.4" source = { registry = "https://pypi.org/simple" } -sdist = { url = "https://files.pythonhosted.org/packages/38/9b/e422a865e1d5d57d0e509b4e0bf1c1a70a7f6382c29a5aa428df994c8bc8/markupsafe-3.0.4.tar.gz", hash = "sha256:2e9ad7dd851bf45fab9f75cbff4cb493fee9979e8d8c7c9c3ee119022518edd6", size = 153777 } +sdist = { url = "https://files.pythonhosted.org/packages/38/9b/e422a865e1d5d57d0e509b4e0bf1c1a70a7f6382c29a5aa428df994c8bc8/markupsafe-3.0.4.tar.gz", hash = "sha256:2e9ad7dd851bf45fab9f75cbff4cb493fee9979e8d8c7c9c3ee119022518edd6", size = 153777, upload-time = "2026-10-02T23:07:22.29Z" } wheels = [ - { url = "https://files.pythonhosted.org/packages/41/aa/9a65962e364bf19745f6bec7bde398fb1f5ca53ad2e734258e6198cc32ba/markupsafe-3.0.4-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:dd8ea6ebee7aedbf7c749fa80521d9ccf1ba473e0d1e14805caafbaad281c889", size = 11521 }, - { url = "https://files.pythonhosted.org/packages/14/36/927999a34b7d1def6957de89153d327fedc4030061940b5a468584e6c5a8/markupsafe-3.0.4-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:dff05cb7016dff1e9fd68f4122c127b65dfc59de5306cfb7ad92f956f230bee2", size = 12066 }, - { url = "https://files.pythonhosted.org/packages/17/54/69e7b0db9bd687bfd83451eed5666384d67cfed3be062bfc59a06a15474e/markupsafe-3.0.4-cp310-cp310-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:cf63c214fe879a65e69a386f915e36104fc84254ab141240f8854602d8e0be2a", size = 22081 }, - { url = "https://files.pythonhosted.org/packages/bd/14/f6f5c97903f7d2db76bbfaced31509a47d360a103b3aaf4849f6536591ec/markupsafe-3.0.4-cp310-cp310-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:2a6ef68ae94aed8721934072b27a3b654ea2100b97e4ab864cf1489c90926fbc", size = 26079 }, - { url = "https://files.pythonhosted.org/packages/d0/04/c3cc9b75f94f8b54d7e503c44cebd4b4a115ec1d6f1b996b999807daba99/markupsafe-3.0.4-cp310-cp310-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:fd9f8797427910198f95bced71ddfed61130d7e349213bfb8466c9c99e2c46a8", size = 22611 }, - { url = "https://files.pythonhosted.org/packages/00/26/c4708ed3b0f08e8e6d7cbce3314ac130cb5352d1f62951b6fef7878f2b1e/markupsafe-3.0.4-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:d1aca03ede943eb80ab3d63bb082c84b7aab85ea83bd0fd0c200260945fb49d9", size = 20712 }, - { url = "https://files.pythonhosted.org/packages/d9/b9/f3894d6aae3d7a52c9363317f4baf2fcadc052163d6dbc871266e32639ed/markupsafe-3.0.4-cp310-cp310-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:0764a13d34cae40db7bbf3a09b7e9b491bf4603e20b263a7a9d6b8e324975d0a", size = 20742 }, - { url = "https://files.pythonhosted.org/packages/59/7c/8e248ddbfe286ab6bddb462bdac0851cbb1510d2cbbb815a415fcb0511af/markupsafe-3.0.4-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:9388003072b95f2f1e3fd908604194d653ba21330d811961a78b7da1a77e9e36", size = 21560 }, - { url = "https://files.pythonhosted.org/packages/df/26/2353fef7d4bcf2b18e16bad81979fcecff2915156ca6882447917205b8e2/markupsafe-3.0.4-cp310-cp310-musllinux_1_2_armv7l.whl", hash = "sha256:8698d70a8081ee8c090dbb394768b5789a1da8b131b5499f89d071dd3cfaf6be", size = 20973 }, - { url = "https://files.pythonhosted.org/packages/67/6f/a9561d98d9a6ee3494b0b970a1c766e58bab128cc84841d56ec009456dbd/markupsafe-3.0.4-cp310-cp310-musllinux_1_2_ppc64le.whl", hash = "sha256:bf053da3c97a4bc5ecfbb218cdd2983febd91c617be8367d139882aa11e490aa", size = 22036 }, - { url = "https://files.pythonhosted.org/packages/55/83/6217df9192eca95af3ff0cad955c9854a93fa43b288cf7411ae24713eb52/markupsafe-3.0.4-cp310-cp310-musllinux_1_2_riscv64.whl", hash = "sha256:9438a2648b2195980cb2dd8e53ed7b8df91319e2d0b70ae61a9e1d1bc8d3bec9", size = 20314 }, - { url = "https://files.pythonhosted.org/packages/35/7c/9cd8081dae70e17fdab3558121fa618d459c7950c8abd8fc10fc024486d7/markupsafe-3.0.4-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:88d59b473bfb03259722600839af9bbd7fa13a2eb514beefeedb95997882f69a", size = 20780 }, - { url = "https://files.pythonhosted.org/packages/44/37/c5f2f45f4d8f0c24e4af7b9dc711640c888044cbf5f7e2ba2c0bb74cbb55/markupsafe-3.0.4-cp310-cp310-win32.whl", hash = "sha256:4a540e2d3192792fc84eced57bef37851ccb2b41f73291bb17408eea77bcd278", size = 14096 }, - { url = "https://files.pythonhosted.org/packages/50/50/394a1c61c9b9972cb4f76875c332af7109bd39bdad09d3a0ec5327a339dc/markupsafe-3.0.4-cp310-cp310-win_amd64.whl", hash = "sha256:5c22873ad1f0532ba40fa1727f3c0fc1bbbaab6d373d4cbe3f0dc74b2e2521c7", size = 14329 }, - { url = "https://files.pythonhosted.org/packages/d1/9a/86d03d2f32ba41a57baa124a7bcb76d0a6d39b1622e9bd4d550074e8b61a/markupsafe-3.0.4-cp310-cp310-win_arm64.whl", hash = "sha256:3d23795802fc8bd72534836d64489bbf0f67c088959091bdb22e10735a5107bf", size = 14196 }, + { url = "https://files.pythonhosted.org/packages/41/aa/9a65962e364bf19745f6bec7bde398fb1f5ca53ad2e734258e6198cc32ba/markupsafe-3.0.4-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:dd8ea6ebee7aedbf7c749fa80521d9ccf1ba473e0d1e14805caafbaad281c889", size = 11521, upload-time = "2026-10-02T23:04:20.141Z" }, + { url = "https://files.pythonhosted.org/packages/14/36/927999a34b7d1def6957de89153d327fedc4030061940b5a468584e6c5a8/markupsafe-3.0.4-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:dff05cb7016dff1e9fd68f4122c127b65dfc59de5306cfb7ad92f956f230bee2", size = 12066, upload-time = "2026-10-02T23:04:21.275Z" }, + { url = "https://files.pythonhosted.org/packages/17/54/69e7b0db9bd687bfd83451eed5666384d67cfed3be062bfc59a06a15474e/markupsafe-3.0.4-cp310-cp310-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:cf63c214fe879a65e69a386f915e36104fc84254ab141240f8854602d8e0be2a", size = 22081, upload-time = "2026-10-02T23:04:22.221Z" }, + { url = "https://files.pythonhosted.org/packages/bd/14/f6f5c97903f7d2db76bbfaced31509a47d360a103b3aaf4849f6536591ec/markupsafe-3.0.4-cp310-cp310-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:2a6ef68ae94aed8721934072b27a3b654ea2100b97e4ab864cf1489c90926fbc", size = 26079, upload-time = "2026-10-02T23:04:23.346Z" }, + { url = "https://files.pythonhosted.org/packages/d0/04/c3cc9b75f94f8b54d7e503c44cebd4b4a115ec1d6f1b996b999807daba99/markupsafe-3.0.4-cp310-cp310-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:fd9f8797427910198f95bced71ddfed61130d7e349213bfb8466c9c99e2c46a8", size = 22611, upload-time = "2026-10-02T23:04:24.401Z" }, + { url = "https://files.pythonhosted.org/packages/00/26/c4708ed3b0f08e8e6d7cbce3314ac130cb5352d1f62951b6fef7878f2b1e/markupsafe-3.0.4-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:d1aca03ede943eb80ab3d63bb082c84b7aab85ea83bd0fd0c200260945fb49d9", size = 20712, upload-time = "2026-10-02T23:04:25.386Z" }, + { url = "https://files.pythonhosted.org/packages/d9/b9/f3894d6aae3d7a52c9363317f4baf2fcadc052163d6dbc871266e32639ed/markupsafe-3.0.4-cp310-cp310-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:0764a13d34cae40db7bbf3a09b7e9b491bf4603e20b263a7a9d6b8e324975d0a", size = 20742, upload-time = "2026-10-02T23:04:26.403Z" }, + { url = "https://files.pythonhosted.org/packages/59/7c/8e248ddbfe286ab6bddb462bdac0851cbb1510d2cbbb815a415fcb0511af/markupsafe-3.0.4-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:9388003072b95f2f1e3fd908604194d653ba21330d811961a78b7da1a77e9e36", size = 21560, upload-time = "2026-10-02T23:04:27.522Z" }, + { url = "https://files.pythonhosted.org/packages/df/26/2353fef7d4bcf2b18e16bad81979fcecff2915156ca6882447917205b8e2/markupsafe-3.0.4-cp310-cp310-musllinux_1_2_armv7l.whl", hash = "sha256:8698d70a8081ee8c090dbb394768b5789a1da8b131b5499f89d071dd3cfaf6be", size = 20973, upload-time = "2026-10-02T23:04:28.573Z" }, + { url = "https://files.pythonhosted.org/packages/67/6f/a9561d98d9a6ee3494b0b970a1c766e58bab128cc84841d56ec009456dbd/markupsafe-3.0.4-cp310-cp310-musllinux_1_2_ppc64le.whl", hash = "sha256:bf053da3c97a4bc5ecfbb218cdd2983febd91c617be8367d139882aa11e490aa", size = 22036, upload-time = "2026-10-02T23:04:29.568Z" }, + { url = "https://files.pythonhosted.org/packages/55/83/6217df9192eca95af3ff0cad955c9854a93fa43b288cf7411ae24713eb52/markupsafe-3.0.4-cp310-cp310-musllinux_1_2_riscv64.whl", hash = "sha256:9438a2648b2195980cb2dd8e53ed7b8df91319e2d0b70ae61a9e1d1bc8d3bec9", size = 20314, upload-time = "2026-10-02T23:04:30.881Z" }, + { url = "https://files.pythonhosted.org/packages/35/7c/9cd8081dae70e17fdab3558121fa618d459c7950c8abd8fc10fc024486d7/markupsafe-3.0.4-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:88d59b473bfb03259722600839af9bbd7fa13a2eb514beefeedb95997882f69a", size = 20780, upload-time = "2026-10-02T23:04:31.975Z" }, + { url = "https://files.pythonhosted.org/packages/44/37/c5f2f45f4d8f0c24e4af7b9dc711640c888044cbf5f7e2ba2c0bb74cbb55/markupsafe-3.0.4-cp310-cp310-win32.whl", hash = "sha256:4a540e2d3192792fc84eced57bef37851ccb2b41f73291bb17408eea77bcd278", size = 14096, upload-time = "2026-10-02T23:04:33.129Z" }, + { url = "https://files.pythonhosted.org/packages/50/50/394a1c61c9b9972cb4f76875c332af7109bd39bdad09d3a0ec5327a339dc/markupsafe-3.0.4-cp310-cp310-win_amd64.whl", hash = "sha256:5c22873ad1f0532ba40fa1727f3c0fc1bbbaab6d373d4cbe3f0dc74b2e2521c7", size = 14329, upload-time = "2026-10-02T23:04:34.168Z" }, + { url = "https://files.pythonhosted.org/packages/d1/9a/86d03d2f32ba41a57baa124a7bcb76d0a6d39b1622e9bd4d550074e8b61a/markupsafe-3.0.4-cp310-cp310-win_arm64.whl", hash = "sha256:3d23795802fc8bd72534836d64489bbf0f67c088959091bdb22e10735a5107bf", size = 14196, upload-time = "2026-10-02T23:04:35.201Z" }, ] [[package]] @@ -705,17 +705,17 @@ dependencies = [ { name = "pyparsing" }, { name = "python-dateutil" }, ] -sdist = { url = "https://files.pythonhosted.org/packages/63/1b/4be5be87d43d327a0cf4de1a56e86f7f84c89312452406cf122efe2839e6/matplotlib-3.10.9.tar.gz", hash = "sha256:fd66508e8c6877d98e586654b608a0456db8d7e8a546eb1e2600efd957302358", size = 34811233 } +sdist = { url = "https://files.pythonhosted.org/packages/63/1b/4be5be87d43d327a0cf4de1a56e86f7f84c89312452406cf122efe2839e6/matplotlib-3.10.9.tar.gz", hash = "sha256:fd66508e8c6877d98e586654b608a0456db8d7e8a546eb1e2600efd957302358", size = 34811233, upload-time = "2026-04-24T00:14:13.539Z" } wheels = [ - { url = "https://files.pythonhosted.org/packages/18/6f/340b04986e67aac6f66c5145ce68bf72c64bed30f92c8913499a6e6b8f99/matplotlib-3.10.9-cp310-cp310-macosx_10_12_x86_64.whl", hash = "sha256:77210dce9cb8153dffc967efaae990543392563d5a376d4dd8539bebcb0ed217", size = 8296625 }, - { url = "https://files.pythonhosted.org/packages/bb/2f/127081eb83162053ebb9678ceac64220b93a663e0167432566e9c7c82aab/matplotlib-3.10.9-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:1e7698ac9868428e84d2c967424803b2472ff7167d9d6590d4204ed775343c3b", size = 8188790 }, - { url = "https://files.pythonhosted.org/packages/fc/b7/d8bcec2626c35f96972bff656299fef4578113ea6193c8fdad324710410c/matplotlib-3.10.9-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:1aa972116abb4c9d201bf245620b433726cb6856f3bef6a78f776a00f5c92d37", size = 8769389 }, - { url = "https://files.pythonhosted.org/packages/12/49/b78e214a527ea732033b7f4d37f7afb504d74ba9d134bd47938230dfb8b1/matplotlib-3.10.9-cp310-cp310-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:ae2f11957b27ce53497dd4d7b235c4d4f1faf383dfb39d0c5beb833bff883294", size = 9589657 }, - { url = "https://files.pythonhosted.org/packages/5f/15/5246f7b43beae19c74dfee651d58d6cc8112e06f77adb4e88cc04f2e3a23/matplotlib-3.10.9-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:b049278ddce116aaa1c1377ebf58adea909132dfce0281cf7e3a1ea9fc2e2c65", size = 9651983 }, - { url = "https://files.pythonhosted.org/packages/75/77/5acecfe672ba0fa1b8c0454f69ce155d1e6fc5852fa7206bf9afaf767121/matplotlib-3.10.9-cp310-cp310-win_amd64.whl", hash = "sha256:82834c3c292d24d3a8aae77cd2d20019de69d692a34a970e4fdb8d33e2ea3dda", size = 8199701 }, - { url = "https://files.pythonhosted.org/packages/2c/2b/0e92ad0ac446633f928a1563db4aa8add407e1924faf0ded5b95b35afb27/matplotlib-3.10.9-pp310-pypy310_pp73-macosx_10_15_x86_64.whl", hash = "sha256:1872fb212a05b729e649754a72d5da61d03e0554d76e80303b6f83d1d2c0552b", size = 8293058 }, - { url = "https://files.pythonhosted.org/packages/4b/23/74682fd369f5299ceda438fea2a0662e6383b85c9383fb9cdfcf04713e07/matplotlib-3.10.9-pp310-pypy310_pp73-macosx_11_0_arm64.whl", hash = "sha256:985f2238880e2e69093f588f5fe2e46771747febf0649f3cf7f7b7480875317f", size = 8186627 }, - { url = "https://files.pythonhosted.org/packages/ca/e8/368aab88f3c4cd8992800f31abfe0670c3e47540ba20a97e9fdbcde594b3/matplotlib-3.10.9-pp310-pypy310_pp73-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:6640f75af2c6148293caa0a2b39dd806a492dd66c8a8b04035813e33d0fd2585", size = 8764117 }, + { url = "https://files.pythonhosted.org/packages/18/6f/340b04986e67aac6f66c5145ce68bf72c64bed30f92c8913499a6e6b8f99/matplotlib-3.10.9-cp310-cp310-macosx_10_12_x86_64.whl", hash = "sha256:77210dce9cb8153dffc967efaae990543392563d5a376d4dd8539bebcb0ed217", size = 8296625, upload-time = "2026-04-24T00:11:43.376Z" }, + { url = "https://files.pythonhosted.org/packages/bb/2f/127081eb83162053ebb9678ceac64220b93a663e0167432566e9c7c82aab/matplotlib-3.10.9-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:1e7698ac9868428e84d2c967424803b2472ff7167d9d6590d4204ed775343c3b", size = 8188790, upload-time = "2026-04-24T00:11:46.556Z" }, + { url = "https://files.pythonhosted.org/packages/fc/b7/d8bcec2626c35f96972bff656299fef4578113ea6193c8fdad324710410c/matplotlib-3.10.9-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:1aa972116abb4c9d201bf245620b433726cb6856f3bef6a78f776a00f5c92d37", size = 8769389, upload-time = "2026-04-24T00:11:48.959Z" }, + { url = "https://files.pythonhosted.org/packages/12/49/b78e214a527ea732033b7f4d37f7afb504d74ba9d134bd47938230dfb8b1/matplotlib-3.10.9-cp310-cp310-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:ae2f11957b27ce53497dd4d7b235c4d4f1faf383dfb39d0c5beb833bff883294", size = 9589657, upload-time = "2026-04-24T00:11:51.915Z" }, + { url = "https://files.pythonhosted.org/packages/5f/15/5246f7b43beae19c74dfee651d58d6cc8112e06f77adb4e88cc04f2e3a23/matplotlib-3.10.9-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:b049278ddce116aaa1c1377ebf58adea909132dfce0281cf7e3a1ea9fc2e2c65", size = 9651983, upload-time = "2026-04-24T00:11:54.766Z" }, + { url = "https://files.pythonhosted.org/packages/75/77/5acecfe672ba0fa1b8c0454f69ce155d1e6fc5852fa7206bf9afaf767121/matplotlib-3.10.9-cp310-cp310-win_amd64.whl", hash = "sha256:82834c3c292d24d3a8aae77cd2d20019de69d692a34a970e4fdb8d33e2ea3dda", size = 8199701, upload-time = "2026-04-24T00:11:58.389Z" }, + { url = "https://files.pythonhosted.org/packages/2c/2b/0e92ad0ac446633f928a1563db4aa8add407e1924faf0ded5b95b35afb27/matplotlib-3.10.9-pp310-pypy310_pp73-macosx_10_15_x86_64.whl", hash = "sha256:1872fb212a05b729e649754a72d5da61d03e0554d76e80303b6f83d1d2c0552b", size = 8293058, upload-time = "2026-04-24T00:13:56.339Z" }, + { url = "https://files.pythonhosted.org/packages/4b/23/74682fd369f5299ceda438fea2a0662e6383b85c9383fb9cdfcf04713e07/matplotlib-3.10.9-pp310-pypy310_pp73-macosx_11_0_arm64.whl", hash = "sha256:985f2238880e2e69093f588f5fe2e46771747febf0649f3cf7f7b7480875317f", size = 8186627, upload-time = "2026-04-24T00:13:58.623Z" }, + { url = "https://files.pythonhosted.org/packages/ca/e8/368aab88f3c4cd8992800f31abfe0670c3e47540ba20a97e9fdbcde594b3/matplotlib-3.10.9-pp310-pypy310_pp73-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:6640f75af2c6148293caa0a2b39dd806a492dd66c8a8b04035813e33d0fd2585", size = 8764117, upload-time = "2026-04-24T00:14:01.684Z" }, ] [[package]] @@ -725,18 +725,18 @@ source = { registry = "https://pypi.org/simple" } dependencies = [ { name = "traitlets" }, ] -sdist = { url = "https://files.pythonhosted.org/packages/bd/c0/9f7c9a46090390368a4d7bcb76bb87a4a36c421e4c0792cdb53486ffac7a/matplotlib_inline-0.2.2.tar.gz", hash = "sha256:72f3fe8fce36b70d4a5b612f899090cd0401deddc4ea90e1572b9f4bfb058c79", size = 8150 } +sdist = { url = "https://files.pythonhosted.org/packages/bd/c0/9f7c9a46090390368a4d7bcb76bb87a4a36c421e4c0792cdb53486ffac7a/matplotlib_inline-0.2.2.tar.gz", hash = "sha256:72f3fe8fce36b70d4a5b612f899090cd0401deddc4ea90e1572b9f4bfb058c79", size = 8150, upload-time = "2026-05-08T17:33:33.49Z" } wheels = [ - { url = "https://files.pythonhosted.org/packages/41/09/5b161152e2d90f7b87f781c2e1267494aef9c32498df793f73ad0a0a494a/matplotlib_inline-0.2.2-py3-none-any.whl", hash = "sha256:3c821cf1c209f59fb2d2d64abbf5b23b67bcb2210d663f9918dd851c6da1fcf6", size = 9534 }, + { url = "https://files.pythonhosted.org/packages/41/09/5b161152e2d90f7b87f781c2e1267494aef9c32498df793f73ad0a0a494a/matplotlib_inline-0.2.2-py3-none-any.whl", hash = "sha256:3c821cf1c209f59fb2d2d64abbf5b23b67bcb2210d663f9918dd851c6da1fcf6", size = 9534, upload-time = "2026-05-08T17:33:32.055Z" }, ] [[package]] name = "mccabe" version = "0.7.0" source = { registry = "https://pypi.org/simple" } -sdist = { url = "https://files.pythonhosted.org/packages/e7/ff/0ffefdcac38932a54d2b5eed4e0ba8a408f215002cd178ad1df0f2806ff8/mccabe-0.7.0.tar.gz", hash = "sha256:348e0240c33b60bbdf4e523192ef919f28cb2c3d7d5c7794f74009290f236325", size = 9658 } +sdist = { url = "https://files.pythonhosted.org/packages/e7/ff/0ffefdcac38932a54d2b5eed4e0ba8a408f215002cd178ad1df0f2806ff8/mccabe-0.7.0.tar.gz", hash = "sha256:348e0240c33b60bbdf4e523192ef919f28cb2c3d7d5c7794f74009290f236325", size = 9658, upload-time = "2022-01-24T01:14:51.113Z" } wheels = [ - { url = "https://files.pythonhosted.org/packages/27/1a/1f68f9ba0c207934b35b86a8ca3aad8395a3d6dd7921c0686e23853ff5a9/mccabe-0.7.0-py2.py3-none-any.whl", hash = "sha256:6c2d30ab6be0e4a46919781807b4f0d834ebdd6c6e3dca0bda5a15f863427b6e", size = 7350 }, + { url = "https://files.pythonhosted.org/packages/27/1a/1f68f9ba0c207934b35b86a8ca3aad8395a3d6dd7921c0686e23853ff5a9/mccabe-0.7.0-py2.py3-none-any.whl", hash = "sha256:6c2d30ab6be0e4a46919781807b4f0d834ebdd6c6e3dca0bda5a15f863427b6e", size = 7350, upload-time = "2022-01-24T01:14:49.62Z" }, ] [[package]] @@ -746,9 +746,9 @@ source = { registry = "https://pypi.org/simple" } dependencies = [ { name = "psutil" }, ] -sdist = { url = "https://files.pythonhosted.org/packages/b2/88/e1907e1ca3488f2d9507ca8b0ae1add7b1cd5d3ca2bc8e5b329382ea2c7b/memory_profiler-0.61.0.tar.gz", hash = "sha256:4e5b73d7864a1d1292fb76a03e82a3e78ef934d06828a698d9dada76da2067b0", size = 35935 } +sdist = { url = "https://files.pythonhosted.org/packages/b2/88/e1907e1ca3488f2d9507ca8b0ae1add7b1cd5d3ca2bc8e5b329382ea2c7b/memory_profiler-0.61.0.tar.gz", hash = "sha256:4e5b73d7864a1d1292fb76a03e82a3e78ef934d06828a698d9dada76da2067b0", size = 35935, upload-time = "2022-11-15T17:57:28.994Z" } wheels = [ - { url = "https://files.pythonhosted.org/packages/49/26/aaca612a0634ceede20682e692a6c55e35a94c21ba36b807cc40fe910ae1/memory_profiler-0.61.0-py3-none-any.whl", hash = "sha256:400348e61031e3942ad4d4109d18753b2fb08c2f6fb8290671c5513a34182d84", size = 31803 }, + { url = "https://files.pythonhosted.org/packages/49/26/aaca612a0634ceede20682e692a6c55e35a94c21ba36b807cc40fe910ae1/memory_profiler-0.61.0-py3-none-any.whl", hash = "sha256:400348e61031e3942ad4d4109d18753b2fb08c2f6fb8290671c5513a34182d84", size = 31803, upload-time = "2022-11-15T17:57:27.031Z" }, ] [[package]] @@ -763,73 +763,73 @@ dependencies = [ { name = "tomli" }, { name = "typing-extensions" }, ] -sdist = { url = "https://files.pythonhosted.org/packages/34/4e/64300736cf0a0373a27b94a91b664ee7382e36f77b0621bae6381da3e180/mypy-2.4.0.tar.gz", hash = "sha256:77bdaebd452f43fcfc4cc3ba94352a3ea537cd01e3f2d0879f48673d2ec00d6e", size = 4064425 } +sdist = { url = "https://files.pythonhosted.org/packages/34/4e/64300736cf0a0373a27b94a91b664ee7382e36f77b0621bae6381da3e180/mypy-2.4.0.tar.gz", hash = "sha256:77bdaebd452f43fcfc4cc3ba94352a3ea537cd01e3f2d0879f48673d2ec00d6e", size = 4064425, upload-time = "2026-10-01T20:40:39.229Z" } wheels = [ - { url = "https://files.pythonhosted.org/packages/5c/0a/78c9ac93933e2ecd51d807021f78c03ffe98640f33951a8be159f5fd55bc/mypy-2.4.0-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:ffda5244fd1ad71a1e54405e35f50d09b80c3978efa120f58bd1252ae32c62d2", size = 14408618 }, - { url = "https://files.pythonhosted.org/packages/aa/4f/5f5f4429fd5a4218ce6268164a66afeed75c7e2ce5522a4d163faaa5fe85/mypy-2.4.0-cp310-cp310-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:615b03922d40e186fd1df73156473db0ba525c639bb4fd1cf28e1694879c9b23", size = 14552749 }, - { url = "https://files.pythonhosted.org/packages/54/78/fa1c319cd51db7a6027b46117460d5a361c6bba0c0f0f0670a2dab8ce2a5/mypy-2.4.0-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:13fa24f439c0e48a290a3922fa14ccd22f2762bae99d2142931b3e40a9055080", size = 15505846 }, - { url = "https://files.pythonhosted.org/packages/e2/5a/14c02690776fb04e9fa60b81173cb9ae6315e0745fad3813b303737f2f0c/mypy-2.4.0-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:3adef556a19eb3b630bf86a79c29d7da3d61e541472d0d897ca01b171c0abf8f", size = 15823059 }, - { url = "https://files.pythonhosted.org/packages/76/d8/d29afa819f8cb765018d6e2773e390a41ea4592f75abe417135969646857/mypy-2.4.0-cp310-cp310-win_amd64.whl", hash = "sha256:1dc0f64b0a92ae27a49d2175f0bacfa56e15bdc5b420cf92e0c1f79292219cbb", size = 11312927 }, - { url = "https://files.pythonhosted.org/packages/bc/c8/966dec4d80303855d824e6bf67fe1da812d88adfe4d75e24d8545dab4826/mypy-2.4.0-cp310-cp310-win_arm64.whl", hash = "sha256:4a378fc15fb33e321f04652c166ce73eeb8833a97c3d218132844e938cd93220", size = 10879252 }, - { url = "https://files.pythonhosted.org/packages/81/12/46ae8670c98a3cd0286ca5645c2f918f8f6be65edfed81b916010619f668/mypy-2.4.0-py3-none-any.whl", hash = "sha256:d01c5d26a352acc6d5cf3128225477e1e8465e8d3029d4c345807fbf7f3cf093", size = 2800734 }, + { url = "https://files.pythonhosted.org/packages/5c/0a/78c9ac93933e2ecd51d807021f78c03ffe98640f33951a8be159f5fd55bc/mypy-2.4.0-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:ffda5244fd1ad71a1e54405e35f50d09b80c3978efa120f58bd1252ae32c62d2", size = 14408618, upload-time = "2026-10-01T20:39:46.766Z" }, + { url = "https://files.pythonhosted.org/packages/aa/4f/5f5f4429fd5a4218ce6268164a66afeed75c7e2ce5522a4d163faaa5fe85/mypy-2.4.0-cp310-cp310-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:615b03922d40e186fd1df73156473db0ba525c639bb4fd1cf28e1694879c9b23", size = 14552749, upload-time = "2026-10-01T20:40:08.325Z" }, + { url = "https://files.pythonhosted.org/packages/54/78/fa1c319cd51db7a6027b46117460d5a361c6bba0c0f0f0670a2dab8ce2a5/mypy-2.4.0-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:13fa24f439c0e48a290a3922fa14ccd22f2762bae99d2142931b3e40a9055080", size = 15505846, upload-time = "2026-10-01T20:39:15.475Z" }, + { url = "https://files.pythonhosted.org/packages/e2/5a/14c02690776fb04e9fa60b81173cb9ae6315e0745fad3813b303737f2f0c/mypy-2.4.0-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:3adef556a19eb3b630bf86a79c29d7da3d61e541472d0d897ca01b171c0abf8f", size = 15823059, upload-time = "2026-10-01T20:39:35.429Z" }, + { url = "https://files.pythonhosted.org/packages/76/d8/d29afa819f8cb765018d6e2773e390a41ea4592f75abe417135969646857/mypy-2.4.0-cp310-cp310-win_amd64.whl", hash = "sha256:1dc0f64b0a92ae27a49d2175f0bacfa56e15bdc5b420cf92e0c1f79292219cbb", size = 11312927, upload-time = "2026-10-01T20:39:28.509Z" }, + { url = "https://files.pythonhosted.org/packages/bc/c8/966dec4d80303855d824e6bf67fe1da812d88adfe4d75e24d8545dab4826/mypy-2.4.0-cp310-cp310-win_arm64.whl", hash = "sha256:4a378fc15fb33e321f04652c166ce73eeb8833a97c3d218132844e938cd93220", size = 10879252, upload-time = "2026-10-01T20:38:41.545Z" }, + { url = "https://files.pythonhosted.org/packages/81/12/46ae8670c98a3cd0286ca5645c2f918f8f6be65edfed81b916010619f668/mypy-2.4.0-py3-none-any.whl", hash = "sha256:d01c5d26a352acc6d5cf3128225477e1e8465e8d3029d4c345807fbf7f3cf093", size = 2800734, upload-time = "2026-10-01T20:39:26.837Z" }, ] [[package]] name = "mypy-extensions" version = "1.1.0" source = { registry = "https://pypi.org/simple" } -sdist = { url = "https://files.pythonhosted.org/packages/a2/6e/371856a3fb9d31ca8dac321cda606860fa4548858c0cc45d9d1d4ca2628b/mypy_extensions-1.1.0.tar.gz", hash = "sha256:52e68efc3284861e772bbcd66823fde5ae21fd2fdb51c62a211403730b916558", size = 6343 } +sdist = { url = "https://files.pythonhosted.org/packages/a2/6e/371856a3fb9d31ca8dac321cda606860fa4548858c0cc45d9d1d4ca2628b/mypy_extensions-1.1.0.tar.gz", hash = "sha256:52e68efc3284861e772bbcd66823fde5ae21fd2fdb51c62a211403730b916558", size = 6343, upload-time = "2025-04-22T14:54:24.164Z" } wheels = [ - { url = "https://files.pythonhosted.org/packages/79/7b/2c79738432f5c924bef5071f933bcc9efd0473bac3b4aa584a6f7c1c8df8/mypy_extensions-1.1.0-py3-none-any.whl", hash = "sha256:1be4cccdb0f2482337c4743e60421de3a356cd97508abadd57d47403e94f5505", size = 4963 }, + { url = "https://files.pythonhosted.org/packages/79/7b/2c79738432f5c924bef5071f933bcc9efd0473bac3b4aa584a6f7c1c8df8/mypy_extensions-1.1.0-py3-none-any.whl", hash = "sha256:1be4cccdb0f2482337c4743e60421de3a356cd97508abadd57d47403e94f5505", size = 4963, upload-time = "2025-04-22T14:54:22.983Z" }, ] [[package]] name = "narwhals" version = "2.27.1" source = { registry = "https://pypi.org/simple" } -sdist = { url = "https://files.pythonhosted.org/packages/bf/21/f64d6b2dbea7bf3f8c38cdc786dcc6ef012ca3d173ad208c782c9a7bedf6/narwhals-2.27.1.tar.gz", hash = "sha256:aed93076a3ea42d9c32c88e4eb5ea422a21937011cbe1f480f9572a523c82094", size = 735013 } +sdist = { url = "https://files.pythonhosted.org/packages/bf/21/f64d6b2dbea7bf3f8c38cdc786dcc6ef012ca3d173ad208c782c9a7bedf6/narwhals-2.27.1.tar.gz", hash = "sha256:aed93076a3ea42d9c32c88e4eb5ea422a21937011cbe1f480f9572a523c82094", size = 735013, upload-time = "2026-10-10T06:52:18.113Z" } wheels = [ - { url = "https://files.pythonhosted.org/packages/d1/89/5d4c86da1130d9059681e5b6cd7645df5c10279a6a079c5c37dcb2cc6f3f/narwhals-2.27.1-py3-none-any.whl", hash = "sha256:d057df13f5852b8e157596e82eb5e955fad267425df5e420e0ee9863da483b31", size = 483211 }, + { url = "https://files.pythonhosted.org/packages/d1/89/5d4c86da1130d9059681e5b6cd7645df5c10279a6a079c5c37dcb2cc6f3f/narwhals-2.27.1-py3-none-any.whl", hash = "sha256:d057df13f5852b8e157596e82eb5e955fad267425df5e420e0ee9863da483b31", size = 483211, upload-time = "2026-10-10T06:52:16.32Z" }, ] [[package]] name = "nest-asyncio2" version = "1.7.4" source = { registry = "https://pypi.org/simple" } -sdist = { url = "https://files.pythonhosted.org/packages/32/2c/70e3b6bb2189cfd260280b7e1042bd622949a258663f95e887fada4ac1e6/nest_asyncio2-1.7.4.tar.gz", hash = "sha256:995b1409d926ec55e0876ea39a69bffdd8852cf1db3652c177e8c8ffdbcaf3cc", size = 16891 } +sdist = { url = "https://files.pythonhosted.org/packages/32/2c/70e3b6bb2189cfd260280b7e1042bd622949a258663f95e887fada4ac1e6/nest_asyncio2-1.7.4.tar.gz", hash = "sha256:995b1409d926ec55e0876ea39a69bffdd8852cf1db3652c177e8c8ffdbcaf3cc", size = 16891, upload-time = "2026-10-07T22:31:50.507Z" } wheels = [ - { url = "https://files.pythonhosted.org/packages/09/ed/559d2915dce85794bc0c36064043da170da50cd98746dcbddd85d5932017/nest_asyncio2-1.7.4-py3-none-any.whl", hash = "sha256:86e77b52c3d1496b294af3c944b44213b9b82a12a5ee590c0acc4ca4692ef6c7", size = 8543 }, + { url = "https://files.pythonhosted.org/packages/09/ed/559d2915dce85794bc0c36064043da170da50cd98746dcbddd85d5932017/nest_asyncio2-1.7.4-py3-none-any.whl", hash = "sha256:86e77b52c3d1496b294af3c944b44213b9b82a12a5ee590c0acc4ca4692ef6c7", size = 8543, upload-time = "2026-10-07T22:31:49.245Z" }, ] [[package]] name = "numpy" version = "2.2.6" source = { registry = "https://pypi.org/simple" } -sdist = { url = "https://files.pythonhosted.org/packages/76/21/7d2a95e4bba9dc13d043ee156a356c0a8f0c6309dff6b21b4d71a073b8a8/numpy-2.2.6.tar.gz", hash = "sha256:e29554e2bef54a90aa5cc07da6ce955accb83f21ab5de01a62c8478897b264fd", size = 20276440 } +sdist = { url = "https://files.pythonhosted.org/packages/76/21/7d2a95e4bba9dc13d043ee156a356c0a8f0c6309dff6b21b4d71a073b8a8/numpy-2.2.6.tar.gz", hash = "sha256:e29554e2bef54a90aa5cc07da6ce955accb83f21ab5de01a62c8478897b264fd", size = 20276440, upload-time = "2025-05-17T22:38:04.611Z" } wheels = [ - { url = "https://files.pythonhosted.org/packages/9a/3e/ed6db5be21ce87955c0cbd3009f2803f59fa08df21b5df06862e2d8e2bdd/numpy-2.2.6-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:b412caa66f72040e6d268491a59f2c43bf03eb6c96dd8f0307829feb7fa2b6fb", size = 21165245 }, - { url = "https://files.pythonhosted.org/packages/22/c2/4b9221495b2a132cc9d2eb862e21d42a009f5a60e45fc44b00118c174bff/numpy-2.2.6-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:8e41fd67c52b86603a91c1a505ebaef50b3314de0213461c7a6e99c9a3beff90", size = 14360048 }, - { url = "https://files.pythonhosted.org/packages/fd/77/dc2fcfc66943c6410e2bf598062f5959372735ffda175b39906d54f02349/numpy-2.2.6-cp310-cp310-macosx_14_0_arm64.whl", hash = "sha256:37e990a01ae6ec7fe7fa1c26c55ecb672dd98b19c3d0e1d1f326fa13cb38d163", size = 5340542 }, - { url = "https://files.pythonhosted.org/packages/7a/4f/1cb5fdc353a5f5cc7feb692db9b8ec2c3d6405453f982435efc52561df58/numpy-2.2.6-cp310-cp310-macosx_14_0_x86_64.whl", hash = "sha256:5a6429d4be8ca66d889b7cf70f536a397dc45ba6faeb5f8c5427935d9592e9cf", size = 6878301 }, - { url = "https://files.pythonhosted.org/packages/eb/17/96a3acd228cec142fcb8723bd3cc39c2a474f7dcf0a5d16731980bcafa95/numpy-2.2.6-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:efd28d4e9cd7d7a8d39074a4d44c63eda73401580c5c76acda2ce969e0a38e83", size = 14297320 }, - { url = "https://files.pythonhosted.org/packages/b4/63/3de6a34ad7ad6646ac7d2f55ebc6ad439dbbf9c4370017c50cf403fb19b5/numpy-2.2.6-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:fc7b73d02efb0e18c000e9ad8b83480dfcd5dfd11065997ed4c6747470ae8915", size = 16801050 }, - { url = "https://files.pythonhosted.org/packages/07/b6/89d837eddef52b3d0cec5c6ba0456c1bf1b9ef6a6672fc2b7873c3ec4e2e/numpy-2.2.6-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:74d4531beb257d2c3f4b261bfb0fc09e0f9ebb8842d82a7b4209415896adc680", size = 15807034 }, - { url = "https://files.pythonhosted.org/packages/01/c8/dc6ae86e3c61cfec1f178e5c9f7858584049b6093f843bca541f94120920/numpy-2.2.6-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:8fc377d995680230e83241d8a96def29f204b5782f371c532579b4f20607a289", size = 18614185 }, - { url = "https://files.pythonhosted.org/packages/5b/c5/0064b1b7e7c89137b471ccec1fd2282fceaae0ab3a9550f2568782d80357/numpy-2.2.6-cp310-cp310-win32.whl", hash = "sha256:b093dd74e50a8cba3e873868d9e93a85b78e0daf2e98c6797566ad8044e8363d", size = 6527149 }, - { url = "https://files.pythonhosted.org/packages/a3/dd/4b822569d6b96c39d1215dbae0582fd99954dcbcf0c1a13c61783feaca3f/numpy-2.2.6-cp310-cp310-win_amd64.whl", hash = "sha256:f0fd6321b839904e15c46e0d257fdd101dd7f530fe03fd6359c1ea63738703f3", size = 12904620 }, - { url = "https://files.pythonhosted.org/packages/9e/3b/d94a75f4dbf1ef5d321523ecac21ef23a3cd2ac8b78ae2aac40873590229/numpy-2.2.6-pp310-pypy310_pp73-macosx_10_15_x86_64.whl", hash = "sha256:0b605b275d7bd0c640cad4e5d30fa701a8d59302e127e5f79138ad62762c3e3d", size = 21040391 }, - { url = "https://files.pythonhosted.org/packages/17/f4/09b2fa1b58f0fb4f7c7963a1649c64c4d315752240377ed74d9cd878f7b5/numpy-2.2.6-pp310-pypy310_pp73-macosx_14_0_x86_64.whl", hash = "sha256:7befc596a7dc9da8a337f79802ee8adb30a552a94f792b9c9d18c840055907db", size = 6786754 }, - { url = "https://files.pythonhosted.org/packages/af/30/feba75f143bdc868a1cc3f44ccfa6c4b9ec522b36458e738cd00f67b573f/numpy-2.2.6-pp310-pypy310_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:ce47521a4754c8f4593837384bd3424880629f718d87c5d44f8ed763edd63543", size = 16643476 }, - { url = "https://files.pythonhosted.org/packages/37/48/ac2a9584402fb6c0cd5b5d1a91dcf176b15760130dd386bbafdbfe3640bf/numpy-2.2.6-pp310-pypy310_pp73-win_amd64.whl", hash = "sha256:d042d24c90c41b54fd506da306759e06e568864df8ec17ccc17e9e884634fd00", size = 12812666 }, + { url = "https://files.pythonhosted.org/packages/9a/3e/ed6db5be21ce87955c0cbd3009f2803f59fa08df21b5df06862e2d8e2bdd/numpy-2.2.6-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:b412caa66f72040e6d268491a59f2c43bf03eb6c96dd8f0307829feb7fa2b6fb", size = 21165245, upload-time = "2025-05-17T21:27:58.555Z" }, + { url = "https://files.pythonhosted.org/packages/22/c2/4b9221495b2a132cc9d2eb862e21d42a009f5a60e45fc44b00118c174bff/numpy-2.2.6-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:8e41fd67c52b86603a91c1a505ebaef50b3314de0213461c7a6e99c9a3beff90", size = 14360048, upload-time = "2025-05-17T21:28:21.406Z" }, + { url = "https://files.pythonhosted.org/packages/fd/77/dc2fcfc66943c6410e2bf598062f5959372735ffda175b39906d54f02349/numpy-2.2.6-cp310-cp310-macosx_14_0_arm64.whl", hash = "sha256:37e990a01ae6ec7fe7fa1c26c55ecb672dd98b19c3d0e1d1f326fa13cb38d163", size = 5340542, upload-time = "2025-05-17T21:28:30.931Z" }, + { url = "https://files.pythonhosted.org/packages/7a/4f/1cb5fdc353a5f5cc7feb692db9b8ec2c3d6405453f982435efc52561df58/numpy-2.2.6-cp310-cp310-macosx_14_0_x86_64.whl", hash = "sha256:5a6429d4be8ca66d889b7cf70f536a397dc45ba6faeb5f8c5427935d9592e9cf", size = 6878301, upload-time = "2025-05-17T21:28:41.613Z" }, + { url = "https://files.pythonhosted.org/packages/eb/17/96a3acd228cec142fcb8723bd3cc39c2a474f7dcf0a5d16731980bcafa95/numpy-2.2.6-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:efd28d4e9cd7d7a8d39074a4d44c63eda73401580c5c76acda2ce969e0a38e83", size = 14297320, upload-time = "2025-05-17T21:29:02.78Z" }, + { url = "https://files.pythonhosted.org/packages/b4/63/3de6a34ad7ad6646ac7d2f55ebc6ad439dbbf9c4370017c50cf403fb19b5/numpy-2.2.6-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:fc7b73d02efb0e18c000e9ad8b83480dfcd5dfd11065997ed4c6747470ae8915", size = 16801050, upload-time = "2025-05-17T21:29:27.675Z" }, + { url = "https://files.pythonhosted.org/packages/07/b6/89d837eddef52b3d0cec5c6ba0456c1bf1b9ef6a6672fc2b7873c3ec4e2e/numpy-2.2.6-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:74d4531beb257d2c3f4b261bfb0fc09e0f9ebb8842d82a7b4209415896adc680", size = 15807034, upload-time = "2025-05-17T21:29:51.102Z" }, + { url = "https://files.pythonhosted.org/packages/01/c8/dc6ae86e3c61cfec1f178e5c9f7858584049b6093f843bca541f94120920/numpy-2.2.6-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:8fc377d995680230e83241d8a96def29f204b5782f371c532579b4f20607a289", size = 18614185, upload-time = "2025-05-17T21:30:18.703Z" }, + { url = "https://files.pythonhosted.org/packages/5b/c5/0064b1b7e7c89137b471ccec1fd2282fceaae0ab3a9550f2568782d80357/numpy-2.2.6-cp310-cp310-win32.whl", hash = "sha256:b093dd74e50a8cba3e873868d9e93a85b78e0daf2e98c6797566ad8044e8363d", size = 6527149, upload-time = "2025-05-17T21:30:29.788Z" }, + { url = "https://files.pythonhosted.org/packages/a3/dd/4b822569d6b96c39d1215dbae0582fd99954dcbcf0c1a13c61783feaca3f/numpy-2.2.6-cp310-cp310-win_amd64.whl", hash = "sha256:f0fd6321b839904e15c46e0d257fdd101dd7f530fe03fd6359c1ea63738703f3", size = 12904620, upload-time = "2025-05-17T21:30:48.994Z" }, + { url = "https://files.pythonhosted.org/packages/9e/3b/d94a75f4dbf1ef5d321523ecac21ef23a3cd2ac8b78ae2aac40873590229/numpy-2.2.6-pp310-pypy310_pp73-macosx_10_15_x86_64.whl", hash = "sha256:0b605b275d7bd0c640cad4e5d30fa701a8d59302e127e5f79138ad62762c3e3d", size = 21040391, upload-time = "2025-05-17T21:44:35.948Z" }, + { url = "https://files.pythonhosted.org/packages/17/f4/09b2fa1b58f0fb4f7c7963a1649c64c4d315752240377ed74d9cd878f7b5/numpy-2.2.6-pp310-pypy310_pp73-macosx_14_0_x86_64.whl", hash = "sha256:7befc596a7dc9da8a337f79802ee8adb30a552a94f792b9c9d18c840055907db", size = 6786754, upload-time = "2025-05-17T21:44:47.446Z" }, + { url = "https://files.pythonhosted.org/packages/af/30/feba75f143bdc868a1cc3f44ccfa6c4b9ec522b36458e738cd00f67b573f/numpy-2.2.6-pp310-pypy310_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:ce47521a4754c8f4593837384bd3424880629f718d87c5d44f8ed763edd63543", size = 16643476, upload-time = "2025-05-17T21:45:11.871Z" }, + { url = "https://files.pythonhosted.org/packages/37/48/ac2a9584402fb6c0cd5b5d1a91dcf176b15760130dd386bbafdbfe3640bf/numpy-2.2.6-pp310-pypy310_pp73-win_amd64.whl", hash = "sha256:d042d24c90c41b54fd506da306759e06e568864df8ec17ccc17e9e884634fd00", size = 12812666, upload-time = "2025-05-17T21:45:31.426Z" }, ] [[package]] name = "packaging" version = "26.3" source = { registry = "https://pypi.org/simple" } -sdist = { url = "https://files.pythonhosted.org/packages/7d/fa/3944b40b07da9ce895c0e6303a5ab7d53da063554f534556b134a54d6093/packaging-26.3.tar.gz", hash = "sha256:94edc256424af38762eb31306eed28beb9f0efc50a8837492c9d6fd6004aed79", size = 313412 } +sdist = { url = "https://files.pythonhosted.org/packages/7d/fa/3944b40b07da9ce895c0e6303a5ab7d53da063554f534556b134a54d6093/packaging-26.3.tar.gz", hash = "sha256:94edc256424af38762eb31306eed28beb9f0efc50a8837492c9d6fd6004aed79", size = 313412, upload-time = "2026-08-04T18:15:28.737Z" } wheels = [ - { url = "https://files.pythonhosted.org/packages/63/34/ba1c580383c9eada3711951fef0795c80b829a078d72188184bcab9dd527/packaging-26.3-py3-none-any.whl", hash = "sha256:d7193f7c8e4e93f444fde0262bf90af30e16fa0ad0ad44cb553c87339b23cd1c", size = 129956 }, + { url = "https://files.pythonhosted.org/packages/63/34/ba1c580383c9eada3711951fef0795c80b829a078d72188184bcab9dd527/packaging-26.3-py3-none-any.whl", hash = "sha256:d7193f7c8e4e93f444fde0262bf90af30e16fa0ad0ad44cb553c87339b23cd1c", size = 129956, upload-time = "2026-08-04T18:15:27.159Z" }, ] [[package]] @@ -842,33 +842,33 @@ dependencies = [ { name = "pytz" }, { name = "tzdata" }, ] -sdist = { url = "https://files.pythonhosted.org/packages/33/01/d40b85317f86cf08d853a4f495195c73815fdf205eef3993821720274518/pandas-2.3.3.tar.gz", hash = "sha256:e05e1af93b977f7eafa636d043f9f94c7ee3ac81af99c13508215942e64c993b", size = 4495223 } +sdist = { url = "https://files.pythonhosted.org/packages/33/01/d40b85317f86cf08d853a4f495195c73815fdf205eef3993821720274518/pandas-2.3.3.tar.gz", hash = "sha256:e05e1af93b977f7eafa636d043f9f94c7ee3ac81af99c13508215942e64c993b", size = 4495223, upload-time = "2025-09-29T23:34:51.853Z" } wheels = [ - { url = "https://files.pythonhosted.org/packages/3d/f7/f425a00df4fcc22b292c6895c6831c0c8ae1d9fac1e024d16f98a9ce8749/pandas-2.3.3-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:376c6446ae31770764215a6c937f72d917f214b43560603cd60da6408f183b6c", size = 11555763 }, - { url = "https://files.pythonhosted.org/packages/13/4f/66d99628ff8ce7857aca52fed8f0066ce209f96be2fede6cef9f84e8d04f/pandas-2.3.3-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:e19d192383eab2f4ceb30b412b22ea30690c9e618f78870357ae1d682912015a", size = 10801217 }, - { url = "https://files.pythonhosted.org/packages/1d/03/3fc4a529a7710f890a239cc496fc6d50ad4a0995657dccc1d64695adb9f4/pandas-2.3.3-cp310-cp310-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:5caf26f64126b6c7aec964f74266f435afef1c1b13da3b0636c7518a1fa3e2b1", size = 12148791 }, - { url = "https://files.pythonhosted.org/packages/40/a8/4dac1f8f8235e5d25b9955d02ff6f29396191d4e665d71122c3722ca83c5/pandas-2.3.3-cp310-cp310-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:dd7478f1463441ae4ca7308a70e90b33470fa593429f9d4c578dd00d1fa78838", size = 12769373 }, - { url = "https://files.pythonhosted.org/packages/df/91/82cc5169b6b25440a7fc0ef3a694582418d875c8e3ebf796a6d6470aa578/pandas-2.3.3-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:4793891684806ae50d1288c9bae9330293ab4e083ccd1c5e383c34549c6e4250", size = 13200444 }, - { url = "https://files.pythonhosted.org/packages/10/ae/89b3283800ab58f7af2952704078555fa60c807fff764395bb57ea0b0dbd/pandas-2.3.3-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:28083c648d9a99a5dd035ec125d42439c6c1c525098c58af0fc38dd1a7a1b3d4", size = 13858459 }, - { url = "https://files.pythonhosted.org/packages/85/72/530900610650f54a35a19476eca5104f38555afccda1aa11a92ee14cb21d/pandas-2.3.3-cp310-cp310-win_amd64.whl", hash = "sha256:503cf027cf9940d2ceaa1a93cfb5f8c8c7e6e90720a2850378f0b3f3b1e06826", size = 11346086 }, + { url = "https://files.pythonhosted.org/packages/3d/f7/f425a00df4fcc22b292c6895c6831c0c8ae1d9fac1e024d16f98a9ce8749/pandas-2.3.3-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:376c6446ae31770764215a6c937f72d917f214b43560603cd60da6408f183b6c", size = 11555763, upload-time = "2025-09-29T23:16:53.287Z" }, + { url = "https://files.pythonhosted.org/packages/13/4f/66d99628ff8ce7857aca52fed8f0066ce209f96be2fede6cef9f84e8d04f/pandas-2.3.3-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:e19d192383eab2f4ceb30b412b22ea30690c9e618f78870357ae1d682912015a", size = 10801217, upload-time = "2025-09-29T23:17:04.522Z" }, + { url = "https://files.pythonhosted.org/packages/1d/03/3fc4a529a7710f890a239cc496fc6d50ad4a0995657dccc1d64695adb9f4/pandas-2.3.3-cp310-cp310-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:5caf26f64126b6c7aec964f74266f435afef1c1b13da3b0636c7518a1fa3e2b1", size = 12148791, upload-time = "2025-09-29T23:17:18.444Z" }, + { url = "https://files.pythonhosted.org/packages/40/a8/4dac1f8f8235e5d25b9955d02ff6f29396191d4e665d71122c3722ca83c5/pandas-2.3.3-cp310-cp310-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:dd7478f1463441ae4ca7308a70e90b33470fa593429f9d4c578dd00d1fa78838", size = 12769373, upload-time = "2025-09-29T23:17:35.846Z" }, + { url = "https://files.pythonhosted.org/packages/df/91/82cc5169b6b25440a7fc0ef3a694582418d875c8e3ebf796a6d6470aa578/pandas-2.3.3-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:4793891684806ae50d1288c9bae9330293ab4e083ccd1c5e383c34549c6e4250", size = 13200444, upload-time = "2025-09-29T23:17:49.341Z" }, + { url = "https://files.pythonhosted.org/packages/10/ae/89b3283800ab58f7af2952704078555fa60c807fff764395bb57ea0b0dbd/pandas-2.3.3-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:28083c648d9a99a5dd035ec125d42439c6c1c525098c58af0fc38dd1a7a1b3d4", size = 13858459, upload-time = "2025-09-29T23:18:03.722Z" }, + { url = "https://files.pythonhosted.org/packages/85/72/530900610650f54a35a19476eca5104f38555afccda1aa11a92ee14cb21d/pandas-2.3.3-cp310-cp310-win_amd64.whl", hash = "sha256:503cf027cf9940d2ceaa1a93cfb5f8c8c7e6e90720a2850378f0b3f3b1e06826", size = 11346086, upload-time = "2025-09-29T23:18:18.505Z" }, ] [[package]] name = "parso" version = "0.8.7" source = { registry = "https://pypi.org/simple" } -sdist = { url = "https://files.pythonhosted.org/packages/30/4b/90c937815137d43ce71ba043cd3566221e9df6b9c805f24b5d138c9d40a7/parso-0.8.7.tar.gz", hash = "sha256:eaaac4c9fdd5e9e8852dc778d2d7405897ec510f2a298071453e5e3a07914bb1", size = 401824 } +sdist = { url = "https://files.pythonhosted.org/packages/30/4b/90c937815137d43ce71ba043cd3566221e9df6b9c805f24b5d138c9d40a7/parso-0.8.7.tar.gz", hash = "sha256:eaaac4c9fdd5e9e8852dc778d2d7405897ec510f2a298071453e5e3a07914bb1", size = 401824, upload-time = "2026-05-01T23:13:02.138Z" } wheels = [ - { url = "https://files.pythonhosted.org/packages/99/5d/8268b644392ee874ee82a635cd0df1773de230bde356c38de28e298392cc/parso-0.8.7-py2.py3-none-any.whl", hash = "sha256:a8926eb2a1b915486941fdbd31e86a4baf88fe8c210f25f2f35ecec5b574ca1c", size = 107025 }, + { url = "https://files.pythonhosted.org/packages/99/5d/8268b644392ee874ee82a635cd0df1773de230bde356c38de28e298392cc/parso-0.8.7-py2.py3-none-any.whl", hash = "sha256:a8926eb2a1b915486941fdbd31e86a4baf88fe8c210f25f2f35ecec5b574ca1c", size = 107025, upload-time = "2026-05-01T23:12:58.867Z" }, ] [[package]] name = "pathspec" version = "1.1.1" source = { registry = "https://pypi.org/simple" } -sdist = { url = "https://files.pythonhosted.org/packages/5a/82/42f767fc1c1143d6fd36efb827202a2d997a375e160a71eb2888a925aac1/pathspec-1.1.1.tar.gz", hash = "sha256:17db5ecd524104a120e173814c90367a96a98d07c45b2e10c2f3919fff91bf5a", size = 135180 } +sdist = { url = "https://files.pythonhosted.org/packages/5a/82/42f767fc1c1143d6fd36efb827202a2d997a375e160a71eb2888a925aac1/pathspec-1.1.1.tar.gz", hash = "sha256:17db5ecd524104a120e173814c90367a96a98d07c45b2e10c2f3919fff91bf5a", size = 135180, upload-time = "2026-04-27T01:46:08.907Z" } wheels = [ - { url = "https://files.pythonhosted.org/packages/f1/d9/7fb5aa316bc299258e68c73ba3bddbc499654a07f151cba08f6153988714/pathspec-1.1.1-py3-none-any.whl", hash = "sha256:a00ce642f577bf7f473932318056212bc4f8bfdf53128c78bbd5af0b9b20b189", size = 57328 }, + { url = "https://files.pythonhosted.org/packages/f1/d9/7fb5aa316bc299258e68c73ba3bddbc499654a07f151cba08f6153988714/pathspec-1.1.1-py3-none-any.whl", hash = "sha256:a00ce642f577bf7f473932318056212bc4f8bfdf53128c78bbd5af0b9b20b189", size = 57328, upload-time = "2026-04-27T01:46:07.06Z" }, ] [[package]] @@ -878,35 +878,35 @@ source = { registry = "https://pypi.org/simple" } dependencies = [ { name = "ptyprocess" }, ] -sdist = { url = "https://files.pythonhosted.org/packages/42/92/cc564bf6381ff43ce1f4d06852fc19a2f11d180f23dc32d9588bee2f149d/pexpect-4.9.0.tar.gz", hash = "sha256:ee7d41123f3c9911050ea2c2dac107568dc43b2d3b0c7557a33212c398ead30f", size = 166450 } +sdist = { url = "https://files.pythonhosted.org/packages/42/92/cc564bf6381ff43ce1f4d06852fc19a2f11d180f23dc32d9588bee2f149d/pexpect-4.9.0.tar.gz", hash = "sha256:ee7d41123f3c9911050ea2c2dac107568dc43b2d3b0c7557a33212c398ead30f", size = 166450, upload-time = "2023-11-25T09:07:26.339Z" } wheels = [ - { url = "https://files.pythonhosted.org/packages/9e/c3/059298687310d527a58bb01f3b1965787ee3b40dce76752eda8b44e9a2c5/pexpect-4.9.0-py2.py3-none-any.whl", hash = "sha256:7236d1e080e4936be2dc3e326cec0af72acf9212a7e1d060210e70a47e253523", size = 63772 }, + { url = "https://files.pythonhosted.org/packages/9e/c3/059298687310d527a58bb01f3b1965787ee3b40dce76752eda8b44e9a2c5/pexpect-4.9.0-py2.py3-none-any.whl", hash = "sha256:7236d1e080e4936be2dc3e326cec0af72acf9212a7e1d060210e70a47e253523", size = 63772, upload-time = "2023-11-25T06:56:14.81Z" }, ] [[package]] name = "pillow" version = "12.3.0" source = { registry = "https://pypi.org/simple" } -sdist = { url = "https://files.pythonhosted.org/packages/1c/3d/bb7fca845737cf9d7dbde16ed1843984665ff2e0a518f5db43e77ec540b9/pillow-12.3.0.tar.gz", hash = "sha256:3b8182a766685eaa002637e28b4ec8d6b18819a0c71f579bf0dbaa5830297cce", size = 47025035 } +sdist = { url = "https://files.pythonhosted.org/packages/1c/3d/bb7fca845737cf9d7dbde16ed1843984665ff2e0a518f5db43e77ec540b9/pillow-12.3.0.tar.gz", hash = "sha256:3b8182a766685eaa002637e28b4ec8d6b18819a0c71f579bf0dbaa5830297cce", size = 47025035, upload-time = "2026-07-01T11:56:38.965Z" } wheels = [ - { url = "https://files.pythonhosted.org/packages/25/c2/669d88644cddb1485bd9534e63e8cf476c8e51cb3c3a1297677023505c0e/pillow-12.3.0-cp310-cp310-macosx_10_10_x86_64.whl", hash = "sha256:6c0016e7b354317c4e9e525b937ac8596c38d2d232b419529b9cd7a1cd46e39a", size = 5392418 }, - { url = "https://files.pythonhosted.org/packages/6b/ba/3762f376a2948e3036488d773a146e0ae6ecc2ca03ac20e2615bd0b2ba02/pillow-12.3.0-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:bcc33feacfaefce60c12fd500a277533bdc02b10a19f7f6d348763d8140bbba7", size = 4785287 }, - { url = "https://files.pythonhosted.org/packages/07/50/b5d688cc9c52d4482f3d5bcab6ce20bc2a74a85d2343841c907444a3be2c/pillow-12.3.0-cp310-cp310-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:5594fc43d548a7ed94949d139aa1341b270f1863f11cfd37f5a6c8b778a6b67f", size = 6253754 }, - { url = "https://files.pythonhosted.org/packages/4e/89/36f4cd76cf4baf05c50ababb976249153f18c959171c7f6ba09a6f217260/pillow-12.3.0-cp310-cp310-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:f0606c8bf2cdefea14a43530f7657cbbb7ecf1c4222512492ef4a4434a9501ec", size = 6925605 }, - { url = "https://files.pythonhosted.org/packages/eb/c0/4de58cf6633b9e3a6061ef4be6fb91fc3c90b812ece886f531e3c523d777/pillow-12.3.0-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:85f998ea1848bc6757289e739cfbdda3a04adfd58b02fc018ce54d754a5ce468", size = 6327788 }, - { url = "https://files.pythonhosted.org/packages/87/3c/14d53682a19550dbbaf3b598f807d5457646c510805a44c7d7891cd1cd1a/pillow-12.3.0-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:25b9b82bb22e6e2b3cd07b39c68b7b862001226cb3dff7130d1cb914121b39ed", size = 7036288 }, - { url = "https://files.pythonhosted.org/packages/38/1d/36279e3c77efe034e4cc2b0393ee74ffdb5a62391dacbf9b916154f5f0b8/pillow-12.3.0-cp310-cp310-win32.whl", hash = "sha256:37dc8f7bbb66efe481bb60defacef820c950c24713fb44962ed6aa2a50966de1", size = 6472396 }, - { url = "https://files.pythonhosted.org/packages/48/7c/8fa0039574c476d7c6fa57dd7c32a130436877c6ec1e5ce1cc8ec44878c1/pillow-12.3.0-cp310-cp310-win_amd64.whl", hash = "sha256:300557495eb45ebb8aec96c2da9c4be642fbf7cd937278b4013ba894ea8eb0eb", size = 7226887 }, - { url = "https://files.pythonhosted.org/packages/fa/17/e324be141d173c1c919428066c3259f21c1b8982e564e01a4a81e96dbdcf/pillow-12.3.0-cp310-cp310-win_arm64.whl", hash = "sha256:514435a37670e3e5e08f3945b68718b6ed329bb84367777e16f9f4dfe1e61a0f", size = 2568039 }, + { url = "https://files.pythonhosted.org/packages/25/c2/669d88644cddb1485bd9534e63e8cf476c8e51cb3c3a1297677023505c0e/pillow-12.3.0-cp310-cp310-macosx_10_10_x86_64.whl", hash = "sha256:6c0016e7b354317c4e9e525b937ac8596c38d2d232b419529b9cd7a1cd46e39a", size = 5392418, upload-time = "2026-07-01T11:53:27.808Z" }, + { url = "https://files.pythonhosted.org/packages/6b/ba/3762f376a2948e3036488d773a146e0ae6ecc2ca03ac20e2615bd0b2ba02/pillow-12.3.0-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:bcc33feacfaefce60c12fd500a277533bdc02b10a19f7f6d348763d8140bbba7", size = 4785287, upload-time = "2026-07-01T11:53:29.761Z" }, + { url = "https://files.pythonhosted.org/packages/07/50/b5d688cc9c52d4482f3d5bcab6ce20bc2a74a85d2343841c907444a3be2c/pillow-12.3.0-cp310-cp310-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:5594fc43d548a7ed94949d139aa1341b270f1863f11cfd37f5a6c8b778a6b67f", size = 6253754, upload-time = "2026-07-01T11:53:32.298Z" }, + { url = "https://files.pythonhosted.org/packages/4e/89/36f4cd76cf4baf05c50ababb976249153f18c959171c7f6ba09a6f217260/pillow-12.3.0-cp310-cp310-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:f0606c8bf2cdefea14a43530f7657cbbb7ecf1c4222512492ef4a4434a9501ec", size = 6925605, upload-time = "2026-07-01T11:53:34.487Z" }, + { url = "https://files.pythonhosted.org/packages/eb/c0/4de58cf6633b9e3a6061ef4be6fb91fc3c90b812ece886f531e3c523d777/pillow-12.3.0-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:85f998ea1848bc6757289e739cfbdda3a04adfd58b02fc018ce54d754a5ce468", size = 6327788, upload-time = "2026-07-01T11:53:36.433Z" }, + { url = "https://files.pythonhosted.org/packages/87/3c/14d53682a19550dbbaf3b598f807d5457646c510805a44c7d7891cd1cd1a/pillow-12.3.0-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:25b9b82bb22e6e2b3cd07b39c68b7b862001226cb3dff7130d1cb914121b39ed", size = 7036288, upload-time = "2026-07-01T11:53:38.712Z" }, + { url = "https://files.pythonhosted.org/packages/38/1d/36279e3c77efe034e4cc2b0393ee74ffdb5a62391dacbf9b916154f5f0b8/pillow-12.3.0-cp310-cp310-win32.whl", hash = "sha256:37dc8f7bbb66efe481bb60defacef820c950c24713fb44962ed6aa2a50966de1", size = 6472396, upload-time = "2026-07-01T11:53:40.781Z" }, + { url = "https://files.pythonhosted.org/packages/48/7c/8fa0039574c476d7c6fa57dd7c32a130436877c6ec1e5ce1cc8ec44878c1/pillow-12.3.0-cp310-cp310-win_amd64.whl", hash = "sha256:300557495eb45ebb8aec96c2da9c4be642fbf7cd937278b4013ba894ea8eb0eb", size = 7226887, upload-time = "2026-07-01T11:53:42.764Z" }, + { url = "https://files.pythonhosted.org/packages/fa/17/e324be141d173c1c919428066c3259f21c1b8982e564e01a4a81e96dbdcf/pillow-12.3.0-cp310-cp310-win_arm64.whl", hash = "sha256:514435a37670e3e5e08f3945b68718b6ed329bb84367777e16f9f4dfe1e61a0f", size = 2568039, upload-time = "2026-07-01T11:53:45.372Z" }, ] [[package]] name = "platformdirs" version = "4.12.4" source = { registry = "https://pypi.org/simple" } -sdist = { url = "https://files.pythonhosted.org/packages/90/a1/d5f9002a70298c64a789779077d8dd90c10aa1f47fe40c86802df874f2a6/platformdirs-4.12.4.tar.gz", hash = "sha256:63743c02414e755de4e31b8f68125c1407495b86c5a006e203c01ff8b9924250", size = 60010 } +sdist = { url = "https://files.pythonhosted.org/packages/90/a1/d5f9002a70298c64a789779077d8dd90c10aa1f47fe40c86802df874f2a6/platformdirs-4.12.4.tar.gz", hash = "sha256:63743c02414e755de4e31b8f68125c1407495b86c5a006e203c01ff8b9924250", size = 60010, upload-time = "2026-10-07T23:30:32.426Z" } wheels = [ - { url = "https://files.pythonhosted.org/packages/f4/ba/223e00b885e960edd5d4b4d178c88acce019bd5b83786093681b8c393492/platformdirs-4.12.4-py3-none-any.whl", hash = "sha256:78bfb9db2a8471ed7eebe3c3c932da413911042994e699b384fbb4493fa872d7", size = 32596 }, + { url = "https://files.pythonhosted.org/packages/f4/ba/223e00b885e960edd5d4b4d178c88acce019bd5b83786093681b8c393492/platformdirs-4.12.4-py3-none-any.whl", hash = "sha256:78bfb9db2a8471ed7eebe3c3c932da413911042994e699b384fbb4493fa872d7", size = 32596, upload-time = "2026-10-07T23:30:30.825Z" }, ] [[package]] @@ -917,18 +917,18 @@ dependencies = [ { name = "narwhals" }, { name = "packaging" }, ] -sdist = { url = "https://files.pythonhosted.org/packages/49/c3/72b369f5ed7701b04ab0ea3dcf83e9bbce71c0b3bc6f07f87568550d09ea/plotly-7.1.0.tar.gz", hash = "sha256:f860166a4a3d78c69cb1f4a15f28a5c8283eade98a282a698f3bb853a449ace5", size = 6689315 } +sdist = { url = "https://files.pythonhosted.org/packages/49/c3/72b369f5ed7701b04ab0ea3dcf83e9bbce71c0b3bc6f07f87568550d09ea/plotly-7.1.0.tar.gz", hash = "sha256:f860166a4a3d78c69cb1f4a15f28a5c8283eade98a282a698f3bb853a449ace5", size = 6689315, upload-time = "2026-09-15T19:21:21.75Z" } wheels = [ - { url = "https://files.pythonhosted.org/packages/e5/7d/905a3a3d51087515719058c94cfbda2ff0fc14417c20d557ae3e82d8b250/plotly-7.1.0-py3-none-any.whl", hash = "sha256:dbb7fa18afce40d0a8e80d1bf162eceb3faa0ce5a77fe741ad09a74cf78f53f3", size = 9692368 }, + { url = "https://files.pythonhosted.org/packages/e5/7d/905a3a3d51087515719058c94cfbda2ff0fc14417c20d557ae3e82d8b250/plotly-7.1.0-py3-none-any.whl", hash = "sha256:dbb7fa18afce40d0a8e80d1bf162eceb3faa0ce5a77fe741ad09a74cf78f53f3", size = 9692368, upload-time = "2026-09-15T19:21:18.331Z" }, ] [[package]] name = "pluggy" version = "1.6.0" source = { registry = "https://pypi.org/simple" } -sdist = { url = "https://files.pythonhosted.org/packages/f9/e2/3e91f31a7d2b083fe6ef3fa267035b518369d9511ffab804f839851d2779/pluggy-1.6.0.tar.gz", hash = "sha256:7dcc130b76258d33b90f61b658791dede3486c3e6bfb003ee5c9bfb396dd22f3", size = 69412 } +sdist = { url = "https://files.pythonhosted.org/packages/f9/e2/3e91f31a7d2b083fe6ef3fa267035b518369d9511ffab804f839851d2779/pluggy-1.6.0.tar.gz", hash = "sha256:7dcc130b76258d33b90f61b658791dede3486c3e6bfb003ee5c9bfb396dd22f3", size = 69412, upload-time = "2025-05-15T12:30:07.975Z" } wheels = [ - { url = "https://files.pythonhosted.org/packages/54/20/4d324d65cc6d9205fabedc306948156824eb9f0ee1633355a8f7ec5c66bf/pluggy-1.6.0-py3-none-any.whl", hash = "sha256:e920276dd6813095e9377c0bc5566d94c932c33b27a3e3945d8389c374dd4746", size = 20538 }, + { url = "https://files.pythonhosted.org/packages/54/20/4d324d65cc6d9205fabedc306948156824eb9f0ee1633355a8f7ec5c66bf/pluggy-1.6.0-py3-none-any.whl", hash = "sha256:e920276dd6813095e9377c0bc5566d94c932c33b27a3e3945d8389c374dd4746", size = 20538, upload-time = "2025-05-15T12:30:06.134Z" }, ] [[package]] @@ -938,9 +938,9 @@ source = { registry = "https://pypi.org/simple" } dependencies = [ { name = "six" }, ] -sdist = { url = "https://files.pythonhosted.org/packages/df/8e/0601097cfcce2e8c2297db5080e9719f549c2bd4b94420ddc8d3f848bbca/pockets-0.9.1.tar.gz", hash = "sha256:9320f1a3c6f7a9133fe3b571f283bcf3353cd70249025ae8d618e40e9f7e92b3", size = 24993 } +sdist = { url = "https://files.pythonhosted.org/packages/df/8e/0601097cfcce2e8c2297db5080e9719f549c2bd4b94420ddc8d3f848bbca/pockets-0.9.1.tar.gz", hash = "sha256:9320f1a3c6f7a9133fe3b571f283bcf3353cd70249025ae8d618e40e9f7e92b3", size = 24993, upload-time = "2019-11-02T14:46:19.433Z" } wheels = [ - { url = "https://files.pythonhosted.org/packages/e9/2f/a4583c70fbd8cd04910e2884bcc2bdd670e884061f7b4d70bc13e632a993/pockets-0.9.1-py2.py3-none-any.whl", hash = "sha256:68597934193c08a08eb2bf6a1d85593f627c22f9b065cc727a4f03f669d96d86", size = 26263 }, + { url = "https://files.pythonhosted.org/packages/e9/2f/a4583c70fbd8cd04910e2884bcc2bdd670e884061f7b4d70bc13e632a993/pockets-0.9.1-py2.py3-none-any.whl", hash = "sha256:68597934193c08a08eb2bf6a1d85593f627c22f9b065cc727a4f03f669d96d86", size = 26263, upload-time = "2019-11-02T14:46:17.814Z" }, ] [[package]] @@ -950,70 +950,70 @@ source = { registry = "https://pypi.org/simple" } dependencies = [ { name = "wcwidth" }, ] -sdist = { url = "https://files.pythonhosted.org/packages/7d/ea/39b988c938f75cb75d7045b5c69f8bfed47ee2152c8837fb403de29d6fb8/prompt_toolkit-3.0.53.tar.gz", hash = "sha256:9ec8a0ad96d5c56148b3f914aa79c1564c3fde5d2e6b876e7bc327e353cf8fa6", size = 435492 } +sdist = { url = "https://files.pythonhosted.org/packages/7d/ea/39b988c938f75cb75d7045b5c69f8bfed47ee2152c8837fb403de29d6fb8/prompt_toolkit-3.0.53.tar.gz", hash = "sha256:9ec8a0ad96d5c56148b3f914aa79c1564c3fde5d2e6b876e7bc327e353cf8fa6", size = 435492, upload-time = "2026-07-26T20:56:14.758Z" } wheels = [ - { url = "https://files.pythonhosted.org/packages/54/6f/84908cad2d6aa5144abcf7b42709fe4fdb459bc640ec7ac5786e7693dabc/prompt_toolkit-3.0.53-py3-none-any.whl", hash = "sha256:01c0891d7f9237d5e339f7d3e42cdae80b7534abb1c7c0e3352efba6231492f2", size = 392288 }, + { url = "https://files.pythonhosted.org/packages/54/6f/84908cad2d6aa5144abcf7b42709fe4fdb459bc640ec7ac5786e7693dabc/prompt_toolkit-3.0.53-py3-none-any.whl", hash = "sha256:01c0891d7f9237d5e339f7d3e42cdae80b7534abb1c7c0e3352efba6231492f2", size = 392288, upload-time = "2026-07-26T20:56:12.512Z" }, ] [[package]] name = "psutil" version = "7.2.2" source = { registry = "https://pypi.org/simple" } -sdist = { url = "https://files.pythonhosted.org/packages/aa/c6/d1ddf4abb55e93cebc4f2ed8b5d6dbad109ecb8d63748dd2b20ab5e57ebe/psutil-7.2.2.tar.gz", hash = "sha256:0746f5f8d406af344fd547f1c8daa5f5c33dbc293bb8d6a16d80b4bb88f59372", size = 493740 } +sdist = { url = "https://files.pythonhosted.org/packages/aa/c6/d1ddf4abb55e93cebc4f2ed8b5d6dbad109ecb8d63748dd2b20ab5e57ebe/psutil-7.2.2.tar.gz", hash = "sha256:0746f5f8d406af344fd547f1c8daa5f5c33dbc293bb8d6a16d80b4bb88f59372", size = 493740, upload-time = "2026-01-28T18:14:54.428Z" } wheels = [ - { url = "https://files.pythonhosted.org/packages/e7/36/5ee6e05c9bd427237b11b3937ad82bb8ad2752d72c6969314590dd0c2f6e/psutil-7.2.2-cp36-abi3-macosx_10_9_x86_64.whl", hash = "sha256:ed0cace939114f62738d808fdcecd4c869222507e266e574799e9c0faa17d486", size = 129090 }, - { url = "https://files.pythonhosted.org/packages/80/c4/f5af4c1ca8c1eeb2e92ccca14ce8effdeec651d5ab6053c589b074eda6e1/psutil-7.2.2-cp36-abi3-macosx_11_0_arm64.whl", hash = "sha256:1a7b04c10f32cc88ab39cbf606e117fd74721c831c98a27dc04578deb0c16979", size = 129859 }, - { url = "https://files.pythonhosted.org/packages/b5/70/5d8df3b09e25bce090399cf48e452d25c935ab72dad19406c77f4e828045/psutil-7.2.2-cp36-abi3-manylinux2010_x86_64.manylinux_2_12_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:076a2d2f923fd4821644f5ba89f059523da90dc9014e85f8e45a5774ca5bc6f9", size = 155560 }, - { url = "https://files.pythonhosted.org/packages/63/65/37648c0c158dc222aba51c089eb3bdfa238e621674dc42d48706e639204f/psutil-7.2.2-cp36-abi3-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:b0726cecd84f9474419d67252add4ac0cd9811b04d61123054b9fb6f57df6e9e", size = 156997 }, - { url = "https://files.pythonhosted.org/packages/8e/13/125093eadae863ce03c6ffdbae9929430d116a246ef69866dad94da3bfbc/psutil-7.2.2-cp36-abi3-musllinux_1_2_aarch64.whl", hash = "sha256:fd04ef36b4a6d599bbdb225dd1d3f51e00105f6d48a28f006da7f9822f2606d8", size = 148972 }, - { url = "https://files.pythonhosted.org/packages/04/78/0acd37ca84ce3ddffaa92ef0f571e073faa6d8ff1f0559ab1272188ea2be/psutil-7.2.2-cp36-abi3-musllinux_1_2_x86_64.whl", hash = "sha256:b58fabe35e80b264a4e3bb23e6b96f9e45a3df7fb7eed419ac0e5947c61e47cc", size = 148266 }, - { url = "https://files.pythonhosted.org/packages/b4/90/e2159492b5426be0c1fef7acba807a03511f97c5f86b3caeda6ad92351a7/psutil-7.2.2-cp37-abi3-win_amd64.whl", hash = "sha256:eb7e81434c8d223ec4a219b5fc1c47d0417b12be7ea866e24fb5ad6e84b3d988", size = 137737 }, - { url = "https://files.pythonhosted.org/packages/8c/c7/7bb2e321574b10df20cbde462a94e2b71d05f9bbda251ef27d104668306a/psutil-7.2.2-cp37-abi3-win_arm64.whl", hash = "sha256:8c233660f575a5a89e6d4cb65d9f938126312bca76d8fe087b947b3a1aaac9ee", size = 134617 }, + { url = "https://files.pythonhosted.org/packages/e7/36/5ee6e05c9bd427237b11b3937ad82bb8ad2752d72c6969314590dd0c2f6e/psutil-7.2.2-cp36-abi3-macosx_10_9_x86_64.whl", hash = "sha256:ed0cace939114f62738d808fdcecd4c869222507e266e574799e9c0faa17d486", size = 129090, upload-time = "2026-01-28T18:15:22.168Z" }, + { url = "https://files.pythonhosted.org/packages/80/c4/f5af4c1ca8c1eeb2e92ccca14ce8effdeec651d5ab6053c589b074eda6e1/psutil-7.2.2-cp36-abi3-macosx_11_0_arm64.whl", hash = "sha256:1a7b04c10f32cc88ab39cbf606e117fd74721c831c98a27dc04578deb0c16979", size = 129859, upload-time = "2026-01-28T18:15:23.795Z" }, + { url = "https://files.pythonhosted.org/packages/b5/70/5d8df3b09e25bce090399cf48e452d25c935ab72dad19406c77f4e828045/psutil-7.2.2-cp36-abi3-manylinux2010_x86_64.manylinux_2_12_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:076a2d2f923fd4821644f5ba89f059523da90dc9014e85f8e45a5774ca5bc6f9", size = 155560, upload-time = "2026-01-28T18:15:25.976Z" }, + { url = "https://files.pythonhosted.org/packages/63/65/37648c0c158dc222aba51c089eb3bdfa238e621674dc42d48706e639204f/psutil-7.2.2-cp36-abi3-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:b0726cecd84f9474419d67252add4ac0cd9811b04d61123054b9fb6f57df6e9e", size = 156997, upload-time = "2026-01-28T18:15:27.794Z" }, + { url = "https://files.pythonhosted.org/packages/8e/13/125093eadae863ce03c6ffdbae9929430d116a246ef69866dad94da3bfbc/psutil-7.2.2-cp36-abi3-musllinux_1_2_aarch64.whl", hash = "sha256:fd04ef36b4a6d599bbdb225dd1d3f51e00105f6d48a28f006da7f9822f2606d8", size = 148972, upload-time = "2026-01-28T18:15:29.342Z" }, + { url = "https://files.pythonhosted.org/packages/04/78/0acd37ca84ce3ddffaa92ef0f571e073faa6d8ff1f0559ab1272188ea2be/psutil-7.2.2-cp36-abi3-musllinux_1_2_x86_64.whl", hash = "sha256:b58fabe35e80b264a4e3bb23e6b96f9e45a3df7fb7eed419ac0e5947c61e47cc", size = 148266, upload-time = "2026-01-28T18:15:31.597Z" }, + { url = "https://files.pythonhosted.org/packages/b4/90/e2159492b5426be0c1fef7acba807a03511f97c5f86b3caeda6ad92351a7/psutil-7.2.2-cp37-abi3-win_amd64.whl", hash = "sha256:eb7e81434c8d223ec4a219b5fc1c47d0417b12be7ea866e24fb5ad6e84b3d988", size = 137737, upload-time = "2026-01-28T18:15:33.849Z" }, + { url = "https://files.pythonhosted.org/packages/8c/c7/7bb2e321574b10df20cbde462a94e2b71d05f9bbda251ef27d104668306a/psutil-7.2.2-cp37-abi3-win_arm64.whl", hash = "sha256:8c233660f575a5a89e6d4cb65d9f938126312bca76d8fe087b947b3a1aaac9ee", size = 134617, upload-time = "2026-01-28T18:15:36.514Z" }, ] [[package]] name = "ptyprocess" version = "0.7.0" source = { registry = "https://pypi.org/simple" } -sdist = { url = "https://files.pythonhosted.org/packages/20/e5/16ff212c1e452235a90aeb09066144d0c5a6a8c0834397e03f5224495c4e/ptyprocess-0.7.0.tar.gz", hash = "sha256:5c5d0a3b48ceee0b48485e0c26037c0acd7d29765ca3fbb5cb3831d347423220", size = 70762 } +sdist = { url = "https://files.pythonhosted.org/packages/20/e5/16ff212c1e452235a90aeb09066144d0c5a6a8c0834397e03f5224495c4e/ptyprocess-0.7.0.tar.gz", hash = "sha256:5c5d0a3b48ceee0b48485e0c26037c0acd7d29765ca3fbb5cb3831d347423220", size = 70762, upload-time = "2020-12-28T15:15:30.155Z" } wheels = [ - { url = "https://files.pythonhosted.org/packages/22/a6/858897256d0deac81a172289110f31629fc4cee19b6f01283303e18c8db3/ptyprocess-0.7.0-py2.py3-none-any.whl", hash = "sha256:4b41f3967fce3af57cc7e94b888626c18bf37a083e3651ca8feeb66d492fef35", size = 13993 }, + { url = "https://files.pythonhosted.org/packages/22/a6/858897256d0deac81a172289110f31629fc4cee19b6f01283303e18c8db3/ptyprocess-0.7.0-py2.py3-none-any.whl", hash = "sha256:4b41f3967fce3af57cc7e94b888626c18bf37a083e3651ca8feeb66d492fef35", size = 13993, upload-time = "2020-12-28T15:15:28.35Z" }, ] [[package]] name = "pure-eval" version = "0.2.4" source = { registry = "https://pypi.org/simple" } -sdist = { url = "https://files.pythonhosted.org/packages/da/9f/abfd2959e9261dd5217ca8551d4de211ca6ab26fe9b72cf44731ff6c4442/pure_eval-0.2.4.tar.gz", hash = "sha256:260c2774686e651b79f8b8e7fc9d80b3599ea6a66334b47d5f4abb69fc2c0ea1", size = 20563 } +sdist = { url = "https://files.pythonhosted.org/packages/da/9f/abfd2959e9261dd5217ca8551d4de211ca6ab26fe9b72cf44731ff6c4442/pure_eval-0.2.4.tar.gz", hash = "sha256:260c2774686e651b79f8b8e7fc9d80b3599ea6a66334b47d5f4abb69fc2c0ea1", size = 20563, upload-time = "2026-09-10T21:41:22.836Z" } wheels = [ - { url = "https://files.pythonhosted.org/packages/6d/18/83376915176eb058cb86470eb7396388a13350b09a8f233a79303bbcbc5b/pure_eval-0.2.4-py3-none-any.whl", hash = "sha256:96cae060a313cfaad51bb761278bfb0e62dc0248d9315a81173752dc546cd37a", size = 11893 }, + { url = "https://files.pythonhosted.org/packages/6d/18/83376915176eb058cb86470eb7396388a13350b09a8f233a79303bbcbc5b/pure_eval-0.2.4-py3-none-any.whl", hash = "sha256:96cae060a313cfaad51bb761278bfb0e62dc0248d9315a81173752dc546cd37a", size = 11893, upload-time = "2026-09-10T21:41:21.532Z" }, ] [[package]] name = "py" version = "1.11.0" source = { registry = "https://pypi.org/simple" } -sdist = { url = "https://files.pythonhosted.org/packages/98/ff/fec109ceb715d2a6b4c4a85a61af3b40c723a961e8828319fbcb15b868dc/py-1.11.0.tar.gz", hash = "sha256:51c75c4126074b472f746a24399ad32f6053d1b34b68d2fa41e558e6f4a98719", size = 207796 } +sdist = { url = "https://files.pythonhosted.org/packages/98/ff/fec109ceb715d2a6b4c4a85a61af3b40c723a961e8828319fbcb15b868dc/py-1.11.0.tar.gz", hash = "sha256:51c75c4126074b472f746a24399ad32f6053d1b34b68d2fa41e558e6f4a98719", size = 207796, upload-time = "2021-11-04T17:17:01.377Z" } wheels = [ - { url = "https://files.pythonhosted.org/packages/f6/f0/10642828a8dfb741e5f3fbaac830550a518a775c7fff6f04a007259b0548/py-1.11.0-py2.py3-none-any.whl", hash = "sha256:607c53218732647dff4acdfcd50cb62615cedf612e72d1724fb1a0cc6405b378", size = 98708 }, + { url = "https://files.pythonhosted.org/packages/f6/f0/10642828a8dfb741e5f3fbaac830550a518a775c7fff6f04a007259b0548/py-1.11.0-py2.py3-none-any.whl", hash = "sha256:607c53218732647dff4acdfcd50cb62615cedf612e72d1724fb1a0cc6405b378", size = 98708, upload-time = "2021-11-04T17:17:00.152Z" }, ] [[package]] name = "py-cpuinfo2" version = "10.1.1" source = { registry = "https://pypi.org/simple" } -sdist = { url = "https://files.pythonhosted.org/packages/dc/97/a8b1ddada14c8280a047c0746f95cb05d94a31b1a331cea22bcdc2b2a82d/py_cpuinfo2-10.1.1.tar.gz", hash = "sha256:7861133863663f16e06eca63b12904ef100b5760415e92372dac0162799a4771", size = 100840 } +sdist = { url = "https://files.pythonhosted.org/packages/dc/97/a8b1ddada14c8280a047c0746f95cb05d94a31b1a331cea22bcdc2b2a82d/py_cpuinfo2-10.1.1.tar.gz", hash = "sha256:7861133863663f16e06eca63b12904ef100b5760415e92372dac0162799a4771", size = 100840, upload-time = "2026-03-25T21:49:40.797Z" } wheels = [ - { url = "https://files.pythonhosted.org/packages/23/0a/ba69d2dde1ae12ef1d389ea5a216384c5ff6ef7a1e7a48d1e9b6686f6790/py_cpuinfo2-10.1.1-py3-none-any.whl", hash = "sha256:adc53396bfb206e6498d078ec2ab407f85799ecd819584ac36a8f80a2d4d762d", size = 23791 }, + { url = "https://files.pythonhosted.org/packages/23/0a/ba69d2dde1ae12ef1d389ea5a216384c5ff6ef7a1e7a48d1e9b6686f6790/py_cpuinfo2-10.1.1-py3-none-any.whl", hash = "sha256:adc53396bfb206e6498d078ec2ab407f85799ecd819584ac36a8f80a2d4d762d", size = 23791, upload-time = "2026-03-25T21:49:39.574Z" }, ] [[package]] name = "pycparser" version = "3.11" source = { registry = "https://pypi.org/simple" } -sdist = { url = "https://files.pythonhosted.org/packages/da/a8/c5fdbeee588bb8ada9458774f43adf1bdd30bd59157055142183e769a024/pycparser-3.11.tar.gz", hash = "sha256:d875f09c3507d00e1aba0eecc6dcadc1352f30fff09dc6bff2f1c2935e97c2bc", size = 113796 } +sdist = { url = "https://files.pythonhosted.org/packages/da/a8/c5fdbeee588bb8ada9458774f43adf1bdd30bd59157055142183e769a024/pycparser-3.11.tar.gz", hash = "sha256:d875f09c3507d00e1aba0eecc6dcadc1352f30fff09dc6bff2f1c2935e97c2bc", size = 113796, upload-time = "2026-10-09T12:56:59.539Z" } wheels = [ - { url = "https://files.pythonhosted.org/packages/90/11/0e6f11117525ff0eec40ebac3d313376f102df93ca44ad9e893ee85e4f89/pycparser-3.11-py3-none-any.whl", hash = "sha256:51d5a8ba2be0bbe440b99d2112604c95bbbc3c2748a64260186c541e1729cd80", size = 51178 }, + { url = "https://files.pythonhosted.org/packages/90/11/0e6f11117525ff0eec40ebac3d313376f102df93ca44ad9e893ee85e4f89/pycparser-3.11-py3-none-any.whl", hash = "sha256:51d5a8ba2be0bbe440b99d2112604c95bbbc3c2748a64260186c541e1729cd80", size = 51178, upload-time = "2026-10-09T12:56:58.131Z" }, ] [[package]] @@ -1029,9 +1029,9 @@ dependencies = [ { name = "sphinx" }, { name = "typing-extensions" }, ] -sdist = { url = "https://files.pythonhosted.org/packages/39/7e/e3defb93f30557ae825a3b3fbc2c6728301e5e9505a85e00d8503345c42c/pydata_sphinx_theme-0.19.0.tar.gz", hash = "sha256:148ba092bd6937b3321385dc482cc69a29ad2ede36547b4f010ade782bc6a062", size = 5004933 } +sdist = { url = "https://files.pythonhosted.org/packages/39/7e/e3defb93f30557ae825a3b3fbc2c6728301e5e9505a85e00d8503345c42c/pydata_sphinx_theme-0.19.0.tar.gz", hash = "sha256:148ba092bd6937b3321385dc482cc69a29ad2ede36547b4f010ade782bc6a062", size = 5004933, upload-time = "2026-06-15T09:31:02.268Z" } wheels = [ - { url = "https://files.pythonhosted.org/packages/54/77/bdb5a4c0e8e33c08f31fd175a5af0bc5e29f1b43ffa9e963f4c4f9bfbc97/pydata_sphinx_theme-0.19.0-py3-none-any.whl", hash = "sha256:5d7dfe3beb0facc88b5d78ff4a4c948f214cc0e03aae27e7fc58286e963b588b", size = 6201132 }, + { url = "https://files.pythonhosted.org/packages/54/77/bdb5a4c0e8e33c08f31fd175a5af0bc5e29f1b43ffa9e963f4c4f9bfbc97/pydata_sphinx_theme-0.19.0-py3-none-any.whl", hash = "sha256:5d7dfe3beb0facc88b5d78ff4a4c948f214cc0e03aae27e7fc58286e963b588b", size = 6201132, upload-time = "2026-06-15T09:30:59.966Z" }, ] [[package]] @@ -1041,18 +1041,18 @@ source = { registry = "https://pypi.org/simple" } dependencies = [ { name = "snowballstemmer" }, ] -sdist = { url = "https://files.pythonhosted.org/packages/e9/5c/d5385ca59fd065e3c6a5fe19f9bc9d5ea7f2509fa8c9c22fb6b2031dd953/pydocstyle-6.3.0.tar.gz", hash = "sha256:7ce43f0c0ac87b07494eb9c0b462c0b73e6ff276807f204d6b53edc72b7e44e1", size = 36796 } +sdist = { url = "https://files.pythonhosted.org/packages/e9/5c/d5385ca59fd065e3c6a5fe19f9bc9d5ea7f2509fa8c9c22fb6b2031dd953/pydocstyle-6.3.0.tar.gz", hash = "sha256:7ce43f0c0ac87b07494eb9c0b462c0b73e6ff276807f204d6b53edc72b7e44e1", size = 36796, upload-time = "2023-01-17T20:29:19.838Z" } wheels = [ - { url = "https://files.pythonhosted.org/packages/36/ea/99ddefac41971acad68f14114f38261c1f27dac0b3ec529824ebc739bdaa/pydocstyle-6.3.0-py3-none-any.whl", hash = "sha256:118762d452a49d6b05e194ef344a55822987a462831ade91ec5c06fd2169d019", size = 38038 }, + { url = "https://files.pythonhosted.org/packages/36/ea/99ddefac41971acad68f14114f38261c1f27dac0b3ec529824ebc739bdaa/pydocstyle-6.3.0-py3-none-any.whl", hash = "sha256:118762d452a49d6b05e194ef344a55822987a462831ade91ec5c06fd2169d019", size = 38038, upload-time = "2023-01-17T20:29:18.094Z" }, ] [[package]] name = "pygments" version = "2.21.0" source = { registry = "https://pypi.org/simple" } -sdist = { url = "https://files.pythonhosted.org/packages/49/2e/ced460408999b33da6b31b0021b0f37d329e202d4169aeb164493778f25b/pygments-2.21.0.tar.gz", hash = "sha256:610ca751c9bc2492b38eb9a38a7fbc93edbbb2d7182edaf34e66ae493dee5c8c", size = 5005329 } +sdist = { url = "https://files.pythonhosted.org/packages/49/2e/ced460408999b33da6b31b0021b0f37d329e202d4169aeb164493778f25b/pygments-2.21.0.tar.gz", hash = "sha256:610ca751c9bc2492b38eb9a38a7fbc93edbbb2d7182edaf34e66ae493dee5c8c", size = 5005329, upload-time = "2026-08-17T08:02:48.824Z" } wheels = [ - { url = "https://files.pythonhosted.org/packages/71/46/17f022dd3e953bf20a04a028a21ec746d942f8d2af30fa0f124fa0e6a684/pygments-2.21.0-py3-none-any.whl", hash = "sha256:2363c69b61c4a97c838da3b130dcd6468f4848992b21a82f2a63ec34377137d9", size = 1250147 }, + { url = "https://files.pythonhosted.org/packages/71/46/17f022dd3e953bf20a04a028a21ec746d942f8d2af30fa0f124fa0e6a684/pygments-2.21.0-py3-none-any.whl", hash = "sha256:2363c69b61c4a97c838da3b130dcd6468f4848992b21a82f2a63ec34377137d9", size = 1250147, upload-time = "2026-08-17T08:02:44.912Z" }, ] [[package]] @@ -1069,18 +1069,18 @@ dependencies = [ { name = "tomli" }, { name = "tomlkit" }, ] -sdist = { url = "https://files.pythonhosted.org/packages/38/c9/0bde4152a05a7686b431ce216fe3f3698b0c0d94c20bfa256dd935b608f6/pylint-4.1.3.tar.gz", hash = "sha256:9928603068edfa0d1a3c167f174b099d4b97c3db75d32d0fcdd029770b4713a9", size = 1756180 } +sdist = { url = "https://files.pythonhosted.org/packages/38/c9/0bde4152a05a7686b431ce216fe3f3698b0c0d94c20bfa256dd935b608f6/pylint-4.1.3.tar.gz", hash = "sha256:9928603068edfa0d1a3c167f174b099d4b97c3db75d32d0fcdd029770b4713a9", size = 1756180, upload-time = "2026-10-11T07:49:10.69Z" } wheels = [ - { url = "https://files.pythonhosted.org/packages/3f/ba/62b18e2e157d05f976bd490b349b55d8850c2a454a5c313c91af9d2e0baf/pylint-4.1.3-py3-none-any.whl", hash = "sha256:a85357cae24f33ad8d86c8f3daaa92c600ae4012b54a57299cee76000e9364cf", size = 588959 }, + { url = "https://files.pythonhosted.org/packages/3f/ba/62b18e2e157d05f976bd490b349b55d8850c2a454a5c313c91af9d2e0baf/pylint-4.1.3-py3-none-any.whl", hash = "sha256:a85357cae24f33ad8d86c8f3daaa92c600ae4012b54a57299cee76000e9364cf", size = 588959, upload-time = "2026-10-11T07:49:08.272Z" }, ] [[package]] name = "pyparsing" version = "3.3.3" source = { registry = "https://pypi.org/simple" } -sdist = { url = "https://files.pythonhosted.org/packages/e4/11/b213bebff182584360cb8d17c72c1677fec5c5c228de439e63bcf8ab1c8f/pyparsing-3.3.3.tar.gz", hash = "sha256:928ae7e20211f3b6f3915a72f06a0cfd29ab9d24279dd6346b6b1a7146397d36", size = 1050487 } +sdist = { url = "https://files.pythonhosted.org/packages/e4/11/b213bebff182584360cb8d17c72c1677fec5c5c228de439e63bcf8ab1c8f/pyparsing-3.3.3.tar.gz", hash = "sha256:928ae7e20211f3b6f3915a72f06a0cfd29ab9d24279dd6346b6b1a7146397d36", size = 1050487, upload-time = "2026-09-20T20:59:05.609Z" } wheels = [ - { url = "https://files.pythonhosted.org/packages/38/bb/d215ee7c73b61497b28a5503f9f53523f294fcc936762b7caf90e0c1c2b5/pyparsing-3.3.3-py3-none-any.whl", hash = "sha256:ece8c00a69cf01b45d0b1dedabb469c90d8caf996d4fda40f147627a122849a4", size = 126420 }, + { url = "https://files.pythonhosted.org/packages/38/bb/d215ee7c73b61497b28a5503f9f53523f294fcc936762b7caf90e0c1c2b5/pyparsing-3.3.3-py3-none-any.whl", hash = "sha256:ece8c00a69cf01b45d0b1dedabb469c90d8caf996d4fda40f147627a122849a4", size = 126420, upload-time = "2026-09-20T20:59:04.025Z" }, ] [[package]] @@ -1096,9 +1096,9 @@ dependencies = [ { name = "pygments" }, { name = "tomli" }, ] -sdist = { url = "https://files.pythonhosted.org/packages/e4/47/b9efed96c114afcfa3c9d3fe98a76a1d14c74a9e266d397cf6eb64be5e01/pytest-9.1.1.tar.gz", hash = "sha256:1088fbde8f2b49d95a549a195707afa7a76a3ce9bcadc26b6d71f0ffda5fe313", size = 1636369 } +sdist = { url = "https://files.pythonhosted.org/packages/e4/47/b9efed96c114afcfa3c9d3fe98a76a1d14c74a9e266d397cf6eb64be5e01/pytest-9.1.1.tar.gz", hash = "sha256:1088fbde8f2b49d95a549a195707afa7a76a3ce9bcadc26b6d71f0ffda5fe313", size = 1636369, upload-time = "2026-06-19T10:58:32.857Z" } wheels = [ - { url = "https://files.pythonhosted.org/packages/24/25/1de2678b631f5a49215c6c96fff41ba892b0a34df68d6d80292b1b48aa7f/pytest-9.1.1-py3-none-any.whl", hash = "sha256:37a86b45efb9a47a61a36449063e8e18d0cab3161329fc099eb21783169c4f0c", size = 386536 }, + { url = "https://files.pythonhosted.org/packages/24/25/1de2678b631f5a49215c6c96fff41ba892b0a34df68d6d80292b1b48aa7f/pytest-9.1.1-py3-none-any.whl", hash = "sha256:37a86b45efb9a47a61a36449063e8e18d0cab3161329fc099eb21783169c4f0c", size = 386536, upload-time = "2026-06-19T10:58:31.347Z" }, ] [[package]] @@ -1109,9 +1109,9 @@ dependencies = [ { name = "py-cpuinfo2" }, { name = "pytest" }, ] -sdist = { url = "https://files.pythonhosted.org/packages/63/8f/83a15e40dbc34a580ee56eb56983cae5394c6e94d50cf28fe268e457be25/pytest_benchmark-5.3.0.tar.gz", hash = "sha256:358444d4e89be901ee2b6404fb043ac3d7684002ad7f3563cc153fca6339c965", size = 375410 } +sdist = { url = "https://files.pythonhosted.org/packages/63/8f/83a15e40dbc34a580ee56eb56983cae5394c6e94d50cf28fe268e457be25/pytest_benchmark-5.3.0.tar.gz", hash = "sha256:358444d4e89be901ee2b6404fb043ac3d7684002ad7f3563cc153fca6339c965", size = 375410, upload-time = "2026-08-23T17:45:08.891Z" } wheels = [ - { url = "https://files.pythonhosted.org/packages/eb/42/7e80f7cfa191e0a766d1de99b4661847415ad5db34f8209d81fd42175b59/pytest_benchmark-5.3.0-py3-none-any.whl", hash = "sha256:920ab1dfcffa718d49aa15ba144c7e357bda59216a0dc308016cc1c7236f719d", size = 48401 }, + { url = "https://files.pythonhosted.org/packages/eb/42/7e80f7cfa191e0a766d1de99b4661847415ad5db34f8209d81fd42175b59/pytest_benchmark-5.3.0-py3-none-any.whl", hash = "sha256:920ab1dfcffa718d49aa15ba144c7e357bda59216a0dc308016cc1c7236f719d", size = 48401, upload-time = "2026-08-23T17:45:07.094Z" }, ] [[package]] @@ -1123,9 +1123,9 @@ dependencies = [ { name = "pluggy" }, { name = "pytest" }, ] -sdist = { url = "https://files.pythonhosted.org/packages/b1/51/a849f96e117386044471c8ec2bd6cfebacda285da9525c9106aeb28da671/pytest_cov-7.1.0.tar.gz", hash = "sha256:30674f2b5f6351aa09702a9c8c364f6a01c27aae0c1366ae8016160d1efc56b2", size = 55592 } +sdist = { url = "https://files.pythonhosted.org/packages/b1/51/a849f96e117386044471c8ec2bd6cfebacda285da9525c9106aeb28da671/pytest_cov-7.1.0.tar.gz", hash = "sha256:30674f2b5f6351aa09702a9c8c364f6a01c27aae0c1366ae8016160d1efc56b2", size = 55592, upload-time = "2026-03-21T20:11:16.284Z" } wheels = [ - { url = "https://files.pythonhosted.org/packages/9d/7a/d968e294073affff457b041c2be9868a40c1c71f4a35fcc1e45e5493067b/pytest_cov-7.1.0-py3-none-any.whl", hash = "sha256:a0461110b7865f9a271aa1b51e516c9a95de9d696734a2f71e3e78f46e1d4678", size = 22876 }, + { url = "https://files.pythonhosted.org/packages/9d/7a/d968e294073affff457b041c2be9868a40c1c71f4a35fcc1e45e5493067b/pytest_cov-7.1.0-py3-none-any.whl", hash = "sha256:a0461110b7865f9a271aa1b51e516c9a95de9d696734a2f71e3e78f46e1d4678", size = 22876, upload-time = "2026-03-21T20:11:14.438Z" }, ] [[package]] @@ -1136,7 +1136,7 @@ dependencies = [ { name = "pytest" }, { name = "setuptools" }, ] -sdist = { url = "https://files.pythonhosted.org/packages/c2/ea/84509533e0f6477960b8a9179d240d93c909c6543e4dd8209932026d7815/pytest_dependency-0.6.1.tar.gz", hash = "sha256:246c24d2a5fc743a942cec4408853640e56a05ba58d46e5b213a1d4b738a2464", size = 20837 } +sdist = { url = "https://files.pythonhosted.org/packages/c2/ea/84509533e0f6477960b8a9179d240d93c909c6543e4dd8209932026d7815/pytest_dependency-0.6.1.tar.gz", hash = "sha256:246c24d2a5fc743a942cec4408853640e56a05ba58d46e5b213a1d4b738a2464", size = 20837, upload-time = "2026-02-15T18:08:43.927Z" } [[package]] name = "pytest-xdist" @@ -1146,9 +1146,9 @@ dependencies = [ { name = "execnet" }, { name = "pytest" }, ] -sdist = { url = "https://files.pythonhosted.org/packages/78/b4/439b179d1ff526791eb921115fca8e44e596a13efeda518b9d845a619450/pytest_xdist-3.8.0.tar.gz", hash = "sha256:7e578125ec9bc6050861aa93f2d59f1d8d085595d6551c2c90b6f4fad8d3a9f1", size = 88069 } +sdist = { url = "https://files.pythonhosted.org/packages/78/b4/439b179d1ff526791eb921115fca8e44e596a13efeda518b9d845a619450/pytest_xdist-3.8.0.tar.gz", hash = "sha256:7e578125ec9bc6050861aa93f2d59f1d8d085595d6551c2c90b6f4fad8d3a9f1", size = 88069, upload-time = "2025-07-01T13:30:59.346Z" } wheels = [ - { url = "https://files.pythonhosted.org/packages/ca/31/d4e37e9e550c2b92a9cbc2e4d0b7420a27224968580b5a447f420847c975/pytest_xdist-3.8.0-py3-none-any.whl", hash = "sha256:202ca578cfeb7370784a8c33d6d05bc6e13b4f25b5053c30a152269fd10f0b88", size = 46396 }, + { url = "https://files.pythonhosted.org/packages/ca/31/d4e37e9e550c2b92a9cbc2e4d0b7420a27224968580b5a447f420847c975/pytest_xdist-3.8.0-py3-none-any.whl", hash = "sha256:202ca578cfeb7370784a8c33d6d05bc6e13b4f25b5053c30a152269fd10f0b88", size = 46396, upload-time = "2025-07-01T13:30:56.632Z" }, ] [[package]] @@ -1158,14 +1158,14 @@ source = { registry = "https://pypi.org/simple" } dependencies = [ { name = "six" }, ] -sdist = { url = "https://files.pythonhosted.org/packages/66/c0/0c8b6ad9f17a802ee498c46e004a0eb49bc148f2fd230864601a86dcf6db/python-dateutil-2.9.0.post0.tar.gz", hash = "sha256:37dd54208da7e1cd875388217d5e00ebd4179249f90fb72437e91a35459a0ad3", size = 342432 } +sdist = { url = "https://files.pythonhosted.org/packages/66/c0/0c8b6ad9f17a802ee498c46e004a0eb49bc148f2fd230864601a86dcf6db/python-dateutil-2.9.0.post0.tar.gz", hash = "sha256:37dd54208da7e1cd875388217d5e00ebd4179249f90fb72437e91a35459a0ad3", size = 342432, upload-time = "2024-03-01T18:36:20.211Z" } wheels = [ - { url = "https://files.pythonhosted.org/packages/ec/57/56b9bcc3c9c6a792fcbaf139543cee77261f3651ca9da0c93f5c1221264b/python_dateutil-2.9.0.post0-py2.py3-none-any.whl", hash = "sha256:a8b2bc7bffae282281c8140a97d3aa9c14da0b136dfe83f850eea9a5f7470427", size = 229892 }, + { url = "https://files.pythonhosted.org/packages/ec/57/56b9bcc3c9c6a792fcbaf139543cee77261f3651ca9da0c93f5c1221264b/python_dateutil-2.9.0.post0-py2.py3-none-any.whl", hash = "sha256:a8b2bc7bffae282281c8140a97d3aa9c14da0b136dfe83f850eea9a5f7470427", size = 229892, upload-time = "2024-03-01T18:36:18.57Z" }, ] [[package]] name = "python-toolkit" -version = "0.1.0" +version = "999.999.999" source = { editable = "." } dependencies = [ { name = "matplotlib" }, @@ -1245,19 +1245,19 @@ source = { registry = "https://pypi.org/simple" } dependencies = [ { name = "clr-loader" }, ] -sdist = { url = "https://files.pythonhosted.org/packages/05/57/da1992e44663b71365c6e842c8d7fa453d4ec45fb99a68cfee5b7e944d3c/pythonnet-3.1.0.tar.gz", hash = "sha256:7b34c382905d10a371509ffafd64cae0416305c28817738a9cd138336f4e9991", size = 250599 } +sdist = { url = "https://files.pythonhosted.org/packages/05/57/da1992e44663b71365c6e842c8d7fa453d4ec45fb99a68cfee5b7e944d3c/pythonnet-3.1.0.tar.gz", hash = "sha256:7b34c382905d10a371509ffafd64cae0416305c28817738a9cd138336f4e9991", size = 250599, upload-time = "2026-05-23T20:30:21.578Z" } wheels = [ - { url = "https://files.pythonhosted.org/packages/ac/4b/52414f442624d2589f5374a48c08d5ae94f24bea67fc13a20a752884e5b7/pythonnet-3.1.0-cp310.cp311.cp312.cp313.cp314-none-any.whl", hash = "sha256:698dd88edc198819ad63b624a6ebe76208c7b46e4fe13626f65e484f0358d6ba", size = 217578 }, - { url = "https://files.pythonhosted.org/packages/db/67/031124fdcb937c266a3265118525bbf6dc13b8c79786d6a7290aecb6e7bb/pythonnet-3.1.0-cp310.cp311.cp312.cp313.cp314-none-win32.win_amd64.whl", hash = "sha256:7bdd4de03df3547a48122a3989265c8b31d5be0d19dadffa009eec7df8085e0b", size = 1644898 }, + { url = "https://files.pythonhosted.org/packages/ac/4b/52414f442624d2589f5374a48c08d5ae94f24bea67fc13a20a752884e5b7/pythonnet-3.1.0-cp310.cp311.cp312.cp313.cp314-none-any.whl", hash = "sha256:698dd88edc198819ad63b624a6ebe76208c7b46e4fe13626f65e484f0358d6ba", size = 217578, upload-time = "2026-05-23T20:30:19.527Z" }, + { url = "https://files.pythonhosted.org/packages/db/67/031124fdcb937c266a3265118525bbf6dc13b8c79786d6a7290aecb6e7bb/pythonnet-3.1.0-cp310.cp311.cp312.cp313.cp314-none-win32.win_amd64.whl", hash = "sha256:7bdd4de03df3547a48122a3989265c8b31d5be0d19dadffa009eec7df8085e0b", size = 1644898, upload-time = "2026-05-23T20:30:16.213Z" }, ] [[package]] name = "pytz" version = "2026.5" source = { registry = "https://pypi.org/simple" } -sdist = { url = "https://files.pythonhosted.org/packages/14/21/d83d6ef28c4c912c4bb4d1dcf591f7b8c6bde87b9c66f9f454677314e16d/pytz-2026.5.tar.gz", hash = "sha256:fa23724b9c486543b9ff54a327ee7569ac83ade54bb9afd0fc18676620401c86", size = 318572 } +sdist = { url = "https://files.pythonhosted.org/packages/14/21/d83d6ef28c4c912c4bb4d1dcf591f7b8c6bde87b9c66f9f454677314e16d/pytz-2026.5.tar.gz", hash = "sha256:fa23724b9c486543b9ff54a327ee7569ac83ade54bb9afd0fc18676620401c86", size = 318572, upload-time = "2026-10-04T02:37:58.719Z" } wheels = [ - { url = "https://files.pythonhosted.org/packages/4f/ef/c66110d46fb800dda0bf33164182dfadabe26a90e4476844d502a23dca8e/pytz-2026.5-py2.py3-none-any.whl", hash = "sha256:e658af3757f9e26a9d25dd2aff38335acd92bc9104f890a894b2c1ba28311b03", size = 506342 }, + { url = "https://files.pythonhosted.org/packages/4f/ef/c66110d46fb800dda0bf33164182dfadabe26a90e4476844d502a23dca8e/pytz-2026.5-py2.py3-none-any.whl", hash = "sha256:e658af3757f9e26a9d25dd2aff38335acd92bc9104f890a894b2c1ba28311b03", size = 506342, upload-time = "2026-10-04T02:37:56.814Z" }, ] [[package]] @@ -1265,26 +1265,26 @@ name = "pywin32" version = "312" source = { registry = "https://pypi.org/simple" } wheels = [ - { url = "https://files.pythonhosted.org/packages/fe/1b/9cfdeac80ee45bebbbcb31f1b7b99a0d81a1c72de48d837be984e0e88b1d/pywin32-312-cp310-cp310-win32.whl", hash = "sha256:772235332b5d1024c696f11cea1ae4be7930f0a8b894bb43db14e3f435f1ff7e", size = 6361387 }, - { url = "https://files.pythonhosted.org/packages/33/b1/7afc96d041d982c27bc2df6f853d43f01fd273e3d39d04be3647ddeb533d/pywin32-312-cp310-cp310-win_amd64.whl", hash = "sha256:5dbc35d2b5320dc07f25fa31269cfb767471002b17de5eb067d03da68c7cb2db", size = 6926780 }, - { url = "https://files.pythonhosted.org/packages/ce/3a/4140da9ad54108e517f4a16b2d83da3033e08662144623e1239587cb7db6/pywin32-312-cp310-cp310-win_arm64.whl", hash = "sha256:3020656e34f1cf7faeb7bccd2b84653a607c6ff0c55ada85e6487d61716deabd", size = 4307203 }, + { url = "https://files.pythonhosted.org/packages/fe/1b/9cfdeac80ee45bebbbcb31f1b7b99a0d81a1c72de48d837be984e0e88b1d/pywin32-312-cp310-cp310-win32.whl", hash = "sha256:772235332b5d1024c696f11cea1ae4be7930f0a8b894bb43db14e3f435f1ff7e", size = 6361387, upload-time = "2026-06-04T07:49:14.329Z" }, + { url = "https://files.pythonhosted.org/packages/33/b1/7afc96d041d982c27bc2df6f853d43f01fd273e3d39d04be3647ddeb533d/pywin32-312-cp310-cp310-win_amd64.whl", hash = "sha256:5dbc35d2b5320dc07f25fa31269cfb767471002b17de5eb067d03da68c7cb2db", size = 6926780, upload-time = "2026-06-04T07:49:16.881Z" }, + { url = "https://files.pythonhosted.org/packages/ce/3a/4140da9ad54108e517f4a16b2d83da3033e08662144623e1239587cb7db6/pywin32-312-cp310-cp310-win_arm64.whl", hash = "sha256:3020656e34f1cf7faeb7bccd2b84653a607c6ff0c55ada85e6487d61716deabd", size = 4307203, upload-time = "2026-06-04T07:49:18.993Z" }, ] [[package]] name = "pyyaml" version = "6.0.3" source = { registry = "https://pypi.org/simple" } -sdist = { url = "https://files.pythonhosted.org/packages/05/8e/961c0007c59b8dd7729d542c61a4d537767a59645b82a0b521206e1e25c2/pyyaml-6.0.3.tar.gz", hash = "sha256:d76623373421df22fb4cf8817020cbb7ef15c725b9d5e45f17e189bfc384190f", size = 130960 } +sdist = { url = "https://files.pythonhosted.org/packages/05/8e/961c0007c59b8dd7729d542c61a4d537767a59645b82a0b521206e1e25c2/pyyaml-6.0.3.tar.gz", hash = "sha256:d76623373421df22fb4cf8817020cbb7ef15c725b9d5e45f17e189bfc384190f", size = 130960, upload-time = "2025-09-25T21:33:16.546Z" } wheels = [ - { url = "https://files.pythonhosted.org/packages/f4/a0/39350dd17dd6d6c6507025c0e53aef67a9293a6d37d3511f23ea510d5800/pyyaml-6.0.3-cp310-cp310-macosx_10_13_x86_64.whl", hash = "sha256:214ed4befebe12df36bcc8bc2b64b396ca31be9304b8f59e25c11cf94a4c033b", size = 184227 }, - { url = "https://files.pythonhosted.org/packages/05/14/52d505b5c59ce73244f59c7a50ecf47093ce4765f116cdb98286a71eeca2/pyyaml-6.0.3-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:02ea2dfa234451bbb8772601d7b8e426c2bfa197136796224e50e35a78777956", size = 174019 }, - { url = "https://files.pythonhosted.org/packages/43/f7/0e6a5ae5599c838c696adb4e6330a59f463265bfa1e116cfd1fbb0abaaae/pyyaml-6.0.3-cp310-cp310-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:b30236e45cf30d2b8e7b3e85881719e98507abed1011bf463a8fa23e9c3e98a8", size = 740646 }, - { url = "https://files.pythonhosted.org/packages/2f/3a/61b9db1d28f00f8fd0ae760459a5c4bf1b941baf714e207b6eb0657d2578/pyyaml-6.0.3-cp310-cp310-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:66291b10affd76d76f54fad28e22e51719ef9ba22b29e1d7d03d6777a9174198", size = 840793 }, - { url = "https://files.pythonhosted.org/packages/7a/1e/7acc4f0e74c4b3d9531e24739e0ab832a5edf40e64fbae1a9c01941cabd7/pyyaml-6.0.3-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:9c7708761fccb9397fe64bbc0395abcae8c4bf7b0eac081e12b809bf47700d0b", size = 770293 }, - { url = "https://files.pythonhosted.org/packages/8b/ef/abd085f06853af0cd59fa5f913d61a8eab65d7639ff2a658d18a25d6a89d/pyyaml-6.0.3-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:418cf3f2111bc80e0933b2cd8cd04f286338bb88bdc7bc8e6dd775ebde60b5e0", size = 732872 }, - { url = "https://files.pythonhosted.org/packages/1f/15/2bc9c8faf6450a8b3c9fc5448ed869c599c0a74ba2669772b1f3a0040180/pyyaml-6.0.3-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:5e0b74767e5f8c593e8c9b5912019159ed0533c70051e9cce3e8b6aa699fcd69", size = 758828 }, - { url = "https://files.pythonhosted.org/packages/a3/00/531e92e88c00f4333ce359e50c19b8d1de9fe8d581b1534e35ccfbc5f393/pyyaml-6.0.3-cp310-cp310-win32.whl", hash = "sha256:28c8d926f98f432f88adc23edf2e6d4921ac26fb084b028c733d01868d19007e", size = 142415 }, - { url = "https://files.pythonhosted.org/packages/2a/fa/926c003379b19fca39dd4634818b00dec6c62d87faf628d1394e137354d4/pyyaml-6.0.3-cp310-cp310-win_amd64.whl", hash = "sha256:bdb2c67c6c1390b63c6ff89f210c8fd09d9a1217a465701eac7316313c915e4c", size = 158561 }, + { url = "https://files.pythonhosted.org/packages/f4/a0/39350dd17dd6d6c6507025c0e53aef67a9293a6d37d3511f23ea510d5800/pyyaml-6.0.3-cp310-cp310-macosx_10_13_x86_64.whl", hash = "sha256:214ed4befebe12df36bcc8bc2b64b396ca31be9304b8f59e25c11cf94a4c033b", size = 184227, upload-time = "2025-09-25T21:31:46.04Z" }, + { url = "https://files.pythonhosted.org/packages/05/14/52d505b5c59ce73244f59c7a50ecf47093ce4765f116cdb98286a71eeca2/pyyaml-6.0.3-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:02ea2dfa234451bbb8772601d7b8e426c2bfa197136796224e50e35a78777956", size = 174019, upload-time = "2025-09-25T21:31:47.706Z" }, + { url = "https://files.pythonhosted.org/packages/43/f7/0e6a5ae5599c838c696adb4e6330a59f463265bfa1e116cfd1fbb0abaaae/pyyaml-6.0.3-cp310-cp310-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:b30236e45cf30d2b8e7b3e85881719e98507abed1011bf463a8fa23e9c3e98a8", size = 740646, upload-time = "2025-09-25T21:31:49.21Z" }, + { url = "https://files.pythonhosted.org/packages/2f/3a/61b9db1d28f00f8fd0ae760459a5c4bf1b941baf714e207b6eb0657d2578/pyyaml-6.0.3-cp310-cp310-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:66291b10affd76d76f54fad28e22e51719ef9ba22b29e1d7d03d6777a9174198", size = 840793, upload-time = "2025-09-25T21:31:50.735Z" }, + { url = "https://files.pythonhosted.org/packages/7a/1e/7acc4f0e74c4b3d9531e24739e0ab832a5edf40e64fbae1a9c01941cabd7/pyyaml-6.0.3-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:9c7708761fccb9397fe64bbc0395abcae8c4bf7b0eac081e12b809bf47700d0b", size = 770293, upload-time = "2025-09-25T21:31:51.828Z" }, + { url = "https://files.pythonhosted.org/packages/8b/ef/abd085f06853af0cd59fa5f913d61a8eab65d7639ff2a658d18a25d6a89d/pyyaml-6.0.3-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:418cf3f2111bc80e0933b2cd8cd04f286338bb88bdc7bc8e6dd775ebde60b5e0", size = 732872, upload-time = "2025-09-25T21:31:53.282Z" }, + { url = "https://files.pythonhosted.org/packages/1f/15/2bc9c8faf6450a8b3c9fc5448ed869c599c0a74ba2669772b1f3a0040180/pyyaml-6.0.3-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:5e0b74767e5f8c593e8c9b5912019159ed0533c70051e9cce3e8b6aa699fcd69", size = 758828, upload-time = "2025-09-25T21:31:54.807Z" }, + { url = "https://files.pythonhosted.org/packages/a3/00/531e92e88c00f4333ce359e50c19b8d1de9fe8d581b1534e35ccfbc5f393/pyyaml-6.0.3-cp310-cp310-win32.whl", hash = "sha256:28c8d926f98f432f88adc23edf2e6d4921ac26fb084b028c733d01868d19007e", size = 142415, upload-time = "2025-09-25T21:31:55.885Z" }, + { url = "https://files.pythonhosted.org/packages/2a/fa/926c003379b19fca39dd4634818b00dec6c62d87faf628d1394e137354d4/pyyaml-6.0.3-cp310-cp310-win_amd64.whl", hash = "sha256:bdb2c67c6c1390b63c6ff89f210c8fd09d9a1217a465701eac7316313c915e4c", size = 158561, upload-time = "2025-09-25T21:31:57.406Z" }, ] [[package]] @@ -1294,35 +1294,35 @@ source = { registry = "https://pypi.org/simple" } dependencies = [ { name = "cffi", marker = "implementation_name == 'pypy'" }, ] -sdist = { url = "https://files.pythonhosted.org/packages/e7/8d/5b3d5631c2f4b4b8862f64cd0c9eb777b5710eeb5125b4be8dd0a200a4c0/pyzmq-27.2.0.tar.gz", hash = "sha256:54d4259d1bfae24ecdb5ca79f7acc2eac6c286a02d6a0ae617797cb45f0726d3", size = 292316 } -wheels = [ - { url = "https://files.pythonhosted.org/packages/38/de/c9d653d686ec686bac6ae5f953c784ffc4d2e4a33f9c20d0326aff549ca8/pyzmq-27.2.0-cp310-cp310-macosx_10_15_universal2.whl", hash = "sha256:480dba27b145373b5e103890f17969d891bc9e86746d6b8b29dd70b0d4addc62", size = 1458528 }, - { url = "https://files.pythonhosted.org/packages/13/3a/e3ae8e56fdb87cefbef655dc1d808d5ac76eacf40af850c5d78fd81a7faf/pyzmq-27.2.0-cp310-cp310-manylinux2014_i686.manylinux_2_17_i686.whl", hash = "sha256:722f0a6940be1a483c81029a271d950e04dc2ff113a42e21b3d2b7a0d8e59638", size = 985810 }, - { url = "https://files.pythonhosted.org/packages/03/ee/0ace0abf6315f3f481388826f1e9218802d9b5bb4a01bae5ce42018c3b4e/pyzmq-27.2.0-cp310-cp310-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:3ee556ed1cf836f96de9d5e545563116426d4a94f21b8041fdc79408eff18ebb", size = 713840 }, - { url = "https://files.pythonhosted.org/packages/3b/fd/aee8c87f4854a012e232a6557b1167b6cd207506f59f378954b2d8bb6ed1/pyzmq-27.2.0-cp310-cp310-manylinux_2_26_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:d64da42cae09e6b0c61368b4cc8ca80f23ce3af17584d08053f3dc957433d5ed", size = 888214 }, - { url = "https://files.pythonhosted.org/packages/94/2f/9be34eab874a26aa91315be0b27f94d43d35dad544cbdf28bcd41691afb2/pyzmq-27.2.0-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:376981d106598beb70be384f44d8f589832fd0051d184d38d10043da3cc3b080", size = 1705252 }, - { url = "https://files.pythonhosted.org/packages/7f/26/362344e337d6b5905d65d0c205e91090b39b3b5a59ec9b84dbe88a5dd60c/pyzmq-27.2.0-cp310-cp310-musllinux_1_2_i686.whl", hash = "sha256:40d96cb7a8f6a43aa9617c00215c2b73e1b5e4a1d6cbc9f5860ed7ac682599f0", size = 2075298 }, - { url = "https://files.pythonhosted.org/packages/1d/ee/3b76b91e2bb8c5c12f8ae9ee553eb6254ba0bb048c2f0dea7d945420a0d3/pyzmq-27.2.0-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:4ebc7889b31bc11c72e9f17ba3ebb0a8b0911cce413f41b498e55383a94819a3", size = 1926812 }, - { url = "https://files.pythonhosted.org/packages/9e/ae/83d0740f125a6ef91d5ed29e560679e4c5beeaa3ab1fc87e5fe1128c296d/pyzmq-27.2.0-cp310-cp310-win32.whl", hash = "sha256:650c6cd7cb39a069e7048261efe66fce8bf2e0052c831a7a099b7a0f2ea860d7", size = 571057 }, - { url = "https://files.pythonhosted.org/packages/ce/b3/3e99a7af1c25e84f68c6c7b16c51b664dd51e12d0bc3d252a48d298e9a08/pyzmq-27.2.0-cp310-cp310-win_amd64.whl", hash = "sha256:82a09aa67871d4f2fcafd47bf670fb93210b232a7c2d4b8a54676314edf04033", size = 643232 }, - { url = "https://files.pythonhosted.org/packages/06/cb/785d002a08e630807141b102fd2740cc11623c366bb4606465450bd12e03/pyzmq-27.2.0-cp310-cp310-win_arm64.whl", hash = "sha256:bad4813f270592cedf56977e31ac1fc374fb0f6f67ea5134a5e37c19cb429a8e", size = 567590 }, - { url = "https://files.pythonhosted.org/packages/57/8a/153532fa53db30e116118164f3af269a1f3966b3e2ba32c89b12fe864bd8/pyzmq-27.2.0-cp312-abi3-macosx_10_15_universal2.whl", hash = "sha256:591c8de5851c5ea372194469fe97587b97c3b641e9a70f31bb3474acbfde0241", size = 1431074 }, - { url = "https://files.pythonhosted.org/packages/c8/ef/c08b91248bb90a9efa81fa00ba81b69c157c74d0c5efbb2c319d91babb62/pyzmq-27.2.0-cp312-abi3-manylinux2014_i686.manylinux_2_17_i686.whl", hash = "sha256:00e73942ef12cecbc7951c4a9104bb8ffaed742abb13af2da6833d90dd368cef", size = 973915 }, - { url = "https://files.pythonhosted.org/packages/b4/78/a3a3a86c2b00fadb92ece1ca4f8f028d62b2ce9ac3526097239ab2d6fba9/pyzmq-27.2.0-cp312-abi3-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:1f8079d0521fe94bbb401fe9407578b28f3701627c8be2c9f7e0c5b77dcb0109", size = 697722 }, - { url = "https://files.pythonhosted.org/packages/62/2c/d5828306f795e8d34676d266823b74e2101e0ad3760d12083de3e02abbb2/pyzmq-27.2.0-cp312-abi3-manylinux_2_26_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:dea74fd65f1fc5f7fe167916a473ebe6ed6174e5e5d9de11ea6583661be6cf43", size = 872258 }, - { url = "https://files.pythonhosted.org/packages/09/52/51253b78fd8739293e283407eeecb14215c02c71b6519af21f6eed8e69cd/pyzmq-27.2.0-cp312-abi3-manylinux_2_38_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:dcc99ca132b667a4ed750afd42db4ea73288f18425a9b2e3c0af095665c491f5", size = 739591 }, - { url = "https://files.pythonhosted.org/packages/e6/3e/142c85b67a4c9678629b0cf6d5125b29663d75be69bfaa57a3cac344d780/pyzmq-27.2.0-cp312-abi3-musllinux_1_2_aarch64.whl", hash = "sha256:b8d5f66e4a8246cf77f7b8f7902af64f00553368fa0373c89d99b78f0ad79394", size = 1689031 }, - { url = "https://files.pythonhosted.org/packages/0e/ee/0776fb0f98ed1eb74d77240087fef0ab045b6ad15cb09555c6c5134c98ad/pyzmq-27.2.0-cp312-abi3-musllinux_1_2_i686.whl", hash = "sha256:d1526b42a2e725b84ed226f37becedc250c6347594e5ed304e4e9aff68c9aec3", size = 2059547 }, - { url = "https://files.pythonhosted.org/packages/aa/0e/ec77f691a4aebe29ab6329f996fb0e0270c876a3016086e3ca6ef733bcae/pyzmq-27.2.0-cp312-abi3-musllinux_1_2_x86_64.whl", hash = "sha256:f707bcf2c1d007d14d70531d4dd7b41060881c73efa845580bf6faaf9ea24d42", size = 1910457 }, - { url = "https://files.pythonhosted.org/packages/30/97/1f5530ff4fc271b4597048371d5af972c2baab51be132ba15874e0327a6a/pyzmq-27.2.0-cp312-abi3-win32.whl", hash = "sha256:fdaaa4ea3242f6ad298eb5177eb042aea5c73c30e76d20caee7b15af20d24ec2", size = 563450 }, - { url = "https://files.pythonhosted.org/packages/02/8b/b83f7780dad22e0878e4c7bd9158ebd24ed12bc3d5e3a471cd0576f77ded/pyzmq-27.2.0-cp312-abi3-win_amd64.whl", hash = "sha256:2c218c6ab8bc447ba62054b581fd30209689d199c6ecb253f79615ca74a38e12", size = 628633 }, - { url = "https://files.pythonhosted.org/packages/52/aa/3918b5ac7f9987bd9c421b065074fd7409ded88f856f2c704a24341877ec/pyzmq-27.2.0-cp312-abi3-win_arm64.whl", hash = "sha256:348d6fd3e4b81ae4580622ea8c2ea60224e84b2ac1b3be4482e6edc7de06e7a3", size = 556006 }, - { url = "https://files.pythonhosted.org/packages/8c/26/1a7cd2d8e4e3c27d83a46960e22101b69f527843be140cb3375267aa8ca6/pyzmq-27.2.0-pp310-pypy310_pp73-macosx_10_15_x86_64.whl", hash = "sha256:770a37f28ddfbe1d2c40a2e3ce37e5fd10831daa6ae9634105aa8a5d23507b00", size = 875015 }, - { url = "https://files.pythonhosted.org/packages/b8/ed/c8daf770ca31eb293bef40f801f05148e0a96ad538d55ec3bceb226c91ec/pyzmq-27.2.0-pp310-pypy310_pp73-macosx_11_0_arm64.whl", hash = "sha256:b398c5fe102b41e1559f7ffdae760aabd5f432d73b047b4ae0eac4e01cb594d2", size = 774400 }, - { url = "https://files.pythonhosted.org/packages/64/6f/b958b0785eb15ab7a78913e3df8de705dbf226ce1d0004998fa4872bdd59/pyzmq-27.2.0-pp310-pypy310_pp73-manylinux2014_i686.manylinux_2_17_i686.whl", hash = "sha256:0e1af01858d6dc0c09cea57f9cb1ddf4601f04897b6bb1efc3a2038123c87d79", size = 877993 }, - { url = "https://files.pythonhosted.org/packages/2d/5a/7a070d0e9911441061402013f0c64e5772ee781704c5dae093e6b051c6f6/pyzmq-27.2.0-pp310-pypy310_pp73-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:211350c3ccd4746bc5a85e8fe961bad1f7f2f274f67cf1f785fad7f96f562eea", size = 614493 }, - { url = "https://files.pythonhosted.org/packages/b3/28/833485224e1bd8960cbf3539db465ab2bf23b50de885dc4225a637480539/pyzmq-27.2.0-pp310-pypy310_pp73-manylinux_2_26_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:dde5e291548ca0f397623b5e523db5c90172b32aa4fd3ba464a79ea31a580b43", size = 780573 }, - { url = "https://files.pythonhosted.org/packages/90/8e/52239b9b5fe4f9cf77e272e6a8c548c01ba407d08d3aeeb3220816669ef1/pyzmq-27.2.0-pp310-pypy310_pp73-win_amd64.whl", hash = "sha256:94242bd4de6af7e74665e14a88630bccd615057f6acfaf08a3a432551d604645", size = 553963 }, +sdist = { url = "https://files.pythonhosted.org/packages/e7/8d/5b3d5631c2f4b4b8862f64cd0c9eb777b5710eeb5125b4be8dd0a200a4c0/pyzmq-27.2.0.tar.gz", hash = "sha256:54d4259d1bfae24ecdb5ca79f7acc2eac6c286a02d6a0ae617797cb45f0726d3", size = 292316, upload-time = "2026-08-20T19:08:21.19Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/38/de/c9d653d686ec686bac6ae5f953c784ffc4d2e4a33f9c20d0326aff549ca8/pyzmq-27.2.0-cp310-cp310-macosx_10_15_universal2.whl", hash = "sha256:480dba27b145373b5e103890f17969d891bc9e86746d6b8b29dd70b0d4addc62", size = 1458528, upload-time = "2026-08-20T19:06:11.455Z" }, + { url = "https://files.pythonhosted.org/packages/13/3a/e3ae8e56fdb87cefbef655dc1d808d5ac76eacf40af850c5d78fd81a7faf/pyzmq-27.2.0-cp310-cp310-manylinux2014_i686.manylinux_2_17_i686.whl", hash = "sha256:722f0a6940be1a483c81029a271d950e04dc2ff113a42e21b3d2b7a0d8e59638", size = 985810, upload-time = "2026-08-20T19:06:13.409Z" }, + { url = "https://files.pythonhosted.org/packages/03/ee/0ace0abf6315f3f481388826f1e9218802d9b5bb4a01bae5ce42018c3b4e/pyzmq-27.2.0-cp310-cp310-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:3ee556ed1cf836f96de9d5e545563116426d4a94f21b8041fdc79408eff18ebb", size = 713840, upload-time = "2026-08-20T19:06:14.85Z" }, + { url = "https://files.pythonhosted.org/packages/3b/fd/aee8c87f4854a012e232a6557b1167b6cd207506f59f378954b2d8bb6ed1/pyzmq-27.2.0-cp310-cp310-manylinux_2_26_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:d64da42cae09e6b0c61368b4cc8ca80f23ce3af17584d08053f3dc957433d5ed", size = 888214, upload-time = "2026-08-20T19:06:16.295Z" }, + { url = "https://files.pythonhosted.org/packages/94/2f/9be34eab874a26aa91315be0b27f94d43d35dad544cbdf28bcd41691afb2/pyzmq-27.2.0-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:376981d106598beb70be384f44d8f589832fd0051d184d38d10043da3cc3b080", size = 1705252, upload-time = "2026-08-20T19:06:17.89Z" }, + { url = "https://files.pythonhosted.org/packages/7f/26/362344e337d6b5905d65d0c205e91090b39b3b5a59ec9b84dbe88a5dd60c/pyzmq-27.2.0-cp310-cp310-musllinux_1_2_i686.whl", hash = "sha256:40d96cb7a8f6a43aa9617c00215c2b73e1b5e4a1d6cbc9f5860ed7ac682599f0", size = 2075298, upload-time = "2026-08-20T19:06:19.27Z" }, + { url = "https://files.pythonhosted.org/packages/1d/ee/3b76b91e2bb8c5c12f8ae9ee553eb6254ba0bb048c2f0dea7d945420a0d3/pyzmq-27.2.0-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:4ebc7889b31bc11c72e9f17ba3ebb0a8b0911cce413f41b498e55383a94819a3", size = 1926812, upload-time = "2026-08-20T19:06:20.621Z" }, + { url = "https://files.pythonhosted.org/packages/9e/ae/83d0740f125a6ef91d5ed29e560679e4c5beeaa3ab1fc87e5fe1128c296d/pyzmq-27.2.0-cp310-cp310-win32.whl", hash = "sha256:650c6cd7cb39a069e7048261efe66fce8bf2e0052c831a7a099b7a0f2ea860d7", size = 571057, upload-time = "2026-08-20T19:06:22.078Z" }, + { url = "https://files.pythonhosted.org/packages/ce/b3/3e99a7af1c25e84f68c6c7b16c51b664dd51e12d0bc3d252a48d298e9a08/pyzmq-27.2.0-cp310-cp310-win_amd64.whl", hash = "sha256:82a09aa67871d4f2fcafd47bf670fb93210b232a7c2d4b8a54676314edf04033", size = 643232, upload-time = "2026-08-20T19:06:23.431Z" }, + { url = "https://files.pythonhosted.org/packages/06/cb/785d002a08e630807141b102fd2740cc11623c366bb4606465450bd12e03/pyzmq-27.2.0-cp310-cp310-win_arm64.whl", hash = "sha256:bad4813f270592cedf56977e31ac1fc374fb0f6f67ea5134a5e37c19cb429a8e", size = 567590, upload-time = "2026-08-20T19:06:24.664Z" }, + { url = "https://files.pythonhosted.org/packages/57/8a/153532fa53db30e116118164f3af269a1f3966b3e2ba32c89b12fe864bd8/pyzmq-27.2.0-cp312-abi3-macosx_10_15_universal2.whl", hash = "sha256:591c8de5851c5ea372194469fe97587b97c3b641e9a70f31bb3474acbfde0241", size = 1431074, upload-time = "2026-08-20T19:06:40.601Z" }, + { url = "https://files.pythonhosted.org/packages/c8/ef/c08b91248bb90a9efa81fa00ba81b69c157c74d0c5efbb2c319d91babb62/pyzmq-27.2.0-cp312-abi3-manylinux2014_i686.manylinux_2_17_i686.whl", hash = "sha256:00e73942ef12cecbc7951c4a9104bb8ffaed742abb13af2da6833d90dd368cef", size = 973915, upload-time = "2026-08-20T19:06:42.037Z" }, + { url = "https://files.pythonhosted.org/packages/b4/78/a3a3a86c2b00fadb92ece1ca4f8f028d62b2ce9ac3526097239ab2d6fba9/pyzmq-27.2.0-cp312-abi3-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:1f8079d0521fe94bbb401fe9407578b28f3701627c8be2c9f7e0c5b77dcb0109", size = 697722, upload-time = "2026-08-20T19:06:43.325Z" }, + { url = "https://files.pythonhosted.org/packages/62/2c/d5828306f795e8d34676d266823b74e2101e0ad3760d12083de3e02abbb2/pyzmq-27.2.0-cp312-abi3-manylinux_2_26_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:dea74fd65f1fc5f7fe167916a473ebe6ed6174e5e5d9de11ea6583661be6cf43", size = 872258, upload-time = "2026-08-20T19:06:44.627Z" }, + { url = "https://files.pythonhosted.org/packages/09/52/51253b78fd8739293e283407eeecb14215c02c71b6519af21f6eed8e69cd/pyzmq-27.2.0-cp312-abi3-manylinux_2_38_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:dcc99ca132b667a4ed750afd42db4ea73288f18425a9b2e3c0af095665c491f5", size = 739591, upload-time = "2026-08-20T19:06:46.214Z" }, + { url = "https://files.pythonhosted.org/packages/e6/3e/142c85b67a4c9678629b0cf6d5125b29663d75be69bfaa57a3cac344d780/pyzmq-27.2.0-cp312-abi3-musllinux_1_2_aarch64.whl", hash = "sha256:b8d5f66e4a8246cf77f7b8f7902af64f00553368fa0373c89d99b78f0ad79394", size = 1689031, upload-time = "2026-08-20T19:06:47.612Z" }, + { url = "https://files.pythonhosted.org/packages/0e/ee/0776fb0f98ed1eb74d77240087fef0ab045b6ad15cb09555c6c5134c98ad/pyzmq-27.2.0-cp312-abi3-musllinux_1_2_i686.whl", hash = "sha256:d1526b42a2e725b84ed226f37becedc250c6347594e5ed304e4e9aff68c9aec3", size = 2059547, upload-time = "2026-08-20T19:06:49.064Z" }, + { url = "https://files.pythonhosted.org/packages/aa/0e/ec77f691a4aebe29ab6329f996fb0e0270c876a3016086e3ca6ef733bcae/pyzmq-27.2.0-cp312-abi3-musllinux_1_2_x86_64.whl", hash = "sha256:f707bcf2c1d007d14d70531d4dd7b41060881c73efa845580bf6faaf9ea24d42", size = 1910457, upload-time = "2026-08-20T19:06:50.783Z" }, + { url = "https://files.pythonhosted.org/packages/30/97/1f5530ff4fc271b4597048371d5af972c2baab51be132ba15874e0327a6a/pyzmq-27.2.0-cp312-abi3-win32.whl", hash = "sha256:fdaaa4ea3242f6ad298eb5177eb042aea5c73c30e76d20caee7b15af20d24ec2", size = 563450, upload-time = "2026-08-20T19:06:52.307Z" }, + { url = "https://files.pythonhosted.org/packages/02/8b/b83f7780dad22e0878e4c7bd9158ebd24ed12bc3d5e3a471cd0576f77ded/pyzmq-27.2.0-cp312-abi3-win_amd64.whl", hash = "sha256:2c218c6ab8bc447ba62054b581fd30209689d199c6ecb253f79615ca74a38e12", size = 628633, upload-time = "2026-08-20T19:06:53.809Z" }, + { url = "https://files.pythonhosted.org/packages/52/aa/3918b5ac7f9987bd9c421b065074fd7409ded88f856f2c704a24341877ec/pyzmq-27.2.0-cp312-abi3-win_arm64.whl", hash = "sha256:348d6fd3e4b81ae4580622ea8c2ea60224e84b2ac1b3be4482e6edc7de06e7a3", size = 556006, upload-time = "2026-08-20T19:06:55.242Z" }, + { url = "https://files.pythonhosted.org/packages/8c/26/1a7cd2d8e4e3c27d83a46960e22101b69f527843be140cb3375267aa8ca6/pyzmq-27.2.0-pp310-pypy310_pp73-macosx_10_15_x86_64.whl", hash = "sha256:770a37f28ddfbe1d2c40a2e3ce37e5fd10831daa6ae9634105aa8a5d23507b00", size = 875015, upload-time = "2026-08-20T19:07:52.084Z" }, + { url = "https://files.pythonhosted.org/packages/b8/ed/c8daf770ca31eb293bef40f801f05148e0a96ad538d55ec3bceb226c91ec/pyzmq-27.2.0-pp310-pypy310_pp73-macosx_11_0_arm64.whl", hash = "sha256:b398c5fe102b41e1559f7ffdae760aabd5f432d73b047b4ae0eac4e01cb594d2", size = 774400, upload-time = "2026-08-20T19:07:53.596Z" }, + { url = "https://files.pythonhosted.org/packages/64/6f/b958b0785eb15ab7a78913e3df8de705dbf226ce1d0004998fa4872bdd59/pyzmq-27.2.0-pp310-pypy310_pp73-manylinux2014_i686.manylinux_2_17_i686.whl", hash = "sha256:0e1af01858d6dc0c09cea57f9cb1ddf4601f04897b6bb1efc3a2038123c87d79", size = 877993, upload-time = "2026-08-20T19:07:55.192Z" }, + { url = "https://files.pythonhosted.org/packages/2d/5a/7a070d0e9911441061402013f0c64e5772ee781704c5dae093e6b051c6f6/pyzmq-27.2.0-pp310-pypy310_pp73-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:211350c3ccd4746bc5a85e8fe961bad1f7f2f274f67cf1f785fad7f96f562eea", size = 614493, upload-time = "2026-08-20T19:07:56.77Z" }, + { url = "https://files.pythonhosted.org/packages/b3/28/833485224e1bd8960cbf3539db465ab2bf23b50de885dc4225a637480539/pyzmq-27.2.0-pp310-pypy310_pp73-manylinux_2_26_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:dde5e291548ca0f397623b5e523db5c90172b32aa4fd3ba464a79ea31a580b43", size = 780573, upload-time = "2026-08-20T19:07:58.18Z" }, + { url = "https://files.pythonhosted.org/packages/90/8e/52239b9b5fe4f9cf77e272e6a8c548c01ba407d08d3aeeb3220816669ef1/pyzmq-27.2.0-pp310-pypy310_pp73-win_amd64.whl", hash = "sha256:94242bd4de6af7e74665e14a88630bccd615057f6acfaf08a3a432551d604645", size = 553963, upload-time = "2026-08-20T19:08:00.015Z" }, ] [[package]] @@ -1335,70 +1335,70 @@ dependencies = [ { name = "idna" }, { name = "urllib3" }, ] -sdist = { url = "https://files.pythonhosted.org/packages/ac/c3/e2a2b89f2d3e2179abd6d00ebd70bff6273f37fb3e0cc209f48b39d00cbf/requests-2.34.2.tar.gz", hash = "sha256:f288924cae4e29463698d6d60bc6a4da69c89185ad1e0bcc4104f584e960b9ed", size = 142856 } +sdist = { url = "https://files.pythonhosted.org/packages/ac/c3/e2a2b89f2d3e2179abd6d00ebd70bff6273f37fb3e0cc209f48b39d00cbf/requests-2.34.2.tar.gz", hash = "sha256:f288924cae4e29463698d6d60bc6a4da69c89185ad1e0bcc4104f584e960b9ed", size = 142856, upload-time = "2026-05-14T19:25:27.735Z" } wheels = [ - { url = "https://files.pythonhosted.org/packages/a0/f4/c67b0b3f1b9245e8d266f0f112c500d50e5b4e83cb6f3b71b6528104182a/requests-2.34.2-py3-none-any.whl", hash = "sha256:2a0d60c172f83ac6ab31e4554906c0f3b3588d37b5cb939b1c061f4907e278e0", size = 73075 }, + { url = "https://files.pythonhosted.org/packages/a0/f4/c67b0b3f1b9245e8d266f0f112c500d50e5b4e83cb6f3b71b6528104182a/requests-2.34.2-py3-none-any.whl", hash = "sha256:2a0d60c172f83ac6ab31e4554906c0f3b3588d37b5cb939b1c061f4907e278e0", size = 73075, upload-time = "2026-05-14T19:25:26.443Z" }, ] [[package]] name = "ruff" version = "0.17.0" source = { registry = "https://pypi.org/simple" } -sdist = { url = "https://files.pythonhosted.org/packages/e9/a7/70debb024dfacda67b8e560cc7511f52b34b9348a8cc8c1ec23036dcd51d/ruff-0.17.0.tar.gz", hash = "sha256:5cd03240d8208a557c2a9655a5cb07ebe36aa6bb35065f97d48c1f6adef5a322", size = 5320554 } +sdist = { url = "https://files.pythonhosted.org/packages/e9/a7/70debb024dfacda67b8e560cc7511f52b34b9348a8cc8c1ec23036dcd51d/ruff-0.17.0.tar.gz", hash = "sha256:5cd03240d8208a557c2a9655a5cb07ebe36aa6bb35065f97d48c1f6adef5a322", size = 5320554, upload-time = "2026-10-09T19:47:29.248Z" } wheels = [ - { url = "https://files.pythonhosted.org/packages/bc/f8/ee5ab9da6089eae2a33e6008b01deb1eda19992c1c8e10661e98cee1640f/ruff-0.17.0-py3-none-linux_armv6l.whl", hash = "sha256:0e271826af9a20d18c6cfae8c51e82959167c24859686ddd3eb9a7f0842ce81e", size = 10148907 }, - { url = "https://files.pythonhosted.org/packages/9f/d9/2f81fb5a9d580afbb11b1c8ff915233a11f2a1b27405d7991f183c5e1976/ruff-0.17.0-py3-none-macosx_10_12_x86_64.whl", hash = "sha256:5f0ca4a40f81403689c04f12966e22f44e329ae362072d8f1587b7bda87f603b", size = 10224208 }, - { url = "https://files.pythonhosted.org/packages/a7/20/643f3c8f75594f937b2bf74801241c56a2e2b8e139d24dff8b66b28cdd7f/ruff-0.17.0-py3-none-macosx_11_0_arm64.whl", hash = "sha256:cbf7149e0927dc3295d5d64679a4765576eef71b00782b2ae969ef82274d6bb9", size = 9273324 }, - { url = "https://files.pythonhosted.org/packages/ec/91/627700b233d367736cb274f1bd0b47d1f2b12f68878192812bd875adadc3/ruff-0.17.0-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:13ee90156522998c3037059d8f66885c8adeeaf7643bdce2caceee196ecd23e0", size = 9953190 }, - { url = "https://files.pythonhosted.org/packages/cd/92/91f7b5ed39490f89d6cbf56e1f543c383667a725efa8e2c2dee0f01f5591/ruff-0.17.0-py3-none-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:3d8e4a002a94cd9d0dc48b51dc69d807a172b5b9bf2b668e656424dc5b55ead1", size = 9961746 }, - { url = "https://files.pythonhosted.org/packages/87/c5/7310f9fc63ce11ff6394edbd5e85433dfb0e14c9fbf6ccc97f1538491bc7/ruff-0.17.0-py3-none-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:c0b8a60c06a218c337e1161638d34757f83449243e2db161483ddf948e53ad14", size = 10625483 }, - { url = "https://files.pythonhosted.org/packages/a5/8d/97443f0dca4a03a0bc7629fd396fd494a1cb6666121e38c5075acb217d8f/ruff-0.17.0-py3-none-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:a330178bdffc4205dbf3bda11d93e059e388fd6546f8cdd304501a9160363c0d", size = 11350129 }, - { url = "https://files.pythonhosted.org/packages/9c/0a/c525efd9777be4b6b012e6969a3012648468e7e6c4b3e5b46af69f46e8eb/ruff-0.17.0-py3-none-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:7bb08489e234876fa2da67ae3ea938e9a2156da80293e0e4365abd6973d98329", size = 10906223 }, - { url = "https://files.pythonhosted.org/packages/2c/3c/4a01195d93420cad1175bedad13a515dc8a56f95a6e39789b92e582682f5/ruff-0.17.0-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:bc73e7c133e82d55b5f15897b2a442d72c0cb4a0c886c46801ce3c247150b60c", size = 10386314 }, - { url = "https://files.pythonhosted.org/packages/c7/72/1a3951665485a921f6375f91e754a1854d5a645d41acc3642668064ff64d/ruff-0.17.0-py3-none-manylinux_2_31_riscv64.whl", hash = "sha256:db4f74c533403ab70fe4007873f6ae0c9f94a8b03158cf48d78788e47cdbe399", size = 10565464 }, - { url = "https://files.pythonhosted.org/packages/90/8c/539b4d8c082f57e18db8ae2be85a460d77861c79dcd5798e32b536a6a06f/ruff-0.17.0-py3-none-musllinux_1_2_aarch64.whl", hash = "sha256:3d8cc360e666d1914e47b0777c6906d70cf18891a55532bd0a16844195d70859", size = 10079468 }, - { url = "https://files.pythonhosted.org/packages/e0/b8/84286966db79434e8c26b585b0a0f6897cb3ab1c51a4aa4df10c28488b62/ruff-0.17.0-py3-none-musllinux_1_2_armv7l.whl", hash = "sha256:d66de796b726c4801e05fa99a2a8d7a780e107be222486c304ab61765561e866", size = 9958556 }, - { url = "https://files.pythonhosted.org/packages/69/50/27b6eed27b83fcdd5bfa0d52b83231e29094754374698da404d094487ae3/ruff-0.17.0-py3-none-musllinux_1_2_i686.whl", hash = "sha256:c3f268baf004aea944f040623327119527ea231af15f7fb7890e82cea0679589", size = 10352173 }, - { url = "https://files.pythonhosted.org/packages/2a/fa/955399fd13044cd827862044117d784a59e3196f6cce7424908ac9a7f914/ruff-0.17.0-py3-none-musllinux_1_2_x86_64.whl", hash = "sha256:864b6c1acb6b0bccf94b5a3938a1531fd09aaca5e5659a2e7bf0f3cf2a685540", size = 10791761 }, - { url = "https://files.pythonhosted.org/packages/ae/bf/024e01e1f6aec87768696725e648ed5b438941341eea8f8100beb681961f/ruff-0.17.0-py3-none-win32.whl", hash = "sha256:5e50aa5b84decd9fe5b0bb0e6f71c3b592f1767ed09faa4b7207d933961e35cd", size = 9904112 }, - { url = "https://files.pythonhosted.org/packages/cc/77/1ee73df41dcc8d1cdb686ee4bc46ea29704ea175feb6b95c78420f631ab8/ruff-0.17.0-py3-none-win_amd64.whl", hash = "sha256:8ab76bcda86dfd28e13776cb5de3c7bcdcf1ae3d37ed761113d1a5a415dc134c", size = 10115585 }, - { url = "https://files.pythonhosted.org/packages/fd/71/eb4f0ccc844aece56963e8578df9c95d4c00f580547d52329d4035d3af18/ruff-0.17.0-py3-none-win_arm64.whl", hash = "sha256:c154c73ff43f9854395e24cac507af13078962e53d2b511605058d22af1fdb88", size = 9872035 }, + { url = "https://files.pythonhosted.org/packages/bc/f8/ee5ab9da6089eae2a33e6008b01deb1eda19992c1c8e10661e98cee1640f/ruff-0.17.0-py3-none-linux_armv6l.whl", hash = "sha256:0e271826af9a20d18c6cfae8c51e82959167c24859686ddd3eb9a7f0842ce81e", size = 10148907, upload-time = "2026-10-09T19:46:38.695Z" }, + { url = "https://files.pythonhosted.org/packages/9f/d9/2f81fb5a9d580afbb11b1c8ff915233a11f2a1b27405d7991f183c5e1976/ruff-0.17.0-py3-none-macosx_10_12_x86_64.whl", hash = "sha256:5f0ca4a40f81403689c04f12966e22f44e329ae362072d8f1587b7bda87f603b", size = 10224208, upload-time = "2026-10-09T19:46:41.711Z" }, + { url = "https://files.pythonhosted.org/packages/a7/20/643f3c8f75594f937b2bf74801241c56a2e2b8e139d24dff8b66b28cdd7f/ruff-0.17.0-py3-none-macosx_11_0_arm64.whl", hash = "sha256:cbf7149e0927dc3295d5d64679a4765576eef71b00782b2ae969ef82274d6bb9", size = 9273324, upload-time = "2026-10-09T19:46:44.323Z" }, + { url = "https://files.pythonhosted.org/packages/ec/91/627700b233d367736cb274f1bd0b47d1f2b12f68878192812bd875adadc3/ruff-0.17.0-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:13ee90156522998c3037059d8f66885c8adeeaf7643bdce2caceee196ecd23e0", size = 9953190, upload-time = "2026-10-09T19:46:47.155Z" }, + { url = "https://files.pythonhosted.org/packages/cd/92/91f7b5ed39490f89d6cbf56e1f543c383667a725efa8e2c2dee0f01f5591/ruff-0.17.0-py3-none-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:3d8e4a002a94cd9d0dc48b51dc69d807a172b5b9bf2b668e656424dc5b55ead1", size = 9961746, upload-time = "2026-10-09T19:46:50.098Z" }, + { url = "https://files.pythonhosted.org/packages/87/c5/7310f9fc63ce11ff6394edbd5e85433dfb0e14c9fbf6ccc97f1538491bc7/ruff-0.17.0-py3-none-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:c0b8a60c06a218c337e1161638d34757f83449243e2db161483ddf948e53ad14", size = 10625483, upload-time = "2026-10-09T19:46:53.379Z" }, + { url = "https://files.pythonhosted.org/packages/a5/8d/97443f0dca4a03a0bc7629fd396fd494a1cb6666121e38c5075acb217d8f/ruff-0.17.0-py3-none-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:a330178bdffc4205dbf3bda11d93e059e388fd6546f8cdd304501a9160363c0d", size = 11350129, upload-time = "2026-10-09T19:46:56.486Z" }, + { url = "https://files.pythonhosted.org/packages/9c/0a/c525efd9777be4b6b012e6969a3012648468e7e6c4b3e5b46af69f46e8eb/ruff-0.17.0-py3-none-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:7bb08489e234876fa2da67ae3ea938e9a2156da80293e0e4365abd6973d98329", size = 10906223, upload-time = "2026-10-09T19:47:00.263Z" }, + { url = "https://files.pythonhosted.org/packages/2c/3c/4a01195d93420cad1175bedad13a515dc8a56f95a6e39789b92e582682f5/ruff-0.17.0-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:bc73e7c133e82d55b5f15897b2a442d72c0cb4a0c886c46801ce3c247150b60c", size = 10386314, upload-time = "2026-10-09T19:47:03.057Z" }, + { url = "https://files.pythonhosted.org/packages/c7/72/1a3951665485a921f6375f91e754a1854d5a645d41acc3642668064ff64d/ruff-0.17.0-py3-none-manylinux_2_31_riscv64.whl", hash = "sha256:db4f74c533403ab70fe4007873f6ae0c9f94a8b03158cf48d78788e47cdbe399", size = 10565464, upload-time = "2026-10-09T19:47:05.831Z" }, + { url = "https://files.pythonhosted.org/packages/90/8c/539b4d8c082f57e18db8ae2be85a460d77861c79dcd5798e32b536a6a06f/ruff-0.17.0-py3-none-musllinux_1_2_aarch64.whl", hash = "sha256:3d8cc360e666d1914e47b0777c6906d70cf18891a55532bd0a16844195d70859", size = 10079468, upload-time = "2026-10-09T19:47:08.617Z" }, + { url = "https://files.pythonhosted.org/packages/e0/b8/84286966db79434e8c26b585b0a0f6897cb3ab1c51a4aa4df10c28488b62/ruff-0.17.0-py3-none-musllinux_1_2_armv7l.whl", hash = "sha256:d66de796b726c4801e05fa99a2a8d7a780e107be222486c304ab61765561e866", size = 9958556, upload-time = "2026-10-09T19:47:11.324Z" }, + { url = "https://files.pythonhosted.org/packages/69/50/27b6eed27b83fcdd5bfa0d52b83231e29094754374698da404d094487ae3/ruff-0.17.0-py3-none-musllinux_1_2_i686.whl", hash = "sha256:c3f268baf004aea944f040623327119527ea231af15f7fb7890e82cea0679589", size = 10352173, upload-time = "2026-10-09T19:47:14.188Z" }, + { url = "https://files.pythonhosted.org/packages/2a/fa/955399fd13044cd827862044117d784a59e3196f6cce7424908ac9a7f914/ruff-0.17.0-py3-none-musllinux_1_2_x86_64.whl", hash = "sha256:864b6c1acb6b0bccf94b5a3938a1531fd09aaca5e5659a2e7bf0f3cf2a685540", size = 10791761, upload-time = "2026-10-09T19:47:16.931Z" }, + { url = "https://files.pythonhosted.org/packages/ae/bf/024e01e1f6aec87768696725e648ed5b438941341eea8f8100beb681961f/ruff-0.17.0-py3-none-win32.whl", hash = "sha256:5e50aa5b84decd9fe5b0bb0e6f71c3b592f1767ed09faa4b7207d933961e35cd", size = 9904112, upload-time = "2026-10-09T19:47:19.75Z" }, + { url = "https://files.pythonhosted.org/packages/cc/77/1ee73df41dcc8d1cdb686ee4bc46ea29704ea175feb6b95c78420f631ab8/ruff-0.17.0-py3-none-win_amd64.whl", hash = "sha256:8ab76bcda86dfd28e13776cb5de3c7bcdcf1ae3d37ed761113d1a5a415dc134c", size = 10115585, upload-time = "2026-10-09T19:47:22.698Z" }, + { url = "https://files.pythonhosted.org/packages/fd/71/eb4f0ccc844aece56963e8578df9c95d4c00f580547d52329d4035d3af18/ruff-0.17.0-py3-none-win_arm64.whl", hash = "sha256:c154c73ff43f9854395e24cac507af13078962e53d2b511605058d22af1fdb88", size = 9872035, upload-time = "2026-10-09T19:47:26.306Z" }, ] [[package]] name = "setuptools" version = "84.0.0" source = { registry = "https://pypi.org/simple" } -sdist = { url = "https://files.pythonhosted.org/packages/6d/44/f5da03a8ef95d369145c5bb53050e7877c9f3d312e128605fd9504829143/setuptools-84.0.0.tar.gz", hash = "sha256:f4695c21257f0d9b537ec2692c941d02ee143b7cc1276941349a546573b2ef73", size = 1168449 } +sdist = { url = "https://files.pythonhosted.org/packages/6d/44/f5da03a8ef95d369145c5bb53050e7877c9f3d312e128605fd9504829143/setuptools-84.0.0.tar.gz", hash = "sha256:f4695c21257f0d9b537ec2692c941d02ee143b7cc1276941349a546573b2ef73", size = 1168449, upload-time = "2026-08-08T18:27:58.365Z" } wheels = [ - { url = "https://files.pythonhosted.org/packages/95/9c/c510029fc6ef33a6275cd2c5d3cecd6613dfd6aa401d57c54f1c18852ccf/setuptools-84.0.0-py3-none-any.whl", hash = "sha256:51a52592b3b99e102b609654876bd65f19f999935166d1352678931132b0c670", size = 818216 }, + { url = "https://files.pythonhosted.org/packages/95/9c/c510029fc6ef33a6275cd2c5d3cecd6613dfd6aa401d57c54f1c18852ccf/setuptools-84.0.0-py3-none-any.whl", hash = "sha256:51a52592b3b99e102b609654876bd65f19f999935166d1352678931132b0c670", size = 818216, upload-time = "2026-08-08T18:27:56.719Z" }, ] [[package]] name = "six" version = "1.17.0" source = { registry = "https://pypi.org/simple" } -sdist = { url = "https://files.pythonhosted.org/packages/94/e7/b2c673351809dca68a0e064b6af791aa332cf192da575fd474ed7d6f16a2/six-1.17.0.tar.gz", hash = "sha256:ff70335d468e7eb6ec65b95b99d3a2836546063f63acc5171de367e834932a81", size = 34031 } +sdist = { url = "https://files.pythonhosted.org/packages/94/e7/b2c673351809dca68a0e064b6af791aa332cf192da575fd474ed7d6f16a2/six-1.17.0.tar.gz", hash = "sha256:ff70335d468e7eb6ec65b95b99d3a2836546063f63acc5171de367e834932a81", size = 34031, upload-time = "2024-12-04T17:35:28.174Z" } wheels = [ - { url = "https://files.pythonhosted.org/packages/b7/ce/149a00dd41f10bc29e5921b496af8b574d8413afcd5e30dfa0ed46c2cc5e/six-1.17.0-py2.py3-none-any.whl", hash = "sha256:4721f391ed90541fddacab5acf947aa0d3dc7d27b2e1e8eda2be8970586c3274", size = 11050 }, + { url = "https://files.pythonhosted.org/packages/b7/ce/149a00dd41f10bc29e5921b496af8b574d8413afcd5e30dfa0ed46c2cc5e/six-1.17.0-py2.py3-none-any.whl", hash = "sha256:4721f391ed90541fddacab5acf947aa0d3dc7d27b2e1e8eda2be8970586c3274", size = 11050, upload-time = "2024-12-04T17:35:26.475Z" }, ] [[package]] name = "snowballstemmer" version = "3.1.1" source = { registry = "https://pypi.org/simple" } -sdist = { url = "https://files.pythonhosted.org/packages/43/f8/0a71edf031f03c40db17503cb8ca78a69a171254e568e7db241b0ab57ea1/snowballstemmer-3.1.1.tar.gz", hash = "sha256:e07bbc54a0d798fe6010a12398422e62a8bfbba95c394fd0956ef58cb4d3e260", size = 123314 } +sdist = { url = "https://files.pythonhosted.org/packages/43/f8/0a71edf031f03c40db17503cb8ca78a69a171254e568e7db241b0ab57ea1/snowballstemmer-3.1.1.tar.gz", hash = "sha256:e07bbc54a0d798fe6010a12398422e62a8bfbba95c394fd0956ef58cb4d3e260", size = 123314, upload-time = "2026-06-03T00:56:40.194Z" } wheels = [ - { url = "https://files.pythonhosted.org/packages/4c/07/2ebca9b11fb9be7340a818d8d6f63feaebb146be2c4afbd6061701d6df6e/snowballstemmer-3.1.1-py3-none-any.whl", hash = "sha256:7e207fa178741da09cdee59d3ecec3827ad5f92b1fc5c9ff3755b639f71f5752", size = 104164 }, + { url = "https://files.pythonhosted.org/packages/4c/07/2ebca9b11fb9be7340a818d8d6f63feaebb146be2c4afbd6061701d6df6e/snowballstemmer-3.1.1-py3-none-any.whl", hash = "sha256:7e207fa178741da09cdee59d3ecec3827ad5f92b1fc5c9ff3755b639f71f5752", size = 104164, upload-time = "2026-06-03T00:56:38.614Z" }, ] [[package]] name = "soupsieve" version = "2.10" source = { registry = "https://pypi.org/simple" } -sdist = { url = "https://files.pythonhosted.org/packages/71/c3/1b817965ac12dc002d7c9cd7dfffdd7d4fbf9b45763ef2ffe7b86ee94670/soupsieve-2.10.tar.gz", hash = "sha256:49e9380d7d2905463583bafe285e818c7366a9ed7b3aee221c1ac79c905d8bc0", size = 124337 } +sdist = { url = "https://files.pythonhosted.org/packages/71/c3/1b817965ac12dc002d7c9cd7dfffdd7d4fbf9b45763ef2ffe7b86ee94670/soupsieve-2.10.tar.gz", hash = "sha256:49e9380d7d2905463583bafe285e818c7366a9ed7b3aee221c1ac79c905d8bc0", size = 124337, upload-time = "2026-09-24T02:36:35.048Z" } wheels = [ - { url = "https://files.pythonhosted.org/packages/66/87/5ed59e1d0290564e2027ed066c52b059892c4637741337fc0967183c8d4d/soupsieve-2.10-py3-none-any.whl", hash = "sha256:8596eb8967d744174820280fa62b4542a2e955bfaccca73ed8a13c6eb8e9b502", size = 38019 }, + { url = "https://files.pythonhosted.org/packages/66/87/5ed59e1d0290564e2027ed066c52b059892c4637741337fc0967183c8d4d/soupsieve-2.10-py3-none-any.whl", hash = "sha256:8596eb8967d744174820280fa62b4542a2e955bfaccca73ed8a13c6eb8e9b502", size = 38019, upload-time = "2026-09-24T02:36:33.709Z" }, ] [[package]] @@ -1424,9 +1424,9 @@ dependencies = [ { name = "sphinxcontrib-serializinghtml" }, { name = "tomli" }, ] -sdist = { url = "https://files.pythonhosted.org/packages/6f/6d/be0b61178fe2cdcb67e2a92fc9ebb488e3c51c4f74a36a7824c0adf23425/sphinx-8.1.3.tar.gz", hash = "sha256:43c1911eecb0d3e161ad78611bc905d1ad0e523e4ddc202a58a821773dc4c927", size = 8184611 } +sdist = { url = "https://files.pythonhosted.org/packages/6f/6d/be0b61178fe2cdcb67e2a92fc9ebb488e3c51c4f74a36a7824c0adf23425/sphinx-8.1.3.tar.gz", hash = "sha256:43c1911eecb0d3e161ad78611bc905d1ad0e523e4ddc202a58a821773dc4c927", size = 8184611, upload-time = "2024-10-13T20:27:13.93Z" } wheels = [ - { url = "https://files.pythonhosted.org/packages/26/60/1ddff83a56d33aaf6f10ec8ce84b4c007d9368b21008876fceda7e7381ef/sphinx-8.1.3-py3-none-any.whl", hash = "sha256:09719015511837b76bf6e03e42eb7595ac8c2e41eeb9c29c5b755c6b677992a2", size = 3487125 }, + { url = "https://files.pythonhosted.org/packages/26/60/1ddff83a56d33aaf6f10ec8ce84b4c007d9368b21008876fceda7e7381ef/sphinx-8.1.3-py3-none-any.whl", hash = "sha256:09719015511837b76bf6e03e42eb7595ac8c2e41eeb9c29c5b755c6b677992a2", size = 3487125, upload-time = "2024-10-13T20:27:10.448Z" }, ] [[package]] @@ -1439,9 +1439,9 @@ dependencies = [ { name = "pyyaml" }, { name = "sphinx" }, ] -sdist = { url = "https://files.pythonhosted.org/packages/09/5e/7b42f3f774aa116741b8031b740c854612ed7dd7d616695e934a2b7fb94f/sphinx_autoapi-3.8.1.tar.gz", hash = "sha256:04643fc50485039294ace8b660d0d1b821a1686824a975725a5106e8cf1fb30b", size = 58898 } +sdist = { url = "https://files.pythonhosted.org/packages/09/5e/7b42f3f774aa116741b8031b740c854612ed7dd7d616695e934a2b7fb94f/sphinx_autoapi-3.8.1.tar.gz", hash = "sha256:04643fc50485039294ace8b660d0d1b821a1686824a975725a5106e8cf1fb30b", size = 58898, upload-time = "2026-08-23T17:04:25.612Z" } wheels = [ - { url = "https://files.pythonhosted.org/packages/72/4e/e49564ab6f38341921ae855451aed2ba9915f61c43780200d5aebb57ae4d/sphinx_autoapi-3.8.1-py3-none-any.whl", hash = "sha256:9a3bd3ee1ba82d537f1620a3922292d43ee8b9ff9c69bc198965ac4bcd5a6775", size = 35975 }, + { url = "https://files.pythonhosted.org/packages/72/4e/e49564ab6f38341921ae855451aed2ba9915f61c43780200d5aebb57ae4d/sphinx_autoapi-3.8.1-py3-none-any.whl", hash = "sha256:9a3bd3ee1ba82d537f1620a3922292d43ee8b9ff9c69bc198965ac4bcd5a6775", size = 35975, upload-time = "2026-08-23T17:04:24.168Z" }, ] [[package]] @@ -1451,60 +1451,60 @@ source = { registry = "https://pypi.org/simple" } dependencies = [ { name = "sphinx" }, ] -sdist = { url = "https://files.pythonhosted.org/packages/98/0b/a866924ded68efec7a1759587a4e478aec7559d8165fac8b2ad1c0e774d6/sphinx_basic_ng-1.0.0b2.tar.gz", hash = "sha256:9ec55a47c90c8c002b5960c57492ec3021f5193cb26cebc2dc4ea226848651c9", size = 20736 } +sdist = { url = "https://files.pythonhosted.org/packages/98/0b/a866924ded68efec7a1759587a4e478aec7559d8165fac8b2ad1c0e774d6/sphinx_basic_ng-1.0.0b2.tar.gz", hash = "sha256:9ec55a47c90c8c002b5960c57492ec3021f5193cb26cebc2dc4ea226848651c9", size = 20736, upload-time = "2023-07-08T18:40:54.166Z" } wheels = [ - { url = "https://files.pythonhosted.org/packages/3c/dd/018ce05c532a22007ac58d4f45232514cd9d6dd0ee1dc374e309db830983/sphinx_basic_ng-1.0.0b2-py3-none-any.whl", hash = "sha256:eb09aedbabfb650607e9b4b68c9d240b90b1e1be221d6ad71d61c52e29f7932b", size = 22496 }, + { url = "https://files.pythonhosted.org/packages/3c/dd/018ce05c532a22007ac58d4f45232514cd9d6dd0ee1dc374e309db830983/sphinx_basic_ng-1.0.0b2-py3-none-any.whl", hash = "sha256:eb09aedbabfb650607e9b4b68c9d240b90b1e1be221d6ad71d61c52e29f7932b", size = 22496, upload-time = "2023-07-08T18:40:52.659Z" }, ] [[package]] name = "sphinx-bootstrap-theme" version = "0.8.1" source = { registry = "https://pypi.org/simple" } -sdist = { url = "https://files.pythonhosted.org/packages/4c/32/2c93f58beec8c85113fcbb3f1e213a1a773baaebfa064509a75d1d2f2320/sphinx-bootstrap-theme-0.8.1.tar.gz", hash = "sha256:683e3b735448dadd0149f76edecf95ff4bd9157787e9e77e0d048ca6f1d680df", size = 1209581 } +sdist = { url = "https://files.pythonhosted.org/packages/4c/32/2c93f58beec8c85113fcbb3f1e213a1a773baaebfa064509a75d1d2f2320/sphinx-bootstrap-theme-0.8.1.tar.gz", hash = "sha256:683e3b735448dadd0149f76edecf95ff4bd9157787e9e77e0d048ca6f1d680df", size = 1209581, upload-time = "2022-02-03T20:27:26.713Z" } wheels = [ - { url = "https://files.pythonhosted.org/packages/3a/97/6b76343a692c6cf4481d3a900a0ee589499f8d642e7bcaf0192f9022305f/sphinx_bootstrap_theme-0.8.1-py2.py3-none-any.whl", hash = "sha256:6ef36206c211846ea6cbdb45bc85645578e7c62d0a883361181708f8b6ea743b", size = 1224297 }, + { url = "https://files.pythonhosted.org/packages/3a/97/6b76343a692c6cf4481d3a900a0ee589499f8d642e7bcaf0192f9022305f/sphinx_bootstrap_theme-0.8.1-py2.py3-none-any.whl", hash = "sha256:6ef36206c211846ea6cbdb45bc85645578e7c62d0a883361181708f8b6ea743b", size = 1224297, upload-time = "2022-02-03T20:27:24.977Z" }, ] [[package]] name = "sphinxcontrib-applehelp" version = "2.0.0" source = { registry = "https://pypi.org/simple" } -sdist = { url = "https://files.pythonhosted.org/packages/ba/6e/b837e84a1a704953c62ef8776d45c3e8d759876b4a84fe14eba2859106fe/sphinxcontrib_applehelp-2.0.0.tar.gz", hash = "sha256:2f29ef331735ce958efa4734873f084941970894c6090408b079c61b2e1c06d1", size = 20053 } +sdist = { url = "https://files.pythonhosted.org/packages/ba/6e/b837e84a1a704953c62ef8776d45c3e8d759876b4a84fe14eba2859106fe/sphinxcontrib_applehelp-2.0.0.tar.gz", hash = "sha256:2f29ef331735ce958efa4734873f084941970894c6090408b079c61b2e1c06d1", size = 20053, upload-time = "2024-07-29T01:09:00.465Z" } wheels = [ - { url = "https://files.pythonhosted.org/packages/5d/85/9ebeae2f76e9e77b952f4b274c27238156eae7979c5421fba91a28f4970d/sphinxcontrib_applehelp-2.0.0-py3-none-any.whl", hash = "sha256:4cd3f0ec4ac5dd9c17ec65e9ab272c9b867ea77425228e68ecf08d6b28ddbdb5", size = 119300 }, + { url = "https://files.pythonhosted.org/packages/5d/85/9ebeae2f76e9e77b952f4b274c27238156eae7979c5421fba91a28f4970d/sphinxcontrib_applehelp-2.0.0-py3-none-any.whl", hash = "sha256:4cd3f0ec4ac5dd9c17ec65e9ab272c9b867ea77425228e68ecf08d6b28ddbdb5", size = 119300, upload-time = "2024-07-29T01:08:58.99Z" }, ] [[package]] name = "sphinxcontrib-devhelp" version = "2.0.0" source = { registry = "https://pypi.org/simple" } -sdist = { url = "https://files.pythonhosted.org/packages/f6/d2/5beee64d3e4e747f316bae86b55943f51e82bb86ecd325883ef65741e7da/sphinxcontrib_devhelp-2.0.0.tar.gz", hash = "sha256:411f5d96d445d1d73bb5d52133377b4248ec79db5c793ce7dbe59e074b4dd1ad", size = 12967 } +sdist = { url = "https://files.pythonhosted.org/packages/f6/d2/5beee64d3e4e747f316bae86b55943f51e82bb86ecd325883ef65741e7da/sphinxcontrib_devhelp-2.0.0.tar.gz", hash = "sha256:411f5d96d445d1d73bb5d52133377b4248ec79db5c793ce7dbe59e074b4dd1ad", size = 12967, upload-time = "2024-07-29T01:09:23.417Z" } wheels = [ - { url = "https://files.pythonhosted.org/packages/35/7a/987e583882f985fe4d7323774889ec58049171828b58c2217e7f79cdf44e/sphinxcontrib_devhelp-2.0.0-py3-none-any.whl", hash = "sha256:aefb8b83854e4b0998877524d1029fd3e6879210422ee3780459e28a1f03a8a2", size = 82530 }, + { url = "https://files.pythonhosted.org/packages/35/7a/987e583882f985fe4d7323774889ec58049171828b58c2217e7f79cdf44e/sphinxcontrib_devhelp-2.0.0-py3-none-any.whl", hash = "sha256:aefb8b83854e4b0998877524d1029fd3e6879210422ee3780459e28a1f03a8a2", size = 82530, upload-time = "2024-07-29T01:09:21.945Z" }, ] [[package]] name = "sphinxcontrib-fulltoc" version = "1.2.0" source = { registry = "https://pypi.org/simple" } -sdist = { url = "https://files.pythonhosted.org/packages/8e/a6/d1297db9b75650681e5429e92e13df139ee6b64303ff1b2eea4ebd32c0a9/sphinxcontrib-fulltoc-1.2.0.tar.gz", hash = "sha256:c845d62fc467f3135d4543e9f10e13ef91852683bd1c90fd19d07f9d36757cd9", size = 13752 } +sdist = { url = "https://files.pythonhosted.org/packages/8e/a6/d1297db9b75650681e5429e92e13df139ee6b64303ff1b2eea4ebd32c0a9/sphinxcontrib-fulltoc-1.2.0.tar.gz", hash = "sha256:c845d62fc467f3135d4543e9f10e13ef91852683bd1c90fd19d07f9d36757cd9", size = 13752, upload-time = "2017-04-10T14:12:57.75Z" } [[package]] name = "sphinxcontrib-htmlhelp" version = "2.1.0" source = { registry = "https://pypi.org/simple" } -sdist = { url = "https://files.pythonhosted.org/packages/43/93/983afd9aa001e5201eab16b5a444ed5b9b0a7a010541e0ddfbbfd0b2470c/sphinxcontrib_htmlhelp-2.1.0.tar.gz", hash = "sha256:c9e2916ace8aad64cc13a0d233ee22317f2b9025b9cf3295249fa985cc7082e9", size = 22617 } +sdist = { url = "https://files.pythonhosted.org/packages/43/93/983afd9aa001e5201eab16b5a444ed5b9b0a7a010541e0ddfbbfd0b2470c/sphinxcontrib_htmlhelp-2.1.0.tar.gz", hash = "sha256:c9e2916ace8aad64cc13a0d233ee22317f2b9025b9cf3295249fa985cc7082e9", size = 22617, upload-time = "2024-07-29T01:09:37.889Z" } wheels = [ - { url = "https://files.pythonhosted.org/packages/0a/7b/18a8c0bcec9182c05a0b3ec2a776bba4ead82750a55ff798e8d406dae604/sphinxcontrib_htmlhelp-2.1.0-py3-none-any.whl", hash = "sha256:166759820b47002d22914d64a075ce08f4c46818e17cfc9470a9786b759b19f8", size = 98705 }, + { url = "https://files.pythonhosted.org/packages/0a/7b/18a8c0bcec9182c05a0b3ec2a776bba4ead82750a55ff798e8d406dae604/sphinxcontrib_htmlhelp-2.1.0-py3-none-any.whl", hash = "sha256:166759820b47002d22914d64a075ce08f4c46818e17cfc9470a9786b759b19f8", size = 98705, upload-time = "2024-07-29T01:09:36.407Z" }, ] [[package]] name = "sphinxcontrib-jsmath" version = "1.0.1" source = { registry = "https://pypi.org/simple" } -sdist = { url = "https://files.pythonhosted.org/packages/b2/e8/9ed3830aeed71f17c026a07a5097edcf44b692850ef215b161b8ad875729/sphinxcontrib-jsmath-1.0.1.tar.gz", hash = "sha256:a9925e4a4587247ed2191a22df5f6970656cb8ca2bd6284309578f2153e0c4b8", size = 5787 } +sdist = { url = "https://files.pythonhosted.org/packages/b2/e8/9ed3830aeed71f17c026a07a5097edcf44b692850ef215b161b8ad875729/sphinxcontrib-jsmath-1.0.1.tar.gz", hash = "sha256:a9925e4a4587247ed2191a22df5f6970656cb8ca2bd6284309578f2153e0c4b8", size = 5787, upload-time = "2019-01-21T16:10:16.347Z" } wheels = [ - { url = "https://files.pythonhosted.org/packages/c2/42/4c8646762ee83602e3fb3fbe774c2fac12f317deb0b5dbeeedd2d3ba4b77/sphinxcontrib_jsmath-1.0.1-py2.py3-none-any.whl", hash = "sha256:2ec2eaebfb78f3f2078e73666b1415417a116cc848b72e5172e596c871103178", size = 5071 }, + { url = "https://files.pythonhosted.org/packages/c2/42/4c8646762ee83602e3fb3fbe774c2fac12f317deb0b5dbeeedd2d3ba4b77/sphinxcontrib_jsmath-1.0.1-py2.py3-none-any.whl", hash = "sha256:2ec2eaebfb78f3f2078e73666b1415417a116cc848b72e5172e596c871103178", size = 5071, upload-time = "2019-01-21T16:10:14.333Z" }, ] [[package]] @@ -1515,27 +1515,27 @@ dependencies = [ { name = "pockets" }, { name = "six" }, ] -sdist = { url = "https://files.pythonhosted.org/packages/fa/eb/ad89500f4cee83187596e07f43ad561f293e8e6e96996005c3319653b89f/sphinxcontrib-napoleon-0.7.tar.gz", hash = "sha256:407382beed396e9f2d7f3043fad6afda95719204a1e1a231ac865f40abcbfcf8", size = 21232 } +sdist = { url = "https://files.pythonhosted.org/packages/fa/eb/ad89500f4cee83187596e07f43ad561f293e8e6e96996005c3319653b89f/sphinxcontrib-napoleon-0.7.tar.gz", hash = "sha256:407382beed396e9f2d7f3043fad6afda95719204a1e1a231ac865f40abcbfcf8", size = 21232, upload-time = "2018-09-23T14:16:47.272Z" } wheels = [ - { url = "https://files.pythonhosted.org/packages/75/f2/6b7627dfe7b4e418e295e254bb15c3a6455f11f8c0ad0d43113f678049c3/sphinxcontrib_napoleon-0.7-py2.py3-none-any.whl", hash = "sha256:711e41a3974bdf110a484aec4c1a556799eb0b3f3b897521a018ad7e2db13fef", size = 17151 }, + { url = "https://files.pythonhosted.org/packages/75/f2/6b7627dfe7b4e418e295e254bb15c3a6455f11f8c0ad0d43113f678049c3/sphinxcontrib_napoleon-0.7-py2.py3-none-any.whl", hash = "sha256:711e41a3974bdf110a484aec4c1a556799eb0b3f3b897521a018ad7e2db13fef", size = 17151, upload-time = "2018-09-23T14:16:45.548Z" }, ] [[package]] name = "sphinxcontrib-qthelp" version = "2.0.0" source = { registry = "https://pypi.org/simple" } -sdist = { url = "https://files.pythonhosted.org/packages/68/bc/9104308fc285eb3e0b31b67688235db556cd5b0ef31d96f30e45f2e51cae/sphinxcontrib_qthelp-2.0.0.tar.gz", hash = "sha256:4fe7d0ac8fc171045be623aba3e2a8f613f8682731f9153bb2e40ece16b9bbab", size = 17165 } +sdist = { url = "https://files.pythonhosted.org/packages/68/bc/9104308fc285eb3e0b31b67688235db556cd5b0ef31d96f30e45f2e51cae/sphinxcontrib_qthelp-2.0.0.tar.gz", hash = "sha256:4fe7d0ac8fc171045be623aba3e2a8f613f8682731f9153bb2e40ece16b9bbab", size = 17165, upload-time = "2024-07-29T01:09:56.435Z" } wheels = [ - { url = "https://files.pythonhosted.org/packages/27/83/859ecdd180cacc13b1f7e857abf8582a64552ea7a061057a6c716e790fce/sphinxcontrib_qthelp-2.0.0-py3-none-any.whl", hash = "sha256:b18a828cdba941ccd6ee8445dbe72ffa3ef8cbe7505d8cd1fa0d42d3f2d5f3eb", size = 88743 }, + { url = "https://files.pythonhosted.org/packages/27/83/859ecdd180cacc13b1f7e857abf8582a64552ea7a061057a6c716e790fce/sphinxcontrib_qthelp-2.0.0-py3-none-any.whl", hash = "sha256:b18a828cdba941ccd6ee8445dbe72ffa3ef8cbe7505d8cd1fa0d42d3f2d5f3eb", size = 88743, upload-time = "2024-07-29T01:09:54.885Z" }, ] [[package]] name = "sphinxcontrib-serializinghtml" version = "2.0.0" source = { registry = "https://pypi.org/simple" } -sdist = { url = "https://files.pythonhosted.org/packages/3b/44/6716b257b0aa6bfd51a1b31665d1c205fb12cb5ad56de752dfa15657de2f/sphinxcontrib_serializinghtml-2.0.0.tar.gz", hash = "sha256:e9d912827f872c029017a53f0ef2180b327c3f7fd23c87229f7a8e8b70031d4d", size = 16080 } +sdist = { url = "https://files.pythonhosted.org/packages/3b/44/6716b257b0aa6bfd51a1b31665d1c205fb12cb5ad56de752dfa15657de2f/sphinxcontrib_serializinghtml-2.0.0.tar.gz", hash = "sha256:e9d912827f872c029017a53f0ef2180b327c3f7fd23c87229f7a8e8b70031d4d", size = 16080, upload-time = "2024-07-29T01:10:09.332Z" } wheels = [ - { url = "https://files.pythonhosted.org/packages/52/a7/d2782e4e3f77c8450f727ba74a8f12756d5ba823d81b941f1b04da9d033a/sphinxcontrib_serializinghtml-2.0.0-py3-none-any.whl", hash = "sha256:6e2cb0eef194e10c27ec0023bfeb25badbbb5868244cf5bc5bdc04e4464bf331", size = 92072 }, + { url = "https://files.pythonhosted.org/packages/52/a7/d2782e4e3f77c8450f727ba74a8f12756d5ba823d81b941f1b04da9d033a/sphinxcontrib_serializinghtml-2.0.0-py3-none-any.whl", hash = "sha256:6e2cb0eef194e10c27ec0023bfeb25badbbb5868244cf5bc5bdc04e4464bf331", size = 92072, upload-time = "2024-07-29T01:10:08.203Z" }, ] [[package]] @@ -1547,109 +1547,109 @@ dependencies = [ { name = "executing" }, { name = "pure-eval" }, ] -sdist = { url = "https://files.pythonhosted.org/packages/28/e3/55dcc2cfbc3ca9c29519eb6884dd1415ecb53b0e934862d3559ddcb7e20b/stack_data-0.6.3.tar.gz", hash = "sha256:836a778de4fec4dcd1dcd89ed8abff8a221f58308462e1c4aa2a3cf30148f0b9", size = 44707 } +sdist = { url = "https://files.pythonhosted.org/packages/28/e3/55dcc2cfbc3ca9c29519eb6884dd1415ecb53b0e934862d3559ddcb7e20b/stack_data-0.6.3.tar.gz", hash = "sha256:836a778de4fec4dcd1dcd89ed8abff8a221f58308462e1c4aa2a3cf30148f0b9", size = 44707, upload-time = "2023-09-30T13:58:05.479Z" } wheels = [ - { url = "https://files.pythonhosted.org/packages/f1/7b/ce1eafaf1a76852e2ec9b22edecf1daa58175c090266e9f6c64afcd81d91/stack_data-0.6.3-py3-none-any.whl", hash = "sha256:d5558e0c25a4cb0853cddad3d77da9891a08cb85dd9f9f91b9f8cd66e511e695", size = 24521 }, + { url = "https://files.pythonhosted.org/packages/f1/7b/ce1eafaf1a76852e2ec9b22edecf1daa58175c090266e9f6c64afcd81d91/stack_data-0.6.3-py3-none-any.whl", hash = "sha256:d5558e0c25a4cb0853cddad3d77da9891a08cb85dd9f9f91b9f8cd66e511e695", size = 24521, upload-time = "2023-09-30T13:58:03.53Z" }, ] [[package]] name = "tabulate" version = "0.10.0" source = { registry = "https://pypi.org/simple" } -sdist = { url = "https://files.pythonhosted.org/packages/46/58/8c37dea7bbf769b20d58e7ace7e5edfe65b849442b00ffcdd56be88697c6/tabulate-0.10.0.tar.gz", hash = "sha256:e2cfde8f79420f6deeffdeda9aaec3b6bc5abce947655d17ac662b126e48a60d", size = 91754 } +sdist = { url = "https://files.pythonhosted.org/packages/46/58/8c37dea7bbf769b20d58e7ace7e5edfe65b849442b00ffcdd56be88697c6/tabulate-0.10.0.tar.gz", hash = "sha256:e2cfde8f79420f6deeffdeda9aaec3b6bc5abce947655d17ac662b126e48a60d", size = 91754, upload-time = "2026-03-04T18:55:34.402Z" } wheels = [ - { url = "https://files.pythonhosted.org/packages/99/55/db07de81b5c630da5cbf5c7df646580ca26dfaefa593667fc6f2fe016d2e/tabulate-0.10.0-py3-none-any.whl", hash = "sha256:f0b0622e567335c8fabaaa659f1b33bcb6ddfe2e496071b743aa113f8774f2d3", size = 39814 }, + { url = "https://files.pythonhosted.org/packages/99/55/db07de81b5c630da5cbf5c7df646580ca26dfaefa593667fc6f2fe016d2e/tabulate-0.10.0-py3-none-any.whl", hash = "sha256:f0b0622e567335c8fabaaa659f1b33bcb6ddfe2e496071b743aa113f8774f2d3", size = 39814, upload-time = "2026-03-04T18:55:31.284Z" }, ] [[package]] name = "tomli" version = "2.5.0" source = { registry = "https://pypi.org/simple" } -sdist = { url = "https://files.pythonhosted.org/packages/b0/78/9ad63712633ed3ab5cc1a648d863d7e7da371e9425e209555a0fe711b695/tomli-2.5.0.tar.gz", hash = "sha256:264507556cd8b8c8e7c6ee037cdf443a463f03f4c958e57195e3d369711b8ff6", size = 17662 } +sdist = { url = "https://files.pythonhosted.org/packages/b0/78/9ad63712633ed3ab5cc1a648d863d7e7da371e9425e209555a0fe711b695/tomli-2.5.0.tar.gz", hash = "sha256:264507556cd8b8c8e7c6ee037cdf443a463f03f4c958e57195e3d369711b8ff6", size = 17662, upload-time = "2026-10-07T12:23:37.892Z" } wheels = [ - { url = "https://files.pythonhosted.org/packages/60/3f/3e3f8fd0919249b0200c80fbc4f9a1e70be19f9883da71dfb7f8b9ab8aca/tomli-2.5.0-py3-none-any.whl", hash = "sha256:32a7b79ac57a2e83670ce329ccf675798bc5a2094783a63676866b70503f2e2b", size = 14765 }, + { url = "https://files.pythonhosted.org/packages/60/3f/3e3f8fd0919249b0200c80fbc4f9a1e70be19f9883da71dfb7f8b9ab8aca/tomli-2.5.0-py3-none-any.whl", hash = "sha256:32a7b79ac57a2e83670ce329ccf675798bc5a2094783a63676866b70503f2e2b", size = 14765, upload-time = "2026-10-07T12:23:36.875Z" }, ] [[package]] name = "tomlkit" version = "0.15.1" source = { registry = "https://pypi.org/simple" } -sdist = { url = "https://files.pythonhosted.org/packages/94/96/e07752635b98536177fa1f37671c8f3cdde2e724c6bcf6034b2cfb571565/tomlkit-0.15.1.tar.gz", hash = "sha256:e25bbf38843005246210a12982776f27f99cb9be67160e14434d0c0d21ee1e97", size = 180129 } +sdist = { url = "https://files.pythonhosted.org/packages/94/96/e07752635b98536177fa1f37671c8f3cdde2e724c6bcf6034b2cfb571565/tomlkit-0.15.1.tar.gz", hash = "sha256:e25bbf38843005246210a12982776f27f99cb9be67160e14434d0c0d21ee1e97", size = 180129, upload-time = "2026-07-17T01:48:04.562Z" } wheels = [ - { url = "https://files.pythonhosted.org/packages/13/bc/8c13eb66537dce1d2bd3a57132902f38d0e7f5bb46fa9f4daed9fe9d76ee/tomlkit-0.15.1-py3-none-any.whl", hash = "sha256:177a05aece5a8ca5266fd3c448abb47b8d352f09d477d3ca8332db4d89b24304", size = 49449 }, + { url = "https://files.pythonhosted.org/packages/13/bc/8c13eb66537dce1d2bd3a57132902f38d0e7f5bb46fa9f4daed9fe9d76ee/tomlkit-0.15.1-py3-none-any.whl", hash = "sha256:177a05aece5a8ca5266fd3c448abb47b8d352f09d477d3ca8332db4d89b24304", size = 49449, upload-time = "2026-07-17T01:48:05.728Z" }, ] [[package]] name = "tornado" version = "6.5.10" source = { registry = "https://pypi.org/simple" } -sdist = { url = "https://files.pythonhosted.org/packages/06/61/53d562a57b28c08eda40b258c0f975e360541943ad7c7bef897a40caafda/tornado-6.5.10.tar.gz", hash = "sha256:a6b1ccd08c04b4a06fb5aeb381be99de5ad1e5375c1785e31d78c880feb57687", size = 537910 } +sdist = { url = "https://files.pythonhosted.org/packages/06/61/53d562a57b28c08eda40b258c0f975e360541943ad7c7bef897a40caafda/tornado-6.5.10.tar.gz", hash = "sha256:a6b1ccd08c04b4a06fb5aeb381be99de5ad1e5375c1785e31d78c880feb57687", size = 537910, upload-time = "2026-09-15T13:47:48.73Z" } wheels = [ - { url = "https://files.pythonhosted.org/packages/cd/5b/ff5fc58fa2427c30dea74c90053f4fc5eda1e7f3833ed3ecc7147fe2b311/tornado-6.5.10-cp39-abi3-macosx_10_9_universal2.whl", hash = "sha256:9261783640e23258694a9ff0795df430a5a7b0a651d3dd53dd0969ad6be16da7", size = 465883 }, - { url = "https://files.pythonhosted.org/packages/ad/f5/cd7be26c34a3315532f3aef5f092465da8f59c334dd439d3c14aaef16461/tornado-6.5.10-cp39-abi3-macosx_10_9_x86_64.whl", hash = "sha256:83e6cf438b106c6b3852d70960967bb1b70c87438050dca0981e4b9aa751a4c1", size = 464046 }, - { url = "https://files.pythonhosted.org/packages/60/33/df6d7d04854a58619f8349a51e3edb138324130a7562b0bb21f115bb940f/tornado-6.5.10-cp39-abi3-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl", hash = "sha256:bdf942448169e5336451d0494d7e3d81cfa726d5aa312affdc4682dd62a62f6d", size = 467096 }, - { url = "https://files.pythonhosted.org/packages/29/17/cc35dff68272d685cffd8600ffafbd8067e7d05e7348d9f80caddffbbd5f/tornado-6.5.10-cp39-abi3-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:69acca6501eed74582b76dbbceee2a91613f54728e3e418346000d7103101676", size = 468067 }, - { url = "https://files.pythonhosted.org/packages/c3/01/6e5349b4e1a53a4b4972a6716785e1fe7407f312063c3972690af8ff301b/tornado-6.5.10-cp39-abi3-musllinux_1_2_aarch64.whl", hash = "sha256:66aaa3f57d30c6e6becee83ff28055d5930ac724214bde99393eefda83d5e015", size = 467901 }, - { url = "https://files.pythonhosted.org/packages/28/5e/b4facf94370dba006819c8d304376f8b9fbec6b935b5e51bf45823a9790b/tornado-6.5.10-cp39-abi3-musllinux_1_2_x86_64.whl", hash = "sha256:4bd192b959f9128fb99b8898148070ba4574c9589b78bce42d1851131fe85828", size = 467308 }, - { url = "https://files.pythonhosted.org/packages/56/ae/047938e828cafc8eca4c908fafb6588fee944e3af39a0af9d7b602499ae5/tornado-6.5.10-cp39-abi3-win32.whl", hash = "sha256:302eb1e0e3e159314eb591920529fdea80acca92df5510a2cec5bbd4f099ec72", size = 468387 }, - { url = "https://files.pythonhosted.org/packages/d8/d4/5901517f05affd752490f6a654ba31b7474664e8dd80bd045a00c220bd88/tornado-6.5.10-cp39-abi3-win_amd64.whl", hash = "sha256:37ae8f150cecfdbf747fc4e12f5e9a97ecd8cf1d4cdb3f119e2de84b11196918", size = 468828 }, - { url = "https://files.pythonhosted.org/packages/f3/1a/fd497f3a7f7b74bb04f4b94536b5c9f80742b5d50501fd27977652ddec16/tornado-6.5.10-cp39-abi3-win_arm64.whl", hash = "sha256:ce045d3c298fddd30e89a2777f97039d1b641eb9518ac7b26a4721903539c694", size = 467847 }, + { url = "https://files.pythonhosted.org/packages/cd/5b/ff5fc58fa2427c30dea74c90053f4fc5eda1e7f3833ed3ecc7147fe2b311/tornado-6.5.10-cp39-abi3-macosx_10_9_universal2.whl", hash = "sha256:9261783640e23258694a9ff0795df430a5a7b0a651d3dd53dd0969ad6be16da7", size = 465883, upload-time = "2026-09-15T13:47:35.463Z" }, + { url = "https://files.pythonhosted.org/packages/ad/f5/cd7be26c34a3315532f3aef5f092465da8f59c334dd439d3c14aaef16461/tornado-6.5.10-cp39-abi3-macosx_10_9_x86_64.whl", hash = "sha256:83e6cf438b106c6b3852d70960967bb1b70c87438050dca0981e4b9aa751a4c1", size = 464046, upload-time = "2026-09-15T13:47:37.178Z" }, + { url = "https://files.pythonhosted.org/packages/60/33/df6d7d04854a58619f8349a51e3edb138324130a7562b0bb21f115bb940f/tornado-6.5.10-cp39-abi3-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl", hash = "sha256:bdf942448169e5336451d0494d7e3d81cfa726d5aa312affdc4682dd62a62f6d", size = 467096, upload-time = "2026-09-15T13:47:38.559Z" }, + { url = "https://files.pythonhosted.org/packages/29/17/cc35dff68272d685cffd8600ffafbd8067e7d05e7348d9f80caddffbbd5f/tornado-6.5.10-cp39-abi3-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:69acca6501eed74582b76dbbceee2a91613f54728e3e418346000d7103101676", size = 468067, upload-time = "2026-09-15T13:47:40.085Z" }, + { url = "https://files.pythonhosted.org/packages/c3/01/6e5349b4e1a53a4b4972a6716785e1fe7407f312063c3972690af8ff301b/tornado-6.5.10-cp39-abi3-musllinux_1_2_aarch64.whl", hash = "sha256:66aaa3f57d30c6e6becee83ff28055d5930ac724214bde99393eefda83d5e015", size = 467901, upload-time = "2026-09-15T13:47:41.576Z" }, + { url = "https://files.pythonhosted.org/packages/28/5e/b4facf94370dba006819c8d304376f8b9fbec6b935b5e51bf45823a9790b/tornado-6.5.10-cp39-abi3-musllinux_1_2_x86_64.whl", hash = "sha256:4bd192b959f9128fb99b8898148070ba4574c9589b78bce42d1851131fe85828", size = 467308, upload-time = "2026-09-15T13:47:43.145Z" }, + { url = "https://files.pythonhosted.org/packages/56/ae/047938e828cafc8eca4c908fafb6588fee944e3af39a0af9d7b602499ae5/tornado-6.5.10-cp39-abi3-win32.whl", hash = "sha256:302eb1e0e3e159314eb591920529fdea80acca92df5510a2cec5bbd4f099ec72", size = 468387, upload-time = "2026-09-15T13:47:44.556Z" }, + { url = "https://files.pythonhosted.org/packages/d8/d4/5901517f05affd752490f6a654ba31b7474664e8dd80bd045a00c220bd88/tornado-6.5.10-cp39-abi3-win_amd64.whl", hash = "sha256:37ae8f150cecfdbf747fc4e12f5e9a97ecd8cf1d4cdb3f119e2de84b11196918", size = 468828, upload-time = "2026-09-15T13:47:45.961Z" }, + { url = "https://files.pythonhosted.org/packages/f3/1a/fd497f3a7f7b74bb04f4b94536b5c9f80742b5d50501fd27977652ddec16/tornado-6.5.10-cp39-abi3-win_arm64.whl", hash = "sha256:ce045d3c298fddd30e89a2777f97039d1b641eb9518ac7b26a4721903539c694", size = 467847, upload-time = "2026-09-15T13:47:47.283Z" }, ] [[package]] name = "traitlets" version = "5.16.1" source = { registry = "https://pypi.org/simple" } -sdist = { url = "https://files.pythonhosted.org/packages/2c/2e/a7fbfe268c8a3b32546930c0297c101d65a4a14c304ad5790a9f478f0e4e/traitlets-5.16.1.tar.gz", hash = "sha256:ed900c2b631aa3a112811139fa97b8d2c3bad5e989656bba4b7e52c7852c18c1", size = 166137 } +sdist = { url = "https://files.pythonhosted.org/packages/2c/2e/a7fbfe268c8a3b32546930c0297c101d65a4a14c304ad5790a9f478f0e4e/traitlets-5.16.1.tar.gz", hash = "sha256:ed900c2b631aa3a112811139fa97b8d2c3bad5e989656bba4b7e52c7852c18c1", size = 166137, upload-time = "2026-08-03T08:32:36.848Z" } wheels = [ - { url = "https://files.pythonhosted.org/packages/ad/66/0d785f0bc5e4315a96c989bb476d0fc07ea4f85132550c7b156ca2035d52/traitlets-5.16.1-py3-none-any.whl", hash = "sha256:f775618166caa0396c8e337099240f2bd3e5e917d203b2e6fbe21a58d3cb1f6b", size = 86211 }, + { url = "https://files.pythonhosted.org/packages/ad/66/0d785f0bc5e4315a96c989bb476d0fc07ea4f85132550c7b156ca2035d52/traitlets-5.16.1-py3-none-any.whl", hash = "sha256:f775618166caa0396c8e337099240f2bd3e5e917d203b2e6fbe21a58d3cb1f6b", size = 86211, upload-time = "2026-08-03T08:32:34.48Z" }, ] [[package]] name = "typing-extensions" version = "4.16.0" source = { registry = "https://pypi.org/simple" } -sdist = { url = "https://files.pythonhosted.org/packages/f6/cc/6253133b5bb138fc3306cebfbda2c520f545d36b5be2c7255cc528bb45d6/typing_extensions-4.16.0.tar.gz", hash = "sha256:dc983d19a509c94dba722ee6abd33940f7c05a89e243c47e907eb4db6f1a43e5", size = 113555 } +sdist = { url = "https://files.pythonhosted.org/packages/f6/cc/6253133b5bb138fc3306cebfbda2c520f545d36b5be2c7255cc528bb45d6/typing_extensions-4.16.0.tar.gz", hash = "sha256:dc983d19a509c94dba722ee6abd33940f7c05a89e243c47e907eb4db6f1a43e5", size = 113555, upload-time = "2026-07-02T08:40:05.92Z" } wheels = [ - { url = "https://files.pythonhosted.org/packages/49/d3/b8441a820a491ddfc024b0b0cf0393375b75ea13866d9c66727e54c2fc80/typing_extensions-4.16.0-py3-none-any.whl", hash = "sha256:481caa481374e813c1b176ada14e97f1f67a4539ce9cfeb3f350d78d6370c2e8", size = 45571 }, + { url = "https://files.pythonhosted.org/packages/49/d3/b8441a820a491ddfc024b0b0cf0393375b75ea13866d9c66727e54c2fc80/typing_extensions-4.16.0-py3-none-any.whl", hash = "sha256:481caa481374e813c1b176ada14e97f1f67a4539ce9cfeb3f350d78d6370c2e8", size = 45571, upload-time = "2026-07-02T08:40:04.659Z" }, ] [[package]] name = "tzdata" version = "2026.5" source = { registry = "https://pypi.org/simple" } -sdist = { url = "https://files.pythonhosted.org/packages/d9/68/f1b440335057bfce71b6e50a9d09445aa2ecbd08359a337976627b8409e7/tzdata-2026.5.tar.gz", hash = "sha256:8cc73c0a0bfca7dbfa59235d60b2eff82231dee33f53d206db1acd9173cfc0a7", size = 200404 } +sdist = { url = "https://files.pythonhosted.org/packages/d9/68/f1b440335057bfce71b6e50a9d09445aa2ecbd08359a337976627b8409e7/tzdata-2026.5.tar.gz", hash = "sha256:8cc73c0a0bfca7dbfa59235d60b2eff82231dee33f53d206db1acd9173cfc0a7", size = 200404, upload-time = "2026-10-03T09:23:14.143Z" } wheels = [ - { url = "https://files.pythonhosted.org/packages/94/21/1e5995a1c920cce14e4bffae20c665ec10e7ed03ab25e006cd741092b718/tzdata-2026.5-py2.py3-none-any.whl", hash = "sha256:b683bd1b6659ddcd810ff02ad09ba821d4bf1065072805063eb35c49617905ac", size = 347996 }, + { url = "https://files.pythonhosted.org/packages/94/21/1e5995a1c920cce14e4bffae20c665ec10e7ed03ab25e006cd741092b718/tzdata-2026.5-py2.py3-none-any.whl", hash = "sha256:b683bd1b6659ddcd810ff02ad09ba821d4bf1065072805063eb35c49617905ac", size = 347996, upload-time = "2026-10-03T09:23:12.535Z" }, ] [[package]] name = "urllib3" version = "2.8.0" source = { registry = "https://pypi.org/simple" } -sdist = { url = "https://files.pythonhosted.org/packages/e3/05/b17359e1cefb4f909b5e40b1b90a496d987258916dbbf88e842c729f510e/urllib3-2.8.0.tar.gz", hash = "sha256:63bf2ead4c879426ebf22ef2a781eeb4aa3b4ae798a0435506f8687fd5bb9b63", size = 458972 } +sdist = { url = "https://files.pythonhosted.org/packages/e3/05/b17359e1cefb4f909b5e40b1b90a496d987258916dbbf88e842c729f510e/urllib3-2.8.0.tar.gz", hash = "sha256:63bf2ead4c879426ebf22ef2a781eeb4aa3b4ae798a0435506f8687fd5bb9b63", size = 458972, upload-time = "2026-09-15T19:29:36.253Z" } wheels = [ - { url = "https://files.pythonhosted.org/packages/92/9d/c4e665119135114480843e7ab388fa94d8480650450e6f8e26b70d323a4c/urllib3-2.8.0-py3-none-any.whl", hash = "sha256:0cf3cae568d36aa9576b28dfb35f11328f1cb974ca7647d9475ebb86c75ac6e3", size = 135717 }, + { url = "https://files.pythonhosted.org/packages/92/9d/c4e665119135114480843e7ab388fa94d8480650450e6f8e26b70d323a4c/urllib3-2.8.0-py3-none-any.whl", hash = "sha256:0cf3cae568d36aa9576b28dfb35f11328f1cb974ca7647d9475ebb86c75ac6e3", size = 135717, upload-time = "2026-09-15T19:29:34.577Z" }, ] [[package]] name = "wcwidth" version = "0.9.2" source = { registry = "https://pypi.org/simple" } -sdist = { url = "https://files.pythonhosted.org/packages/f0/b4/7830542634bb2d3e62aa3b586a72d5b3b6c91c3168929e7000ef3fed041d/wcwidth-0.9.2.tar.gz", hash = "sha256:ae0ef90b90f6af38b54f1fe6d58662ec33b3cb4b8391958a62416d654231727b", size = 955039 } +sdist = { url = "https://files.pythonhosted.org/packages/f0/b4/7830542634bb2d3e62aa3b586a72d5b3b6c91c3168929e7000ef3fed041d/wcwidth-0.9.2.tar.gz", hash = "sha256:ae0ef90b90f6af38b54f1fe6d58662ec33b3cb4b8391958a62416d654231727b", size = 955039, upload-time = "2026-10-05T00:24:05.521Z" } wheels = [ - { url = "https://files.pythonhosted.org/packages/59/1e/4532a81fb9dfbf4114a816775e0a36c3a64ee1d1f4bba2094e2da50be5dc/wcwidth-0.9.2-cp310-abi3-macosx_10_9_x86_64.whl", hash = "sha256:7ef5a940bd5e30bac6e721f1a48fce0cd7bb3ece19e9c5d139e72c76c35cfd07", size = 605343 }, - { url = "https://files.pythonhosted.org/packages/a0/07/cb6940e81134b7ed25fa312ee9ab536a63db0793b149f88a90e603ceace9/wcwidth-0.9.2-cp310-abi3-macosx_11_0_arm64.whl", hash = "sha256:ae0800c5339423cc53d33a266ad264b42ba8aaa16d4464f6e6b1bee607f50b17", size = 609960 }, - { url = "https://files.pythonhosted.org/packages/a4/80/15ad05d40bfa99155639fb9e13b3d77083aa0fab893c816db2543d29005c/wcwidth-0.9.2-cp310-abi3-manylinux1_i686.manylinux2014_i686.manylinux_2_17_i686.manylinux_2_5_i686.whl", hash = "sha256:9e542f1f8475b78452a295495d7a5bc3ead565112e9446a64dc93462a41c2a79", size = 762566 }, - { url = "https://files.pythonhosted.org/packages/bc/f0/b8ef7758003d66b60f093695831a86dcc726aac01ee6446ffcbda27b61e3/wcwidth-0.9.2-cp310-abi3-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:674b518af28d38ee645ff97b74f5760abee5fad4bac74413bfc4b881ef2ce724", size = 771632 }, - { url = "https://files.pythonhosted.org/packages/db/6c/f940133c71427c208575910e981942bd78c98b1f7cd0d1425ca4b7457c04/wcwidth-0.9.2-cp310-abi3-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:751bef0ab404b6a1dc028b56b4b85d46486be1c55833f80da533e42dc691f389", size = 769763 }, - { url = "https://files.pythonhosted.org/packages/92/8f/285f862826f721964ec7c42f81dc53d23afbd723a0f4cd989651f8218e25/wcwidth-0.9.2-cp310-abi3-musllinux_1_2_aarch64.whl", hash = "sha256:c3d80f39ba4653a595edae9aa46a509d14883790a8fc23c5db221ceb207f64b7", size = 782134 }, - { url = "https://files.pythonhosted.org/packages/c2/2d/64aa54882a5d556d3654c1f926d9118b797461033e23a158409941a37c8f/wcwidth-0.9.2-cp310-abi3-musllinux_1_2_i686.whl", hash = "sha256:0a47e03d8293590ecce66c45dc20ff7b4b885e3c78093722239585eca0d77ab2", size = 782851 }, - { url = "https://files.pythonhosted.org/packages/59/39/52389f6de7fe2e9c14ceb8253dd99034bd86e1c87847ea3c100a97dded9a/wcwidth-0.9.2-cp310-abi3-musllinux_1_2_x86_64.whl", hash = "sha256:67d901a4ad99249eb775b4ee4769ca97fa405d35a75f46e83166910a47003f04", size = 784621 }, - { url = "https://files.pythonhosted.org/packages/b3/8b/20225500a076ace27bbcc8a6fd7c55125133c57a618816c7b7b8b73070b1/wcwidth-0.9.2-cp310-abi3-win32.whl", hash = "sha256:ee1fd0db9d9fd711a70f3e7765e0e04c05d26982fa05361456163062549d7da4", size = 593123 }, - { url = "https://files.pythonhosted.org/packages/5a/d6/b0690f55ea0483530a18bac917fbadbf54f35122510446fc370f5f1c2453/wcwidth-0.9.2-cp310-abi3-win_amd64.whl", hash = "sha256:2a9746de704242bd4fdaabb31dd46b82f694a56a8d21081ad89b679a89da9fec", size = 597827 }, - { url = "https://files.pythonhosted.org/packages/e5/11/6ecf4e9e268ab1a4ec617ffcccc2ee4a71301625f5490912dbaba462fa9c/wcwidth-0.9.2-cp310-abi3-win_arm64.whl", hash = "sha256:b9c6ab615e03723b7f8760ea2f27758d656e7e13b51515c9dca5c3e8b04612fa", size = 598415 }, - { url = "https://files.pythonhosted.org/packages/9c/b4/0bfa065af506540d9d558e3e5548cff00bc1f9b24e6e2a8512498e8628de/wcwidth-0.9.2-py3-none-any.whl", hash = "sha256:89ca642c5bf0101157a09366be69fad0379db1f700ae39a920e103234573670e", size = 301667 }, + { url = "https://files.pythonhosted.org/packages/59/1e/4532a81fb9dfbf4114a816775e0a36c3a64ee1d1f4bba2094e2da50be5dc/wcwidth-0.9.2-cp310-abi3-macosx_10_9_x86_64.whl", hash = "sha256:7ef5a940bd5e30bac6e721f1a48fce0cd7bb3ece19e9c5d139e72c76c35cfd07", size = 605343, upload-time = "2026-10-05T00:23:22.649Z" }, + { url = "https://files.pythonhosted.org/packages/a0/07/cb6940e81134b7ed25fa312ee9ab536a63db0793b149f88a90e603ceace9/wcwidth-0.9.2-cp310-abi3-macosx_11_0_arm64.whl", hash = "sha256:ae0800c5339423cc53d33a266ad264b42ba8aaa16d4464f6e6b1bee607f50b17", size = 609960, upload-time = "2026-10-05T00:23:27.049Z" }, + { url = "https://files.pythonhosted.org/packages/a4/80/15ad05d40bfa99155639fb9e13b3d77083aa0fab893c816db2543d29005c/wcwidth-0.9.2-cp310-abi3-manylinux1_i686.manylinux2014_i686.manylinux_2_17_i686.manylinux_2_5_i686.whl", hash = "sha256:9e542f1f8475b78452a295495d7a5bc3ead565112e9446a64dc93462a41c2a79", size = 762566, upload-time = "2026-10-05T00:23:38.322Z" }, + { url = "https://files.pythonhosted.org/packages/bc/f0/b8ef7758003d66b60f093695831a86dcc726aac01ee6446ffcbda27b61e3/wcwidth-0.9.2-cp310-abi3-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:674b518af28d38ee645ff97b74f5760abee5fad4bac74413bfc4b881ef2ce724", size = 771632, upload-time = "2026-10-05T00:23:32.448Z" }, + { url = "https://files.pythonhosted.org/packages/db/6c/f940133c71427c208575910e981942bd78c98b1f7cd0d1425ca4b7457c04/wcwidth-0.9.2-cp310-abi3-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:751bef0ab404b6a1dc028b56b4b85d46486be1c55833f80da533e42dc691f389", size = 769763, upload-time = "2026-10-05T00:23:40.175Z" }, + { url = "https://files.pythonhosted.org/packages/92/8f/285f862826f721964ec7c42f81dc53d23afbd723a0f4cd989651f8218e25/wcwidth-0.9.2-cp310-abi3-musllinux_1_2_aarch64.whl", hash = "sha256:c3d80f39ba4653a595edae9aa46a509d14883790a8fc23c5db221ceb207f64b7", size = 782134, upload-time = "2026-10-05T00:23:33.926Z" }, + { url = "https://files.pythonhosted.org/packages/c2/2d/64aa54882a5d556d3654c1f926d9118b797461033e23a158409941a37c8f/wcwidth-0.9.2-cp310-abi3-musllinux_1_2_i686.whl", hash = "sha256:0a47e03d8293590ecce66c45dc20ff7b4b885e3c78093722239585eca0d77ab2", size = 782851, upload-time = "2026-10-05T00:23:41.974Z" }, + { url = "https://files.pythonhosted.org/packages/59/39/52389f6de7fe2e9c14ceb8253dd99034bd86e1c87847ea3c100a97dded9a/wcwidth-0.9.2-cp310-abi3-musllinux_1_2_x86_64.whl", hash = "sha256:67d901a4ad99249eb775b4ee4769ca97fa405d35a75f46e83166910a47003f04", size = 784621, upload-time = "2026-10-05T00:23:43.449Z" }, + { url = "https://files.pythonhosted.org/packages/b3/8b/20225500a076ace27bbcc8a6fd7c55125133c57a618816c7b7b8b73070b1/wcwidth-0.9.2-cp310-abi3-win32.whl", hash = "sha256:ee1fd0db9d9fd711a70f3e7765e0e04c05d26982fa05361456163062549d7da4", size = 593123, upload-time = "2026-10-05T00:23:55.953Z" }, + { url = "https://files.pythonhosted.org/packages/5a/d6/b0690f55ea0483530a18bac917fbadbf54f35122510446fc370f5f1c2453/wcwidth-0.9.2-cp310-abi3-win_amd64.whl", hash = "sha256:2a9746de704242bd4fdaabb31dd46b82f694a56a8d21081ad89b679a89da9fec", size = 597827, upload-time = "2026-10-05T00:23:57.489Z" }, + { url = "https://files.pythonhosted.org/packages/e5/11/6ecf4e9e268ab1a4ec617ffcccc2ee4a71301625f5490912dbaba462fa9c/wcwidth-0.9.2-cp310-abi3-win_arm64.whl", hash = "sha256:b9c6ab615e03723b7f8760ea2f27758d656e7e13b51515c9dca5c3e8b04612fa", size = 598415, upload-time = "2026-10-05T00:23:51.517Z" }, + { url = "https://files.pythonhosted.org/packages/9c/b4/0bfa065af506540d9d558e3e5548cff00bc1f9b24e6e2a8512498e8628de/wcwidth-0.9.2-py3-none-any.whl", hash = "sha256:89ca642c5bf0101157a09366be69fad0379db1f700ae39a920e103234573670e", size = 301667, upload-time = "2026-10-05T00:23:21.097Z" }, ] [[package]] @@ -1659,7 +1659,7 @@ source = { registry = "https://pypi.org/simple" } dependencies = [ { name = "markupsafe" }, ] -sdist = { url = "https://files.pythonhosted.org/packages/a4/34/4dd12fc8bb7d61c91467ec3efe415ffa7d5456f799954b40c5bbaeae470e/werkzeug-3.1.9.tar.gz", hash = "sha256:55ca7c70a75689be937aa27f8ff4b018f06ff4838fc73045560bf0f5a1291060", size = 940188 } +sdist = { url = "https://files.pythonhosted.org/packages/a4/34/4dd12fc8bb7d61c91467ec3efe415ffa7d5456f799954b40c5bbaeae470e/werkzeug-3.1.9.tar.gz", hash = "sha256:55ca7c70a75689be937aa27f8ff4b018f06ff4838fc73045560bf0f5a1291060", size = 940188, upload-time = "2026-09-27T18:33:41.637Z" } wheels = [ - { url = "https://files.pythonhosted.org/packages/a1/38/df03f564f43cec2684823f3cccae1a652ee7face1cbaa76fb223096e64d7/werkzeug-3.1.9-py3-none-any.whl", hash = "sha256:6392e50c78460ba618e5b21f08a71f59c99ce99cdc6cf6e3dd7e6ccca8754fab", size = 228700 }, + { url = "https://files.pythonhosted.org/packages/a1/38/df03f564f43cec2684823f3cccae1a652ee7face1cbaa76fb223096e64d7/werkzeug-3.1.9-py3-none-any.whl", hash = "sha256:6392e50c78460ba618e5b21f08a71f59c99ce99cdc6cf6e3dd7e6ccca8754fab", size = 228700, upload-time = "2026-09-27T18:33:39.685Z" }, ] diff --git a/Python_Engine/Python_Engine.csproj b/Python_Engine/Python_Engine.csproj index a7b78601..20aabe05 100644 --- a/Python_Engine/Python_Engine.csproj +++ b/Python_Engine/Python_Engine.csproj @@ -43,6 +43,6 @@ - + diff --git a/Python_Engine/Query/Directory.cs b/Python_Engine/Query/Directory.cs index b902c3c7..17c22b62 100644 --- a/Python_Engine/Query/Directory.cs +++ b/Python_Engine/Query/Directory.cs @@ -21,8 +21,6 @@ */ using BH.oM.Base.Attributes; -using BH.oM.Python; -using BH.oM.Python.Enums; using System.ComponentModel; using System.IO; @@ -46,5 +44,15 @@ public static string DirectoryEnvironments() Directory.CreateDirectory(dir); return dir; } + + [Description("The location where any BHoM-related Python tools reside.")] + [Output("path", "The location where any BHoM-related Python tools reside.")] + public static string DirectoryTools() + { + string dir = Path.Combine(Query.DirectoryExtensions(), "Python", "tools"); + if (!Directory.Exists(dir)) + Directory.CreateDirectory(dir); + return dir; + } } } diff --git a/Python_Engine/Query/UVExecutable.cs b/Python_Engine/Query/UVExecutable.cs new file mode 100644 index 00000000..e1a87ef5 --- /dev/null +++ b/Python_Engine/Query/UVExecutable.cs @@ -0,0 +1,38 @@ +/* + * This file is part of the Buildings and Habitats object Model (BHoM) + * Copyright (c) 2015 - 2026, the respective contributors. All rights reserved. + * + * Each contributor holds copyright over their respective contributions. + * The project versioning (Git) records all such contribution source information. + * + * + * The BHoM is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3.0 of the License, or + * (at your option) any later version. + * + * The BHoM is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this code. If not, see . + */ + +using BH.oM.Base.Attributes; +using System.ComponentModel; +using System.IO; + +namespace BH.Engine.Python +{ + public static partial class Query + { + [Description("The BHoM-managed UV executable. UV installations on PATH are not used.")] + [Output("executable", "The path to uv.exe in the BHoM tools directory.")] + public static string UVExecutable() + { + return Path.Combine(DirectoryTools(), "uv.exe"); + } + } +} diff --git a/Python_Engine/Query/Version.cs b/Python_Engine/Query/Version.cs index 40abb5a9..244e6eee 100644 --- a/Python_Engine/Query/Version.cs +++ b/Python_Engine/Query/Version.cs @@ -22,13 +22,8 @@ using BH.oM.Base.Attributes; using BH.oM.Python; -using BH.oM.Python.Enums; -using System; -using System.Collections.Generic; using System.ComponentModel; -using System.Diagnostics; using System.IO; -using System.Linq; namespace BH.Engine.Python { @@ -42,10 +37,14 @@ public static string Version(string pythonExecutable) if (!File.Exists(pythonExecutable)) { BH.Engine.Base.Compute.RecordError(new FileNotFoundException(), $"No file found at {pythonExecutable}"); + return null; } - string result = BH.Engine.Python.Compute.RunCommandStdout(command: $"{pythonExecutable} --version"); - return result.Replace("Python ", ""); + var result = BH.Engine.Python.Compute.RunCommandStdout(command: $"\"{pythonExecutable}\" --version"); + if (result.Item3 != 0) + return null; + + return result.Item1.Replace("Python ", ""); } [Description("Get the Python version for the installed PythonEnvironment.")] diff --git a/Python_Engine/Query/VirtualEnvironment.cs b/Python_Engine/Query/VirtualEnvironment.cs index 32bc37d2..f2b64874 100644 --- a/Python_Engine/Query/VirtualEnvironment.cs +++ b/Python_Engine/Query/VirtualEnvironment.cs @@ -37,7 +37,10 @@ public static string VirtualEnvironmentExecutable(string name) { string exePath = Path.Combine(Query.DirectoryEnvironments(), name, ".venv", "Scripts", "python.exe"); if (!File.Exists(exePath)) + { Base.Compute.RecordError($"{exePath} was not found."); + return null; + } return exePath; } @@ -49,7 +52,7 @@ public static bool VirtualEnvironmentExists(string name) { string expectedVenvPath = Path.Combine(Query.DirectoryEnvironments(), name, ".venv"); - if (Directory.Exists(expectedVenvPath) & File.Exists(VirtualEnvironmentExecutable(name))) + if (Directory.Exists(expectedVenvPath) && File.Exists(Path.Combine(expectedVenvPath, "Scripts", "python.exe"))) return true; return false; @@ -61,7 +64,10 @@ public static bool VirtualEnvironmentExists(string name) public static PythonEnvironment VirtualEnvironment(string name) { if (!VirtualEnvironmentExists(name)) + { Base.Compute.RecordError($"{name} was not found in {Query.DirectoryEnvironments()}"); + return null; + } return new PythonEnvironment() { @@ -76,7 +82,10 @@ public static PythonEnvironment VirtualEnvironment(string name) public static string VirtualEnvironmentDirectory(string name) { if (!VirtualEnvironmentExists(name)) + { Base.Compute.RecordError($"{name} was not found in {Query.DirectoryEnvironments()}"); + return null; + } return Path.Combine(Query.DirectoryEnvironments(), name); } diff --git a/Python_Toolkit.sln b/Python_Toolkit.sln index 31fdc786..9f41590f 100644 --- a/Python_Toolkit.sln +++ b/Python_Toolkit.sln @@ -7,6 +7,8 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Python_oM", "Python_oM\Pyth EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Python_Engine", "Python_Engine\Python_Engine.csproj", "{D24A2970-618D-4149-B123-99F406D867D6}" EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Python_Engine_Test", ".ci\unit_tests\Python_Engine_Test\Python_Engine_Test.csproj", "{E654D8C0-C9A3-C0D9-F687-4A0CA64CA548}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -21,6 +23,10 @@ Global {D24A2970-618D-4149-B123-99F406D867D6}.Debug|Any CPU.Build.0 = Debug|Any CPU {D24A2970-618D-4149-B123-99F406D867D6}.Release|Any CPU.ActiveCfg = Release|Any CPU {D24A2970-618D-4149-B123-99F406D867D6}.Release|Any CPU.Build.0 = Release|Any CPU + {E654D8C0-C9A3-C0D9-F687-4A0CA64CA548}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {E654D8C0-C9A3-C0D9-F687-4A0CA64CA548}.Debug|Any CPU.Build.0 = Debug|Any CPU + {E654D8C0-C9A3-C0D9-F687-4A0CA64CA548}.Release|Any CPU.ActiveCfg = Release|Any CPU + {E654D8C0-C9A3-C0D9-F687-4A0CA64CA548}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/README.md b/README.md index 7018811d..318a646d 100644 --- a/README.md +++ b/README.md @@ -33,7 +33,6 @@ There are two main events to install the toolkit: - Install the python bindings of the Python_Toolkit from C:\ProgramData\BHoM\Extensions\Python\src This contains all the code that is currently developed in the toolkit in python - ## Building the BHoM and the Toolkits from Source ## You will need the following to build BHoM: @@ -41,6 +40,13 @@ You will need the following to build BHoM: - Microsoft .NET Framework 4.0 and above (included with Visual Studio 2013) - Note that there are no software - specific dependencies (only operating system relevant), this is specific: BHoM is a software agnostic object model. +## Running commands and creating environments + +UV is installed at `Path.Combine(Query.DirectoryTools(), "uv.exe")`. Engine methods, tests, and PowerShell scripts invoke this BHoM-managed executable directly, never an unrelated UV on PATH. Installation prepends the tools directory to the current process PATH without changing the user or system PATH. + +`RunCommandStdout` returns `BH.oM.Base.Output`: `Item1` is stdout, `Item2` is stderr, and `Item3` is the exit code (zero for success, -1 for timeout). Both streams are retained on success, failure, and timeout. Callers that previously consumed a string must select the appropriate output. Command failures are also recorded as BHoM errors; invalid working directories and process-start failures still throw. + +Creating an environment from a TOML file updates its static `[project].version` to `BH.Engine.Base.Query.BHoMVersion()` before installation. Other version fields are left unchanged. Recreating that environment preserves the TOML file and package sources. ## Want to contribute? ## From 4009ac00c48245e1bf8659e5c4e2870af2dde1ea Mon Sep 17 00:00:00 2001 From: Tristan Gerrish Date: Mon, 2 Nov 2026 12:58:37 +0000 Subject: [PATCH 07/16] added PreviousVersion attribtues --- Python_Engine/Compute/Install.cs | 2 ++ Python_Engine/Compute/Remove.cs | 14 ++++++++++++++ Python_Engine/Compute/VirtualEnvironment.cs | 1 + 3 files changed, 17 insertions(+) diff --git a/Python_Engine/Compute/Install.cs b/Python_Engine/Compute/Install.cs index 58de3aa5..81520045 100644 --- a/Python_Engine/Compute/Install.cs +++ b/Python_Engine/Compute/Install.cs @@ -89,6 +89,7 @@ public static void InstallJupyterKernel(this PythonEnvironment venv) RunCommandStdout(command: cmd, startDirectory: directory); } + [PreviousVersion("9.3", "BH.Engine.Python.Compute.InstallPackages(PythonEnvironment, List)")] [Description("Install a list of packages to a given Python executable. UV retains satisfied versions and registers project dependencies when applicable.")] [Input("venv", "The Python environment to install the packages to.")] [Input("packages", "The packages to install.")] @@ -115,6 +116,7 @@ public static void InstallPackages( } } + [PreviousVersion("9.3", "BH.Engine.Python.Compute.InstallPackages(PythonEnvironment, string)")] [Description("Install a local editable Python package. An unchanged installation from the same directory is retained; project dependencies are still registered.")] [Input("venv", "The Python environment to install the packages to.")] [Input("packageDirectory", "The package to install.")] diff --git a/Python_Engine/Compute/Remove.cs b/Python_Engine/Compute/Remove.cs index c122dbc9..5c9da9ed 100644 --- a/Python_Engine/Compute/Remove.cs +++ b/Python_Engine/Compute/Remove.cs @@ -117,5 +117,19 @@ public static void RemoveUV(bool run = false) Base.Compute.RecordNote($"UV (and all other associated tools) will be removed from {toolsDirectory}."); } } + + [PreviousVersion("9.3", "BH.Engine.Python.Compute.RemoveEverything()")] + [Description("Completely remove all BHoM-related Python environments, kernels and tools.")] + public static void RemoveEverything(bool run = false) + { + if ( run ) + { + foreach (string env in Directory.GetDirectories(Query.DirectoryEnvironments())) + { + RemoveVirtualEnvironment(Path.GetDirectoryName(env), run: run); + } + RemoveUV(run: run); + } + } } } diff --git a/Python_Engine/Compute/VirtualEnvironment.cs b/Python_Engine/Compute/VirtualEnvironment.cs index 8d52f835..18d592c1 100644 --- a/Python_Engine/Compute/VirtualEnvironment.cs +++ b/Python_Engine/Compute/VirtualEnvironment.cs @@ -31,6 +31,7 @@ namespace BH.Engine.Python { public static partial class Compute { + [PreviousVersion("9.3", "BH.Engine.Python.Compute.VirtualEnvironment(PythonVersion, string, bool)")] [Description("Create a Python Virtual Environment of a given version and name.")] [Input("version", "The version of Python to use for this environment.")] [Input("name", "The name of this venv.")] From 20affa30c8dbcb1c0f5569f86041c4dc75287343 Mon Sep 17 00:00:00 2001 From: Tristan Gerrish Date: Mon, 2 Nov 2026 13:33:40 +0000 Subject: [PATCH 08/16] Added versioning file - location and version unsure --- Versioning_93.json | 47 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 47 insertions(+) create mode 100644 Versioning_93.json diff --git a/Versioning_93.json b/Versioning_93.json new file mode 100644 index 00000000..e2425a36 --- /dev/null +++ b/Versioning_93.json @@ -0,0 +1,47 @@ +{ + "Namespace": { + "ToNew": {}, + "ToOld": {} + }, + "Type": { + "ToNew": {}, + "ToOld": {} + }, + "Property": { + "ToNew": {}, + "ToOld": {} + }, + "MessageForDeleted": { + "BH.Engine.Python.Compute.BasePythonEnvironment(BH.oM.Python.Enums.PythonVersion, System.Boolean, System.Boolean)": "Python environments are now managed by UV. Use InstallPythonToolkitVenv to install the toolkit environment, or VirtualEnvironment with a Python version string to create a named environment. Reconnect inputs manually.", + "BH.Engine.Python.Compute.DownloadFile(System.String, System.String, System.String, System.Boolean)": "This download helper has been removed. Python installation is now handled by UV. For other downloads, use a separate file-download workflow.", + "BH.Engine.Python.Compute.DownloadPythonVersion(BH.oM.Python.Enums.PythonVersion)": "Python installation is now handled by UV. Use VirtualEnvironment with a Python version string, such as \"3.10\", instead.", + "BH.Engine.Python.Compute.InstallPackages(BH.oM.Python.PythonEnvironment, System.Collections.Generic.List)": "Replace this component with InstallPackages(PythonEnvironment, List, Boolean). Supply an environment created using the UV workflow and set run to true.", + "BH.Engine.Python.Compute.InstallPackages(System.String, System.Collections.Generic.List)": "Installation using an executable path has been removed. Use InstallPackages with a PythonEnvironment created using the UV workflow and set run to true.", + "BH.Engine.Python.Compute.InstallRequirements(BH.oM.Python.PythonEnvironment, System.String)": "Requirements-file installation has been removed. Declare dependencies in pyproject.toml and create the environment from that file, or supply package requirements to InstallPackages with run set to true.", + "BH.Engine.Python.Compute.InstallRequirements(System.String, System.String)": "Requirements-file installation using an executable path has been removed. Declare dependencies in pyproject.toml and create the environment from that file, or use InstallPackages with a PythonEnvironment and run set to true.", + "BH.Engine.Python.Compute.InstallPackageLocal(BH.oM.Python.PythonEnvironment, System.String)": "Replace this component with InstallPackageLocal(PythonEnvironment, String, Boolean). Supply an environment created using the UV workflow and set run to true.", + "BH.Engine.Python.Compute.InstallPackageLocal(System.String, System.String)": "Local package installation using an executable path has been removed. Use InstallPackageLocal with a PythonEnvironment created using the UV workflow and set run to true.", + "BH.Engine.Python.Compute.RemoveKernel(System.String)": "Use RemoveJupyterKernel with the name of a UV-managed BHoM environment and set run to true. Legacy kernels may require manual removal using Jupyter.", + "BH.Engine.Python.Compute.RemoveAllKernels()": "Bulk kernel removal has been removed. Use RemoveJupyterKernel for individual UV-managed BHoM environments with run set to true. Legacy kernels may require manual removal using Jupyter.", + "BH.Engine.Python.Compute.RemoveVirtualEnvironment(System.String)": "Replace this component with RemoveVirtualEnvironment(String, Boolean) and set run to true. It removes environments in the new BHoM Python directory; legacy environments require separate cleanup.", + "BH.Engine.Python.Compute.RemoveAllVirtualEnvironments()": "Bulk environment removal has been removed. Use RemoveVirtualEnvironment for each named environment and set run to true. RemoveEverything also removes BHoM-managed UV tools, so use it only when that broader cleanup is intended.", + "BH.Engine.Python.Compute.RemoveBaseVersion(BH.oM.Python.Enums.PythonVersion)": "The former base Python installation workflow has been removed. Use RemoveVirtualEnvironment for named BHoM environments. Removing UV does not uninstall UV-managed Python runtimes or legacy Python installations.", + "BH.Engine.Python.Compute.RemoveEverything()": "Replace this component with RemoveEverything(Boolean) and set run to true. Review its scope: it targets the new BHoM Python environments and managed UV tools, not legacy installations.", + "BH.Engine.Python.Compute.RequirementsTxt(System.String, System.String)": "Requirements-file generation has been removed. Manage project dependencies using pyproject.toml and UV. Use UV export separately if a requirements.txt file is needed.", + "BH.Engine.Python.Compute.UnzipFile(System.String, System.String, System.String, System.Boolean)": "This archive-extraction helper has been removed. Use a separate archive-extraction workflow if needed.", + "BH.Engine.Python.Compute.UpdateBHoMPackages(System.String, BH.oM.Python.Enums.PythonVersion)": "Use UpdateBHoMPackages(PythonEnvironment) with an environment created using the UV workflow. The PythonVersion enum input is no longer supported.", + "BH.Engine.Python.Compute.VirtualEnvironment(BH.oM.Python.Enums.PythonVersion, System.String, System.Boolean)": "Replace this component with VirtualEnvironment(String, String, Boolean). Replace the PythonVersion enum with a version string, such as \"3.10\", and recreate the environment using UV.", + "BH.Engine.Python.Query.DirectoryKernels()": "The fixed kernel-directory query has been removed. Use Jupyter kernelspec discovery to locate registered kernels.", + "BH.Engine.Python.Query.DirectoryCode()": "The separate PythonCode directory is no longer used. Toolkit project files now reside under DirectoryEnvironments(), within the toolkit's named directory.", + "BH.Engine.Python.Query.DirectoryBaseEnvironment(BH.oM.Python.Enums.PythonVersion)": "Base Python environments are no longer organised by PythonVersion. Use a named UV-managed environment and query its directory or executable instead.", + "BH.Engine.Python.Query.EmbeddableURL(BH.oM.Python.Enums.PythonVersion)": "Python downloads are now managed by UV. Use VirtualEnvironment with a Python version string instead of retrieving an installer URL.", + "BH.Engine.Python.Query.IsValidEnvironmentName(System.String)": "This legacy environment-name validation method has been removed. Review names against the requirements of the UV environment and Jupyter kernel workflows.", + "BH.Engine.Python.Query.VirtualEnvironmentExists(System.String, BH.oM.Python.Enums.PythonVersion)": "Replace this component with VirtualEnvironmentExists(String). It checks the new UV-managed BHoM environment layout and no longer accepts a PythonVersion input.", + "BH.Engine.Python.Query.VirtualEnvironmentKernel(System.String)": "This kernel-path query has been removed. Use Jupyter kernelspec discovery to locate a registered kernel.", + "BH.oM.Python.Enums.PythonVersion": "Python versions are now specified as strings, such as \"3.10\" or \"3.11\". Replace enum inputs with the appropriate version string and recreate environments using the UV workflow." + }, + "MessageForNoUpgrade": { + "BH.Engine.Python.Compute.RunCommandStdout(System.String, System.Boolean, System.String, System.Double)": "The output has changed from a single string to stdout, stderr and exit code. Review and reconnect downstream components manually. Exit code zero indicates success; -1 indicates timeout.", + "BH.Engine.Python.Query.Version(System.String)": "The output is now a Python version string instead of PythonVersion. Replace downstream enum-based comparisons and inputs with string-based equivalents." + } +} \ No newline at end of file From 26dadaabc27196cd23501acb1ff7904dfb2f4416 Mon Sep 17 00:00:00 2001 From: Tristan Gerrish Date: Mon, 2 Nov 2026 13:49:15 +0000 Subject: [PATCH 09/16] moved mplstyle files --- Python_Engine/Python/src/{assets => python_toolkit}/bhom.mplstyle | 0 .../Python/src/{assets => python_toolkit}/bhom_dark.mplstyle | 0 2 files changed, 0 insertions(+), 0 deletions(-) rename Python_Engine/Python/src/{assets => python_toolkit}/bhom.mplstyle (100%) rename Python_Engine/Python/src/{assets => python_toolkit}/bhom_dark.mplstyle (100%) diff --git a/Python_Engine/Python/src/assets/bhom.mplstyle b/Python_Engine/Python/src/python_toolkit/bhom.mplstyle similarity index 100% rename from Python_Engine/Python/src/assets/bhom.mplstyle rename to Python_Engine/Python/src/python_toolkit/bhom.mplstyle diff --git a/Python_Engine/Python/src/assets/bhom_dark.mplstyle b/Python_Engine/Python/src/python_toolkit/bhom_dark.mplstyle similarity index 100% rename from Python_Engine/Python/src/assets/bhom_dark.mplstyle rename to Python_Engine/Python/src/python_toolkit/bhom_dark.mplstyle From f5fe119033929452bacded5415068ba25092f11d Mon Sep 17 00:00:00 2001 From: Tristan Gerrish Date: Mon, 2 Nov 2026 14:05:18 +0000 Subject: [PATCH 10/16] minor ci compliance changes --- Python_Engine/Compute/Remove.cs | 2 +- Python_Engine/Compute/Run.cs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Python_Engine/Compute/Remove.cs b/Python_Engine/Compute/Remove.cs index 5c9da9ed..77f4b094 100644 --- a/Python_Engine/Compute/Remove.cs +++ b/Python_Engine/Compute/Remove.cs @@ -90,7 +90,7 @@ public static void RemoveJupyterKernel(string name, bool run = false) } [Description("Remove UV from the BHoM tools directory. Missing installations produce a warning; installations elsewhere are not removed.")] - [Input("run", "Run this method")] + [Input("run", "Run this method.")] public static void RemoveUV(bool run = false) { string toolsDirectory = Query.DirectoryTools(); diff --git a/Python_Engine/Compute/Run.cs b/Python_Engine/Compute/Run.cs index 89655802..633ca354 100644 --- a/Python_Engine/Compute/Run.cs +++ b/Python_Engine/Compute/Run.cs @@ -138,7 +138,7 @@ public static Output RunCommandStdout( } [Description("Run a string containing Python code and return the output. The string passed should end with a \"print\" statement, and other print statements within it should be captured within the script to ensure only a single output string is passed back to this method.")] - [Input("env", "The Python environment with which to run the Python script.")] + [Input("venv", "The Python environment with which to run the Python script.")] [Input("pythonString", "The string containing the Python script.")] [Output("result", "The stdout data from the executed Python script.")] public static string RunPythonString(this oM.Python.PythonEnvironment venv, string pythonString) From 2f82120195ec269846c9421a144ac5017808d12e Mon Sep 17 00:00:00 2001 From: Tristan Gerrish <10939984+tg359@users.noreply.github.com> Date: Tue, 3 Nov 2026 12:35:29 +0000 Subject: [PATCH 11/16] Delete Python_Engine/Python/uv.lock --- Python_Engine/Python/uv.lock | 1665 ---------------------------------- 1 file changed, 1665 deletions(-) delete mode 100644 Python_Engine/Python/uv.lock diff --git a/Python_Engine/Python/uv.lock b/Python_Engine/Python/uv.lock deleted file mode 100644 index ba688ca9..00000000 --- a/Python_Engine/Python/uv.lock +++ /dev/null @@ -1,1665 +0,0 @@ -version = 1 -revision = 5 -requires-python = "==3.10.*" - -[[package]] -name = "accessible-pygments" -version = "0.0.5" -source = { registry = "https://pypi.org/simple" } -dependencies = [ - { name = "pygments" }, -] -sdist = { url = "https://files.pythonhosted.org/packages/bc/c1/bbac6a50d02774f91572938964c582fff4270eee73ab822a4aeea4d8b11b/accessible_pygments-0.0.5.tar.gz", hash = "sha256:40918d3e6a2b619ad424cb91e556bd3bd8865443d9f22f1dcdf79e33c8046872", size = 1377899, upload-time = "2024-05-10T11:23:10.216Z" } -wheels = [ - { url = "https://files.pythonhosted.org/packages/8d/3f/95338030883d8c8b91223b4e21744b04d11b161a3ef117295d8241f50ab4/accessible_pygments-0.0.5-py3-none-any.whl", hash = "sha256:88ae3211e68a1d0b011504b2ffc1691feafce124b845bd072ab6f9f66f34d4b7", size = 1395903, upload-time = "2024-05-10T11:23:08.421Z" }, -] - -[[package]] -name = "alabaster" -version = "1.0.0" -source = { registry = "https://pypi.org/simple" } -sdist = { url = "https://files.pythonhosted.org/packages/a6/f8/d9c74d0daf3f742840fd818d69cfae176fa332022fd44e3469487d5a9420/alabaster-1.0.0.tar.gz", hash = "sha256:c00dca57bca26fa62a6d7d0a9fcce65f3e026e9bfe33e9c538fd3fbb2144fd9e", size = 24210, upload-time = "2024-07-26T18:15:03.762Z" } -wheels = [ - { url = "https://files.pythonhosted.org/packages/7e/b3/6b4067be973ae96ba0d615946e314c5ae35f9f993eca561b356540bb0c2b/alabaster-1.0.0-py3-none-any.whl", hash = "sha256:fc6786402dc3fcb2de3cabd5fe455a2db534b371124f1f21de8731783dec828b", size = 13929, upload-time = "2024-07-26T18:15:02.05Z" }, -] - -[[package]] -name = "appnope" -version = "1.0.0" -source = { registry = "https://pypi.org/simple" } -sdist = { url = "https://files.pythonhosted.org/packages/11/f7/a82489c2b6ebe32d3e2831895ae19c77861f0eadf3bb16034484d965dbb2/appnope-1.0.0.tar.gz", hash = "sha256:685db59cb6043c3c2e528adc0b3bce3a5f8d09bcf7492c6ea650d1b7421f3c49", size = 5454, upload-time = "2026-08-20T21:36:13.748Z" } -wheels = [ - { url = "https://files.pythonhosted.org/packages/46/c7/6b687cb0f83d2a51017d47953f2ee430ffad6fec2a8ebc964e0718a33eb1/appnope-1.0.0-py3-none-any.whl", hash = "sha256:6fe0c04218aab65c54c4ff81638cdbf848d89f5653b74d68638a137f200dd16e", size = 4158, upload-time = "2026-08-20T21:36:12.444Z" }, -] - -[[package]] -name = "ast-serialize" -version = "0.12.1" -source = { registry = "https://pypi.org/simple" } -sdist = { url = "https://files.pythonhosted.org/packages/c2/1c/7257e6ec9382843915ce475558ce4492ccb5ed39122c256bb369c27e2ebf/ast_serialize-0.12.1.tar.gz", hash = "sha256:5285a390caf1c44368ae270f037f797b91427d138b7d43cad0f1fda4c83518d9", size = 954408, upload-time = "2026-10-03T12:25:00.221Z" } -wheels = [ - { url = "https://files.pythonhosted.org/packages/16/05/ca16884f9498386f3646bb18be59f0e31d44e992d252d7d6f5e4f8ae1ee2/ast_serialize-0.12.1-cp315-abi3.abi3t-macosx_10_12_x86_64.whl", hash = "sha256:410233de149ab8414cb27c6fc73e9d2baa35d6f971672d540d752060d980ffb4", size = 1235686, upload-time = "2026-10-03T12:23:55.863Z" }, - { url = "https://files.pythonhosted.org/packages/29/f2/34e87ed30e292cf365523712c4bcfef1967d9c3c2749de21b1f93b1fe0f3/ast_serialize-0.12.1-cp315-abi3.abi3t-macosx_11_0_arm64.whl", hash = "sha256:b9a2310845302f1a6bd45ae8a67d5760211103a8d66410b854bfa440d107e093", size = 1215598, upload-time = "2026-10-03T12:23:57.48Z" }, - { url = "https://files.pythonhosted.org/packages/f8/dc/c498f41c957b6ff31b97ed8ceccf3a84f85af7debca1125183cab95bb58b/ast_serialize-0.12.1-cp315-abi3.abi3t-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:6ff65f40f49d5e1a1a043ba366081d59a4e26a9f5c1b07eb1170e172115da7ca", size = 1281911, upload-time = "2026-10-03T12:23:58.954Z" }, - { url = "https://files.pythonhosted.org/packages/dc/60/70ccefae9d88058c4c234bf0aed93f54aca36eb74087736e76e9515aee96/ast_serialize-0.12.1-cp315-abi3.abi3t-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:536d783c4d91331f094e0a892221e619be5ffbe6fb6640885f14d7f226ec90ca", size = 1287296, upload-time = "2026-10-03T12:24:00.429Z" }, - { url = "https://files.pythonhosted.org/packages/08/e9/4fc697879c7128e29f9dab2ed19a9b586a56b621e5ea4aee2ae28c18e116/ast_serialize-0.12.1-cp315-abi3.abi3t-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:c42d2d65f388d1960c5796231eb9bf5a988c46228633eb489605c4549ad16c52", size = 1532339, upload-time = "2026-10-03T12:24:02.053Z" }, - { url = "https://files.pythonhosted.org/packages/8a/9e/9e2bd489731602a94dbd0c576ebe1cc487a2d0f6127be743f44711166f0d/ast_serialize-0.12.1-cp315-abi3.abi3t-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:a5628a12acc875fe7a167910f18d101dd101c2a7b1e6c2b6f7289ffaff25805c", size = 1308988, upload-time = "2026-10-03T12:24:03.61Z" }, - { url = "https://files.pythonhosted.org/packages/3f/69/e9cae837bd766a66db6953ffb5fc7f04b1945e02b0a9e4c6a0b6acb08f17/ast_serialize-0.12.1-cp315-abi3.abi3t-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:9e855adfa5bb982b2e6fe09056b2d584f6dd4fce085d91a07d1155683751b6b5", size = 1303412, upload-time = "2026-10-03T12:24:05.62Z" }, - { url = "https://files.pythonhosted.org/packages/b2/1e/5ef8c62d5031d93187ed0d8dade5d942de9920c3fbd678c7652362b9a7a2/ast_serialize-0.12.1-cp315-abi3.abi3t-manylinux_2_31_riscv64.whl", hash = "sha256:fafe1471e8aca6c87b4913b7b54ff97197adf702fbe28692284b929dfa62ff96", size = 1298466, upload-time = "2026-10-03T12:24:07.242Z" }, - { url = "https://files.pythonhosted.org/packages/c2/f3/25ded60844a1a437edc840e597b6f81daf91dc4a26035416e14298d3a091/ast_serialize-0.12.1-cp315-abi3.abi3t-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:a5cac246474d2a703147d1605a6ac5ba0fa9e0a443cf1cf42513adf4df02686f", size = 1355617, upload-time = "2026-10-03T12:24:09.125Z" }, - { url = "https://files.pythonhosted.org/packages/05/68/a0d3cc8d8042208a2cbef7b26483f4941b44dd5dd717bb19f20e4a4c0d66/ast_serialize-0.12.1-cp315-abi3.abi3t-musllinux_1_2_aarch64.whl", hash = "sha256:6e25cd319fb0d7b39fcac666784ec86708ccbc78d07a698b1400cf5ed40c045b", size = 1458949, upload-time = "2026-10-03T12:24:10.772Z" }, - { url = "https://files.pythonhosted.org/packages/df/a0/5e4d355c48a9f125b8bec7b1b98d4d2dcd8324ff1d4dfcb03678a03c1414/ast_serialize-0.12.1-cp315-abi3.abi3t-musllinux_1_2_armv7l.whl", hash = "sha256:657a7354ea16ed4d29f8127ed477c6fee3915c111d135f020ca835a991438e90", size = 1562328, upload-time = "2026-10-03T12:24:12.404Z" }, - { url = "https://files.pythonhosted.org/packages/8a/5f/3d40f6a7908200f2f0ed9ce1bad130d00e06d0405baa7918d4a4299b25dd/ast_serialize-0.12.1-cp315-abi3.abi3t-musllinux_1_2_i686.whl", hash = "sha256:9eb9de7e59621acdb3e66984f374272b33d56d15a04763e2fd0604211e1c8303", size = 1557751, upload-time = "2026-10-03T12:24:14.455Z" }, - { url = "https://files.pythonhosted.org/packages/3f/13/d53e5a7e299d6dbaeab23a424eea2c98c821b46ed7b05abbe14743beeb63/ast_serialize-0.12.1-cp315-abi3.abi3t-musllinux_1_2_ppc64le.whl", hash = "sha256:09cc4d3103c1fc97f6845ba307af1db9cde5226bef47f8843220dde83f2276ba", size = 1666238, upload-time = "2026-10-03T12:24:16.171Z" }, - { url = "https://files.pythonhosted.org/packages/37/5b/7638ee3ae35a64e4467160a37dc7565cddfe2a87f06cef2fd07c93cfd503/ast_serialize-0.12.1-cp315-abi3.abi3t-musllinux_1_2_riscv64.whl", hash = "sha256:c9e2a592706fd791c2271ce9c8f4e38c98d3ea0b4a86b511e09a4fe3ac44ab37", size = 1472620, upload-time = "2026-10-03T12:24:18.053Z" }, - { url = "https://files.pythonhosted.org/packages/fc/e7/6e9e621e0e4a3be5a9a5f8b6961982964d2367013dbe64feb5adaa43e56d/ast_serialize-0.12.1-cp315-abi3.abi3t-musllinux_1_2_x86_64.whl", hash = "sha256:f4ac042e95a575432c1730ca4cb9183066a2074886a599f46c1f1b0955fb8198", size = 1500141, upload-time = "2026-10-03T12:24:20.036Z" }, - { url = "https://files.pythonhosted.org/packages/4a/4f/3217da5b671711c09cc6be580095839cad539983662a6599405bd75c1a19/ast_serialize-0.12.1-cp315-abi3.abi3t-win32.whl", hash = "sha256:b3cd105995942cc6163a229674a86161ba1305f646493efd59bd6723a357ee14", size = 1118382, upload-time = "2026-10-03T12:24:21.599Z" }, - { url = "https://files.pythonhosted.org/packages/80/1e/6074cf29dca8ceff27d50e845c88e7a2eaaa7f0b6f3972909e878d844737/ast_serialize-0.12.1-cp315-abi3.abi3t-win_amd64.whl", hash = "sha256:a9cd24a26126088693ca054547ea0a391398a29cf1a3a2bec1009b4b6acc8b82", size = 1158034, upload-time = "2026-10-03T12:24:23.316Z" }, - { url = "https://files.pythonhosted.org/packages/92/a0/81ce428f9f3f1ca45f8b62c9711c30452bf8190476e8685cea0f72d8d008/ast_serialize-0.12.1-cp315-abi3.abi3t-win_arm64.whl", hash = "sha256:9649cd903db0dc047906c6dd740784a2ba665d54f7e43ba31457edbce76c9493", size = 1129437, upload-time = "2026-10-03T12:24:25.044Z" }, - { url = "https://files.pythonhosted.org/packages/80/fb/1eabd2c0673283054468b1c6cb539aeb877636d6c84b280279f2d7a177a9/ast_serialize-0.12.1-cp39-abi3-macosx_10_12_x86_64.whl", hash = "sha256:98d91cd3a6cb76a39512ee090a539d1e3206b732ad8150eb38918cffa1ddf515", size = 1241515, upload-time = "2026-10-03T12:24:28.493Z" }, - { url = "https://files.pythonhosted.org/packages/1b/d7/c56955934a431a0fa3e4e9aa7af4a53ceab2a61241005427545208945eb4/ast_serialize-0.12.1-cp39-abi3-macosx_11_0_arm64.whl", hash = "sha256:8a32f184ce3e4b1d0b06d642a1243281cf55b99e0323680b1b8f904029fd7700", size = 1228048, upload-time = "2026-10-03T12:24:30.556Z" }, - { url = "https://files.pythonhosted.org/packages/1e/4e/2b2ca4602baf92f842316ea617423402089df4fbd2ea42571ba28725ba46/ast_serialize-0.12.1-cp39-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:e62126ac2be2d9340ac1b3ee7a0466a883ecbed634cff0929c88ca0b671483b7", size = 1292087, upload-time = "2026-10-03T12:24:32.45Z" }, - { url = "https://files.pythonhosted.org/packages/d9/49/9ebd05218a87ca31f4f855d5e3df14239bba3c58f2aed9d02c7cba5d94f5/ast_serialize-0.12.1-cp39-abi3-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:0f93a70fa9826c04ea9f2c3a880f87f4cca09a828144ed5084682abd28110980", size = 1295355, upload-time = "2026-10-03T12:24:34.423Z" }, - { url = "https://files.pythonhosted.org/packages/dc/09/6db7c4327e7a56aba805f7190d377a159fc0bf6bdefb410dc7860624dfa3/ast_serialize-0.12.1-cp39-abi3-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:1858887be56a64a2aea899423dfe43787c34c75c18b0d7497de8e618d54b2790", size = 1541231, upload-time = "2026-10-03T12:24:36.05Z" }, - { url = "https://files.pythonhosted.org/packages/ed/85/7ab6097e5fe23cd4657b0e5a2fabb4f789f91e441a3ee40b3ca8b79be238/ast_serialize-0.12.1-cp39-abi3-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:89a2bc39a820bc7785b60c53a5742b4e8dd4c1a599294e2dd68fae545883d44a", size = 1317324, upload-time = "2026-10-03T12:24:37.737Z" }, - { url = "https://files.pythonhosted.org/packages/c0/60/58961e7fd129e226ce36788fe328d20034f3105f5d3380df690050517737/ast_serialize-0.12.1-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:50a9eaedf1db4857dad7cc47dd757ed70bfcc40b89d44d516c4a2f0d5033bd76", size = 1311809, upload-time = "2026-10-03T12:24:39.306Z" }, - { url = "https://files.pythonhosted.org/packages/15/c7/09d973db87d4575cba470fd80a3fa489322f7d6882546e43a4b21012468e/ast_serialize-0.12.1-cp39-abi3-manylinux_2_31_riscv64.whl", hash = "sha256:c30b609e8fea426b310543126de876592236a25aa8ebd59f1e2b323dd52a4085", size = 1306678, upload-time = "2026-10-03T12:24:40.891Z" }, - { url = "https://files.pythonhosted.org/packages/84/27/84f69c22bcdaa5256b4fe43ff972fc117668fff8e68495807d5792eadcce/ast_serialize-0.12.1-cp39-abi3-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:7b1ad06513022cfa1337744959255af0ef16119d2beb1e547b67f37ad9433d4a", size = 1362009, upload-time = "2026-10-03T12:24:42.809Z" }, - { url = "https://files.pythonhosted.org/packages/43/46/76ee342ef22cd6d82ccd6089d5e2f7163246de73d1816ccb4b6ec0550db6/ast_serialize-0.12.1-cp39-abi3-musllinux_1_2_aarch64.whl", hash = "sha256:6add54b495e37ae3cf3a1f0d5eaba364814eb72e93026adc41b7791e4b0d45d3", size = 1467959, upload-time = "2026-10-03T12:24:44.496Z" }, - { url = "https://files.pythonhosted.org/packages/31/4d/18e48154bbf6058eed8d9b54fcebb2e130f8a380db1a2a202b4faac48626/ast_serialize-0.12.1-cp39-abi3-musllinux_1_2_armv7l.whl", hash = "sha256:5fc136cd08001b817ad0b3e7426f50a7d2b8982dc7c6491f0af78af4c3dd8672", size = 1571157, upload-time = "2026-10-03T12:24:46.156Z" }, - { url = "https://files.pythonhosted.org/packages/34/76/6b16ddf0510e713613a5f5441b13407c1bde6158df04946b9f1fdc65add3/ast_serialize-0.12.1-cp39-abi3-musllinux_1_2_i686.whl", hash = "sha256:45a9e6b700bbd973d49942668a5cdbeffa693f2e250b8a5409abd1fa9d351854", size = 1566873, upload-time = "2026-10-03T12:24:48.542Z" }, - { url = "https://files.pythonhosted.org/packages/75/33/9f6169ae7f60c2da4baec03450073d3f1edb39e95ab538be0d25a7d2f72e/ast_serialize-0.12.1-cp39-abi3-musllinux_1_2_ppc64le.whl", hash = "sha256:a1d8267f83c613ea0a31f2518df074bd62e98a4b3a4892f6a529d74e08e02dba", size = 1673030, upload-time = "2026-10-03T12:24:50.566Z" }, - { url = "https://files.pythonhosted.org/packages/11/51/0d78755bd61d6cf8980f0cfdc7fa8ede38df46a5423c9f7a3da0cff587ec/ast_serialize-0.12.1-cp39-abi3-musllinux_1_2_riscv64.whl", hash = "sha256:9a0cbab9796e6ce841197feeba4008faa96b4cc7741129542fd81c882d7a4f01", size = 1480052, upload-time = "2026-10-03T12:24:52.277Z" }, - { url = "https://files.pythonhosted.org/packages/01/ae/ad4c0e5129991f2761f388420c5ded37cb134ec5882e3e59043d33c1ad87/ast_serialize-0.12.1-cp39-abi3-musllinux_1_2_x86_64.whl", hash = "sha256:b4282695f1d51a3c6ef76560351bad5af880eff7d755aefea325bffb9bf68c25", size = 1508940, upload-time = "2026-10-03T12:24:53.846Z" }, - { url = "https://files.pythonhosted.org/packages/38/6b/3299182794d38815ae6e9c7ede9bb8f2e4aa93c3578bed201c1ea746643a/ast_serialize-0.12.1-cp39-abi3-win32.whl", hash = "sha256:119d1b0cadaba4a6e475f9bbe79eecc79351e373142eabe7c353f0250d70aebb", size = 1125618, upload-time = "2026-10-03T12:24:55.405Z" }, - { url = "https://files.pythonhosted.org/packages/86/14/5d4fb733c18a1d69e237c067b183842f3a7ea1c999a51ddc87093a281c88/ast_serialize-0.12.1-cp39-abi3-win_amd64.whl", hash = "sha256:3d6ed63d4fc1ec867b8cb522d58c36df0e8f05e487bea0ffd102043a37636d72", size = 1165798, upload-time = "2026-10-03T12:24:57.052Z" }, - { url = "https://files.pythonhosted.org/packages/f1/f4/b54123680025c0b7253117418f023d1b2487f1102552acbdd9d8ee96b622/ast_serialize-0.12.1-cp39-abi3-win_arm64.whl", hash = "sha256:610a41351de68199de9a1434499083b4256c0df7658ec1cfc0a0a7b20b08d317", size = 1136560, upload-time = "2026-10-03T12:24:58.689Z" }, -] - -[[package]] -name = "astroid" -version = "4.3.4" -source = { registry = "https://pypi.org/simple" } -dependencies = [ - { name = "typing-extensions" }, -] -sdist = { url = "https://files.pythonhosted.org/packages/2d/87/5732fa68bf100a095cfcbd108f919220d995db99e1a7502b8119a869fd62/astroid-4.3.4.tar.gz", hash = "sha256:d515a105722b72098bbe82d430d65e635f742b6cbac3bdfaf8b7c188b87c5e39", size = 444627, upload-time = "2026-10-08T09:36:44.122Z" } -wheels = [ - { url = "https://files.pythonhosted.org/packages/16/d4/f23c0ac6e6de33ba5686cb21c672c95e0c2d3d4c9351f16d3b5fed818652/astroid-4.3.4-py3-none-any.whl", hash = "sha256:2bcd0d02648a443a4b818c952c3550091989daefac3c12d3b83b2289482e0818", size = 288310, upload-time = "2026-10-08T09:36:42.284Z" }, -] - -[[package]] -name = "asttokens" -version = "3.0.2" -source = { registry = "https://pypi.org/simple" } -sdist = { url = "https://files.pythonhosted.org/packages/25/1e/faf0f247f6f881b98fc4d6d07e14085cb89d13665084e6d6ac1dc2c03d0b/asttokens-3.0.2.tar.gz", hash = "sha256:3ecdbd8f2cc195f53ccada3a613538bb5f9ef6f6869129f13e03c30a677b8fe2", size = 63136, upload-time = "2026-07-12T03:31:49.084Z" } -wheels = [ - { url = "https://files.pythonhosted.org/packages/d4/2b/04b8a15f3a1c77bc79ddf5c73875327f34b4fa75982df2b76e45e402d364/asttokens-3.0.2-py3-none-any.whl", hash = "sha256:9da13157f5b28becde0bd374fc677dcd3c290614264eff096f167c469cd9f933", size = 28702, upload-time = "2026-07-12T03:31:47.542Z" }, -] - -[[package]] -name = "attrs" -version = "26.1.0" -source = { registry = "https://pypi.org/simple" } -sdist = { url = "https://files.pythonhosted.org/packages/9a/8e/82a0fe20a541c03148528be8cac2408564a6c9a0cc7e9171802bc1d26985/attrs-26.1.0.tar.gz", hash = "sha256:d03ceb89cb322a8fd706d4fb91940737b6642aa36998fe130a9bc96c985eff32", size = 952055, upload-time = "2026-03-19T14:22:25.026Z" } -wheels = [ - { url = "https://files.pythonhosted.org/packages/64/b4/17d4b0b2a2dc85a6df63d1157e028ed19f90d4cd97c36717afef2bc2f395/attrs-26.1.0-py3-none-any.whl", hash = "sha256:c647aa4a12dfbad9333ca4e71fe62ddc36f4e63b2d260a37a8b83d2f043ac309", size = 67548, upload-time = "2026-03-19T14:22:23.645Z" }, -] - -[[package]] -name = "babel" -version = "2.18.0" -source = { registry = "https://pypi.org/simple" } -sdist = { url = "https://files.pythonhosted.org/packages/7d/b2/51899539b6ceeeb420d40ed3cd4b7a40519404f9baf3d4ac99dc413a834b/babel-2.18.0.tar.gz", hash = "sha256:b80b99a14bd085fcacfa15c9165f651fbb3406e66cc603abf11c5750937c992d", size = 9959554, upload-time = "2026-02-01T12:30:56.078Z" } -wheels = [ - { url = "https://files.pythonhosted.org/packages/77/f5/21d2de20e8b8b0408f0681956ca2c69f1320a3848ac50e6e7f39c6159675/babel-2.18.0-py3-none-any.whl", hash = "sha256:e2b422b277c2b9a9630c1d7903c2a00d0830c409c59ac8cae9081c92f1aeba35", size = 10196845, upload-time = "2026-02-01T12:30:53.445Z" }, -] - -[[package]] -name = "beautifulsoup4" -version = "4.15.0" -source = { registry = "https://pypi.org/simple" } -dependencies = [ - { name = "soupsieve" }, - { name = "typing-extensions" }, -] -sdist = { url = "https://files.pythonhosted.org/packages/43/65/318323f98dbee45d42dff61d8f047181bc6f2268a9068cfad035a46be5af/beautifulsoup4-4.15.0.tar.gz", hash = "sha256:288e3ca7d54b06f2ac191970bc275c1939cb46d450b255bf6718b04aa37ab4f7", size = 632571, upload-time = "2026-06-07T16:44:20.453Z" } -wheels = [ - { url = "https://files.pythonhosted.org/packages/88/c6/92fcd42f1ba33e1184263f25bfabf3d27c383410470f169e4b8163bf9c17/beautifulsoup4-4.15.0-py3-none-any.whl", hash = "sha256:d6f88de62e1d4e38ecb1077eb9724cd0eff29d2a08ca16a401e9b9e93f117cf9", size = 109924, upload-time = "2026-06-07T16:44:21.566Z" }, -] - -[[package]] -name = "blinker" -version = "1.9.0" -source = { registry = "https://pypi.org/simple" } -sdist = { url = "https://files.pythonhosted.org/packages/21/28/9b3f50ce0e048515135495f198351908d99540d69bfdc8c1d15b73dc55ce/blinker-1.9.0.tar.gz", hash = "sha256:b4ce2265a7abece45e7cc896e98dbebe6cead56bcf805a3d23136d145f5445bf", size = 22460, upload-time = "2024-11-08T17:25:47.436Z" } -wheels = [ - { url = "https://files.pythonhosted.org/packages/10/cb/f2ad4230dc2eb1a74edf38f1a38b9b52277f75bef262d8908e60d957e13c/blinker-1.9.0-py3-none-any.whl", hash = "sha256:ba0efaa9080b619ff2f3459d1d500c57bddea4a6b424b60a91141db6fd2f08bc", size = 8458, upload-time = "2024-11-08T17:25:46.184Z" }, -] - -[[package]] -name = "certifi" -version = "2026.7.22" -source = { registry = "https://pypi.org/simple" } -sdist = { url = "https://files.pythonhosted.org/packages/a3/c2/24167ea9858356b47a87a50d39908bfdb72ceeefe0041586e704e5376b3a/certifi-2026.7.22.tar.gz", hash = "sha256:741e2c3b351ddf169a738da9f2c048608ff7f2c5cc02f1ebc6b118bb090d5d55", size = 138112, upload-time = "2026-07-22T03:35:12.644Z" } -wheels = [ - { url = "https://files.pythonhosted.org/packages/0b/a7/71ac2cff56fec219ed242bb11b8efb69fcc4bec75db06fb7bfe35de520e6/certifi-2026.7.22-py3-none-any.whl", hash = "sha256:62f22742b58a1a33014a2b6b706588a8d7e2a88ae7bd1a6ebe8c992928483775", size = 136983, upload-time = "2026-07-22T03:35:11.276Z" }, -] - -[[package]] -name = "cffi" -version = "2.1.1" -source = { registry = "https://pypi.org/simple" } -dependencies = [ - { name = "pycparser", marker = "implementation_name != 'PyPy'" }, -] -sdist = { url = "https://files.pythonhosted.org/packages/9e/ef/008a1939e372c06329a3fce4279c02f328488f3526744906eeec3da7ad5f/cffi-2.1.1.tar.gz", hash = "sha256:dd31f52ea1086513bb9df30f8fcee9b8918323ae067a3d5b78bc826a000712be", size = 530807, upload-time = "2026-08-03T21:21:18.939Z" } -wheels = [ - { url = "https://files.pythonhosted.org/packages/b6/d2/2cde336b375f55c76ca670f0be3978cc048e31e24f3b4d7ce8473150a388/cffi-2.1.1-cp310-cp310-macosx_10_15_x86_64.whl", hash = "sha256:baed1e86cc735622097354b9d1281406caf42ff42a886d29faa8e8d1630333be", size = 183779, upload-time = "2026-08-03T21:19:15.602Z" }, - { url = "https://files.pythonhosted.org/packages/94/1a/4b2f7c92293ba05cbd4a9a1b28faaf0326272d9488e6354657571c48a7aa/cffi-2.1.1-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:ca82be1a1d406ecfe1d25dc16cb33488e5a16bf4438c9fb590484ea29d92478b", size = 184178, upload-time = "2026-08-03T21:19:16.67Z" }, - { url = "https://files.pythonhosted.org/packages/17/0b/ba385d8ccedf926c3cd06e8e2f327027da5afe5f0eb30f1f7bc43ac55125/cffi-2.1.1-cp310-cp310-manylinux1_i686.manylinux2014_i686.manylinux_2_17_i686.manylinux_2_5_i686.whl", hash = "sha256:42e2f76b9455f5a9a844f770bf3e200ed3da0e15f5df3db9c31fe80b04b3d004", size = 211037, upload-time = "2026-08-03T21:19:17.705Z" }, - { url = "https://files.pythonhosted.org/packages/a3/b9/0f2e58b2cefa33255bff36935d42b13180fe559bba82596540eb404bde7d/cffi-2.1.1-cp310-cp310-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:5a59cc1c4442bc3d5c703bf720b51138d0bfc173618807c9ee2490a7541dd3d9", size = 218652, upload-time = "2026-08-03T21:19:18.735Z" }, - { url = "https://files.pythonhosted.org/packages/37/15/180e0dab27b9312c7479003d14c9e547634b7dcb934e2cc4650e1b131a7a/cffi-2.1.1-cp310-cp310-manylinux2014_ppc64le.manylinux_2_17_ppc64le.whl", hash = "sha256:9f8d177621de5cb38ee3e731eda45d421db093ec0739f46a5594babda7987a98", size = 205422, upload-time = "2026-08-03T21:19:19.96Z" }, - { url = "https://files.pythonhosted.org/packages/18/d4/03026f0c850cbbaa9030750490225b4a7f4d524ea4df72c3cc740a90f4ef/cffi-2.1.1-cp310-cp310-manylinux2014_s390x.manylinux_2_17_s390x.whl", hash = "sha256:75f80557d1389eddbd0de2681f6a390a0c5338c31ddaa821381c203fc3fd50d9", size = 205444, upload-time = "2026-08-03T21:19:21.246Z" }, - { url = "https://files.pythonhosted.org/packages/75/77/60bebf6f818bec84210ac5b6979ce4eeadce6fbbaabc9c7ab23e506d1ce5/cffi-2.1.1-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:194cffa889098ced9976c3fc6340305e43f6303657d298da55366907c05c22d6", size = 218742, upload-time = "2026-08-03T21:19:22.523Z" }, - { url = "https://files.pythonhosted.org/packages/b0/ae/679bf47e73fd77b352171727f07de559a003f14de5d02b904a6ec1fa73ca/cffi-2.1.1-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:5bb4e7ea95dcd6a014a6fef62e62467d67d8e582326443f3d68e71d6320a9fcf", size = 221054, upload-time = "2026-08-03T21:19:23.694Z" }, - { url = "https://files.pythonhosted.org/packages/09/b8/eefc0e06913b70aa153bf74c946094a18f58fd4aff11b7f372bfdfdca050/cffi-2.1.1-cp310-cp310-musllinux_1_2_i686.whl", hash = "sha256:3d22a20b1fb1632cc72c22f95f7b0d2961c3e1c235f245ba4c606c4771035659", size = 213489, upload-time = "2026-08-03T21:19:24.922Z" }, - { url = "https://files.pythonhosted.org/packages/6f/13/4e56852824a03cdf68523a35686f1c28eacd4bd30a7b0a78e682e6e6e1d3/cffi-2.1.1-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:1dea0e4d7d4f11f619fe8c1d76caf49e24405b4b5743c0e3be16a500ecd930c9", size = 220241, upload-time = "2026-08-03T21:19:26.214Z" }, - { url = "https://files.pythonhosted.org/packages/99/7f/040f9e163e4acac3ee3d85b02d00b2576e7ca980d8785f0a3a5f1a9bf7f5/cffi-2.1.1-cp310-cp310-win32.whl", hash = "sha256:7ce713ace7c0e4520535b42b77eaa742c16dab813978064913e5a3cf82973b41", size = 174578, upload-time = "2026-08-03T21:19:27.338Z" }, - { url = "https://files.pythonhosted.org/packages/ba/0b/644a2ec1a4eaba49c2939410bb1eb1d25b09d6d0582f5d2f95c537043725/cffi-2.1.1-cp310-cp310-win_amd64.whl", hash = "sha256:a48d62ab9d6f4f98c983223a547af44be6ca3691074c31cecced6facd3ba2dc1", size = 185082, upload-time = "2026-08-03T21:19:28.409Z" }, -] - -[[package]] -name = "charset-normalizer" -version = "3.5.2" -source = { registry = "https://pypi.org/simple" } -sdist = { url = "https://files.pythonhosted.org/packages/33/1c/f41d4e74c28ab327ff3acd36053f7ea506c55872d7a90b0fa71aa3ab0c89/charset_normalizer-3.5.2.tar.gz", hash = "sha256:39de2a259fc954455c57274dc94c79d5842774e1247a016aff30bc0efed0f4ef", size = 172659, upload-time = "2026-09-30T04:39:23.398Z" } -wheels = [ - { url = "https://files.pythonhosted.org/packages/98/77/46e87bcfc45d25ab4db7cfc9bb544bfa3ffd302289ed31ae93f5433eb899/charset_normalizer-3.5.2-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:195c26fb65950f8fce54e26349852b7bdd7c5f120aeefbcc440b8a20faaed4a3", size = 373348, upload-time = "2026-09-30T04:34:42.843Z" }, - { url = "https://files.pythonhosted.org/packages/52/fc/e518013affcc43c9f919c3ba41bffe9b4ee4aceb0a6462a6243efcca5f2d/charset_normalizer-3.5.2-cp310-cp310-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:9373ad13ef0d2c0fb761e04e55bfdee5a08b52cef2c882c8fbe9935b1517152e", size = 260860, upload-time = "2026-09-30T04:34:44.817Z" }, - { url = "https://files.pythonhosted.org/packages/d5/ad/2a895c945ee61988dfd9ccee64f0b78dc09f29c9b34d1dd545246d78e0ad/charset_normalizer-3.5.2-cp310-cp310-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:ddf19c062bea7a0cc80f519243d2c01dd091be0cf952a0750d4ad576709559f5", size = 246491, upload-time = "2026-09-30T04:34:46.227Z" }, - { url = "https://files.pythonhosted.org/packages/c9/05/5d958bc8ea503e26be25ada5430fd409cfb45dc22ff33f9f96e649613c99/charset_normalizer-3.5.2-cp310-cp310-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:3d14b50de6bf4d0edf857a9386836846f982b8f524e188e2e68b96d702bcf4aa", size = 290875, upload-time = "2026-09-30T04:34:47.691Z" }, - { url = "https://files.pythonhosted.org/packages/55/e2/06bad57dfdb49cad92c0ba85b6b4fa5827a67df37897287cfef0553843c2/charset_normalizer-3.5.2-cp310-cp310-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:28a15fdad492a99b6eccfaaed66ef3f74050680545ea61ec8b2f4c538f1f1320", size = 286987, upload-time = "2026-09-30T04:34:49.356Z" }, - { url = "https://files.pythonhosted.org/packages/c4/9f/9f52d2886d52645987d603425482c63c5045a3005db1354a7097e5ed1ae9/charset_normalizer-3.5.2-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:8a893cc101149f80a653f82062ebc95b34525a2614382e1da5458fe7c6997249", size = 271105, upload-time = "2026-09-30T04:34:50.957Z" }, - { url = "https://files.pythonhosted.org/packages/4a/41/e05e19578b7b87e7db2c3ecb884bd09d065274ab41e1f535542e8bae9b06/charset_normalizer-3.5.2-cp310-cp310-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:619799369eeef6366ed3e8755a5670f4f2f0fb6b30a0fd7264dc0fdc2357058e", size = 269833, upload-time = "2026-09-30T04:34:52.623Z" }, - { url = "https://files.pythonhosted.org/packages/c2/cd/fc7152414561ff78f9c61a4a627025f65fd244abaefc99ac4e75c6169b33/charset_normalizer-3.5.2-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:447441e76ec720b15e64418d32e092297340387053047c7c694f579efb0ee1d9", size = 263048, upload-time = "2026-09-30T04:34:54.013Z" }, - { url = "https://files.pythonhosted.org/packages/71/71/fb379e399b1013962716a059d551e03bd80b3e02f05d81246886af6c0958/charset_normalizer-3.5.2-cp310-cp310-musllinux_1_2_armv7l.whl", hash = "sha256:62588a277bfb59def052abd940703fa35107152bf479781a878617d60faf8fb5", size = 249237, upload-time = "2026-09-30T04:34:55.373Z" }, - { url = "https://files.pythonhosted.org/packages/33/4f/aeadccd6d20882909eb2597ec40eccc05d505e2262f14dc76d7620700657/charset_normalizer-3.5.2-cp310-cp310-musllinux_1_2_ppc64le.whl", hash = "sha256:44bd4fbb29dfbeba60e7d2bd000c59e4b21ddb3cc53912b14048d37092706d7c", size = 290756, upload-time = "2026-09-30T04:34:56.867Z" }, - { url = "https://files.pythonhosted.org/packages/b9/7b/e8a92613236b257d3b75d532496eb21f68ad8231d7d56df94497e460112e/charset_normalizer-3.5.2-cp310-cp310-musllinux_1_2_riscv64.whl", hash = "sha256:30fcd120b732aa79317f08dee04d7de0847822e4cf7ee0e9f445bb958832252c", size = 269026, upload-time = "2026-09-30T04:34:58.278Z" }, - { url = "https://files.pythonhosted.org/packages/ff/ac/21d5c6b972285c5f095ff78afdc99f3539e3985dfcf7ff1cfbe9e772f529/charset_normalizer-3.5.2-cp310-cp310-musllinux_1_2_s390x.whl", hash = "sha256:50e3adfb96fc189eb27b1cf62d3b598b89b4bb0420d93a3d3e42e137409011be", size = 287601, upload-time = "2026-09-30T04:34:59.703Z" }, - { url = "https://files.pythonhosted.org/packages/59/72/263491ec1494a194b16fcbff88a0220f2af633738c79e92b4d7189226322/charset_normalizer-3.5.2-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:b736353c0a625bbd5fcec108576e2385db3496f4f771f785ff32e108d3c3bc45", size = 272660, upload-time = "2026-09-30T04:35:01.26Z" }, - { url = "https://files.pythonhosted.org/packages/38/7a/81f1186c57e406233969ae96b5fd0c907254ab8b6e47da8ae24cd20fb9d7/charset_normalizer-3.5.2-cp310-cp310-win32.whl", hash = "sha256:f5833ad231be5eb6553de524a70f48d71b2c8563101750531e0b80184e175cd4", size = 187301, upload-time = "2026-09-30T04:35:02.659Z" }, - { url = "https://files.pythonhosted.org/packages/ae/ab/fb8b5178fdf7bf68efa61cbe892286bc9f73846f26147d4725fb89388475/charset_normalizer-3.5.2-cp310-cp310-win_amd64.whl", hash = "sha256:1461ac396c4fdb983a675f20aa555624f0ee18ac83d832b9244ffff3d8055275", size = 215446, upload-time = "2026-09-30T04:35:04.011Z" }, - { url = "https://files.pythonhosted.org/packages/36/40/e270b74e0d3f583d78d902960845a149e80eb7c737ee5613ccc6efc7264b/charset_normalizer-3.5.2-cp310-cp310-win_arm64.whl", hash = "sha256:c6708715abcf3c73b99508253e961a9967f02fe536532834149574eda6de0d1c", size = 203389, upload-time = "2026-09-30T04:35:05.577Z" }, - { url = "https://files.pythonhosted.org/packages/8c/ab/176fbfd5b64939c55d652366aa5b9ef1d767af207a3aa6ebeb0d226c484d/charset_normalizer-3.5.2-cp37-abi3-macosx_10_9_universal2.whl", hash = "sha256:4275811936e2f06feff5e598fb42a1b7ae852da8e39605211892b56b81a34efd", size = 331815, upload-time = "2026-09-30T04:38:26.216Z" }, - { url = "https://files.pythonhosted.org/packages/7e/84/371eac6b30bdbcbf2d632a1a01809103459216fcaae61b8b8d922c1bfb8a/charset_normalizer-3.5.2-cp37-abi3-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl", hash = "sha256:1c50fe28bbc2ced33386f298650d91218076c05420e6cbd790b913adc41659e7", size = 253276, upload-time = "2026-09-30T04:38:28.032Z" }, - { url = "https://files.pythonhosted.org/packages/43/6f/c4fbae58febff71709c51bc7e18fdfa55341dc382704740f9f0cbf03817b/charset_normalizer-3.5.2-cp37-abi3-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:d19fbd981a488e22cd04883659ca6b08f50b5974f9fd7c95655ef6a043e5893f", size = 241239, upload-time = "2026-09-30T04:38:29.732Z" }, - { url = "https://files.pythonhosted.org/packages/61/71/458c3f42164a07d0c5210798e9e704b39e540a6793b05aba67f3a35243a9/charset_normalizer-3.5.2-cp37-abi3-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:0fed1d06615f022ee3b13caf5e8b180cfea32bb2c5aded8a9d44277afc040f93", size = 231121, upload-time = "2026-09-30T04:38:31.462Z" }, - { url = "https://files.pythonhosted.org/packages/09/54/ab9e89367076f6331bb6c65c4bf14a5361fa5191cb6561bf534f18504e1b/charset_normalizer-3.5.2-cp37-abi3-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:838dcc90063569a0448120554591a1d6c4a4ffe11babf048908793154ab86ade", size = 260350, upload-time = "2026-09-30T04:38:33.239Z" }, - { url = "https://files.pythonhosted.org/packages/7c/c1/061431ecc688d9d76602502cb57cc01e691e682c18f1beb45f9673b5bbd2/charset_normalizer-3.5.2-cp37-abi3-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:2ce45c6627b22c47e390bc91a41c3d13032192e699fa0bea96e9671b373d69b0", size = 255430, upload-time = "2026-09-30T04:38:34.865Z" }, - { url = "https://files.pythonhosted.org/packages/8d/1f/20c8949f0676f7ab811abdeb7f4d7f1cbc6e61ff20bef08b44edeb092bc8/charset_normalizer-3.5.2-cp37-abi3-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:0774bf9bf620249fee3e0b8b9fd3065de213be30f3aa94ce2494b3b638949e26", size = 250612, upload-time = "2026-09-30T04:38:36.649Z" }, - { url = "https://files.pythonhosted.org/packages/2b/9e/46f2fa4c431fc98c4ae76a8cb5bdca54e0341e3cfc3fcfd8e82740250818/charset_normalizer-3.5.2-cp37-abi3-musllinux_1_2_aarch64.whl", hash = "sha256:1db38f4c5496827c1a501846d64d14c3b80c7e6714e406cd7dc36a9899fa1011", size = 242083, upload-time = "2026-09-30T04:38:38.26Z" }, - { url = "https://files.pythonhosted.org/packages/bd/39/559be29a0c0f086e0bba6922babd38916cc5e0b58ced4de13ee01ea05508/charset_normalizer-3.5.2-cp37-abi3-musllinux_1_2_armv7l.whl", hash = "sha256:304d8e4d493af723536393eee0c689eb7813f4a474c8b479dee63f1fdd98f621", size = 232738, upload-time = "2026-09-30T04:38:39.81Z" }, - { url = "https://files.pythonhosted.org/packages/ff/6c/387b0e4f756a282831c1d9fc6aeb6c51ca4507ca202767c8de15ce9b12e2/charset_normalizer-3.5.2-cp37-abi3-musllinux_1_2_ppc64le.whl", hash = "sha256:9b7f416ff0978e2f2249330527f0ad6fa02f4932e6199692d3b52da2048c19e4", size = 260703, upload-time = "2026-09-30T04:38:41.346Z" }, - { url = "https://files.pythonhosted.org/packages/96/92/1fdf015f09ef449f50d3ac4b67c90887c9c318b727daa95cc4f866e6521d/charset_normalizer-3.5.2-cp37-abi3-musllinux_1_2_riscv64.whl", hash = "sha256:01077390b03f7988f11d700a2194e69b119741a86b1a638b1db88891e3eced8e", size = 247622, upload-time = "2026-09-30T04:38:42.937Z" }, - { url = "https://files.pythonhosted.org/packages/dc/3c/8e7b8a5671ad5d433669fb2a76f1a0164df2d9b1718b0206bc2a16d840cc/charset_normalizer-3.5.2-cp37-abi3-musllinux_1_2_s390x.whl", hash = "sha256:7e841fb9010836c992c9f12fcbd43a831de93a5f726fc1ccd8ca1d0268c5014c", size = 257500, upload-time = "2026-09-30T04:38:44.604Z" }, - { url = "https://files.pythonhosted.org/packages/b4/f0/45b579df5cabc1d5d53ea1cc35e8437d3ca768c0acccc7041517cb6fbb32/charset_normalizer-3.5.2-cp37-abi3-musllinux_1_2_x86_64.whl", hash = "sha256:9cae88599c7219005d879f98e5ed53341e9a122af585e1091200358a3003d2a0", size = 255100, upload-time = "2026-09-30T04:38:46.289Z" }, - { url = "https://files.pythonhosted.org/packages/31/68/fdec18a343f5fb3f310588dd478b09ac4799e0b187dbade3a8cd776f03ef/charset_normalizer-3.5.2-cp37-abi3-win32.whl", hash = "sha256:01b0c0d2262a9e28e8484a278c7e1b5d650e3ac8cf2683d2967e25899f208bdf", size = 174499, upload-time = "2026-09-30T04:38:47.999Z" }, - { url = "https://files.pythonhosted.org/packages/9d/8a/b618149cc5207943a0242068d7a27897f56a62947b5a039085f2a22029f8/charset_normalizer-3.5.2-cp37-abi3-win_amd64.whl", hash = "sha256:9f56f72050826f63dcee7a7f55b0a77168cb3bfc553fd405e7f8f9ece75a4036", size = 200092, upload-time = "2026-09-30T04:38:49.707Z" }, - { url = "https://files.pythonhosted.org/packages/03/cf/4c66866fa9e2b1c78e3c911516d1de497a677b7ac60f1eceda74ce777ca3/charset_normalizer-3.5.2-cp37-abi3-win_arm64.whl", hash = "sha256:40ab6bffa02ae10a0581e6c198be7d2d8ca5c2a0c64e4ed3465d766df457573e", size = 294363, upload-time = "2026-09-30T04:38:51.312Z" }, - { url = "https://files.pythonhosted.org/packages/fc/ad/d07d7862a62ffa6d79d68074d14823243dd235a77c45262acbf6adeb28bf/charset_normalizer-3.5.2-py3-none-any.whl", hash = "sha256:b6b751274acb69d77b3323d6b7dbaa3c7fdfc1eb829b7eb61d262f32e1af9685", size = 68872, upload-time = "2026-09-30T04:39:21.828Z" }, -] - -[[package]] -name = "click" -version = "8.5.0" -source = { registry = "https://pypi.org/simple" } -sdist = { url = "https://files.pythonhosted.org/packages/c7/0e/7fa0ef50764b67090eca4114772a2abf8b6148198475e54c660b97caeee6/click-8.5.0.tar.gz", hash = "sha256:ba0d2089de75ea0310e2dde03160e6ca10009947fb95a182f9b54021bb272e34", size = 382235, upload-time = "2026-08-26T13:33:14.56Z" } -wheels = [ - { url = "https://files.pythonhosted.org/packages/58/50/6c0d534c5f134586a8e1ba4e330569e32f057e33372ae556463212fb4cd3/click-8.5.0-py3-none-any.whl", hash = "sha256:255bc9599cf7748b4b1a446ccc735421bd08a2ae529a8b88597d3de5664ee360", size = 125251, upload-time = "2026-08-26T13:33:12.928Z" }, -] - -[[package]] -name = "clr-loader" -version = "0.3.1" -source = { registry = "https://pypi.org/simple" } -dependencies = [ - { name = "cffi" }, -] -sdist = { url = "https://files.pythonhosted.org/packages/e4/46/7eea92b6aa2d68af78e049cbecec5f757f1aad44ecdecdc16bbad7eead51/clr_loader-0.3.1.tar.gz", hash = "sha256:2e073e9aaf49d1ae2f56ecba27987ad5fb68be4bcd9dd34a5bed8f0e4e128366", size = 86805, upload-time = "2026-04-18T17:49:44.287Z" } -wheels = [ - { url = "https://files.pythonhosted.org/packages/5e/da/ec1a6e36624000b6df0dd61183c42342ee5814c073315e802cadaad04d2f/clr_loader-0.3.1-py3-none-any.whl", hash = "sha256:cbad189de20d202a7d621956b0fc38049e13c9bf7ca2923441eff725cd121aa1", size = 55730, upload-time = "2026-04-18T17:49:42.99Z" }, -] - -[[package]] -name = "colorama" -version = "0.4.6" -source = { registry = "https://pypi.org/simple" } -sdist = { url = "https://files.pythonhosted.org/packages/d8/53/6f443c9a4a8358a93a6792e2acffb9d9d5cb0a5cfd8802644b7b1c9a02e4/colorama-0.4.6.tar.gz", hash = "sha256:08695f5cb7ed6e0531a20572697297273c47b8cae5a63ffc6d6ed5c201be6e44", size = 27697, upload-time = "2022-10-25T02:36:22.414Z" } -wheels = [ - { url = "https://files.pythonhosted.org/packages/d1/d6/3965ed04c63042e047cb6a3e6ed1a63a35087b6a609aa3a15ed8ac56c221/colorama-0.4.6-py2.py3-none-any.whl", hash = "sha256:4f1d9991f5acc0ca119f9d443620b77f9d6b33703e51011c16baf57afb285fc6", size = 25335, upload-time = "2022-10-25T02:36:20.889Z" }, -] - -[[package]] -name = "comm" -version = "0.2.3" -source = { registry = "https://pypi.org/simple" } -sdist = { url = "https://files.pythonhosted.org/packages/4c/13/7d740c5849255756bc17888787313b61fd38a0a8304fc4f073dfc46122aa/comm-0.2.3.tar.gz", hash = "sha256:2dc8048c10962d55d7ad693be1e7045d891b7ce8d999c97963a5e3e99c055971", size = 6319, upload-time = "2025-07-25T14:02:04.452Z" } -wheels = [ - { url = "https://files.pythonhosted.org/packages/60/97/891a0971e1e4a8c5d2b20bbe0e524dc04548d2307fee33cdeba148fd4fc7/comm-0.2.3-py3-none-any.whl", hash = "sha256:c615d91d75f7f04f095b30d1c1711babd43bdc6419c1be9886a85f2f4e489417", size = 7294, upload-time = "2025-07-25T14:02:02.896Z" }, -] - -[[package]] -name = "contourpy" -version = "1.3.2" -source = { registry = "https://pypi.org/simple" } -dependencies = [ - { name = "numpy" }, -] -sdist = { url = "https://files.pythonhosted.org/packages/66/54/eb9bfc647b19f2009dd5c7f5ec51c4e6ca831725f1aea7a993034f483147/contourpy-1.3.2.tar.gz", hash = "sha256:b6945942715a034c671b7fc54f9588126b0b8bf23db2696e3ca8328f3ff0ab54", size = 13466130, upload-time = "2025-04-15T17:47:53.79Z" } -wheels = [ - { url = "https://files.pythonhosted.org/packages/12/a3/da4153ec8fe25d263aa48c1a4cbde7f49b59af86f0b6f7862788c60da737/contourpy-1.3.2-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:ba38e3f9f330af820c4b27ceb4b9c7feee5fe0493ea53a8720f4792667465934", size = 268551, upload-time = "2025-04-15T17:34:46.581Z" }, - { url = "https://files.pythonhosted.org/packages/2f/6c/330de89ae1087eb622bfca0177d32a7ece50c3ef07b28002de4757d9d875/contourpy-1.3.2-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:dc41ba0714aa2968d1f8674ec97504a8f7e334f48eeacebcaa6256213acb0989", size = 253399, upload-time = "2025-04-15T17:34:51.427Z" }, - { url = "https://files.pythonhosted.org/packages/c1/bd/20c6726b1b7f81a8bee5271bed5c165f0a8e1f572578a9d27e2ccb763cb2/contourpy-1.3.2-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:9be002b31c558d1ddf1b9b415b162c603405414bacd6932d031c5b5a8b757f0d", size = 312061, upload-time = "2025-04-15T17:34:55.961Z" }, - { url = "https://files.pythonhosted.org/packages/22/fc/a9665c88f8a2473f823cf1ec601de9e5375050f1958cbb356cdf06ef1ab6/contourpy-1.3.2-cp310-cp310-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:8d2e74acbcba3bfdb6d9d8384cdc4f9260cae86ed9beee8bd5f54fee49a430b9", size = 351956, upload-time = "2025-04-15T17:35:00.992Z" }, - { url = "https://files.pythonhosted.org/packages/25/eb/9f0a0238f305ad8fb7ef42481020d6e20cf15e46be99a1fcf939546a177e/contourpy-1.3.2-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:e259bced5549ac64410162adc973c5e2fb77f04df4a439d00b478e57a0e65512", size = 320872, upload-time = "2025-04-15T17:35:06.177Z" }, - { url = "https://files.pythonhosted.org/packages/32/5c/1ee32d1c7956923202f00cf8d2a14a62ed7517bdc0ee1e55301227fc273c/contourpy-1.3.2-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:ad687a04bc802cbe8b9c399c07162a3c35e227e2daccf1668eb1f278cb698631", size = 325027, upload-time = "2025-04-15T17:35:11.244Z" }, - { url = "https://files.pythonhosted.org/packages/83/bf/9baed89785ba743ef329c2b07fd0611d12bfecbedbdd3eeecf929d8d3b52/contourpy-1.3.2-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:cdd22595308f53ef2f891040ab2b93d79192513ffccbd7fe19be7aa773a5e09f", size = 1306641, upload-time = "2025-04-15T17:35:26.701Z" }, - { url = "https://files.pythonhosted.org/packages/d4/cc/74e5e83d1e35de2d28bd97033426b450bc4fd96e092a1f7a63dc7369b55d/contourpy-1.3.2-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:b4f54d6a2defe9f257327b0f243612dd051cc43825587520b1bf74a31e2f6ef2", size = 1374075, upload-time = "2025-04-15T17:35:43.204Z" }, - { url = "https://files.pythonhosted.org/packages/0c/42/17f3b798fd5e033b46a16f8d9fcb39f1aba051307f5ebf441bad1ecf78f8/contourpy-1.3.2-cp310-cp310-win32.whl", hash = "sha256:f939a054192ddc596e031e50bb13b657ce318cf13d264f095ce9db7dc6ae81c0", size = 177534, upload-time = "2025-04-15T17:35:46.554Z" }, - { url = "https://files.pythonhosted.org/packages/54/ec/5162b8582f2c994721018d0c9ece9dc6ff769d298a8ac6b6a652c307e7df/contourpy-1.3.2-cp310-cp310-win_amd64.whl", hash = "sha256:c440093bbc8fc21c637c03bafcbef95ccd963bc6e0514ad887932c18ca2a759a", size = 221188, upload-time = "2025-04-15T17:35:50.064Z" }, - { url = "https://files.pythonhosted.org/packages/33/05/b26e3c6ecc05f349ee0013f0bb850a761016d89cec528a98193a48c34033/contourpy-1.3.2-pp310-pypy310_pp73-macosx_10_15_x86_64.whl", hash = "sha256:fd93cc7f3139b6dd7aab2f26a90dde0aa9fc264dbf70f6740d498a70b860b82c", size = 265681, upload-time = "2025-04-15T17:44:59.314Z" }, - { url = "https://files.pythonhosted.org/packages/2b/25/ac07d6ad12affa7d1ffed11b77417d0a6308170f44ff20fa1d5aa6333f03/contourpy-1.3.2-pp310-pypy310_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:107ba8a6a7eec58bb475329e6d3b95deba9440667c4d62b9b6063942b61d7f16", size = 315101, upload-time = "2025-04-15T17:45:04.165Z" }, - { url = "https://files.pythonhosted.org/packages/8f/4d/5bb3192bbe9d3f27e3061a6a8e7733c9120e203cb8515767d30973f71030/contourpy-1.3.2-pp310-pypy310_pp73-win_amd64.whl", hash = "sha256:ded1706ed0c1049224531b81128efbd5084598f18d8a2d9efae833edbd2b40ad", size = 220599, upload-time = "2025-04-15T17:45:08.456Z" }, -] - -[[package]] -name = "coverage" -version = "7.16.2" -source = { registry = "https://pypi.org/simple" } -sdist = { url = "https://files.pythonhosted.org/packages/2f/55/d1eaf3e73781174340a00dc1ba2aee8a65f82fadb18e2797b192b6b3925b/coverage-7.16.2.tar.gz", hash = "sha256:ca64d9f1f384f151b9511bec01126072acd2f313439f8ed015a22d8790aab6fa", size = 971999, upload-time = "2026-09-27T12:29:01.118Z" } -wheels = [ - { url = "https://files.pythonhosted.org/packages/60/72/db17bf5f87568ab524413693385be2eeb03e652ab56c54ea05fa85515675/coverage-7.16.2-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:23219888477edd736b6fcaec1272d47d93b926e999641ffea7e53a1738e70b2b", size = 223670, upload-time = "2026-09-27T12:25:34.675Z" }, - { url = "https://files.pythonhosted.org/packages/d1/e1/285727a8a74d48de256e8605413ee4cf82301228253ea58e5ab4270138b0/coverage-7.16.2-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:40c0f00899fe6181ae7f434ceb200e51f5ee4b8ed10e3b5f0b605f0cae15da87", size = 224191, upload-time = "2026-09-27T12:25:36.476Z" }, - { url = "https://files.pythonhosted.org/packages/50/c7/c737b73bac9bf5034f5ff45a4237b7a189d417a4e36751faf5d10c082cbe/coverage-7.16.2-cp310-cp310-manylinux1_i686.manylinux_2_28_i686.manylinux_2_5_i686.whl", hash = "sha256:a4624f80732f6b427ac58f1f59c577a0994a12e8174b5af6a027b4b58795d4c3", size = 250921, upload-time = "2026-09-27T12:25:37.857Z" }, - { url = "https://files.pythonhosted.org/packages/29/4e/e1d38d27817d91776ca543d01276a67eace3df675a673cac32b12c167d58/coverage-7.16.2-cp310-cp310-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl", hash = "sha256:191803c4996b499fcd78c2ad5e5f767dcc53cb4dc6de6d6a741b443a1821ef02", size = 252751, upload-time = "2026-09-27T12:25:39.291Z" }, - { url = "https://files.pythonhosted.org/packages/0e/19/14a8e44cbb2ad36ae62aaa03c5eec4a06a7f7df220ea3776af26927acbe2/coverage-7.16.2-cp310-cp310-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:9fd670ac43b709c575aefc25bf52d8a598a3bc5017bddfd0a179152ab06a2deb", size = 254616, upload-time = "2026-09-27T12:25:40.506Z" }, - { url = "https://files.pythonhosted.org/packages/f9/72/f5bcad0d9a9b450080032344fbff7ec60c1b0e3d38019f7735dee2b69645/coverage-7.16.2-cp310-cp310-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:705e5af11d34647efdc170c7840b6857c81cf74be96419a553f237e68e62cb72", size = 256541, upload-time = "2026-09-27T12:25:41.785Z" }, - { url = "https://files.pythonhosted.org/packages/ae/9a/8c735234e8abb52bf5d063f98c780fa942e77c4c0225f9fcb9b33effc346/coverage-7.16.2-cp310-cp310-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:8afd9bf35cc6a1f22eb3634808fa8e0b91902459c5721ef2e4461dfe771d7f08", size = 251589, upload-time = "2026-09-27T12:25:43.269Z" }, - { url = "https://files.pythonhosted.org/packages/35/6a/1bf6d32e55642d6972aa842640e0a8850e612d19ac7d05e2c32fa59dfd34/coverage-7.16.2-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:3f43bac1856ba269b905302778d4df433d6006489a192174ad77ac528e395032", size = 252660, upload-time = "2026-09-27T12:25:45.051Z" }, - { url = "https://files.pythonhosted.org/packages/53/5b/05b1c0d0e9495cb056155a16066259adc1e935e7411a82a62779bf729975/coverage-7.16.2-cp310-cp310-musllinux_1_2_i686.whl", hash = "sha256:f8475460aa33ee28ac896ab1156d0bb3b6c639f7f8383c2677d3359eb35f8205", size = 250660, upload-time = "2026-09-27T12:25:46.51Z" }, - { url = "https://files.pythonhosted.org/packages/05/33/5bc3db57fc9c56b4ef055725c38c34faa818a27d17d65e251371f7f0e3a0/coverage-7.16.2-cp310-cp310-musllinux_1_2_ppc64le.whl", hash = "sha256:d6276d78f6fca7d0ac066d5da4165c5acd07829e8305c2cb900b738fb3a75a72", size = 254479, upload-time = "2026-09-27T12:25:47.819Z" }, - { url = "https://files.pythonhosted.org/packages/f6/0f/4a5de66daef26eb919213f63b84f45d5065ab2df94cd767fc7c1174ac5e2/coverage-7.16.2-cp310-cp310-musllinux_1_2_riscv64.whl", hash = "sha256:736fde09ea39646d11f8e3b76bd3425c075aa4dd45f24891970bb77c14ff20f5", size = 250940, upload-time = "2026-09-27T12:25:49.227Z" }, - { url = "https://files.pythonhosted.org/packages/57/d3/84cd6a11e707e422194739e9734d947746efa5e5b3358ff2d601f823ee45/coverage-7.16.2-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:c85d54e7e8a2ca932fe8399301af9b8d5907ea2a455ffaff6e7d1208db83b943", size = 251543, upload-time = "2026-09-27T12:25:50.554Z" }, - { url = "https://files.pythonhosted.org/packages/ab/bc/3d84c2e2a95f38e346ce3730d9f0e53114f4e8aace72e6e51e014afb9992/coverage-7.16.2-cp310-cp310-win32.whl", hash = "sha256:5139009b5efd2194fc168ee9362f0e191ba612ef5d29242f9269c22f9b8f80c7", size = 225732, upload-time = "2026-09-27T12:25:51.945Z" }, - { url = "https://files.pythonhosted.org/packages/07/86/31f1f3170571a345ab9d8361a7b2f8e0c5698173fbecd1f7149b6e2089ee/coverage-7.16.2-cp310-cp310-win_amd64.whl", hash = "sha256:c3305c38a2fa21a4254f2ace7dd9ef5fc569c9a558b66e7017650b3d637fb95e", size = 226357, upload-time = "2026-09-27T12:25:53.272Z" }, - { url = "https://files.pythonhosted.org/packages/3f/0c/7a64e1ac90541a8edf50daef0914848011fb057a5bf55284a4811e21939a/coverage-7.16.2-py3-none-any.whl", hash = "sha256:11d28e9123a9156cb405d8d27b44256c9a58fb5decc2073a8f17862057e3aa0f", size = 215754, upload-time = "2026-09-27T12:28:59.075Z" }, -] - -[package.optional-dependencies] -toml = [ - { name = "tomli" }, -] - -[[package]] -name = "cycler" -version = "0.12.1" -source = { registry = "https://pypi.org/simple" } -sdist = { url = "https://files.pythonhosted.org/packages/a9/95/a3dbbb5028f35eafb79008e7522a75244477d2838f38cbb722248dabc2a8/cycler-0.12.1.tar.gz", hash = "sha256:88bb128f02ba341da8ef447245a9e138fae777f6a23943da4540077d3601eb1c", size = 7615, upload-time = "2023-10-07T05:32:18.335Z" } -wheels = [ - { url = "https://files.pythonhosted.org/packages/e7/05/c19819d5e3d95294a6f5947fb9b9629efb316b96de511b418c53d245aae6/cycler-0.12.1-py3-none-any.whl", hash = "sha256:85cef7cff222d8644161529808465972e51340599459b8ac3ccbac5a854e0d30", size = 8321, upload-time = "2023-10-07T05:32:16.783Z" }, -] - -[[package]] -name = "debugpy" -version = "1.8.22" -source = { registry = "https://pypi.org/simple" } -sdist = { url = "https://files.pythonhosted.org/packages/44/9d/3cb6693342acf96802dba89934a5b8da43c201d764ebd1f2c0514a3d42bd/debugpy-1.8.22.tar.gz", hash = "sha256:e489c7268e1c7b41e13b438d9c533d2a7af73fb59bf8cd30fead8286c1c39c4e", size = 1710877, upload-time = "2026-09-15T21:44:02.578Z" } -wheels = [ - { url = "https://files.pythonhosted.org/packages/1a/e9/ced401ba1088e1d2b3228dbbcae33e15aa8c08a1368433bedebfa8efcb02/debugpy-1.8.22-cp310-cp310-macosx_15_0_x86_64.whl", hash = "sha256:fa47099176d1d612bef69e9f74658a5687a9f05bd80fb5710f99959bace85735", size = 2128369, upload-time = "2026-09-15T21:44:04.775Z" }, - { url = "https://files.pythonhosted.org/packages/4f/97/5c8e839a7f73e92cd4a733408bb85bb764e829e52a9fb097f99d6e2cbbc0/debugpy-1.8.22-cp310-cp310-manylinux_2_34_x86_64.whl", hash = "sha256:7bf29e0d8ce80b100d37fb333e1b193b790d962739f3067796c2b03ffdc9afee", size = 3022081, upload-time = "2026-09-15T21:44:06.382Z" }, - { url = "https://files.pythonhosted.org/packages/11/ed/fbb045d18a8b733a798bb834a03a20cd64f1446206d844b674bb638da6c3/debugpy-1.8.22-cp310-cp310-win32.whl", hash = "sha256:56b877b37ed73f0bf53ba7afc394816ff1eb5d701bae24a24ed9e1ea6f7ce34f", size = 5325298, upload-time = "2026-09-15T21:44:08.267Z" }, - { url = "https://files.pythonhosted.org/packages/82/7f/633160132b80b424c6816391f239682435c6b77cdd58288d04b3443b9f80/debugpy-1.8.22-cp310-cp310-win_amd64.whl", hash = "sha256:1bd0c6df3c68c0a3f71db8baa3780a953abb65537ec4b3bc6b935ad5b3b3d45c", size = 5353598, upload-time = "2026-09-15T21:44:10.125Z" }, - { url = "https://files.pythonhosted.org/packages/56/3d/c7dc9f35bc9e22cdb53679f844bee40fd5cff871862f60595869a433400d/debugpy-1.8.22-py2.py3-none-any.whl", hash = "sha256:a9e9d3550e15ca479c59333e90845029190531f0cacfedab3b815a57bd913947", size = 5374857, upload-time = "2026-09-15T21:44:54.454Z" }, -] - -[[package]] -name = "decorator" -version = "5.3.1" -source = { registry = "https://pypi.org/simple" } -sdist = { url = "https://files.pythonhosted.org/packages/60/8b/32f9823da46cde7df2087faa08cd98d01b908f8dcab982cdba9c84e85355/decorator-5.3.1.tar.gz", hash = "sha256:4cbcdd55a6efadb9dbea26b858f4fb3264567b52d69ca0d25b721b553f60ea82", size = 58084, upload-time = "2026-05-18T06:03:28.057Z" } -wheels = [ - { url = "https://files.pythonhosted.org/packages/05/7f/798705f5296a58ca505d600456748d1be48078eac8a7050d8a98bc9edb89/decorator-5.3.1-py3-none-any.whl", hash = "sha256:f47fe6fdbd2edd623ecfe36875d37aba411624e2670dd395dddae1358689bb3c", size = 10365, upload-time = "2026-05-18T06:03:26.517Z" }, -] - -[[package]] -name = "dill" -version = "0.4.1" -source = { registry = "https://pypi.org/simple" } -sdist = { url = "https://files.pythonhosted.org/packages/81/e1/56027a71e31b02ddc53c7d65b01e68edf64dea2932122fe7746a516f75d5/dill-0.4.1.tar.gz", hash = "sha256:423092df4182177d4d8ba8290c8a5b640c66ab35ec7da59ccfa00f6fa3eea5fa", size = 187315, upload-time = "2026-01-19T02:36:56.85Z" } -wheels = [ - { url = "https://files.pythonhosted.org/packages/1e/77/dc8c558f7593132cf8fefec57c4f60c83b16941c574ac5f619abb3ae7933/dill-0.4.1-py3-none-any.whl", hash = "sha256:1e1ce33e978ae97fcfcff5638477032b801c46c7c65cf717f95fbc2248f79a9d", size = 120019, upload-time = "2026-01-19T02:36:55.663Z" }, -] - -[[package]] -name = "docutils" -version = "0.21.2" -source = { registry = "https://pypi.org/simple" } -sdist = { url = "https://files.pythonhosted.org/packages/ae/ed/aefcc8cd0ba62a0560c3c18c33925362d46c6075480bfa4df87b28e169a9/docutils-0.21.2.tar.gz", hash = "sha256:3a6b18732edf182daa3cd12775bbb338cf5691468f91eeeb109deff6ebfa986f", size = 2204444, upload-time = "2024-04-23T18:57:18.24Z" } -wheels = [ - { url = "https://files.pythonhosted.org/packages/8f/d7/9322c609343d929e75e7e5e6255e614fcc67572cfd083959cdef3b7aad79/docutils-0.21.2-py3-none-any.whl", hash = "sha256:dafca5b9e384f0e419294eb4d2ff9fa826435bf15f15b7bd45723e8ad76811b2", size = 587408, upload-time = "2024-04-23T18:57:14.835Z" }, -] - -[[package]] -name = "exceptiongroup" -version = "1.3.1" -source = { registry = "https://pypi.org/simple" } -dependencies = [ - { name = "typing-extensions" }, -] -sdist = { url = "https://files.pythonhosted.org/packages/50/79/66800aadf48771f6b62f7eb014e352e5d06856655206165d775e675a02c9/exceptiongroup-1.3.1.tar.gz", hash = "sha256:8b412432c6055b0b7d14c310000ae93352ed6754f70fa8f7c34141f91c4e3219", size = 30371, upload-time = "2025-11-21T23:01:54.787Z" } -wheels = [ - { url = "https://files.pythonhosted.org/packages/8a/0e/97c33bf5009bdbac74fd2beace167cab3f978feb69cc36f1ef79360d6c4e/exceptiongroup-1.3.1-py3-none-any.whl", hash = "sha256:a7a39a3bd276781e98394987d3a5701d0c4edffb633bb7a5144577f82c773598", size = 16740, upload-time = "2025-11-21T23:01:53.443Z" }, -] - -[[package]] -name = "execnet" -version = "2.1.2" -source = { registry = "https://pypi.org/simple" } -sdist = { url = "https://files.pythonhosted.org/packages/bf/89/780e11f9588d9e7128a3f87788354c7946a9cbb1401ad38a48c4db9a4f07/execnet-2.1.2.tar.gz", hash = "sha256:63d83bfdd9a23e35b9c6a3261412324f964c2ec8dcd8d3c6916ee9373e0befcd", size = 166622, upload-time = "2025-11-12T09:56:37.75Z" } -wheels = [ - { url = "https://files.pythonhosted.org/packages/ab/84/02fc1827e8cdded4aa65baef11296a9bbe595c474f0d6d758af082d849fd/execnet-2.1.2-py3-none-any.whl", hash = "sha256:67fba928dd5a544b783f6056f449e5e3931a5c378b128bc18501f7ea79e296ec", size = 40708, upload-time = "2025-11-12T09:56:36.333Z" }, -] - -[[package]] -name = "executing" -version = "2.3.0" -source = { registry = "https://pypi.org/simple" } -sdist = { url = "https://files.pythonhosted.org/packages/52/92/8a611141e42930c0f194f7504063ab87dfe970cf1a5af28e7703df448734/executing-2.3.0.tar.gz", hash = "sha256:15919cb5d667e5cb4e099511971d00d659573fff2dd5c4e6cd8b71636c7858d2", size = 1338003, upload-time = "2026-10-10T14:06:04.64Z" } -wheels = [ - { url = "https://files.pythonhosted.org/packages/4d/dd/8bc67e7d5ffc1d88aa5af511189dfb76dc4e1e5b808fab186146ef2663e5/executing-2.3.0-py3-none-any.whl", hash = "sha256:736e859c9f8701f11fcf516856f26f562e04776387824b43a35a1dfe21c84122", size = 29393, upload-time = "2026-10-10T14:06:02.777Z" }, -] - -[[package]] -name = "flask" -version = "3.1.3" -source = { registry = "https://pypi.org/simple" } -dependencies = [ - { name = "blinker" }, - { name = "click" }, - { name = "itsdangerous" }, - { name = "jinja2" }, - { name = "markupsafe" }, - { name = "werkzeug" }, -] -sdist = { url = "https://files.pythonhosted.org/packages/26/00/35d85dcce6c57fdc871f3867d465d780f302a175ea360f62533f12b27e2b/flask-3.1.3.tar.gz", hash = "sha256:0ef0e52b8a9cd932855379197dd8f94047b359ca0a78695144304cb45f87c9eb", size = 759004, upload-time = "2026-02-19T05:00:57.678Z" } -wheels = [ - { url = "https://files.pythonhosted.org/packages/7f/9c/34f6962f9b9e9c71f6e5ed806e0d0ff03c9d1b0b2340088a0cf4bce09b18/flask-3.1.3-py3-none-any.whl", hash = "sha256:f4bcbefc124291925f1a26446da31a5178f9483862233b23c0c96a20701f670c", size = 103424, upload-time = "2026-02-19T05:00:56.027Z" }, -] - -[[package]] -name = "fonttools" -version = "4.65.0" -source = { registry = "https://pypi.org/simple" } -sdist = { url = "https://files.pythonhosted.org/packages/77/51/d63c7e52163ac14393a35bd14bd7c0da95f8f74be5d7cc988092f9965129/fonttools-4.65.0.tar.gz", hash = "sha256:762ba5431358d0dbd4a01982484a1d494fb267e91f974cdcf20b80eab8560f6f", size = 3674467, upload-time = "2026-09-10T15:35:54.955Z" } -wheels = [ - { url = "https://files.pythonhosted.org/packages/53/d9/1caaa015dd207da7ccd3feba87289997bd88334ea3e74a367cdc7b0e50a3/fonttools-4.65.0-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:93a73af2075036d36d7fbf856779c56a1b3b86ffcdae6abede7596604c42c156", size = 3095449, upload-time = "2026-09-10T15:33:04.814Z" }, - { url = "https://files.pythonhosted.org/packages/20/d6/988cd9b33ae2d92b15a51d73eb77c991f7a0fe90a7bc74526e9669247789/fonttools-4.65.0-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:c130be2232e3caf8d2b476854ea78421ec1642917ff5ab695284bac31bbb072b", size = 2587697, upload-time = "2026-09-10T15:33:07.653Z" }, - { url = "https://files.pythonhosted.org/packages/f8/6a/36f465a1c277131f9569f6a56fe99cf135391b4860b9c4f4b23e5b1cd5df/fonttools-4.65.0-cp310-cp310-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:e3944e0bdba42effb71959e43d91b599326b02b59c78310d5675e8a75525e7d8", size = 5313308, upload-time = "2026-09-10T15:33:09.975Z" }, - { url = "https://files.pythonhosted.org/packages/ee/56/151b5e81d20c63834f48ad37a0cbbbe2f9b248e38f8d10387f0cf5219244/fonttools-4.65.0-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:fb53892b570f7f1f0055e75fc4de32673e32f749c4c8a606b63d5c436650e634", size = 5253649, upload-time = "2026-09-10T15:33:12.225Z" }, - { url = "https://files.pythonhosted.org/packages/c8/22/6389215da9d4f98623aacdca9479c1030bbd516cb658e893bc54b61098ce/fonttools-4.65.0-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:a6c8d184e523580a7c55d21cde37176a3c91cb539cf06c2aa36ffc634fd75296", size = 5277745, upload-time = "2026-09-10T15:33:14.783Z" }, - { url = "https://files.pythonhosted.org/packages/89/e3/c1037a1dfb7c8efe6f2a7d1951ebdde40cbbf82e9c5d796fcb03077e4790/fonttools-4.65.0-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:e5ceccaf2e57d83b753a2b5db5d94aa0a8071886d4afebd2d520c9683e6bef0e", size = 5413259, upload-time = "2026-09-10T15:33:17.619Z" }, - { url = "https://files.pythonhosted.org/packages/44/b9/7dd72330168d39635c329f23a98279393b1e825e42a6db362e09897aad7b/fonttools-4.65.0-cp310-cp310-win32.whl", hash = "sha256:aff640a4fcb021fa83f9879d5bfa115b6931522dae991a24faa75888bd6aeff6", size = 1577124, upload-time = "2026-09-10T15:33:19.864Z" }, - { url = "https://files.pythonhosted.org/packages/aa/c2/e959385b4626989b25b82b9f4f99e7c3ac68377d6846b376239b6f126966/fonttools-4.65.0-cp310-cp310-win_amd64.whl", hash = "sha256:5c1700a60e4ff23a0425d5a64abf43d092e6b55071354825781faf255904dcb4", size = 1633354, upload-time = "2026-09-10T15:33:21.963Z" }, - { url = "https://files.pythonhosted.org/packages/e6/35/f894ceb867118c0261d0f69a9bd516b045a3754238f76c88a49513ac7a83/fonttools-4.65.0-py3-none-any.whl", hash = "sha256:3060b8c1fc2329fa20265b7c138614143ea7c1624e26c5c180c76aeb74deae6f", size = 1196441, upload-time = "2026-09-10T15:35:52.347Z" }, -] - -[[package]] -name = "furo" -version = "2025.12.19" -source = { registry = "https://pypi.org/simple" } -dependencies = [ - { name = "accessible-pygments" }, - { name = "beautifulsoup4" }, - { name = "pygments" }, - { name = "sphinx" }, - { name = "sphinx-basic-ng" }, -] -sdist = { url = "https://files.pythonhosted.org/packages/ec/20/5f5ad4da6a5a27c80f2ed2ee9aee3f9e36c66e56e21c00fde467b2f8f88f/furo-2025.12.19.tar.gz", hash = "sha256:188d1f942037d8b37cd3985b955839fea62baa1730087dc29d157677c857e2a7", size = 1661473, upload-time = "2025-12-19T17:34:40.889Z" } -wheels = [ - { url = "https://files.pythonhosted.org/packages/f4/b2/50e9b292b5cac13e9e81272c7171301abc753a60460d21505b606e15cf21/furo-2025.12.19-py3-none-any.whl", hash = "sha256:bb0ead5309f9500130665a26bee87693c41ce4dbdff864dbfb6b0dae4673d24f", size = 339262, upload-time = "2025-12-19T17:34:38.905Z" }, -] - -[[package]] -name = "idna" -version = "3.20" -source = { registry = "https://pypi.org/simple" } -sdist = { url = "https://files.pythonhosted.org/packages/f5/08/8eea9d4b8302028f3abb2c0813953f7aec26d33b7a8960ed760e65ff29fa/idna-3.20.tar.gz", hash = "sha256:a7db850025b95ded1eae8a46181a1a6c56c92c96f0e2b005d9ff8dc0210cab44", size = 216463, upload-time = "2026-09-17T14:11:04.752Z" } -wheels = [ - { url = "https://files.pythonhosted.org/packages/58/a2/bb081bab032533a855d44de1d56f8e8426114ff1ba5d1f07a438a0a654f8/idna-3.20-py3-none-any.whl", hash = "sha256:ab7ae7122974553370f0bdb919e1a960b2cd1bc1ef0276416d896db81c14582c", size = 69583, upload-time = "2026-09-17T14:11:03.168Z" }, -] - -[[package]] -name = "imagesize" -version = "2.0.1" -source = { registry = "https://pypi.org/simple" } -sdist = { url = "https://files.pythonhosted.org/packages/fb/5e/513ff06670c84e7b9887c1fdf61b2d42b4f574a831f2f1d2222023049d8a/imagesize-2.0.1.tar.gz", hash = "sha256:b2ba6a4dea487a7ebcd53248d3476aca449d30db12a2dde5e0c5ca9624fd77e5", size = 1883774, upload-time = "2026-08-24T12:35:19.13Z" } -wheels = [ - { url = "https://files.pythonhosted.org/packages/01/f9/575c8d760eae1fc99651b7cc5efd96ad5379ca4d6b53750b0fb4fe983f34/imagesize-2.0.1-py3-none-any.whl", hash = "sha256:ea0c9a0384df69ed86a943a15cde37d0360b82491b3910dc2215e202e62b5b02", size = 14794, upload-time = "2026-08-24T12:35:12.548Z" }, -] - -[[package]] -name = "iniconfig" -version = "2.3.1" -source = { registry = "https://pypi.org/simple" } -sdist = { url = "https://files.pythonhosted.org/packages/01/e1/2069291243c926a2ff1cd706c7f3eeb9b62144bf60f77c9fb9ff2fb26bd3/iniconfig-2.3.1.tar.gz", hash = "sha256:67f4b9c50da0dedf52af349e7749a80a9057a5031199791b906c3bb3ae878960", size = 21209, upload-time = "2026-10-06T22:48:38.076Z" } -wheels = [ - { url = "https://files.pythonhosted.org/packages/56/43/4ca9e49d27a1fcf6bece6f6aec0ea46bb9112489b93d4b688fb415457bdb/iniconfig-2.3.1-py3-none-any.whl", hash = "sha256:9121e2c1fdb355232495be3194c8dfe87ccc2d5dee45947b78e68f499790d7a7", size = 7552, upload-time = "2026-10-06T22:48:36.959Z" }, -] - -[[package]] -name = "interrogate" -version = "1.7.0" -source = { registry = "https://pypi.org/simple" } -dependencies = [ - { name = "attrs" }, - { name = "click" }, - { name = "colorama" }, - { name = "py" }, - { name = "tabulate" }, - { name = "tomli" }, -] -sdist = { url = "https://files.pythonhosted.org/packages/8b/22/74f7fcc96280eea46cf2bcbfa1354ac31de0e60a4be6f7966f12cef20893/interrogate-1.7.0.tar.gz", hash = "sha256:a320d6ec644dfd887cc58247a345054fc4d9f981100c45184470068f4b3719b0", size = 159636, upload-time = "2024-04-07T22:30:46.217Z" } -wheels = [ - { url = "https://files.pythonhosted.org/packages/12/c9/6869a1dcf4aaf309b9543ec070be3ec3adebee7c9bec9af8c230494134b9/interrogate-1.7.0-py3-none-any.whl", hash = "sha256:b13ff4dd8403369670e2efe684066de9fcb868ad9d7f2b4095d8112142dc9d12", size = 46982, upload-time = "2024-04-07T22:30:44.277Z" }, -] - -[[package]] -name = "ipykernel" -version = "7.3.0" -source = { registry = "https://pypi.org/simple" } -dependencies = [ - { name = "appnope", marker = "sys_platform == 'darwin'" }, - { name = "comm" }, - { name = "debugpy" }, - { name = "ipython" }, - { name = "jupyter-client" }, - { name = "jupyter-core" }, - { name = "matplotlib-inline" }, - { name = "nest-asyncio2" }, - { name = "packaging" }, - { name = "psutil" }, - { name = "pyzmq" }, - { name = "tornado" }, - { name = "traitlets" }, -] -sdist = { url = "https://files.pythonhosted.org/packages/3d/c4/e4a38f579de4225a561305666f7541cdabb30075def2aa1ac17bd73c1fb5/ipykernel-7.3.0.tar.gz", hash = "sha256:9acaaaf97d16355166e4085afe9d225bfbdf2b7ef520f9df3be8f2b248275e09", size = 184899, upload-time = "2026-06-10T08:41:25.481Z" } -wheels = [ - { url = "https://files.pythonhosted.org/packages/3d/02/77b271f5dc58bfbc0b577c877b2365d1ffea2afe66a80c13f2312820348c/ipykernel-7.3.0-py3-none-any.whl", hash = "sha256:897eb64da762549ef610698fca5e9675195ec6ac8ec7f19d81ce1ca20c876057", size = 120583, upload-time = "2026-06-10T08:41:23.648Z" }, -] - -[[package]] -name = "ipython" -version = "8.39.0" -source = { registry = "https://pypi.org/simple" } -dependencies = [ - { name = "colorama", marker = "sys_platform == 'win32'" }, - { name = "decorator" }, - { name = "exceptiongroup" }, - { name = "jedi" }, - { name = "matplotlib-inline" }, - { name = "pexpect", marker = "sys_platform != 'emscripten' and sys_platform != 'win32'" }, - { name = "prompt-toolkit" }, - { name = "pygments" }, - { name = "stack-data" }, - { name = "traitlets" }, - { name = "typing-extensions" }, -] -sdist = { url = "https://files.pythonhosted.org/packages/40/18/f8598d287006885e7136451fdea0755af4ebcbfe342836f24deefaed1164/ipython-8.39.0.tar.gz", hash = "sha256:4110ae96012c379b8b6db898a07e186c40a2a1ef5d57a7fa83166047d9da7624", size = 5513971, upload-time = "2026-03-27T10:02:13.94Z" } -wheels = [ - { url = "https://files.pythonhosted.org/packages/c0/56/4cc7fc9e9e3f38fd324f24f8afe0ad8bb5fa41283f37f1aaf9de0612c968/ipython-8.39.0-py3-none-any.whl", hash = "sha256:bb3c51c4fa8148ab1dea07a79584d1c854e234ea44aa1283bcb37bc75054651f", size = 831849, upload-time = "2026-03-27T10:02:07.846Z" }, -] - -[[package]] -name = "isort" -version = "9.0.2" -source = { registry = "https://pypi.org/simple" } -dependencies = [ - { name = "mypy-extensions" }, -] -sdist = { url = "https://files.pythonhosted.org/packages/da/cf/068066b8fdab91cd40bcd63e483137908710a3d25a4d3a01b538be45d9d6/isort-9.0.2.tar.gz", hash = "sha256:d2298980ce44350f11d9d24c8150eaef1883431ec203dddbb4e9b5c3ceb54c70", size = 685196, upload-time = "2026-09-28T19:21:58.07Z" } -wheels = [ - { url = "https://files.pythonhosted.org/packages/58/16/02099475d03310b0a209ca4928bb0779fb273b97c8924a94a32c38cc1eeb/isort-9.0.2-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:b3e81cae981a52f94d5b31a474e1cbb033ea9cc850bc4c922117c0534a1864dd", size = 1070114, upload-time = "2026-09-28T19:20:58.339Z" }, - { url = "https://files.pythonhosted.org/packages/f1/36/60423264e176965fc0002bbb0a0a8b4ac21d4ee32dfef9a490767d5a7eb4/isort-9.0.2-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:3cd67d39c3501d7227e8b229476da1d8679c03e0af97bd295876cf7070e5b709", size = 1625659, upload-time = "2026-09-28T19:21:00.076Z" }, - { url = "https://files.pythonhosted.org/packages/20/75/b008785e61ccd53f6964501ef26a65c17ccc1c5ed9676dec6ebd2662cdb1/isort-9.0.2-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:288a320e6d52ba2d3447345390c8a8400591e4033ffbe4ce6bc3e50e5b4818e1", size = 1611889, upload-time = "2026-09-28T19:21:01.732Z" }, - { url = "https://files.pythonhosted.org/packages/db/a1/da35cd0cf273d560c844f94e92f2b266e23b416edc8dd6b6db0934543863/isort-9.0.2-cp310-cp310-win_amd64.whl", hash = "sha256:67b12d9504e5bc6359bb3bb4493f36cf1093d15477c61c349f52f7d04209fb5d", size = 872900, upload-time = "2026-09-28T19:21:03.597Z" }, - { url = "https://files.pythonhosted.org/packages/8b/c9/0849e74b868ef10312eecfc24278710e97dd14bc49c1df629d7df142d318/isort-9.0.2-py3-none-any.whl", hash = "sha256:6c29deeb39698a8717823b7f75b2ac58c5e8ab8dcf6cf31205a72a6617fb454e", size = 105052, upload-time = "2026-09-28T19:21:56.512Z" }, -] - -[[package]] -name = "itsdangerous" -version = "2.2.0" -source = { registry = "https://pypi.org/simple" } -sdist = { url = "https://files.pythonhosted.org/packages/9c/cb/8ac0172223afbccb63986cc25049b154ecfb5e85932587206f42317be31d/itsdangerous-2.2.0.tar.gz", hash = "sha256:e0050c0b7da1eea53ffaf149c0cfbb5c6e2e2b69c4bef22c81fa6eb73e5f6173", size = 54410, upload-time = "2024-04-16T21:28:15.614Z" } -wheels = [ - { url = "https://files.pythonhosted.org/packages/04/96/92447566d16df59b2a776c0fb82dbc4d9e07cd95062562af01e408583fc4/itsdangerous-2.2.0-py3-none-any.whl", hash = "sha256:c6242fc49e35958c8b15141343aa660db5fc54d4f13a1db01a3f5891b98700ef", size = 16234, upload-time = "2024-04-16T21:28:14.499Z" }, -] - -[[package]] -name = "jedi" -version = "0.20.0" -source = { registry = "https://pypi.org/simple" } -dependencies = [ - { name = "parso" }, -] -sdist = { url = "https://files.pythonhosted.org/packages/46/b7/a3635f6a2d7cf5b5dd98064fc1d5fbbafcb25477bcea204a3a92145d158b/jedi-0.20.0.tar.gz", hash = "sha256:c3f4ccbd276696f4b19c54618d4fb18f9fc24b0aef02acf704b23f487daa1011", size = 3119416, upload-time = "2026-05-01T23:38:47.814Z" } -wheels = [ - { url = "https://files.pythonhosted.org/packages/9a/93/242e2eab5fe682ffcb8b0084bde703a41d51e17ee0f3a31ff0d9d813620a/jedi-0.20.0-py2.py3-none-any.whl", hash = "sha256:7bdd9c2634f56713299976f4cbd59cb3fa92165cc5e05ea811fb253480728b67", size = 4884812, upload-time = "2026-05-01T23:38:43.919Z" }, -] - -[[package]] -name = "jinja2" -version = "3.1.6" -source = { registry = "https://pypi.org/simple" } -dependencies = [ - { name = "markupsafe" }, -] -sdist = { url = "https://files.pythonhosted.org/packages/df/bf/f7da0350254c0ed7c72f3e33cef02e048281fec7ecec5f032d4aac52226b/jinja2-3.1.6.tar.gz", hash = "sha256:0137fb05990d35f1275a587e9aee6d56da821fc83491a0fb838183be43f66d6d", size = 245115, upload-time = "2025-03-05T20:05:02.478Z" } -wheels = [ - { url = "https://files.pythonhosted.org/packages/62/a1/3d680cbfd5f4b8f15abc1d571870c5fc3e594bb582bc3b64ea099db13e56/jinja2-3.1.6-py3-none-any.whl", hash = "sha256:85ece4451f492d0c13c5dd7c13a64681a86afae63a5f347908daf103ce6d2f67", size = 134899, upload-time = "2025-03-05T20:05:00.369Z" }, -] - -[[package]] -name = "jupyter-client" -version = "8.10.0" -source = { registry = "https://pypi.org/simple" } -dependencies = [ - { name = "jupyter-core" }, - { name = "python-dateutil" }, - { name = "pyzmq" }, - { name = "tornado" }, - { name = "traitlets" }, - { name = "typing-extensions" }, -] -sdist = { url = "https://files.pythonhosted.org/packages/c5/2a/906772148a06e48885039e0250c340b770a55bbf37b08d6ee0449df369c3/jupyter_client-8.10.0.tar.gz", hash = "sha256:9f7116294dca55f1785be880057d44544db9b1567718d92cb33c58886afb9497", size = 360653, upload-time = "2026-08-28T12:17:10.854Z" } -wheels = [ - { url = "https://files.pythonhosted.org/packages/0f/88/7c548de1f6c2ade7c931a3282da73f9274fa6a1531091be682f89c85efb9/jupyter_client-8.10.0-py3-none-any.whl", hash = "sha256:5f73f24f22fa25192cfff6b23c051932a2473a797b05734aff495b392103e14e", size = 110184, upload-time = "2026-08-28T12:17:09.028Z" }, -] - -[[package]] -name = "jupyter-core" -version = "5.9.1" -source = { registry = "https://pypi.org/simple" } -dependencies = [ - { name = "platformdirs" }, - { name = "traitlets" }, -] -sdist = { url = "https://files.pythonhosted.org/packages/02/49/9d1284d0dc65e2c757b74c6687b6d319b02f822ad039e5c512df9194d9dd/jupyter_core-5.9.1.tar.gz", hash = "sha256:4d09aaff303b9566c3ce657f580bd089ff5c91f5f89cf7d8846c3cdf465b5508", size = 89814, upload-time = "2025-10-16T19:19:18.444Z" } -wheels = [ - { url = "https://files.pythonhosted.org/packages/e7/e7/80988e32bf6f73919a113473a604f5a8f09094de312b9d52b79c2df7612b/jupyter_core-5.9.1-py3-none-any.whl", hash = "sha256:ebf87fdc6073d142e114c72c9e29a9d7ca03fad818c5d300ce2adc1fb0743407", size = 29032, upload-time = "2025-10-16T19:19:16.783Z" }, -] - -[[package]] -name = "kiwisolver" -version = "1.5.1" -source = { registry = "https://pypi.org/simple" } -sdist = { url = "https://files.pythonhosted.org/packages/ba/07/bd78e6a8fae171ea041ef5bba3ed21a003522fa088834b069b1909981f30/kiwisolver-1.5.1.tar.gz", hash = "sha256:f1303ef2eec81262a4b708c3e858afe58d7c75ad91c1c05266eda7673369859a", size = 104395, upload-time = "2026-08-28T10:28:27.153Z" } -wheels = [ - { url = "https://files.pythonhosted.org/packages/23/54/1b8d2bc580414cc75b3a5b3d195981a6facacd8a8d986e589d0a3b51a709/kiwisolver-1.5.1-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:1acc7e5b7ef05e9da8bb70cd6c7c4513090213d2e1ad9720f599f0bf6c52aec5", size = 123362, upload-time = "2026-08-28T10:24:43.402Z" }, - { url = "https://files.pythonhosted.org/packages/57/19/92c30f540dcfff86ff625389427c39b53a9aaea16420ddcc09b2ab8d1073/kiwisolver-1.5.1-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:bad20d4c69c851c982a1e3606f4c293edfd5a87885786c50082412240c4b1ffd", size = 66551, upload-time = "2026-08-28T10:24:44.768Z" }, - { url = "https://files.pythonhosted.org/packages/30/ae/30b94088722e7bce8b821cd5ee935a87f80023e7243125f1accf98e39bf7/kiwisolver-1.5.1-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:0a4faea5c6db201c6a21391d2ac926ea97acf7dacdbc3c417189e1adb1a00837", size = 64076, upload-time = "2026-08-28T10:24:46.184Z" }, - { url = "https://files.pythonhosted.org/packages/f1/0e/9f394d693be549fa3fab62498c2778294595991047adc3dcf10aa99b91c0/kiwisolver-1.5.1-cp310-cp310-manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:e05c2f7925f1d88778e53cb44f14e0223204a3bdd09a41664750363acfb1f2ef", size = 1628782, upload-time = "2026-08-28T10:24:47.91Z" }, - { url = "https://files.pythonhosted.org/packages/64/96/26efc04348c0f332b6e6c471dff132bb8b18b2df494a1b65826601674e62/kiwisolver-1.5.1-cp310-cp310-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:c3a4e41e3096bf1f0f1b76e2ffd6d828d6547f574f702d59bdbef7acfa59db9c", size = 1228112, upload-time = "2026-08-28T10:24:49.503Z" }, - { url = "https://files.pythonhosted.org/packages/5a/ac/df9ddc19ec972cd97b60b262dd2c4be28c6192b5a779cad429c6657ee680/kiwisolver-1.5.1-cp310-cp310-manylinux_2_24_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:f1d56ec54d257d05e0b50f5780d967540cd07beeaf9e5f645b26d50cce79f4d8", size = 1246756, upload-time = "2026-08-28T10:24:51.225Z" }, - { url = "https://files.pythonhosted.org/packages/cf/de/c38a246b8a4f4b293c7291aa650917b05c5549b0d532749bc523296e90c4/kiwisolver-1.5.1-cp310-cp310-manylinux_2_24_s390x.manylinux_2_28_s390x.whl", hash = "sha256:8de6f2a4ce7e7bd27d23dd94abf0ccafe0e0e5cc9c764b0577191f2c25f08f26", size = 1295555, upload-time = "2026-08-28T10:24:52.953Z" }, - { url = "https://files.pythonhosted.org/packages/b6/48/3c95a5232d8b5783050d8c8089b58bf1f57018f9135232d72c5aa6b0c01b/kiwisolver-1.5.1-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:16895f553ee6620a827d2da56b871f835fb70b9216cca5d188e885caf6e3bd23", size = 2179476, upload-time = "2026-08-28T10:24:54.568Z" }, - { url = "https://files.pythonhosted.org/packages/e6/e9/b9e999336afc561b154e93682f597832bdc7446f2ee18b467c5b0e924867/kiwisolver-1.5.1-cp310-cp310-musllinux_1_2_ppc64le.whl", hash = "sha256:6b92f60017dda7d877fdc546438b5e28f31c523264f49cf5a48c1d0ce1a0dfbc", size = 2275258, upload-time = "2026-08-28T10:24:56.186Z" }, - { url = "https://files.pythonhosted.org/packages/76/cd/c1c550796ada4a59644b8264b425fe332686d2a086c4729fcc640ececdfe/kiwisolver-1.5.1-cp310-cp310-musllinux_1_2_s390x.whl", hash = "sha256:7824b5e8bdbf0bccb4ccd37bbb115849a1dc45437fb4de8351385ed07c437ee0", size = 2443424, upload-time = "2026-08-28T10:24:58.093Z" }, - { url = "https://files.pythonhosted.org/packages/b2/d4/30f641eb8e10f6ad5bb9af8a15ec8eea386162a6ef491e68995b8680ef4e/kiwisolver-1.5.1-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:aa7d00b1700966d2917e54d278aba86897890ca9276dd8b76cf6446b6c181b92", size = 2249457, upload-time = "2026-08-28T10:25:00.223Z" }, - { url = "https://files.pythonhosted.org/packages/1c/d9/211e016f8aa5b5bf496dd3bd7ebab4b73b22d91f025f25e20156a44a77fc/kiwisolver-1.5.1-cp310-cp310-win_amd64.whl", hash = "sha256:96c30002424670b5e1e46495c2b8cbffef39cf77c1d79e76462029d50339785b", size = 70643, upload-time = "2026-08-28T10:25:01.888Z" }, - { url = "https://files.pythonhosted.org/packages/9e/8e/ae7007266dea1fd93fcc48541042c1f6583958055de3b424a59ec16def25/kiwisolver-1.5.1-cp310-cp310-win_arm64.whl", hash = "sha256:f0f4a42db92d6ec7677ab9d12830a2a8ec145a9c6d15db2b593466bc875c78d7", size = 68215, upload-time = "2026-08-28T10:25:03.136Z" }, - { url = "https://files.pythonhosted.org/packages/ba/f1/8bae9fac0f1837679ed59a5dd7e97e7eb943b738defa7cc0117ea0d107dc/kiwisolver-1.5.1-pp310-pypy310_pp73-macosx_10_15_x86_64.whl", hash = "sha256:a5716a33bfabb2c6ce27b6cf03253467b3804f83e215f4d202685cf93c6c9874", size = 59543, upload-time = "2026-08-28T10:28:13.794Z" }, - { url = "https://files.pythonhosted.org/packages/c3/3e/42e3639d32ef3ac6ede80c39dc1d1df6224927409960d8f762b6cb504efe/kiwisolver-1.5.1-pp310-pypy310_pp73-macosx_11_0_arm64.whl", hash = "sha256:685929988b208a911f1285e2f8ed54210b0d681a3dc0f03e00d599d291986e7e", size = 57504, upload-time = "2026-08-28T10:28:15.074Z" }, - { url = "https://files.pythonhosted.org/packages/e1/12/f4beaaceb740b96c363a8fa6f34dbdf37a58d9e5f15416427d7bf89c552a/kiwisolver-1.5.1-pp310-pypy310_pp73-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:e4e49f7e1a4e7191bdf9dc67a974db714501b1fc52c24324103d06a86abd5c08", size = 79885, upload-time = "2026-08-28T10:28:16.345Z" }, - { url = "https://files.pythonhosted.org/packages/02/24/18d8a755acdae79c37ca2f1a925795aab67b9456c30c8569c377ea3abc77/kiwisolver-1.5.1-pp310-pypy310_pp73-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:f0a887b6565bbfe80efde2b7f6e8890d7d9bbdb11bdb17028a3690c32fe0621f", size = 77582, upload-time = "2026-08-28T10:28:17.719Z" }, - { url = "https://files.pythonhosted.org/packages/df/a9/b86dde4f553ef74db0f9c32398614e24b2e8ec1d29a6ca04ae080d7dd29b/kiwisolver-1.5.1-pp310-pypy310_pp73-win_amd64.whl", hash = "sha256:1983f0974a750a6f6556f368ba11105d1d8369c735b944747c9f12ae5aea7aae", size = 98321, upload-time = "2026-08-28T10:28:19.087Z" }, -] - -[[package]] -name = "librt" -version = "0.16.0" -source = { registry = "https://pypi.org/simple" } -sdist = { url = "https://files.pythonhosted.org/packages/04/f5/9dc696772d241814bacac7880bac32f2930b5a6ebc1f85317b83161a011c/librt-0.16.0.tar.gz", hash = "sha256:ac38d6d8d66bf3d744148dbbc0b8e193e195a51e364ed55e224631f5721891fc", size = 219839, upload-time = "2026-09-29T00:55:32.891Z" } -wheels = [ - { url = "https://files.pythonhosted.org/packages/ec/77/900294b3c9a81415323d81b3f3f271a7f5d7ed9d01e824fc38ffa49470b6/librt-0.16.0-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:96f576f2711f8519152ec76d0e599243555c1f07679fa73606ca8c8c868c0be6", size = 148668, upload-time = "2026-09-29T00:44:20.282Z" }, - { url = "https://files.pythonhosted.org/packages/55/3b/c301e8cc47758e4518b93e926a0111080155cc79fa03651d202ac2025065/librt-0.16.0-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:2bec3818c7da7c96ceae0ef5915a3d16c52dd08f3ea913bf1fe8568c447c7978", size = 153562, upload-time = "2026-09-29T00:44:21.672Z" }, - { url = "https://files.pythonhosted.org/packages/62/b1/4d5b98114a58bf17e3832cd33400e40f2582f68c2fb7ce25b4468cb1afd3/librt-0.16.0-cp310-cp310-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:64c79520414a3fdfc6aabd7593e6169afa14d5f8d9908d4b498db068868b08dd", size = 494337, upload-time = "2026-09-29T00:44:23.096Z" }, - { url = "https://files.pythonhosted.org/packages/88/36/14223c9b0dc38982eb4f399732c8cb27b19c7e027ae0faef5ca51d08d19f/librt-0.16.0-cp310-cp310-manylinux2014_i686.manylinux_2_17_i686.manylinux_2_28_i686.whl", hash = "sha256:f81b5b19ce748ef68d4746656b7929762eb2fe99269b266e4be07e2ee4de7144", size = 485440, upload-time = "2026-09-29T00:44:24.555Z" }, - { url = "https://files.pythonhosted.org/packages/ec/9e/d7155e6800d0c33e297e529b217649f7361d706491ebf9d2fc0fc627309e/librt-0.16.0-cp310-cp310-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:c71d1b76210a36729fedfc5115069b50a3d8619054745f8758fe5d6f19e86671", size = 498363, upload-time = "2026-09-29T00:44:26.03Z" }, - { url = "https://files.pythonhosted.org/packages/d3/ce/d5f1fb9f913ac0979d6fc5db9fb9c0bf28cc3470988528957922f15ed40c/librt-0.16.0-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:473eebc7866bb0a0c8849a292b5e7157c1aba5d14d0f0f610c52158d6d964262", size = 515453, upload-time = "2026-09-29T00:44:27.566Z" }, - { url = "https://files.pythonhosted.org/packages/b4/d4/ca0fca1a27c26080d1a25b2b31f271e532078a5719878c3daca0c3d4c539/librt-0.16.0-cp310-cp310-manylinux_2_34_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:4eb1313a19847089ee81e88742abedf285c60538816640b99742d8534b81d26a", size = 509537, upload-time = "2026-09-29T00:44:29.14Z" }, - { url = "https://files.pythonhosted.org/packages/ee/c0/26807bf2221a53a2c66f2e23a5c4d57f1c0eaa4afed7cb81d841cf3d1903/librt-0.16.0-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:ebefd60b42e2a82b32d136bb5f7c94eadfcd29f772b547df6f3291d1ed855a1c", size = 532541, upload-time = "2026-09-29T00:44:30.745Z" }, - { url = "https://files.pythonhosted.org/packages/0e/50/c329d509907e1bc061abeec3796f94d255d43ba25d28c3854d2138ed5ab2/librt-0.16.0-cp310-cp310-musllinux_1_2_i686.whl", hash = "sha256:6c5da27e8056439f927ea896735da60e616c477a8293feaa3233d4e7781a6726", size = 537059, upload-time = "2026-09-29T00:44:32.102Z" }, - { url = "https://files.pythonhosted.org/packages/84/d6/4571b9c9e65d98e5503734166dce2fd3e216f526dc3c59a3773faa8a60e3/librt-0.16.0-cp310-cp310-musllinux_1_2_ppc64le.whl", hash = "sha256:67e718c7a43f8db325abbbf1404e2d535f12f8f7a1a82259568385cc5274b82a", size = 536614, upload-time = "2026-09-29T00:44:33.653Z" }, - { url = "https://files.pythonhosted.org/packages/c8/d3/a2ed8a292e4ab7889792a9c3f4ad5d1caf6557afce7f6b452e77f8ed20b7/librt-0.16.0-cp310-cp310-musllinux_1_2_riscv64.whl", hash = "sha256:314e703f0c19320dc8094e7a784b9cf29e1b67402515abf580069a6363c0b4f1", size = 517199, upload-time = "2026-09-29T00:44:35.115Z" }, - { url = "https://files.pythonhosted.org/packages/9e/24/276e5218b4b7adb6258a42b7403cb1b7cef25616238d0c2152288a9d2f53/librt-0.16.0-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:943c6bbecbdf7fa575a4f2952fcfd848c88ef95507c3fca411e89d4ac3ff8143", size = 558746, upload-time = "2026-09-29T00:44:36.656Z" }, - { url = "https://files.pythonhosted.org/packages/7c/5c/9156df81a1726e1efc9567379def2b8777a6d56f464d2f1b760bf951b8af/librt-0.16.0-cp310-cp310-win32.whl", hash = "sha256:7cc365f006891afb006b52d5ee5ee74c09306ffa20e2f8705a32a4450af2f3ba", size = 104424, upload-time = "2026-09-29T00:44:38.123Z" }, - { url = "https://files.pythonhosted.org/packages/0b/62/4fd172cb3f49ab2cf5ef17de519a93cfb935202c1270ba9d44c6a64178c3/librt-0.16.0-cp310-cp310-win_amd64.whl", hash = "sha256:0314058469f4d2fd279ce7c62ac274ac82c3918ef7db62ef0697c4c359370155", size = 124267, upload-time = "2026-09-29T00:44:39.455Z" }, -] - -[[package]] -name = "line-profiler" -version = "5.0.2" -source = { registry = "https://pypi.org/simple" } -dependencies = [ - { name = "tomli" }, - { name = "typing-extensions" }, -] -sdist = { url = "https://files.pythonhosted.org/packages/03/b6/6d18ad201417a9c5168995541d0fd7981b5652b2b34f6e46a3a93c0f1beb/line_profiler-5.0.2.tar.gz", hash = "sha256:8d8a990c84c64bcde45af22af502d17bc0ae107be405ce41bba92af5c39c0000", size = 407075, upload-time = "2026-02-23T23:31:20.698Z" } -wheels = [ - { url = "https://files.pythonhosted.org/packages/22/9c/d2ba5e1f7da98e3dff9c333dd914c284cd733827987e7ed6a039c7fc008c/line_profiler-5.0.2-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:1ab5d8de6d3c0381b477cc73dde9c36b6c52ba1928d6daba85ac9e790a3f0086", size = 651703, upload-time = "2026-02-23T23:29:45.092Z" }, - { url = "https://files.pythonhosted.org/packages/1b/20/9f99d89ff0ad56e5e6190262ce16a8b2dad1f23b9dc0bc4da608fd42c16f/line_profiler-5.0.2-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:b45da5408286b5395ccb707d1cb2b5aeeb8828466cd2f62e8ab2d7cfb0e1b38c", size = 508846, upload-time = "2026-02-23T23:29:47.341Z" }, - { url = "https://files.pythonhosted.org/packages/5a/44/04d4f21dd1ffca9911402a8cc0ded6f9d89dfd5d3f2a0498704502e5b9af/line_profiler-5.0.2-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:f6163a43474584db9da495d00869d51a66fdef3962ec3df76f998b1a89308123", size = 497428, upload-time = "2026-02-23T23:29:49.008Z" }, - { url = "https://files.pythonhosted.org/packages/bd/61/7e4658db06e3e3c41713bc600fc26e22607b08969d6044dd640ca26613b1/line_profiler-5.0.2-cp310-cp310-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:a7759e9e4688ed1be1e674dee599500ba47f2f2c76f903184df615352bc182a8", size = 1486964, upload-time = "2026-02-23T23:29:50.849Z" }, - { url = "https://files.pythonhosted.org/packages/03/2e/5507cf3190052906ba9fe77477cf655d446a9c517a41c290050e05cd1fec/line_profiler-5.0.2-cp310-cp310-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:e0f8b3b766bde49ca8c1e26b5ff9013358435106d11bc4838764e117d2bcd3ed", size = 1499663, upload-time = "2026-02-23T23:29:53.578Z" }, - { url = "https://files.pythonhosted.org/packages/c0/d9/cb19fb7b899f30d2261bb792d8f9d1e0b6ba5b4f3fc94b45136fd412562a/line_profiler-5.0.2-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:42d4bef2ce9f2e2cc6b872034ef4bf2e18ec44f3a8a09bdf91232a74abe4074c", size = 2442445, upload-time = "2026-02-23T23:29:55.952Z" }, - { url = "https://files.pythonhosted.org/packages/83/5d/9b1d142f41ae23b6da22954ec42c367491bcad356c3507f291c101522e88/line_profiler-5.0.2-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:7dd5942d091541803b38ebc4c9d7f375d43b93e41e811f2449a022fd5b24d283", size = 2525207, upload-time = "2026-02-23T23:29:57.671Z" }, - { url = "https://files.pythonhosted.org/packages/68/a8/d9ac8429b74b1e30e22e2d51bc5d534864dd276ba856ea8ca32fca1f1198/line_profiler-5.0.2-cp310-cp310-win_amd64.whl", hash = "sha256:c22d1d8ee371e92149b5d9578e78072bcb36435adb62e84bf3bb0c173e14c6f6", size = 479862, upload-time = "2026-02-23T23:29:59.178Z" }, -] - -[[package]] -name = "markupsafe" -version = "3.0.4" -source = { registry = "https://pypi.org/simple" } -sdist = { url = "https://files.pythonhosted.org/packages/38/9b/e422a865e1d5d57d0e509b4e0bf1c1a70a7f6382c29a5aa428df994c8bc8/markupsafe-3.0.4.tar.gz", hash = "sha256:2e9ad7dd851bf45fab9f75cbff4cb493fee9979e8d8c7c9c3ee119022518edd6", size = 153777, upload-time = "2026-10-02T23:07:22.29Z" } -wheels = [ - { url = "https://files.pythonhosted.org/packages/41/aa/9a65962e364bf19745f6bec7bde398fb1f5ca53ad2e734258e6198cc32ba/markupsafe-3.0.4-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:dd8ea6ebee7aedbf7c749fa80521d9ccf1ba473e0d1e14805caafbaad281c889", size = 11521, upload-time = "2026-10-02T23:04:20.141Z" }, - { url = "https://files.pythonhosted.org/packages/14/36/927999a34b7d1def6957de89153d327fedc4030061940b5a468584e6c5a8/markupsafe-3.0.4-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:dff05cb7016dff1e9fd68f4122c127b65dfc59de5306cfb7ad92f956f230bee2", size = 12066, upload-time = "2026-10-02T23:04:21.275Z" }, - { url = "https://files.pythonhosted.org/packages/17/54/69e7b0db9bd687bfd83451eed5666384d67cfed3be062bfc59a06a15474e/markupsafe-3.0.4-cp310-cp310-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:cf63c214fe879a65e69a386f915e36104fc84254ab141240f8854602d8e0be2a", size = 22081, upload-time = "2026-10-02T23:04:22.221Z" }, - { url = "https://files.pythonhosted.org/packages/bd/14/f6f5c97903f7d2db76bbfaced31509a47d360a103b3aaf4849f6536591ec/markupsafe-3.0.4-cp310-cp310-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:2a6ef68ae94aed8721934072b27a3b654ea2100b97e4ab864cf1489c90926fbc", size = 26079, upload-time = "2026-10-02T23:04:23.346Z" }, - { url = "https://files.pythonhosted.org/packages/d0/04/c3cc9b75f94f8b54d7e503c44cebd4b4a115ec1d6f1b996b999807daba99/markupsafe-3.0.4-cp310-cp310-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:fd9f8797427910198f95bced71ddfed61130d7e349213bfb8466c9c99e2c46a8", size = 22611, upload-time = "2026-10-02T23:04:24.401Z" }, - { url = "https://files.pythonhosted.org/packages/00/26/c4708ed3b0f08e8e6d7cbce3314ac130cb5352d1f62951b6fef7878f2b1e/markupsafe-3.0.4-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:d1aca03ede943eb80ab3d63bb082c84b7aab85ea83bd0fd0c200260945fb49d9", size = 20712, upload-time = "2026-10-02T23:04:25.386Z" }, - { url = "https://files.pythonhosted.org/packages/d9/b9/f3894d6aae3d7a52c9363317f4baf2fcadc052163d6dbc871266e32639ed/markupsafe-3.0.4-cp310-cp310-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:0764a13d34cae40db7bbf3a09b7e9b491bf4603e20b263a7a9d6b8e324975d0a", size = 20742, upload-time = "2026-10-02T23:04:26.403Z" }, - { url = "https://files.pythonhosted.org/packages/59/7c/8e248ddbfe286ab6bddb462bdac0851cbb1510d2cbbb815a415fcb0511af/markupsafe-3.0.4-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:9388003072b95f2f1e3fd908604194d653ba21330d811961a78b7da1a77e9e36", size = 21560, upload-time = "2026-10-02T23:04:27.522Z" }, - { url = "https://files.pythonhosted.org/packages/df/26/2353fef7d4bcf2b18e16bad81979fcecff2915156ca6882447917205b8e2/markupsafe-3.0.4-cp310-cp310-musllinux_1_2_armv7l.whl", hash = "sha256:8698d70a8081ee8c090dbb394768b5789a1da8b131b5499f89d071dd3cfaf6be", size = 20973, upload-time = "2026-10-02T23:04:28.573Z" }, - { url = "https://files.pythonhosted.org/packages/67/6f/a9561d98d9a6ee3494b0b970a1c766e58bab128cc84841d56ec009456dbd/markupsafe-3.0.4-cp310-cp310-musllinux_1_2_ppc64le.whl", hash = "sha256:bf053da3c97a4bc5ecfbb218cdd2983febd91c617be8367d139882aa11e490aa", size = 22036, upload-time = "2026-10-02T23:04:29.568Z" }, - { url = "https://files.pythonhosted.org/packages/55/83/6217df9192eca95af3ff0cad955c9854a93fa43b288cf7411ae24713eb52/markupsafe-3.0.4-cp310-cp310-musllinux_1_2_riscv64.whl", hash = "sha256:9438a2648b2195980cb2dd8e53ed7b8df91319e2d0b70ae61a9e1d1bc8d3bec9", size = 20314, upload-time = "2026-10-02T23:04:30.881Z" }, - { url = "https://files.pythonhosted.org/packages/35/7c/9cd8081dae70e17fdab3558121fa618d459c7950c8abd8fc10fc024486d7/markupsafe-3.0.4-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:88d59b473bfb03259722600839af9bbd7fa13a2eb514beefeedb95997882f69a", size = 20780, upload-time = "2026-10-02T23:04:31.975Z" }, - { url = "https://files.pythonhosted.org/packages/44/37/c5f2f45f4d8f0c24e4af7b9dc711640c888044cbf5f7e2ba2c0bb74cbb55/markupsafe-3.0.4-cp310-cp310-win32.whl", hash = "sha256:4a540e2d3192792fc84eced57bef37851ccb2b41f73291bb17408eea77bcd278", size = 14096, upload-time = "2026-10-02T23:04:33.129Z" }, - { url = "https://files.pythonhosted.org/packages/50/50/394a1c61c9b9972cb4f76875c332af7109bd39bdad09d3a0ec5327a339dc/markupsafe-3.0.4-cp310-cp310-win_amd64.whl", hash = "sha256:5c22873ad1f0532ba40fa1727f3c0fc1bbbaab6d373d4cbe3f0dc74b2e2521c7", size = 14329, upload-time = "2026-10-02T23:04:34.168Z" }, - { url = "https://files.pythonhosted.org/packages/d1/9a/86d03d2f32ba41a57baa124a7bcb76d0a6d39b1622e9bd4d550074e8b61a/markupsafe-3.0.4-cp310-cp310-win_arm64.whl", hash = "sha256:3d23795802fc8bd72534836d64489bbf0f67c088959091bdb22e10735a5107bf", size = 14196, upload-time = "2026-10-02T23:04:35.201Z" }, -] - -[[package]] -name = "matplotlib" -version = "3.10.9" -source = { registry = "https://pypi.org/simple" } -dependencies = [ - { name = "contourpy" }, - { name = "cycler" }, - { name = "fonttools" }, - { name = "kiwisolver" }, - { name = "numpy" }, - { name = "packaging" }, - { name = "pillow" }, - { name = "pyparsing" }, - { name = "python-dateutil" }, -] -sdist = { url = "https://files.pythonhosted.org/packages/63/1b/4be5be87d43d327a0cf4de1a56e86f7f84c89312452406cf122efe2839e6/matplotlib-3.10.9.tar.gz", hash = "sha256:fd66508e8c6877d98e586654b608a0456db8d7e8a546eb1e2600efd957302358", size = 34811233, upload-time = "2026-04-24T00:14:13.539Z" } -wheels = [ - { url = "https://files.pythonhosted.org/packages/18/6f/340b04986e67aac6f66c5145ce68bf72c64bed30f92c8913499a6e6b8f99/matplotlib-3.10.9-cp310-cp310-macosx_10_12_x86_64.whl", hash = "sha256:77210dce9cb8153dffc967efaae990543392563d5a376d4dd8539bebcb0ed217", size = 8296625, upload-time = "2026-04-24T00:11:43.376Z" }, - { url = "https://files.pythonhosted.org/packages/bb/2f/127081eb83162053ebb9678ceac64220b93a663e0167432566e9c7c82aab/matplotlib-3.10.9-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:1e7698ac9868428e84d2c967424803b2472ff7167d9d6590d4204ed775343c3b", size = 8188790, upload-time = "2026-04-24T00:11:46.556Z" }, - { url = "https://files.pythonhosted.org/packages/fc/b7/d8bcec2626c35f96972bff656299fef4578113ea6193c8fdad324710410c/matplotlib-3.10.9-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:1aa972116abb4c9d201bf245620b433726cb6856f3bef6a78f776a00f5c92d37", size = 8769389, upload-time = "2026-04-24T00:11:48.959Z" }, - { url = "https://files.pythonhosted.org/packages/12/49/b78e214a527ea732033b7f4d37f7afb504d74ba9d134bd47938230dfb8b1/matplotlib-3.10.9-cp310-cp310-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:ae2f11957b27ce53497dd4d7b235c4d4f1faf383dfb39d0c5beb833bff883294", size = 9589657, upload-time = "2026-04-24T00:11:51.915Z" }, - { url = "https://files.pythonhosted.org/packages/5f/15/5246f7b43beae19c74dfee651d58d6cc8112e06f77adb4e88cc04f2e3a23/matplotlib-3.10.9-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:b049278ddce116aaa1c1377ebf58adea909132dfce0281cf7e3a1ea9fc2e2c65", size = 9651983, upload-time = "2026-04-24T00:11:54.766Z" }, - { url = "https://files.pythonhosted.org/packages/75/77/5acecfe672ba0fa1b8c0454f69ce155d1e6fc5852fa7206bf9afaf767121/matplotlib-3.10.9-cp310-cp310-win_amd64.whl", hash = "sha256:82834c3c292d24d3a8aae77cd2d20019de69d692a34a970e4fdb8d33e2ea3dda", size = 8199701, upload-time = "2026-04-24T00:11:58.389Z" }, - { url = "https://files.pythonhosted.org/packages/2c/2b/0e92ad0ac446633f928a1563db4aa8add407e1924faf0ded5b95b35afb27/matplotlib-3.10.9-pp310-pypy310_pp73-macosx_10_15_x86_64.whl", hash = "sha256:1872fb212a05b729e649754a72d5da61d03e0554d76e80303b6f83d1d2c0552b", size = 8293058, upload-time = "2026-04-24T00:13:56.339Z" }, - { url = "https://files.pythonhosted.org/packages/4b/23/74682fd369f5299ceda438fea2a0662e6383b85c9383fb9cdfcf04713e07/matplotlib-3.10.9-pp310-pypy310_pp73-macosx_11_0_arm64.whl", hash = "sha256:985f2238880e2e69093f588f5fe2e46771747febf0649f3cf7f7b7480875317f", size = 8186627, upload-time = "2026-04-24T00:13:58.623Z" }, - { url = "https://files.pythonhosted.org/packages/ca/e8/368aab88f3c4cd8992800f31abfe0670c3e47540ba20a97e9fdbcde594b3/matplotlib-3.10.9-pp310-pypy310_pp73-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:6640f75af2c6148293caa0a2b39dd806a492dd66c8a8b04035813e33d0fd2585", size = 8764117, upload-time = "2026-04-24T00:14:01.684Z" }, -] - -[[package]] -name = "matplotlib-inline" -version = "0.2.2" -source = { registry = "https://pypi.org/simple" } -dependencies = [ - { name = "traitlets" }, -] -sdist = { url = "https://files.pythonhosted.org/packages/bd/c0/9f7c9a46090390368a4d7bcb76bb87a4a36c421e4c0792cdb53486ffac7a/matplotlib_inline-0.2.2.tar.gz", hash = "sha256:72f3fe8fce36b70d4a5b612f899090cd0401deddc4ea90e1572b9f4bfb058c79", size = 8150, upload-time = "2026-05-08T17:33:33.49Z" } -wheels = [ - { url = "https://files.pythonhosted.org/packages/41/09/5b161152e2d90f7b87f781c2e1267494aef9c32498df793f73ad0a0a494a/matplotlib_inline-0.2.2-py3-none-any.whl", hash = "sha256:3c821cf1c209f59fb2d2d64abbf5b23b67bcb2210d663f9918dd851c6da1fcf6", size = 9534, upload-time = "2026-05-08T17:33:32.055Z" }, -] - -[[package]] -name = "mccabe" -version = "0.7.0" -source = { registry = "https://pypi.org/simple" } -sdist = { url = "https://files.pythonhosted.org/packages/e7/ff/0ffefdcac38932a54d2b5eed4e0ba8a408f215002cd178ad1df0f2806ff8/mccabe-0.7.0.tar.gz", hash = "sha256:348e0240c33b60bbdf4e523192ef919f28cb2c3d7d5c7794f74009290f236325", size = 9658, upload-time = "2022-01-24T01:14:51.113Z" } -wheels = [ - { url = "https://files.pythonhosted.org/packages/27/1a/1f68f9ba0c207934b35b86a8ca3aad8395a3d6dd7921c0686e23853ff5a9/mccabe-0.7.0-py2.py3-none-any.whl", hash = "sha256:6c2d30ab6be0e4a46919781807b4f0d834ebdd6c6e3dca0bda5a15f863427b6e", size = 7350, upload-time = "2022-01-24T01:14:49.62Z" }, -] - -[[package]] -name = "memory-profiler" -version = "0.61.0" -source = { registry = "https://pypi.org/simple" } -dependencies = [ - { name = "psutil" }, -] -sdist = { url = "https://files.pythonhosted.org/packages/b2/88/e1907e1ca3488f2d9507ca8b0ae1add7b1cd5d3ca2bc8e5b329382ea2c7b/memory_profiler-0.61.0.tar.gz", hash = "sha256:4e5b73d7864a1d1292fb76a03e82a3e78ef934d06828a698d9dada76da2067b0", size = 35935, upload-time = "2022-11-15T17:57:28.994Z" } -wheels = [ - { url = "https://files.pythonhosted.org/packages/49/26/aaca612a0634ceede20682e692a6c55e35a94c21ba36b807cc40fe910ae1/memory_profiler-0.61.0-py3-none-any.whl", hash = "sha256:400348e61031e3942ad4d4109d18753b2fb08c2f6fb8290671c5513a34182d84", size = 31803, upload-time = "2022-11-15T17:57:27.031Z" }, -] - -[[package]] -name = "mypy" -version = "2.4.0" -source = { registry = "https://pypi.org/simple" } -dependencies = [ - { name = "ast-serialize" }, - { name = "librt", marker = "platform_python_implementation != 'PyPy'" }, - { name = "mypy-extensions" }, - { name = "pathspec" }, - { name = "tomli" }, - { name = "typing-extensions" }, -] -sdist = { url = "https://files.pythonhosted.org/packages/34/4e/64300736cf0a0373a27b94a91b664ee7382e36f77b0621bae6381da3e180/mypy-2.4.0.tar.gz", hash = "sha256:77bdaebd452f43fcfc4cc3ba94352a3ea537cd01e3f2d0879f48673d2ec00d6e", size = 4064425, upload-time = "2026-10-01T20:40:39.229Z" } -wheels = [ - { url = "https://files.pythonhosted.org/packages/5c/0a/78c9ac93933e2ecd51d807021f78c03ffe98640f33951a8be159f5fd55bc/mypy-2.4.0-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:ffda5244fd1ad71a1e54405e35f50d09b80c3978efa120f58bd1252ae32c62d2", size = 14408618, upload-time = "2026-10-01T20:39:46.766Z" }, - { url = "https://files.pythonhosted.org/packages/aa/4f/5f5f4429fd5a4218ce6268164a66afeed75c7e2ce5522a4d163faaa5fe85/mypy-2.4.0-cp310-cp310-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:615b03922d40e186fd1df73156473db0ba525c639bb4fd1cf28e1694879c9b23", size = 14552749, upload-time = "2026-10-01T20:40:08.325Z" }, - { url = "https://files.pythonhosted.org/packages/54/78/fa1c319cd51db7a6027b46117460d5a361c6bba0c0f0f0670a2dab8ce2a5/mypy-2.4.0-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:13fa24f439c0e48a290a3922fa14ccd22f2762bae99d2142931b3e40a9055080", size = 15505846, upload-time = "2026-10-01T20:39:15.475Z" }, - { url = "https://files.pythonhosted.org/packages/e2/5a/14c02690776fb04e9fa60b81173cb9ae6315e0745fad3813b303737f2f0c/mypy-2.4.0-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:3adef556a19eb3b630bf86a79c29d7da3d61e541472d0d897ca01b171c0abf8f", size = 15823059, upload-time = "2026-10-01T20:39:35.429Z" }, - { url = "https://files.pythonhosted.org/packages/76/d8/d29afa819f8cb765018d6e2773e390a41ea4592f75abe417135969646857/mypy-2.4.0-cp310-cp310-win_amd64.whl", hash = "sha256:1dc0f64b0a92ae27a49d2175f0bacfa56e15bdc5b420cf92e0c1f79292219cbb", size = 11312927, upload-time = "2026-10-01T20:39:28.509Z" }, - { url = "https://files.pythonhosted.org/packages/bc/c8/966dec4d80303855d824e6bf67fe1da812d88adfe4d75e24d8545dab4826/mypy-2.4.0-cp310-cp310-win_arm64.whl", hash = "sha256:4a378fc15fb33e321f04652c166ce73eeb8833a97c3d218132844e938cd93220", size = 10879252, upload-time = "2026-10-01T20:38:41.545Z" }, - { url = "https://files.pythonhosted.org/packages/81/12/46ae8670c98a3cd0286ca5645c2f918f8f6be65edfed81b916010619f668/mypy-2.4.0-py3-none-any.whl", hash = "sha256:d01c5d26a352acc6d5cf3128225477e1e8465e8d3029d4c345807fbf7f3cf093", size = 2800734, upload-time = "2026-10-01T20:39:26.837Z" }, -] - -[[package]] -name = "mypy-extensions" -version = "1.1.0" -source = { registry = "https://pypi.org/simple" } -sdist = { url = "https://files.pythonhosted.org/packages/a2/6e/371856a3fb9d31ca8dac321cda606860fa4548858c0cc45d9d1d4ca2628b/mypy_extensions-1.1.0.tar.gz", hash = "sha256:52e68efc3284861e772bbcd66823fde5ae21fd2fdb51c62a211403730b916558", size = 6343, upload-time = "2025-04-22T14:54:24.164Z" } -wheels = [ - { url = "https://files.pythonhosted.org/packages/79/7b/2c79738432f5c924bef5071f933bcc9efd0473bac3b4aa584a6f7c1c8df8/mypy_extensions-1.1.0-py3-none-any.whl", hash = "sha256:1be4cccdb0f2482337c4743e60421de3a356cd97508abadd57d47403e94f5505", size = 4963, upload-time = "2025-04-22T14:54:22.983Z" }, -] - -[[package]] -name = "narwhals" -version = "2.27.1" -source = { registry = "https://pypi.org/simple" } -sdist = { url = "https://files.pythonhosted.org/packages/bf/21/f64d6b2dbea7bf3f8c38cdc786dcc6ef012ca3d173ad208c782c9a7bedf6/narwhals-2.27.1.tar.gz", hash = "sha256:aed93076a3ea42d9c32c88e4eb5ea422a21937011cbe1f480f9572a523c82094", size = 735013, upload-time = "2026-10-10T06:52:18.113Z" } -wheels = [ - { url = "https://files.pythonhosted.org/packages/d1/89/5d4c86da1130d9059681e5b6cd7645df5c10279a6a079c5c37dcb2cc6f3f/narwhals-2.27.1-py3-none-any.whl", hash = "sha256:d057df13f5852b8e157596e82eb5e955fad267425df5e420e0ee9863da483b31", size = 483211, upload-time = "2026-10-10T06:52:16.32Z" }, -] - -[[package]] -name = "nest-asyncio2" -version = "1.7.4" -source = { registry = "https://pypi.org/simple" } -sdist = { url = "https://files.pythonhosted.org/packages/32/2c/70e3b6bb2189cfd260280b7e1042bd622949a258663f95e887fada4ac1e6/nest_asyncio2-1.7.4.tar.gz", hash = "sha256:995b1409d926ec55e0876ea39a69bffdd8852cf1db3652c177e8c8ffdbcaf3cc", size = 16891, upload-time = "2026-10-07T22:31:50.507Z" } -wheels = [ - { url = "https://files.pythonhosted.org/packages/09/ed/559d2915dce85794bc0c36064043da170da50cd98746dcbddd85d5932017/nest_asyncio2-1.7.4-py3-none-any.whl", hash = "sha256:86e77b52c3d1496b294af3c944b44213b9b82a12a5ee590c0acc4ca4692ef6c7", size = 8543, upload-time = "2026-10-07T22:31:49.245Z" }, -] - -[[package]] -name = "numpy" -version = "2.2.6" -source = { registry = "https://pypi.org/simple" } -sdist = { url = "https://files.pythonhosted.org/packages/76/21/7d2a95e4bba9dc13d043ee156a356c0a8f0c6309dff6b21b4d71a073b8a8/numpy-2.2.6.tar.gz", hash = "sha256:e29554e2bef54a90aa5cc07da6ce955accb83f21ab5de01a62c8478897b264fd", size = 20276440, upload-time = "2025-05-17T22:38:04.611Z" } -wheels = [ - { url = "https://files.pythonhosted.org/packages/9a/3e/ed6db5be21ce87955c0cbd3009f2803f59fa08df21b5df06862e2d8e2bdd/numpy-2.2.6-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:b412caa66f72040e6d268491a59f2c43bf03eb6c96dd8f0307829feb7fa2b6fb", size = 21165245, upload-time = "2025-05-17T21:27:58.555Z" }, - { url = "https://files.pythonhosted.org/packages/22/c2/4b9221495b2a132cc9d2eb862e21d42a009f5a60e45fc44b00118c174bff/numpy-2.2.6-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:8e41fd67c52b86603a91c1a505ebaef50b3314de0213461c7a6e99c9a3beff90", size = 14360048, upload-time = "2025-05-17T21:28:21.406Z" }, - { url = "https://files.pythonhosted.org/packages/fd/77/dc2fcfc66943c6410e2bf598062f5959372735ffda175b39906d54f02349/numpy-2.2.6-cp310-cp310-macosx_14_0_arm64.whl", hash = "sha256:37e990a01ae6ec7fe7fa1c26c55ecb672dd98b19c3d0e1d1f326fa13cb38d163", size = 5340542, upload-time = "2025-05-17T21:28:30.931Z" }, - { url = "https://files.pythonhosted.org/packages/7a/4f/1cb5fdc353a5f5cc7feb692db9b8ec2c3d6405453f982435efc52561df58/numpy-2.2.6-cp310-cp310-macosx_14_0_x86_64.whl", hash = "sha256:5a6429d4be8ca66d889b7cf70f536a397dc45ba6faeb5f8c5427935d9592e9cf", size = 6878301, upload-time = "2025-05-17T21:28:41.613Z" }, - { url = "https://files.pythonhosted.org/packages/eb/17/96a3acd228cec142fcb8723bd3cc39c2a474f7dcf0a5d16731980bcafa95/numpy-2.2.6-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:efd28d4e9cd7d7a8d39074a4d44c63eda73401580c5c76acda2ce969e0a38e83", size = 14297320, upload-time = "2025-05-17T21:29:02.78Z" }, - { url = "https://files.pythonhosted.org/packages/b4/63/3de6a34ad7ad6646ac7d2f55ebc6ad439dbbf9c4370017c50cf403fb19b5/numpy-2.2.6-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:fc7b73d02efb0e18c000e9ad8b83480dfcd5dfd11065997ed4c6747470ae8915", size = 16801050, upload-time = "2025-05-17T21:29:27.675Z" }, - { url = "https://files.pythonhosted.org/packages/07/b6/89d837eddef52b3d0cec5c6ba0456c1bf1b9ef6a6672fc2b7873c3ec4e2e/numpy-2.2.6-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:74d4531beb257d2c3f4b261bfb0fc09e0f9ebb8842d82a7b4209415896adc680", size = 15807034, upload-time = "2025-05-17T21:29:51.102Z" }, - { url = "https://files.pythonhosted.org/packages/01/c8/dc6ae86e3c61cfec1f178e5c9f7858584049b6093f843bca541f94120920/numpy-2.2.6-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:8fc377d995680230e83241d8a96def29f204b5782f371c532579b4f20607a289", size = 18614185, upload-time = "2025-05-17T21:30:18.703Z" }, - { url = "https://files.pythonhosted.org/packages/5b/c5/0064b1b7e7c89137b471ccec1fd2282fceaae0ab3a9550f2568782d80357/numpy-2.2.6-cp310-cp310-win32.whl", hash = "sha256:b093dd74e50a8cba3e873868d9e93a85b78e0daf2e98c6797566ad8044e8363d", size = 6527149, upload-time = "2025-05-17T21:30:29.788Z" }, - { url = "https://files.pythonhosted.org/packages/a3/dd/4b822569d6b96c39d1215dbae0582fd99954dcbcf0c1a13c61783feaca3f/numpy-2.2.6-cp310-cp310-win_amd64.whl", hash = "sha256:f0fd6321b839904e15c46e0d257fdd101dd7f530fe03fd6359c1ea63738703f3", size = 12904620, upload-time = "2025-05-17T21:30:48.994Z" }, - { url = "https://files.pythonhosted.org/packages/9e/3b/d94a75f4dbf1ef5d321523ecac21ef23a3cd2ac8b78ae2aac40873590229/numpy-2.2.6-pp310-pypy310_pp73-macosx_10_15_x86_64.whl", hash = "sha256:0b605b275d7bd0c640cad4e5d30fa701a8d59302e127e5f79138ad62762c3e3d", size = 21040391, upload-time = "2025-05-17T21:44:35.948Z" }, - { url = "https://files.pythonhosted.org/packages/17/f4/09b2fa1b58f0fb4f7c7963a1649c64c4d315752240377ed74d9cd878f7b5/numpy-2.2.6-pp310-pypy310_pp73-macosx_14_0_x86_64.whl", hash = "sha256:7befc596a7dc9da8a337f79802ee8adb30a552a94f792b9c9d18c840055907db", size = 6786754, upload-time = "2025-05-17T21:44:47.446Z" }, - { url = "https://files.pythonhosted.org/packages/af/30/feba75f143bdc868a1cc3f44ccfa6c4b9ec522b36458e738cd00f67b573f/numpy-2.2.6-pp310-pypy310_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:ce47521a4754c8f4593837384bd3424880629f718d87c5d44f8ed763edd63543", size = 16643476, upload-time = "2025-05-17T21:45:11.871Z" }, - { url = "https://files.pythonhosted.org/packages/37/48/ac2a9584402fb6c0cd5b5d1a91dcf176b15760130dd386bbafdbfe3640bf/numpy-2.2.6-pp310-pypy310_pp73-win_amd64.whl", hash = "sha256:d042d24c90c41b54fd506da306759e06e568864df8ec17ccc17e9e884634fd00", size = 12812666, upload-time = "2025-05-17T21:45:31.426Z" }, -] - -[[package]] -name = "packaging" -version = "26.3" -source = { registry = "https://pypi.org/simple" } -sdist = { url = "https://files.pythonhosted.org/packages/7d/fa/3944b40b07da9ce895c0e6303a5ab7d53da063554f534556b134a54d6093/packaging-26.3.tar.gz", hash = "sha256:94edc256424af38762eb31306eed28beb9f0efc50a8837492c9d6fd6004aed79", size = 313412, upload-time = "2026-08-04T18:15:28.737Z" } -wheels = [ - { url = "https://files.pythonhosted.org/packages/63/34/ba1c580383c9eada3711951fef0795c80b829a078d72188184bcab9dd527/packaging-26.3-py3-none-any.whl", hash = "sha256:d7193f7c8e4e93f444fde0262bf90af30e16fa0ad0ad44cb553c87339b23cd1c", size = 129956, upload-time = "2026-08-04T18:15:27.159Z" }, -] - -[[package]] -name = "pandas" -version = "2.3.3" -source = { registry = "https://pypi.org/simple" } -dependencies = [ - { name = "numpy" }, - { name = "python-dateutil" }, - { name = "pytz" }, - { name = "tzdata" }, -] -sdist = { url = "https://files.pythonhosted.org/packages/33/01/d40b85317f86cf08d853a4f495195c73815fdf205eef3993821720274518/pandas-2.3.3.tar.gz", hash = "sha256:e05e1af93b977f7eafa636d043f9f94c7ee3ac81af99c13508215942e64c993b", size = 4495223, upload-time = "2025-09-29T23:34:51.853Z" } -wheels = [ - { url = "https://files.pythonhosted.org/packages/3d/f7/f425a00df4fcc22b292c6895c6831c0c8ae1d9fac1e024d16f98a9ce8749/pandas-2.3.3-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:376c6446ae31770764215a6c937f72d917f214b43560603cd60da6408f183b6c", size = 11555763, upload-time = "2025-09-29T23:16:53.287Z" }, - { url = "https://files.pythonhosted.org/packages/13/4f/66d99628ff8ce7857aca52fed8f0066ce209f96be2fede6cef9f84e8d04f/pandas-2.3.3-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:e19d192383eab2f4ceb30b412b22ea30690c9e618f78870357ae1d682912015a", size = 10801217, upload-time = "2025-09-29T23:17:04.522Z" }, - { url = "https://files.pythonhosted.org/packages/1d/03/3fc4a529a7710f890a239cc496fc6d50ad4a0995657dccc1d64695adb9f4/pandas-2.3.3-cp310-cp310-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:5caf26f64126b6c7aec964f74266f435afef1c1b13da3b0636c7518a1fa3e2b1", size = 12148791, upload-time = "2025-09-29T23:17:18.444Z" }, - { url = "https://files.pythonhosted.org/packages/40/a8/4dac1f8f8235e5d25b9955d02ff6f29396191d4e665d71122c3722ca83c5/pandas-2.3.3-cp310-cp310-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:dd7478f1463441ae4ca7308a70e90b33470fa593429f9d4c578dd00d1fa78838", size = 12769373, upload-time = "2025-09-29T23:17:35.846Z" }, - { url = "https://files.pythonhosted.org/packages/df/91/82cc5169b6b25440a7fc0ef3a694582418d875c8e3ebf796a6d6470aa578/pandas-2.3.3-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:4793891684806ae50d1288c9bae9330293ab4e083ccd1c5e383c34549c6e4250", size = 13200444, upload-time = "2025-09-29T23:17:49.341Z" }, - { url = "https://files.pythonhosted.org/packages/10/ae/89b3283800ab58f7af2952704078555fa60c807fff764395bb57ea0b0dbd/pandas-2.3.3-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:28083c648d9a99a5dd035ec125d42439c6c1c525098c58af0fc38dd1a7a1b3d4", size = 13858459, upload-time = "2025-09-29T23:18:03.722Z" }, - { url = "https://files.pythonhosted.org/packages/85/72/530900610650f54a35a19476eca5104f38555afccda1aa11a92ee14cb21d/pandas-2.3.3-cp310-cp310-win_amd64.whl", hash = "sha256:503cf027cf9940d2ceaa1a93cfb5f8c8c7e6e90720a2850378f0b3f3b1e06826", size = 11346086, upload-time = "2025-09-29T23:18:18.505Z" }, -] - -[[package]] -name = "parso" -version = "0.8.7" -source = { registry = "https://pypi.org/simple" } -sdist = { url = "https://files.pythonhosted.org/packages/30/4b/90c937815137d43ce71ba043cd3566221e9df6b9c805f24b5d138c9d40a7/parso-0.8.7.tar.gz", hash = "sha256:eaaac4c9fdd5e9e8852dc778d2d7405897ec510f2a298071453e5e3a07914bb1", size = 401824, upload-time = "2026-05-01T23:13:02.138Z" } -wheels = [ - { url = "https://files.pythonhosted.org/packages/99/5d/8268b644392ee874ee82a635cd0df1773de230bde356c38de28e298392cc/parso-0.8.7-py2.py3-none-any.whl", hash = "sha256:a8926eb2a1b915486941fdbd31e86a4baf88fe8c210f25f2f35ecec5b574ca1c", size = 107025, upload-time = "2026-05-01T23:12:58.867Z" }, -] - -[[package]] -name = "pathspec" -version = "1.1.1" -source = { registry = "https://pypi.org/simple" } -sdist = { url = "https://files.pythonhosted.org/packages/5a/82/42f767fc1c1143d6fd36efb827202a2d997a375e160a71eb2888a925aac1/pathspec-1.1.1.tar.gz", hash = "sha256:17db5ecd524104a120e173814c90367a96a98d07c45b2e10c2f3919fff91bf5a", size = 135180, upload-time = "2026-04-27T01:46:08.907Z" } -wheels = [ - { url = "https://files.pythonhosted.org/packages/f1/d9/7fb5aa316bc299258e68c73ba3bddbc499654a07f151cba08f6153988714/pathspec-1.1.1-py3-none-any.whl", hash = "sha256:a00ce642f577bf7f473932318056212bc4f8bfdf53128c78bbd5af0b9b20b189", size = 57328, upload-time = "2026-04-27T01:46:07.06Z" }, -] - -[[package]] -name = "pexpect" -version = "4.9.0" -source = { registry = "https://pypi.org/simple" } -dependencies = [ - { name = "ptyprocess" }, -] -sdist = { url = "https://files.pythonhosted.org/packages/42/92/cc564bf6381ff43ce1f4d06852fc19a2f11d180f23dc32d9588bee2f149d/pexpect-4.9.0.tar.gz", hash = "sha256:ee7d41123f3c9911050ea2c2dac107568dc43b2d3b0c7557a33212c398ead30f", size = 166450, upload-time = "2023-11-25T09:07:26.339Z" } -wheels = [ - { url = "https://files.pythonhosted.org/packages/9e/c3/059298687310d527a58bb01f3b1965787ee3b40dce76752eda8b44e9a2c5/pexpect-4.9.0-py2.py3-none-any.whl", hash = "sha256:7236d1e080e4936be2dc3e326cec0af72acf9212a7e1d060210e70a47e253523", size = 63772, upload-time = "2023-11-25T06:56:14.81Z" }, -] - -[[package]] -name = "pillow" -version = "12.3.0" -source = { registry = "https://pypi.org/simple" } -sdist = { url = "https://files.pythonhosted.org/packages/1c/3d/bb7fca845737cf9d7dbde16ed1843984665ff2e0a518f5db43e77ec540b9/pillow-12.3.0.tar.gz", hash = "sha256:3b8182a766685eaa002637e28b4ec8d6b18819a0c71f579bf0dbaa5830297cce", size = 47025035, upload-time = "2026-07-01T11:56:38.965Z" } -wheels = [ - { url = "https://files.pythonhosted.org/packages/25/c2/669d88644cddb1485bd9534e63e8cf476c8e51cb3c3a1297677023505c0e/pillow-12.3.0-cp310-cp310-macosx_10_10_x86_64.whl", hash = "sha256:6c0016e7b354317c4e9e525b937ac8596c38d2d232b419529b9cd7a1cd46e39a", size = 5392418, upload-time = "2026-07-01T11:53:27.808Z" }, - { url = "https://files.pythonhosted.org/packages/6b/ba/3762f376a2948e3036488d773a146e0ae6ecc2ca03ac20e2615bd0b2ba02/pillow-12.3.0-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:bcc33feacfaefce60c12fd500a277533bdc02b10a19f7f6d348763d8140bbba7", size = 4785287, upload-time = "2026-07-01T11:53:29.761Z" }, - { url = "https://files.pythonhosted.org/packages/07/50/b5d688cc9c52d4482f3d5bcab6ce20bc2a74a85d2343841c907444a3be2c/pillow-12.3.0-cp310-cp310-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:5594fc43d548a7ed94949d139aa1341b270f1863f11cfd37f5a6c8b778a6b67f", size = 6253754, upload-time = "2026-07-01T11:53:32.298Z" }, - { url = "https://files.pythonhosted.org/packages/4e/89/36f4cd76cf4baf05c50ababb976249153f18c959171c7f6ba09a6f217260/pillow-12.3.0-cp310-cp310-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:f0606c8bf2cdefea14a43530f7657cbbb7ecf1c4222512492ef4a4434a9501ec", size = 6925605, upload-time = "2026-07-01T11:53:34.487Z" }, - { url = "https://files.pythonhosted.org/packages/eb/c0/4de58cf6633b9e3a6061ef4be6fb91fc3c90b812ece886f531e3c523d777/pillow-12.3.0-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:85f998ea1848bc6757289e739cfbdda3a04adfd58b02fc018ce54d754a5ce468", size = 6327788, upload-time = "2026-07-01T11:53:36.433Z" }, - { url = "https://files.pythonhosted.org/packages/87/3c/14d53682a19550dbbaf3b598f807d5457646c510805a44c7d7891cd1cd1a/pillow-12.3.0-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:25b9b82bb22e6e2b3cd07b39c68b7b862001226cb3dff7130d1cb914121b39ed", size = 7036288, upload-time = "2026-07-01T11:53:38.712Z" }, - { url = "https://files.pythonhosted.org/packages/38/1d/36279e3c77efe034e4cc2b0393ee74ffdb5a62391dacbf9b916154f5f0b8/pillow-12.3.0-cp310-cp310-win32.whl", hash = "sha256:37dc8f7bbb66efe481bb60defacef820c950c24713fb44962ed6aa2a50966de1", size = 6472396, upload-time = "2026-07-01T11:53:40.781Z" }, - { url = "https://files.pythonhosted.org/packages/48/7c/8fa0039574c476d7c6fa57dd7c32a130436877c6ec1e5ce1cc8ec44878c1/pillow-12.3.0-cp310-cp310-win_amd64.whl", hash = "sha256:300557495eb45ebb8aec96c2da9c4be642fbf7cd937278b4013ba894ea8eb0eb", size = 7226887, upload-time = "2026-07-01T11:53:42.764Z" }, - { url = "https://files.pythonhosted.org/packages/fa/17/e324be141d173c1c919428066c3259f21c1b8982e564e01a4a81e96dbdcf/pillow-12.3.0-cp310-cp310-win_arm64.whl", hash = "sha256:514435a37670e3e5e08f3945b68718b6ed329bb84367777e16f9f4dfe1e61a0f", size = 2568039, upload-time = "2026-07-01T11:53:45.372Z" }, -] - -[[package]] -name = "platformdirs" -version = "4.12.4" -source = { registry = "https://pypi.org/simple" } -sdist = { url = "https://files.pythonhosted.org/packages/90/a1/d5f9002a70298c64a789779077d8dd90c10aa1f47fe40c86802df874f2a6/platformdirs-4.12.4.tar.gz", hash = "sha256:63743c02414e755de4e31b8f68125c1407495b86c5a006e203c01ff8b9924250", size = 60010, upload-time = "2026-10-07T23:30:32.426Z" } -wheels = [ - { url = "https://files.pythonhosted.org/packages/f4/ba/223e00b885e960edd5d4b4d178c88acce019bd5b83786093681b8c393492/platformdirs-4.12.4-py3-none-any.whl", hash = "sha256:78bfb9db2a8471ed7eebe3c3c932da413911042994e699b384fbb4493fa872d7", size = 32596, upload-time = "2026-10-07T23:30:30.825Z" }, -] - -[[package]] -name = "plotly" -version = "7.1.0" -source = { registry = "https://pypi.org/simple" } -dependencies = [ - { name = "narwhals" }, - { name = "packaging" }, -] -sdist = { url = "https://files.pythonhosted.org/packages/49/c3/72b369f5ed7701b04ab0ea3dcf83e9bbce71c0b3bc6f07f87568550d09ea/plotly-7.1.0.tar.gz", hash = "sha256:f860166a4a3d78c69cb1f4a15f28a5c8283eade98a282a698f3bb853a449ace5", size = 6689315, upload-time = "2026-09-15T19:21:21.75Z" } -wheels = [ - { url = "https://files.pythonhosted.org/packages/e5/7d/905a3a3d51087515719058c94cfbda2ff0fc14417c20d557ae3e82d8b250/plotly-7.1.0-py3-none-any.whl", hash = "sha256:dbb7fa18afce40d0a8e80d1bf162eceb3faa0ce5a77fe741ad09a74cf78f53f3", size = 9692368, upload-time = "2026-09-15T19:21:18.331Z" }, -] - -[[package]] -name = "pluggy" -version = "1.6.0" -source = { registry = "https://pypi.org/simple" } -sdist = { url = "https://files.pythonhosted.org/packages/f9/e2/3e91f31a7d2b083fe6ef3fa267035b518369d9511ffab804f839851d2779/pluggy-1.6.0.tar.gz", hash = "sha256:7dcc130b76258d33b90f61b658791dede3486c3e6bfb003ee5c9bfb396dd22f3", size = 69412, upload-time = "2025-05-15T12:30:07.975Z" } -wheels = [ - { url = "https://files.pythonhosted.org/packages/54/20/4d324d65cc6d9205fabedc306948156824eb9f0ee1633355a8f7ec5c66bf/pluggy-1.6.0-py3-none-any.whl", hash = "sha256:e920276dd6813095e9377c0bc5566d94c932c33b27a3e3945d8389c374dd4746", size = 20538, upload-time = "2025-05-15T12:30:06.134Z" }, -] - -[[package]] -name = "pockets" -version = "0.9.1" -source = { registry = "https://pypi.org/simple" } -dependencies = [ - { name = "six" }, -] -sdist = { url = "https://files.pythonhosted.org/packages/df/8e/0601097cfcce2e8c2297db5080e9719f549c2bd4b94420ddc8d3f848bbca/pockets-0.9.1.tar.gz", hash = "sha256:9320f1a3c6f7a9133fe3b571f283bcf3353cd70249025ae8d618e40e9f7e92b3", size = 24993, upload-time = "2019-11-02T14:46:19.433Z" } -wheels = [ - { url = "https://files.pythonhosted.org/packages/e9/2f/a4583c70fbd8cd04910e2884bcc2bdd670e884061f7b4d70bc13e632a993/pockets-0.9.1-py2.py3-none-any.whl", hash = "sha256:68597934193c08a08eb2bf6a1d85593f627c22f9b065cc727a4f03f669d96d86", size = 26263, upload-time = "2019-11-02T14:46:17.814Z" }, -] - -[[package]] -name = "prompt-toolkit" -version = "3.0.53" -source = { registry = "https://pypi.org/simple" } -dependencies = [ - { name = "wcwidth" }, -] -sdist = { url = "https://files.pythonhosted.org/packages/7d/ea/39b988c938f75cb75d7045b5c69f8bfed47ee2152c8837fb403de29d6fb8/prompt_toolkit-3.0.53.tar.gz", hash = "sha256:9ec8a0ad96d5c56148b3f914aa79c1564c3fde5d2e6b876e7bc327e353cf8fa6", size = 435492, upload-time = "2026-07-26T20:56:14.758Z" } -wheels = [ - { url = "https://files.pythonhosted.org/packages/54/6f/84908cad2d6aa5144abcf7b42709fe4fdb459bc640ec7ac5786e7693dabc/prompt_toolkit-3.0.53-py3-none-any.whl", hash = "sha256:01c0891d7f9237d5e339f7d3e42cdae80b7534abb1c7c0e3352efba6231492f2", size = 392288, upload-time = "2026-07-26T20:56:12.512Z" }, -] - -[[package]] -name = "psutil" -version = "7.2.2" -source = { registry = "https://pypi.org/simple" } -sdist = { url = "https://files.pythonhosted.org/packages/aa/c6/d1ddf4abb55e93cebc4f2ed8b5d6dbad109ecb8d63748dd2b20ab5e57ebe/psutil-7.2.2.tar.gz", hash = "sha256:0746f5f8d406af344fd547f1c8daa5f5c33dbc293bb8d6a16d80b4bb88f59372", size = 493740, upload-time = "2026-01-28T18:14:54.428Z" } -wheels = [ - { url = "https://files.pythonhosted.org/packages/e7/36/5ee6e05c9bd427237b11b3937ad82bb8ad2752d72c6969314590dd0c2f6e/psutil-7.2.2-cp36-abi3-macosx_10_9_x86_64.whl", hash = "sha256:ed0cace939114f62738d808fdcecd4c869222507e266e574799e9c0faa17d486", size = 129090, upload-time = "2026-01-28T18:15:22.168Z" }, - { url = "https://files.pythonhosted.org/packages/80/c4/f5af4c1ca8c1eeb2e92ccca14ce8effdeec651d5ab6053c589b074eda6e1/psutil-7.2.2-cp36-abi3-macosx_11_0_arm64.whl", hash = "sha256:1a7b04c10f32cc88ab39cbf606e117fd74721c831c98a27dc04578deb0c16979", size = 129859, upload-time = "2026-01-28T18:15:23.795Z" }, - { url = "https://files.pythonhosted.org/packages/b5/70/5d8df3b09e25bce090399cf48e452d25c935ab72dad19406c77f4e828045/psutil-7.2.2-cp36-abi3-manylinux2010_x86_64.manylinux_2_12_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:076a2d2f923fd4821644f5ba89f059523da90dc9014e85f8e45a5774ca5bc6f9", size = 155560, upload-time = "2026-01-28T18:15:25.976Z" }, - { url = "https://files.pythonhosted.org/packages/63/65/37648c0c158dc222aba51c089eb3bdfa238e621674dc42d48706e639204f/psutil-7.2.2-cp36-abi3-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:b0726cecd84f9474419d67252add4ac0cd9811b04d61123054b9fb6f57df6e9e", size = 156997, upload-time = "2026-01-28T18:15:27.794Z" }, - { url = "https://files.pythonhosted.org/packages/8e/13/125093eadae863ce03c6ffdbae9929430d116a246ef69866dad94da3bfbc/psutil-7.2.2-cp36-abi3-musllinux_1_2_aarch64.whl", hash = "sha256:fd04ef36b4a6d599bbdb225dd1d3f51e00105f6d48a28f006da7f9822f2606d8", size = 148972, upload-time = "2026-01-28T18:15:29.342Z" }, - { url = "https://files.pythonhosted.org/packages/04/78/0acd37ca84ce3ddffaa92ef0f571e073faa6d8ff1f0559ab1272188ea2be/psutil-7.2.2-cp36-abi3-musllinux_1_2_x86_64.whl", hash = "sha256:b58fabe35e80b264a4e3bb23e6b96f9e45a3df7fb7eed419ac0e5947c61e47cc", size = 148266, upload-time = "2026-01-28T18:15:31.597Z" }, - { url = "https://files.pythonhosted.org/packages/b4/90/e2159492b5426be0c1fef7acba807a03511f97c5f86b3caeda6ad92351a7/psutil-7.2.2-cp37-abi3-win_amd64.whl", hash = "sha256:eb7e81434c8d223ec4a219b5fc1c47d0417b12be7ea866e24fb5ad6e84b3d988", size = 137737, upload-time = "2026-01-28T18:15:33.849Z" }, - { url = "https://files.pythonhosted.org/packages/8c/c7/7bb2e321574b10df20cbde462a94e2b71d05f9bbda251ef27d104668306a/psutil-7.2.2-cp37-abi3-win_arm64.whl", hash = "sha256:8c233660f575a5a89e6d4cb65d9f938126312bca76d8fe087b947b3a1aaac9ee", size = 134617, upload-time = "2026-01-28T18:15:36.514Z" }, -] - -[[package]] -name = "ptyprocess" -version = "0.7.0" -source = { registry = "https://pypi.org/simple" } -sdist = { url = "https://files.pythonhosted.org/packages/20/e5/16ff212c1e452235a90aeb09066144d0c5a6a8c0834397e03f5224495c4e/ptyprocess-0.7.0.tar.gz", hash = "sha256:5c5d0a3b48ceee0b48485e0c26037c0acd7d29765ca3fbb5cb3831d347423220", size = 70762, upload-time = "2020-12-28T15:15:30.155Z" } -wheels = [ - { url = "https://files.pythonhosted.org/packages/22/a6/858897256d0deac81a172289110f31629fc4cee19b6f01283303e18c8db3/ptyprocess-0.7.0-py2.py3-none-any.whl", hash = "sha256:4b41f3967fce3af57cc7e94b888626c18bf37a083e3651ca8feeb66d492fef35", size = 13993, upload-time = "2020-12-28T15:15:28.35Z" }, -] - -[[package]] -name = "pure-eval" -version = "0.2.4" -source = { registry = "https://pypi.org/simple" } -sdist = { url = "https://files.pythonhosted.org/packages/da/9f/abfd2959e9261dd5217ca8551d4de211ca6ab26fe9b72cf44731ff6c4442/pure_eval-0.2.4.tar.gz", hash = "sha256:260c2774686e651b79f8b8e7fc9d80b3599ea6a66334b47d5f4abb69fc2c0ea1", size = 20563, upload-time = "2026-09-10T21:41:22.836Z" } -wheels = [ - { url = "https://files.pythonhosted.org/packages/6d/18/83376915176eb058cb86470eb7396388a13350b09a8f233a79303bbcbc5b/pure_eval-0.2.4-py3-none-any.whl", hash = "sha256:96cae060a313cfaad51bb761278bfb0e62dc0248d9315a81173752dc546cd37a", size = 11893, upload-time = "2026-09-10T21:41:21.532Z" }, -] - -[[package]] -name = "py" -version = "1.11.0" -source = { registry = "https://pypi.org/simple" } -sdist = { url = "https://files.pythonhosted.org/packages/98/ff/fec109ceb715d2a6b4c4a85a61af3b40c723a961e8828319fbcb15b868dc/py-1.11.0.tar.gz", hash = "sha256:51c75c4126074b472f746a24399ad32f6053d1b34b68d2fa41e558e6f4a98719", size = 207796, upload-time = "2021-11-04T17:17:01.377Z" } -wheels = [ - { url = "https://files.pythonhosted.org/packages/f6/f0/10642828a8dfb741e5f3fbaac830550a518a775c7fff6f04a007259b0548/py-1.11.0-py2.py3-none-any.whl", hash = "sha256:607c53218732647dff4acdfcd50cb62615cedf612e72d1724fb1a0cc6405b378", size = 98708, upload-time = "2021-11-04T17:17:00.152Z" }, -] - -[[package]] -name = "py-cpuinfo2" -version = "10.1.1" -source = { registry = "https://pypi.org/simple" } -sdist = { url = "https://files.pythonhosted.org/packages/dc/97/a8b1ddada14c8280a047c0746f95cb05d94a31b1a331cea22bcdc2b2a82d/py_cpuinfo2-10.1.1.tar.gz", hash = "sha256:7861133863663f16e06eca63b12904ef100b5760415e92372dac0162799a4771", size = 100840, upload-time = "2026-03-25T21:49:40.797Z" } -wheels = [ - { url = "https://files.pythonhosted.org/packages/23/0a/ba69d2dde1ae12ef1d389ea5a216384c5ff6ef7a1e7a48d1e9b6686f6790/py_cpuinfo2-10.1.1-py3-none-any.whl", hash = "sha256:adc53396bfb206e6498d078ec2ab407f85799ecd819584ac36a8f80a2d4d762d", size = 23791, upload-time = "2026-03-25T21:49:39.574Z" }, -] - -[[package]] -name = "pycparser" -version = "3.11" -source = { registry = "https://pypi.org/simple" } -sdist = { url = "https://files.pythonhosted.org/packages/da/a8/c5fdbeee588bb8ada9458774f43adf1bdd30bd59157055142183e769a024/pycparser-3.11.tar.gz", hash = "sha256:d875f09c3507d00e1aba0eecc6dcadc1352f30fff09dc6bff2f1c2935e97c2bc", size = 113796, upload-time = "2026-10-09T12:56:59.539Z" } -wheels = [ - { url = "https://files.pythonhosted.org/packages/90/11/0e6f11117525ff0eec40ebac3d313376f102df93ca44ad9e893ee85e4f89/pycparser-3.11-py3-none-any.whl", hash = "sha256:51d5a8ba2be0bbe440b99d2112604c95bbbc3c2748a64260186c541e1729cd80", size = 51178, upload-time = "2026-10-09T12:56:58.131Z" }, -] - -[[package]] -name = "pydata-sphinx-theme" -version = "0.19.0" -source = { registry = "https://pypi.org/simple" } -dependencies = [ - { name = "accessible-pygments" }, - { name = "babel" }, - { name = "beautifulsoup4" }, - { name = "docutils" }, - { name = "pygments" }, - { name = "sphinx" }, - { name = "typing-extensions" }, -] -sdist = { url = "https://files.pythonhosted.org/packages/39/7e/e3defb93f30557ae825a3b3fbc2c6728301e5e9505a85e00d8503345c42c/pydata_sphinx_theme-0.19.0.tar.gz", hash = "sha256:148ba092bd6937b3321385dc482cc69a29ad2ede36547b4f010ade782bc6a062", size = 5004933, upload-time = "2026-06-15T09:31:02.268Z" } -wheels = [ - { url = "https://files.pythonhosted.org/packages/54/77/bdb5a4c0e8e33c08f31fd175a5af0bc5e29f1b43ffa9e963f4c4f9bfbc97/pydata_sphinx_theme-0.19.0-py3-none-any.whl", hash = "sha256:5d7dfe3beb0facc88b5d78ff4a4c948f214cc0e03aae27e7fc58286e963b588b", size = 6201132, upload-time = "2026-06-15T09:30:59.966Z" }, -] - -[[package]] -name = "pydocstyle" -version = "6.3.0" -source = { registry = "https://pypi.org/simple" } -dependencies = [ - { name = "snowballstemmer" }, -] -sdist = { url = "https://files.pythonhosted.org/packages/e9/5c/d5385ca59fd065e3c6a5fe19f9bc9d5ea7f2509fa8c9c22fb6b2031dd953/pydocstyle-6.3.0.tar.gz", hash = "sha256:7ce43f0c0ac87b07494eb9c0b462c0b73e6ff276807f204d6b53edc72b7e44e1", size = 36796, upload-time = "2023-01-17T20:29:19.838Z" } -wheels = [ - { url = "https://files.pythonhosted.org/packages/36/ea/99ddefac41971acad68f14114f38261c1f27dac0b3ec529824ebc739bdaa/pydocstyle-6.3.0-py3-none-any.whl", hash = "sha256:118762d452a49d6b05e194ef344a55822987a462831ade91ec5c06fd2169d019", size = 38038, upload-time = "2023-01-17T20:29:18.094Z" }, -] - -[[package]] -name = "pygments" -version = "2.21.0" -source = { registry = "https://pypi.org/simple" } -sdist = { url = "https://files.pythonhosted.org/packages/49/2e/ced460408999b33da6b31b0021b0f37d329e202d4169aeb164493778f25b/pygments-2.21.0.tar.gz", hash = "sha256:610ca751c9bc2492b38eb9a38a7fbc93edbbb2d7182edaf34e66ae493dee5c8c", size = 5005329, upload-time = "2026-08-17T08:02:48.824Z" } -wheels = [ - { url = "https://files.pythonhosted.org/packages/71/46/17f022dd3e953bf20a04a028a21ec746d942f8d2af30fa0f124fa0e6a684/pygments-2.21.0-py3-none-any.whl", hash = "sha256:2363c69b61c4a97c838da3b130dcd6468f4848992b21a82f2a63ec34377137d9", size = 1250147, upload-time = "2026-08-17T08:02:44.912Z" }, -] - -[[package]] -name = "pylint" -version = "4.1.3" -source = { registry = "https://pypi.org/simple" } -dependencies = [ - { name = "astroid" }, - { name = "colorama", marker = "sys_platform == 'win32'" }, - { name = "dill" }, - { name = "isort" }, - { name = "mccabe" }, - { name = "platformdirs" }, - { name = "tomli" }, - { name = "tomlkit" }, -] -sdist = { url = "https://files.pythonhosted.org/packages/38/c9/0bde4152a05a7686b431ce216fe3f3698b0c0d94c20bfa256dd935b608f6/pylint-4.1.3.tar.gz", hash = "sha256:9928603068edfa0d1a3c167f174b099d4b97c3db75d32d0fcdd029770b4713a9", size = 1756180, upload-time = "2026-10-11T07:49:10.69Z" } -wheels = [ - { url = "https://files.pythonhosted.org/packages/3f/ba/62b18e2e157d05f976bd490b349b55d8850c2a454a5c313c91af9d2e0baf/pylint-4.1.3-py3-none-any.whl", hash = "sha256:a85357cae24f33ad8d86c8f3daaa92c600ae4012b54a57299cee76000e9364cf", size = 588959, upload-time = "2026-10-11T07:49:08.272Z" }, -] - -[[package]] -name = "pyparsing" -version = "3.3.3" -source = { registry = "https://pypi.org/simple" } -sdist = { url = "https://files.pythonhosted.org/packages/e4/11/b213bebff182584360cb8d17c72c1677fec5c5c228de439e63bcf8ab1c8f/pyparsing-3.3.3.tar.gz", hash = "sha256:928ae7e20211f3b6f3915a72f06a0cfd29ab9d24279dd6346b6b1a7146397d36", size = 1050487, upload-time = "2026-09-20T20:59:05.609Z" } -wheels = [ - { url = "https://files.pythonhosted.org/packages/38/bb/d215ee7c73b61497b28a5503f9f53523f294fcc936762b7caf90e0c1c2b5/pyparsing-3.3.3-py3-none-any.whl", hash = "sha256:ece8c00a69cf01b45d0b1dedabb469c90d8caf996d4fda40f147627a122849a4", size = 126420, upload-time = "2026-09-20T20:59:04.025Z" }, -] - -[[package]] -name = "pytest" -version = "9.1.1" -source = { registry = "https://pypi.org/simple" } -dependencies = [ - { name = "colorama", marker = "sys_platform == 'win32'" }, - { name = "exceptiongroup" }, - { name = "iniconfig" }, - { name = "packaging" }, - { name = "pluggy" }, - { name = "pygments" }, - { name = "tomli" }, -] -sdist = { url = "https://files.pythonhosted.org/packages/e4/47/b9efed96c114afcfa3c9d3fe98a76a1d14c74a9e266d397cf6eb64be5e01/pytest-9.1.1.tar.gz", hash = "sha256:1088fbde8f2b49d95a549a195707afa7a76a3ce9bcadc26b6d71f0ffda5fe313", size = 1636369, upload-time = "2026-06-19T10:58:32.857Z" } -wheels = [ - { url = "https://files.pythonhosted.org/packages/24/25/1de2678b631f5a49215c6c96fff41ba892b0a34df68d6d80292b1b48aa7f/pytest-9.1.1-py3-none-any.whl", hash = "sha256:37a86b45efb9a47a61a36449063e8e18d0cab3161329fc099eb21783169c4f0c", size = 386536, upload-time = "2026-06-19T10:58:31.347Z" }, -] - -[[package]] -name = "pytest-benchmark" -version = "5.3.0" -source = { registry = "https://pypi.org/simple" } -dependencies = [ - { name = "py-cpuinfo2" }, - { name = "pytest" }, -] -sdist = { url = "https://files.pythonhosted.org/packages/63/8f/83a15e40dbc34a580ee56eb56983cae5394c6e94d50cf28fe268e457be25/pytest_benchmark-5.3.0.tar.gz", hash = "sha256:358444d4e89be901ee2b6404fb043ac3d7684002ad7f3563cc153fca6339c965", size = 375410, upload-time = "2026-08-23T17:45:08.891Z" } -wheels = [ - { url = "https://files.pythonhosted.org/packages/eb/42/7e80f7cfa191e0a766d1de99b4661847415ad5db34f8209d81fd42175b59/pytest_benchmark-5.3.0-py3-none-any.whl", hash = "sha256:920ab1dfcffa718d49aa15ba144c7e357bda59216a0dc308016cc1c7236f719d", size = 48401, upload-time = "2026-08-23T17:45:07.094Z" }, -] - -[[package]] -name = "pytest-cov" -version = "7.1.0" -source = { registry = "https://pypi.org/simple" } -dependencies = [ - { name = "coverage", extra = ["toml"] }, - { name = "pluggy" }, - { name = "pytest" }, -] -sdist = { url = "https://files.pythonhosted.org/packages/b1/51/a849f96e117386044471c8ec2bd6cfebacda285da9525c9106aeb28da671/pytest_cov-7.1.0.tar.gz", hash = "sha256:30674f2b5f6351aa09702a9c8c364f6a01c27aae0c1366ae8016160d1efc56b2", size = 55592, upload-time = "2026-03-21T20:11:16.284Z" } -wheels = [ - { url = "https://files.pythonhosted.org/packages/9d/7a/d968e294073affff457b041c2be9868a40c1c71f4a35fcc1e45e5493067b/pytest_cov-7.1.0-py3-none-any.whl", hash = "sha256:a0461110b7865f9a271aa1b51e516c9a95de9d696734a2f71e3e78f46e1d4678", size = 22876, upload-time = "2026-03-21T20:11:14.438Z" }, -] - -[[package]] -name = "pytest-dependency" -version = "0.6.1" -source = { registry = "https://pypi.org/simple" } -dependencies = [ - { name = "pytest" }, - { name = "setuptools" }, -] -sdist = { url = "https://files.pythonhosted.org/packages/c2/ea/84509533e0f6477960b8a9179d240d93c909c6543e4dd8209932026d7815/pytest_dependency-0.6.1.tar.gz", hash = "sha256:246c24d2a5fc743a942cec4408853640e56a05ba58d46e5b213a1d4b738a2464", size = 20837, upload-time = "2026-02-15T18:08:43.927Z" } - -[[package]] -name = "pytest-xdist" -version = "3.8.0" -source = { registry = "https://pypi.org/simple" } -dependencies = [ - { name = "execnet" }, - { name = "pytest" }, -] -sdist = { url = "https://files.pythonhosted.org/packages/78/b4/439b179d1ff526791eb921115fca8e44e596a13efeda518b9d845a619450/pytest_xdist-3.8.0.tar.gz", hash = "sha256:7e578125ec9bc6050861aa93f2d59f1d8d085595d6551c2c90b6f4fad8d3a9f1", size = 88069, upload-time = "2025-07-01T13:30:59.346Z" } -wheels = [ - { url = "https://files.pythonhosted.org/packages/ca/31/d4e37e9e550c2b92a9cbc2e4d0b7420a27224968580b5a447f420847c975/pytest_xdist-3.8.0-py3-none-any.whl", hash = "sha256:202ca578cfeb7370784a8c33d6d05bc6e13b4f25b5053c30a152269fd10f0b88", size = 46396, upload-time = "2025-07-01T13:30:56.632Z" }, -] - -[[package]] -name = "python-dateutil" -version = "2.9.0.post0" -source = { registry = "https://pypi.org/simple" } -dependencies = [ - { name = "six" }, -] -sdist = { url = "https://files.pythonhosted.org/packages/66/c0/0c8b6ad9f17a802ee498c46e004a0eb49bc148f2fd230864601a86dcf6db/python-dateutil-2.9.0.post0.tar.gz", hash = "sha256:37dd54208da7e1cd875388217d5e00ebd4179249f90fb72437e91a35459a0ad3", size = 342432, upload-time = "2024-03-01T18:36:20.211Z" } -wheels = [ - { url = "https://files.pythonhosted.org/packages/ec/57/56b9bcc3c9c6a792fcbaf139543cee77261f3651ca9da0c93f5c1221264b/python_dateutil-2.9.0.post0-py2.py3-none-any.whl", hash = "sha256:a8b2bc7bffae282281c8140a97d3aa9c14da0b136dfe83f850eea9a5f7470427", size = 229892, upload-time = "2024-03-01T18:36:18.57Z" }, -] - -[[package]] -name = "python-toolkit" -version = "999.999.999" -source = { editable = "." } -dependencies = [ - { name = "matplotlib" }, - { name = "numpy" }, - { name = "pandas" }, - { name = "plotly" }, - { name = "pythonnet" }, - { name = "pytz" }, - { name = "pywin32", marker = "sys_platform == 'win32'" }, -] - -[package.dev-dependencies] -dev = [ - { name = "flask" }, - { name = "furo" }, - { name = "interrogate" }, - { name = "ipykernel" }, - { name = "line-profiler" }, - { name = "memory-profiler" }, - { name = "mypy" }, - { name = "pydata-sphinx-theme" }, - { name = "pydocstyle" }, - { name = "pylint" }, - { name = "pytest" }, - { name = "pytest-benchmark" }, - { name = "pytest-cov" }, - { name = "pytest-dependency" }, - { name = "pytest-xdist" }, - { name = "ruff" }, - { name = "sphinx" }, - { name = "sphinx-autoapi" }, - { name = "sphinx-bootstrap-theme" }, - { name = "sphinxcontrib-fulltoc" }, - { name = "sphinxcontrib-napoleon" }, -] - -[package.metadata] -requires-dist = [ - { name = "matplotlib" }, - { name = "numpy" }, - { name = "pandas" }, - { name = "plotly" }, - { name = "pythonnet" }, - { name = "pytz" }, - { name = "pywin32", marker = "sys_platform == 'win32'" }, -] - -[package.metadata.requires-dev] -dev = [ - { name = "flask" }, - { name = "furo" }, - { name = "interrogate" }, - { name = "ipykernel" }, - { name = "line-profiler" }, - { name = "memory-profiler" }, - { name = "mypy" }, - { name = "pydata-sphinx-theme" }, - { name = "pydocstyle" }, - { name = "pylint" }, - { name = "pytest" }, - { name = "pytest-benchmark" }, - { name = "pytest-cov" }, - { name = "pytest-dependency" }, - { name = "pytest-xdist" }, - { name = "ruff" }, - { name = "sphinx" }, - { name = "sphinx-autoapi" }, - { name = "sphinx-bootstrap-theme" }, - { name = "sphinxcontrib-fulltoc" }, - { name = "sphinxcontrib-napoleon" }, -] - -[[package]] -name = "pythonnet" -version = "3.1.0" -source = { registry = "https://pypi.org/simple" } -dependencies = [ - { name = "clr-loader" }, -] -sdist = { url = "https://files.pythonhosted.org/packages/05/57/da1992e44663b71365c6e842c8d7fa453d4ec45fb99a68cfee5b7e944d3c/pythonnet-3.1.0.tar.gz", hash = "sha256:7b34c382905d10a371509ffafd64cae0416305c28817738a9cd138336f4e9991", size = 250599, upload-time = "2026-05-23T20:30:21.578Z" } -wheels = [ - { url = "https://files.pythonhosted.org/packages/ac/4b/52414f442624d2589f5374a48c08d5ae94f24bea67fc13a20a752884e5b7/pythonnet-3.1.0-cp310.cp311.cp312.cp313.cp314-none-any.whl", hash = "sha256:698dd88edc198819ad63b624a6ebe76208c7b46e4fe13626f65e484f0358d6ba", size = 217578, upload-time = "2026-05-23T20:30:19.527Z" }, - { url = "https://files.pythonhosted.org/packages/db/67/031124fdcb937c266a3265118525bbf6dc13b8c79786d6a7290aecb6e7bb/pythonnet-3.1.0-cp310.cp311.cp312.cp313.cp314-none-win32.win_amd64.whl", hash = "sha256:7bdd4de03df3547a48122a3989265c8b31d5be0d19dadffa009eec7df8085e0b", size = 1644898, upload-time = "2026-05-23T20:30:16.213Z" }, -] - -[[package]] -name = "pytz" -version = "2026.5" -source = { registry = "https://pypi.org/simple" } -sdist = { url = "https://files.pythonhosted.org/packages/14/21/d83d6ef28c4c912c4bb4d1dcf591f7b8c6bde87b9c66f9f454677314e16d/pytz-2026.5.tar.gz", hash = "sha256:fa23724b9c486543b9ff54a327ee7569ac83ade54bb9afd0fc18676620401c86", size = 318572, upload-time = "2026-10-04T02:37:58.719Z" } -wheels = [ - { url = "https://files.pythonhosted.org/packages/4f/ef/c66110d46fb800dda0bf33164182dfadabe26a90e4476844d502a23dca8e/pytz-2026.5-py2.py3-none-any.whl", hash = "sha256:e658af3757f9e26a9d25dd2aff38335acd92bc9104f890a894b2c1ba28311b03", size = 506342, upload-time = "2026-10-04T02:37:56.814Z" }, -] - -[[package]] -name = "pywin32" -version = "312" -source = { registry = "https://pypi.org/simple" } -wheels = [ - { url = "https://files.pythonhosted.org/packages/fe/1b/9cfdeac80ee45bebbbcb31f1b7b99a0d81a1c72de48d837be984e0e88b1d/pywin32-312-cp310-cp310-win32.whl", hash = "sha256:772235332b5d1024c696f11cea1ae4be7930f0a8b894bb43db14e3f435f1ff7e", size = 6361387, upload-time = "2026-06-04T07:49:14.329Z" }, - { url = "https://files.pythonhosted.org/packages/33/b1/7afc96d041d982c27bc2df6f853d43f01fd273e3d39d04be3647ddeb533d/pywin32-312-cp310-cp310-win_amd64.whl", hash = "sha256:5dbc35d2b5320dc07f25fa31269cfb767471002b17de5eb067d03da68c7cb2db", size = 6926780, upload-time = "2026-06-04T07:49:16.881Z" }, - { url = "https://files.pythonhosted.org/packages/ce/3a/4140da9ad54108e517f4a16b2d83da3033e08662144623e1239587cb7db6/pywin32-312-cp310-cp310-win_arm64.whl", hash = "sha256:3020656e34f1cf7faeb7bccd2b84653a607c6ff0c55ada85e6487d61716deabd", size = 4307203, upload-time = "2026-06-04T07:49:18.993Z" }, -] - -[[package]] -name = "pyyaml" -version = "6.0.3" -source = { registry = "https://pypi.org/simple" } -sdist = { url = "https://files.pythonhosted.org/packages/05/8e/961c0007c59b8dd7729d542c61a4d537767a59645b82a0b521206e1e25c2/pyyaml-6.0.3.tar.gz", hash = "sha256:d76623373421df22fb4cf8817020cbb7ef15c725b9d5e45f17e189bfc384190f", size = 130960, upload-time = "2025-09-25T21:33:16.546Z" } -wheels = [ - { url = "https://files.pythonhosted.org/packages/f4/a0/39350dd17dd6d6c6507025c0e53aef67a9293a6d37d3511f23ea510d5800/pyyaml-6.0.3-cp310-cp310-macosx_10_13_x86_64.whl", hash = "sha256:214ed4befebe12df36bcc8bc2b64b396ca31be9304b8f59e25c11cf94a4c033b", size = 184227, upload-time = "2025-09-25T21:31:46.04Z" }, - { url = "https://files.pythonhosted.org/packages/05/14/52d505b5c59ce73244f59c7a50ecf47093ce4765f116cdb98286a71eeca2/pyyaml-6.0.3-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:02ea2dfa234451bbb8772601d7b8e426c2bfa197136796224e50e35a78777956", size = 174019, upload-time = "2025-09-25T21:31:47.706Z" }, - { url = "https://files.pythonhosted.org/packages/43/f7/0e6a5ae5599c838c696adb4e6330a59f463265bfa1e116cfd1fbb0abaaae/pyyaml-6.0.3-cp310-cp310-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:b30236e45cf30d2b8e7b3e85881719e98507abed1011bf463a8fa23e9c3e98a8", size = 740646, upload-time = "2025-09-25T21:31:49.21Z" }, - { url = "https://files.pythonhosted.org/packages/2f/3a/61b9db1d28f00f8fd0ae760459a5c4bf1b941baf714e207b6eb0657d2578/pyyaml-6.0.3-cp310-cp310-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:66291b10affd76d76f54fad28e22e51719ef9ba22b29e1d7d03d6777a9174198", size = 840793, upload-time = "2025-09-25T21:31:50.735Z" }, - { url = "https://files.pythonhosted.org/packages/7a/1e/7acc4f0e74c4b3d9531e24739e0ab832a5edf40e64fbae1a9c01941cabd7/pyyaml-6.0.3-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:9c7708761fccb9397fe64bbc0395abcae8c4bf7b0eac081e12b809bf47700d0b", size = 770293, upload-time = "2025-09-25T21:31:51.828Z" }, - { url = "https://files.pythonhosted.org/packages/8b/ef/abd085f06853af0cd59fa5f913d61a8eab65d7639ff2a658d18a25d6a89d/pyyaml-6.0.3-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:418cf3f2111bc80e0933b2cd8cd04f286338bb88bdc7bc8e6dd775ebde60b5e0", size = 732872, upload-time = "2025-09-25T21:31:53.282Z" }, - { url = "https://files.pythonhosted.org/packages/1f/15/2bc9c8faf6450a8b3c9fc5448ed869c599c0a74ba2669772b1f3a0040180/pyyaml-6.0.3-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:5e0b74767e5f8c593e8c9b5912019159ed0533c70051e9cce3e8b6aa699fcd69", size = 758828, upload-time = "2025-09-25T21:31:54.807Z" }, - { url = "https://files.pythonhosted.org/packages/a3/00/531e92e88c00f4333ce359e50c19b8d1de9fe8d581b1534e35ccfbc5f393/pyyaml-6.0.3-cp310-cp310-win32.whl", hash = "sha256:28c8d926f98f432f88adc23edf2e6d4921ac26fb084b028c733d01868d19007e", size = 142415, upload-time = "2025-09-25T21:31:55.885Z" }, - { url = "https://files.pythonhosted.org/packages/2a/fa/926c003379b19fca39dd4634818b00dec6c62d87faf628d1394e137354d4/pyyaml-6.0.3-cp310-cp310-win_amd64.whl", hash = "sha256:bdb2c67c6c1390b63c6ff89f210c8fd09d9a1217a465701eac7316313c915e4c", size = 158561, upload-time = "2025-09-25T21:31:57.406Z" }, -] - -[[package]] -name = "pyzmq" -version = "27.2.0" -source = { registry = "https://pypi.org/simple" } -dependencies = [ - { name = "cffi", marker = "implementation_name == 'pypy'" }, -] -sdist = { url = "https://files.pythonhosted.org/packages/e7/8d/5b3d5631c2f4b4b8862f64cd0c9eb777b5710eeb5125b4be8dd0a200a4c0/pyzmq-27.2.0.tar.gz", hash = "sha256:54d4259d1bfae24ecdb5ca79f7acc2eac6c286a02d6a0ae617797cb45f0726d3", size = 292316, upload-time = "2026-08-20T19:08:21.19Z" } -wheels = [ - { url = "https://files.pythonhosted.org/packages/38/de/c9d653d686ec686bac6ae5f953c784ffc4d2e4a33f9c20d0326aff549ca8/pyzmq-27.2.0-cp310-cp310-macosx_10_15_universal2.whl", hash = "sha256:480dba27b145373b5e103890f17969d891bc9e86746d6b8b29dd70b0d4addc62", size = 1458528, upload-time = "2026-08-20T19:06:11.455Z" }, - { url = "https://files.pythonhosted.org/packages/13/3a/e3ae8e56fdb87cefbef655dc1d808d5ac76eacf40af850c5d78fd81a7faf/pyzmq-27.2.0-cp310-cp310-manylinux2014_i686.manylinux_2_17_i686.whl", hash = "sha256:722f0a6940be1a483c81029a271d950e04dc2ff113a42e21b3d2b7a0d8e59638", size = 985810, upload-time = "2026-08-20T19:06:13.409Z" }, - { url = "https://files.pythonhosted.org/packages/03/ee/0ace0abf6315f3f481388826f1e9218802d9b5bb4a01bae5ce42018c3b4e/pyzmq-27.2.0-cp310-cp310-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:3ee556ed1cf836f96de9d5e545563116426d4a94f21b8041fdc79408eff18ebb", size = 713840, upload-time = "2026-08-20T19:06:14.85Z" }, - { url = "https://files.pythonhosted.org/packages/3b/fd/aee8c87f4854a012e232a6557b1167b6cd207506f59f378954b2d8bb6ed1/pyzmq-27.2.0-cp310-cp310-manylinux_2_26_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:d64da42cae09e6b0c61368b4cc8ca80f23ce3af17584d08053f3dc957433d5ed", size = 888214, upload-time = "2026-08-20T19:06:16.295Z" }, - { url = "https://files.pythonhosted.org/packages/94/2f/9be34eab874a26aa91315be0b27f94d43d35dad544cbdf28bcd41691afb2/pyzmq-27.2.0-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:376981d106598beb70be384f44d8f589832fd0051d184d38d10043da3cc3b080", size = 1705252, upload-time = "2026-08-20T19:06:17.89Z" }, - { url = "https://files.pythonhosted.org/packages/7f/26/362344e337d6b5905d65d0c205e91090b39b3b5a59ec9b84dbe88a5dd60c/pyzmq-27.2.0-cp310-cp310-musllinux_1_2_i686.whl", hash = "sha256:40d96cb7a8f6a43aa9617c00215c2b73e1b5e4a1d6cbc9f5860ed7ac682599f0", size = 2075298, upload-time = "2026-08-20T19:06:19.27Z" }, - { url = "https://files.pythonhosted.org/packages/1d/ee/3b76b91e2bb8c5c12f8ae9ee553eb6254ba0bb048c2f0dea7d945420a0d3/pyzmq-27.2.0-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:4ebc7889b31bc11c72e9f17ba3ebb0a8b0911cce413f41b498e55383a94819a3", size = 1926812, upload-time = "2026-08-20T19:06:20.621Z" }, - { url = "https://files.pythonhosted.org/packages/9e/ae/83d0740f125a6ef91d5ed29e560679e4c5beeaa3ab1fc87e5fe1128c296d/pyzmq-27.2.0-cp310-cp310-win32.whl", hash = "sha256:650c6cd7cb39a069e7048261efe66fce8bf2e0052c831a7a099b7a0f2ea860d7", size = 571057, upload-time = "2026-08-20T19:06:22.078Z" }, - { url = "https://files.pythonhosted.org/packages/ce/b3/3e99a7af1c25e84f68c6c7b16c51b664dd51e12d0bc3d252a48d298e9a08/pyzmq-27.2.0-cp310-cp310-win_amd64.whl", hash = "sha256:82a09aa67871d4f2fcafd47bf670fb93210b232a7c2d4b8a54676314edf04033", size = 643232, upload-time = "2026-08-20T19:06:23.431Z" }, - { url = "https://files.pythonhosted.org/packages/06/cb/785d002a08e630807141b102fd2740cc11623c366bb4606465450bd12e03/pyzmq-27.2.0-cp310-cp310-win_arm64.whl", hash = "sha256:bad4813f270592cedf56977e31ac1fc374fb0f6f67ea5134a5e37c19cb429a8e", size = 567590, upload-time = "2026-08-20T19:06:24.664Z" }, - { url = "https://files.pythonhosted.org/packages/57/8a/153532fa53db30e116118164f3af269a1f3966b3e2ba32c89b12fe864bd8/pyzmq-27.2.0-cp312-abi3-macosx_10_15_universal2.whl", hash = "sha256:591c8de5851c5ea372194469fe97587b97c3b641e9a70f31bb3474acbfde0241", size = 1431074, upload-time = "2026-08-20T19:06:40.601Z" }, - { url = "https://files.pythonhosted.org/packages/c8/ef/c08b91248bb90a9efa81fa00ba81b69c157c74d0c5efbb2c319d91babb62/pyzmq-27.2.0-cp312-abi3-manylinux2014_i686.manylinux_2_17_i686.whl", hash = "sha256:00e73942ef12cecbc7951c4a9104bb8ffaed742abb13af2da6833d90dd368cef", size = 973915, upload-time = "2026-08-20T19:06:42.037Z" }, - { url = "https://files.pythonhosted.org/packages/b4/78/a3a3a86c2b00fadb92ece1ca4f8f028d62b2ce9ac3526097239ab2d6fba9/pyzmq-27.2.0-cp312-abi3-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:1f8079d0521fe94bbb401fe9407578b28f3701627c8be2c9f7e0c5b77dcb0109", size = 697722, upload-time = "2026-08-20T19:06:43.325Z" }, - { url = "https://files.pythonhosted.org/packages/62/2c/d5828306f795e8d34676d266823b74e2101e0ad3760d12083de3e02abbb2/pyzmq-27.2.0-cp312-abi3-manylinux_2_26_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:dea74fd65f1fc5f7fe167916a473ebe6ed6174e5e5d9de11ea6583661be6cf43", size = 872258, upload-time = "2026-08-20T19:06:44.627Z" }, - { url = "https://files.pythonhosted.org/packages/09/52/51253b78fd8739293e283407eeecb14215c02c71b6519af21f6eed8e69cd/pyzmq-27.2.0-cp312-abi3-manylinux_2_38_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:dcc99ca132b667a4ed750afd42db4ea73288f18425a9b2e3c0af095665c491f5", size = 739591, upload-time = "2026-08-20T19:06:46.214Z" }, - { url = "https://files.pythonhosted.org/packages/e6/3e/142c85b67a4c9678629b0cf6d5125b29663d75be69bfaa57a3cac344d780/pyzmq-27.2.0-cp312-abi3-musllinux_1_2_aarch64.whl", hash = "sha256:b8d5f66e4a8246cf77f7b8f7902af64f00553368fa0373c89d99b78f0ad79394", size = 1689031, upload-time = "2026-08-20T19:06:47.612Z" }, - { url = "https://files.pythonhosted.org/packages/0e/ee/0776fb0f98ed1eb74d77240087fef0ab045b6ad15cb09555c6c5134c98ad/pyzmq-27.2.0-cp312-abi3-musllinux_1_2_i686.whl", hash = "sha256:d1526b42a2e725b84ed226f37becedc250c6347594e5ed304e4e9aff68c9aec3", size = 2059547, upload-time = "2026-08-20T19:06:49.064Z" }, - { url = "https://files.pythonhosted.org/packages/aa/0e/ec77f691a4aebe29ab6329f996fb0e0270c876a3016086e3ca6ef733bcae/pyzmq-27.2.0-cp312-abi3-musllinux_1_2_x86_64.whl", hash = "sha256:f707bcf2c1d007d14d70531d4dd7b41060881c73efa845580bf6faaf9ea24d42", size = 1910457, upload-time = "2026-08-20T19:06:50.783Z" }, - { url = "https://files.pythonhosted.org/packages/30/97/1f5530ff4fc271b4597048371d5af972c2baab51be132ba15874e0327a6a/pyzmq-27.2.0-cp312-abi3-win32.whl", hash = "sha256:fdaaa4ea3242f6ad298eb5177eb042aea5c73c30e76d20caee7b15af20d24ec2", size = 563450, upload-time = "2026-08-20T19:06:52.307Z" }, - { url = "https://files.pythonhosted.org/packages/02/8b/b83f7780dad22e0878e4c7bd9158ebd24ed12bc3d5e3a471cd0576f77ded/pyzmq-27.2.0-cp312-abi3-win_amd64.whl", hash = "sha256:2c218c6ab8bc447ba62054b581fd30209689d199c6ecb253f79615ca74a38e12", size = 628633, upload-time = "2026-08-20T19:06:53.809Z" }, - { url = "https://files.pythonhosted.org/packages/52/aa/3918b5ac7f9987bd9c421b065074fd7409ded88f856f2c704a24341877ec/pyzmq-27.2.0-cp312-abi3-win_arm64.whl", hash = "sha256:348d6fd3e4b81ae4580622ea8c2ea60224e84b2ac1b3be4482e6edc7de06e7a3", size = 556006, upload-time = "2026-08-20T19:06:55.242Z" }, - { url = "https://files.pythonhosted.org/packages/8c/26/1a7cd2d8e4e3c27d83a46960e22101b69f527843be140cb3375267aa8ca6/pyzmq-27.2.0-pp310-pypy310_pp73-macosx_10_15_x86_64.whl", hash = "sha256:770a37f28ddfbe1d2c40a2e3ce37e5fd10831daa6ae9634105aa8a5d23507b00", size = 875015, upload-time = "2026-08-20T19:07:52.084Z" }, - { url = "https://files.pythonhosted.org/packages/b8/ed/c8daf770ca31eb293bef40f801f05148e0a96ad538d55ec3bceb226c91ec/pyzmq-27.2.0-pp310-pypy310_pp73-macosx_11_0_arm64.whl", hash = "sha256:b398c5fe102b41e1559f7ffdae760aabd5f432d73b047b4ae0eac4e01cb594d2", size = 774400, upload-time = "2026-08-20T19:07:53.596Z" }, - { url = "https://files.pythonhosted.org/packages/64/6f/b958b0785eb15ab7a78913e3df8de705dbf226ce1d0004998fa4872bdd59/pyzmq-27.2.0-pp310-pypy310_pp73-manylinux2014_i686.manylinux_2_17_i686.whl", hash = "sha256:0e1af01858d6dc0c09cea57f9cb1ddf4601f04897b6bb1efc3a2038123c87d79", size = 877993, upload-time = "2026-08-20T19:07:55.192Z" }, - { url = "https://files.pythonhosted.org/packages/2d/5a/7a070d0e9911441061402013f0c64e5772ee781704c5dae093e6b051c6f6/pyzmq-27.2.0-pp310-pypy310_pp73-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:211350c3ccd4746bc5a85e8fe961bad1f7f2f274f67cf1f785fad7f96f562eea", size = 614493, upload-time = "2026-08-20T19:07:56.77Z" }, - { url = "https://files.pythonhosted.org/packages/b3/28/833485224e1bd8960cbf3539db465ab2bf23b50de885dc4225a637480539/pyzmq-27.2.0-pp310-pypy310_pp73-manylinux_2_26_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:dde5e291548ca0f397623b5e523db5c90172b32aa4fd3ba464a79ea31a580b43", size = 780573, upload-time = "2026-08-20T19:07:58.18Z" }, - { url = "https://files.pythonhosted.org/packages/90/8e/52239b9b5fe4f9cf77e272e6a8c548c01ba407d08d3aeeb3220816669ef1/pyzmq-27.2.0-pp310-pypy310_pp73-win_amd64.whl", hash = "sha256:94242bd4de6af7e74665e14a88630bccd615057f6acfaf08a3a432551d604645", size = 553963, upload-time = "2026-08-20T19:08:00.015Z" }, -] - -[[package]] -name = "requests" -version = "2.34.2" -source = { registry = "https://pypi.org/simple" } -dependencies = [ - { name = "certifi" }, - { name = "charset-normalizer" }, - { name = "idna" }, - { name = "urllib3" }, -] -sdist = { url = "https://files.pythonhosted.org/packages/ac/c3/e2a2b89f2d3e2179abd6d00ebd70bff6273f37fb3e0cc209f48b39d00cbf/requests-2.34.2.tar.gz", hash = "sha256:f288924cae4e29463698d6d60bc6a4da69c89185ad1e0bcc4104f584e960b9ed", size = 142856, upload-time = "2026-05-14T19:25:27.735Z" } -wheels = [ - { url = "https://files.pythonhosted.org/packages/a0/f4/c67b0b3f1b9245e8d266f0f112c500d50e5b4e83cb6f3b71b6528104182a/requests-2.34.2-py3-none-any.whl", hash = "sha256:2a0d60c172f83ac6ab31e4554906c0f3b3588d37b5cb939b1c061f4907e278e0", size = 73075, upload-time = "2026-05-14T19:25:26.443Z" }, -] - -[[package]] -name = "ruff" -version = "0.17.0" -source = { registry = "https://pypi.org/simple" } -sdist = { url = "https://files.pythonhosted.org/packages/e9/a7/70debb024dfacda67b8e560cc7511f52b34b9348a8cc8c1ec23036dcd51d/ruff-0.17.0.tar.gz", hash = "sha256:5cd03240d8208a557c2a9655a5cb07ebe36aa6bb35065f97d48c1f6adef5a322", size = 5320554, upload-time = "2026-10-09T19:47:29.248Z" } -wheels = [ - { url = "https://files.pythonhosted.org/packages/bc/f8/ee5ab9da6089eae2a33e6008b01deb1eda19992c1c8e10661e98cee1640f/ruff-0.17.0-py3-none-linux_armv6l.whl", hash = "sha256:0e271826af9a20d18c6cfae8c51e82959167c24859686ddd3eb9a7f0842ce81e", size = 10148907, upload-time = "2026-10-09T19:46:38.695Z" }, - { url = "https://files.pythonhosted.org/packages/9f/d9/2f81fb5a9d580afbb11b1c8ff915233a11f2a1b27405d7991f183c5e1976/ruff-0.17.0-py3-none-macosx_10_12_x86_64.whl", hash = "sha256:5f0ca4a40f81403689c04f12966e22f44e329ae362072d8f1587b7bda87f603b", size = 10224208, upload-time = "2026-10-09T19:46:41.711Z" }, - { url = "https://files.pythonhosted.org/packages/a7/20/643f3c8f75594f937b2bf74801241c56a2e2b8e139d24dff8b66b28cdd7f/ruff-0.17.0-py3-none-macosx_11_0_arm64.whl", hash = "sha256:cbf7149e0927dc3295d5d64679a4765576eef71b00782b2ae969ef82274d6bb9", size = 9273324, upload-time = "2026-10-09T19:46:44.323Z" }, - { url = "https://files.pythonhosted.org/packages/ec/91/627700b233d367736cb274f1bd0b47d1f2b12f68878192812bd875adadc3/ruff-0.17.0-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:13ee90156522998c3037059d8f66885c8adeeaf7643bdce2caceee196ecd23e0", size = 9953190, upload-time = "2026-10-09T19:46:47.155Z" }, - { url = "https://files.pythonhosted.org/packages/cd/92/91f7b5ed39490f89d6cbf56e1f543c383667a725efa8e2c2dee0f01f5591/ruff-0.17.0-py3-none-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:3d8e4a002a94cd9d0dc48b51dc69d807a172b5b9bf2b668e656424dc5b55ead1", size = 9961746, upload-time = "2026-10-09T19:46:50.098Z" }, - { url = "https://files.pythonhosted.org/packages/87/c5/7310f9fc63ce11ff6394edbd5e85433dfb0e14c9fbf6ccc97f1538491bc7/ruff-0.17.0-py3-none-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:c0b8a60c06a218c337e1161638d34757f83449243e2db161483ddf948e53ad14", size = 10625483, upload-time = "2026-10-09T19:46:53.379Z" }, - { url = "https://files.pythonhosted.org/packages/a5/8d/97443f0dca4a03a0bc7629fd396fd494a1cb6666121e38c5075acb217d8f/ruff-0.17.0-py3-none-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:a330178bdffc4205dbf3bda11d93e059e388fd6546f8cdd304501a9160363c0d", size = 11350129, upload-time = "2026-10-09T19:46:56.486Z" }, - { url = "https://files.pythonhosted.org/packages/9c/0a/c525efd9777be4b6b012e6969a3012648468e7e6c4b3e5b46af69f46e8eb/ruff-0.17.0-py3-none-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:7bb08489e234876fa2da67ae3ea938e9a2156da80293e0e4365abd6973d98329", size = 10906223, upload-time = "2026-10-09T19:47:00.263Z" }, - { url = "https://files.pythonhosted.org/packages/2c/3c/4a01195d93420cad1175bedad13a515dc8a56f95a6e39789b92e582682f5/ruff-0.17.0-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:bc73e7c133e82d55b5f15897b2a442d72c0cb4a0c886c46801ce3c247150b60c", size = 10386314, upload-time = "2026-10-09T19:47:03.057Z" }, - { url = "https://files.pythonhosted.org/packages/c7/72/1a3951665485a921f6375f91e754a1854d5a645d41acc3642668064ff64d/ruff-0.17.0-py3-none-manylinux_2_31_riscv64.whl", hash = "sha256:db4f74c533403ab70fe4007873f6ae0c9f94a8b03158cf48d78788e47cdbe399", size = 10565464, upload-time = "2026-10-09T19:47:05.831Z" }, - { url = "https://files.pythonhosted.org/packages/90/8c/539b4d8c082f57e18db8ae2be85a460d77861c79dcd5798e32b536a6a06f/ruff-0.17.0-py3-none-musllinux_1_2_aarch64.whl", hash = "sha256:3d8cc360e666d1914e47b0777c6906d70cf18891a55532bd0a16844195d70859", size = 10079468, upload-time = "2026-10-09T19:47:08.617Z" }, - { url = "https://files.pythonhosted.org/packages/e0/b8/84286966db79434e8c26b585b0a0f6897cb3ab1c51a4aa4df10c28488b62/ruff-0.17.0-py3-none-musllinux_1_2_armv7l.whl", hash = "sha256:d66de796b726c4801e05fa99a2a8d7a780e107be222486c304ab61765561e866", size = 9958556, upload-time = "2026-10-09T19:47:11.324Z" }, - { url = "https://files.pythonhosted.org/packages/69/50/27b6eed27b83fcdd5bfa0d52b83231e29094754374698da404d094487ae3/ruff-0.17.0-py3-none-musllinux_1_2_i686.whl", hash = "sha256:c3f268baf004aea944f040623327119527ea231af15f7fb7890e82cea0679589", size = 10352173, upload-time = "2026-10-09T19:47:14.188Z" }, - { url = "https://files.pythonhosted.org/packages/2a/fa/955399fd13044cd827862044117d784a59e3196f6cce7424908ac9a7f914/ruff-0.17.0-py3-none-musllinux_1_2_x86_64.whl", hash = "sha256:864b6c1acb6b0bccf94b5a3938a1531fd09aaca5e5659a2e7bf0f3cf2a685540", size = 10791761, upload-time = "2026-10-09T19:47:16.931Z" }, - { url = "https://files.pythonhosted.org/packages/ae/bf/024e01e1f6aec87768696725e648ed5b438941341eea8f8100beb681961f/ruff-0.17.0-py3-none-win32.whl", hash = "sha256:5e50aa5b84decd9fe5b0bb0e6f71c3b592f1767ed09faa4b7207d933961e35cd", size = 9904112, upload-time = "2026-10-09T19:47:19.75Z" }, - { url = "https://files.pythonhosted.org/packages/cc/77/1ee73df41dcc8d1cdb686ee4bc46ea29704ea175feb6b95c78420f631ab8/ruff-0.17.0-py3-none-win_amd64.whl", hash = "sha256:8ab76bcda86dfd28e13776cb5de3c7bcdcf1ae3d37ed761113d1a5a415dc134c", size = 10115585, upload-time = "2026-10-09T19:47:22.698Z" }, - { url = "https://files.pythonhosted.org/packages/fd/71/eb4f0ccc844aece56963e8578df9c95d4c00f580547d52329d4035d3af18/ruff-0.17.0-py3-none-win_arm64.whl", hash = "sha256:c154c73ff43f9854395e24cac507af13078962e53d2b511605058d22af1fdb88", size = 9872035, upload-time = "2026-10-09T19:47:26.306Z" }, -] - -[[package]] -name = "setuptools" -version = "84.0.0" -source = { registry = "https://pypi.org/simple" } -sdist = { url = "https://files.pythonhosted.org/packages/6d/44/f5da03a8ef95d369145c5bb53050e7877c9f3d312e128605fd9504829143/setuptools-84.0.0.tar.gz", hash = "sha256:f4695c21257f0d9b537ec2692c941d02ee143b7cc1276941349a546573b2ef73", size = 1168449, upload-time = "2026-08-08T18:27:58.365Z" } -wheels = [ - { url = "https://files.pythonhosted.org/packages/95/9c/c510029fc6ef33a6275cd2c5d3cecd6613dfd6aa401d57c54f1c18852ccf/setuptools-84.0.0-py3-none-any.whl", hash = "sha256:51a52592b3b99e102b609654876bd65f19f999935166d1352678931132b0c670", size = 818216, upload-time = "2026-08-08T18:27:56.719Z" }, -] - -[[package]] -name = "six" -version = "1.17.0" -source = { registry = "https://pypi.org/simple" } -sdist = { url = "https://files.pythonhosted.org/packages/94/e7/b2c673351809dca68a0e064b6af791aa332cf192da575fd474ed7d6f16a2/six-1.17.0.tar.gz", hash = "sha256:ff70335d468e7eb6ec65b95b99d3a2836546063f63acc5171de367e834932a81", size = 34031, upload-time = "2024-12-04T17:35:28.174Z" } -wheels = [ - { url = "https://files.pythonhosted.org/packages/b7/ce/149a00dd41f10bc29e5921b496af8b574d8413afcd5e30dfa0ed46c2cc5e/six-1.17.0-py2.py3-none-any.whl", hash = "sha256:4721f391ed90541fddacab5acf947aa0d3dc7d27b2e1e8eda2be8970586c3274", size = 11050, upload-time = "2024-12-04T17:35:26.475Z" }, -] - -[[package]] -name = "snowballstemmer" -version = "3.1.1" -source = { registry = "https://pypi.org/simple" } -sdist = { url = "https://files.pythonhosted.org/packages/43/f8/0a71edf031f03c40db17503cb8ca78a69a171254e568e7db241b0ab57ea1/snowballstemmer-3.1.1.tar.gz", hash = "sha256:e07bbc54a0d798fe6010a12398422e62a8bfbba95c394fd0956ef58cb4d3e260", size = 123314, upload-time = "2026-06-03T00:56:40.194Z" } -wheels = [ - { url = "https://files.pythonhosted.org/packages/4c/07/2ebca9b11fb9be7340a818d8d6f63feaebb146be2c4afbd6061701d6df6e/snowballstemmer-3.1.1-py3-none-any.whl", hash = "sha256:7e207fa178741da09cdee59d3ecec3827ad5f92b1fc5c9ff3755b639f71f5752", size = 104164, upload-time = "2026-06-03T00:56:38.614Z" }, -] - -[[package]] -name = "soupsieve" -version = "2.10" -source = { registry = "https://pypi.org/simple" } -sdist = { url = "https://files.pythonhosted.org/packages/71/c3/1b817965ac12dc002d7c9cd7dfffdd7d4fbf9b45763ef2ffe7b86ee94670/soupsieve-2.10.tar.gz", hash = "sha256:49e9380d7d2905463583bafe285e818c7366a9ed7b3aee221c1ac79c905d8bc0", size = 124337, upload-time = "2026-09-24T02:36:35.048Z" } -wheels = [ - { url = "https://files.pythonhosted.org/packages/66/87/5ed59e1d0290564e2027ed066c52b059892c4637741337fc0967183c8d4d/soupsieve-2.10-py3-none-any.whl", hash = "sha256:8596eb8967d744174820280fa62b4542a2e955bfaccca73ed8a13c6eb8e9b502", size = 38019, upload-time = "2026-09-24T02:36:33.709Z" }, -] - -[[package]] -name = "sphinx" -version = "8.1.3" -source = { registry = "https://pypi.org/simple" } -dependencies = [ - { name = "alabaster" }, - { name = "babel" }, - { name = "colorama", marker = "sys_platform == 'win32'" }, - { name = "docutils" }, - { name = "imagesize" }, - { name = "jinja2" }, - { name = "packaging" }, - { name = "pygments" }, - { name = "requests" }, - { name = "snowballstemmer" }, - { name = "sphinxcontrib-applehelp" }, - { name = "sphinxcontrib-devhelp" }, - { name = "sphinxcontrib-htmlhelp" }, - { name = "sphinxcontrib-jsmath" }, - { name = "sphinxcontrib-qthelp" }, - { name = "sphinxcontrib-serializinghtml" }, - { name = "tomli" }, -] -sdist = { url = "https://files.pythonhosted.org/packages/6f/6d/be0b61178fe2cdcb67e2a92fc9ebb488e3c51c4f74a36a7824c0adf23425/sphinx-8.1.3.tar.gz", hash = "sha256:43c1911eecb0d3e161ad78611bc905d1ad0e523e4ddc202a58a821773dc4c927", size = 8184611, upload-time = "2024-10-13T20:27:13.93Z" } -wheels = [ - { url = "https://files.pythonhosted.org/packages/26/60/1ddff83a56d33aaf6f10ec8ce84b4c007d9368b21008876fceda7e7381ef/sphinx-8.1.3-py3-none-any.whl", hash = "sha256:09719015511837b76bf6e03e42eb7595ac8c2e41eeb9c29c5b755c6b677992a2", size = 3487125, upload-time = "2024-10-13T20:27:10.448Z" }, -] - -[[package]] -name = "sphinx-autoapi" -version = "3.8.1" -source = { registry = "https://pypi.org/simple" } -dependencies = [ - { name = "astroid" }, - { name = "jinja2" }, - { name = "pyyaml" }, - { name = "sphinx" }, -] -sdist = { url = "https://files.pythonhosted.org/packages/09/5e/7b42f3f774aa116741b8031b740c854612ed7dd7d616695e934a2b7fb94f/sphinx_autoapi-3.8.1.tar.gz", hash = "sha256:04643fc50485039294ace8b660d0d1b821a1686824a975725a5106e8cf1fb30b", size = 58898, upload-time = "2026-08-23T17:04:25.612Z" } -wheels = [ - { url = "https://files.pythonhosted.org/packages/72/4e/e49564ab6f38341921ae855451aed2ba9915f61c43780200d5aebb57ae4d/sphinx_autoapi-3.8.1-py3-none-any.whl", hash = "sha256:9a3bd3ee1ba82d537f1620a3922292d43ee8b9ff9c69bc198965ac4bcd5a6775", size = 35975, upload-time = "2026-08-23T17:04:24.168Z" }, -] - -[[package]] -name = "sphinx-basic-ng" -version = "1.0.0b2" -source = { registry = "https://pypi.org/simple" } -dependencies = [ - { name = "sphinx" }, -] -sdist = { url = "https://files.pythonhosted.org/packages/98/0b/a866924ded68efec7a1759587a4e478aec7559d8165fac8b2ad1c0e774d6/sphinx_basic_ng-1.0.0b2.tar.gz", hash = "sha256:9ec55a47c90c8c002b5960c57492ec3021f5193cb26cebc2dc4ea226848651c9", size = 20736, upload-time = "2023-07-08T18:40:54.166Z" } -wheels = [ - { url = "https://files.pythonhosted.org/packages/3c/dd/018ce05c532a22007ac58d4f45232514cd9d6dd0ee1dc374e309db830983/sphinx_basic_ng-1.0.0b2-py3-none-any.whl", hash = "sha256:eb09aedbabfb650607e9b4b68c9d240b90b1e1be221d6ad71d61c52e29f7932b", size = 22496, upload-time = "2023-07-08T18:40:52.659Z" }, -] - -[[package]] -name = "sphinx-bootstrap-theme" -version = "0.8.1" -source = { registry = "https://pypi.org/simple" } -sdist = { url = "https://files.pythonhosted.org/packages/4c/32/2c93f58beec8c85113fcbb3f1e213a1a773baaebfa064509a75d1d2f2320/sphinx-bootstrap-theme-0.8.1.tar.gz", hash = "sha256:683e3b735448dadd0149f76edecf95ff4bd9157787e9e77e0d048ca6f1d680df", size = 1209581, upload-time = "2022-02-03T20:27:26.713Z" } -wheels = [ - { url = "https://files.pythonhosted.org/packages/3a/97/6b76343a692c6cf4481d3a900a0ee589499f8d642e7bcaf0192f9022305f/sphinx_bootstrap_theme-0.8.1-py2.py3-none-any.whl", hash = "sha256:6ef36206c211846ea6cbdb45bc85645578e7c62d0a883361181708f8b6ea743b", size = 1224297, upload-time = "2022-02-03T20:27:24.977Z" }, -] - -[[package]] -name = "sphinxcontrib-applehelp" -version = "2.0.0" -source = { registry = "https://pypi.org/simple" } -sdist = { url = "https://files.pythonhosted.org/packages/ba/6e/b837e84a1a704953c62ef8776d45c3e8d759876b4a84fe14eba2859106fe/sphinxcontrib_applehelp-2.0.0.tar.gz", hash = "sha256:2f29ef331735ce958efa4734873f084941970894c6090408b079c61b2e1c06d1", size = 20053, upload-time = "2024-07-29T01:09:00.465Z" } -wheels = [ - { url = "https://files.pythonhosted.org/packages/5d/85/9ebeae2f76e9e77b952f4b274c27238156eae7979c5421fba91a28f4970d/sphinxcontrib_applehelp-2.0.0-py3-none-any.whl", hash = "sha256:4cd3f0ec4ac5dd9c17ec65e9ab272c9b867ea77425228e68ecf08d6b28ddbdb5", size = 119300, upload-time = "2024-07-29T01:08:58.99Z" }, -] - -[[package]] -name = "sphinxcontrib-devhelp" -version = "2.0.0" -source = { registry = "https://pypi.org/simple" } -sdist = { url = "https://files.pythonhosted.org/packages/f6/d2/5beee64d3e4e747f316bae86b55943f51e82bb86ecd325883ef65741e7da/sphinxcontrib_devhelp-2.0.0.tar.gz", hash = "sha256:411f5d96d445d1d73bb5d52133377b4248ec79db5c793ce7dbe59e074b4dd1ad", size = 12967, upload-time = "2024-07-29T01:09:23.417Z" } -wheels = [ - { url = "https://files.pythonhosted.org/packages/35/7a/987e583882f985fe4d7323774889ec58049171828b58c2217e7f79cdf44e/sphinxcontrib_devhelp-2.0.0-py3-none-any.whl", hash = "sha256:aefb8b83854e4b0998877524d1029fd3e6879210422ee3780459e28a1f03a8a2", size = 82530, upload-time = "2024-07-29T01:09:21.945Z" }, -] - -[[package]] -name = "sphinxcontrib-fulltoc" -version = "1.2.0" -source = { registry = "https://pypi.org/simple" } -sdist = { url = "https://files.pythonhosted.org/packages/8e/a6/d1297db9b75650681e5429e92e13df139ee6b64303ff1b2eea4ebd32c0a9/sphinxcontrib-fulltoc-1.2.0.tar.gz", hash = "sha256:c845d62fc467f3135d4543e9f10e13ef91852683bd1c90fd19d07f9d36757cd9", size = 13752, upload-time = "2017-04-10T14:12:57.75Z" } - -[[package]] -name = "sphinxcontrib-htmlhelp" -version = "2.1.0" -source = { registry = "https://pypi.org/simple" } -sdist = { url = "https://files.pythonhosted.org/packages/43/93/983afd9aa001e5201eab16b5a444ed5b9b0a7a010541e0ddfbbfd0b2470c/sphinxcontrib_htmlhelp-2.1.0.tar.gz", hash = "sha256:c9e2916ace8aad64cc13a0d233ee22317f2b9025b9cf3295249fa985cc7082e9", size = 22617, upload-time = "2024-07-29T01:09:37.889Z" } -wheels = [ - { url = "https://files.pythonhosted.org/packages/0a/7b/18a8c0bcec9182c05a0b3ec2a776bba4ead82750a55ff798e8d406dae604/sphinxcontrib_htmlhelp-2.1.0-py3-none-any.whl", hash = "sha256:166759820b47002d22914d64a075ce08f4c46818e17cfc9470a9786b759b19f8", size = 98705, upload-time = "2024-07-29T01:09:36.407Z" }, -] - -[[package]] -name = "sphinxcontrib-jsmath" -version = "1.0.1" -source = { registry = "https://pypi.org/simple" } -sdist = { url = "https://files.pythonhosted.org/packages/b2/e8/9ed3830aeed71f17c026a07a5097edcf44b692850ef215b161b8ad875729/sphinxcontrib-jsmath-1.0.1.tar.gz", hash = "sha256:a9925e4a4587247ed2191a22df5f6970656cb8ca2bd6284309578f2153e0c4b8", size = 5787, upload-time = "2019-01-21T16:10:16.347Z" } -wheels = [ - { url = "https://files.pythonhosted.org/packages/c2/42/4c8646762ee83602e3fb3fbe774c2fac12f317deb0b5dbeeedd2d3ba4b77/sphinxcontrib_jsmath-1.0.1-py2.py3-none-any.whl", hash = "sha256:2ec2eaebfb78f3f2078e73666b1415417a116cc848b72e5172e596c871103178", size = 5071, upload-time = "2019-01-21T16:10:14.333Z" }, -] - -[[package]] -name = "sphinxcontrib-napoleon" -version = "0.7" -source = { registry = "https://pypi.org/simple" } -dependencies = [ - { name = "pockets" }, - { name = "six" }, -] -sdist = { url = "https://files.pythonhosted.org/packages/fa/eb/ad89500f4cee83187596e07f43ad561f293e8e6e96996005c3319653b89f/sphinxcontrib-napoleon-0.7.tar.gz", hash = "sha256:407382beed396e9f2d7f3043fad6afda95719204a1e1a231ac865f40abcbfcf8", size = 21232, upload-time = "2018-09-23T14:16:47.272Z" } -wheels = [ - { url = "https://files.pythonhosted.org/packages/75/f2/6b7627dfe7b4e418e295e254bb15c3a6455f11f8c0ad0d43113f678049c3/sphinxcontrib_napoleon-0.7-py2.py3-none-any.whl", hash = "sha256:711e41a3974bdf110a484aec4c1a556799eb0b3f3b897521a018ad7e2db13fef", size = 17151, upload-time = "2018-09-23T14:16:45.548Z" }, -] - -[[package]] -name = "sphinxcontrib-qthelp" -version = "2.0.0" -source = { registry = "https://pypi.org/simple" } -sdist = { url = "https://files.pythonhosted.org/packages/68/bc/9104308fc285eb3e0b31b67688235db556cd5b0ef31d96f30e45f2e51cae/sphinxcontrib_qthelp-2.0.0.tar.gz", hash = "sha256:4fe7d0ac8fc171045be623aba3e2a8f613f8682731f9153bb2e40ece16b9bbab", size = 17165, upload-time = "2024-07-29T01:09:56.435Z" } -wheels = [ - { url = "https://files.pythonhosted.org/packages/27/83/859ecdd180cacc13b1f7e857abf8582a64552ea7a061057a6c716e790fce/sphinxcontrib_qthelp-2.0.0-py3-none-any.whl", hash = "sha256:b18a828cdba941ccd6ee8445dbe72ffa3ef8cbe7505d8cd1fa0d42d3f2d5f3eb", size = 88743, upload-time = "2024-07-29T01:09:54.885Z" }, -] - -[[package]] -name = "sphinxcontrib-serializinghtml" -version = "2.0.0" -source = { registry = "https://pypi.org/simple" } -sdist = { url = "https://files.pythonhosted.org/packages/3b/44/6716b257b0aa6bfd51a1b31665d1c205fb12cb5ad56de752dfa15657de2f/sphinxcontrib_serializinghtml-2.0.0.tar.gz", hash = "sha256:e9d912827f872c029017a53f0ef2180b327c3f7fd23c87229f7a8e8b70031d4d", size = 16080, upload-time = "2024-07-29T01:10:09.332Z" } -wheels = [ - { url = "https://files.pythonhosted.org/packages/52/a7/d2782e4e3f77c8450f727ba74a8f12756d5ba823d81b941f1b04da9d033a/sphinxcontrib_serializinghtml-2.0.0-py3-none-any.whl", hash = "sha256:6e2cb0eef194e10c27ec0023bfeb25badbbb5868244cf5bc5bdc04e4464bf331", size = 92072, upload-time = "2024-07-29T01:10:08.203Z" }, -] - -[[package]] -name = "stack-data" -version = "0.6.3" -source = { registry = "https://pypi.org/simple" } -dependencies = [ - { name = "asttokens" }, - { name = "executing" }, - { name = "pure-eval" }, -] -sdist = { url = "https://files.pythonhosted.org/packages/28/e3/55dcc2cfbc3ca9c29519eb6884dd1415ecb53b0e934862d3559ddcb7e20b/stack_data-0.6.3.tar.gz", hash = "sha256:836a778de4fec4dcd1dcd89ed8abff8a221f58308462e1c4aa2a3cf30148f0b9", size = 44707, upload-time = "2023-09-30T13:58:05.479Z" } -wheels = [ - { url = "https://files.pythonhosted.org/packages/f1/7b/ce1eafaf1a76852e2ec9b22edecf1daa58175c090266e9f6c64afcd81d91/stack_data-0.6.3-py3-none-any.whl", hash = "sha256:d5558e0c25a4cb0853cddad3d77da9891a08cb85dd9f9f91b9f8cd66e511e695", size = 24521, upload-time = "2023-09-30T13:58:03.53Z" }, -] - -[[package]] -name = "tabulate" -version = "0.10.0" -source = { registry = "https://pypi.org/simple" } -sdist = { url = "https://files.pythonhosted.org/packages/46/58/8c37dea7bbf769b20d58e7ace7e5edfe65b849442b00ffcdd56be88697c6/tabulate-0.10.0.tar.gz", hash = "sha256:e2cfde8f79420f6deeffdeda9aaec3b6bc5abce947655d17ac662b126e48a60d", size = 91754, upload-time = "2026-03-04T18:55:34.402Z" } -wheels = [ - { url = "https://files.pythonhosted.org/packages/99/55/db07de81b5c630da5cbf5c7df646580ca26dfaefa593667fc6f2fe016d2e/tabulate-0.10.0-py3-none-any.whl", hash = "sha256:f0b0622e567335c8fabaaa659f1b33bcb6ddfe2e496071b743aa113f8774f2d3", size = 39814, upload-time = "2026-03-04T18:55:31.284Z" }, -] - -[[package]] -name = "tomli" -version = "2.5.0" -source = { registry = "https://pypi.org/simple" } -sdist = { url = "https://files.pythonhosted.org/packages/b0/78/9ad63712633ed3ab5cc1a648d863d7e7da371e9425e209555a0fe711b695/tomli-2.5.0.tar.gz", hash = "sha256:264507556cd8b8c8e7c6ee037cdf443a463f03f4c958e57195e3d369711b8ff6", size = 17662, upload-time = "2026-10-07T12:23:37.892Z" } -wheels = [ - { url = "https://files.pythonhosted.org/packages/60/3f/3e3f8fd0919249b0200c80fbc4f9a1e70be19f9883da71dfb7f8b9ab8aca/tomli-2.5.0-py3-none-any.whl", hash = "sha256:32a7b79ac57a2e83670ce329ccf675798bc5a2094783a63676866b70503f2e2b", size = 14765, upload-time = "2026-10-07T12:23:36.875Z" }, -] - -[[package]] -name = "tomlkit" -version = "0.15.1" -source = { registry = "https://pypi.org/simple" } -sdist = { url = "https://files.pythonhosted.org/packages/94/96/e07752635b98536177fa1f37671c8f3cdde2e724c6bcf6034b2cfb571565/tomlkit-0.15.1.tar.gz", hash = "sha256:e25bbf38843005246210a12982776f27f99cb9be67160e14434d0c0d21ee1e97", size = 180129, upload-time = "2026-07-17T01:48:04.562Z" } -wheels = [ - { url = "https://files.pythonhosted.org/packages/13/bc/8c13eb66537dce1d2bd3a57132902f38d0e7f5bb46fa9f4daed9fe9d76ee/tomlkit-0.15.1-py3-none-any.whl", hash = "sha256:177a05aece5a8ca5266fd3c448abb47b8d352f09d477d3ca8332db4d89b24304", size = 49449, upload-time = "2026-07-17T01:48:05.728Z" }, -] - -[[package]] -name = "tornado" -version = "6.5.10" -source = { registry = "https://pypi.org/simple" } -sdist = { url = "https://files.pythonhosted.org/packages/06/61/53d562a57b28c08eda40b258c0f975e360541943ad7c7bef897a40caafda/tornado-6.5.10.tar.gz", hash = "sha256:a6b1ccd08c04b4a06fb5aeb381be99de5ad1e5375c1785e31d78c880feb57687", size = 537910, upload-time = "2026-09-15T13:47:48.73Z" } -wheels = [ - { url = "https://files.pythonhosted.org/packages/cd/5b/ff5fc58fa2427c30dea74c90053f4fc5eda1e7f3833ed3ecc7147fe2b311/tornado-6.5.10-cp39-abi3-macosx_10_9_universal2.whl", hash = "sha256:9261783640e23258694a9ff0795df430a5a7b0a651d3dd53dd0969ad6be16da7", size = 465883, upload-time = "2026-09-15T13:47:35.463Z" }, - { url = "https://files.pythonhosted.org/packages/ad/f5/cd7be26c34a3315532f3aef5f092465da8f59c334dd439d3c14aaef16461/tornado-6.5.10-cp39-abi3-macosx_10_9_x86_64.whl", hash = "sha256:83e6cf438b106c6b3852d70960967bb1b70c87438050dca0981e4b9aa751a4c1", size = 464046, upload-time = "2026-09-15T13:47:37.178Z" }, - { url = "https://files.pythonhosted.org/packages/60/33/df6d7d04854a58619f8349a51e3edb138324130a7562b0bb21f115bb940f/tornado-6.5.10-cp39-abi3-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl", hash = "sha256:bdf942448169e5336451d0494d7e3d81cfa726d5aa312affdc4682dd62a62f6d", size = 467096, upload-time = "2026-09-15T13:47:38.559Z" }, - { url = "https://files.pythonhosted.org/packages/29/17/cc35dff68272d685cffd8600ffafbd8067e7d05e7348d9f80caddffbbd5f/tornado-6.5.10-cp39-abi3-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:69acca6501eed74582b76dbbceee2a91613f54728e3e418346000d7103101676", size = 468067, upload-time = "2026-09-15T13:47:40.085Z" }, - { url = "https://files.pythonhosted.org/packages/c3/01/6e5349b4e1a53a4b4972a6716785e1fe7407f312063c3972690af8ff301b/tornado-6.5.10-cp39-abi3-musllinux_1_2_aarch64.whl", hash = "sha256:66aaa3f57d30c6e6becee83ff28055d5930ac724214bde99393eefda83d5e015", size = 467901, upload-time = "2026-09-15T13:47:41.576Z" }, - { url = "https://files.pythonhosted.org/packages/28/5e/b4facf94370dba006819c8d304376f8b9fbec6b935b5e51bf45823a9790b/tornado-6.5.10-cp39-abi3-musllinux_1_2_x86_64.whl", hash = "sha256:4bd192b959f9128fb99b8898148070ba4574c9589b78bce42d1851131fe85828", size = 467308, upload-time = "2026-09-15T13:47:43.145Z" }, - { url = "https://files.pythonhosted.org/packages/56/ae/047938e828cafc8eca4c908fafb6588fee944e3af39a0af9d7b602499ae5/tornado-6.5.10-cp39-abi3-win32.whl", hash = "sha256:302eb1e0e3e159314eb591920529fdea80acca92df5510a2cec5bbd4f099ec72", size = 468387, upload-time = "2026-09-15T13:47:44.556Z" }, - { url = "https://files.pythonhosted.org/packages/d8/d4/5901517f05affd752490f6a654ba31b7474664e8dd80bd045a00c220bd88/tornado-6.5.10-cp39-abi3-win_amd64.whl", hash = "sha256:37ae8f150cecfdbf747fc4e12f5e9a97ecd8cf1d4cdb3f119e2de84b11196918", size = 468828, upload-time = "2026-09-15T13:47:45.961Z" }, - { url = "https://files.pythonhosted.org/packages/f3/1a/fd497f3a7f7b74bb04f4b94536b5c9f80742b5d50501fd27977652ddec16/tornado-6.5.10-cp39-abi3-win_arm64.whl", hash = "sha256:ce045d3c298fddd30e89a2777f97039d1b641eb9518ac7b26a4721903539c694", size = 467847, upload-time = "2026-09-15T13:47:47.283Z" }, -] - -[[package]] -name = "traitlets" -version = "5.16.1" -source = { registry = "https://pypi.org/simple" } -sdist = { url = "https://files.pythonhosted.org/packages/2c/2e/a7fbfe268c8a3b32546930c0297c101d65a4a14c304ad5790a9f478f0e4e/traitlets-5.16.1.tar.gz", hash = "sha256:ed900c2b631aa3a112811139fa97b8d2c3bad5e989656bba4b7e52c7852c18c1", size = 166137, upload-time = "2026-08-03T08:32:36.848Z" } -wheels = [ - { url = "https://files.pythonhosted.org/packages/ad/66/0d785f0bc5e4315a96c989bb476d0fc07ea4f85132550c7b156ca2035d52/traitlets-5.16.1-py3-none-any.whl", hash = "sha256:f775618166caa0396c8e337099240f2bd3e5e917d203b2e6fbe21a58d3cb1f6b", size = 86211, upload-time = "2026-08-03T08:32:34.48Z" }, -] - -[[package]] -name = "typing-extensions" -version = "4.16.0" -source = { registry = "https://pypi.org/simple" } -sdist = { url = "https://files.pythonhosted.org/packages/f6/cc/6253133b5bb138fc3306cebfbda2c520f545d36b5be2c7255cc528bb45d6/typing_extensions-4.16.0.tar.gz", hash = "sha256:dc983d19a509c94dba722ee6abd33940f7c05a89e243c47e907eb4db6f1a43e5", size = 113555, upload-time = "2026-07-02T08:40:05.92Z" } -wheels = [ - { url = "https://files.pythonhosted.org/packages/49/d3/b8441a820a491ddfc024b0b0cf0393375b75ea13866d9c66727e54c2fc80/typing_extensions-4.16.0-py3-none-any.whl", hash = "sha256:481caa481374e813c1b176ada14e97f1f67a4539ce9cfeb3f350d78d6370c2e8", size = 45571, upload-time = "2026-07-02T08:40:04.659Z" }, -] - -[[package]] -name = "tzdata" -version = "2026.5" -source = { registry = "https://pypi.org/simple" } -sdist = { url = "https://files.pythonhosted.org/packages/d9/68/f1b440335057bfce71b6e50a9d09445aa2ecbd08359a337976627b8409e7/tzdata-2026.5.tar.gz", hash = "sha256:8cc73c0a0bfca7dbfa59235d60b2eff82231dee33f53d206db1acd9173cfc0a7", size = 200404, upload-time = "2026-10-03T09:23:14.143Z" } -wheels = [ - { url = "https://files.pythonhosted.org/packages/94/21/1e5995a1c920cce14e4bffae20c665ec10e7ed03ab25e006cd741092b718/tzdata-2026.5-py2.py3-none-any.whl", hash = "sha256:b683bd1b6659ddcd810ff02ad09ba821d4bf1065072805063eb35c49617905ac", size = 347996, upload-time = "2026-10-03T09:23:12.535Z" }, -] - -[[package]] -name = "urllib3" -version = "2.8.0" -source = { registry = "https://pypi.org/simple" } -sdist = { url = "https://files.pythonhosted.org/packages/e3/05/b17359e1cefb4f909b5e40b1b90a496d987258916dbbf88e842c729f510e/urllib3-2.8.0.tar.gz", hash = "sha256:63bf2ead4c879426ebf22ef2a781eeb4aa3b4ae798a0435506f8687fd5bb9b63", size = 458972, upload-time = "2026-09-15T19:29:36.253Z" } -wheels = [ - { url = "https://files.pythonhosted.org/packages/92/9d/c4e665119135114480843e7ab388fa94d8480650450e6f8e26b70d323a4c/urllib3-2.8.0-py3-none-any.whl", hash = "sha256:0cf3cae568d36aa9576b28dfb35f11328f1cb974ca7647d9475ebb86c75ac6e3", size = 135717, upload-time = "2026-09-15T19:29:34.577Z" }, -] - -[[package]] -name = "wcwidth" -version = "0.9.2" -source = { registry = "https://pypi.org/simple" } -sdist = { url = "https://files.pythonhosted.org/packages/f0/b4/7830542634bb2d3e62aa3b586a72d5b3b6c91c3168929e7000ef3fed041d/wcwidth-0.9.2.tar.gz", hash = "sha256:ae0ef90b90f6af38b54f1fe6d58662ec33b3cb4b8391958a62416d654231727b", size = 955039, upload-time = "2026-10-05T00:24:05.521Z" } -wheels = [ - { url = "https://files.pythonhosted.org/packages/59/1e/4532a81fb9dfbf4114a816775e0a36c3a64ee1d1f4bba2094e2da50be5dc/wcwidth-0.9.2-cp310-abi3-macosx_10_9_x86_64.whl", hash = "sha256:7ef5a940bd5e30bac6e721f1a48fce0cd7bb3ece19e9c5d139e72c76c35cfd07", size = 605343, upload-time = "2026-10-05T00:23:22.649Z" }, - { url = "https://files.pythonhosted.org/packages/a0/07/cb6940e81134b7ed25fa312ee9ab536a63db0793b149f88a90e603ceace9/wcwidth-0.9.2-cp310-abi3-macosx_11_0_arm64.whl", hash = "sha256:ae0800c5339423cc53d33a266ad264b42ba8aaa16d4464f6e6b1bee607f50b17", size = 609960, upload-time = "2026-10-05T00:23:27.049Z" }, - { url = "https://files.pythonhosted.org/packages/a4/80/15ad05d40bfa99155639fb9e13b3d77083aa0fab893c816db2543d29005c/wcwidth-0.9.2-cp310-abi3-manylinux1_i686.manylinux2014_i686.manylinux_2_17_i686.manylinux_2_5_i686.whl", hash = "sha256:9e542f1f8475b78452a295495d7a5bc3ead565112e9446a64dc93462a41c2a79", size = 762566, upload-time = "2026-10-05T00:23:38.322Z" }, - { url = "https://files.pythonhosted.org/packages/bc/f0/b8ef7758003d66b60f093695831a86dcc726aac01ee6446ffcbda27b61e3/wcwidth-0.9.2-cp310-abi3-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:674b518af28d38ee645ff97b74f5760abee5fad4bac74413bfc4b881ef2ce724", size = 771632, upload-time = "2026-10-05T00:23:32.448Z" }, - { url = "https://files.pythonhosted.org/packages/db/6c/f940133c71427c208575910e981942bd78c98b1f7cd0d1425ca4b7457c04/wcwidth-0.9.2-cp310-abi3-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:751bef0ab404b6a1dc028b56b4b85d46486be1c55833f80da533e42dc691f389", size = 769763, upload-time = "2026-10-05T00:23:40.175Z" }, - { url = "https://files.pythonhosted.org/packages/92/8f/285f862826f721964ec7c42f81dc53d23afbd723a0f4cd989651f8218e25/wcwidth-0.9.2-cp310-abi3-musllinux_1_2_aarch64.whl", hash = "sha256:c3d80f39ba4653a595edae9aa46a509d14883790a8fc23c5db221ceb207f64b7", size = 782134, upload-time = "2026-10-05T00:23:33.926Z" }, - { url = "https://files.pythonhosted.org/packages/c2/2d/64aa54882a5d556d3654c1f926d9118b797461033e23a158409941a37c8f/wcwidth-0.9.2-cp310-abi3-musllinux_1_2_i686.whl", hash = "sha256:0a47e03d8293590ecce66c45dc20ff7b4b885e3c78093722239585eca0d77ab2", size = 782851, upload-time = "2026-10-05T00:23:41.974Z" }, - { url = "https://files.pythonhosted.org/packages/59/39/52389f6de7fe2e9c14ceb8253dd99034bd86e1c87847ea3c100a97dded9a/wcwidth-0.9.2-cp310-abi3-musllinux_1_2_x86_64.whl", hash = "sha256:67d901a4ad99249eb775b4ee4769ca97fa405d35a75f46e83166910a47003f04", size = 784621, upload-time = "2026-10-05T00:23:43.449Z" }, - { url = "https://files.pythonhosted.org/packages/b3/8b/20225500a076ace27bbcc8a6fd7c55125133c57a618816c7b7b8b73070b1/wcwidth-0.9.2-cp310-abi3-win32.whl", hash = "sha256:ee1fd0db9d9fd711a70f3e7765e0e04c05d26982fa05361456163062549d7da4", size = 593123, upload-time = "2026-10-05T00:23:55.953Z" }, - { url = "https://files.pythonhosted.org/packages/5a/d6/b0690f55ea0483530a18bac917fbadbf54f35122510446fc370f5f1c2453/wcwidth-0.9.2-cp310-abi3-win_amd64.whl", hash = "sha256:2a9746de704242bd4fdaabb31dd46b82f694a56a8d21081ad89b679a89da9fec", size = 597827, upload-time = "2026-10-05T00:23:57.489Z" }, - { url = "https://files.pythonhosted.org/packages/e5/11/6ecf4e9e268ab1a4ec617ffcccc2ee4a71301625f5490912dbaba462fa9c/wcwidth-0.9.2-cp310-abi3-win_arm64.whl", hash = "sha256:b9c6ab615e03723b7f8760ea2f27758d656e7e13b51515c9dca5c3e8b04612fa", size = 598415, upload-time = "2026-10-05T00:23:51.517Z" }, - { url = "https://files.pythonhosted.org/packages/9c/b4/0bfa065af506540d9d558e3e5548cff00bc1f9b24e6e2a8512498e8628de/wcwidth-0.9.2-py3-none-any.whl", hash = "sha256:89ca642c5bf0101157a09366be69fad0379db1f700ae39a920e103234573670e", size = 301667, upload-time = "2026-10-05T00:23:21.097Z" }, -] - -[[package]] -name = "werkzeug" -version = "3.1.9" -source = { registry = "https://pypi.org/simple" } -dependencies = [ - { name = "markupsafe" }, -] -sdist = { url = "https://files.pythonhosted.org/packages/a4/34/4dd12fc8bb7d61c91467ec3efe415ffa7d5456f799954b40c5bbaeae470e/werkzeug-3.1.9.tar.gz", hash = "sha256:55ca7c70a75689be937aa27f8ff4b018f06ff4838fc73045560bf0f5a1291060", size = 940188, upload-time = "2026-09-27T18:33:41.637Z" } -wheels = [ - { url = "https://files.pythonhosted.org/packages/a1/38/df03f564f43cec2684823f3cccae1a652ee7face1cbaa76fb223096e64d7/werkzeug-3.1.9-py3-none-any.whl", hash = "sha256:6392e50c78460ba618e5b21f08a71f59c99ce99cdc6cf6e3dd7e6ccca8754fab", size = 228700, upload-time = "2026-09-27T18:33:39.685Z" }, -] From 1da13ce024202c188e84890879652dc4a8577671 Mon Sep 17 00:00:00 2001 From: Tristan Gerrish Date: Fri, 6 Nov 2026 10:42:51 +0000 Subject: [PATCH 12/16] updated build-event and prevented pre-commit hook formatting temporarily --- Python_Engine/Python/scripts/pre_commit.ps1 | 2 +- Python_Engine/Python_Engine.csproj | 10 ++++++---- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/Python_Engine/Python/scripts/pre_commit.ps1 b/Python_Engine/Python/scripts/pre_commit.ps1 index 8b9198c0..aea83fd7 100644 --- a/Python_Engine/Python/scripts/pre_commit.ps1 +++ b/Python_Engine/Python/scripts/pre_commit.ps1 @@ -31,5 +31,5 @@ function Format-PythonFiles { } if ($Run -or $MyInvocation.InvocationName -ne '.') { - Format-PythonFiles + # Format-PythonFiles # commented out for now to save auto-formatting the Python files that need to be left alone } diff --git a/Python_Engine/Python_Engine.csproj b/Python_Engine/Python_Engine.csproj index 20aabe05..e07ab6e1 100644 --- a/Python_Engine/Python_Engine.csproj +++ b/Python_Engine/Python_Engine.csproj @@ -11,6 +11,11 @@ ..\Build\ Debug;Release;Test + + + + + @@ -36,13 +41,10 @@ False - - - - + From 8e3f1fb3914483f8284cbd658cf1a454b0faa81d Mon Sep 17 00:00:00 2001 From: Tristan Gerrish Date: Fri, 6 Nov 2026 12:12:45 +0000 Subject: [PATCH 13/16] updated tests to simplify creation of python_toolkit venv and tidied methods --- .../{InstallRemoveTestBase.cs => Base.cs} | 2 +- .../Python_Engine_Test/Compute/Install.cs | 71 ++++--------------- .../Python_Engine_Test/Compute/Remove.cs | 5 +- .../Python_Engine_Test/Compute/Run.cs | 4 +- .../Compute/VirtualEnvironment.cs | 10 +-- .../{Compute/Pytest.cs => PythonToolkit.cs} | 49 ++++++------- .../Python_Engine_Test/Query/Directory.cs | 5 +- Python_Engine/Compute/Remove.cs | 7 +- Python_Engine/Compute/Run.cs | 1 - Python_Engine/Compute/VirtualEnvironment.cs | 11 +-- Python_Engine/Modify/AddQuotesIfRequired.cs | 7 +- Python_Engine/Python/setup.py | 22 ------ Python_Engine/Query/Directory.cs | 6 +- Python_Engine/Query/Version.cs | 4 +- Python_Engine/Query/VirtualEnvironment.cs | 10 +-- 15 files changed, 69 insertions(+), 145 deletions(-) rename .ci/unit_tests/Python_Engine_Test/Compute/{InstallRemoveTestBase.cs => Base.cs} (99%) rename .ci/unit_tests/Python_Engine_Test/{Compute/Pytest.cs => PythonToolkit.cs} (66%) delete mode 100644 Python_Engine/Python/setup.py diff --git a/.ci/unit_tests/Python_Engine_Test/Compute/InstallRemoveTestBase.cs b/.ci/unit_tests/Python_Engine_Test/Compute/Base.cs similarity index 99% rename from .ci/unit_tests/Python_Engine_Test/Compute/InstallRemoveTestBase.cs rename to .ci/unit_tests/Python_Engine_Test/Compute/Base.cs index 0c112576..a0b981d6 100644 --- a/.ci/unit_tests/Python_Engine_Test/Compute/InstallRemoveTestBase.cs +++ b/.ci/unit_tests/Python_Engine_Test/Compute/Base.cs @@ -29,7 +29,7 @@ namespace BH.Tests.Engine.Python.Compute { - public abstract class InstallRemoveTestBase + public abstract class Base { protected string m_Root = null!; protected PythonEnvironment m_Environment = null!; diff --git a/.ci/unit_tests/Python_Engine_Test/Compute/Install.cs b/.ci/unit_tests/Python_Engine_Test/Compute/Install.cs index c44df2d6..1e48986c 100644 --- a/.ci/unit_tests/Python_Engine_Test/Compute/Install.cs +++ b/.ci/unit_tests/Python_Engine_Test/Compute/Install.cs @@ -27,56 +27,9 @@ namespace BH.Tests.Engine.Python.Compute { [NonParallelizable] - public class InstallTests : InstallRemoveTestBase + public class Install : Base { - [Test] - public void InstallPythonToolkitVenv_InstallsAndReloadsToolkitEnvironment() - { - DirectoryInfo? repository = new DirectoryInfo(TestContext.CurrentContext.TestDirectory); - while (repository != null && !File.Exists(Path.Combine(repository.FullName, "Python_Engine", "Python", "pyproject.toml"))) - repository = repository.Parent; - repository.Should().NotBeNull("the toolkit sources must be available"); - string source = Path.Combine(repository!.FullName, "Python_Engine", "Python"); - string directory = Path.Combine(EngineQuery.DirectoryEnvironments(), EngineQuery.ToolkitName()); - - WithIsolatedDirectory(directory, () => - { - foreach (string file in new[] { "pyproject.toml", "README.md" }) - File.Copy(Path.Combine(source, file), Path.Combine(directory, file)); - string sourceFolder = Path.Combine(source, "src"); - foreach (string file in Directory.EnumerateFiles(sourceFolder, "*", SearchOption.AllDirectories)) - { - string relative = Path.GetRelativePath(sourceFolder, file); - if (relative.Split(Path.DirectorySeparatorChar).Contains("__pycache__")) - continue; - string destination = Path.Combine(directory, "src", relative); - Directory.CreateDirectory(Path.GetDirectoryName(destination)!); - File.Copy(file, destination); - } - - try - { - var venv = EngineCompute.InstallPythonToolkitVenv(run: true, reload: false); - - venv.Should().NotBeNull(); - venv.Name.Should().Be(EngineQuery.ToolkitName()); - venv.Executable.Should().Be(Path.Combine(directory, ".venv", "Scripts", "python.exe")); - File.Exists(venv.Executable).Should().BeTrue(); - EngineCompute.RunPythonString(venv, - "import importlib.metadata; print(importlib.metadata.version('python_toolkit'))") - .Should().Be(BH.Engine.Base.Query.BHoMVersion()); - File.Exists(Path.Combine(m_Root, "jupyter", "kernels", venv.Name.ToLowerInvariant(), "kernel.json")).Should().BeTrue(); - EngineCompute.InstallPythonToolkitVenv(run: true, reload: true).Executable.Should().Be(venv.Executable); - AssertNoErrors(); - } - finally - { - string kernel = Path.Combine(m_Root, "jupyter", "kernels", EngineQuery.ToolkitName().ToLowerInvariant(), "kernel.json"); - if (File.Exists(kernel) && EngineQuery.VirtualEnvironmentExists(EngineQuery.ToolkitName())) - EngineCompute.RemoveJupyterKernel(EngineQuery.ToolkitName(), run: true); - } - }); - } + private static readonly string[] test = ["pyproject.toml", "README.md"]; [Test] public void InstallUV_InstallsMissingTools() @@ -85,7 +38,7 @@ public void InstallUV_InstallsMissingTools() EngineCompute.InstallUV(run: true); - string tools = Run(BH.Engine.Python.Query.UVExecutable(), "tool", "list"); + string tools = Run(EngineQuery.UVExecutable(), "tool", "list"); foreach (string tool in new[] { "ruff", "jupyterlab", "sphinx" }) tools.Should().Contain(tool + " v1.0.0"); AssertNoErrors(); @@ -103,9 +56,9 @@ public void InstallUV_SkipsExistingTools() EngineCompute.InstallUV(run: true); Environment.GetEnvironmentVariable("PATH")!.Split(Path.PathSeparator)[0] - .Should().Be(BH.Engine.Python.Query.DirectoryTools()); - BH.Engine.Python.Query.UVExecutable().Should() - .Be(Path.Combine(BH.Engine.Python.Query.DirectoryTools(), "uv.exe")); + .Should().Be(EngineQuery.DirectoryTools()); + EngineQuery.UVExecutable().Should() + .Be(Path.Combine(EngineQuery.DirectoryTools(), "uv.exe")); foreach (var receipt in timestamps) File.GetLastWriteTimeUtc(receipt.Key).Should().Be(receipt.Value); AssertNoErrors(); @@ -115,11 +68,11 @@ public void InstallUV_SkipsExistingTools() public void InstallPackages_SkipsSatisfiedVersion() { PreparePackageVersions(); - EngineCompute.InstallPackages(m_Environment, new() { "bhom-repeat-package==1.0.0" }, run: true); + EngineCompute.InstallPackages(m_Environment, ["bhom-repeat-package==1.0.0"], run: true); string metadata = PackageMetadata("bhom_repeat_package", "1.0.0"); DateTime timestamp = File.GetLastWriteTimeUtc(metadata); - EngineCompute.InstallPackages(m_Environment, new() { "bhom-repeat-package>=1,<2" }, run: true); + EngineCompute.InstallPackages(m_Environment, ["bhom-repeat-package>=1,<2"], run: true); File.GetLastWriteTimeUtc(metadata).Should().Be(timestamp); AssertNoErrors(); @@ -129,9 +82,9 @@ public void InstallPackages_SkipsSatisfiedVersion() public void InstallPackages_ChangesUnsatisfiedVersion() { PreparePackageVersions(); - EngineCompute.InstallPackages(m_Environment, new() { "bhom-repeat-package==1.0.0" }, run: true); + EngineCompute.InstallPackages(m_Environment, ["bhom-repeat-package==1.0.0"], run: true); - EngineCompute.InstallPackages(m_Environment, new() { "bhom-repeat-package==2.0.0" }, run: true); + EngineCompute.InstallPackages(m_Environment, ["bhom-repeat-package==2.0.0"], run: true); File.Exists(PackageMetadata("bhom_repeat_package", "2.0.0")).Should().BeTrue(); File.Exists(PackageMetadata("bhom_repeat_package", "1.0.0")).Should().BeFalse(); @@ -142,12 +95,12 @@ public void InstallPackages_ChangesUnsatisfiedVersion() public void InstallPackages_RegistersAlreadyInstalledProjectDependency() { PreparePackageVersions(); - EngineCompute.InstallPackages(m_Environment, new() { "bhom-repeat-package==1.0.0" }, run: true); + EngineCompute.InstallPackages(m_Environment, ["bhom-repeat-package==1.0.0"], run: true); string metadata = PackageMetadata("bhom_repeat_package", "1.0.0"); DateTime timestamp = File.GetLastWriteTimeUtc(metadata); CreateProject(); - EngineCompute.InstallPackages(m_Environment, new() { "bhom-repeat-package==1.0.0" }, run: true); + EngineCompute.InstallPackages(m_Environment, ["bhom-repeat-package==1.0.0"], run: true); File.ReadAllText(Path.Combine(m_Root, "pyproject.toml")).Should().Contain("bhom-repeat-package==1.0.0"); File.GetLastWriteTimeUtc(metadata).Should().Be(timestamp); diff --git a/.ci/unit_tests/Python_Engine_Test/Compute/Remove.cs b/.ci/unit_tests/Python_Engine_Test/Compute/Remove.cs index 74f2ac23..b1f61147 100644 --- a/.ci/unit_tests/Python_Engine_Test/Compute/Remove.cs +++ b/.ci/unit_tests/Python_Engine_Test/Compute/Remove.cs @@ -21,13 +21,14 @@ */ using FluentAssertions; +using System.IO; using EngineCompute = BH.Engine.Python.Compute; using EngineQuery = BH.Engine.Python.Query; namespace BH.Tests.Engine.Python.Compute { [NonParallelizable] - public class RemoveTests : InstallRemoveTestBase + public class Remove : Base { [Test] public void RemoveKernel_WarnsWhenEnvironmentDoesNotExist() @@ -73,7 +74,7 @@ public void RemoveVirtualEnvironment_RemovesEnvironmentWithoutKernelThenWarnsOnR { EngineCompute.RemoveVirtualEnvironment(m_Environment.Name, run: true); - Directory.Exists(m_Root).Should().BeFalse(); + Directory.Exists(Path.Combine(m_Root, ".venv")).Should().BeFalse(); AssertWarningWithoutErrors(); BH.Engine.Base.Compute.ClearCurrentEvents(); EngineCompute.RemoveVirtualEnvironment(m_Environment.Name, run: true); diff --git a/.ci/unit_tests/Python_Engine_Test/Compute/Run.cs b/.ci/unit_tests/Python_Engine_Test/Compute/Run.cs index ec2544e4..bd0c1824 100644 --- a/.ci/unit_tests/Python_Engine_Test/Compute/Run.cs +++ b/.ci/unit_tests/Python_Engine_Test/Compute/Run.cs @@ -23,12 +23,14 @@ using BH.oM.Base.Debugging; using FluentAssertions; using System.Diagnostics; +using System.Text.RegularExpressions; using EngineCompute = BH.Engine.Python.Compute; +using EngineQuery = BH.Engine.Python.Query; namespace BH.Tests.Engine.Python.Compute { [NonParallelizable] - public class RunTests + public class Run { [SetUp] [TearDown] diff --git a/.ci/unit_tests/Python_Engine_Test/Compute/VirtualEnvironment.cs b/.ci/unit_tests/Python_Engine_Test/Compute/VirtualEnvironment.cs index 7c921ad2..80d8ecee 100644 --- a/.ci/unit_tests/Python_Engine_Test/Compute/VirtualEnvironment.cs +++ b/.ci/unit_tests/Python_Engine_Test/Compute/VirtualEnvironment.cs @@ -29,7 +29,7 @@ namespace BH.Tests.Engine.Python.Compute { [NonParallelizable] - public class VirtualEnvironmentTests + public class VirtualEnvironment { private readonly Dictionary m_OriginalVariables = []; private string m_TestDirectory = null!; @@ -77,7 +77,7 @@ public void CleanUpTools() } [Test] - public void FromTargetVersion_CreatesReloadsAndRemovesEnvironmentAndKernel() + public void VirtualEnvironment_FromTargetVersion_CreatesReloadsAndRemovesEnvironmentAndKernel() { PythonEnvironment venv = EngineCompute.VirtualEnvironment("3.11", m_Name); venv.Should().NotBeNull(); @@ -89,13 +89,13 @@ public void FromTargetVersion_CreatesReloadsAndRemovesEnvironmentAndKernel() EngineCompute.RemoveVirtualEnvironment(m_Name, run: true); - Directory.Exists(m_Directory).Should().BeFalse(); + Directory.Exists(Path.Combine(m_Directory, ".venv")).Should().BeFalse(); File.Exists(KernelFile()).Should().BeFalse(); AssertNoErrors(); } [Test] - public void FromTOML_InstallsBHoMVersionRecreatesAndRemovesEnvironment() + public void VirtualEnvironment_FromTOML_CreatesReloadsAndRemovesEnvironmentAndKernel() { string packageDirectory = Path.Combine(m_Directory, "src", m_Name); Directory.CreateDirectory(packageDirectory); @@ -121,7 +121,7 @@ public void FromTOML_InstallsBHoMVersionRecreatesAndRemovesEnvironment() EngineCompute.VirtualEnvironment(tomlFile, reload: true).Executable.Should().Be(venv.Executable); EngineCompute.RemoveVirtualEnvironment(m_Name, run: true); - Directory.Exists(m_Directory).Should().BeFalse(); + Directory.Exists(Path.Combine(m_Directory, ".venv")).Should().BeFalse(); File.Exists(KernelFile()).Should().BeFalse(); AssertNoErrors(); } diff --git a/.ci/unit_tests/Python_Engine_Test/Compute/Pytest.cs b/.ci/unit_tests/Python_Engine_Test/PythonToolkit.cs similarity index 66% rename from .ci/unit_tests/Python_Engine_Test/Compute/Pytest.cs rename to .ci/unit_tests/Python_Engine_Test/PythonToolkit.cs index 36157922..30ecad5b 100644 --- a/.ci/unit_tests/Python_Engine_Test/Compute/Pytest.cs +++ b/.ci/unit_tests/Python_Engine_Test/PythonToolkit.cs @@ -20,21 +20,35 @@ * along with this code. If not, see . */ -using FluentAssertions; using BH.oM.Base.Debugging; +using BH.oM.Python; +using BH.Tests.Engine.Python.Compute; +using FluentAssertions; using System.Text.RegularExpressions; using EngineCompute = BH.Engine.Python.Compute; using EngineQuery = BH.Engine.Python.Query; -namespace BH.Tests.Engine.Python.Compute +namespace BH.Tests.Engine.Python { [NonParallelizable] - public class Pytest + public class PythonToolkit : Base { + [Test, Order(9998)] + [Ignore("Disabled for now.")] + public void ZZZ_InstallPythonToolkitVenv() + { + BH.Engine.Base.Compute.ClearCurrentEvents(); + EngineCompute.InstallPythonToolkitVenv(run: true, reload: false); + AssertNoErrors(); + } + [Test, Order(9999)] - public void Execute_Pytests() + [Ignore("Disabled for now.")] + public void ZZZ_Pytest() { - DirectoryInfo? repository = new DirectoryInfo(TestContext.CurrentContext.TestDirectory); + BH.Engine.Base.Compute.ClearCurrentEvents(); + EngineCompute.InstallPythonToolkitVenv(run: true, reload: false); + DirectoryInfo? repository = new(TestContext.CurrentContext.TestDirectory); while (repository != null && !File.Exists(Path.Combine(repository.FullName, "Python_Engine", "Python", "pyproject.toml"))) repository = repository.Parent; repository.Should().NotBeNull("the toolkit sources must be available to run pytest"); @@ -46,32 +60,11 @@ public void Execute_Pytests() try { - Directory.CreateDirectory(directory); - foreach (string file in new[] { "pyproject.toml", "README.md" }) - File.Copy(Path.Combine(source, file), Path.Combine(directory, file)); - foreach (string folder in new[] { "src", "tests" }) - { - string sourceFolder = Path.Combine(source, folder); - foreach (string file in Directory.EnumerateFiles(sourceFolder, "*", SearchOption.AllDirectories)) - { - string relative = Path.GetRelativePath(sourceFolder, file); - if (relative.Split(Path.DirectorySeparatorChar).Contains("__pycache__")) - continue; - string destination = Path.Combine(directory, folder, relative); - Directory.CreateDirectory(Path.GetDirectoryName(destination)!); - File.Copy(file, destination); - } - } + PythonEnvironment venv = EngineCompute.InstallPythonToolkitVenv(run: true, reload: false); - var venv = EngineCompute.VirtualEnvironment(Path.Combine(directory, "pyproject.toml"), reload: false); venv.Should().NotBeNull("environment installation must succeed: {0}", string.Join(Environment.NewLine, BH.Engine.Base.Query.CurrentEvents().Where(e => e.Type == EventType.Error).Select(e => e.Message))); - // Sync explicitly: a reloaded environment is not guaranteed to include dev dependencies. - var sync = EngineCompute.RunCommandStdout( - $"\"{EngineQuery.UVExecutable()}\" sync --all-packages --group dev", startDirectory: directory); - sync.Item3.Should().Be(0, "dev dependency installation must succeed:\n{0}\n{1}", sync.Item1, sync.Item2); - var result = EngineCompute.RunCommandStdout( $"set \"SKIP_LONG_PYTEST=1\" && \"{venv.Executable}\" -m pytest -ra", startDirectory: directory, timeoutMinutes: 10); @@ -98,4 +91,4 @@ public void Execute_Pytests() } } } -} \ No newline at end of file +} diff --git a/.ci/unit_tests/Python_Engine_Test/Query/Directory.cs b/.ci/unit_tests/Python_Engine_Test/Query/Directory.cs index bcca18c8..665a9596 100644 --- a/.ci/unit_tests/Python_Engine_Test/Query/Directory.cs +++ b/.ci/unit_tests/Python_Engine_Test/Query/Directory.cs @@ -21,6 +21,7 @@ */ using FluentAssertions; +using EngineQuery = BH.Engine.Python.Query; namespace BH.Tests.Engine.Python.Query { @@ -30,7 +31,7 @@ public class Directory_Tests public void DirectoryExtension() { string extensionsDirectory = "C:\\ProgramData\\BHoM\\Extensions"; - var result = new DirectoryInfo(BH.Engine.Python.Query.DirectoryExtensions()); + var result = new DirectoryInfo(EngineQuery.DirectoryExtensions()); Assert.That(result, Is.Not.Null); result.FullName.Should().Be(extensionsDirectory); @@ -41,7 +42,7 @@ public void DirectoryExtension() public void DirectoryEnvironments() { string environmentsDirectory = "C:\\ProgramData\\BHoM\\Extensions\\Python"; - var result = new DirectoryInfo(BH.Engine.Python.Query.DirectoryEnvironments()); + var result = new DirectoryInfo(EngineQuery.DirectoryEnvironments()); Assert.That(result, Is.Not.Null); result.FullName.Should().Be(environmentsDirectory); diff --git a/Python_Engine/Compute/Remove.cs b/Python_Engine/Compute/Remove.cs index 77f4b094..d6af1c57 100644 --- a/Python_Engine/Compute/Remove.cs +++ b/Python_Engine/Compute/Remove.cs @@ -29,7 +29,7 @@ namespace BH.Engine.Python { public static partial class Compute { - [Description("Remove the named Python virtual environment. Missing environments produce a warning instead of an error.")] + [Description("Remove the named Python virtual environment. Missing environments produce a warning instead of an error. This will retain any code within that environment directory.")] [Input("name", "The name of the Python virtual environment to remove.")] [Input("run", "Run this method.")] public static void RemoveVirtualEnvironment(string name, bool run = false) @@ -40,12 +40,11 @@ public static void RemoveVirtualEnvironment(string name, bool run = false) return; } - string venvDirectory = Path.Combine(Query.DirectoryEnvironments(), name); + string venvDirectory = Path.Combine(Query.DirectoryEnvironments(), name, ".venv"); if (run) { RemoveJupyterKernel(name, run); - try { Directory.Delete(venvDirectory, true); @@ -109,7 +108,7 @@ public static void RemoveUV(bool run = false) } catch (IOException ex) { - Base.Compute.RecordError($"Failed to remove UV tools directory {toolsDirectory}: {ex.Message}"); + Base.Compute.RecordError($"Failed to remove UV from {toolsDirectory}: {ex.Message}"); } } else diff --git a/Python_Engine/Compute/Run.cs b/Python_Engine/Compute/Run.cs index 633ca354..82e3d7fd 100644 --- a/Python_Engine/Compute/Run.cs +++ b/Python_Engine/Compute/Run.cs @@ -23,7 +23,6 @@ using BH.oM.Base.Attributes; using BH.oM.Base; using System; -using System.Collections.Generic; using System.ComponentModel; using System.Diagnostics; using System.IO; diff --git a/Python_Engine/Compute/VirtualEnvironment.cs b/Python_Engine/Compute/VirtualEnvironment.cs index 18d592c1..e33d2e07 100644 --- a/Python_Engine/Compute/VirtualEnvironment.cs +++ b/Python_Engine/Compute/VirtualEnvironment.cs @@ -127,18 +127,21 @@ public static PythonEnvironment VirtualEnvironment(string tomlFile, bool reload if (reload) { PythonEnvironment existingVenv = new PythonEnvironment() { Executable = Query.VirtualEnvironmentExecutable(name), Name = name }; + + string updateCmd = $"\"{Query.UVExecutable()}\" sync --all-packages"; + if (RunCommandStdout(updateCmd, startDirectory: directory).Item3 != 0) + return null; + return existingVenv; } else { - RemoveJupyterKernel(name, run: true); - // Retain the TOML file and package sources while recreating the environment. - Directory.Delete(Path.Combine(directory, ".venv"), true); + RemoveVirtualEnvironment(name: name, run: true); } } string updatedProject = versionField.Replace(projectContent, - match => match.Groups["prefix"].Value + $"\"{BH.Engine.Base.Query.BHoMVersion()}\"", 1); + match => match.Groups["prefix"].Value + $"\"{Base.Query.BHoMVersion()}\"", 1); Group content = project.Groups["content"]; File.WriteAllText(tomlFile, toml.Substring(0, content.Index) + updatedProject + toml.Substring(content.Index + content.Length)); diff --git a/Python_Engine/Modify/AddQuotesIfRequired.cs b/Python_Engine/Modify/AddQuotesIfRequired.cs index fcd31693..e9be36dd 100644 --- a/Python_Engine/Modify/AddQuotesIfRequired.cs +++ b/Python_Engine/Modify/AddQuotesIfRequired.cs @@ -21,12 +21,7 @@ */ using BH.oM.Base.Attributes; -using System; -using System.Collections.Generic; using System.ComponentModel; -using System.Linq; -using System.Text; -using System.Threading.Tasks; namespace BH.Engine.Python { @@ -38,7 +33,7 @@ public static partial class Modify public static string AddQuotesIfRequired(this string path) { return !string.IsNullOrWhiteSpace(path) ? - path.Contains(" ") && (!path.StartsWith("\"") && !path.EndsWith("\"")) ? + path.Contains(" ") && !path.StartsWith("\"") && !path.EndsWith("\"") ? "\"" + path + "\"" : path : string.Empty; } diff --git a/Python_Engine/Python/setup.py b/Python_Engine/Python/setup.py deleted file mode 100644 index 1132b946..00000000 --- a/Python_Engine/Python/setup.py +++ /dev/null @@ -1,22 +0,0 @@ -from pathlib import Path -import setuptools - -TOOLKIT_NAME = "Python_Toolkit" - -here = Path(__file__).parent.resolve() - -def _bhom_version() -> str: - """Return the version of BHoM installed (using the BHoM.dll in the root BHoM directory.""" - versionFile = here / "VERSION.txt" #version file is created in a pre-build event in Python_Engine.csproj - return versionFile.read_text(); - -BHOM_VERSION = _bhom_version() - -long_description = (here / "README.md").read_text(encoding="utf-8") - -setuptools.setup( - description=f"A Python library that contains minimal code intended to be used by the {TOOLKIT_NAME} Python environment for BHoM workflows.", - long_description=long_description, - long_description_content_type="text/markdown", - version=BHOM_VERSION, -) diff --git a/Python_Engine/Query/Directory.cs b/Python_Engine/Query/Directory.cs index 17c22b62..ab4a19ed 100644 --- a/Python_Engine/Query/Directory.cs +++ b/Python_Engine/Query/Directory.cs @@ -32,14 +32,14 @@ public static partial class Query [Output("path", "The location where BHoM extensions reside.")] public static string DirectoryExtensions() { - return Path.Combine(System.IO.Directory.GetParent(BH.Engine.Base.Query.BHoMFolder()).FullName, "Extensions"); + return Path.Combine(Directory.GetParent(Base.Query.BHoMFolder()).FullName, "Extensions"); } [Description("The location where any BHoM-related Python environment (or virtualenv) resides.")] [Output("path", "The location where any BHoM-related Python environment (or virtualenv) resides.")] public static string DirectoryEnvironments() { - string dir = Path.Combine(Query.DirectoryExtensions(), "Python"); + string dir = Path.Combine(DirectoryExtensions(), "Python"); if (!Directory.Exists(dir)) Directory.CreateDirectory(dir); return dir; @@ -49,7 +49,7 @@ public static string DirectoryEnvironments() [Output("path", "The location where any BHoM-related Python tools reside.")] public static string DirectoryTools() { - string dir = Path.Combine(Query.DirectoryExtensions(), "Python", "tools"); + string dir = Path.Combine(DirectoryExtensions(), "Python", "tools"); if (!Directory.Exists(dir)) Directory.CreateDirectory(dir); return dir; diff --git a/Python_Engine/Query/Version.cs b/Python_Engine/Query/Version.cs index 244e6eee..89d86359 100644 --- a/Python_Engine/Query/Version.cs +++ b/Python_Engine/Query/Version.cs @@ -36,11 +36,11 @@ public static string Version(string pythonExecutable) { if (!File.Exists(pythonExecutable)) { - BH.Engine.Base.Compute.RecordError(new FileNotFoundException(), $"No file found at {pythonExecutable}"); + Base.Compute.RecordError(new FileNotFoundException(), $"No file found at {pythonExecutable}"); return null; } - var result = BH.Engine.Python.Compute.RunCommandStdout(command: $"\"{pythonExecutable}\" --version"); + var result = Compute.RunCommandStdout(command: $"\"{pythonExecutable}\" --version"); if (result.Item3 != 0) return null; diff --git a/Python_Engine/Query/VirtualEnvironment.cs b/Python_Engine/Query/VirtualEnvironment.cs index f2b64874..51e7ba12 100644 --- a/Python_Engine/Query/VirtualEnvironment.cs +++ b/Python_Engine/Query/VirtualEnvironment.cs @@ -35,7 +35,7 @@ public static partial class Query [Output("executable", "The path to the executable.")] public static string VirtualEnvironmentExecutable(string name) { - string exePath = Path.Combine(Query.DirectoryEnvironments(), name, ".venv", "Scripts", "python.exe"); + string exePath = Path.Combine(DirectoryEnvironments(), name, ".venv", "Scripts", "python.exe"); if (!File.Exists(exePath)) { Base.Compute.RecordError($"{exePath} was not found."); @@ -50,7 +50,7 @@ public static string VirtualEnvironmentExecutable(string name) [Output("exists", "True if exists, False if not.")] public static bool VirtualEnvironmentExists(string name) { - string expectedVenvPath = Path.Combine(Query.DirectoryEnvironments(), name, ".venv"); + string expectedVenvPath = Path.Combine(DirectoryEnvironments(), name, ".venv"); if (Directory.Exists(expectedVenvPath) && File.Exists(Path.Combine(expectedVenvPath, "Scripts", "python.exe"))) return true; @@ -65,7 +65,7 @@ public static PythonEnvironment VirtualEnvironment(string name) { if (!VirtualEnvironmentExists(name)) { - Base.Compute.RecordError($"{name} was not found in {Query.DirectoryEnvironments()}"); + Base.Compute.RecordError($"{name} was not found in {DirectoryEnvironments()}"); return null; } @@ -83,11 +83,11 @@ public static string VirtualEnvironmentDirectory(string name) { if (!VirtualEnvironmentExists(name)) { - Base.Compute.RecordError($"{name} was not found in {Query.DirectoryEnvironments()}"); + Base.Compute.RecordError($"{name} was not found in {DirectoryEnvironments()}"); return null; } - return Path.Combine(Query.DirectoryEnvironments(), name); + return Path.Combine(DirectoryEnvironments(), name); } } } From 1ec0770d0d61e56181f871d9fd6d6731ffaf5a72 Mon Sep 17 00:00:00 2001 From: Tristan Gerrish Date: Mon, 9 Nov 2026 15:26:05 +0000 Subject: [PATCH 14/16] moved regex version=X.X.X matching to its own private static object --- Python_Engine/Compute/VirtualEnvironment.cs | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/Python_Engine/Compute/VirtualEnvironment.cs b/Python_Engine/Compute/VirtualEnvironment.cs index e33d2e07..c30e8982 100644 --- a/Python_Engine/Compute/VirtualEnvironment.cs +++ b/Python_Engine/Compute/VirtualEnvironment.cs @@ -31,6 +31,8 @@ namespace BH.Engine.Python { public static partial class Compute { + private static readonly Regex m_VersionField = new Regex(@"(?m)^(?[ \t]*version[ \t]*=[ \t]*)(?['""])[^'""\r\n]*\k"); + [PreviousVersion("9.3", "BH.Engine.Python.Compute.VirtualEnvironment(PythonVersion, string, bool)")] [Description("Create a Python Virtual Environment of a given version and name.")] [Input("version", "The version of Python to use for this environment.")] @@ -115,8 +117,7 @@ public static PythonEnvironment VirtualEnvironment(string tomlFile, bool reload } string projectContent = project.Groups["content"].Value; - Regex versionField = new Regex(@"(?m)^(?[ \t]*version[ \t]*=[ \t]*)(?['""])[^'""\r\n]*\k"); - if (!versionField.IsMatch(projectContent)) + if (!m_VersionField.IsMatch(projectContent)) { Base.Compute.RecordError($"A static [project] version is required in {tomlFile}."); return null; @@ -140,7 +141,7 @@ public static PythonEnvironment VirtualEnvironment(string tomlFile, bool reload } } - string updatedProject = versionField.Replace(projectContent, + string updatedProject = m_VersionField.Replace(projectContent, match => match.Groups["prefix"].Value + $"\"{Base.Query.BHoMVersion()}\"", 1); Group content = project.Groups["content"]; File.WriteAllText(tomlFile, toml.Substring(0, content.Index) + updatedProject + toml.Substring(content.Index + content.Length)); From dfb11165eca39bc326445d5c0ad5813e49b9d740 Mon Sep 17 00:00:00 2001 From: Tristan Gerrish Date: Mon, 9 Nov 2026 15:34:01 +0000 Subject: [PATCH 15/16] updated toml to add comment about placeholder version (and rmeoved this in the private static object too) --- Python_Engine/Compute/VirtualEnvironment.cs | 2 +- Python_Engine/Python/pyproject.toml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Python_Engine/Compute/VirtualEnvironment.cs b/Python_Engine/Compute/VirtualEnvironment.cs index c30e8982..730ecaac 100644 --- a/Python_Engine/Compute/VirtualEnvironment.cs +++ b/Python_Engine/Compute/VirtualEnvironment.cs @@ -31,7 +31,7 @@ namespace BH.Engine.Python { public static partial class Compute { - private static readonly Regex m_VersionField = new Regex(@"(?m)^(?[ \t]*version[ \t]*=[ \t]*)(?['""])[^'""\r\n]*\k"); + private static readonly Regex m_VersionField = new Regex(@"(?m)^(?[ \t]*version[ \t]*=[ \t]*)(?['""])[^'""\r\n]*\k(?:[ \t]*#.*)?$"); [PreviousVersion("9.3", "BH.Engine.Python.Compute.VirtualEnvironment(PythonVersion, string, bool)")] [Description("Create a Python Virtual Environment of a given version and name.")] diff --git a/Python_Engine/Python/pyproject.toml b/Python_Engine/Python/pyproject.toml index b388b131..86b25cd9 100644 --- a/Python_Engine/Python/pyproject.toml +++ b/Python_Engine/Python/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "python_toolkit" -version = "999.999.999" +version = "999.999.999" # This placeholder value is replaced by the BHoM build system during packaging. description = "The core BHoM Python toolkit environment, containing essential tools and utilities." readme = "README.md" requires-python = ">=3.10,<3.11" From f10915cddba79c5107b8e0e3de1bcfc879dc8fac Mon Sep 17 00:00:00 2001 From: Tristan Gerrish Date: Mon, 30 Nov 2026 16:27:42 +0000 Subject: [PATCH 16/16] post Claude refactor --- .../Python_Engine_Test/Compute/Base.cs | 10 +- .../Python_Engine_Test/Compute/Install.cs | 89 +- .../Python_Engine_Test/Compute/Remove.cs | 42 +- .../Python_Engine_Test/Compute/RunPytest.cs | 93 ++ .../Compute/VirtualEnvironment.cs | 144 ++- .../Python_Engine_Test/PythonToolkit.cs | 155 ++-- .../Python_Engine_Test.csproj | 8 +- .../Python_Engine_Test/Query/Directory.cs | 58 +- .../Python_Engine_Test/TestEnvironment.cs | 145 +++ .github/workflows/python.yml | 59 ++ .gitignore | 14 +- .pre-commit-config.yaml | 18 + .vscode/extensions.json | 9 + .vscode/launch.json | 26 + .vscode/settings.json | 35 + .vscode/tasks.json | 95 ++ Python_Engine/Compute/CreateToolkit.cs | 114 +++ Python_Engine/Compute/Install.cs | 111 ++- Python_Engine/Compute/Remove.cs | 38 +- Python_Engine/Compute/Run.cs | 50 +- Python_Engine/Compute/RunPytest.cs | 107 +++ Python_Engine/Compute/UpdateBHoMPackages.cs | 16 +- Python_Engine/Compute/VirtualEnvironment.cs | 169 +++- Python_Engine/Python/Dockerfile | 5 +- Python_Engine/Python/README.md | 103 +++ Python_Engine/Python/docs/conf.py | 30 + Python_Engine/Python/docs/index.md | 12 + Python_Engine/Python/pyproject.toml | 81 +- Python_Engine/Python/ruff.toml | 56 ++ Python_Engine/Python/scripts/build_docs.ps1 | 53 +- Python_Engine/Python/scripts/pre_commit.ps1 | 46 +- Python_Engine/Python/scripts/run_tests.ps1 | 56 +- Python_Engine/Python/scripts/shared.ps1 | 46 +- .../styling_guide.py} | 14 +- .../Python/src/python_toolkit/__init__.py | 23 +- .../Python/src/python_toolkit/_optional.py | 21 + .../src/python_toolkit/bhom/__init__.py | 59 +- .../src/python_toolkit/bhom/analytics.py | 645 ++++++++++---- .../bhom}/assets/BHoM_Logo.png | Bin .../bhom}/assets/bhom_icon.png | Bin .../src/python_toolkit/bhom/bhom_object.py | 219 +++-- .../bhom/decorators/__init__.py | 4 +- .../decorators/_bhom_callable_decorator.py | 66 +- .../src/python_toolkit/bhom/installer_info.py | 20 +- .../python_toolkit/bhom/logging/__init__.py | 6 +- .../python_toolkit/bhom/logging/console.py | 41 +- .../src/python_toolkit/bhom/logging/file.py | 10 +- .../src/python_toolkit/bhom/run_wrapped.py | 17 +- .../Python/src/python_toolkit/bhom/util.py | 41 +- .../python_toolkit/bhom/wrapped/__init__.py | 8 +- .../bhom/wrapped/_test_wrapped.py | 10 +- .../python_toolkit/bhom_tkinter/__init__.py | 99 ++- .../bhom_tkinter/bhom_base_child_window.py | 17 +- .../bhom_tkinter/bhom_base_window.py | 58 +- .../bhom_tkinter/bhom_window_shell.py | 151 ++-- .../bhom_tkinter/theming/__init__.py | 2 +- .../bhom_tkinter/theming/scaling.py | 1 + .../bhom_tkinter/theming/theme.py | 78 +- .../bhom_tkinter/widgets/__init__.py | 52 +- .../bhom_tkinter/widgets/_build_options.py | 7 +- .../bhom_tkinter/widgets/_grid_options.py | 9 +- .../bhom_tkinter/widgets/_packing_options.py | 19 +- .../bhom_tkinter/widgets/_slim_scrollbar.py | 12 +- .../bhom_tkinter/widgets/_widgets_base.py | 137 +-- .../bhom_tkinter/widgets/button.py | 142 ++- .../widgets/check_box_selection.py | 402 ++++----- .../bhom_tkinter/widgets/cmap_selector.py | 120 +-- .../bhom_tkinter/widgets/colour_picker.py | 525 +++++------ .../widgets/drop_down_selection.py | 297 +++---- .../bhom_tkinter/widgets/figure_container.py | 51 +- .../bhom_tkinter/widgets/label.py | 66 +- .../bhom_tkinter/widgets/list_box.py | 95 +- .../bhom_tkinter/widgets/path_selector.py | 75 +- .../bhom_tkinter/widgets/radio_selection.py | 384 ++++---- .../widgets/searchable_list_box.py | 105 +-- .../bhom_tkinter/widgets/spinbox.py | 380 ++++---- .../widgets/validated_entry_box.py | 140 ++- .../bhom_tkinter/widgets/widget_calendar.py | 98 ++- .../bhom_tkinter/windows/__init__.py | 1 + .../windows/directory_file_selector.py | 25 +- .../bhom_tkinter/windows/landing_page.py | 33 +- .../bhom_tkinter/windows/modal_window.py | 4 +- .../bhom_tkinter/windows/processing_window.py | 34 +- .../bhom_tkinter/windows/warning_box.py | 33 +- .../src/python_toolkit/helpers/__init__.py | 32 +- .../src/python_toolkit/helpers/cardinality.py | 22 +- .../src/python_toolkit/helpers/decay_rate.py | 6 +- .../src/python_toolkit/helpers/helpers.py | 26 +- .../src/python_toolkit/helpers/timeseries.py | 20 +- .../src/python_toolkit/plot/__init__.py | 5 + .../src/python_toolkit/plot/cmap_sample.py | 45 +- .../Python/src/python_toolkit/plot/diurnal.py | 42 +- .../Python/src/python_toolkit/plot/heatmap.py | 23 +- .../src/python_toolkit/plot/histogram.py | 55 +- .../plot/parallel_coordinate_plot.py | 91 +- .../python_toolkit/plot/spatial_heatmap.py | 48 +- .../src/python_toolkit/plot/timeseries.py | 12 +- .../src/python_toolkit/plot/utilities.py | 92 +- .../src/python_toolkit/scaffold/__init__.py | 226 +++++ .../src/python_toolkit/scaffold/__main__.py | 7 + .../scaffold/template/README.md.tmpl | 21 + .../scaffold/template/docs/conf.py.tmpl | 27 + .../scaffold/template/docs/index.md.tmpl | 10 + .../scaffold/template/dot-gitignore.tmpl | 11 + .../scaffold/template/dot-python-version.tmpl | 1 + .../scaffold/template/pyproject.toml.tmpl | 53 ++ .../src/PACKAGE_NAME/__init__.py.tmpl | 7 + .../template/src/PACKAGE_NAME/example.py.tmpl | 20 + .../scaffold/template/tests/__init__.py.tmpl | 0 .../scaffold/template/tests/conftest.py.tmpl | 4 + .../template/tests/test_example.py.tmpl | 8 + .../src/python_toolkit/units/__init__.py | 13 +- .../Python/src/python_toolkit/units/area.py | 22 +- .../Python/src/python_toolkit/units/energy.py | 22 +- .../Python/src/python_toolkit/units/length.py | 22 +- .../Python/src/python_toolkit/units/power.py | 40 +- .../Python/src/python_toolkit/units/speed.py | 22 +- .../src/python_toolkit/units/temperature.py | 28 +- Python_Engine/Python/tests/__init__.py | 15 +- Python_Engine/Python/tests/_data.py | 16 + Python_Engine/Python/tests/conftest.py | 20 + Python_Engine/Python/tests/test_analytics.py | 242 +++++ .../Python/tests/test_bhom_serialiser.py | 188 ++-- .../Python/tests/test_bhom_tkinter_ui.py | 829 +++++++++--------- Python_Engine/Python/tests/test_core.py | 73 ++ Python_Engine/Python/tests/test_plot.py | 18 +- .../Python/tests/test_plot_utilities.py | 20 +- Python_Engine/Python/tests/test_scaffold.py | 135 +++ Python_Engine/Python_Engine.csproj | 27 +- Python_Engine/Query/Directory.cs | 11 +- Python_Engine/Query/UVExecutable.cs | 32 + Python_oM/Python_oM.csproj | 7 +- README.md | 149 +++- Versioning_93.json | 3 - 134 files changed, 6323 insertions(+), 3494 deletions(-) create mode 100644 .ci/unit_tests/Python_Engine_Test/Compute/RunPytest.cs create mode 100644 .ci/unit_tests/Python_Engine_Test/TestEnvironment.cs create mode 100644 .github/workflows/python.yml create mode 100644 .pre-commit-config.yaml create mode 100644 .vscode/extensions.json create mode 100644 .vscode/launch.json create mode 100644 .vscode/settings.json create mode 100644 .vscode/tasks.json create mode 100644 Python_Engine/Compute/CreateToolkit.cs create mode 100644 Python_Engine/Compute/RunPytest.cs create mode 100644 Python_Engine/Python/docs/conf.py create mode 100644 Python_Engine/Python/docs/index.md create mode 100644 Python_Engine/Python/ruff.toml rename Python_Engine/Python/{tests/test_styling.py => scripts/styling_guide.py} (91%) create mode 100644 Python_Engine/Python/src/python_toolkit/_optional.py rename Python_Engine/Python/src/{ => python_toolkit/bhom}/assets/BHoM_Logo.png (100%) rename Python_Engine/Python/src/{ => python_toolkit/bhom}/assets/bhom_icon.png (100%) create mode 100644 Python_Engine/Python/src/python_toolkit/plot/__init__.py create mode 100644 Python_Engine/Python/src/python_toolkit/scaffold/__init__.py create mode 100644 Python_Engine/Python/src/python_toolkit/scaffold/__main__.py create mode 100644 Python_Engine/Python/src/python_toolkit/scaffold/template/README.md.tmpl create mode 100644 Python_Engine/Python/src/python_toolkit/scaffold/template/docs/conf.py.tmpl create mode 100644 Python_Engine/Python/src/python_toolkit/scaffold/template/docs/index.md.tmpl create mode 100644 Python_Engine/Python/src/python_toolkit/scaffold/template/dot-gitignore.tmpl create mode 100644 Python_Engine/Python/src/python_toolkit/scaffold/template/dot-python-version.tmpl create mode 100644 Python_Engine/Python/src/python_toolkit/scaffold/template/pyproject.toml.tmpl create mode 100644 Python_Engine/Python/src/python_toolkit/scaffold/template/src/PACKAGE_NAME/__init__.py.tmpl create mode 100644 Python_Engine/Python/src/python_toolkit/scaffold/template/src/PACKAGE_NAME/example.py.tmpl rename .ci/unit_tests/python/__init_.py => Python_Engine/Python/src/python_toolkit/scaffold/template/tests/__init__.py.tmpl (100%) create mode 100644 Python_Engine/Python/src/python_toolkit/scaffold/template/tests/conftest.py.tmpl create mode 100644 Python_Engine/Python/src/python_toolkit/scaffold/template/tests/test_example.py.tmpl create mode 100644 Python_Engine/Python/tests/_data.py create mode 100644 Python_Engine/Python/tests/conftest.py create mode 100644 Python_Engine/Python/tests/test_analytics.py create mode 100644 Python_Engine/Python/tests/test_core.py create mode 100644 Python_Engine/Python/tests/test_scaffold.py diff --git a/.ci/unit_tests/Python_Engine_Test/Compute/Base.cs b/.ci/unit_tests/Python_Engine_Test/Compute/Base.cs index a0b981d6..3a165283 100644 --- a/.ci/unit_tests/Python_Engine_Test/Compute/Base.cs +++ b/.ci/unit_tests/Python_Engine_Test/Compute/Base.cs @@ -1,4 +1,4 @@ -/* +/* * This file is part of the Buildings and Habitats object Model (BHoM) * Copyright (c) 2015 - 2026, the respective contributors. All rights reserved. * @@ -88,14 +88,6 @@ public void TearDown() BH.Engine.Base.Compute.ClearCurrentEvents(); } - protected void PrepareToolPackages() - { - foreach (string tool in new[] { "ruff", "jupyterlab", "sphinx" }) - CreateWheel(tool, "1.0.0"); - SetVariable("UV_FIND_LINKS", Path.Combine(m_Root, "wheels")); - SetVariable("UV_OFFLINE", "true"); - } - protected void PreparePackageVersions() { CreateWheel("bhom_repeat_package", "1.0.0"); diff --git a/.ci/unit_tests/Python_Engine_Test/Compute/Install.cs b/.ci/unit_tests/Python_Engine_Test/Compute/Install.cs index 1e48986c..e8952680 100644 --- a/.ci/unit_tests/Python_Engine_Test/Compute/Install.cs +++ b/.ci/unit_tests/Python_Engine_Test/Compute/Install.cs @@ -1,4 +1,4 @@ -/* +/* * This file is part of the Buildings and Habitats object Model (BHoM) * Copyright (c) 2015 - 2026, the respective contributors. All rights reserved. * @@ -20,6 +20,7 @@ * along with this code. If not, see . */ +using BH.oM.Python; using FluentAssertions; using EngineCompute = BH.Engine.Python.Compute; using EngineQuery = BH.Engine.Python.Query; @@ -29,41 +30,69 @@ namespace BH.Tests.Engine.Python.Compute [NonParallelizable] public class Install : Base { - private static readonly string[] test = ["pyproject.toml", "README.md"]; + [Test] + public void InstallUV_InstallsPinnedVersion() + { + EngineCompute.InstallUV(run: true); + + Run(EngineQuery.UVExecutable(), "--version").Should().StartWith($"uv {EngineQuery.UVVersion()} "); + AssertNoErrors(); + } [Test] - public void InstallUV_InstallsMissingTools() + public void InstallUV_SkipsWhenPinnedVersionPresent() { - PrepareToolPackages(); + EngineCompute.InstallUV(run: true); + DateTime timestamp = File.GetLastWriteTimeUtc(EngineQuery.UVExecutable()); EngineCompute.InstallUV(run: true); - string tools = Run(EngineQuery.UVExecutable(), "tool", "list"); - foreach (string tool in new[] { "ruff", "jupyterlab", "sphinx" }) - tools.Should().Contain(tool + " v1.0.0"); + File.GetLastWriteTimeUtc(EngineQuery.UVExecutable()).Should().Be(timestamp); AssertNoErrors(); } [Test] - public void InstallUV_SkipsExistingTools() + public void InstallUV_DoesNotModifyPathOrInstallGlobalTools() { - PrepareToolPackages(); - EngineCompute.InstallUV(run: true); - string[] receipts = Directory.GetFiles(Path.Combine(m_Root, "tools"), "uv-receipt.toml", SearchOption.AllDirectories); - receipts.Should().HaveCount(3); - var timestamps = receipts.ToDictionary(path => path, File.GetLastWriteTimeUtc); + string? path = Environment.GetEnvironmentVariable("PATH"); EngineCompute.InstallUV(run: true); - Environment.GetEnvironmentVariable("PATH")!.Split(Path.PathSeparator)[0] - .Should().Be(EngineQuery.DirectoryTools()); - EngineQuery.UVExecutable().Should() - .Be(Path.Combine(EngineQuery.DirectoryTools(), "uv.exe")); - foreach (var receipt in timestamps) - File.GetLastWriteTimeUtc(receipt.Key).Should().Be(receipt.Value); + Environment.GetEnvironmentVariable("PATH").Should().Be(path); + Directory.Exists(Path.Combine(m_Root, "tools")).Should().BeFalse("no UV tools should be installed"); + AssertNoErrors(); + } + + [Test] + public void InstallUV_NotRunRecordsNote() + { + EngineCompute.InstallUV(run: false); + + BH.Engine.Base.Query.CurrentEvents().Should().Contain(e => e.Type == BH.oM.Base.Debugging.EventType.Note); AssertNoErrors(); } + [Test] + public void UVEnvironmentVariables_KeepManagedFilesInToolsDirectory() + { + SetVariable("UV_PYTHON_INSTALL_DIR", ""); + SetVariable("UV_CACHE_DIR", ""); + + var variables = EngineQuery.UVEnvironmentVariables(); + + variables["UV_PYTHON_INSTALL_DIR"].Should().StartWith(EngineQuery.DirectoryTools()); + variables["UV_CACHE_DIR"].Should().StartWith(EngineQuery.DirectoryTools()); + variables["UV_NO_MODIFY_PATH"].Should().Be("1"); + } + + [Test] + public void UVEnvironmentVariables_RespectExistingValues() + { + SetVariable("UV_CACHE_DIR", Path.Combine(m_Root, "my-cache")); + + EngineQuery.UVEnvironmentVariables().Should().NotContainKey("UV_CACHE_DIR"); + } + [Test] public void InstallPackages_SkipsSatisfiedVersion() { @@ -164,6 +193,28 @@ public void InstallPackageLocal_RegistersProjectDependency() AssertNoErrors(); } + [Test] + public void InstallJupyterKernel_DoesNotModifyProjectToml() + { + CreateProject(); + string toml = Path.Combine(m_Root, "pyproject.toml"); + string before = File.ReadAllText(toml); + + EngineCompute.InstallJupyterKernel(m_Environment); + + File.ReadAllText(toml).Should().Be(before); + File.Exists(Path.Combine(m_Root, "jupyter", "kernels", m_Environment.Name, "kernel.json")).Should().BeTrue(); + AssertNoErrors(); + } + + [Test] + public void InstallPackages_MissingEnvironmentRecordsError() + { + EngineCompute.InstallPackages(new PythonEnvironment { Name = m_Environment.Name + "_missing", Executable = "missing.exe" }, ["anything"], run: true); + + BH.Engine.Base.Query.CurrentEvents().Should().Contain(e => e.Type == BH.oM.Base.Debugging.EventType.Error); + } + [Test] public void InstallJupyterKernel_SkipsExistingRegistration() { diff --git a/.ci/unit_tests/Python_Engine_Test/Compute/Remove.cs b/.ci/unit_tests/Python_Engine_Test/Compute/Remove.cs index b1f61147..e5298e74 100644 --- a/.ci/unit_tests/Python_Engine_Test/Compute/Remove.cs +++ b/.ci/unit_tests/Python_Engine_Test/Compute/Remove.cs @@ -1,4 +1,4 @@ -/* +/* * This file is part of the Buildings and Habitats object Model (BHoM) * Copyright (c) 2015 - 2026, the respective contributors. All rights reserved. * @@ -93,6 +93,46 @@ public void RemoveUV_RemovesManagedToolsAndIgnoresExternalUV() CheckUVRemoval(managedUVExists: true); } + [Test] + public void RemoveEverything_RemovesAllEnvironmentsAndUVButKeepsCode() + { + string uv = EngineQuery.UVExecutable(); + string environments = Path.Combine(m_Root, "extensions"); + SetVariable(TestEnvironment.ExtensionsVariable, environments); + File.Copy(uv, EngineQuery.UVExecutable()); + + string[] names = ["toolkit_a", "toolkit_b"]; + foreach (string name in names) + { + string directory = Path.Combine(environments, name); + Directory.CreateDirectory(directory); + File.WriteAllText(Path.Combine(directory, "pyproject.toml"), "code"); + Run(uv, "venv", "--no-project", "--no-python-downloads", Path.Combine(directory, ".venv")); + } + Directory.CreateDirectory(Path.Combine(environments, "code_only")); + + EngineCompute.RemoveEverything(run: true); + + foreach (string name in names) + { + Directory.Exists(Path.Combine(environments, name, ".venv")).Should().BeFalse(); + File.Exists(Path.Combine(environments, name, "pyproject.toml")).Should().BeTrue("toolkit code is retained"); + } + Directory.Exists(Path.Combine(environments, "code_only")).Should().BeTrue(); + Directory.Exists(Path.Combine(environments, "tools")).Should().BeFalse(); + AssertNoErrors(); + } + + [Test] + public void RemoveEverything_NotRunRemovesNothing() + { + EngineCompute.RemoveEverything(run: false); + + Directory.Exists(Path.Combine(m_Root, ".venv")).Should().BeTrue(); + File.Exists(EngineQuery.UVExecutable()).Should().BeTrue(); + BH.Engine.Base.Query.CurrentEvents().Should().Contain(e => e.Type == BH.oM.Base.Debugging.EventType.Note && e.Message.Contains(m_Environment.Name)); + } + private void CheckUVRemoval(bool managedUVExists) { string toolsDirectory = EngineQuery.DirectoryTools(); diff --git a/.ci/unit_tests/Python_Engine_Test/Compute/RunPytest.cs b/.ci/unit_tests/Python_Engine_Test/Compute/RunPytest.cs new file mode 100644 index 00000000..37c68f0e --- /dev/null +++ b/.ci/unit_tests/Python_Engine_Test/Compute/RunPytest.cs @@ -0,0 +1,93 @@ +/* + * This file is part of the Buildings and Habitats object Model (BHoM) + * Copyright (c) 2015 - 2026, the respective contributors. All rights reserved. + * + * Each contributor holds copyright over their respective contributions. + * The project versioning (Git) records all such contribution source information. + * + * + * The BHoM is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3.0 of the License, or + * (at your option) any later version. + * + * The BHoM is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this code. If not, see . + */ + +using BH.oM.Base.Debugging; +using FluentAssertions; +using EngineCompute = BH.Engine.Python.Compute; +using EngineQuery = BH.Engine.Python.Query; + +namespace BH.Tests.Engine.Python.Compute +{ + [NonParallelizable] + public class RunPytest : Base + { + private void PrepareTests() + { + // pytest comes from the shared UV cache (set up by TestEnvironment), so this is fast after the first run + SetVariable("UV_CACHE_DIR", Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData), "uv", "cache")); + Run(EngineQuery.UVExecutable(), "pip", "install", "--python", m_Environment.Executable, "pytest"); + Directory.CreateDirectory(Path.Combine(m_Root, "tests")); + File.WriteAllText(Path.Combine(m_Root, "tests", "test_sample.py"), + "import os\n\n" + + "def test_passes():\n assert True\n\n" + + "def test_fails():\n assert False, 'expected failure'\n\n" + + "def test_analytics_disabled():\n assert os.environ.get('DISABLE_BHOM_ANALYTICS') == '1'\n"); + } + + [Test] + public void RunPytest_ReportsFailures() + { + PrepareTests(); + + var result = EngineCompute.RunPytest(m_Root, run: true); + + result.Should().NotBeNull(); + result.Item1.Should().BeFalse(); + result.Item2.Should().Be(1); + result.Item3.Should().Contain("expected failure").And.Contain("1 failed, 2 passed"); + File.Exists(result.Item4).Should().BeTrue(); + File.ReadAllText(result.Item4).Should().Contain("test_fails"); + } + + [Test] + public void RunPytest_PassesArgumentsAndAcceptsEnvironment() + { + PrepareTests(); + + var result = EngineCompute.RunPytest(m_Environment, "-k \"passes or analytics\"", run: true); + + result.Item1.Should().BeTrue(result.Item3); + result.Item2.Should().Be(0); + result.Item3.Should().Contain("2 passed"); + AssertNoErrors(); + } + + [Test] + public void RunPytest_NotRunRecordsNote() + { + EngineCompute.RunPytest(m_Root, run: false).Should().BeNull(); + + BH.Engine.Base.Query.CurrentEvents().Should().Contain(e => e.Type == EventType.Note && e.Message.Contains("pytest")); + } + + [Test] + public void RunPytest_MissingEnvironmentRecordsError() + { + string directory = Path.Combine(m_Root, "no_venv"); + Directory.CreateDirectory(directory); + + EngineCompute.RunPytest(directory, run: true).Should().BeNull(); + + BH.Engine.Base.Query.CurrentEvents().Should().Contain(e => e.Type == EventType.Error && e.Message.Contains("No virtual environment")); + } + } +} diff --git a/.ci/unit_tests/Python_Engine_Test/Compute/VirtualEnvironment.cs b/.ci/unit_tests/Python_Engine_Test/Compute/VirtualEnvironment.cs index 80d8ecee..6497ed98 100644 --- a/.ci/unit_tests/Python_Engine_Test/Compute/VirtualEnvironment.cs +++ b/.ci/unit_tests/Python_Engine_Test/Compute/VirtualEnvironment.cs @@ -1,4 +1,4 @@ -/* +/* * This file is part of the Buildings and Habitats object Model (BHoM) * Copyright (c) 2015 - 2026, the respective contributors. All rights reserved. * @@ -72,8 +72,6 @@ public void CleanUpTools() Environment.SetEnvironmentVariable(variable.Key, variable.Value); if (Directory.Exists(m_TestDirectory)) Directory.Delete(m_TestDirectory, true); - if (Directory.Exists(EngineQuery.DirectoryTools())) - Directory.Delete(EngineQuery.DirectoryTools(), true); } [Test] @@ -111,13 +109,21 @@ public void VirtualEnvironment_FromTOML_CreatesReloadsAndRemovesEnvironmentAndKe PythonEnvironment venv = EngineCompute.VirtualEnvironment(tomlFile, reload: false); venv.Should().NotBeNull(); string version = BH.Engine.Base.Query.BHoMVersion(); - File.ReadAllText(tomlFile).Should().Contain($"version = \"{version}\" # project version") + File.ReadAllText(tomlFile).Should().Contain($"version = '{version}' # project version") .And.Contain("version = 'leave-this-alone'"); EngineCompute.RunPythonString(venv, $"import importlib.metadata; print(importlib.metadata.version('{m_Name}'))").Should().Be(version); EngineCompute.VirtualEnvironment(tomlFile, reload: false).Should().NotBeNull(); File.Exists(Path.Combine(packageDirectory, "__init__.py")).Should().BeTrue(); + + // a redeployed (unstamped) TOML is re-stamped on reload, and the installed metadata follows + File.WriteAllText(tomlFile, File.ReadAllText(tomlFile).Replace($"version = '{version}'", "version = '999.999.999'")); + EngineCompute.VirtualEnvironment(tomlFile, reload: true).Should().NotBeNull(); + File.ReadAllText(tomlFile).Should().Contain($"version = '{version}' # project version"); + EngineCompute.RunPythonString(venv, + $"import importlib.metadata; print(importlib.metadata.version('{m_Name}'))").Should().Be(version); + File.ReadAllText(tomlFile).Should().NotContain("ipykernel", "registering the kernel must not add dependencies"); EngineCompute.VirtualEnvironment(tomlFile, reload: true).Executable.Should().Be(venv.Executable); EngineCompute.RemoveVirtualEnvironment(m_Name, run: true); @@ -126,6 +132,136 @@ public void VirtualEnvironment_FromTOML_CreatesReloadsAndRemovesEnvironmentAndKe AssertNoErrors(); } + [Test] + public void VirtualEnvironment_FromTOML_StampsCRLFVersionWithoutComment() + { + string tomlFile = CreateToolkitFiles( + "[project]\r\nname = 'NAME'\r\nversion = \"0.1.0\"\r\nrequires-python = '>=3.10'\r\n" + + "[tool.uv.sources]\r\nmissing_toolkit = { path = \"../Missing_Toolkit\", editable = true }\r\n"); + + // the missing dependency stops creation before syncing, after the version has been stamped + EngineCompute.VirtualEnvironment(tomlFile).Should().BeNull(); + + File.ReadAllText(tomlFile).Should().Contain($"version = \"{BH.Engine.Base.Query.BHoMVersion()}\"\r\nrequires-python"); + } + + [Test] + public void VirtualEnvironment_FromTOML_MissingDependencyToolkitRecordsError() + { + string tomlFile = CreateToolkitFiles( + "[project]\nname = 'NAME'\nversion = '0.1.0'\n\n" + + "[tool.uv.sources]\nmissing_toolkit = { path = \"../Missing_Toolkit\", editable = true }\n"); + + EngineCompute.VirtualEnvironment(tomlFile).Should().BeNull(); + + BH.Engine.Base.Query.CurrentEvents().Should().Contain(e => e.Type == EventType.Error && e.Message.Contains("missing_toolkit")); + EngineQuery.VirtualEnvironmentExists(m_Name).Should().BeFalse(); + } + + [Test] + public void VirtualEnvironment_FromTOML_StampsDeployedDependencyVersion() + { + string dependency = Path.Combine(EngineQuery.DirectoryEnvironments(), m_Name + "_dependency"); + Directory.CreateDirectory(dependency); + try + { + File.WriteAllText(Path.Combine(dependency, "pyproject.toml"), "[project]\nname = 'dep'\nversion = '999.999.999' # placeholder\n"); + string tomlFile = CreateToolkitFiles( + "[project]\nname = 'NAME'\nversion = '0.1.0'\n\n" + + $"[tool.uv.sources]\ndep = {{ path = \"../{m_Name}_dependency\", editable = true }}\n" + + "other = { path = \"../Missing\" }\n"); + + EngineCompute.VirtualEnvironment(tomlFile).Should().BeNull(); // "other" is missing + + File.ReadAllText(Path.Combine(dependency, "pyproject.toml")) + .Should().Contain($"version = '{BH.Engine.Base.Query.BHoMVersion()}' # placeholder"); + } + finally + { + Directory.Delete(dependency, true); + } + } + + [Test] + public void VirtualEnvironment_FromTOML_MissingTransitiveDependencyRecordsErrorWithChain() + { + // this toolkit -> middle (deployed) -> deep_toolkit (missing) + string middle = Path.Combine(EngineQuery.DirectoryEnvironments(), m_Name + "_middle"); + Directory.CreateDirectory(middle); + try + { + File.WriteAllText(Path.Combine(middle, "pyproject.toml"), + "[project]\nname = 'middle'\nversion = '999.999.999'\n\n" + + "[tool.uv.sources]\ndeep_toolkit = { path = \"../Deep_Toolkit\", editable = true }\n"); + string tomlFile = CreateToolkitFiles( + "[project]\nname = 'NAME'\nversion = '0.1.0'\n\n" + + $"[tool.uv.sources]\nmiddle = {{ path = \"../{m_Name}_middle\", editable = true }}\n"); + + EngineCompute.VirtualEnvironment(tomlFile).Should().BeNull(); + + BH.Engine.Base.Query.CurrentEvents().Should().Contain(e => e.Type == EventType.Error + && e.Message.Contains("deep_toolkit") + && e.Message.Contains($"{m_Name} -> middle -> deep_toolkit")); + EngineQuery.VirtualEnvironmentExists(m_Name).Should().BeFalse(); + File.ReadAllText(Path.Combine(middle, "pyproject.toml")) + .Should().Contain($"version = '{BH.Engine.Base.Query.BHoMVersion()}'", "deployed toolkits along the chain are stamped"); + } + finally + { + Directory.Delete(middle, true); + } + } + + [Test] + public void VirtualEnvironment_FromTOML_CircularDependencyIsCheckedOnce() + { + // this toolkit <-> middle, and middle also needs a missing toolkit (so creation stops before syncing) + string middle = Path.Combine(EngineQuery.DirectoryEnvironments(), m_Name + "_middle"); + Directory.CreateDirectory(middle); + try + { + File.WriteAllText(Path.Combine(middle, "pyproject.toml"), + "[project]\nname = 'middle'\nversion = '0.1.0'\n\n" + + $"[tool.uv.sources]\nback = {{ path = \"../{m_Name}\", editable = true }}\n" + + "missing = { path = \"../Missing\" }\n"); + string tomlFile = CreateToolkitFiles( + "[project]\nname = 'NAME'\nversion = '0.1.0'\n\n" + + $"[tool.uv.sources]\nmiddle = {{ path = \"../{m_Name}_middle\", editable = true }}\n"); + + EngineCompute.VirtualEnvironment(tomlFile).Should().BeNull(); + + BH.Engine.Base.Query.CurrentEvents().Where(e => e.Type == EventType.Error) + .Should().ContainSingle(e => e.Message.Contains("missing")); + } + finally + { + Directory.Delete(middle, true); + } + } + + [Test] + public void VirtualEnvironment_FromTOML_OutsideEnvironmentsDirectoryRecordsError() + { + string outside = Path.Combine(m_TestDirectory, m_Name); + Directory.CreateDirectory(outside); + string tomlFile = Path.Combine(outside, "pyproject.toml"); + File.WriteAllText(tomlFile, "[project]\nname = 'x'\nversion = '0.1.0'\n"); + + EngineCompute.VirtualEnvironment(tomlFile).Should().BeNull(); + + BH.Engine.Base.Query.CurrentEvents().Should().Contain(e => e.Type == EventType.Error && e.Message.Contains("must be deployed")); + } + + private string CreateToolkitFiles(string toml) + { + Directory.CreateDirectory(Path.Combine(m_Directory, "src", m_Name)); + File.WriteAllText(Path.Combine(m_Directory, "src", m_Name, "__init__.py"), ""); + File.WriteAllText(Path.Combine(m_Directory, "README.md"), ""); + string tomlFile = Path.Combine(m_Directory, "pyproject.toml"); + File.WriteAllText(tomlFile, toml.Replace("NAME", m_Name)); + return tomlFile; + } + private string KernelFile() { return Path.Combine(Environment.GetEnvironmentVariable("JUPYTER_DATA_DIR")!, "kernels", m_Name, "kernel.json"); diff --git a/.ci/unit_tests/Python_Engine_Test/PythonToolkit.cs b/.ci/unit_tests/Python_Engine_Test/PythonToolkit.cs index 30ecad5b..16509c2f 100644 --- a/.ci/unit_tests/Python_Engine_Test/PythonToolkit.cs +++ b/.ci/unit_tests/Python_Engine_Test/PythonToolkit.cs @@ -22,73 +22,124 @@ using BH.oM.Base.Debugging; using BH.oM.Python; -using BH.Tests.Engine.Python.Compute; using FluentAssertions; -using System.Text.RegularExpressions; using EngineCompute = BH.Engine.Python.Compute; using EngineQuery = BH.Engine.Python.Query; namespace BH.Tests.Engine.Python { + /// + /// End-to-end tests of the full toolkit workflow, run in order against the isolated BHoM Python directory: + /// deploy Python_Toolkit, create its environment, run its Python tests from C#, then scaffold a downstream toolkit + /// that depends on it and create and test that toolkit's own environment. + /// These need network access (or a warm UV cache) and take a few minutes: filter them with --filter "Category!=Integration". + /// [NonParallelizable] - public class PythonToolkit : Base + [Category("Integration")] + [TestFixture] + public class PythonToolkit { - [Test, Order(9998)] - [Ignore("Disabled for now.")] - public void ZZZ_InstallPythonToolkitVenv() + private const string DownstreamName = "Smoke_Toolkit"; + private readonly Dictionary m_OriginalVariables = new(); + private static PythonEnvironment? m_Root; + + [OneTimeSetUp] + public void IsolateJupyter() + { + string jupyter = Path.Combine(TestEnvironment.Root, "jupyter"); + foreach (string variable in new[] { "JUPYTER_DATA_DIR", "JUPYTER_PATH" }) + { + m_OriginalVariables[variable] = Environment.GetEnvironmentVariable(variable); + Environment.SetEnvironmentVariable(variable, jupyter); + } + } + + [OneTimeTearDown] + public void RestoreJupyter() + { + foreach (var variable in m_OriginalVariables) + Environment.SetEnvironmentVariable(variable.Key, variable.Value); + } + + [SetUp] + public void ClearEvents() { BH.Engine.Base.Compute.ClearCurrentEvents(); - EngineCompute.InstallPythonToolkitVenv(run: true, reload: false); + } + + [Test, Order(1)] + public void InstallPythonToolkitVenv_CreatesEnvironment() + { + TestEnvironment.DeployPythonToolkit(); + + m_Root = EngineCompute.InstallPythonToolkitVenv(run: true, reload: false); + AssertNoErrors(); + m_Root.Should().NotBeNull(); + File.Exists(m_Root!.Executable).Should().BeTrue(); + EngineCompute.RunPythonString(m_Root, "import python_toolkit.bhom.analytics, matplotlib; print('ok')").Should().Be("ok"); + File.ReadAllText(Path.Combine(EngineQuery.DirectoryEnvironments(), "Python_Toolkit", "pyproject.toml")) + .Should().Contain($"version = \"{BH.Engine.Base.Query.BHoMVersion()}\""); } - [Test, Order(9999)] - [Ignore("Disabled for now.")] - public void ZZZ_Pytest() + [Test, Order(2)] + public void RunPytest_PythonToolkitTestsPass() { - BH.Engine.Base.Compute.ClearCurrentEvents(); - EngineCompute.InstallPythonToolkitVenv(run: true, reload: false); - DirectoryInfo? repository = new(TestContext.CurrentContext.TestDirectory); - while (repository != null && !File.Exists(Path.Combine(repository.FullName, "Python_Engine", "Python", "pyproject.toml"))) - repository = repository.Parent; - repository.Should().NotBeNull("the toolkit sources must be available to run pytest"); - - string source = Path.Combine(repository!.FullName, "Python_Engine", "Python"); - string name = "bhom_pytest_" + Guid.NewGuid().ToString("N"); - string directory = Path.Combine(EngineQuery.DirectoryEnvironments(), name); - BH.Engine.Base.Compute.ClearCurrentEvents(); + Assume.That(m_Root, Is.Not.Null, "requires the Python_Toolkit environment"); - try - { - PythonEnvironment venv = EngineCompute.InstallPythonToolkitVenv(run: true, reload: false); - - venv.Should().NotBeNull("environment installation must succeed: {0}", - string.Join(Environment.NewLine, BH.Engine.Base.Query.CurrentEvents().Where(e => e.Type == EventType.Error).Select(e => e.Message))); - - var result = EngineCompute.RunCommandStdout( - $"set \"SKIP_LONG_PYTEST=1\" && \"{venv.Executable}\" -m pytest -ra", - startDirectory: directory, timeoutMinutes: 10); - string output = result.Item1 + Environment.NewLine + result.Item2; - TestContext.Progress.WriteLine(output); - - Match warnings = Regex.Match(output, - @"(?ms)^=+[ \t]*warnings summary[ \t]*=+\r?\n(?.*?)(?=^=+|\z)"); - if (warnings.Success) - BH.Engine.Base.Compute.RecordWarning(warnings.Groups["warnings"].Value.Trim()); - if (result.Item3 != 0) - BH.Engine.Base.Compute.RecordError($"Pytest failed (exit code {result.Item3}).\n{output}"); - - result.Item3.Should().Be(0, "pytest must pass:\n{0}", output); - BH.Engine.Base.Query.CurrentEvents().Where(e => e.Type == EventType.Error) - .Select(e => e.Message).Should().BeEmpty(); - } - finally - { - if (EngineQuery.VirtualEnvironmentExists(name)) - EngineCompute.RemoveVirtualEnvironment(name, run: true); - if (Directory.Exists(directory)) - Directory.Delete(directory, true); - } + var result = EngineCompute.RunPytest(m_Root!, "-m \"not slow\"", run: true); + + TestContext.Progress.WriteLine(result.Item3); + result.Item1.Should().BeTrue("pytest must pass:\n{0}", result.Item3); + File.Exists(result.Item4).Should().BeTrue(); + AssertNoErrors(); + } + + [Test, Order(3)] + public void CreateToolkit_DownstreamToolkitBuildsAndPassesItsTests() + { + Assume.That(m_Root, Is.Not.Null, "requires the Python_Toolkit environment"); + string directory = Path.Combine(EngineQuery.DirectoryEnvironments(), DownstreamName); + string pythonVersion = string.Join(".", EngineQuery.Version(m_Root!)!.Split(".").Take(2)); + + var created = EngineCompute.CreateToolkit(DownstreamName, directory, pythonVersion, run: true); + + created.Item1.Should().BeTrue(created.Item2); + created.Item2.Should().Contain("Next steps"); + File.Exists(Path.Combine(directory, "src", "smoke_toolkit", "example.py")).Should().BeTrue(); + + // the downstream toolkit resolves Python_Toolkit from the deployed location, in its own environment + PythonEnvironment venv = EngineCompute.VirtualEnvironment(Path.Combine(directory, "pyproject.toml"), reload: false); + AssertNoErrors(); + venv.Should().NotBeNull(); + venv.Executable.Should().StartWith(directory); + EngineCompute.RunPythonString(venv, "import smoke_toolkit.example as e; print(e.add(1, 2))").Should().Be("3"); + + var tests = EngineCompute.RunPytest(venv, run: true); + tests.Item1.Should().BeTrue(tests.Item3); + } + + [Test, Order(4)] + public void RemoveEverything_CleansUp() + { + Assume.That(m_Root, Is.Not.Null, "requires the Python_Toolkit environment"); + string uvBackup = Path.Combine(TestEnvironment.Root, "uv.backup.exe"); + File.Copy(EngineQuery.UVExecutable(), uvBackup, true); + + EngineCompute.RemoveEverything(run: true); + + EngineQuery.VirtualEnvironmentExists("Python_Toolkit").Should().BeFalse(); + EngineQuery.VirtualEnvironmentExists(DownstreamName).Should().BeFalse(); + File.Exists(Path.Combine(EngineQuery.DirectoryEnvironments(), "Python_Toolkit", "pyproject.toml")).Should().BeTrue(); + AssertNoErrors(); + + // restore UV for any fixtures that run afterwards + File.Copy(uvBackup, EngineQuery.UVExecutable(), true); + } + + private static void AssertNoErrors() + { + BH.Engine.Base.Query.CurrentEvents().Where(e => e.Type == EventType.Error).Select(e => e.Message).Should().BeEmpty(); } } } diff --git a/.ci/unit_tests/Python_Engine_Test/Python_Engine_Test.csproj b/.ci/unit_tests/Python_Engine_Test/Python_Engine_Test.csproj index 1a39960b..017e01f0 100644 --- a/.ci/unit_tests/Python_Engine_Test/Python_Engine_Test.csproj +++ b/.ci/unit_tests/Python_Engine_Test/Python_Engine_Test.csproj @@ -19,17 +19,17 @@ - - + + - ..\..\..\..\..\..\..\..\..\ProgramData\BHoM\Assemblies\BHoM.dll + $(ProgramData)\BHoM\Assemblies\BHoM.dll True - ..\..\..\..\..\..\..\..\..\ProgramData\BHoM\Assemblies\BHoM_Engine.dll + $(ProgramData)\BHoM\Assemblies\BHoM_Engine.dll True diff --git a/.ci/unit_tests/Python_Engine_Test/Query/Directory.cs b/.ci/unit_tests/Python_Engine_Test/Query/Directory.cs index 665a9596..1552c1e2 100644 --- a/.ci/unit_tests/Python_Engine_Test/Query/Directory.cs +++ b/.ci/unit_tests/Python_Engine_Test/Query/Directory.cs @@ -25,28 +25,60 @@ namespace BH.Tests.Engine.Python.Query { + [NonParallelizable] public class Directory_Tests { [Test] - public void DirectoryExtension() + public void DirectoryExtensions_IsNextToTheBHoMInstallation() { - string extensionsDirectory = "C:\\ProgramData\\BHoM\\Extensions"; - var result = new DirectoryInfo(EngineQuery.DirectoryExtensions()); + string expected = Path.Combine(Directory.GetParent(BH.Engine.Base.Query.BHoMFolder())!.FullName, "Extensions"); - Assert.That(result, Is.Not.Null); - result.FullName.Should().Be(extensionsDirectory); - Directory.Exists(extensionsDirectory).Should().BeTrue(); + EngineQuery.DirectoryExtensions().Should().Be(expected); } [Test] - public void DirectoryEnvironments() + public void DirectoryEnvironments_DefaultsToExtensionsPython() { - string environmentsDirectory = "C:\\ProgramData\\BHoM\\Extensions\\Python"; - var result = new DirectoryInfo(EngineQuery.DirectoryEnvironments()); + string? redirected = Environment.GetEnvironmentVariable(TestEnvironment.ExtensionsVariable); + try + { + Environment.SetEnvironmentVariable(TestEnvironment.ExtensionsVariable, null); - Assert.That(result, Is.Not.Null); - result.FullName.Should().Be(environmentsDirectory); - Directory.Exists(environmentsDirectory).Should().BeTrue(); + string expected = Path.Combine(EngineQuery.DirectoryExtensions(), "Python"); + Assume.That(Directory.Exists(expected), "BHoM must be installed (the default folder is not created by this test)"); + + EngineQuery.DirectoryEnvironments().Should().Be(expected); + } + finally + { + Environment.SetEnvironmentVariable(TestEnvironment.ExtensionsVariable, redirected); + } + } + + [Test] + public void DirectoryEnvironments_HonoursOverrideAndCreatesIt() + { + string? redirected = Environment.GetEnvironmentVariable(TestEnvironment.ExtensionsVariable); + string custom = Path.Combine(TestEnvironment.Root, "custom_" + Guid.NewGuid().ToString("N")); + try + { + Environment.SetEnvironmentVariable(TestEnvironment.ExtensionsVariable, custom); + + EngineQuery.DirectoryEnvironments().Should().Be(custom); + Directory.Exists(custom).Should().BeTrue(); + EngineQuery.DirectoryTools().Should().Be(Path.Combine(custom, "tools")); + EngineQuery.UVExecutable().Should().Be(Path.Combine(custom, "tools", "uv.exe")); + } + finally + { + Environment.SetEnvironmentVariable(TestEnvironment.ExtensionsVariable, redirected); + } + } + + [Test] + public void TestsAreIsolatedFromProgramData() + { + EngineQuery.DirectoryEnvironments().Should().StartWith(TestEnvironment.Root); } } -} \ No newline at end of file +} diff --git a/.ci/unit_tests/Python_Engine_Test/TestEnvironment.cs b/.ci/unit_tests/Python_Engine_Test/TestEnvironment.cs new file mode 100644 index 00000000..9d64be95 --- /dev/null +++ b/.ci/unit_tests/Python_Engine_Test/TestEnvironment.cs @@ -0,0 +1,145 @@ +/* + * This file is part of the Buildings and Habitats object Model (BHoM) + * Copyright (c) 2015 - 2026, the respective contributors. All rights reserved. + * + * Each contributor holds copyright over their respective contributions. + * The project versioning (Git) records all such contribution source information. + * + * + * The BHoM is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3.0 of the License, or + * (at your option) any later version. + * + * The BHoM is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this code. If not, see . + */ + +using System.Diagnostics; +using EngineQuery = BH.Engine.Python.Query; + +namespace BH.Tests.Engine.Python +{ + /// + /// Runs once around every test in this assembly. All BHoM Python directories are redirected to a temporary folder + /// (via BHOM_PYTHON_EXTENSIONS_DIR), so tests never read or modify the real %ProgramData%\BHoM installation. + /// + [SetUpFixture] + public class TestEnvironment + { + public const string ExtensionsVariable = "BHOM_PYTHON_EXTENSIONS_DIR"; + + private static readonly Dictionary m_Original = new(); + + /// The temporary folder standing in for %ProgramData%\BHoM\Extensions\Python. + public static string Root { get; private set; } = null!; + + /// The repository's Python_Engine/Python folder (the Python_Toolkit source). + public static string PythonSource + { + get + { + DirectoryInfo? directory = new(TestContext.CurrentContext.TestDirectory); + while (directory != null && !File.Exists(Path.Combine(directory.FullName, "Python_Engine", "Python", "pyproject.toml"))) + directory = directory.Parent; + if (directory == null) + throw new DirectoryNotFoundException("The repository's Python_Engine/Python folder could not be found."); + return Path.Combine(directory.FullName, "Python_Engine", "Python"); + } + } + + [OneTimeSetUp] + public void RedirectBHoMPythonDirectories() + { + Root = Path.Combine(Path.GetTempPath(), "bhom_python_tests_" + Guid.NewGuid().ToString("N")); + Directory.CreateDirectory(Root); + Set(ExtensionsVariable, Root); + + // Reuse the user's own UV interpreter store and cache (rather than the per-run tools folder) so tests do not + // download Python and packages on every run. These are respected by Query.UVEnvironmentVariables(). + string appData = Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData); + string localAppData = Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData); + SetIfUnset("UV_PYTHON_INSTALL_DIR", Path.Combine(appData, "uv", "python")); + SetIfUnset("UV_CACHE_DIR", Path.Combine(localAppData, "uv", "cache")); + + SeedUV(); + } + + [OneTimeTearDown] + public void RestoreBHoMPythonDirectories() + { + foreach (var variable in m_Original) + Environment.SetEnvironmentVariable(variable.Key, variable.Value); + m_Original.Clear(); + + try + { + if (Directory.Exists(Root)) + Directory.Delete(Root, true); + } + catch (Exception ex) when (ex is IOException || ex is UnauthorizedAccessException) + { + TestContext.Progress.WriteLine($"Could not fully remove {Root}: {ex.Message}"); + } + } + + /// Copy the Python_Toolkit source into the redirected directory, as the build's deploy step would. + public static string DeployPythonToolkit() + { + string target = Path.Combine(EngineQuery.DirectoryEnvironments(), "Python_Toolkit"); + CopyDirectory(PythonSource, target); + return target; + } + + private static void CopyDirectory(string source, string target) + { + Directory.CreateDirectory(target); + foreach (string file in Directory.GetFiles(source)) + { + string name = Path.GetFileName(file); + if (name == "uv.lock" || name.EndsWith(".pyc") || name == ".pytest_results.xml") + continue; + File.Copy(file, Path.Combine(target, name), true); + } + foreach (string directory in Directory.GetDirectories(source)) + { + string name = Path.GetFileName(directory); + if (name.StartsWith(".") || (name.StartsWith("__") && name.EndsWith("__")) || name == "_build" || name == "autoapi") + continue; + CopyDirectory(directory, Path.Combine(target, name)); + } + } + + // Copy an installed UV of the pinned version, if one exists, to avoid downloading it for every test run. + private static void SeedUV() + { + string installed = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.CommonApplicationData), "BHoM", "Extensions", "Python", "tools", "uv.exe"); + if (!File.Exists(installed)) + return; + + using Process process = Process.Start(new ProcessStartInfo(installed, "--version") { RedirectStandardOutput = true, UseShellExecute = false, CreateNoWindow = true })!; + string version = process.StandardOutput.ReadToEnd(); + process.WaitForExit(); + if (version.StartsWith($"uv {EngineQuery.UVVersion()} ")) + File.Copy(installed, EngineQuery.UVExecutable(), true); + } + + private static void Set(string name, string value) + { + if (!m_Original.ContainsKey(name)) + m_Original[name] = Environment.GetEnvironmentVariable(name); + Environment.SetEnvironmentVariable(name, value); + } + + private static void SetIfUnset(string name, string value) + { + if (string.IsNullOrEmpty(Environment.GetEnvironmentVariable(name))) + Set(name, value); + } + } +} diff --git a/.github/workflows/python.yml b/.github/workflows/python.yml new file mode 100644 index 00000000..c07e6a59 --- /dev/null +++ b/.github/workflows/python.yml @@ -0,0 +1,59 @@ +# Python quality gate for Python_Engine/Python: formatting, linting and tests. +# Runs alongside the BHoM CI (ci-beta.yml), which covers the C# projects. + +name: Python + +on: + pull_request: + branches: + - develop + paths: + - "Python_Engine/Python/**" + - ".github/workflows/python.yml" + +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + +defaults: + run: + working-directory: Python_Engine/Python + +jobs: + lint: + runs-on: windows-latest + timeout-minutes: 10 + steps: + - uses: actions/checkout@v4 + - uses: astral-sh/setup-uv@v6 + with: + version: "0.13.10" # keep in sync with BH.Engine.Python.Query.UVVersion() + - run: uv sync --all-extras + - run: uv run ruff format --check . + - run: uv run ruff check --output-format=github . + + test: + runs-on: windows-latest + timeout-minutes: 30 + strategy: + fail-fast: false + matrix: + # the supported floor (every downstream toolkit installs this package) and a newer version + python: ["3.10", "3.12"] + env: + UV_PYTHON: ${{ matrix.python }} + steps: + - uses: actions/checkout@v4 + - uses: astral-sh/setup-uv@v6 + with: + version: "0.13.10" + - name: Core is standard-library only + run: | + uv sync --no-dev + uv run --no-dev python -c "import python_toolkit.bhom.analytics, python_toolkit.bhom.run_wrapped, python_toolkit.scaffold" + - run: uv sync --all-extras + - name: Tests (including slow end-to-end scaffold test) + run: uv run pytest --cov --cov-report=term-missing + - name: Docs build + if: matrix.python == '3.10' + run: uv run --all-extras --group docs sphinx-build -b html docs docs/_build/html diff --git a/.gitignore b/.gitignore index 2ce1d0e1..cc63ef37 100644 --- a/.gitignore +++ b/.gitignore @@ -94,7 +94,12 @@ Alligator/Alligator_REMOTE_9848.csproj # VSCode User File # #################### -.vscode/ +# shared workspace configuration is committed; anything else in .vscode is personal +.vscode/* +!.vscode/settings.json +!.vscode/tasks.json +!.vscode/launch.json +!.vscode/extensions.json # User defined files # ###################### @@ -148,7 +153,6 @@ instance/ # Sphinx documentation **/docs/_build/ -**/docs/index.rst **/docs/autoapi # PyBuilder @@ -223,3 +227,9 @@ cython_debug/ # UV uv.lock + +# Ruff +.ruff_cache/ + +# pytest results written by BH.Engine.Python.Compute.RunPytest +.pytest_results.xml diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml new file mode 100644 index 00000000..f3bc251b --- /dev/null +++ b/.pre-commit-config.yaml @@ -0,0 +1,18 @@ +# Format and lint Python with the shared BHoM ruff standard (Python_Engine/Python/ruff.toml) on every commit. +# Install the hooks once with: uv run --project Python_Engine/Python pre-commit install +# The hooks use the project's own ruff (via uv), so the version always matches the one used in CI and VS Code. +repos: + - repo: local + hooks: + - id: ruff-format + name: ruff format + entry: uv run --project Python_Engine/Python ruff format + language: system + types_or: [python, pyi] + files: ^Python_Engine/Python/ + - id: ruff-check + name: ruff check + entry: uv run --project Python_Engine/Python ruff check --fix --exit-non-zero-on-fix + language: system + types_or: [python, pyi] + files: ^Python_Engine/Python/ diff --git a/.vscode/extensions.json b/.vscode/extensions.json new file mode 100644 index 00000000..5251a7ea --- /dev/null +++ b/.vscode/extensions.json @@ -0,0 +1,9 @@ +{ + "recommendations": [ + "ms-dotnettools.csdevkit", + "ms-python.python", + "ms-python.debugpy", + "charliermarsh.ruff", + "tamasfe.even-better-toml" + ] +} diff --git a/.vscode/launch.json b/.vscode/launch.json new file mode 100644 index 00000000..2aad0181 --- /dev/null +++ b/.vscode/launch.json @@ -0,0 +1,26 @@ +{ + "version": "0.2.0", + "configurations": [ + { + "name": "Python: current file", + "type": "debugpy", + "request": "launch", + "program": "${file}", + "cwd": "${workspaceFolder}/Python_Engine/Python", + "python": "${workspaceFolder}/Python_Engine/Python/.venv/Scripts/python.exe", + "console": "integratedTerminal", + "justMyCode": true + }, + { + "name": "Python: pytest current file", + "type": "debugpy", + "request": "launch", + "module": "pytest", + "args": ["${file}", "-x", "-vv"], + "cwd": "${workspaceFolder}/Python_Engine/Python", + "python": "${workspaceFolder}/Python_Engine/Python/.venv/Scripts/python.exe", + "console": "integratedTerminal", + "justMyCode": false + } + ] +} diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 00000000..8a0a76c7 --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,35 @@ +{ + // C# (C# Dev Kit) + "dotnet.defaultSolution": "Python_Toolkit.sln", + + // Python: use the toolkit's uv-managed environment (create it with the "Python: sync" task) + "python.defaultInterpreterPath": "${workspaceFolder}/Python_Engine/Python/.venv/Scripts/python.exe", + "python.testing.pytestEnabled": true, + "python.testing.unittestEnabled": false, + "python.testing.cwd": "${workspaceFolder}/Python_Engine/Python", + "python.testing.pytestArgs": ["tests"], + + // Formatting/linting with the shared BHoM ruff standard (Python_Engine/Python/ruff.toml) + "[python]": { + "editor.defaultFormatter": "charliermarsh.ruff", + "editor.formatOnSave": true, + "editor.codeActionsOnSave": { + "source.fixAll.ruff": "explicit", + "source.organizeImports.ruff": "explicit" + } + }, + + "files.exclude": { + "**/__pycache__": true, + "**/.pytest_cache": true, + "**/.ruff_cache": true + }, + "search.exclude": { + "**/.venv": true, + "**/bin": true, + "**/obj": true, + "Build": true, + "**/docs/_build": true, + "**/docs/autoapi": true + } +} diff --git a/.vscode/tasks.json b/.vscode/tasks.json new file mode 100644 index 00000000..6468ed63 --- /dev/null +++ b/.vscode/tasks.json @@ -0,0 +1,95 @@ +{ + // Build/test tasks: run with Ctrl+Shift+B (build) or "Tasks: Run Test Task". + // C# builds use BHoMSkipDeploy=true so nothing is copied into %ProgramData%\BHoM, except "C#: build and deploy". + "version": "2.0.0", + "options": { + "shell": { + "executable": "powershell.exe", + "args": ["-NoProfile", "-Command"] + } + }, + "tasks": [ + { + "label": "C#: build", + "type": "shell", + "command": "dotnet build Python_Toolkit.sln -p:BHoMSkipDeploy=true", + "group": { "kind": "build", "isDefault": true }, + "problemMatcher": "$msCompile" + }, + { + "label": "C#: build and deploy to BHoM", + "detail": "Builds Debug and copies the assemblies and Python code into %ProgramData%\\BHoM, as Visual Studio does.", + "type": "shell", + "command": "dotnet build Python_Toolkit.sln -c Debug", + "group": "build", + "problemMatcher": "$msCompile" + }, + { + "label": "C#: test", + "detail": "Unit tests (isolated from %ProgramData%; excludes the slower end-to-end Integration tests).", + "type": "shell", + "command": "dotnet test .ci/unit_tests/Python_Engine_Test/Python_Engine_Test.csproj --filter \"Category!=Integration\"", + "group": { "kind": "test", "isDefault": true }, + "problemMatcher": "$msCompile" + }, + { + "label": "C#: test (integration)", + "detail": "End-to-end: create the Python_Toolkit environment, run its pytest suite from C#, scaffold and test a downstream toolkit.", + "type": "shell", + "command": "dotnet test .ci/unit_tests/Python_Engine_Test/Python_Engine_Test.csproj --filter \"Category=Integration\" --logger \"console;verbosity=normal\"", + "group": "test", + "problemMatcher": "$msCompile" + }, + { + "label": "Python: sync", + "detail": "Create/update Python_Engine/Python/.venv with all extras and the dev tools.", + "type": "shell", + "command": "uv sync --all-extras", + "options": { "cwd": "${workspaceFolder}/Python_Engine/Python" }, + "problemMatcher": [] + }, + { + "label": "Python: test", + "type": "shell", + "command": "uv run pytest -m \"not slow\"", + "options": { "cwd": "${workspaceFolder}/Python_Engine/Python" }, + "group": "test", + "problemMatcher": [] + }, + { + "label": "Python: test (all, with coverage)", + "type": "shell", + "command": "uv run pytest --cov --cov-report=term-missing", + "options": { "cwd": "${workspaceFolder}/Python_Engine/Python" }, + "group": "test", + "problemMatcher": [] + }, + { + "label": "Python: format and lint", + "type": "shell", + "command": "uv run ruff format .; uv run ruff check --fix .", + "options": { "cwd": "${workspaceFolder}/Python_Engine/Python" }, + "problemMatcher": [] + }, + { + "label": "Python: build docs", + "type": "shell", + "command": "uv run --all-extras --group docs sphinx-build -b html docs docs/_build/html", + "options": { "cwd": "${workspaceFolder}/Python_Engine/Python" }, + "problemMatcher": [] + }, + { + "label": "Python: new toolkit", + "detail": "Scaffold a new BHoM Python toolkit from the standard template.", + "type": "shell", + "command": "uv run bhom-new-toolkit ${input:toolkitName} --output \"${input:toolkitOutput}\" --python ${input:pythonVersion}", + "options": { "cwd": "${workspaceFolder}/Python_Engine/Python" }, + "problemMatcher": [] + } + ], + "inputs": [ + { "id": "toolkitName", "type": "promptString", "description": "Toolkit name (e.g. Wind_Toolkit)" }, + { "id": "toolkitOutput", "type": "promptString", "description": "Folder to create it in (e.g. C:/repos/Wind_Toolkit/Wind_Toolkit_Engine/Python)" }, + { "id": "pythonVersion", "type": "promptString", "description": "Python version", "default": "3.10" } + ] +} diff --git a/Python_Engine/Compute/CreateToolkit.cs b/Python_Engine/Compute/CreateToolkit.cs new file mode 100644 index 00000000..5a7e2ed8 --- /dev/null +++ b/Python_Engine/Compute/CreateToolkit.cs @@ -0,0 +1,114 @@ +/* + * This file is part of the Buildings and Habitats object Model (BHoM) + * Copyright (c) 2015 - 2026, the respective contributors. All rights reserved. + * + * Each contributor holds copyright over their respective contributions. + * The project versioning (Git) records all such contribution source information. + * + * + * The BHoM is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3.0 of the License, or + * (at your option) any later version. + * + * The BHoM is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this code. If not, see . + */ + +using BH.oM.Base; +using BH.oM.Base.Attributes; +using BH.oM.Python; +using System.Collections.Generic; +using System.ComponentModel; +using System.IO; +using System.Linq; + +namespace BH.Engine.Python +{ + public static partial class Compute + { + [Description("Create a new BHoM Python toolkit (pyproject.toml, source package, tests and documentation) from the standard template. " + + "The new toolkit depends on Python_Toolkit (and any other given toolkits) from the BHoM Python environments directory, extends the shared ruff configuration, and is ready for `uv sync`. " + + "This runs python_toolkit.scaffold using the Python_Toolkit environment, which must already be installed (see InstallPythonToolkitVenv).")] + [Input("name", "The toolkit name, e.g. \"Wind_Toolkit\". The Python package will be its lower-case form, e.g. \"wind_toolkit\".")] + [Input("targetDirectory", "The (new or empty) folder to create the toolkit in, typically /_Engine/Python.")] + [Input("pythonVersion", "The major.minor Python version the toolkit uses, e.g. \"3.11\" (3.10 or later).")] + [Input("dependencies", "Other BHoM Python toolkits this toolkit depends on, by name (e.g. \"LadybugTools_Toolkit\"). Python_Toolkit is always included.")] + [Input("extras", "Optional Python_Toolkit extras to depend on: \"plot\", \"ui\" and/or \"clr\".")] + [Input("run", "Set to True to create the toolkit.")] + [MultiOutput(0, "success", "True if the toolkit was created.")] + [MultiOutput(1, "output", "The scaffold output, including the next steps to wire the toolkit into BHoM.")] + public static Output CreateToolkit(string name, string targetDirectory, string pythonVersion = "3.10", List dependencies = null, List extras = null, bool run = false) + { + if (string.IsNullOrWhiteSpace(name) || string.IsNullOrWhiteSpace(targetDirectory)) + { + Base.Compute.RecordError("A toolkit name and target directory are required."); + return null; + } + + string arguments = $"-m python_toolkit.scaffold \"{name}\" --output \"{Path.GetFullPath(targetDirectory)}\" --python \"{pythonVersion}\" --extensions-dir \"{Query.DirectoryEnvironments()}\""; + foreach (string dependency in (dependencies ?? new List()).Where(d => !string.IsNullOrWhiteSpace(d))) + arguments += $" --depends-on \"{dependency}\""; + foreach (string extra in (extras ?? new List()).Where(e => !string.IsNullOrWhiteSpace(e))) + arguments += $" --extras \"{extra}\""; + + if (!run) + { + Base.Compute.RecordNote($"The following will be executed using the {Query.ToolkitName()} environment: python {arguments}"); + return null; + } + + if (!Query.VirtualEnvironmentExists(Query.ToolkitName())) + { + Base.Compute.RecordError($"The {Query.ToolkitName()} environment is required to create toolkits. Install it first using InstallPythonToolkitVenv."); + return null; + } + + PythonEnvironment venv = Query.VirtualEnvironment(Query.ToolkitName()); + Output result = RunCommandStdout($"\"{venv.Executable}\" {arguments}"); + + return new Output + { + Item1 = result.Item3 == 0, + Item2 = result.Item3 == 0 ? result.Item1 : result.Item2, + }; + } + + /***************************************************/ + + [Description("Build a toolkit's HTML documentation with Sphinx, from the docstrings in its source code. Output is written to /docs/_build/html.")] + [Input("toolkitDirectory", "The directory containing the toolkit's pyproject.toml and docs/conf.py.")] + [Input("run", "Set to True to build the documentation.")] + [Output("index", "The path to the built documentation's index.html, or null on failure.")] + public static string BuildDocumentation(string toolkitDirectory, bool run = false) + { + if (string.IsNullOrWhiteSpace(toolkitDirectory) || !File.Exists(Path.Combine(toolkitDirectory, "docs", "conf.py"))) + { + Base.Compute.RecordError($"No Sphinx configuration (docs/conf.py) was found in {toolkitDirectory}."); + return null; + } + + toolkitDirectory = Path.GetFullPath(toolkitDirectory); + string output = Path.Combine(toolkitDirectory, "docs", "_build", "html"); + string arguments = $"run --all-extras --group docs sphinx-build -b html docs \"{output}\""; + + if (!run) + { + Base.Compute.RecordNote($"The following will be executed from \"{toolkitDirectory}\": uv {arguments}"); + return null; + } + + InstallUV(true); + if (RunUV(arguments, startDirectory: toolkitDirectory, timeoutMinutes: 30).Item3 != 0) + return null; + + string index = Path.Combine(output, "index.html"); + return File.Exists(index) ? index : null; + } + } +} diff --git a/Python_Engine/Compute/Install.cs b/Python_Engine/Compute/Install.cs index 81520045..cd536b49 100644 --- a/Python_Engine/Compute/Install.cs +++ b/Python_Engine/Compute/Install.cs @@ -20,6 +20,7 @@ * along with this code. If not, see . */ +using BH.oM.Base; using BH.oM.Base.Attributes; using BH.oM.Python; using System; @@ -32,64 +33,74 @@ namespace BH.Engine.Python { public static partial class Compute { - [Description("Install UV in the BHoM tools directory and add that directory to the process PATH. Install any missing ruff, jupyterlab and sphinx tools; UV installations elsewhere are not used.")] - [Input("run", "Set to True to install UV and its core tools.")] + [Description("Install the pinned version of UV (see Query.UVVersion) into the BHoM tools directory. UV installations elsewhere (e.g. on PATH) are never used, and the process PATH is not modified. If UV is already present at the pinned version, nothing happens.")] + [Input("run", "Set to True to install UV.")] public static void InstallUV(bool run = false) { + string uvExecutable = Query.UVExecutable(); + string version = Query.UVVersion(); + if (!run) + { + Base.Compute.RecordNote($"UV {version} will be installed to {uvExecutable} if it is not already present."); + return; + } + + if (File.Exists(uvExecutable) && InstalledUVVersion(uvExecutable) == version) return; string toolsDirectory = Query.DirectoryTools(); + string command = "powershell.exe -NoProfile -NonInteractive -ExecutionPolicy Bypass -Command \"$ErrorActionPreference = 'Stop'; " + + $"$env:UV_INSTALL_DIR = '{toolsDirectory.Replace("'", "''")}'; $env:UV_NO_MODIFY_PATH = '1'; " + + $"irm https://astral.sh/uv/{version}/install.ps1 | iex\""; + if (RunCommand(command, true, null, 10, null).Item3 != 0) + return; - string uvExecutable = Query.UVExecutable(); - if (!File.Exists(uvExecutable)) - { - var installation = RunCommandStdout( - command: $"powershell.exe -NoProfile -NonInteractive -ExecutionPolicy Bypass -Command \"$ErrorActionPreference = 'Stop'; $env:UV_INSTALL_DIR = '{toolsDirectory.Replace("'", "''")}'; $env:UV_NO_MODIFY_PATH = '1'; irm https://astral.sh/uv/install.ps1 | iex\""); - if (installation.Item3 != 0) - return; - if (!File.Exists(uvExecutable)) - { - Base.Compute.RecordError($"UV installation did not produce an executable at {uvExecutable}."); - return; - } - } + string installed = File.Exists(uvExecutable) ? InstalledUVVersion(uvExecutable) : null; + if (installed != version) + Base.Compute.RecordError($"UV installation did not produce UV {version} at {uvExecutable} (found: {installed ?? "nothing"})."); + } - string[] otherPaths = (Environment.GetEnvironmentVariable("PATH") ?? string.Empty).Split(Path.PathSeparator) - .Where(directory => !string.Equals(directory.Trim().Trim('"'), toolsDirectory, StringComparison.OrdinalIgnoreCase)) - .ToArray(); - Environment.SetEnvironmentVariable("PATH", string.Join(Path.PathSeparator.ToString(), new[] { toolsDirectory }.Concat(otherPaths))); + /***************************************************/ - var installedTools = RunCommandStdout($"\"{uvExecutable}\" tool list"); - if (installedTools.Item3 != 0) - return; + private static string InstalledUVVersion(string uvExecutable) + { + // output takes the form "uv 0.13.10 (e3e7c1eac 2026-11-24 x86_64-pc-windows-msvc)" + Output result = RunCommand($"\"{uvExecutable}\" --version", true, null, 1, null); + if (result.Item3 != 0) + return null; - var installedNames = new HashSet( - installedTools.Item1.Split(new[] { '\r', '\n' }, StringSplitOptions.RemoveEmptyEntries) - .Where(line => !line.StartsWith("-")) - .Select(line => line.Split(' ')[0]), StringComparer.OrdinalIgnoreCase); - foreach (string tool in new[] { "ruff", "jupyterlab", "sphinx" }) - { - if (!installedNames.Contains(tool)) - RunCommandStdout($"\"{uvExecutable}\" tool install {tool}"); - } + string[] parts = result.Item1.Split(new[] { ' ' }, StringSplitOptions.RemoveEmptyEntries); + return parts.Length > 1 ? parts[1] : null; } - [Description("Register a Jupyter kernel for a given venv unless that kernel already exists.")] - [Input("venv", "The Python environment to install the packages to.")] + /***************************************************/ + + [Description("Register a Jupyter kernel for a given venv unless that kernel already exists. If ipykernel is missing it is installed into the environment without modifying any project pyproject.toml.")] + [Input("venv", "The Python environment to register as a kernel.")] public static void InstallJupyterKernel(this PythonEnvironment venv) { + if (venv == null || !File.Exists(venv.Executable)) + { + Base.Compute.RecordError("A valid Python environment is required to install a Jupyter kernel."); + return; + } + if (JupyterKernelExists(venv, venv.Name, true) != false) return; - venv.InstallPackages(packages: new List() { "ipykernel" }, true); - string directory = Query.VirtualEnvironmentDirectory(venv.Name); + // uv pip install (rather than uv add) never modifies the project's pyproject.toml + if (RunUV($"pip install --python \"{venv.Executable}\" ipykernel").Item3 != 0) + return; + string directory = Path.GetDirectoryName(Path.GetDirectoryName(Path.GetDirectoryName(venv.Executable))); string cmd = $"\"{venv.Executable}\" -m ipykernel install --user --name \"{venv.Name}\" --display-name \"{venv.Name}\""; RunCommandStdout(command: cmd, startDirectory: directory); } - [PreviousVersion("9.3", "BH.Engine.Python.Compute.InstallPackages(PythonEnvironment, List)")] + /***************************************************/ + + [PreviousVersion("9.3", "BH.Engine.Python.Compute.InstallPackages(BH.oM.Python.PythonEnvironment, System.Collections.Generic.List)")] [Description("Install a list of packages to a given Python executable. UV retains satisfied versions and registers project dependencies when applicable.")] [Input("venv", "The Python environment to install the packages to.")] [Input("packages", "The packages to install.")] @@ -100,15 +111,24 @@ public static void InstallPackages( bool run = false ) { + if (venv == null || packages == null || packages.Count == 0) + { + Base.Compute.RecordError("A Python environment and at least one package are required."); + return; + } + string directory = Query.VirtualEnvironmentDirectory(venv.Name); + if (directory == null) + return; bool isProject = File.Exists(Path.Combine(directory, "pyproject.toml")); string uvCommand = isProject ? "add" : "pip install"; - string cmd = $"\"{Query.UVExecutable()}\" {uvCommand} --python \"{venv.Executable}\" {string.Join(" ", packages.Select(package => $"\"{package}\""))}"; + string arguments = $"{uvCommand} --python \"{venv.Executable}\" {string.Join(" ", packages.Select(package => $"\"{package}\""))}"; + string cmd = $"\"{Query.UVExecutable()}\" {arguments}"; if (run) { - RunCommandStdout(command: cmd, startDirectory: directory); + RunUV(arguments, startDirectory: directory); } else { @@ -116,7 +136,7 @@ public static void InstallPackages( } } - [PreviousVersion("9.3", "BH.Engine.Python.Compute.InstallPackages(PythonEnvironment, string)")] + [PreviousVersion("9.3", "BH.Engine.Python.Compute.InstallPackageLocal(BH.oM.Python.PythonEnvironment, System.String)")] [Description("Install a local editable Python package. An unchanged installation from the same directory is retained; project dependencies are still registered.")] [Input("venv", "The Python environment to install the packages to.")] [Input("packageDirectory", "The package to install.")] @@ -133,12 +153,21 @@ public static void InstallPackageLocal( return; } + if (venv == null) + { + Base.Compute.RecordError("A Python environment is required."); + return; + } + packageDirectory = Path.GetFullPath(packageDirectory); string directory = Query.VirtualEnvironmentDirectory(venv.Name); + if (directory == null) + return; bool isProject = File.Exists(Path.Combine(directory, "pyproject.toml")); string uvCommand = isProject ? "add" : "pip install"; - string cmd = $"\"{Query.UVExecutable()}\" {uvCommand} --python \"{venv.Executable}\" --editable \"{packageDirectory}\""; + string arguments = $"{uvCommand} --python \"{venv.Executable}\" --editable \"{packageDirectory}\""; + string cmd = $"\"{Query.UVExecutable()}\" {arguments}"; if (run) { @@ -165,7 +194,7 @@ public static void InstallPackageLocal( return; } } - RunCommandStdout(command: cmd, startDirectory: directory); + RunUV(arguments, startDirectory: directory); } else { diff --git a/Python_Engine/Compute/Remove.cs b/Python_Engine/Compute/Remove.cs index d6af1c57..33feec6d 100644 --- a/Python_Engine/Compute/Remove.cs +++ b/Python_Engine/Compute/Remove.cs @@ -22,8 +22,11 @@ using BH.oM.Base.Attributes; using BH.oM.Python; +using System; +using System.Collections.Generic; using System.ComponentModel; using System.IO; +using System.Linq; namespace BH.Engine.Python { @@ -49,11 +52,15 @@ public static void RemoveVirtualEnvironment(string name, bool run = false) { Directory.Delete(venvDirectory, true); } - catch (IOException ex) + catch (Exception ex) when (ex is IOException || ex is UnauthorizedAccessException) { Base.Compute.RecordError($"Failed to remove virtual environment directory {venvDirectory}: {ex.Message}"); } } + else + { + Base.Compute.RecordNote($"The virtual environment at {venvDirectory} (and its Jupyter kernel) will be removed."); + } } [Description("Remove the named Jupyter kernel. Missing environments or kernels produce a warning instead of an error.")] @@ -106,29 +113,40 @@ public static void RemoveUV(bool run = false) { Directory.Delete(toolsDirectory, true); } - catch (IOException ex) + catch (Exception ex) when (ex is IOException || ex is UnauthorizedAccessException) { Base.Compute.RecordError($"Failed to remove UV from {toolsDirectory}: {ex.Message}"); } } else { - Base.Compute.RecordNote($"UV (and all other associated tools) will be removed from {toolsDirectory}."); + Base.Compute.RecordNote($"UV and everything it manages (Python interpreters, package cache and tools) will be removed from {toolsDirectory}. Existing virtual environments depend on these interpreters and will need recreating."); } } [PreviousVersion("9.3", "BH.Engine.Python.Compute.RemoveEverything()")] - [Description("Completely remove all BHoM-related Python environments, kernels and tools.")] + [Description("Completely remove all BHoM-related Python environments, kernels and tools (including UV and the Python interpreters it manages). Toolkit source code is retained.")] + [Input("run", "Run this method.")] public static void RemoveEverything(bool run = false) { - if ( run ) + string toolsDirectory = Query.DirectoryTools(); + List names = Directory.GetDirectories(Query.DirectoryEnvironments()) + .Where(directory => !string.Equals(Path.GetFullPath(directory).TrimEnd(Path.DirectorySeparatorChar), toolsDirectory.TrimEnd(Path.DirectorySeparatorChar), StringComparison.OrdinalIgnoreCase)) + .Select(directory => Path.GetFileName(directory)) + .Where(name => Query.VirtualEnvironmentExists(name)) + .ToList(); + + if (!run) { - foreach (string env in Directory.GetDirectories(Query.DirectoryEnvironments())) - { - RemoveVirtualEnvironment(Path.GetDirectoryName(env), run: run); - } - RemoveUV(run: run); + Base.Compute.RecordNote($"The following environments will be removed: {string.Join(", ", names)}. UV and its managed tools will be removed from {toolsDirectory}."); + return; } + + foreach (string name in names) + RemoveVirtualEnvironment(name, run: true); + + if (File.Exists(Query.UVExecutable())) + RemoveUV(run: true); } } } diff --git a/Python_Engine/Compute/Run.cs b/Python_Engine/Compute/Run.cs index 82e3d7fd..ceecc99b 100644 --- a/Python_Engine/Compute/Run.cs +++ b/Python_Engine/Compute/Run.cs @@ -23,6 +23,7 @@ using BH.oM.Base.Attributes; using BH.oM.Base; using System; +using System.Collections.Generic; using System.ComponentModel; using System.Diagnostics; using System.IO; @@ -47,6 +48,30 @@ public static Output RunCommandStdout( string startDirectory = null, double timeoutMinutes = 5 ) + { + return RunCommand(command, hideWindows, startDirectory, timeoutMinutes, null); + } + + /***************************************************/ + /**** Private methods ****/ + /***************************************************/ + + // Run a command using the BHoM-managed UV executable and its environment variables. + private static Output RunUV(string arguments, string startDirectory = null, double timeoutMinutes = 15) + { + string command = $"\"{Query.UVExecutable()}\" {arguments}"; + return RunCommand(command, true, startDirectory, timeoutMinutes, Query.UVEnvironmentVariables()); + } + + /***************************************************/ + + private static Output RunCommand( + string command, + bool hideWindows, + string startDirectory, + double timeoutMinutes, + Dictionary environment + ) { if (string.IsNullOrWhiteSpace(startDirectory)) { @@ -74,6 +99,11 @@ public static Output RunCommandStdout( // Avoid environment-variable interference. process.StartInfo.EnvironmentVariables["PYTHONHOME"] = string.Empty; process.StartInfo.EnvironmentVariables["PYTHONPATH"] = string.Empty; + if (environment != null) + { + foreach (KeyValuePair variable in environment) + process.StartInfo.EnvironmentVariables[variable.Key] = variable.Value; + } process.Start(); @@ -148,16 +178,20 @@ public static string RunPythonString(this oM.Python.PythonEnvironment venv, stri } // place pythonScript into a temporary .py file to reference and run, then call using the passed environment - string scriptFile = Path.Combine(Path.GetTempPath(), "_BHoM_PythonScript.py"); - using (StreamWriter outputFile = new StreamWriter(scriptFile)) + // a unique file per call avoids collisions between concurrent calls + string scriptFile = Path.Combine(Path.GetTempPath(), $"_BHoM_PythonScript_{Guid.NewGuid():N}.py"); + File.WriteAllText(scriptFile, pythonString + Environment.NewLine); + + try { - outputFile.WriteLine(pythonString); + string cmd = $"\"{venv.Executable}\" \"{scriptFile}\""; + Output result = RunCommandStdout(command: cmd); + return result.Item3 == 0 ? result.Item1 : result.Item2; + } + finally + { + try { File.Delete(scriptFile); } catch (IOException) { } } - - string cmd = $"{Modify.AddQuotesIfRequired(venv.Executable)} {scriptFile}"; - - Output result = RunCommandStdout(command: cmd); - return result.Item3 == 0 ? result.Item1 : result.Item2; } } } diff --git a/Python_Engine/Compute/RunPytest.cs b/Python_Engine/Compute/RunPytest.cs new file mode 100644 index 00000000..c51ef841 --- /dev/null +++ b/Python_Engine/Compute/RunPytest.cs @@ -0,0 +1,107 @@ +/* + * This file is part of the Buildings and Habitats object Model (BHoM) + * Copyright (c) 2015 - 2026, the respective contributors. All rights reserved. + * + * Each contributor holds copyright over their respective contributions. + * The project versioning (Git) records all such contribution source information. + * + * + * The BHoM is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3.0 of the License, or + * (at your option) any later version. + * + * The BHoM is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this code. If not, see . + */ + +using BH.oM.Base; +using BH.oM.Base.Attributes; +using BH.oM.Python; +using System.ComponentModel; +using System.IO; + +namespace BH.Engine.Python +{ + public static partial class Compute + { + [Description("Run a toolkit's Python tests with pytest, using the toolkit's own virtual environment. The toolkit's pytest configuration (in its pyproject.toml) is used, and a JUnit XML report is written to /.pytest_results.xml.")] + [Input("toolkitDirectory", "The directory containing the toolkit's pyproject.toml and .venv, e.g. Path.Combine(Query.DirectoryEnvironments(), \"Python_Toolkit\").")] + [Input("arguments", "Additional pytest arguments, e.g. -m \"not slow\" or tests/test_core.py. Quote values with double quotes.")] + [Input("run", "Set to True to run the tests.")] + [Input("timeoutMinutes", "A number of minutes beyond which the test run is stopped.")] + [MultiOutput(0, "passed", "True if every collected test passed.")] + [MultiOutput(1, "exitCode", "The pytest exit code: 0 all passed, 1 some failed, 2 interrupted, 3 internal error, 4 usage error, 5 no tests collected, -1 timeout.")] + [MultiOutput(2, "output", "The pytest console output (stdout followed by stderr).")] + [MultiOutput(3, "report", "The path to the JUnit XML report, or null if none was written.")] + public static Output RunPytest(string toolkitDirectory, string arguments = "", bool run = false, double timeoutMinutes = 30) + { + if (string.IsNullOrWhiteSpace(toolkitDirectory) || !Directory.Exists(toolkitDirectory)) + { + Base.Compute.RecordError($"Toolkit directory not found: {toolkitDirectory}"); + return null; + } + + toolkitDirectory = Path.GetFullPath(toolkitDirectory); + string python = Path.Combine(toolkitDirectory, ".venv", "Scripts", "python.exe"); + string report = Path.Combine(toolkitDirectory, ".pytest_results.xml"); + string cmd = $"\"{python}\" -m pytest --junitxml=\"{report}\" {arguments}".Trim(); + + if (!run) + { + Base.Compute.RecordNote($"The following command will be executed from \"{toolkitDirectory}\": {cmd}"); + return null; + } + + if (!File.Exists(python)) + { + Base.Compute.RecordError($"No virtual environment was found at {Path.Combine(toolkitDirectory, ".venv")}. Create it first (e.g. using VirtualEnvironment)."); + return null; + } + + if (File.Exists(report)) + File.Delete(report); + + // tests must never write usage analytics to the real BHoM logs + System.Collections.Generic.Dictionary environment = new System.Collections.Generic.Dictionary { { "DISABLE_BHOM_ANALYTICS", "1" } }; + Output result = RunCommand(cmd, true, toolkitDirectory, timeoutMinutes, environment); + + return new Output + { + Item1 = result.Item3 == 0, + Item2 = result.Item3, + Item3 = string.IsNullOrEmpty(result.Item2) ? result.Item1 : result.Item1 + System.Environment.NewLine + result.Item2, + Item4 = File.Exists(report) ? report : null, + }; + } + + /***************************************************/ + + [Description("Run the Python tests of the toolkit that owns the given virtual environment. See RunPytest(string, string, bool, double).")] + [Input("venv", "A toolkit's Python environment.")] + [Input("arguments", "Additional pytest arguments, e.g. -m \"not slow\". Quote values with double quotes.")] + [Input("run", "Set to True to run the tests.")] + [Input("timeoutMinutes", "A number of minutes beyond which the test run is stopped.")] + [MultiOutput(0, "passed", "True if every collected test passed.")] + [MultiOutput(1, "exitCode", "The pytest exit code.")] + [MultiOutput(2, "output", "The pytest console output.")] + [MultiOutput(3, "report", "The path to the JUnit XML report, or null if none was written.")] + public static Output RunPytest(this PythonEnvironment venv, string arguments = "", bool run = false, double timeoutMinutes = 30) + { + if (venv == null || string.IsNullOrWhiteSpace(venv.Executable)) + { + Base.Compute.RecordError("A valid Python environment is required."); + return null; + } + + // /.venv/Scripts/python.exe + string toolkitDirectory = Path.GetDirectoryName(Path.GetDirectoryName(Path.GetDirectoryName(venv.Executable))); + return RunPytest(toolkitDirectory, arguments, run, timeoutMinutes); + } + } +} diff --git a/Python_Engine/Compute/UpdateBHoMPackages.cs b/Python_Engine/Compute/UpdateBHoMPackages.cs index 5fbebc2b..1eb2bf54 100644 --- a/Python_Engine/Compute/UpdateBHoMPackages.cs +++ b/Python_Engine/Compute/UpdateBHoMPackages.cs @@ -29,14 +29,22 @@ namespace BH.Engine.Python { public static partial class Compute { - [Description("Perform an update on the provided Python environment.")] + [Description("Update the provided toolkit environment to match its pyproject.toml (and the latest versions of any BHoM toolkits it depends on) using UV.")] [Input("venv", "The Python environment to update.")] public static void UpdateBHoMPackages(this PythonEnvironment venv) { - string cmd = $"\"{Query.UVExecutable()}\" sync"; - string directory = Path.Combine(Query.DirectoryEnvironments(), venv.Name); + if (venv == null) + { + Base.Compute.RecordError("A Python environment is required."); + return; + } - RunCommandStdout(cmd, startDirectory: directory); + string directory = Query.VirtualEnvironmentDirectory(venv.Name); + if (directory == null) + return; + + InstallUV(true); + RunUV("sync --all-extras", startDirectory: directory); } } } diff --git a/Python_Engine/Compute/VirtualEnvironment.cs b/Python_Engine/Compute/VirtualEnvironment.cs index 730ecaac..4d9cc4a3 100644 --- a/Python_Engine/Compute/VirtualEnvironment.cs +++ b/Python_Engine/Compute/VirtualEnvironment.cs @@ -23,6 +23,7 @@ using BH.oM.Base.Attributes; using BH.oM.Python; using System; +using System.Collections.Generic; using System.ComponentModel; using System.IO; using System.Text.RegularExpressions; @@ -31,9 +32,11 @@ namespace BH.Engine.Python { public static partial class Compute { - private static readonly Regex m_VersionField = new Regex(@"(?m)^(?[ \t]*version[ \t]*=[ \t]*)(?['""])[^'""\r\n]*\k(?:[ \t]*#.*)?$"); + // matches a static `version = "x"` line, capturing any trailing comment so it can be preserved when re-stamping + private static readonly Regex m_VersionField = new Regex(@"(?m)^(?[ \t]*version[ \t]*=[ \t]*)(?['""])(?[^'""\r\n]*)\k(?[ \t]*(?:#[^\r\n]*)?)(?=\r?$)"); + + /***************************************************/ - [PreviousVersion("9.3", "BH.Engine.Python.Compute.VirtualEnvironment(PythonVersion, string, bool)")] [Description("Create a Python Virtual Environment of a given version and name.")] [Input("version", "The version of Python to use for this environment.")] [Input("name", "The name of this venv.")] @@ -65,8 +68,7 @@ public static PythonEnvironment VirtualEnvironment(string version, string name, string directory = Path.Combine(Query.DirectoryEnvironments(), name); Directory.CreateDirectory(directory); - string cmd = $"\"{Query.UVExecutable()}\" venv \"{Path.Combine(directory, ".venv")}\" --python \"{version}\""; - if (RunCommandStdout(command: cmd, startDirectory: directory).Item3 != 0) + if (RunUV($"venv \"{Path.Combine(directory, ".venv")}\" --python \"{version}\"", startDirectory: directory).Item3 != 0) return null; PythonEnvironment venv = new PythonEnvironment() { Executable = Query.VirtualEnvironmentExecutable(name), Name = name }; @@ -76,22 +78,31 @@ public static PythonEnvironment VirtualEnvironment(string version, string name, return venv; } - [Description("Create a Python Virtual Environment from a TOML file in the named BHoM environment directory. Before installation, set the project's version to the current BHoM version.")] + [Description("Create (or update) a Python virtual environment from a toolkit's pyproject.toml, deployed in the BHoM Python environments directory (i.e. //pyproject.toml). " + + "The project's version is stamped with the current BHoM version, any local toolkit dependencies declared in [tool.uv.sources] are checked to be present, then the environment is synchronised using UV (including all extras and the default dependency groups) and registered as a Jupyter kernel.")] [Input("tomlFile", "The path to a TOML file containing venv configuration.")] - [Input("reload", "Reload the virtual environment rather than recreating it, if it already exists.")] + [Input("reload", "Update the existing virtual environment in place (fast) rather than deleting and recreating it, if it already exists.")] [Output("venv", "The resultant venv.")] public static PythonEnvironment VirtualEnvironment(string tomlFile, bool reload = true) { - string name = Directory.GetParent(tomlFile).Name; - string directory = Path.Combine(Query.DirectoryEnvironments(), name); - - // a package must have an associated TOML file, a README.md and a src/ - if (!File.Exists(tomlFile)) + if (string.IsNullOrWhiteSpace(tomlFile) || !File.Exists(tomlFile)) { Base.Compute.RecordError($"TOML file not found at {tomlFile}"); return null; } + tomlFile = Path.GetFullPath(tomlFile); + string directory = Path.GetDirectoryName(tomlFile); + string name = Path.GetFileName(directory); + + string expectedDirectory = Path.Combine(Query.DirectoryEnvironments(), name); + if (!string.Equals(directory, expectedDirectory, StringComparison.OrdinalIgnoreCase)) + { + Base.Compute.RecordError($"The TOML file must be deployed within the BHoM Python environments directory, at {Path.Combine(expectedDirectory, "pyproject.toml")}. For development outside this directory, run `uv sync` from the project folder instead."); + return null; + } + + // a package must have an associated TOML file, a README.md and a src/ string readmeFile = Path.Combine(directory, "README.md"); if (!File.Exists(readmeFile)) { @@ -99,8 +110,54 @@ public static PythonEnvironment VirtualEnvironment(string tomlFile, bool reload return null; } + string packageName = StampVersion(tomlFile, Base.Query.BHoMVersion()); + if (packageName == null) + return null; + + string packageFile = Path.Combine(directory, "src", packageName, "__init__.py"); + if (!File.Exists(packageFile)) + { + Base.Compute.RecordError($"A Python package must contain a .\\src\\{packageName}\\__init__.py file."); + return null; + } + + if (!CheckLocalSources(tomlFile)) + return null; + + if (Query.VirtualEnvironmentExists(name) && !reload) + RemoveVirtualEnvironment(name: name, run: true); + + InstallUV(true); // ensure UV is installed + + if (RunUV("sync --all-extras", startDirectory: directory).Item3 != 0) + return null; + + PythonEnvironment venv = new PythonEnvironment() { Executable = Query.VirtualEnvironmentExecutable(name), Name = name }; + if (venv.Executable == null) + return null; + + InstallJupyterKernel(venv: venv); + + return venv; + } + + /***************************************************/ + /**** Private methods ****/ + /***************************************************/ + + // A TOML table's content, from its header up to the next table header. + private static Match TomlTable(string toml, string table) + { + return Regex.Match(toml, @"(?ms)^[ \t]*\[" + Regex.Escape(table) + @"\][ \t]*(?:#[^\r\n]*)?\r?\n(?.*?)(?=^[ \t]*\[|\z)"); + } + + /***************************************************/ + + // Set the static [project] version to the given version, preserving formatting and comments. Returns the [project] name, or null on failure. + private static string StampVersion(string tomlFile, string version) + { string toml = File.ReadAllText(tomlFile); - Match project = Regex.Match(toml, @"(?ms)^[ \t]*\[project\][ \t]*(?:#[^\r\n]*)?\r?\n(?.*?)(?=^[ \t]*\[|\z)"); + Match project = TomlTable(toml, "project"); string packageName = Regex.Match(project.Groups["content"].Value, @"(?m)^[ \t]*name[ \t]*=[ \t]*['""](?[^'""\r\n]+)['""]").Groups["name"].Value; if (!project.Success || string.IsNullOrWhiteSpace(packageName)) @@ -109,54 +166,74 @@ public static PythonEnvironment VirtualEnvironment(string tomlFile, bool reload return null; } - string packageFile = Path.Combine(directory, "src", packageName, "__init__.py"); - if (!File.Exists(packageFile)) + Group content = project.Groups["content"]; + Match versionField = m_VersionField.Match(content.Value); + if (!versionField.Success) { - Base.Compute.RecordError($"A Python package must contain a .\\src\\{packageName}\\__init__.py file."); + Base.Compute.RecordError($"A static [project] version is required in {tomlFile}."); return null; } - string projectContent = project.Groups["content"].Value; - if (!m_VersionField.IsMatch(projectContent)) + if (versionField.Groups["value"].Value != version) { - Base.Compute.RecordError($"A static [project] version is required in {tomlFile}."); - return null; + string quote = versionField.Groups["quote"].Value; + string updatedProject = m_VersionField.Replace(content.Value, + match => match.Groups["prefix"].Value + quote + version + quote + match.Groups["suffix"].Value, 1); + File.WriteAllText(tomlFile, toml.Substring(0, content.Index) + updatedProject + toml.Substring(content.Index + content.Length)); } - if (Query.VirtualEnvironmentExists(name)) - { - if (reload) - { - PythonEnvironment existingVenv = new PythonEnvironment() { Executable = Query.VirtualEnvironmentExecutable(name), Name = name }; - - string updateCmd = $"\"{Query.UVExecutable()}\" sync --all-packages"; - if (RunCommandStdout(updateCmd, startDirectory: directory).Item3 != 0) - return null; + return packageName; + } - return existingVenv; - } - else - { - RemoveVirtualEnvironment(name: name, run: true); - } - } + /***************************************************/ - string updatedProject = m_VersionField.Replace(projectContent, - match => match.Groups["prefix"].Value + $"\"{Base.Query.BHoMVersion()}\"", 1); - Group content = project.Groups["content"]; - File.WriteAllText(tomlFile, toml.Substring(0, content.Index) + updatedProject + toml.Substring(content.Index + content.Length)); + // Ensure every local path declared in [tool.uv.sources] exists (i.e. dependent BHoM toolkits are installed), following + // the whole dependency chain (dependencies of dependencies), and stamp the versions of deployed toolkits along the way. + private static bool CheckLocalSources(string tomlFile) + { + HashSet visited = new HashSet(StringComparer.OrdinalIgnoreCase) { Path.GetDirectoryName(tomlFile) }; + return CheckLocalSources(tomlFile, new List { Path.GetFileName(Path.GetDirectoryName(tomlFile)) }, visited); + } - InstallUV(true); // ensure UV is installed + /***************************************************/ - string cmd = $"\"{Query.UVExecutable()}\" sync --all-packages"; - if (RunCommandStdout(cmd, startDirectory: directory).Item3 != 0) - return null; + private static bool CheckLocalSources(string tomlFile, List chain, HashSet visited) + { + string directory = Path.GetDirectoryName(tomlFile); + Match sources = TomlTable(File.ReadAllText(tomlFile), "tool.uv.sources"); + if (!sources.Success) + return true; + + bool success = true; + MatchCollection entries = Regex.Matches(sources.Groups["content"].Value, + @"(?m)^[ \t]*(?[A-Za-z0-9_.\-]+)[ \t]*=[ \t]*\{[^}\r\n]*\bpath[ \t]*=[ \t]*['""](?[^'""\r\n]+)['""]"); + foreach (Match entry in entries) + { + string dependencyName = entry.Groups["name"].Value; + string dependencyDirectory = Path.GetFullPath(Path.Combine(directory, entry.Groups["path"].Value)); + string dependencyToml = Path.Combine(dependencyDirectory, "pyproject.toml"); - PythonEnvironment venv = new PythonEnvironment() { Executable = Query.VirtualEnvironmentExecutable(name), Name = name }; + // each toolkit is only checked once, which also guards against circular dependencies + if (!visited.Add(dependencyDirectory)) + continue; - InstallJupyterKernel(venv: venv); + List dependencyChain = new List(chain) { dependencyName }; + if (!File.Exists(dependencyToml)) + { + string via = chain.Count > 1 ? $" (required via {string.Join(" -> ", dependencyChain)})" : ""; + Base.Compute.RecordError($"{chain[chain.Count - 1]} depends on {dependencyName}{via}, which was not found at {dependencyDirectory}. Install (or build) the BHoM toolkit providing {dependencyName} first."); + success = false; + continue; + } - return venv; + // only stamp deployed toolkits; never modify source repositories + if (dependencyDirectory.StartsWith(Query.DirectoryEnvironments(), StringComparison.OrdinalIgnoreCase)) + success &= StampVersion(dependencyToml, Base.Query.BHoMVersion()) != null; + + success &= CheckLocalSources(dependencyToml, dependencyChain, visited); + } + + return success; } } } diff --git a/Python_Engine/Python/Dockerfile b/Python_Engine/Python/Dockerfile index e7a25a8b..f7f5a4d7 100644 --- a/Python_Engine/Python/Dockerfile +++ b/Python_Engine/Python/Dockerfile @@ -1,6 +1,7 @@ # syntax=docker/dockerfile:1 -FROM ghcr.io/astral-sh/uv:latest AS uv +# keep the UV version in sync with BH.Engine.Python.Query.UVVersion() +FROM ghcr.io/astral-sh/uv:0.13.10 AS uv FROM mcr.microsoft.com/dotnet/aspnet:10.0-bookworm-slim AS dotnet FROM python:3.10-slim-bookworm @@ -23,4 +24,4 @@ COPY --from=bhom-assemblies . /opt/BHoM/Assemblies COPY pyproject.toml README.md ./ COPY src ./src -RUN /opt/BHoM/Extensions/Python/tools/uv sync --no-dev --no-editable +RUN /opt/BHoM/Extensions/Python/tools/uv sync --no-dev --no-editable --all-extras diff --git a/Python_Engine/Python/README.md b/Python_Engine/Python/README.md index e69de29b..b24ce11f 100644 --- a/Python_Engine/Python/README.md +++ b/Python_Engine/Python/README.md @@ -0,0 +1,103 @@ +# python_toolkit + +The root BHoM Python package. Every BHoM Python toolkit depends on it for shared behaviour, so that behaviour is +controlled in one place: + +| Module | What it provides | Requires | +| --- | --- | --- | +| `python_toolkit.bhom.logging` | `get_logger(name)`: console logging in the standard BHoM format | standard library | +| `python_toolkit.bhom.analytics` | `@bhom_analytics()`: lightweight usage tracking | standard library | +| `python_toolkit.bhom.bhom_object` | `BHoMObject`, `IObject` and JSON encoder/decoder compatible with the BHoM serialiser | standard library | +| `python_toolkit.bhom.decorators` / `run_wrapped` | `@bhom_wrapper.bhom_callable(...)`: expose Python methods to C# | standard library | +| `python_toolkit.units` | unit enumerations with conversion | standard library | +| `python_toolkit.scaffold` | `bhom-new-toolkit`: create a new toolkit | standard library | +| `python_toolkit.plot`, `python_toolkit.helpers` | plotting and data helpers | `python_toolkit[plot]` | +| `python_toolkit.bhom_tkinter` | BHoM-styled tkinter windows and widgets | `python_toolkit[ui]` | +| `python_toolkit.bhom.installer_info` | BHoM installation details via the .NET assemblies | `python_toolkit[clr]` | + +The core has **no third-party dependencies** and supports **Python 3.10 and later**, because it is installed into +every downstream toolkit's environment, whatever that toolkit's Python version. Keep it that way: anything needing +third-party packages belongs in an extra (guarded with `python_toolkit._optional.require_extra`) or in a downstream +toolkit. A test (`tests/test_core.py`) and CI enforce this. + +## Building a toolkit on python_toolkit + +Create a toolkit with `uv run bhom-new-toolkit --output --python <3.x>`, or with +`BH.Engine.Python.Compute.CreateToolkit`. The generated toolkit follows these conventions: + +```toml +# pyproject.toml +[project] +name = "wind_toolkit" +version = "999.999.999" # stamped with the BHoM version when the environment is created +requires-python = ">=3.11,<3.12" # the toolkit's own Python version +dependencies = ["python_toolkit[plot]", "other_toolkit"] + +[tool.uv.sources] # other toolkits are installed from where BHoM deploys them +python_toolkit = { path = "C:/ProgramData/BHoM/Extensions/Python/Python_Toolkit", editable = true } +other_toolkit = { path = "C:/ProgramData/BHoM/Extensions/Python/Other_Toolkit", editable = true } + +[tool.ruff] # the shared formatting/linting standard +extend = "C:/ProgramData/BHoM/Extensions/Python/Python_Toolkit/ruff.toml" +``` + +```python +# src/wind_toolkit/__init__.py +from python_toolkit.bhom.logging import get_logger + +LOGGER = get_logger("Wind_Toolkit") + +# src/wind_toolkit/speed.py +from python_toolkit.bhom.analytics import bhom_analytics + + +@bhom_analytics() +def mean_speed(speeds: list[float]) -> float: + """Google-style docstrings are used to generate the documentation.""" + return sum(speeds) / len(speeds) +``` + +The editable path sources mean that when BHoM is upgraded (redeploying `Python_Toolkit`), downstream toolkits pick up +the new shared code without reinstalling. + +## Usage analytics + +Calls to `@bhom_analytics()` functions are aggregated in memory, one record per method per process, at a cost of a +couple of microseconds per call. Records are written to `%ProgramData%\BHoM\Logs\Usage__.jsonl`: + +- when the process exits; +- every 60 seconds or 10,000 calls; +- at most 10 MB per day. + +A method called 100,000 times therefore produces one line, not 100,000. Each line is a JSON object with +`"schema": "bhom.python.usage/1"`, plus: + +- the method and toolkit; +- call and error counts; +- total and maximum durations; +- first and last call times; +- the project number (see `set_project_number`); +- the BHoM and Python versions; +- up to 10 distinct errors. + +The `analytics` module docstring describes every field. `load_logs_from_file` and `summarise_usage_logs` read both this +format and the older per-call `UsageLogEntry` lines. + +Set the `DISABLE_BHOM_ANALYTICS` environment variable to switch tracking off completely. Decorated functions are then +not wrapped at all. + +## Development + +```powershell +uv sync --all-extras # create .venv (Python 3.10, see .python-version) +uv run pytest # all tests; add -m "not slow" to skip the end-to-end scaffold test +uv run ruff format; uv run ruff check --fix # format and lint (see ruff.toml) +uv run --all-extras --group docs sphinx-build -b html docs docs/_build/html # documentation +``` + +The same tests can be run from C# with `BH.Engine.Python.Compute.RunPytest`. The VS Code tasks in the repository root +wrap all of the above. + +`ruff.toml` is the shared standard for every toolkit. Its `per-file-ignores` list rules that legacy modules +(`plot`, `helpers`, `bhom_tkinter`) do not yet meet. Remove entries as those modules are tidied, and do not add new +ones. diff --git a/Python_Engine/Python/docs/conf.py b/Python_Engine/Python/docs/conf.py new file mode 100644 index 00000000..4478f150 --- /dev/null +++ b/Python_Engine/Python/docs/conf.py @@ -0,0 +1,30 @@ +"""Sphinx configuration (build with ``uv run --group docs sphinx-build docs docs/_build/html``).""" + +import importlib.metadata + +project = "Python_Toolkit" +author = "BHoM" +copyright = "BHoM" +try: + release = importlib.metadata.version("python_toolkit") +except importlib.metadata.PackageNotFoundError: + release = "0.0.0" + +extensions = [ + "autoapi.extension", + "myst_parser", + "sphinx.ext.napoleon", + "sphinx.ext.viewcode", +] + +autoapi_type = "python" +autoapi_dirs = ["../src"] +autoapi_options = ["members", "undoc-members", "show-inheritance", "show-module-summary"] +# the scaffold template contains .py.tmpl files only, but exclude it explicitly to keep the API reference focused +autoapi_ignore = ["*/scaffold/template/*"] +napoleon_google_docstring = True +napoleon_numpy_docstring = False +suppress_warnings = ["autoapi.python_import_resolution"] + +html_theme = "furo" +html_title = project diff --git a/Python_Engine/Python/docs/index.md b/Python_Engine/Python/docs/index.md new file mode 100644 index 00000000..65568295 --- /dev/null +++ b/Python_Engine/Python/docs/index.md @@ -0,0 +1,12 @@ +# Python_Toolkit + +The root BHoM Python toolkit: logging, usage analytics, BHoM JSON (de)serialisation and the C#-callable wrapper shared +by all BHoM Python toolkits, plus optional plotting (`python_toolkit[plot]`) and tkinter UI (`python_toolkit[ui]`) +extras. + +```{toctree} +:maxdepth: 3 +:caption: API reference + +autoapi/index +``` diff --git a/Python_Engine/Python/pyproject.toml b/Python_Engine/Python/pyproject.toml index 86b25cd9..9dbc4761 100644 --- a/Python_Engine/Python/pyproject.toml +++ b/Python_Engine/Python/pyproject.toml @@ -1,48 +1,83 @@ [project] name = "python_toolkit" version = "999.999.999" # This placeholder value is replaced by the BHoM build system during packaging. -description = "The core BHoM Python toolkit environment, containing essential tools and utilities." +description = "The root BHoM Python toolkit: logging, usage analytics, BHoM JSON (de)serialisation and the C#-callable wrapper shared by all BHoM Python toolkits." readme = "README.md" -requires-python = ">=3.10,<3.11" -authors = [ - { name = "BHoM", email = "bhombot@burohappold.com" } -] -dependencies = [ +# The root is installed into every downstream toolkit's environment, so it must support the oldest Python any toolkit uses. +requires-python = ">=3.10" +authors = [{ name = "BHoM", email = "bhombot@burohappold.com" }] +license = "LGPL-3.0-or-later" +# The core package is standard-library only; heavier capabilities are opt-in extras. +dependencies = [] + +[project.optional-dependencies] +plot = [ + "case-converter", "matplotlib", - "numpy", + "numpy", "pandas", + "pillow", "plotly", + "pytz", +] +ui = ["python_toolkit[plot]"] +clr = [ "pythonnet", - "pytz", "pywin32; sys_platform == 'win32'", ] +all = ["python_toolkit[plot,ui,clr]"] + +[project.scripts] +bhom-new-toolkit = "python_toolkit.scaffold:main" + +[project.urls] +Homepage = "https://github.com/BHoM/Python_Toolkit" +Issues = "https://github.com/BHoM/Python_Toolkit/issues" [build-system] requires = ["hatchling"] build-backend = "hatchling.build" +[tool.hatch.build.targets.wheel] +packages = ["src/python_toolkit"] [dependency-groups] dev = [ - "flask", - "furo", - "interrogate", "ipykernel", - "line-profiler", - "memory-profiler", - "mypy", - "pydata-sphinx-theme", - "pydocstyle", - "pylint", - "pytest-benchmark", + "pre-commit", + "pytest", "pytest-cov", - "pytest-dependency", + "pytest-rerunfailures", "pytest-xdist", - "pytest", "ruff", - "sphinx-bootstrap-theme", +] +docs = [ + "furo", + "myst-parser", "sphinx", "sphinx-autoapi", - "sphinxcontrib-fulltoc", - "sphinxcontrib-napoleon" ] + +[tool.uv] +default-groups = ["dev"] + +# Formatting and linting: see ruff.toml (the shared BHoM standard, which ruff reads in preference to this file). + +[tool.pytest.ini_options] +testpaths = ["tests"] +addopts = "-ra --strict-markers" +markers = [ + "slow: long-running tests (deselect with -m \"not slow\")", + "ui: tests that open tkinter windows (require a display)", +] +filterwarnings = [ + "ignore::DeprecationWarning:pywintypes", +] + +[tool.coverage.run] +source = ["python_toolkit"] +branch = true + +[tool.coverage.report] +show_missing = true +skip_covered = true diff --git a/Python_Engine/Python/ruff.toml b/Python_Engine/Python/ruff.toml new file mode 100644 index 00000000..f4c358ba --- /dev/null +++ b/Python_Engine/Python/ruff.toml @@ -0,0 +1,56 @@ +# Shared BHoM Python formatting and linting standard. +# +# This file is the single source of truth for every BHoM Python toolkit. Downstream toolkits +# reference the deployed copy from their pyproject.toml: +# +# [tool.ruff] +# extend = "C:/ProgramData/BHoM/Extensions/Python/Python_Toolkit/ruff.toml" +# +# Toolkit-specific exceptions belong in that toolkit's own pyproject.toml, not here. Ruff resolves paths (including +# `src` and per-file-ignores globs) relative to the file defining them, so the path-based settings below only apply to +# Python_Toolkit itself; downstream toolkits declare their own (see the scaffold template). + +target-version = "py310" +line-length = 120 +extend-exclude = ["docs/_build", "docs/autoapi"] +src = ["src", "tests"] + +[format] +docstring-code-format = true + +[lint] +select = [ + "E", # pycodestyle errors + "W", # pycodestyle warnings + "F", # pyflakes + "I", # isort + "UP", # pyupgrade + "B", # flake8-bugbear + "D", # pydocstyle (enables documentation generation from docstrings) + "C4", # flake8-comprehensions + "SIM", # flake8-simplify + "RUF", # ruff-specific rules +] +ignore = [ + "D105", # magic methods are self-describing + "D107", # __init__ is documented on the class + "E501", # line length is handled by the formatter +] + +[lint.pydocstyle] +convention = "google" + +[lint.per-file-ignores] +"**/__init__.py" = ["F401"] +"docs/conf.py" = ["D"] +"scripts/**" = ["D"] +"tests/**" = ["D", "RUF059"] +# Legacy optional-extra modules of Python_Toolkit that predate this standard. Do not add new codes here; remove them +# as the modules are brought up to standard. New modules (and the stdlib-only core) must pass the full rule set. +"src/python_toolkit/{bhom_tkinter,helpers,plot}/**" = [ + "B026", "B905", "D1", "D205", "D417", "RUF005", "RUF012", "RUF015", "RUF046", "RUF059", + "SIM102", "SIM105", "SIM108", "UP007", +] +# imports intentionally follow the require_extra() guard / matplotlib backend selection +"src/python_toolkit/{bhom_tkinter,helpers}/__init__.py" = ["E402"] +"src/python_toolkit/bhom_tkinter/bhom_base_window.py" = ["E402"] diff --git a/Python_Engine/Python/scripts/build_docs.ps1 b/Python_Engine/Python/scripts/build_docs.ps1 index 6fed7fc4..824603b9 100644 --- a/Python_Engine/Python/scripts/build_docs.ps1 +++ b/Python_Engine/Python/scripts/build_docs.ps1 @@ -4,47 +4,22 @@ param ( [int]$Port = 8000 ) -. "$PSScriptRoot\shared.ps1" +# Build the HTML documentation for this toolkit with Sphinx (installed from the "docs" dependency group). +$ErrorActionPreference = "Stop" +$projectRoot = Split-Path -Parent $PSScriptRoot +$outputDirectory = Join-Path $projectRoot "docs\_build\html" -function Build-Documentation { - param ( - [switch]$Serve, - [int]$Port - ) +Push-Location $projectRoot +try { + uv run --all-extras --group docs sphinx-build -b html docs $outputDirectory + if ($LASTEXITCODE -ne 0) { throw "Sphinx build failed with exit code $LASTEXITCODE." } + Write-Host "Documentation was built at $outputDirectory." - $functionName = $MyInvocation.MyCommand.Name - $workspaceRoot = Split-Path -Parent $PSScriptRoot - $docsDirectory = Join-Path $workspaceRoot "docs" - $configFile = Join-Path $docsDirectory "conf.py" - $outputDirectory = Join-Path $docsDirectory "_build\html" - $pythonExecutable = $null - - try { - if (-not (Test-Path $configFile -PathType Leaf)) { - throw "Sphinx configuration was not found at $configFile." - } - - $pythonExecutable = Get-LocalPythonExecutable - Write-InfoMessage -Message "Building HTML documentation using $configFile." -FunctionName $functionName - & $pythonExecutable -m sphinx -b html -c $docsDirectory $docsDirectory $outputDirectory - if ($LASTEXITCODE -ne 0) { - throw "Sphinx build failed with exit code $LASTEXITCODE." - } - Write-InfoMessage -Message "Documentation was built at $outputDirectory." -FunctionName $functionName - - if ($Serve) { - Write-InfoMessage -Message "Serving documentation at http://127.0.0.1:$Port/ (press Ctrl+C to stop)." -FunctionName $functionName - & $pythonExecutable -m http.server $Port --bind 127.0.0.1 --directory $outputDirectory - if ($LASTEXITCODE -ne 0) { - throw "The documentation server exited with code $LASTEXITCODE." - } - } - } - catch { - Write-ErrorMessage -Message "Documentation build or serve failed. $($_.Exception.Message)" -FunctionName $functionName -ThrowError + if ($Serve) { + Write-Host "Serving documentation at http://127.0.0.1:$Port/ (press Ctrl+C to stop)." + uv run python -m http.server $Port --bind 127.0.0.1 --directory $outputDirectory } } - -if ($MyInvocation.InvocationName -ne '.') { - Build-Documentation -Serve:$Serve -Port $Port +finally { + Pop-Location } diff --git a/Python_Engine/Python/scripts/pre_commit.ps1 b/Python_Engine/Python/scripts/pre_commit.ps1 index aea83fd7..6e57c154 100644 --- a/Python_Engine/Python/scripts/pre_commit.ps1 +++ b/Python_Engine/Python/scripts/pre_commit.ps1 @@ -1,35 +1,27 @@ - param ( - [switch]$Run, - [switch]$IncludeSkipped + [switch]$Check ) -. "$PSScriptRoot\shared.ps1" - -function Format-PythonFiles { - param ( - [switch]$IncludeSkipped - ) - $workspaceRoot = Split-Path -Parent $PSScriptRoot - $pushedLocation = $false - - try { - Push-Location $workspaceRoot - $pushedLocation = $true - - Write-InfoMessage -Message "Formatting Python files in ./src" -FunctionName $MyInvocation.MyCommand.Name - & (Get-UVExecutable) run ruff format .\src - Write-InfoMessage -Message "Formatting Python files in ./tests" -FunctionName $MyInvocation.MyCommand.Name - & (Get-UVExecutable) run ruff format .\tests +# Format and lint this toolkit with the shared BHoM ruff standard (see ../ruff.toml). +# Use -Check to verify without modifying files (as CI does). To run automatically on every commit, install the +# repository's git hooks once with: uv run pre-commit install +$ErrorActionPreference = "Stop" +$projectRoot = Split-Path -Parent $PSScriptRoot +Push-Location $projectRoot +try { + if ($Check) { + uv run ruff format --check . + if ($LASTEXITCODE -ne 0) { exit $LASTEXITCODE } + uv run ruff check . } - finally { - if ($pushedLocation) { - Pop-Location - } + else { + uv run ruff format . + if ($LASTEXITCODE -ne 0) { exit $LASTEXITCODE } + uv run ruff check --fix . } + exit $LASTEXITCODE } - -if ($Run -or $MyInvocation.InvocationName -ne '.') { - # Format-PythonFiles # commented out for now to save auto-formatting the Python files that need to be left alone +finally { + Pop-Location } diff --git a/Python_Engine/Python/scripts/run_tests.ps1 b/Python_Engine/Python/scripts/run_tests.ps1 index 9e1eccff..dc20562c 100644 --- a/Python_Engine/Python/scripts/run_tests.ps1 +++ b/Python_Engine/Python/scripts/run_tests.ps1 @@ -1,49 +1,21 @@ - param ( - [switch]$Run, - [switch]$IncludeSkipped + [switch]$IncludeSlow, + [switch]$Coverage ) -. "$PSScriptRoot\shared.ps1" - -function Test-Code { - param ( - [switch]$IncludeSkipped - ) - - $functionName = $MyInvocation.MyCommand.Name - $workspaceRoot = Split-Path -Parent $PSScriptRoot - $previousSkipLongPytest = $env:SKIP_LONG_PYTEST - $pushedLocation = $false - try { - Push-Location $workspaceRoot - $pushedLocation = $true +# Run this toolkit's tests. Slow tests (marked @pytest.mark.slow) are skipped unless -IncludeSlow is given. +$ErrorActionPreference = "Stop" +$projectRoot = Split-Path -Parent $PSScriptRoot - $pythonExecutable = Get-LocalPythonExecutable - Write-InfoMessage -Message "Using Python executable: $pythonExecutable" -FunctionName $functionName +$arguments = @() +if (-not $IncludeSlow) { $arguments += @("-m", "not slow") } +if ($Coverage) { $arguments += @("--cov", "--cov-report=term-missing") } - if ($IncludeSkipped) { - $env:SKIP_LONG_PYTEST = "1" - } - else { - Remove-Item Env:SKIP_LONG_PYTEST -ErrorAction SilentlyContinue - } - - & $pythonExecutable -m pytest - } - finally { - if ($null -eq $previousSkipLongPytest) { - Remove-Item Env:SKIP_LONG_PYTEST -ErrorAction SilentlyContinue - } - else { - $env:SKIP_LONG_PYTEST = $previousSkipLongPytest - } - if ($pushedLocation) { - Pop-Location - } - } +Push-Location $projectRoot +try { + uv run --all-extras pytest @arguments + exit $LASTEXITCODE } - -if ($Run -or $MyInvocation.InvocationName -ne '.') { - Test-Code -IncludeSkipped:$IncludeSkipped +finally { + Pop-Location } diff --git a/Python_Engine/Python/scripts/shared.ps1 b/Python_Engine/Python/scripts/shared.ps1 index cea9f6ea..67219a8a 100644 --- a/Python_Engine/Python/scripts/shared.ps1 +++ b/Python_Engine/Python/scripts/shared.ps1 @@ -178,16 +178,25 @@ function Get-UVExecutable { return Join-Path $env:ProgramData "BHoM\Extensions\Python\tools\uv.exe" } +# Keep in sync with BH.Engine.Python.Query.UVVersion() +$script:UVVersion = "0.13.10" + function Install-UV { + # Install the pinned UV into the BHoM tools directory (mirrors BH.Engine.Python.Compute.InstallUV). $functionName = $MyInvocation.MyCommand.Name $uvExecutable = Get-UVExecutable $uvBinPath = Split-Path -Parent $uvExecutable - if (-not (Test-Path -LiteralPath $uvExecutable -PathType Leaf)) { + $installedVersion = $null + if (Test-Path -LiteralPath $uvExecutable -PathType Leaf) { + $installedVersion = ((& $uvExecutable --version) -split " ")[1] + } + + if ($installedVersion -ne $script:UVVersion) { try { - Write-InfoMessage -Message "Installing UV in $uvBinPath." -FunctionName $functionName + Write-InfoMessage -Message "Installing UV $($script:UVVersion) in $uvBinPath." -FunctionName $functionName $escapedDirectory = $uvBinPath.Replace("'", "''") - & powershell.exe -NoProfile -NonInteractive -ExecutionPolicy Bypass -Command "`$ErrorActionPreference = 'Stop'; `$env:UV_INSTALL_DIR = '$escapedDirectory'; `$env:UV_NO_MODIFY_PATH = '1'; irm https://astral.sh/uv/install.ps1 | iex" + & powershell.exe -NoProfile -NonInteractive -ExecutionPolicy Bypass -Command "`$ErrorActionPreference = 'Stop'; `$env:UV_INSTALL_DIR = '$escapedDirectory'; `$env:UV_NO_MODIFY_PATH = '1'; irm https://astral.sh/uv/$($script:UVVersion)/install.ps1 | iex" if ($LASTEXITCODE -ne 0) { throw "UV installer exited with code $LASTEXITCODE." } @@ -197,31 +206,14 @@ function Install-UV { } } - try { - if (-not (Test-Path -LiteralPath $uvExecutable -PathType Leaf)) { - throw "The UV executable was not installed at $uvExecutable." - } - $otherPaths = @($env:Path -split ';' | Where-Object { $_.Trim().Trim('"') -ine $uvBinPath }) - $env:Path = (@($uvBinPath) + $otherPaths) -join ';' - Write-InfoMessage -Message "Using UV from $uvExecutable." -FunctionName $functionName - } - catch { - Write-ErrorMessage -Message "Could not locate UV. $($_.Exception.Message)" -FunctionName $functionName -ThrowError + if (-not (Test-Path -LiteralPath $uvExecutable -PathType Leaf)) { + Write-ErrorMessage -Message "The UV executable was not installed at $uvExecutable." -FunctionName $functionName -ThrowError } - # install core tools - foreach ($tool in @("ruff", "jupyterlab", "sphinx")) { - try { - Write-InfoMessage -Message "Installing $tool to UV." -FunctionName $functionName - & $uvExecutable tool install $tool - if ($LASTEXITCODE -ne 0) { - throw "uv tool install exited with code $LASTEXITCODE." - } - } - catch { - Write-ErrorMessage -Message "Failed to install $tool to UV. $($_.Exception.Message)" -FunctionName $functionName -ThrowError - } - } + # keep UV-managed interpreters and caches inside the BHoM tools directory (mirrors Query.UVEnvironmentVariables) + if (-not $env:UV_PYTHON_INSTALL_DIR) { $env:UV_PYTHON_INSTALL_DIR = Join-Path $uvBinPath "python" } + if (-not $env:UV_CACHE_DIR) { $env:UV_CACHE_DIR = Join-Path $uvBinPath "cache" } + Write-InfoMessage -Message "Using UV from $uvExecutable." -FunctionName $functionName } function Sync-PythonEnvironment { @@ -233,7 +225,7 @@ function Sync-PythonEnvironment { Push-Location $workspaceRoot $locationPushed = $true Write-InfoMessage -Message "Installing Python packages with UV." -FunctionName $functionName - & (Get-UVExecutable) sync + & (Get-UVExecutable) sync --all-extras if ($LASTEXITCODE -ne 0) { throw "uv sync exited with code $LASTEXITCODE." } diff --git a/Python_Engine/Python/tests/test_styling.py b/Python_Engine/Python/scripts/styling_guide.py similarity index 91% rename from Python_Engine/Python/tests/test_styling.py rename to Python_Engine/Python/scripts/styling_guide.py index a6b8e499..84e07f76 100644 --- a/Python_Engine/Python/tests/test_styling.py +++ b/Python_Engine/Python/scripts/styling_guide.py @@ -10,8 +10,8 @@ from __future__ import annotations import os -from tkinter import ttk from tkinter import font as tkfont +from tkinter import ttk from python_toolkit.bhom_tkinter.bhom_base_window import BHoMBaseWindow from python_toolkit.bhom_tkinter.widgets.label import Label as BHoMLabel @@ -90,10 +90,14 @@ def run_styling_guide( parsed = tkfont.Font(root=window, font=font_lookup) print( style_name, - "lookup=", font_lookup, - "actual-size=", parsed.actual("size"), - "linespace=", parsed.metrics("linespace"), - "rendered-height=", sample.label.winfo_reqheight(), + "lookup=", + font_lookup, + "actual-size=", + parsed.actual("size"), + "linespace=", + parsed.metrics("linespace"), + "rendered-height=", + sample.label.winfo_reqheight(), ) if auto_close_ms is not None and auto_close_ms > 0: diff --git a/Python_Engine/Python/src/python_toolkit/__init__.py b/Python_Engine/Python/src/python_toolkit/__init__.py index 3e022cfb..3c46645b 100644 --- a/Python_Engine/Python/src/python_toolkit/__init__.py +++ b/Python_Engine/Python/src/python_toolkit/__init__.py @@ -1,14 +1,19 @@ -"""Base module for the python_toolkit package.""" -# pylint: disable=E0401 +"""The root BHoM Python toolkit. + +The core of this package (``python_toolkit.bhom``, ``python_toolkit.units`` and ``python_toolkit.scaffold``) +depends only on the Python standard library, so it can be installed into every downstream toolkit's +environment regardless of that toolkit's Python version. Heavier capabilities are optional extras: + +* ``python_toolkit[plot]`` - ``python_toolkit.plot`` and ``python_toolkit.helpers`` +* ``python_toolkit[ui]`` - ``python_toolkit.bhom_tkinter`` +* ``python_toolkit[clr]`` - pythonnet access to BHoM .NET assemblies +""" + import getpass import os from pathlib import Path -import matplotlib.pyplot as plt - -# pylint: disable=E0401 - -# get common paths +# common paths DATA_DIRECTORY = (Path(__file__).parent.parent / "data").absolute() BHOM_DIRECTORY = (Path(__file__).parent / "bhom").absolute() HOME_DIRECTORY = (Path("C:/Users/") / getpass.getuser()).absolute() @@ -16,5 +21,5 @@ TOOLKIT_NAME = "Python_Toolkit" if os.name == "nt": - # override "HOME" in case this is set to something other than default for windows - os.environ["HOME"] = (Path("C:/Users/") / getpass.getuser()).as_posix() + # override "HOME" in case this is set to something other than default for windows (relied upon by downstream toolkits) + os.environ["HOME"] = HOME_DIRECTORY.as_posix() diff --git a/Python_Engine/Python/src/python_toolkit/_optional.py b/Python_Engine/Python/src/python_toolkit/_optional.py new file mode 100644 index 00000000..ef97df7d --- /dev/null +++ b/Python_Engine/Python/src/python_toolkit/_optional.py @@ -0,0 +1,21 @@ +"""Helpers for optional ("extra") dependencies.""" + +from importlib.util import find_spec + + +def require_extra(extra: str, *modules: str) -> None: + """Raise a helpful ImportError if any module needed by an optional extra is not installed. + + Args: + extra: The name of the python_toolkit extra providing the modules, e.g. "plot". + *modules: Top-level module names that must be importable. + + Raises: + ImportError: If any module is missing. + """ + missing = [module for module in modules if find_spec(module) is None] + if missing: + raise ImportError( + f"This feature requires the optional dependencies {', '.join(missing)}. " + f'Install them with the "{extra}" extra, e.g. `uv add "python_toolkit[{extra}]"`.' + ) diff --git a/Python_Engine/Python/src/python_toolkit/bhom/__init__.py b/Python_Engine/Python/src/python_toolkit/bhom/__init__.py index e3ab0b23..9ae785af 100644 --- a/Python_Engine/Python/src/python_toolkit/bhom/__init__.py +++ b/Python_Engine/Python/src/python_toolkit/bhom/__init__.py @@ -1,41 +1,54 @@ -"""Root for the bhom subpackage.""" +"""Core BHoM integration: constants, logging, usage analytics and BHoM object (de)serialisation. +Everything in this subpackage depends only on the Python standard library. +""" + +import importlib.metadata import os -from pathlib import Path # pylint: disable=E0401 -from os import path import tempfile -import importlib.metadata - -if os.name == 'nt': - from .installer_info import INSTALLER_INFO -else: - INSTALLER_INFO = {"Version": importlib.metadata.version("python_toolkit")} +from pathlib import Path +from typing import Any -BHOM_LOG_FOLDER = Path(path.expandvars("%PROGRAMDATA%/BHoM/Logs")) -TEMP_LOG_FOLDER = Path(tempfile.gettempdir()) / "BHoM" / "Logs" TOOLKIT_NAME = "Python_Toolkit" -BHOM_VERSION = INSTALLER_INFO["Version"] -#Environment variable that if set disables BHoM analytics logging. -DISABLE_ANALYTICS = os.environ.get("DISABLE_BHOM_ANALYTICS", None) -if DISABLE_ANALYTICS is None: - DISABLE_ANALYTICS = False -else: - DISABLE_ANALYTICS = True +# Environment variable that, if set, disables BHoM analytics logging. +DISABLE_ANALYTICS = os.environ.get("DISABLE_BHOM_ANALYTICS") is not None -if not BHOM_LOG_FOLDER.exists(): +def _bhom_version() -> str: + """The BHoM version this toolkit was installed with. + + BH.Engine.Python stamps each toolkit's pyproject.toml version with the BHoM version before installing it, + so the installed package metadata holds the BHoM version without needing to load any .NET assemblies. + """ + try: + return importlib.metadata.version("python_toolkit") + except importlib.metadata.PackageNotFoundError: + return "0.0.0" + + +BHOM_VERSION = _bhom_version() + +TEMP_LOG_FOLDER = Path(tempfile.gettempdir()) / "BHoM" / "Logs" +BHOM_LOG_FOLDER = Path(os.path.expandvars("%PROGRAMDATA%/BHoM/Logs")) if os.name == "nt" else TEMP_LOG_FOLDER + +if not BHOM_LOG_FOLDER.exists(): try: BHOM_LOG_FOLDER.mkdir(exist_ok=True, parents=True) - #migration recovery for any logs in the temp folder - if TEMP_LOG_FOLDER.exists(): + # migration recovery for any logs in the temp folder + if TEMP_LOG_FOLDER.exists() and TEMP_LOG_FOLDER != BHOM_LOG_FOLDER: for file in TEMP_LOG_FOLDER.glob("*.log"): file.rename(BHOM_LOG_FOLDER / file.name) - - except Exception as e: + except OSError: BHOM_LOG_FOLDER = TEMP_LOG_FOLDER BHOM_LOG_FOLDER.mkdir(exist_ok=True, parents=True) +def __getattr__(name: str) -> Any: + # INSTALLER_INFO requires pythonnet (the "clr" extra) and loads BHoM assemblies, so only do so when asked for. + if name == "INSTALLER_INFO": + from .installer_info import INSTALLER_INFO + return INSTALLER_INFO + raise AttributeError(f"module {__name__!r} has no attribute {name!r}") diff --git a/Python_Engine/Python/src/python_toolkit/bhom/analytics.py b/Python_Engine/Python/src/python_toolkit/bhom/analytics.py index 7ba81cb9..927e6f4d 100644 --- a/Python_Engine/Python/src/python_toolkit/bhom/analytics.py +++ b/Python_Engine/Python/src/python_toolkit/bhom/analytics.py @@ -1,222 +1,491 @@ -"""BHoM analytics decorator.""" -# pylint: disable=E0401 -import codecs -from dataclasses import dataclass, field -import inspect -from itertools import groupby +"""Lightweight usage analytics for BHoM Python toolkits. + +Decorate public functions with :func:`bhom_analytics` to record how, when and where they are used:: + + from python_toolkit.bhom.analytics import bhom_analytics + + + @bhom_analytics() + def my_method(x: float) -> float: + return x * 2 + +Calls are aggregated in memory (one record per method, project and process) rather than logged one by one, so a +method called thousands of times costs a couple of microseconds per call and produces a single line of output. +Records are flushed to ``/Usage__.jsonl`` when the process exits, and whenever +:data:`FLUSH_INTERVAL_SECONDS` have elapsed or :data:`FLUSH_CALL_THRESHOLD` calls have been made since the last flush. +Each daily file is capped at :data:`MAX_DAILY_LOG_BYTES`. Set the ``DISABLE_BHOM_ANALYTICS`` environment variable to +disable tracking entirely (decorated functions are then returned unwrapped, with no overhead). + +Each line of the log file is a JSON object with the following fields (``schema = "bhom.python.usage/1"``): + +======================== ============================================================================== +``schema`` The record format identifier. Consumers should check this before parsing. +``session`` A random identifier for the Python process that produced the record. +``toolkit`` The top-level package of the decorated function, e.g. ``python_toolkit``. +``module`` The module containing the decorated function. +``method`` The qualified name of the decorated function. +``project`` The project number set via :func:`set_project_number` (or ``""``). +``count`` Number of calls aggregated into this record. +``error_count`` Number of those calls that raised an exception. +``total_seconds`` Total time spent in the function. +``max_seconds`` Longest single call. +``first`` / ``last`` UTC ISO-8601 timestamps of the first and last aggregated calls. +``bhom_version`` The BHoM version the toolkit was installed with. +``python`` The Python version. +``interpreter`` The Python executable. +``errors`` Up to :data:`MAX_ERRORS_PER_METHOD` distinct errors: ``{"type", "message", "count"}``. +======================== ============================================================================== +""" + +from __future__ import annotations + +import atexit import itertools import json import os -from pathlib import Path +import platform import socket import sys +import threading +import time import traceback import uuid +from collections.abc import Callable +from dataclasses import dataclass, field +from datetime import datetime, timezone from functools import wraps -from typing import Any, Callable, Dict, List, Union -from datetime import datetime - -# pylint: enable=E0401 +from itertools import groupby +from pathlib import Path +from typing import Any, TypeVar -from .logging import ANALYTICS_LOGGER, CONSOLE_LOGGER +from . import BHOM_LOG_FOLDER, BHOM_VERSION, DISABLE_ANALYTICS +from .logging import CONSOLE_LOGGER from .util import bson_unix_ticks, bson_unix_ticks_to_datetime -from . import BHOM_VERSION, TOOLKIT_NAME, BHOM_LOG_FOLDER, DISABLE_ANALYTICS -@dataclass -class UsageLogEntry(): - BHoMVersion:str = BHOM_VERSION - BHoM_Guid:uuid.UUID = uuid.uuid4() - CallerName:str = "" - ComponentId:uuid.UUID = uuid.uuid4() - CustomData:Dict = field(default_factory = {"interpreter", sys.executable}) - Errors:List[str] = field(default_factory = []) - FileId:str = "" - FileName:str = "" - Fragments:List[str] = field(default_factory = []) - Name:str = "" - ProjectID:str = "" - SelectedItem:Dict = field(default_factory = {"MethodName": "", "Parameters": [], "TypeName": ""}) - Time:Dict = field(default_factory = {"$date": 0}) - UI:str = "Python" - UiVersion:str = sys.version - _t:str = "BH.oM.Base.UsageLogEntry" +SCHEMA = "bhom.python.usage/1" +FLUSH_INTERVAL_SECONDS = 60.0 +FLUSH_CALL_THRESHOLD = 10_000 +MAX_ERRORS_PER_METHOD = 10 +MAX_ERROR_MESSAGE_LENGTH = 500 +MAX_DAILY_LOG_BYTES = 10 * 1024 * 1024 + +F = TypeVar("F", bound=Callable[..., Any]) + + +def _isoformat(timestamp: float) -> str: + return datetime.fromtimestamp(timestamp, timezone.utc).isoformat(timespec="seconds") + + +class _MethodStats: + """Aggregated usage of a single method within a single process and project.""" + + __slots__ = ( + "count", + "error_count", + "errors", + "first", + "last", + "max_seconds", + "method", + "module", + "project", + "toolkit", + "total_seconds", + ) + + def __init__(self, toolkit: str, module: str, method: str, project: str, now: float) -> None: + self.toolkit = toolkit + self.module = module + self.method = method + self.project = project + self.count = 0 + self.error_count = 0 + self.total_seconds = 0.0 + self.max_seconds = 0.0 + self.first = now + self.last = now + self.errors: dict[tuple[str, str], int] = {} + + def add(self, duration: float, now: float, exception: BaseException | None) -> None: + self.count += 1 + self.total_seconds += duration + if duration > self.max_seconds: + self.max_seconds = duration + self.last = now + if exception is not None: + self.error_count += 1 + key = (type(exception).__name__, str(exception)[:MAX_ERROR_MESSAGE_LENGTH]) + if key in self.errors: + self.errors[key] += 1 + elif len(self.errors) < MAX_ERRORS_PER_METHOD: + self.errors[key] = 1 + + def to_record(self, session: str) -> dict[str, Any]: + return { + "schema": SCHEMA, + "session": session, + "toolkit": self.toolkit, + "module": self.module, + "method": self.method, + "project": self.project, + "count": self.count, + "error_count": self.error_count, + "total_seconds": round(self.total_seconds, 6), + "max_seconds": round(self.max_seconds, 6), + "first": _isoformat(self.first), + "last": _isoformat(self.last), + "bhom_version": BHOM_VERSION, + "python": platform.python_version(), + "interpreter": sys.executable, + "errors": [ + {"type": error_type, "message": message, "count": count} + for (error_type, message), count in self.errors.items() + ], + } + + +class UsageTracker: + """Thread-safe, in-memory aggregator of method usage that periodically flushes to the BHoM log folder.""" + + def __init__(self, log_folder: Path | None = None, register_atexit: bool = True) -> None: + """Create a tracker. + + Args: + log_folder: The folder to write usage logs to. Defaults to the BHoM log folder. + register_atexit: Flush automatically when the Python process exits. + """ + self.log_folder = Path(log_folder) if log_folder is not None else BHOM_LOG_FOLDER + self.session = str(uuid.uuid4()) + self._lock = threading.Lock() + self._stats: dict[tuple[str, str, str], _MethodStats] = {} + self._pending = 0 + self._last_flush = time.monotonic() + self._full_files: set[Path] = set() + if register_atexit: + atexit.register(self.flush) + + def record( + self, + toolkit: str, + module: str, + method: str, + project: str, + duration: float, + exception: BaseException | None = None, + ) -> None: + """Record a single call of a method. + + Args: + toolkit: The top-level package of the method. + module: The module containing the method. + method: The qualified name of the method. + project: The project number the call was made for. + duration: The duration of the call in seconds. + exception: The exception raised by the call, if any. + """ + now = time.time() + key = (module, method, project) + with self._lock: + stats = self._stats.get(key) + if stats is None: + stats = self._stats[key] = _MethodStats(toolkit, module, method, project, now) + stats.add(duration, now, exception) + self._pending += 1 + due = ( + self._pending >= FLUSH_CALL_THRESHOLD or (time.monotonic() - self._last_flush) >= FLUSH_INTERVAL_SECONDS + ) + if due: + self.flush() + + def snapshot(self) -> list[dict[str, Any]]: + """The records that would be written by the next flush, without flushing them.""" + with self._lock: + return [stats.to_record(self.session) for stats in self._stats.values()] + + def flush(self) -> None: + """Write all aggregated records to disk and reset the aggregation. Never raises.""" + with self._lock: + stats, self._stats = self._stats, {} + self._pending = 0 + self._last_flush = time.monotonic() + if not stats: + return + + try: + self.log_folder.mkdir(parents=True, exist_ok=True) + day = datetime.now().strftime("%Y%m%d") + lines: dict[Path, list[str]] = {} + for method_stats in stats.values(): + path = self.log_folder / f"Usage_{method_stats.toolkit}_{day}.jsonl" + record = method_stats.to_record(self.session) + lines.setdefault(path, []).append(json.dumps(record, separators=(",", ":"), default=str)) + + for path, file_lines in lines.items(): + if path.exists() and path.stat().st_size >= MAX_DAILY_LOG_BYTES: + if path not in self._full_files: + self._full_files.add(path) + CONSOLE_LOGGER.warning( + f"Usage log {path} has reached its daily size limit; usage is no longer being recorded to it." + ) + continue + # a single write per file keeps appends from concurrent processes from interleaving + with path.open("a", encoding="utf-8") as file: + file.write("\n".join(file_lines) + "\n") + except Exception: # analytics must never break the calling code + CONSOLE_LOGGER.debug("Failed to write usage analytics.", exc_info=True) + + +_TRACKER = UsageTracker() + + +def get_usage_tracker() -> UsageTracker: + """The process-wide usage tracker used by :func:`bhom_analytics`.""" + return _TRACKER + + +def flush_usage() -> None: + """Immediately write any aggregated usage records to disk.""" + _TRACKER.flush() + + +_PROJECT_NUMBER: str | None = None + + +def set_project_number(project_number: str | None) -> None: + """Set the project number that subsequent usage is attributed to. + + Args: + project_number: The project number, or None to clear it. + """ + global _PROJECT_NUMBER + _PROJECT_NUMBER = project_number - @classmethod - def from_json(cls, json_str:str) -> 'UsageLogEntry': - d = json.loads(json_str) - if "CustomData" not in d: - d["CustomData"] = None - if "Fragments" not in d: - d["Fragments"] = None - return UsageLogEntry(d["BHoMVersion"], d["BHoM_Guid"], d["CallerName"], d["ComponentId"], d["CustomData"], d["Errors"], d["FileId"], d["FileName"], d["Fragments"], d["Name"], d["ProjectID"], d["SelectedItem"], d["Time"], d["UI"], d["UiVersion"]) - -def load_logs_from_file(filename:str) -> List[UsageLogEntry]: - logs:List[UsageLogEntry] = [] - - #adapted from https://stackoverflow.com/questions/30629297/remove-byte-order-mark-from-objects-in-a-list - #due to some files generated by BHoM logs being encoded with utf-8 BOM instead of utf-8 - with open(filename, "r") as f: - lines = f.readlines() - if lines[0].__contains__(codecs.BOM_UTF8.decode(f.encoding)): - # A Byte Order Mark is present - lines[0] = lines[0].strip(codecs.BOM_UTF8.decode(f.encoding)) - for line in lines: - if len(line) != 0: - logs.append(UsageLogEntry.from_json(line)) - return logs +def get_project_number() -> str | None: + """The project number that usage is currently attributed to.""" + return _PROJECT_NUMBER -def summarise_usage_logs(usage_log_entries:List[UsageLogEntry]) -> List[Dict]: - db_entries:List[Dict] = [] - usage_log_entries.sort(key=lambda x: x.ProjectID) +def bhom_analytics( + project_id: Callable[[], str | None] = get_project_number, + disable: bool = DISABLE_ANALYTICS, +) -> Callable[[F], F]: + """Decorator for capturing usage data. - short_bhom_version = ".".join(BHOM_VERSION.split(".", 2)[0:2]) + Args: + project_id: A callable returning the project number to attribute usage to. + disable: Disable tracking for the decorated function (returning it unwrapped). - for file_id, filegroup in groupby(usage_log_entries, lambda x: x.FileId): - filegroup = list(filegroup) - project_id = filegroup[0].ProjectID - filename = filegroup[0].FileName - filegroup.sort(key = lambda x: x.CallerName + str(x.SelectedItem)) + Returns: + The decorator. + """ - for method_name, methodgroup in groupby(filegroup, lambda x: x.CallerName + str(x.SelectedItem)): - methodgroup = list(methodgroup) - first_entry = methodgroup[0] + def decorator(function: F) -> F: + if disable: + return function - db_entries.append({ - "StartTime": bson_unix_ticks_to_datetime(min(methodgroup, key=lambda x: x.Time["$date"]).Time["$date"], short=True), - "EndTime": bson_unix_ticks_to_datetime(max(methodgroup, key=lambda x: x.Time["$date"]).Time["$date"], short=True), - "UI": first_entry.UI, - "UiVersion":first_entry.UiVersion, - "CallerName": first_entry.CallerName, - "SelectedItem": first_entry.SelectedItem, - "Computer": socket.gethostname(), - "Username": os.environ.get("USERNAME"), - "BHoMVersion": short_bhom_version, - "FileId": file_id, - "FileName": filename, - "ProjectID": project_id, - "NbCallingComponents": len(set([a.ComponentId for a in methodgroup])), - "TotalNbCalls": len(methodgroup), - "Errors": list(itertools.chain.from_iterable([x.Errors for x in methodgroup])), - "_t": "BH.oM.BHoMAnalytics.UsageEntry", - "__Time__": datetime.now(), - "_bhomVersion": short_bhom_version - }) + module = function.__module__ + method = function.__qualname__ + toolkit = module.split(".")[0] - return db_entries + def _record(start: float, exception: BaseException | None) -> None: + duration = time.perf_counter() - start + try: + project = project_id() or "" + _TRACKER.record(toolkit, module, method, str(project), duration, exception) + except Exception: # analytics must never break the calling code + CONSOLE_LOGGER.debug("Failed to record usage analytics.", exc_info=True) + + @wraps(function) + def wrapper(*args: Any, **kwargs: Any) -> Any: + start = time.perf_counter() + try: + result = function(*args, **kwargs) + except Exception as exception: + _record(start, exception) + raise + _record(start, None) + return result + + return wrapper # type: ignore[return-value] + + return decorator -def convert_exc_info_to_bhom_error(exc_info): - time = bson_unix_ticks(datetime.now(), short=True) - utcTime = bson_unix_ticks(short=True) - stack_trace = traceback.extract_tb(exc_info[2]) - message = str(exc_info[1]) - Type = "Error" #using string but ideally this would be an enum value. - return {"Time": {"$date": time}, "UtcTime": {"$date": utcTime}, "StackTrace": stack_trace, "Message": message, "Type": Type, "_t": "BH.oM.Base.Debugging.Event"} - -global PROJECT_NUMBER -PROJECT_NUMBER = None - -def set_project_number(project_number: Union[str, None]): - global PROJECT_NUMBER - CONSOLE_LOGGER.debug(f"Setting project number: {PROJECT_NUMBER} to {project_number}") - PROJECT_NUMBER = project_number - -def get_project_number() -> Union[str, None]: - CONSOLE_LOGGER.debug(f"Retrieving project number: {PROJECT_NUMBER}") - return PROJECT_NUMBER - -def bhom_analytics(project_id:Callable = get_project_number, disable:bool = DISABLE_ANALYTICS) -> Callable: - """Decorator for capturing usage data. - Returns - ------- - Callable - The decorated function. +# --------------------------------------------------------------------------------------------------------------------- +# Reading and summarising usage logs +# --------------------------------------------------------------------------------------------------------------------- + + +@dataclass +class UsageLogEntry: + """A legacy (pre ``bhom.python.usage/1``) usage log entry, in the format of ``BH.oM.Base.UsageLogEntry``.""" + + BHoMVersion: str = BHOM_VERSION + BHoM_Guid: uuid.UUID = field(default_factory=uuid.uuid4) + CallerName: str = "" + ComponentId: uuid.UUID = field(default_factory=uuid.uuid4) + CustomData: dict | None = field(default_factory=lambda: {"interpreter": sys.executable}) + Errors: list = field(default_factory=list) + FileId: str = "" + FileName: str = "" + Fragments: list | None = field(default_factory=list) + Name: str = "" + ProjectID: str | None = "" + SelectedItem: dict = field(default_factory=lambda: {"MethodName": "", "Parameters": [], "TypeName": ""}) + Time: dict = field(default_factory=lambda: {"$date": 0}) + UI: str = "Python" + UiVersion: str = sys.version + _t: str = "BH.oM.Base.UsageLogEntry" + + @classmethod + def from_json(cls, json_str: str) -> UsageLogEntry: + """Create an entry from a JSON string.""" + d = json.loads(json_str) + return cls.from_dict(d) + + @classmethod + def from_dict(cls, d: dict[str, Any]) -> UsageLogEntry: + """Create an entry from a deserialised JSON object.""" + return UsageLogEntry( + d["BHoMVersion"], + d["BHoM_Guid"], + d["CallerName"], + d["ComponentId"], + d.get("CustomData"), + d["Errors"], + d["FileId"], + d["FileName"], + d.get("Fragments"), + d["Name"], + d["ProjectID"], + d["SelectedItem"], + d["Time"], + d["UI"], + d["UiVersion"], + ) + + +def load_logs_from_file(filename: str | Path) -> list[UsageLogEntry | dict[str, Any]]: + """Load a usage log file. + + Args: + filename: The log file to load. + + Returns: + One item per line: a dict for ``bhom.python.usage`` records, or a :class:`UsageLogEntry` for legacy lines. """ + logs: list[UsageLogEntry | dict[str, Any]] = [] + # utf-8-sig, as some files generated by BHoM logs are encoded with a byte order mark + with open(filename, encoding="utf-8-sig") as f: + for line in f: + line = line.strip() + if not line: + continue + d = json.loads(line) + if str(d.get("schema", "")).startswith("bhom.python.usage/"): + logs.append(d) + else: + logs.append(UsageLogEntry.from_dict(d)) + return logs - _componentId = uuid.uuid4() - def decorator(function: Callable): - """A decorator to capture usage data for called methods/functions. +def _file_id(project: str | None) -> str: + return str(uuid.uuid3(uuid.NAMESPACE_OID, project or "")) - Arguments - --------- - function : Callable - The function to decorate. - Returns - ------- - Callable - The decorated function. - """ +def summarise_usage_logs(usage_log_entries: list[UsageLogEntry | dict[str, Any]]) -> list[dict[str, Any]]: + """Summarise usage logs into one ``BH.oM.BHoMAnalytics.UsageEntry`` per project and method. - @wraps(function) - def wrapper(*args, **kwargs) -> Any: - """A wrapper around the function that captures usage analytics.""" - - if disable: - CONSOLE_LOGGER.debug("bhom_analytics is curently disabled.") - return function(*args, **kwargs) - - _id = uuid.uuid4() - - #for now for file IDs, generate one using the project ID - pid = project_id() - if pid == None: - pid = "" - - file_id = uuid.uuid3(uuid.NAMESPACE_OID, pid) - - # get the data being passed to the function, expected dtype and return type - argspec = inspect.getfullargspec(function)[-1] - argspec.pop("return", None) - - _args = [f'{{"_t": "{argspec[k]}", "Name": "{k}"}}' for k in argspec.keys()] - - exec_metadata = { - "BHoMVersion": BHOM_VERSION, - "BHoM_Guid": _id, - "CallerName": function.__name__, - "ComponentId": _componentId, - "CustomData": {"interpreter": sys.executable}, - "Errors": [], - "FileId": str(file_id), - "FileName": str(file_id), - "Fragments": [], - "Name": "", - "ProjectID": project_id(), - "SelectedItem": { - "MethodName": function.__name__, - "Parameters": _args, - "TypeName": f"{function.__module__}.{function.__qualname__}" - }, - "Time": { - "$date": bson_unix_ticks(short=True), - }, - "UI": "Python", - "UiVersion": sys.version, - "_t": "BH.oM.Base.UsageLogEntry", - } + Args: + usage_log_entries: Entries as returned by :func:`load_logs_from_file` (legacy and current formats may be mixed). - try: - result = function(*args, **kwargs) - except Exception as exc: # pylint: disable=broad-except - exec_metadata["Errors"].extend(convert_exc_info_to_bhom_error(sys.exc_info())) - raise exc - finally: - log_file = BHOM_LOG_FOLDER / f"Usage_{function.__module__.split('.')[0]}_{datetime.now().strftime('%Y%m%d')}.log" + Returns: + The summarised entries. + """ + short_bhom_version = ".".join(BHOM_VERSION.split(".", 2)[0:2]) + common = { + "Computer": socket.gethostname(), + "Username": os.environ.get("USERNAME"), + "BHoMVersion": short_bhom_version, + "_t": "BH.oM.BHoMAnalytics.UsageEntry", + "_bhomVersion": short_bhom_version, + } - if ANALYTICS_LOGGER.handlers[0].baseFilename != str(log_file): - ANALYTICS_LOGGER.handlers[0].close() - ANALYTICS_LOGGER.handlers[0].baseFilename = str(log_file) + legacy = [entry for entry in usage_log_entries if isinstance(entry, UsageLogEntry)] + records = [entry for entry in usage_log_entries if isinstance(entry, dict)] - ANALYTICS_LOGGER.info( - json.dumps(exec_metadata, default=str, indent=None) - ) + db_entries: list[dict[str, Any]] = [] - return result + legacy.sort(key=lambda x: (x.FileId, x.CallerName + str(x.SelectedItem))) + for file_id, filegroup in groupby(legacy, lambda x: x.FileId): + filegroup = list(filegroup) + for _, methodgroup in groupby(filegroup, lambda x: x.CallerName + str(x.SelectedItem)): + methodgroup = list(methodgroup) + first_entry = methodgroup[0] + db_entries.append( + { + **common, + "StartTime": bson_unix_ticks_to_datetime(min(x.Time["$date"] for x in methodgroup), short=True), + "EndTime": bson_unix_ticks_to_datetime(max(x.Time["$date"] for x in methodgroup), short=True), + "UI": first_entry.UI, + "UiVersion": first_entry.UiVersion, + "CallerName": first_entry.CallerName, + "SelectedItem": first_entry.SelectedItem, + "FileId": file_id, + "FileName": first_entry.FileName, + "ProjectID": first_entry.ProjectID, + "NbCallingComponents": len({a.ComponentId for a in methodgroup}), + "TotalNbCalls": len(methodgroup), + "Errors": list(itertools.chain.from_iterable(x.Errors for x in methodgroup)), + "__Time__": datetime.now(), + } + ) + + def record_key(record: dict[str, Any]) -> tuple[str, str, str]: + return (record.get("project", ""), record["module"], record["method"]) + + records.sort(key=record_key) + for (project, module, method), group in groupby(records, record_key): + group = list(group) + errors: dict[tuple[str, str], int] = {} + for record in group: + for error in record.get("errors", []): + key = (error["type"], error["message"]) + errors[key] = errors.get(key, 0) + error.get("count", 1) + db_entries.append( + { + **common, + "StartTime": datetime.fromisoformat(min(r["first"] for r in group)).replace(tzinfo=None), + "EndTime": datetime.fromisoformat(max(r["last"] for r in group)).replace(tzinfo=None), + "UI": "Python", + "UiVersion": group[0].get("python", ""), + "CallerName": method, + "SelectedItem": { + "MethodName": method.split(".")[-1], + "Parameters": [], + "TypeName": f"{module}.{method}", + }, + "FileId": _file_id(project), + "FileName": _file_id(project), + "ProjectID": project, + "NbCallingComponents": len({r.get("session") for r in group}), + "TotalNbCalls": sum(r.get("count", 0) for r in group), + "Errors": [{"Type": t, "Message": m, "Count": c} for (t, m), c in errors.items()], + "__Time__": datetime.now(), + } + ) + + return db_entries - return wrapper - return decorator +def convert_exc_info_to_bhom_error(exc_info: tuple) -> dict[str, Any]: + """Convert ``sys.exc_info()`` into a ``BH.oM.Base.Debugging.Event`` dictionary.""" + return { + "Time": {"$date": bson_unix_ticks(datetime.now(), short=True)}, + "UtcTime": {"$date": bson_unix_ticks(short=True)}, + "StackTrace": "".join(traceback.format_tb(exc_info[2])), + "Message": str(exc_info[1]), + "Type": "Error", + "_t": "BH.oM.Base.Debugging.Event", + } diff --git a/Python_Engine/Python/src/assets/BHoM_Logo.png b/Python_Engine/Python/src/python_toolkit/bhom/assets/BHoM_Logo.png similarity index 100% rename from Python_Engine/Python/src/assets/BHoM_Logo.png rename to Python_Engine/Python/src/python_toolkit/bhom/assets/BHoM_Logo.png diff --git a/Python_Engine/Python/src/assets/bhom_icon.png b/Python_Engine/Python/src/python_toolkit/bhom/assets/bhom_icon.png similarity index 100% rename from Python_Engine/Python/src/assets/bhom_icon.png rename to Python_Engine/Python/src/python_toolkit/bhom/assets/bhom_icon.png diff --git a/Python_Engine/Python/src/python_toolkit/bhom/bhom_object.py b/Python_Engine/Python/src/python_toolkit/bhom/bhom_object.py index 10785de5..4444b21c 100644 --- a/Python_Engine/Python/src/python_toolkit/bhom/bhom_object.py +++ b/Python_Engine/Python/src/python_toolkit/bhom/bhom_object.py @@ -1,37 +1,39 @@ -from base64 import decode +"""Conversion between Python objects and BHoM JSON, as produced and consumed by the BHoM serialiser.""" + import copy +import json +import re +import sys +import uuid from ctypes import ArgumentError from datetime import datetime -from json import encoder +from json import JSONDecoder, JSONEncoder from pathlib import Path -import uuid -import re -from typing import Any, List, Dict, Union -import json -from json import JSONEncoder, JSONDecoder -from .logging import CONSOLE_LOGGER +from typing import Any, Union + from . import BHOM_VERSION +from .logging import CONSOLE_LOGGER from .util import bson_unix_ticks, bson_unix_ticks_to_datetime -import pandas as pd -import numpy as np BHOM_SHORT_VERSION = ".".join(BHOM_VERSION.split(".")[0:2]) + def convert_pascal_to_camel(s: str): """Converts a string to camel_case.""" - sections = re.split("(?<=.)(?=[A-Z])", s) #zero-length match before capitals, skipping capital at the 0th index + sections = re.split("(?<=.)(?=[A-Z])", s) # zero-length match before capitals, skipping capital at the 0th index parts = [] for sec in sections: parts.append(sec.lower()) return "_".join(parts) + def convert_camel_to_pascal(s: str): """Converts a string to PascalCase, ignoring _ if it is the first character.""" - sections = re.split(r'(?<=.)_', s) #match all `_` except if it is the first character. + sections = re.split(r"(?<=.)_", s) # match all `_` except if it is the first character. parts = [] - for sec in sections: #capitalise each section unless the section is empty (in which case, append an underscore) or the section starts with an underscore (first section can begin with _) + for sec in sections: # capitalise each section unless the section is empty (in which case, append an underscore) or the section starts with an underscore (first section can begin with _) if sec == "": parts.append("_") continue @@ -41,68 +43,77 @@ def convert_camel_to_pascal(s: str): parts.append(sec.capitalize()) - return ''.join(parts) + return "".join(parts) + class BHoMJSONDecoder(JSONDecoder): + """Decode BHoM JSON into BHoMObject/IObject instances (and datetimes).""" + def __init__(self, *args, **kwargs): - json.JSONDecoder.__init__(self, object_hook=self.object_hook, *args, **kwargs) + json.JSONDecoder.__init__(self, *args, object_hook=self.object_hook, **kwargs) def object_hook(self, d): + """Convert a decoded JSON object into the matching Python object.""" if "$date" in d: CONSOLE_LOGGER.debug(f"deserialising timestamp {d}") return bson_unix_ticks_to_datetime(d["$date"]) if "_t" not in d: - CONSOLE_LOGGER.debug(f"BHoMJSONDecoder could not convert the following dictionary into a BHoMObject due to a missing '_t' property. Falling back to dictionary: {d}") + CONSOLE_LOGGER.debug( + f"BHoMJSONDecoder could not convert the following dictionary into a BHoMObject due to a missing '_t' property. Falling back to dictionary: {d}" + ) return self.deserialise_unknown(d) - - props = { - "_t": d.pop("_t"), - "_bhom_version": d.pop("_bhomVersion", BHOM_SHORT_VERSION) - } + + props = {"_t": d.pop("_t"), "_bhom_version": d.pop("_bhomVersion", BHOM_SHORT_VERSION)} if (props["_bhom_version"] is not None) and (props["_bhom_version"] != BHOM_SHORT_VERSION): - CONSOLE_LOGGER.warning(f"The bhom version specified in the encoded json ({props['_bhom_version']}) is different from the BHoM version that python_toolkit was installed with ({BHOM_SHORT_VERSION}). There may be versioning issues with this object. Consider deserialising and then serialising again with the BHoM serialiser to get the correct version, or update BHoM to the correct version.") + CONSOLE_LOGGER.warning( + f"The bhom version specified in the encoded json ({props['_bhom_version']}) is different from the BHoM version that python_toolkit was installed with ({BHOM_SHORT_VERSION}). There may be versioning issues with this object. Consider deserialising and then serialising again with the BHoM serialiser to get the correct version, or update BHoM to the correct version." + ) if d.get("BHoM_Guid", None) is not None: - #deserialise as BHoM Object + # deserialise as BHoM Object - #get default BHoMObject properties and replace with defaults if not present + # get default BHoMObject properties and replace with defaults if not present props["name"] = d.pop("Name", "") props["bhom_guid"] = uuid.UUID(d.pop("BHoM_Guid")) props["tags"] = d.pop("Tags", []) props["fragments"] = d.pop("Fragments", []) props["custom_data"] = d.pop("CustomData", {}) - #convert all other properties to camel_case as python users expect + # convert all other properties to camel_case as python users expect for prop_name in d: props[convert_pascal_to_camel(prop_name)] = d[prop_name] return self.deserialise_unknown(BHoMObject(**props)) else: - if props["_t"].startswith("System.Collections.Generic.List"): #this handles when the BHoM serialiser makes generic lists from CustomObject list properties, which get converted to a dictionary. The BHoM serialiser does recognise lists if it can find the object definition via reflection. + if props[ + "_t" + ].startswith( + "System.Collections.Generic.List" + ): # this handles when the BHoM serialiser makes generic lists from CustomObject list properties, which get converted to a dictionary. The BHoM serialiser does recognise lists if it can find the object definition via reflection. return d["_v"] - #deserialise as IObject + # deserialise as IObject for prop_name in d: props[convert_pascal_to_camel(prop_name)] = d[prop_name] return self.deserialise_unknown(IObject(**props)) - def deserialise_unknown(self, obj: Union['IObject', 'BHoMObject', dict]): + def deserialise_unknown(self, obj: Union["IObject", "BHoMObject", dict]): """Override this method in a subclass to add extra object hook on top of the existing method. If the object is an object serialised by the BHoM serialiser, the output object will be a BHoMObject or IObject, so use isinstance() to select.""" return obj + class BHoMJSONEncoder(JSONEncoder): + """Encode BHoMObject/IObject instances and common Python types as BHoM JSON.""" + def default(self, o): + """Convert an object that json cannot serialise natively into a serialisable form.""" if isinstance(o, BHoMObject): - #initialise special BHoMObject properties + # initialise special BHoMObject properties - props = { - "Name": o.name, - "BHoM_Guid": str(o.bhom_guid), - "_t": o._t - } + props = {"Name": o.name, "BHoM_Guid": str(o.bhom_guid), "_t": o._t} if len(o.tags) > 0: props["Tags"] = o.tags @@ -116,7 +127,7 @@ def default(self, o): if o._bhom_version is not None: props["_bhomVersion"] = o._bhom_version - #get property names with reflection and convert all properties to PascalCase as the BHoM serialiser expects + # get property names with reflection and convert all properties to PascalCase as the BHoM serialiser expects for prop_name, value in vars(o).copy().items(): if prop_name in ["name", "bhom_guid", "tags", "fragments", "custom_data", "_t", "_bhom_version"]: continue @@ -125,9 +136,7 @@ def default(self, o): return props elif isinstance(o, IObject): - props = { - "_t": o._t - } + props = {"_t": o._t} if o._bhom_version is not None: props["_bhomVersion"] = o._bhom_version @@ -139,48 +148,58 @@ def default(self, o): props[convert_camel_to_pascal(prop_name)] = value return props - #handle common non-serialisable types - elif isinstance(o, uuid.UUID): #UUID object is not json serialisable by default + # handle common non-serialisable types + elif isinstance(o, uuid.UUID): # UUID object is not json serialisable by default return str(o) - elif isinstance(o, pd.DatetimeIndex): + + # pandas/numpy are optional: an object can only be one of their types if they have already been imported + pd = sys.modules.get("pandas") + np = sys.modules.get("numpy") + if pd is not None and isinstance(o, pd.DatetimeIndex): return [date.isoformat() for date in o] - elif isinstance(o, np.ndarray): + elif np is not None and isinstance(o, np.ndarray): return o.tolist() - elif isinstance(o, pd.Timestamp): + elif pd is not None and isinstance(o, pd.Timestamp): return {"$date": bson_unix_ticks(o.to_pydatetime(), True)} - elif isinstance(o, datetime): + elif pd is not None and isinstance(o, pd.Series): + return dict(zip(o.index.astype(str), o, strict=True)) + + if isinstance(o, datetime): return {"$date": bson_unix_ticks(o, True)} - elif isinstance(o, pd.Series): - return dict(zip(o.index.astype(str), o)) elif isinstance(o, Path): - return { "FileName": str(o.name), "Directory": str(o.parent), "_t": "BH.oM.Adapter.FileSettings", "BHoM_Guid": str(uuid.uuid4()) } + return { + "FileName": str(o.name), + "Directory": str(o.parent), + "_t": "BH.oM.Adapter.FileSettings", + "BHoM_Guid": str(uuid.uuid4()), + } - return self.serialise_unknown(o) #if the object is unknown at this point, call serialise_unknown to allow subclasses to add their own serialisation logic. + return self.serialise_unknown( + o + ) # if the object is unknown at this point, call serialise_unknown to allow subclasses to add their own serialisation logic. - def serialise_unknown(self, obj: Any) -> Union[Dict[str, str], str, List[str], Any]: - """ - This is called by the BHoMJSONEncoder to serialise unknown objects so that the BHoM can handle them if they exist as BHoM Objects in c# but not in python (i.e. an object from an external library). + def serialise_unknown(self, obj: Any) -> dict[str, str] | str | list[str] | Any: + """This is called by the BHoMJSONEncoder to serialise unknown objects so that the BHoM can handle them if they exist as BHoM Objects in c# but not in python (i.e. an object from an external library). Override this method in a sub class with its own logic, and call super().serialise_unknown(obj) for objects that are unknown, or do not wish to serialise. The following objects won't be passed to this method: BHoMObject, IObject, uuid.UUID, pandas.DatetimeIndex, numpy.ndarray, pandas.Timestamp, pandas.Series, pathlib.Path """ - return super(type(self), self).default(obj) #fallback to default json decoder (ValueError) if object is not a BHoMObject or common serialisable type. + return super(type(self), self).default( + obj + ) # fallback to default json decoder (ValueError) if object is not a BHoMObject or common serialisable type. + class IObject: """More generic version of BHoMObject, for non-native objects serialised by the BHoM serialiser, but do not inherit from BHoMObject.""" + _t: str _bhom_version: str - def __init__( - self, - _t: str, - _bhom_version: str = None, - **kwargs - ) -> 'IObject': + def __init__(self, _t: str, _bhom_version: str | None = None, **kwargs) -> "IObject": self._t = _t self._bhom_version = _bhom_version - - #set properties with reflection. + + # set properties with reflection. for kwarg in kwargs: setattr(self, kwarg, kwargs[kwarg]) @@ -193,66 +212,76 @@ def __eq__(self, other) -> bool: if self._t != other._t: return False - + vself = vars(self).copy() vother = vars(other).copy() - #ignore these properties when comparing by property. + # ignore these properties when comparing by property. ignore = ["_bhom_version"] _ = [(vself.pop(p, None), vother.pop(p, None)) for p in ignore] return vself == vother @classmethod - def from_json(cls, j: str, decoder_class: type = BHoMJSONDecoder) -> 'IObject': + def from_json(cls, j: str, decoder_class: type = BHoMJSONDecoder) -> "IObject": + """Deserialise an object from BHoM JSON.""" obj = json.loads(j, cls=decoder_class) - if not isinstance(obj, cls): #this only tests that the top level object was deserialised correctly, if there are problems with deep properties, change the CONSOLE_LOGGER log level to debug. + if not isinstance( + obj, cls + ): # this only tests that the top level object was deserialised correctly, if there are problems with deep properties, change the CONSOLE_LOGGER log level to debug. raise TypeError("The object provided does not deserialise to a valid BHoM object.") return obj - + def to_json(self, encoder_class: type = BHoMJSONEncoder) -> str: + """Serialise this object to BHoM JSON.""" return json.dumps(self, cls=encoder_class) @classmethod - def from_dict(cls, d: dict) -> 'IObject': + def from_dict(cls, d: dict) -> "IObject": + """Create an object from a dictionary of its properties.""" try: - return cls(**d) #should be valid as long as the dictionary has all necessary entries. + return cls(**d) # should be valid as long as the dictionary has all necessary entries. except ArgumentError as ae: - raise ArgumentError("Input dictionary was missing some required arguments, see traceback for more information.") from ae + raise ArgumentError( + "Input dictionary was missing some required arguments, see traceback for more information." + ) from ae def to_dict(self, encoder_class: type = BHoMJSONEncoder) -> dict: """Convert this IObject to a dictionary via deep copying vars(self).""" return copy.deepcopy(vars(self)) + class BHoMObject(IObject): + """A Python representation of a BHoM object (one with a BHoM_Guid).""" + name: str bhom_guid: uuid.UUID - tags: List[str] - fragments: List[Dict[str, object]] - custom_data: Dict[str, object] + tags: list[str] + fragments: list[dict[str, object]] + custom_data: dict[str, object] def __init__( self, - _t: str, #don't make default, as subclasses of this class should set this with super().__init__ + _t: str, # don't make default, as subclasses of this class should set this with super().__init__ name: str = "", - bhom_guid: uuid.UUID = uuid.uuid4(), - tags: List[str] = [], - fragments: List[Dict[str, object]] = [], - custom_data: Dict[str, object] = {}, - _bhom_version: str = None, - **kwargs - ) -> 'BHoMObject': + bhom_guid: uuid.UUID | None = None, + tags: list[str] | None = None, + fragments: list[dict[str, object]] | None = None, + custom_data: dict[str, object] | None = None, + _bhom_version: str | None = None, + **kwargs, + ) -> "BHoMObject": self._t = _t self.name = name - self.bhom_guid = bhom_guid - self.fragments = fragments - self.tags = tags - self.custom_data = custom_data + self.bhom_guid = bhom_guid if bhom_guid is not None else uuid.uuid4() + self.fragments = fragments if fragments is not None else [] + self.tags = tags if tags is not None else [] + self.custom_data = custom_data if custom_data is not None else {} self._bhom_version = _bhom_version - #set non-CustomData properties with reflection. + # set non-CustomData properties with reflection. for kwarg in kwargs: setattr(self, kwarg, kwargs[kwarg]) @@ -269,7 +298,7 @@ def __eq__(self, other) -> bool: vself = vars(self).copy() vother = vars(other).copy() - #ignore these properties when comparing by property. + # ignore these properties when comparing by property. ignore = ["bhom_guid", "_bhom_version"] _ = [(vself.pop(p, None), vother.pop(p, None)) for p in ignore] @@ -277,26 +306,34 @@ def __eq__(self, other) -> bool: @classmethod def from_json(cls, j: str, decoder_class: type = BHoMJSONDecoder): + """Deserialise an object from BHoM JSON, converting to this class if it is a subclass.""" obj = json.loads(j, cls=decoder_class) if isinstance(obj, list): - CONSOLE_LOGGER.warning("The root element of the JSON provided was a list, assuming that the first item is the desired object. If you intended to deserialise a list, please use the `.from_json_array(j)` method instead.") + CONSOLE_LOGGER.warning( + "The root element of the JSON provided was a list, assuming that the first item is the desired object. If you intended to deserialise a list, please use the `.from_json_array(j)` method instead." + ) obj = obj[0] if issubclass(cls, BHoMObject) and cls != BHoMObject: obj = cls._from_bhom_object(obj) - if not isinstance(obj, cls): #this only tests that the top level object was deserialised correctly, if there are problems with deep properties, change the CONSOLE_LOGGER log level to debug. + if not isinstance( + obj, cls + ): # this only tests that the top level object was deserialised correctly, if there are problems with deep properties, change the CONSOLE_LOGGER log level to debug. raise TypeError("The object provided does not deserialise to a valid BHoM object.") return obj - + @classmethod def from_json_array(cls, j: str, decoder_class: type = BHoMJSONDecoder): + """Deserialise a list of objects from a BHoM JSON array.""" objs = json.loads(j, cls=decoder_class) if not isinstance(objs, list): - raise TypeError("The root element of the JSON provided was not a JSON array. Perhaps you intended to use `.from_json(j)` instead?") + raise TypeError( + "The root element of the JSON provided was not a JSON array. Perhaps you intended to use `.from_json(j)` instead?" + ) out = [] for obj in objs: @@ -308,5 +345,5 @@ def from_json_array(cls, j: str, decoder_class: type = BHoMJSONDecoder): return out @classmethod - def _from_bhom_object(cls, o: 'BHoMObject'): - return cls(**vars(o).copy()) #assuming that the sub class is correctly set up, then this should work \ No newline at end of file + def _from_bhom_object(cls, o: "BHoMObject"): + return cls(**vars(o).copy()) # assuming that the sub class is correctly set up, then this should work diff --git a/Python_Engine/Python/src/python_toolkit/bhom/decorators/__init__.py b/Python_Engine/Python/src/python_toolkit/bhom/decorators/__init__.py index 70cea52d..b880027d 100644 --- a/Python_Engine/Python/src/python_toolkit/bhom/decorators/__init__.py +++ b/Python_Engine/Python/src/python_toolkit/bhom/decorators/__init__.py @@ -1 +1,3 @@ -from ._bhom_callable_decorator import bhom_wrapper \ No newline at end of file +"""Decorators for exposing Python methods to BHoM (C#).""" + +from ._bhom_callable_decorator import bhom_wrapper diff --git a/Python_Engine/Python/src/python_toolkit/bhom/decorators/_bhom_callable_decorator.py b/Python_Engine/Python/src/python_toolkit/bhom/decorators/_bhom_callable_decorator.py index 436ebcb9..b66d547b 100644 --- a/Python_Engine/Python/src/python_toolkit/bhom/decorators/_bhom_callable_decorator.py +++ b/Python_Engine/Python/src/python_toolkit/bhom/decorators/_bhom_callable_decorator.py @@ -1,19 +1,29 @@ -import json -from typing import Any, Callable, Union, Dict +import json +from collections.abc import Callable from functools import wraps +from typing import Any, ClassVar + from ..bhom_object import CONSOLE_LOGGER, BHoMJSONDecoder, BHoMJSONEncoder, BHoMObject, IObject -class _BHoMWrapper: - _registered_methods: Dict[str, Callable] = {} - def bhom_callable(self, identifier: str, argument_types:Dict[str, type] = {}, encoder_cls: type = BHoMJSONEncoder, decoder_cls: type = BHoMJSONDecoder): +class _BHoMWrapper: + _registered_methods: ClassVar[dict[str, Callable]] = {} + + def bhom_callable( + self, + identifier: str, + argument_types: dict[str, type] | None = None, + encoder_cls: type = BHoMJSONEncoder, + decoder_cls: type = BHoMJSONDecoder, + ): """Decorator for functions to be made callable from BHoM C# methods/adapters. Note: methods that this wraps must not have "__input_json__" as a default kwarg, as this is used internally to allow BHoM adapters to call the method. when __input_json__ is set, this will cause the method to always output BHoM style json (using the encoder_cls provided to this decorator) - + Args: + identifier (str): the identifier BHoM uses to call the method (see ``python_toolkit.bhom.run_wrapped``). argument_types (dict[str, type]): this is a dictionary that is used to map the argument names to types (specifically BHoMObject types) to subclasses of BHoMObjects. For example, if you have a class that is a subclass of BHoMObject, the default serialiser will only deserialise json to a BHoMObject. To go the extra step to get your class, you must provide the type in this dictionary to allow the wrapper to convert the BHoMObject type to your desired type. @@ -22,35 +32,40 @@ def bhom_callable(self, identifier: str, argument_types:Dict[str, type] = {}, en decoder_cls (JSONDecoder): same as encoder_cls but for JSONDecoder. """ + def decorator(function: Callable): @wraps(function) - def wrapper(*args, **kwargs) -> Union[str, Any]: + def wrapper(*args, **kwargs) -> str | Any: - do_wrap:bool = False + do_wrap: bool = False if "__input_json__" in kwargs and len(args) == 0: do_wrap = True - - #get dictionary from input as file path or json like string. + + # get dictionary from input as file path or json like string. input_json = kwargs.pop("__input_json__") - if not input_json.startswith("{"): #assume it's a path - with open(input_json, "r") as f: + if not input_json.startswith("{"): # assume it's a path + with open(input_json) as f: input_json = f.read() try: - json_kwargs: Union[dict, IObject] = json.loads(input_json, cls=decoder_cls) + json_kwargs: dict | IObject = json.loads(input_json, cls=decoder_cls) if isinstance(json_kwargs, IObject): json_kwargs = json_kwargs.to_dict() - except: - CONSOLE_LOGGER.error("Could not load JSON from file or string due to invalid JSON. Attempting to run with given args and kwargs.", exc_info=1) - - #update kwargs with json + except (json.JSONDecodeError, TypeError, ValueError): + CONSOLE_LOGGER.error( + "Could not load JSON from file or string due to invalid JSON. Attempting to run with given args and kwargs.", + exc_info=1, + ) + json_kwargs = {} + + # update kwargs with json for kwarg_name in json_kwargs: val = json_kwargs[kwarg_name] - if kwarg_name in argument_types: + if argument_types and kwarg_name in argument_types: t = argument_types[kwarg_name] if issubclass(t, BHoMObject) and type(json_kwargs[kwarg_name]) is BHoMObject: @@ -61,14 +76,14 @@ def wrapper(*args, **kwargs) -> Union[str, Any]: rtn = function(*args, **kwargs) if do_wrap: - #don't bother serialising if the method already returns a string. + # don't bother serialising if the method already returns a string. if isinstance(rtn, str): return rtn json_rtn = json.dumps(rtn, cls=encoder_cls) return json_rtn - + return rtn self._registered_methods[identifier] = wrapper @@ -80,10 +95,13 @@ def get_registered_method(self, method_identifier: str): method = self._registered_methods.get(method_identifier, None) if method is None: - raise NotImplementedError(f"The requested method {method_identifier} is not implemented or could not be found.") + raise NotImplementedError( + f"The requested method {method_identifier} is not implemented or could not be found." + ) return method -#the registered methods are stored as a class attribute, so this isn't actually needed -#but this is easier to use, otherwise a new instance must be created every time a method needs to be wrapped -bhom_wrapper = _BHoMWrapper() \ No newline at end of file + +# the registered methods are stored as a class attribute, so this isn't actually needed +# but this is easier to use, otherwise a new instance must be created every time a method needs to be wrapped +bhom_wrapper = _BHoMWrapper() diff --git a/Python_Engine/Python/src/python_toolkit/bhom/installer_info.py b/Python_Engine/Python/src/python_toolkit/bhom/installer_info.py index 10f1b76d..da489c21 100644 --- a/Python_Engine/Python/src/python_toolkit/bhom/installer_info.py +++ b/Python_Engine/Python/src/python_toolkit/bhom/installer_info.py @@ -1,17 +1,23 @@ +"""Information about the installed BHoM, read from the BHoM .NET assemblies (requires the "clr" extra).""" + +import json import os import sys -import json -import clr +from .._optional import require_extra + +require_extra("clr", "clr") + +import clr # noqa: E402 -#append assemblies dir +# append assemblies dir sys.path.append(os.path.expandvars("%ProgramData%\\BHoM\\Assemblies")) -#add required CLR references (dotnet dlls) +# add required CLR references (dotnet dlls) clr.AddReference("UI_Engine") clr.AddReference("Serialiser_Engine") -from BH.Engine.UI import Query -from BH.Engine.Serialiser import Convert +from BH.Engine.Serialiser import Convert # noqa: E402 +from BH.Engine.UI import Query # noqa: E402 -INSTALLER_INFO = json.loads(Convert.ToJson(Query.Information())) \ No newline at end of file +INSTALLER_INFO = json.loads(Convert.ToJson(Query.Information())) diff --git a/Python_Engine/Python/src/python_toolkit/bhom/logging/__init__.py b/Python_Engine/Python/src/python_toolkit/bhom/logging/__init__.py index 4e9eae56..595c9fe6 100644 --- a/Python_Engine/Python/src/python_toolkit/bhom/logging/__init__.py +++ b/Python_Engine/Python/src/python_toolkit/bhom/logging/__init__.py @@ -1,2 +1,6 @@ +"""Logging utilities shared by all BHoM Python toolkits.""" + +from .console import CONSOLE_LOGGER, get_logger from .file import ANALYTICS_LOGGER -from .console import CONSOLE_LOGGER + +__all__ = ["ANALYTICS_LOGGER", "CONSOLE_LOGGER", "get_logger"] diff --git a/Python_Engine/Python/src/python_toolkit/bhom/logging/console.py b/Python_Engine/Python/src/python_toolkit/bhom/logging/console.py index 029dc9ab..d0590a4e 100644 --- a/Python_Engine/Python/src/python_toolkit/bhom/logging/console.py +++ b/Python_Engine/Python/src/python_toolkit/bhom/logging/console.py @@ -1,21 +1,36 @@ -"""Logging utilities for BHoM analytics.""" +"""Console logging shared by all BHoM Python toolkits.""" -# pylint: disable=E0401 import logging import sys -# pylint: enable=E0401 - from .. import TOOLKIT_NAME -level = logging.INFO +LOG_FORMAT = "%(name)s - %(levelname)s - %(message)s" + + +def get_logger(name: str, level: int = logging.INFO) -> logging.Logger: + """Get a console logger using the standard BHoM format. + + Downstream toolkits should use this rather than configuring their own handlers, so that log formatting + is controlled in one place. Calling this repeatedly with the same name returns the same logger without + adding duplicate handlers. + + Args: + name: The logger name, typically the toolkit name (e.g. "LadybugTools_Toolkit"). + level: The initial logging level. + + Returns: + The configured logger. + """ + logger = logging.getLogger(f"{name}[console]") + if not any(getattr(handler, "_bhom_console", False) for handler in logger.handlers): + handler = logging.StreamHandler(sys.stdout) + handler.setFormatter(logging.Formatter(LOG_FORMAT)) + handler._bhom_console = True # type: ignore[attr-defined] + logger.addHandler(handler) + logger.setLevel(level) + logger.propagate = False + return logger -formatter = logging.Formatter("%(name)s - %(levelname)s - %(message)s") -handler = logging.StreamHandler(sys.stdout) -handler.setLevel(level) -handler.setFormatter(formatter) -CONSOLE_LOGGER = logging.getLogger(f"{TOOLKIT_NAME}[console]") -CONSOLE_LOGGER.propagate = False -CONSOLE_LOGGER.setLevel(level) -CONSOLE_LOGGER.addHandler(handler) +CONSOLE_LOGGER = get_logger(TOOLKIT_NAME) diff --git a/Python_Engine/Python/src/python_toolkit/bhom/logging/file.py b/Python_Engine/Python/src/python_toolkit/bhom/logging/file.py index 0516311d..893e76b4 100644 --- a/Python_Engine/Python/src/python_toolkit/bhom/logging/file.py +++ b/Python_Engine/Python/src/python_toolkit/bhom/logging/file.py @@ -1,14 +1,10 @@ -"""Logging utilities for BHoM analytics.""" +"""File logging for the Python_Toolkit (written lazily, only when something is logged).""" -# pylint: disable=E0401 import logging from datetime import datetime from logging.handlers import RotatingFileHandler -# pylint: enable=E0401 - - -from .. import TOOLKIT_NAME, BHOM_LOG_FOLDER +from .. import BHOM_LOG_FOLDER, TOOLKIT_NAME formatter = logging.Formatter("%(message)s") handler = RotatingFileHandler( @@ -17,7 +13,7 @@ maxBytes=25 * 1024 * 1024, # 25mb max before file overwritten backupCount=1, encoding="utf-8", - delay=True, # wait until all logs collected before writing + delay=True, # do not create the file until something is logged ) handler.setLevel(logging.DEBUG) handler.setFormatter(formatter) diff --git a/Python_Engine/Python/src/python_toolkit/bhom/run_wrapped.py b/Python_Engine/Python/src/python_toolkit/bhom/run_wrapped.py index 2a21c362..52befcbf 100644 --- a/Python_Engine/Python/src/python_toolkit/bhom/run_wrapped.py +++ b/Python_Engine/Python/src/python_toolkit/bhom/run_wrapped.py @@ -1,7 +1,16 @@ -from .decorators import bhom_wrapper -from . import wrapped +"""Entry point used by BHoM (C#) to run a registered Python method with JSON input.""" -def run_wrapped(identifier: str, json: str): +from . import wrapped # noqa: F401 (imported for its side effect: registering bhom_callable methods) +from .decorators import bhom_wrapper + + +def run_wrapped(identifier: str, json: str) -> None: + """Run a method registered with ``bhom_callable`` and print its JSON result to stdout. + + Args: + identifier: The identifier the method was registered with. + json: The method's keyword arguments, as a JSON string or the path to a JSON file. + """ method = bhom_wrapper.get_registered_method(identifier) - print(method(__input_json__ = json)) \ No newline at end of file + print(method(__input_json__=json)) diff --git a/Python_Engine/Python/src/python_toolkit/bhom/util.py b/Python_Engine/Python/src/python_toolkit/bhom/util.py index 1c06ab0d..ef597b75 100644 --- a/Python_Engine/Python/src/python_toolkit/bhom/util.py +++ b/Python_Engine/Python/src/python_toolkit/bhom/util.py @@ -1,31 +1,46 @@ """General utility functions.""" -# pylint: disable=E0401 -from datetime import datetime, timedelta -# pylint: enable=E0401 +from datetime import datetime, timedelta, timezone -def bson_unix_ticks(date_time: datetime = datetime.utcnow(), short: bool = False) -> int: +_EPOCH = datetime(1970, 1, 1) + + +def _utcnow() -> datetime: + return datetime.now(timezone.utc).replace(tzinfo=None) + + +def bson_unix_ticks(date_time: datetime | None = None, short: bool = False) -> int: """Python implementation of unix ticks. Args: - date_time (datetime, optional): The datetime to convert to ticks. Defaults to datetime.utcnow(). - short (bool, optional): Whether to return the short ticks. Defaults to False. + date_time: The datetime to convert to ticks. Defaults to the current UTC time. + short: Whether to return the short (millisecond) ticks. Returns: - int: The ticks. + The ticks. """ + if date_time is None: + date_time = _utcnow() - _ticks = (date_time - datetime(1970, 1, 1)).total_seconds() * 10**3 + ticks = (date_time - _EPOCH).total_seconds() * 10**3 if short: - return int(_ticks) + return int(ticks) + + return int(ticks * (10**3)) - return int(_ticks*(10**3)) -def bson_unix_ticks_to_datetime(ticks: int, short:bool = False) -> datetime: +def bson_unix_ticks_to_datetime(ticks: int, short: bool = False) -> datetime: + """Convert unix ticks to a datetime. + Args: + ticks: The ticks to convert. + short: Whether the ticks are short (millisecond) ticks. + + Returns: + The datetime. + """ if not short: ticks = int(ticks / (10**3)) - return datetime(1970, 1, 1) + timedelta(milliseconds=ticks) - + return _EPOCH + timedelta(milliseconds=ticks) diff --git a/Python_Engine/Python/src/python_toolkit/bhom/wrapped/__init__.py b/Python_Engine/Python/src/python_toolkit/bhom/wrapped/__init__.py index 10636f63..ae13ed49 100644 --- a/Python_Engine/Python/src/python_toolkit/bhom/wrapped/__init__.py +++ b/Python_Engine/Python/src/python_toolkit/bhom/wrapped/__init__.py @@ -1,6 +1,8 @@ -from importlib import import_module -from pathlib import Path +"""Import every module in this folder so that their ``bhom_callable`` methods are registered.""" + import os +from importlib import import_module +from pathlib import Path python_files = Path(__file__).parent.glob("**/*.py") @@ -10,4 +12,4 @@ rel = file.relative_to(Path(__file__).parent) module = "." + str(rel).replace(".py", "").replace(os.path.sep, ".") - import_module(module, "python_toolkit.bhom.wrapped") \ No newline at end of file + import_module(module, "python_toolkit.bhom.wrapped") diff --git a/Python_Engine/Python/src/python_toolkit/bhom/wrapped/_test_wrapped.py b/Python_Engine/Python/src/python_toolkit/bhom/wrapped/_test_wrapped.py index ac0764f1..f6f547fc 100644 --- a/Python_Engine/Python/src/python_toolkit/bhom/wrapped/_test_wrapped.py +++ b/Python_Engine/Python/src/python_toolkit/bhom/wrapped/_test_wrapped.py @@ -1,10 +1,10 @@ -from python_toolkit.plot.heatmap import heatmap +"""A method registered for testing the C#-callable wrapper (see ``python_toolkit.bhom.run_wrapped``).""" + from ..decorators import bhom_wrapper -import pandas as pd + @bhom_wrapper.bhom_callable("test") -def heatmap_2(geometry, **kwargs): - print(geometry) - print(kwargs["arg2"]) +def echo_geometry(geometry, **kwargs): + """Set the x coordinate of the given geometry to 20 and return it.""" geometry.x = 20 return geometry diff --git a/Python_Engine/Python/src/python_toolkit/bhom_tkinter/__init__.py b/Python_Engine/Python/src/python_toolkit/bhom_tkinter/__init__.py index 0dbeb309..bae51310 100644 --- a/Python_Engine/Python/src/python_toolkit/bhom_tkinter/__init__.py +++ b/Python_Engine/Python/src/python_toolkit/bhom_tkinter/__init__.py @@ -1,54 +1,59 @@ +"""BHoM-styled tkinter windows and widgets (requires the "ui" extra: ``python_toolkit[ui]``).""" + +from .._optional import require_extra + +require_extra("ui", "tkinter", "matplotlib", "PIL") + +from .bhom_base_child_window import BHoMBaseChildWindow +from .theming import ( + DARK, + LIGHT, + TclTheme, + ThemeManager, +) from .widgets import ( - BHoMBaseWidget, - PackingOptions, - CalendarWidget, - CheckboxSelection, - MultiBoxSelection, - CmapSelector, - ColourPicker, - DropDownSelection, - FigureContainer, - ScrollableListBox, - PathSelector, - RadioSelection, - ValidatedEntryBox, + BHoMBaseWidget, + CalendarWidget, + CheckboxSelection, + CmapSelector, + ColourPicker, + DropDownSelection, + FigureContainer, + MultiBoxSelection, + PackingOptions, + PathSelector, + RadioSelection, + ScrollableListBox, + ValidatedEntryBox, ) -from .bhom_base_child_window import BHoMBaseChildWindow from .windows import ( - BHoMModalWindow, - DirectoryFileSelector, - LandingPage, - ProcessingWindow, - WarningBox, -) - -from .theming import ( - TclTheme, - ThemeManager, - LIGHT, - DARK, + BHoMModalWindow, + DirectoryFileSelector, + LandingPage, + ProcessingWindow, + WarningBox, ) __all__ = [ - "BHoMBaseWidget", - "PackingOptions", - "CalendarWidget", - "CheckboxSelection", - "MultiBoxSelection", - "CmapSelector", - "ColourPicker", - "DropDownSelection", - "FigureContainer", - "ScrollableListBox", - "PathSelector", - "RadioSelection", - "ValidatedEntryBox", - "BHoMBaseChildWindow", - "BHoMModalWindow", - "DirectoryFileSelector", - "LandingPage", - "ProcessingWindow", - "WarningBox", - "TclTheme", - "ThemeManager" + "BHoMBaseChildWindow", + "BHoMBaseWidget", + "BHoMModalWindow", + "CalendarWidget", + "CheckboxSelection", + "CmapSelector", + "ColourPicker", + "DirectoryFileSelector", + "DropDownSelection", + "FigureContainer", + "LandingPage", + "MultiBoxSelection", + "PackingOptions", + "PathSelector", + "ProcessingWindow", + "RadioSelection", + "ScrollableListBox", + "TclTheme", + "ThemeManager", + "ValidatedEntryBox", + "WarningBox", ] diff --git a/Python_Engine/Python/src/python_toolkit/bhom_tkinter/bhom_base_child_window.py b/Python_Engine/Python/src/python_toolkit/bhom_tkinter/bhom_base_child_window.py index 3946fd88..f5e1eaa0 100644 --- a/Python_Engine/Python/src/python_toolkit/bhom_tkinter/bhom_base_child_window.py +++ b/Python_Engine/Python/src/python_toolkit/bhom_tkinter/bhom_base_child_window.py @@ -3,7 +3,8 @@ from __future__ import annotations import tkinter as tk -from typing import Callable, Literal, List, Optional +from collections.abc import Callable +from typing import Literal from python_toolkit.bhom_tkinter.bhom_window_shell import BHoMWindowShell from python_toolkit.bhom_tkinter.widgets._widgets_base import BHoMBaseWidget @@ -19,24 +20,24 @@ def __init__( title: str = "Application", min_width: int = 400, min_height: int = 400, - width: Optional[int] = None, - height: Optional[int] = None, + width: int | None = None, + height: int | None = None, resizable: bool = True, center_on_screen: bool = True, show_submit: bool = True, submit_text: str = "Submit", - submit_command: Optional[Callable] = None, + submit_command: Callable | None = None, close_on_submit: bool = True, show_close: bool = True, close_text: str = "Close", - close_command: Optional[Callable] = None, - on_close_window: Optional[Callable] = None, + close_command: Callable | None = None, + on_close_window: Callable | None = None, theme_mode: str | None = None, - widgets: Optional[List[BHoMBaseWidget]] = None, + widgets: list[BHoMBaseWidget] | None = None, top_most: bool = False, fullscreen: bool = False, buttons_side: Literal["left", "right"] = "right", - grid_dimensions: Optional[tuple[int, int]] = None, + grid_dimensions: tuple[int, int] | None = None, show_banner: bool = False, defer_show: bool = False, content_padding: int = 20, diff --git a/Python_Engine/Python/src/python_toolkit/bhom_tkinter/bhom_base_window.py b/Python_Engine/Python/src/python_toolkit/bhom_tkinter/bhom_base_window.py index 7a37b35f..f994ca8b 100644 --- a/Python_Engine/Python/src/python_toolkit/bhom_tkinter/bhom_base_window.py +++ b/Python_Engine/Python/src/python_toolkit/bhom_tkinter/bhom_base_window.py @@ -1,15 +1,14 @@ """Base themed Tk window used by BHoM toolkit GUI windows.""" -import tkinter as tk -from tkinter import ttk -from python_toolkit.bhom_tkinter.widgets.label import Label -from pathlib import Path -from typing import Optional, Callable, Literal, List -import platform -import ctypes import os +import tkinter as tk +from collections.abc import Callable +from typing import Literal + import matplotlib as mpl +from python_toolkit.bhom_tkinter.widgets.label import Label + # Centralized matplotlib backend selection: # - Allow override via `MPLBACKEND` environment variable (e.g. set to 'Agg' for headless CI). # - Default to 'TkAgg' for Tkinter embedding; fallback to 'Agg' if the requested backend is unavailable. @@ -21,15 +20,13 @@ except Exception: mpl.use("Agg", force=True) +from python_toolkit.bhom_tkinter.bhom_window_shell import BHoMWindowShell from python_toolkit.bhom_tkinter.widgets._widgets_base import BHoMBaseWidget from python_toolkit.bhom_tkinter.widgets.button import Button -import python_toolkit -from python_toolkit.bhom_tkinter.theming.theme import ThemeManager -from python_toolkit.bhom_tkinter.bhom_window_shell import BHoMWindowShell + class BHoMBaseWindow(tk.Tk, BHoMWindowShell): - """ - A reusable default root window template for tkinter applications. + """A reusable default root window template for tkinter applications. Includes a branded banner, content area, and optional action buttons. """ @@ -38,31 +35,30 @@ def __init__( title: str = "Application", min_width: int = 400, min_height: int = 400, - width: Optional[int] = None, - height: Optional[int] = None, + width: int | None = None, + height: int | None = None, resizable: bool = True, center_on_screen: bool = True, show_submit: bool = True, submit_text: str = "Submit", - submit_command: Optional[Callable] = None, + submit_command: Callable | None = None, close_on_submit: bool = True, show_close: bool = True, close_text: str = "Close", - close_command: Optional[Callable] = None, - on_close_window: Optional[Callable] = None, - theme_mode:str = "auto", - widgets: Optional[List[BHoMBaseWidget]] = None, + close_command: Callable | None = None, + on_close_window: Callable | None = None, + theme_mode: str = "auto", + widgets: list[BHoMBaseWidget] | None = None, top_most: bool = False, fullscreen: bool = False, buttons_side: Literal["left", "right"] = "right", - grid_dimensions: Optional[tuple[int, int]] = None, + grid_dimensions: tuple[int, int] | None = None, show_banner: bool = True, defer_show: bool = False, content_padding: int = 20, - **kwargs + **kwargs, ): - """ - Initialize the default root window. + """Initialize the default root window. Args: title (str): Window and banner title text. @@ -121,11 +117,9 @@ def __init__( if __name__ == "__main__": - - ### TEST SIMPLE - from python_toolkit.bhom_tkinter.widgets import Label, Button + from python_toolkit.bhom_tkinter.widgets import Button, Label test = BHoMBaseWindow( title="Test Window", @@ -133,8 +127,16 @@ def __init__( ) test.widgets.append(Label(test.content_frame, text="Hello, World!")) - test.widgets.append(Button(test.content_frame, text="Click Me", command=lambda: print("Button Clicked!"), helper_text="This is a button.", item_title="Button Widget Title")) + test.widgets.append( + Button( + test.content_frame, + text="Click Me", + command=lambda: print("Button Clicked!"), + helper_text="This is a button.", + item_title="Button Widget Title", + ) + ) test.build() test.mainloop() - print(test.get()) \ No newline at end of file + print(test.get()) diff --git a/Python_Engine/Python/src/python_toolkit/bhom_tkinter/bhom_window_shell.py b/Python_Engine/Python/src/python_toolkit/bhom_tkinter/bhom_window_shell.py index a1ffc69d..1d2ed81e 100644 --- a/Python_Engine/Python/src/python_toolkit/bhom_tkinter/bhom_window_shell.py +++ b/Python_Engine/Python/src/python_toolkit/bhom_tkinter/bhom_window_shell.py @@ -1,20 +1,20 @@ """Shared themed window chrome mixin for BHoM root and child windows.""" +import ctypes +import platform import tkinter as tk -from tkinter import ttk -from python_toolkit.bhom_tkinter.widgets.label import Label +from collections.abc import Callable from pathlib import Path -from typing import Optional, Callable, Literal, List -import platform -import ctypes -import python_toolkit -from python_toolkit.bhom_tkinter.widgets._widgets_base import BHoMBaseWidget -from python_toolkit.bhom_tkinter.widgets.button import Button -from python_toolkit.bhom_tkinter.widgets._slim_scrollbar import SlimScrollbar, blend -from python_toolkit.bhom_tkinter.theming.theme import ThemeManager -from python_toolkit.bhom_tkinter.theming.scaling import init_scaling, scale, get_work_area +from tkinter import ttk +from typing import Literal from python_toolkit.bhom import BHOM_VERSION +from python_toolkit.bhom_tkinter.theming.scaling import get_work_area, init_scaling, scale +from python_toolkit.bhom_tkinter.theming.theme import ThemeManager +from python_toolkit.bhom_tkinter.widgets._slim_scrollbar import SlimScrollbar, blend +from python_toolkit.bhom_tkinter.widgets._widgets_base import BHoMBaseWidget +from python_toolkit.bhom_tkinter.widgets.button import Button +from python_toolkit.bhom_tkinter.widgets.label import Label class BHoMWindowShell: @@ -26,24 +26,24 @@ def _init_bhom_shell( title: str, min_width: int, min_height: int, - width: Optional[int], - height: Optional[int], + width: int | None, + height: int | None, resizable: bool, center_on_screen: bool, show_submit: bool, submit_text: str, - submit_command: Optional[Callable], + submit_command: Callable | None, close_on_submit: bool, show_close: bool, close_text: str, - close_command: Optional[Callable], - on_close_window: Optional[Callable], + close_command: Callable | None, + on_close_window: Callable | None, theme_mode: str, - widgets: Optional[List[BHoMBaseWidget]], + widgets: list[BHoMBaseWidget] | None, top_most: bool, fullscreen: bool, buttons_side: Literal["left", "right"], - grid_dimensions: Optional[tuple[int, int]], + grid_dimensions: tuple[int, int] | None, show_banner: bool = True, defer_show: bool = False, content_padding: int = 20, @@ -83,9 +83,9 @@ def _init_bhom_shell( self.close_command = close_command self.result = None self._is_exiting = False - self.button_bar: Optional[ttk.Frame] = None + self.button_bar: ttk.Frame | None = None self._has_been_shown = False - self._pending_resize_job: Optional[str] = None + self._pending_resize_job: str | None = None self._is_resizing = False self._rigid_width = width is not None self._rigid_height = height is not None @@ -129,18 +129,37 @@ def grid_content_frame(self, x_count: int, y_count: int) -> None: self.content_frame.rowconfigure(r, weight=1) for c in range(x_count): self.content_frame.columnconfigure(c, weight=1) - + def build(self): """Call build on all child widgets that have it (for deferred widget construction).""" - if any(not isinstance(w, BHoMBaseWidget) for w in self.widgets): raise TypeError("All items in widgets list must be instances of BHoMBaseWidget.") - + for widget in self.widgets: widget.build() self.refresh_sizing() + def rebuild(self) -> None: + """Re-place all widgets so changes to `self.widgets` are reflected. + + Every BHoM widget currently managed by the content frame is removed from + its geometry manager (without being destroyed), then `build()` places the + widgets that are still in `self.widgets`. + """ + for child in self.content_frame.winfo_children(): + if not isinstance(child, BHoMBaseWidget): + continue + manager = child.winfo_manager() + if manager == "pack": + child.pack_forget() + elif manager == "grid": + child.grid_forget() + elif manager == "place": + child.place_forget() + + self.build() + def _set_window_icon(self) -> None: """Set a custom window icon, replacing Tk's default icon.""" icon_path = self.theme.icon_path @@ -168,8 +187,7 @@ def _set_window_icon(self) -> None: print(f"Warning: Could not set window icon from {icon_path}: {ex}") def _set_titlebar_theme(self) -> None: - """ - Apply titlebar theme using Windows API. + """Apply titlebar theme using Windows API. Args: theme_style: Theme style key (`light` or `dark`). @@ -178,7 +196,6 @@ def _set_titlebar_theme(self) -> None: None """ try: - use_dark = 1 if self.theme.dark_theme else 0 if platform.system() == "Windows" and ctypes is not None and self.winfo_exists(): @@ -187,20 +204,20 @@ def _set_titlebar_theme(self) -> None: if hwnd: DWMWA_USE_IMMERSIVE_DARK_MODE = 20 ctypes.windll.dwmapi.DwmSetWindowAttribute( - hwnd, DWMWA_USE_IMMERSIVE_DARK_MODE, + hwnd, + DWMWA_USE_IMMERSIVE_DARK_MODE, ctypes.byref(ctypes.c_int(use_dark)), - ctypes.sizeof(ctypes.c_int) + ctypes.sizeof(ctypes.c_int), ) except Exception: pass def _load_theme(self) -> str: - """ - Load a custom theme from a TCL file. - + """Load a custom theme from a TCL file. + Args: - custom_theme_path (Path, optional): Path to custom TCL theme file. + custom_theme_path (Path, optional): Path to custom TCL theme file. If None, uses default style.tcl in same directory. theme_name (str): Name of the theme to apply from the TCL file. @@ -211,11 +228,11 @@ def _load_theme(self) -> str: try: current_themes = set(style.theme_names()) - + expected_theme = self.theme.path.stem.replace("_theme", "") # Load the TCL theme file try: - self.tk.call('source', str(self.theme.path)) + self.tk.call("source", str(self.theme.path)) except tk.TclError as source_error: if "already exists" not in str(source_error).lower(): raise @@ -232,7 +249,7 @@ def _load_theme(self) -> str: style.theme_use(selected_theme) self._ensure_typography_styles(style) return selected_theme - + except Exception as e: print(f"Warning: Could not load custom theme: {e}") try: @@ -284,7 +301,7 @@ def _lookup_font(style_name: str) -> str: except Exception: pass - def _build_banner(self, parent: ttk.Frame, title: str, logo_path: Optional[Path]) -> None: + def _build_banner(self, parent: ttk.Frame, title: str, logo_path: Path | None) -> None: """Build the branded banner section. Args: @@ -310,6 +327,7 @@ def _build_banner(self, parent: ttk.Frame, title: str, logo_path: Optional[Path] if logo_path and logo_path.exists(): try: from PIL import Image, ImageTk + img = Image.open(logo_path) img.thumbnail((scale(80), scale(80)), Image.Resampling.LANCZOS) # Bind image to this root explicitly to avoid stale image handles @@ -323,19 +341,11 @@ def _build_banner(self, parent: ttk.Frame, title: str, logo_path: Optional[Path] pass # PIL not available, skip logo # Title - title_label = Label( - text_container, - text=title, - style="LargeTitle.TLabel" - ) + title_label = Label(text_container, text=title, style="LargeTitle.TLabel") title_label.pack(anchor="w") # Subtitle - subtitle_label = Label( - text_container, - text=f"powered by BHoM (v{BHOM_VERSION})", - style="Caption.TLabel" - ) + subtitle_label = Label(text_container, text=f"powered by BHoM (v{BHOM_VERSION})", style="Caption.TLabel") subtitle_label.pack(anchor="w") def _build_buttons( @@ -345,7 +355,7 @@ def _build_buttons( submit_text: str, show_close: bool, close_text: str, - buttons_side: Literal["left", "right"] = "right" + buttons_side: Literal["left", "right"] = "right", ) -> None: """Build the bottom button bar. @@ -377,9 +387,9 @@ def _build_buttons( if show_close: close_widget = Button( - button_container, - text=close_text, - command=self._on_close, + button_container, + text=close_text, + command=self._on_close, width=12, alignment="center", ) @@ -422,9 +432,7 @@ def _build_scroll_host(self, content_padding: int) -> None: self._scroll_host.pack(fill=tk.BOTH, expand=True) background = ttk.Style().lookup("TFrame", "background") or self.cget("background") - self._scroll_canvas = tk.Canvas( - self._scroll_host, highlightthickness=0, borderwidth=0, background=background - ) + self._scroll_canvas = tk.Canvas(self._scroll_host, highlightthickness=0, borderwidth=0, background=background) background = ttk.Style().lookup("TFrame", "background") or "#1e1e1e" foreground = ttk.Style().lookup("TLabel", "foreground") or "#cccccc" try: @@ -436,23 +444,15 @@ def _build_scroll_host(self, content_padding: int) -> None: except Exception: colours = {} bar_options = dict(thickness=scale(12), padding=scale(3), **colours) - self._scroll_bar = SlimScrollbar( - self._scroll_host, tk.VERTICAL, self._scroll_canvas.yview, **bar_options - ) - self._scroll_hbar = SlimScrollbar( - self._scroll_host, tk.HORIZONTAL, self._scroll_canvas.xview, **bar_options - ) - self._scroll_canvas.configure( - yscrollcommand=self._scroll_bar.set, xscrollcommand=self._scroll_hbar.set - ) + self._scroll_bar = SlimScrollbar(self._scroll_host, tk.VERTICAL, self._scroll_canvas.yview, **bar_options) + self._scroll_hbar = SlimScrollbar(self._scroll_host, tk.HORIZONTAL, self._scroll_canvas.xview, **bar_options) + self._scroll_canvas.configure(yscrollcommand=self._scroll_bar.set, xscrollcommand=self._scroll_hbar.set) self._scroll_canvas.pack(side=tk.LEFT, fill=tk.BOTH, expand=True) self._scroll_bar_visible = False self._scroll_hbar_visible = False self.content_frame = ttk.Frame(self._scroll_canvas, padding=content_padding) - self._content_window = self._scroll_canvas.create_window( - (0, 0), window=self.content_frame, anchor="nw" - ) + self._content_window = self._scroll_canvas.create_window((0, 0), window=self.content_frame, anchor="nw") self._scroll_canvas.bind("", self._on_scroll_canvas_configure) self.content_frame.bind("", self._on_content_configure, add="+") self.bind_all("", self._on_mousewheel, add="+") @@ -561,7 +561,9 @@ def _apply_sizing(self) -> None: required_height = max(required_height, self.main_container.winfo_reqheight()) if self.button_bar is not None and self.button_bar.winfo_manager(): - required_height = max(required_height, self.button_bar.winfo_reqheight() + self._scroll_canvas.winfo_reqheight()) + required_height = max( + required_height, self.button_bar.winfo_reqheight() + self._scroll_canvas.winfo_reqheight() + ) # Determine final dimensions: auto-size unless a rigid dimension is explicitly provided. if self._rigid_width: @@ -628,7 +630,9 @@ def _apply_post_show_sizing(self) -> None: required_height = max(required_height, self.main_container.winfo_reqheight()) if self.button_bar is not None and self.button_bar.winfo_manager(): - required_height = max(required_height, self.button_bar.winfo_reqheight() + self._scroll_canvas.winfo_reqheight()) + required_height = max( + required_height, self.button_bar.winfo_reqheight() + self._scroll_canvas.winfo_reqheight() + ) current_width = self.winfo_width() current_height = self.winfo_height() @@ -656,7 +660,7 @@ def _apply_post_show_sizing(self) -> None: def _show_window_with_styling(self) -> None: """Apply titlebar styling and show the window.""" self._set_titlebar_theme() - + # Show window after styling self.deiconify() self._has_been_shown = True @@ -673,7 +677,6 @@ def close(self) -> None: def destroy_root(self) -> None: """Safely terminate and destroy the Tk root window.""" - try: if self.winfo_exists(): self.quit() @@ -681,7 +684,7 @@ def destroy_root(self) -> None: except tk.TclError: pass - def _exit(self, result: str, callback: Optional[Callable] = None) -> None: + def _exit(self, result: str, callback: Callable | None = None) -> None: """Handle any exit path and always destroy the root window. Args: @@ -712,7 +715,7 @@ def _on_submit(self) -> None: if self.close_on_submit: self._exit("submit", self.submit_command) return - + self.result = "submit" try: if self.submit_command: @@ -726,12 +729,11 @@ def _on_submit(self) -> None: finally: self._cached_widget_values = self._collect_widget_values() - def _on_close(self) -> None: """Handle close button click.""" self._exit("close", self.close_command) - def _on_close_window(self, callback: Optional[Callable]) -> None: + def _on_close_window(self, callback: Callable | None) -> None: """Handle window X button click.""" self._exit("window_closed", callback) @@ -751,12 +753,9 @@ def _collect_widget_values(self) -> dict[str, object]: widget_values: dict[str, object] = {} for widget in self.widgets: - if hasattr(widget, "get"): try: widget_values[widget.id] = widget.get() except Exception as ex: print(f"Warning: Failed to get value from widget {widget}: {ex}") return widget_values - - diff --git a/Python_Engine/Python/src/python_toolkit/bhom_tkinter/theming/__init__.py b/Python_Engine/Python/src/python_toolkit/bhom_tkinter/theming/__init__.py index db0139ed..512bfc13 100644 --- a/Python_Engine/Python/src/python_toolkit/bhom_tkinter/theming/__init__.py +++ b/Python_Engine/Python/src/python_toolkit/bhom_tkinter/theming/__init__.py @@ -1 +1 @@ -from .theme import TclTheme, ThemeManager, LIGHT, DARK \ No newline at end of file +from .theme import DARK, LIGHT, TclTheme, ThemeManager diff --git a/Python_Engine/Python/src/python_toolkit/bhom_tkinter/theming/scaling.py b/Python_Engine/Python/src/python_toolkit/bhom_tkinter/theming/scaling.py index 8ee126a8..18e822ed 100644 --- a/Python_Engine/Python/src/python_toolkit/bhom_tkinter/theming/scaling.py +++ b/Python_Engine/Python/src/python_toolkit/bhom_tkinter/theming/scaling.py @@ -74,6 +74,7 @@ def get_work_area(root: tk.Misc) -> tuple[int, int]: if platform.system() == "Windows": try: from ctypes import wintypes + rect = wintypes.RECT() # SPI_GETWORKAREA = 0x0030 if ctypes.windll.user32.SystemParametersInfoW(0x0030, 0, ctypes.byref(rect), 0): diff --git a/Python_Engine/Python/src/python_toolkit/bhom_tkinter/theming/theme.py b/Python_Engine/Python/src/python_toolkit/bhom_tkinter/theming/theme.py index 4143869d..3cc0dee6 100644 --- a/Python_Engine/Python/src/python_toolkit/bhom_tkinter/theming/theme.py +++ b/Python_Engine/Python/src/python_toolkit/bhom_tkinter/theming/theme.py @@ -1,13 +1,15 @@ from dataclasses import dataclass from pathlib import Path + import python_toolkit + @dataclass class TclTheme: name: str path: Path - logo_path: Path|None = None - icon_path: Path|None = None + logo_path: Path | None = None + icon_path: Path | None = None dark_theme: bool = False def __post_init__(self): @@ -18,21 +20,23 @@ def __post_init__(self): if self.icon_path and not self.icon_path.exists(): raise FileNotFoundError(f"Icon file not found at {self.icon_path}") + LIGHT = TclTheme( - name="light", + name="light", path=Path(list(python_toolkit.__path__)[0]).absolute() / "bhom_tkinter" / "theming" / "bhom_light_theme.tcl", logo_path=Path(list(python_toolkit.__path__)[0]).absolute() / "bhom" / "assets" / "BHoM_Logo.png", icon_path=Path(list(python_toolkit.__path__)[0]).absolute() / "bhom" / "assets" / "bhom_icon.png", - dark_theme=False + dark_theme=False, ) DARK = TclTheme( - name="dark", + name="dark", path=Path(list(python_toolkit.__path__)[0]).absolute() / "bhom_tkinter" / "theming" / "bhom_dark_theme.tcl", logo_path=Path(list(python_toolkit.__path__)[0]).absolute() / "bhom" / "assets" / "BHoM_Logo.png", icon_path=Path(list(python_toolkit.__path__)[0]).absolute() / "bhom" / "assets" / "bhom_icon.png", - dark_theme=True - ) + dark_theme=True, +) + class ThemeManager: def __init__(self, theme_mode: str = "light"): @@ -41,7 +45,7 @@ def __init__(self, theme_mode: str = "light"): "light": LIGHT, "dark": DARK, "auto": DARK if self._is_windows_dark_mode() else LIGHT, - "default": LIGHT + "default": LIGHT, } def register_theme(self, theme: TclTheme) -> None: @@ -54,7 +58,14 @@ def set_theme_mode(self, mode: str) -> None: raise ValueError(f"Invalid theme mode: {mode}") self.theme_mode = mode - def add_new_theme(self, name: str, path: Path, logo_path: Path|None = None, icon_path: Path|None = None, dark_theme: bool = False) -> None: + def add_new_theme( + self, + name: str, + path: Path, + logo_path: Path | None = None, + icon_path: Path | None = None, + dark_theme: bool = False, + ) -> None: """Add a new theme by providing its details.""" new_theme = TclTheme(name=name, path=path, logo_path=logo_path, icon_path=icon_path, dark_theme=dark_theme) self.register_theme(new_theme) @@ -62,73 +73,72 @@ def add_new_theme(self, name: str, path: Path, logo_path: Path|None = None, icon @property def name(self) -> str: return self.get_theme().name - + @name.setter def name(self, value: str) -> None: if value not in self.themes: raise ValueError(f"Invalid theme name: {value}") self.set_theme_mode(value) - + @property def path(self) -> Path: return self.get_theme().path - + @path.setter def path(self, value: Path) -> None: theme = self.get_theme() theme.path = value - + @property - def logo_path(self) -> Path|None: + def logo_path(self) -> Path | None: return self.get_theme().logo_path - + @logo_path.setter - def logo_path(self, value: Path|None) -> None: + def logo_path(self, value: Path | None) -> None: theme = self.get_theme() theme.logo_path = value - + @property - def icon_path(self) -> Path|None: + def icon_path(self) -> Path | None: return self.get_theme().icon_path - + @icon_path.setter - def icon_path(self, value: Path|None) -> None: + def icon_path(self, value: Path | None) -> None: theme = self.get_theme() theme.icon_path = value - + @property def dark_theme(self) -> bool: return self.get_theme().dark_theme - + @dark_theme.setter def dark_theme(self, value: bool) -> None: theme = self.get_theme() theme.dark_theme = value - + def get_theme(self, theme_mode: str | None = None) -> TclTheme: if theme_mode is None: theme_mode = self.theme_mode if theme_mode not in self.themes: raise ValueError(f"Invalid theme mode: {theme_mode}") return self.themes[theme_mode] - + def _is_windows_dark_mode(self) -> bool: - + try: - import winreg + key = winreg.OpenKey( - winreg.HKEY_CURRENT_USER, - r"Software\Microsoft\Windows\CurrentVersion\Themes\Personalize" - ) + winreg.HKEY_CURRENT_USER, r"Software\Microsoft\Windows\CurrentVersion\Themes\Personalize" + ) value, _ = winreg.QueryValueEx(key, "AppsUseLightTheme") - return value == 0 # 0 means dark mode, 1 means light mode - + return value == 0 # 0 means dark mode, 1 means light mode + except FileNotFoundError: - # Key may not exist on older Windows versions + # Key may not exist on older Windows versions return False - + except ImportError: # winreg is only available on Windows - return False \ No newline at end of file + return False diff --git a/Python_Engine/Python/src/python_toolkit/bhom_tkinter/widgets/__init__.py b/Python_Engine/Python/src/python_toolkit/bhom_tkinter/widgets/__init__.py index b8432351..285a1965 100644 --- a/Python_Engine/Python/src/python_toolkit/bhom_tkinter/widgets/__init__.py +++ b/Python_Engine/Python/src/python_toolkit/bhom_tkinter/widgets/__init__.py @@ -1,39 +1,39 @@ -from ._packing_options import PackingOptions from ._grid_options import GridOptions +from ._packing_options import PackingOptions from ._widgets_base import BHoMBaseWidget -from .widget_calendar import CalendarWidget +from .button import Button from .check_box_selection import CheckboxSelection +from .check_box_selection import CheckboxSelection as MultiBoxSelection from .cmap_selector import CmapSelector from .colour_picker import ColourPicker from .drop_down_selection import DropDownSelection from .figure_container import FigureContainer +from .label import Label from .list_box import ScrollableListBox -from .searchable_list_box import SearchableListBox -from .check_box_selection import CheckboxSelection as MultiBoxSelection from .path_selector import PathSelector from .radio_selection import RadioSelection -from .validated_entry_box import ValidatedEntryBox -from .button import Button -from .label import Label +from .searchable_list_box import SearchableListBox from .spinbox import Spinbox +from .validated_entry_box import ValidatedEntryBox +from .widget_calendar import CalendarWidget __all__ = [ - "BHoMBaseWidget", - "PackingOptions", - "GridOptions", - "CalendarWidget", - "CheckboxSelection", - "MultiBoxSelection", - "CmapSelector", - "ColourPicker", - "DropDownSelection", - "FigureContainer", - "ScrollableListBox", - "SearchableListBox", - "PathSelector", - "RadioSelection", - "ValidatedEntryBox", - "Button", - "Label", - "Spinbox", -] \ No newline at end of file + "BHoMBaseWidget", + "Button", + "CalendarWidget", + "CheckboxSelection", + "CmapSelector", + "ColourPicker", + "DropDownSelection", + "FigureContainer", + "GridOptions", + "Label", + "MultiBoxSelection", + "PackingOptions", + "PathSelector", + "RadioSelection", + "ScrollableListBox", + "SearchableListBox", + "Spinbox", + "ValidatedEntryBox", +] diff --git a/Python_Engine/Python/src/python_toolkit/bhom_tkinter/widgets/_build_options.py b/Python_Engine/Python/src/python_toolkit/bhom_tkinter/widgets/_build_options.py index 7891a6ab..522b417c 100644 --- a/Python_Engine/Python/src/python_toolkit/bhom_tkinter/widgets/_build_options.py +++ b/Python_Engine/Python/src/python_toolkit/bhom_tkinter/widgets/_build_options.py @@ -1,11 +1,10 @@ """Typed build options shared by BHoM Tkinter widgets.""" -from dataclasses import dataclass, asdict -from typing import Any, Literal +from dataclasses import asdict, dataclass + @dataclass class BuildOptions: - """Container for widget build options with type hints.""" def to_dict(self) -> dict: @@ -14,4 +13,4 @@ def to_dict(self) -> dict: Returns: dict: Build options filtered to keys with concrete values. """ - return {k: v for k, v in asdict(self).items() if v is not None} \ No newline at end of file + return {k: v for k, v in asdict(self).items() if v is not None} diff --git a/Python_Engine/Python/src/python_toolkit/bhom_tkinter/widgets/_grid_options.py b/Python_Engine/Python/src/python_toolkit/bhom_tkinter/widgets/_grid_options.py index 1ec68e1f..24938757 100644 --- a/Python_Engine/Python/src/python_toolkit/bhom_tkinter/widgets/_grid_options.py +++ b/Python_Engine/Python/src/python_toolkit/bhom_tkinter/widgets/_grid_options.py @@ -1,14 +1,14 @@ """Typed gridding options shared by BHoM Tkinter widgets.""" -from dataclasses import dataclass, asdict +from dataclasses import asdict, dataclass from typing import Any, Literal -from python_toolkit.bhom_tkinter.widgets._build_options import BuildOptions from python_toolkit.bhom_tkinter.theming.scaling import scale, scale_pad +from python_toolkit.bhom_tkinter.widgets._build_options import BuildOptions + @dataclass class GridOptions(BuildOptions): - """Container for `grid` geometry keyword arguments with type hints.""" column: int = 0 @@ -20,7 +20,7 @@ class GridOptions(BuildOptions): pady: float | str | tuple[float | str, float | str] = 0.0 row: int = 0 rowspan: int = 1 - sticky: Literal['n', 'e', 's', 'w', 'ne', 'nw', 'se', 'sw', ''] = '' + sticky: Literal["n", "e", "s", "w", "ne", "nw", "se", "sw", ""] = "" def to_dict(self) -> dict: """Convert the dataclass to a dictionary, excluding `None` values. @@ -37,4 +37,3 @@ def to_dict(self) -> dict: if key in options: options[key] = scale(options[key]) return options - diff --git a/Python_Engine/Python/src/python_toolkit/bhom_tkinter/widgets/_packing_options.py b/Python_Engine/Python/src/python_toolkit/bhom_tkinter/widgets/_packing_options.py index d7a6570f..6e19e50c 100644 --- a/Python_Engine/Python/src/python_toolkit/bhom_tkinter/widgets/_packing_options.py +++ b/Python_Engine/Python/src/python_toolkit/bhom_tkinter/widgets/_packing_options.py @@ -1,21 +1,22 @@ """Typed packing options shared by BHoM Tkinter widgets.""" -from dataclasses import dataclass, asdict +from dataclasses import asdict, dataclass from typing import Any, Literal -from python_toolkit.bhom_tkinter.widgets._build_options import BuildOptions from python_toolkit.bhom_tkinter.theming.scaling import scale, scale_pad +from python_toolkit.bhom_tkinter.widgets._build_options import BuildOptions + @dataclass class PackingOptions(BuildOptions): """Container for `pack` geometry keyword arguments with type hints.""" after: Any = None - anchor: Literal['nw', 'n', 'ne', 'w', 'center', 'e', 'sw', 's', 'se'] = 'center' + anchor: Literal["nw", "n", "ne", "w", "center", "e", "sw", "s", "se"] = "center" before: Any = None expand: bool | Literal[0, 1] = 0 - fill: Literal['none', 'x', 'y', 'both'] = 'none' - side: Literal['left', 'right', 'top', 'bottom'] = 'top' + fill: Literal["none", "x", "y", "both"] = "none" + side: Literal["left", "right", "top", "bottom"] = "top" ipadx: float | str = 0.0 ipady: float | str = 0.0 padx: float | str | tuple[float | str, float | str] = 0.0 @@ -37,8 +38,8 @@ def to_dict(self) -> dict: if key in options: options[key] = scale(options[key]) return options - -if __name__ == "__main__": - d = PackingOptions(side='left', fill='x', expand=True, padx=5, pady=5, anchor='w') - print(d.to_dict()) \ No newline at end of file + +if __name__ == "__main__": + d = PackingOptions(side="left", fill="x", expand=True, padx=5, pady=5, anchor="w") + print(d.to_dict()) diff --git a/Python_Engine/Python/src/python_toolkit/bhom_tkinter/widgets/_slim_scrollbar.py b/Python_Engine/Python/src/python_toolkit/bhom_tkinter/widgets/_slim_scrollbar.py index 10aa0289..56305544 100644 --- a/Python_Engine/Python/src/python_toolkit/bhom_tkinter/widgets/_slim_scrollbar.py +++ b/Python_Engine/Python/src/python_toolkit/bhom_tkinter/widgets/_slim_scrollbar.py @@ -1,14 +1,14 @@ """Slim, rounded scrollbar drawn on a canvas (themed, DPI-aware).""" import tkinter as tk -from typing import Callable, Optional +from collections.abc import Callable def blend(base: str, other: str, amount: float) -> str: """Blend two '#rrggbb' colours; amount=0 gives `base`, 1 gives `other`.""" - b = [int(base[i:i + 2], 16) for i in (1, 3, 5)] - o = [int(other[i:i + 2], 16) for i in (1, 3, 5)] - return "#%02x%02x%02x" % tuple(int(x + (y - x) * amount) for x, y in zip(b, o)) + b = [int(base[i : i + 2], 16) for i in (1, 3, 5)] + o = [int(other[i : i + 2], 16) for i in (1, 3, 5)] + return "#{:02x}{:02x}{:02x}".format(*tuple(int(x + (y - x) * amount) for x, y in zip(b, o))) class SlimScrollbar(tk.Canvas): @@ -22,7 +22,7 @@ def __init__( self, parent: tk.Misc, orient: str = tk.VERTICAL, - command: Optional[Callable] = None, + command: Callable | None = None, *, track: str = "#1e1e1e", thumb: str = "#5a5a5a", @@ -37,7 +37,7 @@ def __init__( self._padding = padding self._first, self._last = 0.0, 1.0 self._hover = False - self._drag_offset: Optional[float] = None + self._drag_offset: float | None = None size = {"width": thickness} if self._vertical else {"height": thickness} super().__init__(parent, highlightthickness=0, borderwidth=0, background=track, **size) diff --git a/Python_Engine/Python/src/python_toolkit/bhom_tkinter/widgets/_widgets_base.py b/Python_Engine/Python/src/python_toolkit/bhom_tkinter/widgets/_widgets_base.py index 6d9f5735..65b51eed 100644 --- a/Python_Engine/Python/src/python_toolkit/bhom_tkinter/widgets/_widgets_base.py +++ b/Python_Engine/Python/src/python_toolkit/bhom_tkinter/widgets/_widgets_base.py @@ -1,39 +1,39 @@ """Abstract base widget primitives used across BHoM Tkinter components.""" -from abc import ABC, abstractmethod -from typing import cast - import tkinter as tk +from abc import ABC, abstractmethod +from collections.abc import Callable from tkinter import ttk -from typing import Optional, Literal, Union, Tuple, Callable +from typing import Literal, cast +from uuid import uuid4 -from python_toolkit.bhom_tkinter.widgets._packing_options import PackingOptions +from python_toolkit.bhom.logging import CONSOLE_LOGGER from python_toolkit.bhom_tkinter.widgets._build_options import BuildOptions from python_toolkit.bhom_tkinter.widgets._grid_options import GridOptions +from python_toolkit.bhom_tkinter.widgets._packing_options import PackingOptions -from uuid import uuid4 class BHoMBaseWidget(ttk.Frame, ABC): - """ - Base class for all widgets in the BHoM Tkinter toolkit. + """Base class for all widgets in the BHoM Tkinter toolkit. Provides common structure and functionality for consistent design. """ def __init__( - self, - parent: ttk.Frame, - id: Optional[str] = None, - item_title: Optional[str] = None, - helper_text: Optional[str] = None, - alignment: Literal['left', 'center', 'right'] = 'left', - fill_extents: bool = False, - custom_validation: Optional[Callable[[object], Tuple[bool, Optional[str], Optional[Literal['info', 'warning', 'error']]]]] = None, - disable_validation: bool = False, - build_options: BuildOptions = PackingOptions(), - on_change: Optional[Callable] = None, - **kwargs): - """ - Initialize the widget base. + self, + parent: ttk.Frame, + id: str | None = None, + item_title: str | None = None, + helper_text: str | None = None, + alignment: Literal["left", "center", "right"] = "left", + fill_extents: bool = False, + custom_validation: Callable[[object], tuple[bool, str | None, Literal["info", "warning", "error"] | None]] + | None = None, + disable_validation: bool = False, + build_options: BuildOptions | None = None, + on_change: Callable | None = None, + **kwargs, + ): + """Initialize the widget base. Args: parent: Parent widget @@ -57,12 +57,12 @@ def __init__( self.item_title = item_title self.helper_text = helper_text - self.build_options = build_options - self.alignment: Literal['left', 'center', 'right'] = self._normalise_alignment(alignment) + self.build_options = build_options if build_options is not None else PackingOptions() + self.alignment: Literal["left", "center", "right"] = self._normalise_alignment(alignment) self.fill_extents = self._normalise_bool(fill_extents) self.custom_validation = custom_validation self.disable_validation = bool(disable_validation) - self.on_change: Optional[Callable] = on_change + self.on_change: Callable | None = on_change if id is None: self.id = str(uuid4()) @@ -104,54 +104,63 @@ def __init__( self.content_frame.pack(side="top", fill=tk.BOTH, expand=True) @property - def _pack_anchor(self) -> Literal['w', 'center', 'e']: + def _pack_anchor(self) -> Literal["w", "center", "e"]: """Return the pack anchor string for the current alignment. Returns: str: Pack anchor token (`w`, `center`, or `e`). """ - return cast(Literal['w', 'center', 'e'], { - "left": "w", - "center": "center", - "right": "e", - }[self.alignment]) + return cast( + Literal["w", "center", "e"], + { + "left": "w", + "center": "center", + "right": "e", + }[self.alignment], + ) @property - def _text_anchor(self) -> Literal['w', 'center', 'e']: + def _text_anchor(self) -> Literal["w", "center", "e"]: """Return the text anchor string for the current alignment. Returns: str: Text anchor token (`w`, `center`, or `e`). """ - return cast(Literal['w', 'center', 'e'], { - "left": "w", - "center": "center", - "right": "e", - }[self.alignment]) + return cast( + Literal["w", "center", "e"], + { + "left": "w", + "center": "center", + "right": "e", + }[self.alignment], + ) @property - def _text_justify(self) -> Literal['left', 'center', 'right']: + def _text_justify(self) -> Literal["left", "center", "right"]: """Return the Tk justify token for the current alignment. Returns: str: Justification token (`left`, `center`, or `right`). """ - return cast(Literal['left', 'center', 'right'], self.alignment) + return cast(Literal["left", "center", "right"], self.alignment) @property - def _grid_sticky(self) -> Literal['w', '', 'e']: + def _grid_sticky(self) -> Literal["w", "", "e"]: """Return the grid sticky token for the current alignment. Returns: str: Grid sticky token (`w`, empty string for centered, or `e`). """ - return cast(Literal['w', '', 'e'], { - "left": "w", - "center": "", - "right": "e", - }[self.alignment]) - - def _normalise_alignment(self, alignment: Optional[str]) -> Literal['left', 'center', 'right']: + return cast( + Literal["w", "", "e"], + { + "left": "w", + "center": "", + "right": "e", + }[self.alignment], + ) + + def _normalise_alignment(self, alignment: str | None) -> Literal["left", "center", "right"]: """Normalise alignment input and fallback safely to `left`. Args: @@ -163,7 +172,7 @@ def _normalise_alignment(self, alignment: Optional[str]) -> Literal['left', 'cen candidate = str(alignment or "left").strip().lower() if candidate not in {"left", "center", "right"}: return "left" - return cast(Literal['left', 'center', 'right'], candidate) + return cast(Literal["left", "center", "right"], candidate) def _normalise_bool(self, value: object) -> bool: """Normalise bool-like input with safe defaults. @@ -207,7 +216,7 @@ def _apply_text_alignment(self, widget: tk.Widget) -> None: except Exception: pass - def align_child_text(self, widget: tk.Widget, alignment: Optional[Literal['left', 'center', 'right']] = None) -> None: + def align_child_text(self, widget: tk.Widget, alignment: Literal["left", "center", "right"] | None = None) -> None: """Apply left/center/right text alignment to a child widget. Args: @@ -219,11 +228,11 @@ def align_child_text(self, widget: tk.Widget, alignment: Optional[Literal['left' self.alignment = self._normalise_alignment(alignment) self._apply_text_alignment(widget) - + if alignment is not None: self.alignment = previous_alignment - def set_alignment(self, alignment: Literal['left', 'center', 'right']) -> None: + def set_alignment(self, alignment: Literal["left", "center", "right"]) -> None: """Set widget-wide alignment and refresh built-in labels. Args: @@ -284,7 +293,7 @@ def set(self, value): raise NotImplementedError("Subclasses must implement the set() method.") @abstractmethod - def validate(self) -> Tuple[bool, Optional[str], Optional[Literal['info', 'warning', 'error']]]: + def validate(self) -> tuple[bool, str | None, Literal["info", "warning", "error"] | None]: """Validate the current widget value. Returns: @@ -295,9 +304,8 @@ def validate(self) -> Tuple[bool, Optional[str], Optional[Literal['info', 'warni raise NotImplementedError("Subclasses must implement the validate() method.") def apply_validation( - self, - base_result: Tuple[bool, Optional[str], Optional[Literal['info', 'warning', 'error']]] - ) -> Tuple[bool, Optional[str], Optional[Literal['info', 'warning', 'error']]]: + self, base_result: tuple[bool, str | None, Literal["info", "warning", "error"] | None] + ) -> tuple[bool, str | None, Literal["info", "warning", "error"] | None]: """Apply global validation switches and optional custom validation. Subclasses should call this from their `validate()` implementation, @@ -337,11 +345,8 @@ def apply_validation( return True, custom_message, custom_severity return is_valid, message, severity - - def build( - self, - **kwargs - ): + + def build(self, **kwargs): """Place the widget in its parent container. Args: @@ -353,22 +358,18 @@ def build( elif isinstance(self.build_options, GridOptions): self.grid(**self.build_options.to_dict()) - + else: raise NotImplementedError(f"Unsupported build options type: {type(self.build_options)}") - if __name__ == "__main__": - from python_toolkit.bhom_tkinter.bhom_base_window import BHoMBaseWindow - from python_toolkit.bhom_tkinter.widgets._packing_options import PackingOptions from python_toolkit.bhom_tkinter.widgets._grid_options import GridOptions + from python_toolkit.bhom_tkinter.widgets._packing_options import PackingOptions + from python_toolkit.bhom_tkinter.widgets.label import Label - from python_toolkit.bhom_tkinter.widgets.button import Button - from python_toolkit.bhom_tkinter.widgets.label import Label - - #gridding test + # gridding test root = BHoMBaseWindow(grid_dimensions=(3, 3)) diff --git a/Python_Engine/Python/src/python_toolkit/bhom_tkinter/widgets/button.py b/Python_Engine/Python/src/python_toolkit/bhom_tkinter/widgets/button.py index d51c7542..3fbec1c0 100644 --- a/Python_Engine/Python/src/python_toolkit/bhom_tkinter/widgets/button.py +++ b/Python_Engine/Python/src/python_toolkit/bhom_tkinter/widgets/button.py @@ -1,89 +1,87 @@ """Simple button widget with action callback following BHoM toolkit patterns.""" -import tkinter as tk +from collections.abc import Callable from tkinter import ttk -from typing import Optional, Callable, Literal - -from python_toolkit.bhom_tkinter.widgets._widgets_base import BHoMBaseWidget +from typing import Literal from python_toolkit.bhom.analytics import CONSOLE_LOGGER +from python_toolkit.bhom_tkinter.widgets._widgets_base import BHoMBaseWidget class Button(BHoMBaseWidget): - """A minimal button widget that invokes a callback when clicked. - - - `get()` returns the number of times the button has been clicked. - - `set()` can update the button label when passed a string. - """ - - def __init__( - self, - parent, - text: str = "Click", - command: Optional[Callable[[], None]] = None, - width: int = 25, - style: Optional[str] = None, - **kwargs, - ): - super().__init__(parent, **kwargs) - - self._user_command = command - self._click_count = 0 - self.button = ttk.Button( - self.content_frame, - text=text, - command=self._on_click, - width=width, - style=style, - - ) - self.button.pack(side="top", anchor=self._pack_anchor) - - def _on_click(self): - """Internal click handler increments counter and calls user callback.""" - self._click_count += 1 - if self._user_command: - try: - self._user_command() - except Exception as e: - CONSOLE_LOGGER.error(f"Unhandled exception when trying to perform custom command: {e}", exc_info=True) - - def get(self): - """Return the number of times the button has been clicked.""" - return self._click_count - - def set(self, value): - """Update the button label text when passed a string.""" - if isinstance(value, str): - self.button.configure(text=value) - - def validate(self) -> tuple[bool, Optional[str], Optional[Literal['info', 'warning', 'error']]]: - """Button has no user-editable state, so validation is always valid unless overridden.""" - return self.apply_validation((True, None, None)) + """A minimal button widget that invokes a callback when clicked. + + - `get()` returns the number of times the button has been clicked. + - `set()` can update the button label when passed a string. + """ + + def __init__( + self, + parent, + text: str = "Click", + command: Callable[[], None] | None = None, + width: int = 25, + style: str | None = None, + **kwargs, + ): + super().__init__(parent, **kwargs) + + self._user_command = command + self._click_count = 0 + self.button = ttk.Button( + self.content_frame, + text=text, + command=self._on_click, + width=width, + style=style, + ) + self.button.pack(side="top", anchor=self._pack_anchor) + + def _on_click(self): + """Internal click handler increments counter and calls user callback.""" + self._click_count += 1 + if self._user_command: + try: + self._user_command() + except Exception as e: + CONSOLE_LOGGER.error(f"Unhandled exception when trying to perform custom command: {e}", exc_info=True) + + def get(self): + """Return the number of times the button has been clicked.""" + return self._click_count + + def set(self, value): + """Update the button label text when passed a string.""" + if isinstance(value, str): + self.button.configure(text=value) + + def validate(self) -> tuple[bool, str | None, Literal["info", "warning", "error"] | None]: + """Button has no user-editable state, so validation is always valid unless overridden.""" + return self.apply_validation((True, None, None)) if __name__ == "__main__": - from python_toolkit.bhom_tkinter.bhom_base_window import BHoMBaseWindow - from python_toolkit.bhom_tkinter.widgets._packing_options import PackingOptions + from python_toolkit.bhom_tkinter.bhom_base_window import BHoMBaseWindow + from python_toolkit.bhom_tkinter.widgets._packing_options import PackingOptions - def demo_action(): + def demo_action(): - #test fail + # test fail - a = 1 / 0 + raise ZeroDivisionError("demo failure") - root = BHoMBaseWindow() - parent_frame = root.content_frame + root = BHoMBaseWindow() + parent_frame = root.content_frame - widget = Button( - parent_frame, - text="Press me", - command=demo_action, - item_title="Demo Button", - helper_text="A minimal clickable button.", - build_options=PackingOptions(anchor="n", padx=20, pady=20), - alignment="center", - ) - widget.build() + widget = Button( + parent_frame, + text="Press me", + command=demo_action, + item_title="Demo Button", + helper_text="A minimal clickable button.", + build_options=PackingOptions(anchor="n", padx=20, pady=20), + alignment="center", + ) + widget.build() - root.mainloop() + root.mainloop() diff --git a/Python_Engine/Python/src/python_toolkit/bhom_tkinter/widgets/check_box_selection.py b/Python_Engine/Python/src/python_toolkit/bhom_tkinter/widgets/check_box_selection.py index ddac1bac..e778dc8c 100644 --- a/Python_Engine/Python/src/python_toolkit/bhom_tkinter/widgets/check_box_selection.py +++ b/Python_Engine/Python/src/python_toolkit/bhom_tkinter/widgets/check_box_selection.py @@ -1,206 +1,216 @@ """Checkbox selection widget with multi-select support and state helpers.""" import tkinter as tk +from collections.abc import Callable from tkinter import ttk -from typing import Optional, List, Callable, Tuple, Literal +from typing import Literal -from python_toolkit.bhom_tkinter.widgets._widgets_base import BHoMBaseWidget from python_toolkit.bhom_tkinter.theming.scaling import scale_pad +from python_toolkit.bhom_tkinter.widgets._widgets_base import BHoMBaseWidget + class CheckboxSelection(BHoMBaseWidget): - """A reusable checkbox selection widget built from a list of fields, allowing multiple selections.""" - - def __init__( - self, - parent, - fields=None, - command: Optional[Callable[[List[str]], None]] = None, - defaults: Optional[List[str]] = None, - orient="vertical", - max_per_line=None, - item_title: Optional[str] = None, - helper_text: Optional[str] = None, - min_selections: Optional[int] = None, - max_selections: Optional[int] = None, - **kwargs): - """ - Args: - parent (tk.Widget): The parent widget. - fields (list, optional): List of selectable fields. - command (callable, optional): Called with list of selected values when changed. - defaults (list, optional): List of default selected values. - orient (str): Either "vertical" or "horizontal". - max_per_line (int, optional): Maximum items per row/column before wrapping. - item_title (str, optional): Optional header text shown at the top of the widget frame. - helper_text (str, optional): Optional helper text shown above the checkboxes. - min_selections (int, optional): Minimum number of selections required. - max_selections (int, optional): Maximum number of selections allowed. - **kwargs: Additional Frame options. - """ - super().__init__(parent, item_title=item_title, helper_text=helper_text, **kwargs) - - self.fields = [str(field) for field in (fields or [])] - self.command = command - self.orient = orient.lower() - self.max_per_line = max_per_line - self.value_vars = {} # Dictionary mapping field names to BooleanVars - self._buttons = [] - self._field_buttons = {} - self.min_selections = min_selections - self.max_selections = max_selections - - # Sub-frame for checkbox controls - self.buttons_frame = ttk.Frame(self.content_frame) - self.buttons_frame.pack(side="top", anchor=self._pack_anchor) - - self._build_buttons() - - if defaults: - self.set(defaults) - - def _build_buttons(self): - """Create checkboxes from current fields.""" - for button in self._buttons: - button.destroy() - self._buttons.clear() - self._field_buttons.clear() - self.value_vars.clear() - - for index, field in enumerate(self.fields): - var = tk.BooleanVar(value=False) - self.value_vars[field] = var - - button = ttk.Checkbutton( - self.buttons_frame, - text=field, - variable=var, - style="Checkbox.TCheckbutton", - command=lambda f=field: self._on_select_field(f), - ) - self.align_child_text(button) - - if self.max_per_line and self.max_per_line > 0: - if self.orient == "horizontal": - row = index // self.max_per_line - column = index % self.max_per_line - else: - row = index % self.max_per_line - column = index // self.max_per_line - button.grid(row=row, column=column, padx=scale_pad((0, 10)), pady=scale_pad((0, 4)), sticky=self._grid_sticky) - elif self.orient == "horizontal": - button.grid(row=0, column=index, padx=scale_pad((0, 10)), pady=scale_pad((0, 4)), sticky=self._grid_sticky) - else: - button.grid(row=index, column=0, padx=scale_pad((0, 10)), pady=scale_pad((0, 4)), sticky=self._grid_sticky) - self._buttons.append(button) - self._field_buttons[field] = button - - def _on_select_field(self, field): - """Handle checkbox selection change.""" - if self.command: - self.command(self.get()) - self._fire_on_change(self.get()) - - def get(self) -> List[str]: - """Return a list of currently selected values. - - Returns: - List[str]: Selected field labels. - """ - return [field for field, var in self.value_vars.items() if var.get()] - - def set(self, value: List[str]): - """Set the selected values. - - Args: - value: Field names to mark as selected. - """ - values = [str(v) for v in (value or [])] - for field, var in self.value_vars.items(): - var.set(field in values) - - def select_all(self): - """Select all checkboxes.""" - for var in self.value_vars.values(): - var.set(True) - if self.command: - self.command(self.get()) - self._fire_on_change(self.get()) - - def deselect_all(self): - """Deselect all checkboxes.""" - for var in self.value_vars.values(): - var.set(False) - if self.command: - self.command(self.get()) - self._fire_on_change(self.get()) - - def toggle_all(self): - """Toggle all checkbox states.""" - for var in self.value_vars.values(): - var.set(not var.get()) - if self.command: - self.command(self.get()) - self._fire_on_change(self.get()) - - def set_fields(self, fields: List[str], defaults: Optional[List[str]] = None): - """Replace the available fields and rebuild the widget. - - Args: - fields: New available field names. - defaults: Optional field names to preselect after rebuild. - """ - self.fields = [str(field) for field in (fields or [])] - self._build_buttons() - - if defaults: - self.set(defaults) - - def validate(self) -> tuple[bool, Optional[str], Optional[Literal['info', 'warning', 'error']]]: - """Validate the current selection against min/max constraints. - - Returns: - tuple[bool, Optional[str], Optional[Literal['info', 'warning', 'error']]]: - `(is_valid, message, severity)` where severity is `None` when - valid, or `"error"` for an invalid selection. - """ - selected_count = len(self.get()) - if self.min_selections is not None and selected_count < self.min_selections: - return getattr(self, "apply_validation")((False, f"Select at least {self.min_selections} options.", "error")) - if self.max_selections is not None and selected_count > self.max_selections: - return getattr(self, "apply_validation")((False, f"Select no more than {self.max_selections} options.", "error")) - return getattr(self, "apply_validation")((True, None, None)) + """A reusable checkbox selection widget built from a list of fields, allowing multiple selections.""" + + def __init__( + self, + parent, + fields=None, + command: Callable[[list[str]], None] | None = None, + defaults: list[str] | None = None, + orient="vertical", + max_per_line=None, + item_title: str | None = None, + helper_text: str | None = None, + min_selections: int | None = None, + max_selections: int | None = None, + **kwargs, + ): + """Args: + parent (tk.Widget): The parent widget. + fields (list, optional): List of selectable fields. + command (callable, optional): Called with list of selected values when changed. + defaults (list, optional): List of default selected values. + orient (str): Either "vertical" or "horizontal". + max_per_line (int, optional): Maximum items per row/column before wrapping. + item_title (str, optional): Optional header text shown at the top of the widget frame. + helper_text (str, optional): Optional helper text shown above the checkboxes. + min_selections (int, optional): Minimum number of selections required. + max_selections (int, optional): Maximum number of selections allowed. + **kwargs: Additional Frame options. + """ + super().__init__(parent, item_title=item_title, helper_text=helper_text, **kwargs) + + self.fields = [str(field) for field in (fields or [])] + self.command = command + self.orient = orient.lower() + self.max_per_line = max_per_line + self.value_vars = {} # Dictionary mapping field names to BooleanVars + self._buttons = [] + self._field_buttons = {} + self.min_selections = min_selections + self.max_selections = max_selections + + # Sub-frame for checkbox controls + self.buttons_frame = ttk.Frame(self.content_frame) + self.buttons_frame.pack(side="top", anchor=self._pack_anchor) + + self._build_buttons() + + if defaults: + self.set(defaults) + + def _build_buttons(self): + """Create checkboxes from current fields.""" + for button in self._buttons: + button.destroy() + self._buttons.clear() + self._field_buttons.clear() + self.value_vars.clear() + + for index, field in enumerate(self.fields): + var = tk.BooleanVar(value=False) + self.value_vars[field] = var + + button = ttk.Checkbutton( + self.buttons_frame, + text=field, + variable=var, + style="Checkbox.TCheckbutton", + command=lambda f=field: self._on_select_field(f), + ) + self.align_child_text(button) + + if self.max_per_line and self.max_per_line > 0: + if self.orient == "horizontal": + row = index // self.max_per_line + column = index % self.max_per_line + else: + row = index % self.max_per_line + column = index // self.max_per_line + button.grid( + row=row, column=column, padx=scale_pad((0, 10)), pady=scale_pad((0, 4)), sticky=self._grid_sticky + ) + elif self.orient == "horizontal": + button.grid( + row=0, column=index, padx=scale_pad((0, 10)), pady=scale_pad((0, 4)), sticky=self._grid_sticky + ) + else: + button.grid( + row=index, column=0, padx=scale_pad((0, 10)), pady=scale_pad((0, 4)), sticky=self._grid_sticky + ) + self._buttons.append(button) + self._field_buttons[field] = button + + def _on_select_field(self, field): + """Handle checkbox selection change.""" + if self.command: + self.command(self.get()) + self._fire_on_change(self.get()) + + def get(self) -> list[str]: + """Return a list of currently selected values. + + Returns: + List[str]: Selected field labels. + """ + return [field for field, var in self.value_vars.items() if var.get()] + + def set(self, value: list[str]): + """Set the selected values. + + Args: + value: Field names to mark as selected. + """ + values = [str(v) for v in (value or [])] + for field, var in self.value_vars.items(): + var.set(field in values) + + def select_all(self): + """Select all checkboxes.""" + for var in self.value_vars.values(): + var.set(True) + if self.command: + self.command(self.get()) + self._fire_on_change(self.get()) + + def deselect_all(self): + """Deselect all checkboxes.""" + for var in self.value_vars.values(): + var.set(False) + if self.command: + self.command(self.get()) + self._fire_on_change(self.get()) + + def toggle_all(self): + """Toggle all checkbox states.""" + for var in self.value_vars.values(): + var.set(not var.get()) + if self.command: + self.command(self.get()) + self._fire_on_change(self.get()) + + def set_fields(self, fields: list[str], defaults: list[str] | None = None): + """Replace the available fields and rebuild the widget. + + Args: + fields: New available field names. + defaults: Optional field names to preselect after rebuild. + """ + self.fields = [str(field) for field in (fields or [])] + self._build_buttons() + + if defaults: + self.set(defaults) + + def validate(self) -> tuple[bool, str | None, Literal["info", "warning", "error"] | None]: + """Validate the current selection against min/max constraints. + + Returns: + tuple[bool, Optional[str], Optional[Literal['info', 'warning', 'error']]]: + `(is_valid, message, severity)` where severity is `None` when + valid, or `"error"` for an invalid selection. + """ + selected_count = len(self.get()) + if self.min_selections is not None and selected_count < self.min_selections: + return self.apply_validation((False, f"Select at least {self.min_selections} options.", "error")) + if self.max_selections is not None and selected_count > self.max_selections: + return self.apply_validation((False, f"Select no more than {self.max_selections} options.", "error")) + return self.apply_validation((True, None, None)) -if __name__ == "__main__": - from python_toolkit.bhom_tkinter.bhom_base_window import BHoMBaseWindow - from python_toolkit.bhom_tkinter.widgets._packing_options import PackingOptions - - def on_selection(values): - """Print selected values in the standalone example.""" - print(f"Selected: {values}") - - root = BHoMBaseWindow() - parent_frame = root.content_frame - - widget = CheckboxSelection( - parent_frame, - fields=["Option A", "Option B", "Option C", "Option D", "Option E", "Option F", "Option G"], - command=on_selection, - defaults=["Option B", "Option D"], - orient="vertical", - max_per_line=6, - min_selections=2, - item_title="Choose Options", - helper_text="Select one or more options below:", - build_options=PackingOptions(padx=20, pady=20) - ) - widget.build() - - # Add control buttons for demonstration - control_frame = ttk.Frame(parent_frame) - control_frame.pack(padx=scale_pad(20), pady=scale_pad(10)) - - Button(control_frame, text="Select All", command=widget.select_all).pack(side="left", padx=scale_pad(5)) - Button(control_frame, text="Deselect All", command=widget.deselect_all).pack(side="left", padx=scale_pad(5)) - - root.mainloop() +if __name__ == "__main__": + from python_toolkit.bhom_tkinter.bhom_base_window import BHoMBaseWindow + from python_toolkit.bhom_tkinter.widgets._packing_options import PackingOptions + + def on_selection(values): + """Print selected values in the standalone example.""" + print(f"Selected: {values}") + + root = BHoMBaseWindow() + parent_frame = root.content_frame + + widget = CheckboxSelection( + parent_frame, + fields=["Option A", "Option B", "Option C", "Option D", "Option E", "Option F", "Option G"], + command=on_selection, + defaults=["Option B", "Option D"], + orient="vertical", + max_per_line=6, + min_selections=2, + item_title="Choose Options", + helper_text="Select one or more options below:", + build_options=PackingOptions(padx=20, pady=20), + ) + widget.build() + + # Add control buttons for demonstration + control_frame = ttk.Frame(parent_frame) + control_frame.pack(padx=scale_pad(20), pady=scale_pad(10)) + + from python_toolkit.bhom_tkinter.widgets.button import Button + + Button(control_frame, text="Select All", command=widget.select_all).pack(side="left", padx=scale_pad(5)) + Button(control_frame, text="Deselect All", command=widget.deselect_all).pack(side="left", padx=scale_pad(5)) + + root.mainloop() diff --git a/Python_Engine/Python/src/python_toolkit/bhom_tkinter/widgets/cmap_selector.py b/Python_Engine/Python/src/python_toolkit/bhom_tkinter/widgets/cmap_selector.py index 4d53594e..848709c5 100644 --- a/Python_Engine/Python/src/python_toolkit/bhom_tkinter/widgets/cmap_selector.py +++ b/Python_Engine/Python/src/python_toolkit/bhom_tkinter/widgets/cmap_selector.py @@ -1,20 +1,22 @@ """Colormap selector widget with embedded matplotlib preview.""" -from typing import Dict, List, Optional, Literal, Union -from tkinter import ttk import tkinter as tk +from tkinter import ttk +from typing import Literal, Union + import matplotlib as mpl from matplotlib.colors import Colormap, ListedColormap -from python_toolkit.plot.cmap_sample import cmap_sample_plot -from python_toolkit.bhom_tkinter.widgets.figure_container import FigureContainer -from python_toolkit.bhom_tkinter.widgets._widgets_base import BHoMBaseWidget -from python_toolkit.bhom_tkinter.widgets._packing_options import PackingOptions from python_toolkit.bhom.analytics import CONSOLE_LOGGER from python_toolkit.bhom_tkinter.theming.scaling import scale_pad +from python_toolkit.bhom_tkinter.widgets._packing_options import PackingOptions +from python_toolkit.bhom_tkinter.widgets._widgets_base import BHoMBaseWidget +from python_toolkit.bhom_tkinter.widgets.figure_container import FigureContainer +from python_toolkit.plot.cmap_sample import cmap_sample_plot # Accepted colormap input types for colormaps parameter and set()/add_cmap() -CmapInput = Union[str, Colormap, List[str]] +CmapInput = Union[str, Colormap, list[str]] + class CmapSelector(BHoMBaseWidget): """A widget for selecting and previewing a matplotlib colormap. @@ -72,16 +74,15 @@ class CmapSelector(BHoMBaseWidget): def __init__( self, parent: ttk.Frame, - colormaps: Optional[List[CmapInput]] = None, + colormaps: list[CmapInput] | None = None, cmap_set: str = "all", cmap_bins: int = 256, - default_cmap: Optional[CmapInput] = None, + default_cmap: CmapInput | None = None, plot_size: tuple[int, int] = (400, 50), dropdown_position: Literal["n", "e", "s", "w"] = "n", - **kwargs + **kwargs, ) -> None: - """ - Initialize the CmapSelector widget. + """Initialize the CmapSelector widget. Args: parent: Parent widget. @@ -106,7 +107,7 @@ def __init__( self.plot_size = plot_size # Registry of custom (non-matplotlib-named) colormaps: label → Colormap - self._custom_cmaps: Dict[str, Colormap] = {} + self._custom_cmaps: dict[str, Colormap] = {} # Create frame for cmap selection content self.cmap_frame = ttk.Frame(self.content_frame) @@ -114,7 +115,7 @@ def __init__( self.colormap_var = tk.StringVar(value="viridis") self._all_colormaps = self._get_all_colormaps() - self._preset_map: Dict[str, List[str]] = { + self._preset_map: dict[str, list[str]] = { "all": self._all_colormaps, "continuous": self._filter_available(self.CONTINUOUS_CMAPS), "categorical": self._filter_available(self.CATEGORICAL_CMAPS), @@ -155,7 +156,9 @@ def __init__( content, width=plot_size[0], height=plot_size[1], - build_options=PackingOptions(side=pack_side_figure, anchor=self._pack_anchor, fill=fill_mode, padx=0, pady=(0, 8)), + build_options=PackingOptions( + side=pack_side_figure, anchor=self._pack_anchor, fill=fill_mode, padx=0, pady=(0, 8) + ), ) self.figure_widget.build() @@ -172,7 +175,7 @@ def __init__( self._default_label = self._resolve_default_label(default_cmap, current_colormaps) self._select_default_cmap(current_colormaps) - def _get_all_colormaps(self) -> List[str]: + def _get_all_colormaps(self) -> list[str]: """Return all registered colormap names, including reversed variants. Returns: @@ -189,7 +192,7 @@ def _get_all_colormaps(self) -> List[str]: return sorted(all_names) - def _filter_available(self, names: List[str]) -> List[str]: + def _filter_available(self, names: list[str]) -> list[str]: """Filter a candidate list to names available in the current matplotlib build. Args: @@ -201,7 +204,7 @@ def _filter_available(self, names: List[str]) -> List[str]: available = set(self._all_colormaps) return [name for name in names if name in available] - def _with_reversed(self, names: List[str]) -> List[str]: + def _with_reversed(self, names: list[str]) -> list[str]: """Return colormap names with reversed variants next to base maps. Args: @@ -211,7 +214,7 @@ def _with_reversed(self, names: List[str]) -> List[str]: List[str]: Ordered list with available `_r` variants inserted. """ available = set(self._all_colormaps) - selected: List[str] = [] + selected: list[str] = [] for name in names: if name in available and name not in selected: selected.append(name) @@ -221,7 +224,7 @@ def _with_reversed(self, names: List[str]) -> List[str]: selected.append(reversed_name) return selected - def _preset_colormaps(self, cmap_set: str) -> List[str]: + def _preset_colormaps(self, cmap_set: str) -> list[str]: """Resolve a preset colormap set name to a colormap list. Args: @@ -233,7 +236,7 @@ def _preset_colormaps(self, cmap_set: str) -> List[str]: key = (cmap_set or "all").lower() return self._with_reversed(self._preset_map.get(key, self._preset_map["all"])) - def _resolve_colormaps(self, colormaps: List[CmapInput]) -> tuple[List[str], Dict[str, Colormap]]: + def _resolve_colormaps(self, colormaps: list[CmapInput]) -> tuple[list[str], dict[str, Colormap]]: """Normalise a mixed list of colormap inputs into display labels and a custom-cmap registry. Each item is handled as follows: @@ -248,8 +251,8 @@ def _resolve_colormaps(self, colormaps: List[CmapInput]) -> tuple[List[str], Dic Returns: tuple[List[str], Dict[str, Colormap]]: Ordered display label list and a mapping of label → Colormap for non-standard entries. """ - display_names: List[str] = [] - custom_cmaps: Dict[str, Colormap] = {} + display_names: list[str] = [] + custom_cmaps: dict[str, Colormap] = {} list_counter = 0 for item in colormaps: @@ -268,12 +271,15 @@ def _resolve_colormaps(self, colormaps: List[CmapInput]) -> tuple[List[str], Dic display_names.append(label) custom_cmaps[label] = cmap except Exception: - CONSOLE_LOGGER.warning(f"An error occurred when trying to convert a list of colours ({item}) to a `ListedColormap`. This cmap will not be available to select in UI.", exc_info=1) + CONSOLE_LOGGER.warning( + f"An error occurred when trying to convert a list of colours ({item}) to a `ListedColormap`. This cmap will not be available to select in UI.", + exc_info=1, + ) pass return display_names, custom_cmaps - def _unique_label(self, candidate: str, existing: List[str]) -> str: + def _unique_label(self, candidate: str, existing: list[str]) -> str: """Return a label that is unique within `existing`. Args: @@ -291,7 +297,7 @@ def _unique_label(self, candidate: str, existing: List[str]) -> str: counter += 1 return label - def _resolve_default_label(self, default: Optional[CmapInput], available: List[str]) -> Optional[str]: + def _resolve_default_label(self, default: CmapInput | None, available: list[str]) -> str | None: """Resolve a `default_cmap` value of any input type to a display label. Args: @@ -317,11 +323,11 @@ def _resolve_default_label(self, default: Optional[CmapInput], available: List[s return None - def _populate_cmap_list(self, colormaps: List[str]) -> None: + def _populate_cmap_list(self, colormaps: list[str]) -> None: """Replace the combobox options with the provided colormap names.""" self.cmap_combobox["values"] = tuple(colormaps) - def _select_default_cmap(self, colormaps: List[str]) -> None: + def _select_default_cmap(self, colormaps: list[str]) -> None: """Select an initial colormap and render its preview.""" if not colormaps: self.figure_widget.clear() @@ -354,11 +360,11 @@ def _update_cmap_sample(self, *args) -> None: # Use the stored Colormap object for custom entries; fall back to the # name string for standard matplotlib colormaps. - cmap: Union[str, Colormap] = self._custom_cmaps.get(name, name) + cmap: str | Colormap = self._custom_cmaps.get(name, name) fig = cmap_sample_plot(cmap, figsize=(self.plot_size[0] / 100, self.plot_size[1] / 100), bins=self.cmap_bins) self.figure_widget.embed_figure(fig) - def get_selected_cmap(self) -> Optional[Union[str, Colormap]]: + def get_selected_cmap(self) -> str | Colormap | None: """Return the currently selected colormap. Returns the `Colormap` object for custom entries or the name string @@ -373,7 +379,7 @@ def get_selected_cmap(self) -> Optional[Union[str, Colormap]]: return None return self._custom_cmaps.get(name, name) - def get(self) -> Optional[Union[str, Colormap]]: + def get(self) -> str | Colormap | None: """Return the currently selected colormap. * For standard matplotlib colormaps: returns the name string (backwards @@ -386,7 +392,7 @@ def get(self) -> Optional[Union[str, Colormap]]: """ return self.get_selected_cmap() - def get_cmap(self) -> Optional[Colormap]: + def get_cmap(self) -> Colormap | None: """Return the selected colormap always as a resolved `Colormap` object. Unlike `get()`, this method resolves named matplotlib colormaps to @@ -404,7 +410,7 @@ def get_cmap(self) -> Optional[Colormap]: return mpl.colormaps.get(name) - def add_cmap(self, cmap: CmapInput, label: Optional[str] = None) -> Optional[str]: + def add_cmap(self, cmap: CmapInput, label: str | None = None) -> str | None: """Dynamically add a new colormap entry to the selector. The new entry is appended to the combobox and becomes immediately @@ -435,11 +441,16 @@ def add_cmap(self, cmap: CmapInput, label: Optional[str] = None) -> Optional[str base = label or "custom" try: cmap = ListedColormap(cmap, name=base) - except Exception: #currently these are warnings, but maybe they should be replaced with raised exceptions? ValueError here and TypeError for the fallback. - CONSOLE_LOGGER.warning(f"List-like cmap ({cmap}) could not be added due to an error when converting to a `ListedColormap`.", exc_info=1) + except Exception: # currently these are warnings, but maybe they should be replaced with raised exceptions? ValueError here and TypeError for the fallback. + CONSOLE_LOGGER.warning( + f"List-like cmap ({cmap}) could not be added due to an error when converting to a `ListedColormap`.", + exc_info=1, + ) return None else: - CONSOLE_LOGGER.warning(f"Input of type {type(cmap)} was not a valid type for cmap. Expected a str, list or matplotlib Colormap") + CONSOLE_LOGGER.warning( + f"Input of type {type(cmap)} was not a valid type for cmap. Expected a str, list or matplotlib Colormap" + ) return None final_label = self._unique_label(base, existing) @@ -448,7 +459,7 @@ def add_cmap(self, cmap: CmapInput, label: Optional[str] = None) -> Optional[str self._populate_cmap_list(existing) return final_label - def set(self, value: Optional[CmapInput]) -> None: + def set(self, value: CmapInput | None) -> None: """Set the selected colormap. Accepts the same input types as `colormaps` list items: @@ -496,12 +507,15 @@ def set(self, value: Optional[CmapInput]) -> None: self._update_cmap_sample() return except Exception: - CONSOLE_LOGGER.debug("exception thrown when updating cmap sample from list value. visual cmap sample may be in invalid state?", exc_info=1) + CONSOLE_LOGGER.debug( + "exception thrown when updating cmap sample from list value. visual cmap sample may be in invalid state?", + exc_info=1, + ) pass self.figure_widget.clear() self.colormap_var.set("") - def validate(self) -> tuple[bool, Optional[str], Optional[Literal['info', 'warning', 'error']]]: + def validate(self) -> tuple[bool, str | None, Literal["info", "warning", "error"] | None]: """Validate the current colormap selection. Returns: @@ -515,11 +529,13 @@ def validate(self) -> tuple[bool, Optional[str], Optional[Literal['info', 'warni if name not in self.cmap_combobox["values"]: return self.apply_validation((False, f"Selected colormap '{name}' is not available.", "error")) return self.apply_validation((True, None, None)) - + + if __name__ == "__main__": - from python_toolkit.bhom_tkinter.bhom_base_window import BHoMBaseWindow from matplotlib.colors import LinearSegmentedColormap + from python_toolkit.bhom_tkinter.bhom_base_window import BHoMBaseWindow + root = BHoMBaseWindow() parent_container = root.content_frame @@ -541,9 +557,9 @@ def validate(self) -> tuple[bool, Optional[str], Optional[Literal['info', 'warni selector_colours = CmapSelector( parent_container, colormaps=[ - bhom_blues, # list of hex strings - ["red", "orange", "yellow", "green"], # list of named colours - "tab10", # mixed with a named cmap + bhom_blues, # list of hex strings + ["red", "orange", "yellow", "green"], # list of named colours + "tab10", # mixed with a named cmap ], default_cmap=bhom_blues, item_title="2. Colour lists", @@ -560,9 +576,9 @@ def validate(self) -> tuple[bool, Optional[str], Optional[Literal['info', 'warni selector_objects = CmapSelector( parent_container, colormaps=[ - custom_listed, # ListedColormap object - custom_linear, # LinearSegmentedColormap object - "coolwarm", # standard cmap alongside custom ones + custom_listed, # ListedColormap object + custom_linear, # LinearSegmentedColormap object + "coolwarm", # standard cmap alongside custom ones ], default_cmap=custom_linear, item_title="3. Colormap objects", @@ -602,8 +618,8 @@ def validate(self) -> tuple[bool, Optional[str], Optional[Literal['info', 'warni root.mainloop() # After mainloop — demonstrate get() vs get_cmap() return types - print("selector_strings.get() :", selector_strings.get()) # str - print("selector_colours.get() :", selector_colours.get()) # Colormap object - print("selector_objects.get() :", selector_objects.get()) # Colormap object - print("selector_preset.get() :", selector_preset.get()) # str - print("selector_preset.get_cmap():", selector_preset.get_cmap()) # Colormap object \ No newline at end of file + print("selector_strings.get() :", selector_strings.get()) # str + print("selector_colours.get() :", selector_colours.get()) # Colormap object + print("selector_objects.get() :", selector_objects.get()) # Colormap object + print("selector_preset.get() :", selector_preset.get()) # str + print("selector_preset.get_cmap():", selector_preset.get_cmap()) # Colormap object diff --git a/Python_Engine/Python/src/python_toolkit/bhom_tkinter/widgets/colour_picker.py b/Python_Engine/Python/src/python_toolkit/bhom_tkinter/widgets/colour_picker.py index 503b64b2..2064abf2 100644 --- a/Python_Engine/Python/src/python_toolkit/bhom_tkinter/widgets/colour_picker.py +++ b/Python_Engine/Python/src/python_toolkit/bhom_tkinter/widgets/colour_picker.py @@ -1,274 +1,275 @@ """Colour picker widget with themed popup and live RGB/hex preview.""" import tkinter as tk +from collections.abc import Callable from tkinter import ttk -from python_toolkit.bhom_tkinter.widgets.label import Label -from typing import Callable, Optional, Literal +from typing import Literal +from python_toolkit.bhom_tkinter.theming.scaling import scale, scale_pad from python_toolkit.bhom_tkinter.widgets._widgets_base import BHoMBaseWidget from python_toolkit.bhom_tkinter.widgets.button import Button -from python_toolkit.bhom_tkinter.theming.scaling import scale, scale_pad +from python_toolkit.bhom_tkinter.widgets.label import Label + class ColourPicker(BHoMBaseWidget): - """A simple colour picker widget where the swatch opens a themed colour dialog.""" - - def __init__( - self, - parent: ttk.Frame, - default_colour: str = "#ffffff", - swatch_width: int = 48, - swatch_height: int = 28, - command: Optional[Callable[[str], None]] = None, - **kwargs, - ) -> None: - """ - Args: - parent: Parent widget. - default_colour: Initial colour value in hex format. - swatch_width: Width of the clickable colour swatch in pixels. - swatch_height: Height of the clickable colour swatch in pixels. - command: Optional callback called with selected hex colour. - **kwargs: Additional Frame options. - """ - super().__init__(parent, **kwargs) - - self.command = command - self.colour_var = tk.StringVar(value=default_colour) - self.swatch_width = max(1, int(swatch_width)) - self.swatch_height = max(1, int(swatch_height)) - self._picker_window: Optional[tk.Toplevel] = None - self._popup_preview: Optional[tk.Canvas] = None - self._popup_swatch: Optional[int] = None - self._popup_hex_var: Optional[tk.StringVar] = None - self._popup_red_var: Optional[tk.IntVar] = None - self._popup_green_var: Optional[tk.IntVar] = None - self._popup_blue_var: Optional[tk.IntVar] = None - - controls = ttk.Frame(self.content_frame) - controls.pack(side="top", anchor=self._pack_anchor) - - self.preview = tk.Canvas( - controls, - width=self.swatch_width, - height=self.swatch_height, - highlightthickness=1, - cursor="hand2", - ) - self.preview.pack(anchor=self._pack_anchor) - self._swatch = self.preview.create_rectangle(0, 0, self.swatch_width, self.swatch_height, outline="#666666") - self.preview.bind("", lambda _event: self._select_colour()) - - self._update_preview(default_colour) - - def _select_colour(self) -> None: - """Open the themed colour picker popup.""" - if self._picker_window and self._picker_window.winfo_exists(): - self._picker_window.focus_force() - return - - current_colour = self.get() - red, green, blue = self._hex_to_rgb(current_colour) - - root_window = self.winfo_toplevel() - window = tk.Toplevel(root_window) - window.title("Select Colour") - window.transient(root_window) - window.resizable(False, False) - window.protocol("WM_DELETE_WINDOW", self._close_picker) - - self._picker_window = window - self._popup_red_var = tk.IntVar(value=red) - self._popup_green_var = tk.IntVar(value=green) - self._popup_blue_var = tk.IntVar(value=blue) - self._popup_hex_var = tk.StringVar(value=current_colour) - - container = ttk.Frame(window, padding=scale(10)) - container.pack(fill=tk.BOTH, expand=True) - - self._build_slider_row(container, "R", self._popup_red_var, 0) - self._build_slider_row(container, "G", self._popup_green_var, 1) - self._build_slider_row(container, "B", self._popup_blue_var, 2) - - hex_row = ttk.Frame(container) - hex_row.grid(row=3, column=0, sticky="ew", pady=scale_pad((8, 4))) - Label(hex_row, text="Hex").pack(side=tk.LEFT) - hex_entry = ttk.Entry(hex_row, textvariable=self._popup_hex_var, width=10) - hex_entry.pack(side=tk.LEFT, padx=scale_pad((8, 0))) - hex_entry.bind("", lambda _event: self._on_hex_entered()) - - preview_row = ttk.Frame(container) - preview_row.grid(row=4, column=0, sticky="w", pady=scale_pad((4, 8))) - Label(preview_row, text="Preview").pack(side=tk.LEFT) - self._popup_preview = tk.Canvas(preview_row, width=scale(48), height=scale(28), highlightthickness=1) - self._popup_preview.pack(side=tk.LEFT, padx=scale_pad((8, 0))) - self._popup_swatch = self._popup_preview.create_rectangle(0, 0, 48, 28, outline="#666666") - - button_row = ttk.Frame(container) - button_row.grid(row=5, column=0, sticky="e") - Button(button_row, text="Cancel", command=self._close_picker).pack(side=tk.LEFT, padx=scale_pad((0, 6))) - Button(button_row, text="Apply", command=self._apply_popup_colour).pack(side=tk.LEFT) - - container.columnconfigure(0, weight=1) - - self._on_rgb_changed() - window.grab_set() - hex_entry.focus_set() - - def _update_preview(self, colour: str) -> None: - """Render the selected colour in the preview swatch.""" - self.preview.itemconfig(self._swatch, fill=colour) - - def _build_slider_row(self, parent: ttk.Frame, label_text: str, value_var: tk.IntVar, row: int) -> None: - row_frame = ttk.Frame(parent) - row_frame.grid(row=row, column=0, sticky="ew", pady=scale_pad(2)) - - Label(row_frame, text=label_text).pack(side=tk.LEFT) - slider = ttk.Scale( - row_frame, - from_=0, - to=255, - orient=tk.HORIZONTAL, - style="ColourPicker.Horizontal.TScale", - command=lambda value, var=value_var: self._on_slider_move(var, value), - ) - slider.set(value_var.get()) - slider.pack(side=tk.LEFT, fill=tk.X, expand=True, padx=scale_pad((8, 8))) - value_label = Label(row_frame, textvariable=value_var, width=4, anchor="e") - value_label.pack(side=tk.LEFT) - - def _on_slider_move(self, value_var: tk.IntVar, value: str) -> None: - value_var.set(int(float(value))) - self._on_rgb_changed() - - def _on_rgb_changed(self) -> None: - if not (self._popup_red_var and self._popup_green_var and self._popup_blue_var and self._popup_hex_var): - return - - colour = self._rgb_to_hex(self._popup_red_var.get(), self._popup_green_var.get(), self._popup_blue_var.get()) - self._popup_hex_var.set(colour) - self._update_popup_preview(colour) - - def _on_hex_entered(self) -> None: - if not self._popup_hex_var: - return - - red, green, blue = self._hex_to_rgb(self._popup_hex_var.get()) - if self._popup_red_var and self._popup_green_var and self._popup_blue_var: - self._popup_red_var.set(red) - self._popup_green_var.set(green) - self._popup_blue_var.set(blue) - self._popup_hex_var.set(self._rgb_to_hex(red, green, blue)) - self._update_popup_preview(self._popup_hex_var.get()) - - def _update_popup_preview(self, colour: str) -> None: - if self._popup_preview and self._popup_swatch is not None: - self._popup_preview.itemconfig(self._popup_swatch, fill=colour) - - def _apply_popup_colour(self) -> None: - if not self._popup_hex_var: - return - - selected = self._rgb_to_hex(*self._hex_to_rgb(self._popup_hex_var.get())) - self.set(selected) - if self.command: - self.command(selected) - self._fire_on_change(selected) - self._close_picker() - - def _close_picker(self) -> None: - if self._picker_window and self._picker_window.winfo_exists(): - try: - self._picker_window.grab_release() - except tk.TclError: - pass - self._picker_window.destroy() - - self._picker_window = None - self._popup_preview = None - self._popup_swatch = None - self._popup_hex_var = None - self._popup_red_var = None - self._popup_green_var = None - self._popup_blue_var = None - - @staticmethod - def _rgb_to_hex(red: int, green: int, blue: int) -> str: - red = max(0, min(255, int(red))) - green = max(0, min(255, int(green))) - blue = max(0, min(255, int(blue))) - return f"#{red:02x}{green:02x}{blue:02x}" - - @staticmethod - def _hex_to_rgb(colour: str) -> tuple[int, int, int]: - value = (colour or "").strip().lstrip("#") - if len(value) == 3: - value = "".join(ch * 2 for ch in value) - if len(value) != 6: - return 255, 255, 255 - try: - return int(value[0:2], 16), int(value[2:4], 16), int(value[4:6], 16) - except ValueError: - return 255, 255, 255 - - def get(self) -> str: - """Return the currently selected hex colour. - - Returns: - str: Selected colour in hex format. - """ - return self.colour_var.get() - - def set(self, value: str) -> None: - """Set the current colour and refresh the preview swatch. - - Args: - value: Colour value in hex format. - """ - self.colour_var.set(value) - self._update_preview(value) - - def validate(self) -> tuple[bool, Optional[str], Optional[Literal['info', 'warning', 'error']]]: - """Validate the current colour value. - - Returns: - tuple[bool, Optional[str], Optional[Literal['info', 'warning', 'error']]]: - `(is_valid, message, severity)` where severity is `None` when - valid, or `"error"` for an invalid colour. - """ - colour = self.get() - if not colour: - return self.apply_validation((False, "No colour selected.", "error")) - stripped = colour.strip().lstrip("#") - if len(stripped) == 3: - stripped = "".join(ch * 2 for ch in stripped) - if len(stripped) != 6: - return self.apply_validation((False, f"Invalid colour value: '{colour}'.", "error")) - try: - int(stripped, 16) - except ValueError: - return self.apply_validation((False, f"Invalid colour value: '{colour}'.", "error")) - return self.apply_validation((True, None, None)) + """A simple colour picker widget where the swatch opens a themed colour dialog.""" + + def __init__( + self, + parent: ttk.Frame, + default_colour: str = "#ffffff", + swatch_width: int = 48, + swatch_height: int = 28, + command: Callable[[str], None] | None = None, + **kwargs, + ) -> None: + """Args: + parent: Parent widget. + default_colour: Initial colour value in hex format. + swatch_width: Width of the clickable colour swatch in pixels. + swatch_height: Height of the clickable colour swatch in pixels. + command: Optional callback called with selected hex colour. + **kwargs: Additional Frame options. + """ + super().__init__(parent, **kwargs) + + self.command = command + self.colour_var = tk.StringVar(value=default_colour) + self.swatch_width = max(1, int(swatch_width)) + self.swatch_height = max(1, int(swatch_height)) + self._picker_window: tk.Toplevel | None = None + self._popup_preview: tk.Canvas | None = None + self._popup_swatch: int | None = None + self._popup_hex_var: tk.StringVar | None = None + self._popup_red_var: tk.IntVar | None = None + self._popup_green_var: tk.IntVar | None = None + self._popup_blue_var: tk.IntVar | None = None + + controls = ttk.Frame(self.content_frame) + controls.pack(side="top", anchor=self._pack_anchor) + + self.preview = tk.Canvas( + controls, + width=self.swatch_width, + height=self.swatch_height, + highlightthickness=1, + cursor="hand2", + ) + self.preview.pack(anchor=self._pack_anchor) + self._swatch = self.preview.create_rectangle(0, 0, self.swatch_width, self.swatch_height, outline="#666666") + self.preview.bind("", lambda _event: self._select_colour()) + + self._update_preview(default_colour) + + def _select_colour(self) -> None: + """Open the themed colour picker popup.""" + if self._picker_window and self._picker_window.winfo_exists(): + self._picker_window.focus_force() + return + + current_colour = self.get() + red, green, blue = self._hex_to_rgb(current_colour) + + root_window = self.winfo_toplevel() + window = tk.Toplevel(root_window) + window.title("Select Colour") + window.transient(root_window) + window.resizable(False, False) + window.protocol("WM_DELETE_WINDOW", self._close_picker) + + self._picker_window = window + self._popup_red_var = tk.IntVar(value=red) + self._popup_green_var = tk.IntVar(value=green) + self._popup_blue_var = tk.IntVar(value=blue) + self._popup_hex_var = tk.StringVar(value=current_colour) + + container = ttk.Frame(window, padding=scale(10)) + container.pack(fill=tk.BOTH, expand=True) + + self._build_slider_row(container, "R", self._popup_red_var, 0) + self._build_slider_row(container, "G", self._popup_green_var, 1) + self._build_slider_row(container, "B", self._popup_blue_var, 2) + + hex_row = ttk.Frame(container) + hex_row.grid(row=3, column=0, sticky="ew", pady=scale_pad((8, 4))) + Label(hex_row, text="Hex").pack(side=tk.LEFT) + hex_entry = ttk.Entry(hex_row, textvariable=self._popup_hex_var, width=10) + hex_entry.pack(side=tk.LEFT, padx=scale_pad((8, 0))) + hex_entry.bind("", lambda _event: self._on_hex_entered()) + + preview_row = ttk.Frame(container) + preview_row.grid(row=4, column=0, sticky="w", pady=scale_pad((4, 8))) + Label(preview_row, text="Preview").pack(side=tk.LEFT) + self._popup_preview = tk.Canvas(preview_row, width=scale(48), height=scale(28), highlightthickness=1) + self._popup_preview.pack(side=tk.LEFT, padx=scale_pad((8, 0))) + self._popup_swatch = self._popup_preview.create_rectangle(0, 0, 48, 28, outline="#666666") + + button_row = ttk.Frame(container) + button_row.grid(row=5, column=0, sticky="e") + Button(button_row, text="Cancel", command=self._close_picker).pack(side=tk.LEFT, padx=scale_pad((0, 6))) + Button(button_row, text="Apply", command=self._apply_popup_colour).pack(side=tk.LEFT) + + container.columnconfigure(0, weight=1) + + self._on_rgb_changed() + window.grab_set() + hex_entry.focus_set() + + def _update_preview(self, colour: str) -> None: + """Render the selected colour in the preview swatch.""" + self.preview.itemconfig(self._swatch, fill=colour) + + def _build_slider_row(self, parent: ttk.Frame, label_text: str, value_var: tk.IntVar, row: int) -> None: + row_frame = ttk.Frame(parent) + row_frame.grid(row=row, column=0, sticky="ew", pady=scale_pad(2)) + + Label(row_frame, text=label_text).pack(side=tk.LEFT) + slider = ttk.Scale( + row_frame, + from_=0, + to=255, + orient=tk.HORIZONTAL, + style="ColourPicker.Horizontal.TScale", + command=lambda value, var=value_var: self._on_slider_move(var, value), + ) + slider.set(value_var.get()) + slider.pack(side=tk.LEFT, fill=tk.X, expand=True, padx=scale_pad((8, 8))) + value_label = Label(row_frame, textvariable=value_var, width=4, anchor="e") + value_label.pack(side=tk.LEFT) + + def _on_slider_move(self, value_var: tk.IntVar, value: str) -> None: + value_var.set(int(float(value))) + self._on_rgb_changed() + + def _on_rgb_changed(self) -> None: + if not (self._popup_red_var and self._popup_green_var and self._popup_blue_var and self._popup_hex_var): + return + + colour = self._rgb_to_hex(self._popup_red_var.get(), self._popup_green_var.get(), self._popup_blue_var.get()) + self._popup_hex_var.set(colour) + self._update_popup_preview(colour) + + def _on_hex_entered(self) -> None: + if not self._popup_hex_var: + return + + red, green, blue = self._hex_to_rgb(self._popup_hex_var.get()) + if self._popup_red_var and self._popup_green_var and self._popup_blue_var: + self._popup_red_var.set(red) + self._popup_green_var.set(green) + self._popup_blue_var.set(blue) + self._popup_hex_var.set(self._rgb_to_hex(red, green, blue)) + self._update_popup_preview(self._popup_hex_var.get()) + + def _update_popup_preview(self, colour: str) -> None: + if self._popup_preview and self._popup_swatch is not None: + self._popup_preview.itemconfig(self._popup_swatch, fill=colour) + + def _apply_popup_colour(self) -> None: + if not self._popup_hex_var: + return + + selected = self._rgb_to_hex(*self._hex_to_rgb(self._popup_hex_var.get())) + self.set(selected) + if self.command: + self.command(selected) + self._fire_on_change(selected) + self._close_picker() + + def _close_picker(self) -> None: + if self._picker_window and self._picker_window.winfo_exists(): + try: + self._picker_window.grab_release() + except tk.TclError: + pass + self._picker_window.destroy() + + self._picker_window = None + self._popup_preview = None + self._popup_swatch = None + self._popup_hex_var = None + self._popup_red_var = None + self._popup_green_var = None + self._popup_blue_var = None + + @staticmethod + def _rgb_to_hex(red: int, green: int, blue: int) -> str: + red = max(0, min(255, int(red))) + green = max(0, min(255, int(green))) + blue = max(0, min(255, int(blue))) + return f"#{red:02x}{green:02x}{blue:02x}" + + @staticmethod + def _hex_to_rgb(colour: str) -> tuple[int, int, int]: + value = (colour or "").strip().lstrip("#") + if len(value) == 3: + value = "".join(ch * 2 for ch in value) + if len(value) != 6: + return 255, 255, 255 + try: + return int(value[0:2], 16), int(value[2:4], 16), int(value[4:6], 16) + except ValueError: + return 255, 255, 255 + + def get(self) -> str: + """Return the currently selected hex colour. + + Returns: + str: Selected colour in hex format. + """ + return self.colour_var.get() + + def set(self, value: str) -> None: + """Set the current colour and refresh the preview swatch. + + Args: + value: Colour value in hex format. + """ + self.colour_var.set(value) + self._update_preview(value) + + def validate(self) -> tuple[bool, str | None, Literal["info", "warning", "error"] | None]: + """Validate the current colour value. + + Returns: + tuple[bool, Optional[str], Optional[Literal['info', 'warning', 'error']]]: + `(is_valid, message, severity)` where severity is `None` when + valid, or `"error"` for an invalid colour. + """ + colour = self.get() + if not colour: + return self.apply_validation((False, "No colour selected.", "error")) + stripped = colour.strip().lstrip("#") + if len(stripped) == 3: + stripped = "".join(ch * 2 for ch in stripped) + if len(stripped) != 6: + return self.apply_validation((False, f"Invalid colour value: '{colour}'.", "error")) + try: + int(stripped, 16) + except ValueError: + return self.apply_validation((False, f"Invalid colour value: '{colour}'.", "error")) + return self.apply_validation((True, None, None)) if __name__ == "__main__": - from python_toolkit.bhom_tkinter.bhom_base_window import BHoMBaseWindow - from python_toolkit.bhom_tkinter.widgets._packing_options import PackingOptions - - root = BHoMBaseWindow() - parent_container = root.content_frame - - def on_colour_changed(colour: str) -> None: - """Print selected colour in the standalone example.""" - print(f"Selected colour: {colour}") - - colour_picker = ColourPicker( - parent_container, - command=on_colour_changed, - item_title="Colour Picker", - helper_text="Pick a colour for plotting.", - alignment="center", - build_options=PackingOptions(padx=10, pady=10), - ) - colour_picker.build() - - root.mainloop() + from python_toolkit.bhom_tkinter.bhom_base_window import BHoMBaseWindow + from python_toolkit.bhom_tkinter.widgets._packing_options import PackingOptions + + root = BHoMBaseWindow() + parent_container = root.content_frame + + def on_colour_changed(colour: str) -> None: + """Print selected colour in the standalone example.""" + print(f"Selected colour: {colour}") + + colour_picker = ColourPicker( + parent_container, + command=on_colour_changed, + item_title="Colour Picker", + helper_text="Pick a colour for plotting.", + alignment="center", + build_options=PackingOptions(padx=10, pady=10), + ) + colour_picker.build() + + root.mainloop() diff --git a/Python_Engine/Python/src/python_toolkit/bhom_tkinter/widgets/drop_down_selection.py b/Python_Engine/Python/src/python_toolkit/bhom_tkinter/widgets/drop_down_selection.py index f5afb4dc..2a82ec32 100644 --- a/Python_Engine/Python/src/python_toolkit/bhom_tkinter/widgets/drop_down_selection.py +++ b/Python_Engine/Python/src/python_toolkit/bhom_tkinter/widgets/drop_down_selection.py @@ -1,157 +1,160 @@ """Dropdown selection widget built from ttk.Combobox.""" import tkinter as tk +from collections.abc import Callable from tkinter import ttk -from typing import Optional, Callable, List, Literal +from typing import Literal +from python_toolkit.bhom.logging import CONSOLE_LOGGER from python_toolkit.bhom_tkinter.widgets._widgets_base import BHoMBaseWidget + class DropDownSelection(BHoMBaseWidget): - """A reusable dropdown selection widget built from a list of options.""" - - def __init__( - self, - parent, - options: Optional[List[str]] = None, - command: Optional[Callable[[str], None]] = None, - default: Optional[str] = None, - width: int = 20, - state: str = "normal", - value_var: Optional[tk.StringVar] = None, - **kwargs): - """ - Args: - parent (tk.Widget): The parent widget. - options (list, optional): List of selectable options. - command (callable, optional): Called with selected value when changed. - default (str, optional): Default selected value. - width (int): Width of the dropdown widget in characters. - state (str): Combobox state ("normal", "readonly", or "disabled"). - item_title (str, optional): Optional header text shown at the top of the widget frame. - helper_text (str, optional): Optional helper text shown above the dropdown. - **kwargs: Additional Frame options. - """ - super().__init__(parent, **kwargs) - - self.options = [str(option) for option in (options or [])] - self.command = command - self.value_var = value_var or tk.StringVar() - - # Create the combobox in the content frame - self.combobox = ttk.Combobox( - self.content_frame, - textvariable=self.value_var, - values=self.options, - width=width, - state=state, - justify=self._text_justify, - ) - self.combobox.pack(side="top", fill="x") - - # Bind selection event - self.combobox.bind("<>", self._on_select) - - # Set default value - if default is not None and default in self.options: - self.set(default) - elif self.options: - self.value_var.set(self.options[0]) - - def _on_select(self, event=None): - """Handle selection change event. - - Args: - event: Tkinter event (optional). - """ - if self.command: - self.command(self.get()) - self._fire_on_change(self.get()) - - def get(self) -> str: - """Return the currently selected value. - - Returns: - str: Selected option value. - """ - return self.value_var.get() - - def set(self, value: str): - """Set the selected value. - - Args: - value: Option value to select. - """ - if value in self.options: - self.value_var.set(value) - else: - CONSOLE_LOGGER.warning("Selected value was not in the given options, and so was not set.") - - def set_options(self, options: List[str], default: Optional[str] = None): - """Replace the available options and optionally set a new default. - - Args: - options: New list of selectable options. - default: Optional value to select after updating options. - """ - self.options = [str(option) for option in (options or [])] - self.combobox['values'] = self.options - - if default is not None and default in self.options: - self.set(default) - elif self.options: - self.value_var.set(self.options[0]) - else: - self.value_var.set("") - - def get_selected_index(self) -> int: - """Return the index of the currently selected option. - - Returns: - int: Index of selected option, or -1 if not found. - """ - try: - return self.options.index(self.get()) - except ValueError: - return -1 - - def validate(self) -> tuple[bool, Optional[str], Optional[Literal['info', 'warning', 'error']]]: - """Validate the current selection. - - Returns: - tuple[bool, Optional[str], Optional[Literal['info', 'warning', 'error']]]: - `(is_valid, message, severity)` where severity is `None` when - valid, or `"error"` for an invalid selection. - """ - selected = self.get() - if not selected: - return getattr(self, "apply_validation")((False, "No option selected.", "error")) - if selected not in self.options: - return getattr(self, "apply_validation")((False, f"Selected option '{selected}' is not available.", "error")) - return getattr(self, "apply_validation")((True, None, None)) + """A reusable dropdown selection widget built from a list of options.""" + + def __init__( + self, + parent, + options: list[str] | None = None, + command: Callable[[str], None] | None = None, + default: str | None = None, + width: int = 20, + state: str = "normal", + value_var: tk.StringVar | None = None, + **kwargs, + ): + """Args: + parent (tk.Widget): The parent widget. + options (list, optional): List of selectable options. + command (callable, optional): Called with selected value when changed. + default (str, optional): Default selected value. + width (int): Width of the dropdown widget in characters. + state (str): Combobox state ("normal", "readonly", or "disabled"). + item_title (str, optional): Optional header text shown at the top of the widget frame. + helper_text (str, optional): Optional helper text shown above the dropdown. + **kwargs: Additional Frame options. + """ + super().__init__(parent, **kwargs) + + self.options = [str(option) for option in (options or [])] + self.command = command + self.value_var = value_var or tk.StringVar() + + # Create the combobox in the content frame + self.combobox = ttk.Combobox( + self.content_frame, + textvariable=self.value_var, + values=self.options, + width=width, + state=state, + justify=self._text_justify, + ) + self.combobox.pack(side="top", fill="x") + + # Bind selection event + self.combobox.bind("<>", self._on_select) + + # Set default value + if default is not None and default in self.options: + self.set(default) + elif self.options: + self.value_var.set(self.options[0]) + + def _on_select(self, event=None): + """Handle selection change event. + + Args: + event: Tkinter event (optional). + """ + if self.command: + self.command(self.get()) + self._fire_on_change(self.get()) + + def get(self) -> str: + """Return the currently selected value. + + Returns: + str: Selected option value. + """ + return self.value_var.get() + + def set(self, value: str): + """Set the selected value. + + Args: + value: Option value to select. + """ + if value in self.options: + self.value_var.set(value) + else: + CONSOLE_LOGGER.warning("Selected value was not in the given options, and so was not set.") + + def set_options(self, options: list[str], default: str | None = None): + """Replace the available options and optionally set a new default. + + Args: + options: New list of selectable options. + default: Optional value to select after updating options. + """ + self.options = [str(option) for option in (options or [])] + self.combobox["values"] = self.options + + if default is not None and default in self.options: + self.set(default) + elif self.options: + self.value_var.set(self.options[0]) + else: + self.value_var.set("") + + def get_selected_index(self) -> int: + """Return the index of the currently selected option. + + Returns: + int: Index of selected option, or -1 if not found. + """ + try: + return self.options.index(self.get()) + except ValueError: + return -1 + + def validate(self) -> tuple[bool, str | None, Literal["info", "warning", "error"] | None]: + """Validate the current selection. + + Returns: + tuple[bool, Optional[str], Optional[Literal['info', 'warning', 'error']]]: + `(is_valid, message, severity)` where severity is `None` when + valid, or `"error"` for an invalid selection. + """ + selected = self.get() + if not selected: + return self.apply_validation((False, "No option selected.", "error")) + if selected not in self.options: + return self.apply_validation((False, f"Selected option '{selected}' is not available.", "error")) + return self.apply_validation((True, None, None)) -if __name__ == "__main__": - from python_toolkit.bhom_tkinter.bhom_base_window import BHoMBaseWindow - from python_toolkit.bhom_tkinter.widgets._packing_options import PackingOptions - - def on_selection(value): - """Print selected value in the standalone example.""" - print(f"Selected: {value}") - - root = BHoMBaseWindow(theme_mode="light") - parent_frame = root.content_frame - - widget = DropDownSelection( - parent_frame, - options=["Option A", "Option B", "Option C", "Option D", "Option E"], - command=on_selection, - default="Option C", - width=30, - item_title="Choose an Option", - helper_text="Select one option from the dropdown list.", - alignment="center", - build_options=PackingOptions(padx=20, pady=20) - ) - widget.build() - - root.mainloop() +if __name__ == "__main__": + from python_toolkit.bhom_tkinter.bhom_base_window import BHoMBaseWindow + from python_toolkit.bhom_tkinter.widgets._packing_options import PackingOptions + + def on_selection(value): + """Print selected value in the standalone example.""" + print(f"Selected: {value}") + + root = BHoMBaseWindow(theme_mode="light") + parent_frame = root.content_frame + + widget = DropDownSelection( + parent_frame, + options=["Option A", "Option B", "Option C", "Option D", "Option E"], + command=on_selection, + default="Option C", + width=30, + item_title="Choose an Option", + helper_text="Select one option from the dropdown list.", + alignment="center", + build_options=PackingOptions(padx=20, pady=20), + ) + widget.build() + + root.mainloop() diff --git a/Python_Engine/Python/src/python_toolkit/bhom_tkinter/widgets/figure_container.py b/Python_Engine/Python/src/python_toolkit/bhom_tkinter/widgets/figure_container.py index 2cf03d89..7ea5a186 100644 --- a/Python_Engine/Python/src/python_toolkit/bhom_tkinter/widgets/figure_container.py +++ b/Python_Engine/Python/src/python_toolkit/bhom_tkinter/widgets/figure_container.py @@ -1,32 +1,30 @@ -"""Container widget for embedding matplotlib figures or image content.""" +"""Container widget for embedding matplotlib figures or image content.""" import tkinter as tk from tkinter import ttk -from python_toolkit.bhom_tkinter.widgets.label import Label -from typing import Optional, Any, Literal +from typing import Any, Literal + +import matplotlib.pyplot as plt from matplotlib.backends.backend_tkagg import FigureCanvasTkAgg from matplotlib.figure import Figure -import matplotlib.pyplot as plt -from python_toolkit.bhom_tkinter.widgets._widgets_base import BHoMBaseWidget -import matplotlib as mpl + from python_toolkit.bhom_tkinter.theming.scaling import scale +from python_toolkit.bhom_tkinter.widgets._widgets_base import BHoMBaseWidget +from python_toolkit.bhom_tkinter.widgets.label import Label class FigureContainer(BHoMBaseWidget): - """ - A reusable widget for embedding matplotlib figures and images. - """ + """A reusable widget for embedding matplotlib figures and images.""" def __init__( self, parent: ttk.Frame, auto_size: bool = False, - rigid_width: Optional[int] = None, - rigid_height: Optional[int] = None, - **kwargs + rigid_width: int | None = None, + rigid_height: int | None = None, + **kwargs, ) -> None: - """ - Initialize the FigureContainer widget. + """Initialize the FigureContainer widget. Args: parent: Parent widget @@ -47,14 +45,14 @@ def __init__( if self.rigid_height is not None: self.content_frame.config(height=self.rigid_height) - self.figure: Optional[Figure] = None - self.image: Optional[Any] = None - self.image_file: Optional[str] = None - self._original_pil_image: Optional[Any] = None + self.figure: Figure | None = None + self.image: Any | None = None + self.image_file: str | None = None + self._original_pil_image: Any | None = None - self.canvas: Optional[FigureCanvasTkAgg] = None - self.image_label: Optional[ttk.Label] = None - self._fit_after_id: Optional[str] = None + self.canvas: FigureCanvasTkAgg | None = None + self.image_label: ttk.Label | None = None + self._fit_after_id: str | None = None self._fit_attempts: int = 0 def _clear_children(self) -> None: @@ -149,6 +147,7 @@ def embed_image_file(self, file_path: str) -> None: self.image_file = file_path try: from PIL import Image, ImageTk + pil_image = Image.open(file_path) self._original_pil_image = pil_image self._close_held_figure() @@ -231,6 +230,7 @@ def _scale_image_to_fit_once(self): try: from PIL import Image, ImageTk + img_width, img_height = self._original_pil_image.size scale = min(frame_width / img_width, frame_height / img_height) new_width = int(img_width * scale) @@ -274,9 +274,11 @@ def set(self, value): elif isinstance(value, str): self.embed_image_file(value) else: - raise ValueError("Unsupported value type for FigureContainer. Must be Figure, PhotoImage, or file path string.") + raise ValueError( + "Unsupported value type for FigureContainer. Must be Figure, PhotoImage, or file path string." + ) - def validate(self) -> tuple[bool, Optional[str], Optional[Literal['info', 'warning', 'error']]]: + def validate(self) -> tuple[bool, str | None, Literal["info", "warning", "error"] | None]: """Validate the current content of the figure container.""" if self.figure is not None: return self.apply_validation((True, None, None)) @@ -287,9 +289,10 @@ def validate(self) -> tuple[bool, Optional[str], Optional[Literal['info', 'warni if __name__ == "__main__": import numpy as np + from python_toolkit.bhom_tkinter.bhom_base_window import BHoMBaseWindow - from python_toolkit.bhom_tkinter.widgets.validated_entry_box import ValidatedEntryBox from python_toolkit.bhom_tkinter.widgets._grid_options import GridOptions + from python_toolkit.bhom_tkinter.widgets.validated_entry_box import ValidatedEntryBox def make_plot(freq: float) -> Figure: x = np.linspace(0, 2 * np.pi, 300) diff --git a/Python_Engine/Python/src/python_toolkit/bhom_tkinter/widgets/label.py b/Python_Engine/Python/src/python_toolkit/bhom_tkinter/widgets/label.py index 244c6106..c5c3a234 100644 --- a/Python_Engine/Python/src/python_toolkit/bhom_tkinter/widgets/label.py +++ b/Python_Engine/Python/src/python_toolkit/bhom_tkinter/widgets/label.py @@ -1,6 +1,6 @@ -from tkinter import ttk import tkinter as tk -from typing import Optional, Literal +from tkinter import ttk +from typing import Literal from python_toolkit.bhom_tkinter.widgets._widgets_base import BHoMBaseWidget @@ -15,23 +15,24 @@ class Label(BHoMBaseWidget): """ def __init__( - self, - parent, - text: str = "", - item_title: Optional[str] = None, - helper_text: Optional[str] = None, - alignment: Optional[str] = None, - image=None, - style=None, - justify=None, - wraplength=None, - anchor=None, - width=None, - compound=None, - textvariable=None, - foreground=None, - font=None, - **kwargs): + self, + parent, + text: str = "", + item_title: str | None = None, + helper_text: str | None = None, + alignment: str | None = None, + image=None, + style=None, + justify=None, + wraplength=None, + anchor=None, + width=None, + compound=None, + textvariable=None, + foreground=None, + font=None, + **kwargs, + ): def resolve(explicit_value, key: str, default=None): fallback = kwargs.pop(key, default) return explicit_value if explicit_value is not None else fallback @@ -120,20 +121,19 @@ def set(self, value): self._image_ref = value self.label.configure(image=self._image_ref, text="") - def update_text(self, new_text: str): """Backward-compatible method name used previously to update label text.""" self.set(new_text) # Provide a generic `update` alias for convenience (matches previous API), # while remaining compatible with tkinter's parameterless `update()`. - def update(self, new_text: Optional[str] = None): + def update(self, new_text: str | None = None): if new_text is None: super().update() return self.update_text(new_text) - def validate(self) -> tuple[bool, Optional[str], Optional[Literal['info', 'warning', 'error']]]: + def validate(self) -> tuple[bool, str | None, Literal["info", "warning", "error"] | None]: """Validate the current content of the label. Returns: @@ -141,9 +141,8 @@ def validate(self) -> tuple[bool, Optional[str], Optional[Literal['info', 'warni `(is_valid, message, severity)` where severity is `None` when valid, or `"error"` for invalid content. """ - - #always true - return getattr(self, "apply_validation")((True, None, None)) + # always true + return self.apply_validation((True, None, None)) if __name__ == "__main__": @@ -153,10 +152,21 @@ def validate(self) -> tuple[bool, Optional[str], Optional[Literal['info', 'warni root = BHoMBaseWindow() parent_frame = root.content_frame - label_widget = Label(parent_frame, text="Hello, World!", build_options=PackingOptions(anchor="n", padx=10, pady=10), alignment="right") + label_widget = Label( + parent_frame, + text="Hello, World!", + build_options=PackingOptions(anchor="n", padx=10, pady=10), + alignment="right", + ) label_widget.build() - label_widget2 = Label(parent_frame, text="Warning: This is a BHoM warning label.", build_options=PackingOptions(anchor="n", padx=10, pady=10), alignment="left", style="Warning.TLabel") + label_widget2 = Label( + parent_frame, + text="Warning: This is a BHoM warning label.", + build_options=PackingOptions(anchor="n", padx=10, pady=10), + alignment="left", + style="Warning.TLabel", + ) label_widget2.build() - root.mainloop() \ No newline at end of file + root.mainloop() diff --git a/Python_Engine/Python/src/python_toolkit/bhom_tkinter/widgets/list_box.py b/Python_Engine/Python/src/python_toolkit/bhom_tkinter/widgets/list_box.py index 0493e0a2..e273cb2a 100644 --- a/Python_Engine/Python/src/python_toolkit/bhom_tkinter/widgets/list_box.py +++ b/Python_Engine/Python/src/python_toolkit/bhom_tkinter/widgets/list_box.py @@ -3,37 +3,38 @@ from __future__ import annotations import tkinter as tk -from tkinter import filedialog, ttk -from typing import Optional, Literal +from tkinter import ttk +from typing import Literal +from python_toolkit.bhom_tkinter.theming.scaling import scale_pad from python_toolkit.bhom_tkinter.widgets._widgets_base import BHoMBaseWidget from python_toolkit.bhom_tkinter.widgets.button import Button -from python_toolkit.bhom_tkinter.theming.scaling import scale_pad + class ScrollableListBox(BHoMBaseWidget): """A reusable listbox widget with auto-hiding scrollbar.""" def __init__( - self, - parent: ttk.Frame, - items=None, - selectmode=tk.MULTIPLE, - height=None, - width=None, - show_selection_controls=False, - **kwargs): - """ - Args: - parent (ttk.Frame): The parent widget. - items (list, optional): List of items to populate the listbox. - selectmode (str): Selection mode for the listbox (SINGLE, MULTIPLE, etc.). - height (int, optional): Height of the listbox. Defaults to number of items. - width (int, optional): Width of the listbox in characters. If None, listbox expands to fill available space. - show_selection_controls (bool): Show Select All and Deselect All buttons. - **kwargs: Additional Frame options. + self, + parent: ttk.Frame, + items=None, + selectmode=tk.MULTIPLE, + height=None, + width=None, + show_selection_controls=False, + **kwargs, + ): + """Args: + parent (ttk.Frame): The parent widget. + items (list, optional): List of items to populate the listbox. + selectmode (str): Selection mode for the listbox (SINGLE, MULTIPLE, etc.). + height (int, optional): Height of the listbox. Defaults to number of items. + width (int, optional): Width of the listbox in characters. If None, listbox expands to fill available space. + show_selection_controls (bool): Show Select All and Deselect All buttons. + **kwargs: Additional Frame options. """ super().__init__(parent, **kwargs) - + self.items = items or [] self._cached_options = [str(item) for item in self.items] self._cached_selection: list[str] = [] @@ -67,11 +68,11 @@ def __init__( self.listbox = tk.Listbox(self._lb_container, **listbox_options) self.listbox.pack(side=tk.LEFT, fill=tk.BOTH, expand=True) self.scrollbar.config(command=self.listbox.yview) - + # Populate with items for item in self.items: self.listbox.insert(tk.END, item) - + # Auto-hide scrollbar when not needed self.listbox.bind("", self._on_configure) self.listbox.bind("<>", self._on_selection_change) @@ -79,7 +80,6 @@ def __init__( self._on_configure() if show_selection_controls: - select_widget = Button(self.content_frame, text="Select All", command=self.select_all) select_widget.grid(row=1, column=0, sticky="ns", padx=scale_pad((0, 4)), pady=scale_pad((8, 0))) self.select_all_button = select_widget.button @@ -87,7 +87,7 @@ def __init__( deselect_widget = Button(self.content_frame, text="Deselect All", command=self.deselect_all) deselect_widget.grid(row=1, column=1, sticky="ns", padx=scale_pad((4, 0)), pady=scale_pad((8, 0))) self.deselect_all_button = deselect_widget.button - + def _on_configure(self, event=None): """Hide scrollbar if all items fit in the visible area.""" if self.listbox.size() <= int(self.listbox.cget("height")): @@ -127,7 +127,7 @@ def set_selections(self, items): if item in items: self.listbox.selection_set(index) self._sync_cache_from_widget() - + def get_selection(self): """Return a list of selected items. @@ -138,7 +138,7 @@ def get_selection(self): return list(self._cached_selection) selected_indices = self.listbox.curselection() return [self.listbox.get(i) for i in selected_indices] - + def get_selection_indices(self): """Return tuple of selected indices. @@ -158,7 +158,7 @@ def deselect_all(self): """Clear all selected items in the listbox.""" self.listbox.selection_clear(0, tk.END) self._sync_cache_from_widget() - + def insert(self, index, item): """Insert an item at the specified index. @@ -169,7 +169,7 @@ def insert(self, index, item): self.listbox.insert(index, item) self._sync_cache_from_widget() self._on_configure() - + def delete(self, index): """Delete an item at the specified index. @@ -179,7 +179,7 @@ def delete(self, index): self.listbox.delete(index) self._sync_cache_from_widget() self._on_configure() - + def clear(self): """Clear all items from the listbox.""" self.listbox.delete(0, tk.END) @@ -222,7 +222,7 @@ def set(self, value): self.listbox.activate(index) self.listbox.see(index) self._sync_cache_from_widget() - + def get(self): """Get all currently selected items. @@ -240,8 +240,8 @@ def get_options(self): if not self._is_listbox_alive(): return list(self._cached_options) return [self.listbox.get(i) for i in range(self.listbox.size())] - - def validate(self) -> tuple[bool, Optional[str], Optional[Literal['info', 'warning', 'error']]]: + + def validate(self) -> tuple[bool, str | None, Literal["info", "warning", "error"] | None]: """Validate the current listbox state. Returns: @@ -268,27 +268,28 @@ def _sync_items_from_listbox(self) -> None: """Synchronize cached items with the listbox contents.""" self._sync_cache_from_widget() -if __name__ == "__main__": +if __name__ == "__main__": from python_toolkit.bhom_tkinter.bhom_base_window import BHoMBaseWindow from python_toolkit.bhom_tkinter.widgets._packing_options import PackingOptions root = BHoMBaseWindow(theme_mode="light") parent_container = root.content_frame - + items = [f"Item {i}" for i in range(1, 21)] - root.widgets.append(ScrollableListBox( - parent_container, - items=items, - height=10, - show_selection_controls=True, - item_title="List Box", - helper_text="Select items from the list.", - build_options=PackingOptions(padx=10, pady=10) - )) + root.widgets.append( + ScrollableListBox( + parent_container, + items=items, + height=10, + show_selection_controls=True, + item_title="List Box", + helper_text="Select items from the list.", + build_options=PackingOptions(padx=10, pady=10), + ) + ) root.widgets[-1].build() - root.mainloop() - - print("Selected items:", root.widgets[-1].get()) \ No newline at end of file + + print("Selected items:", root.widgets[-1].get()) diff --git a/Python_Engine/Python/src/python_toolkit/bhom_tkinter/widgets/path_selector.py b/Python_Engine/Python/src/python_toolkit/bhom_tkinter/widgets/path_selector.py index 6e9e7329..fc6d69d7 100644 --- a/Python_Engine/Python/src/python_toolkit/bhom_tkinter/widgets/path_selector.py +++ b/Python_Engine/Python/src/python_toolkit/bhom_tkinter/widgets/path_selector.py @@ -1,39 +1,40 @@ """Path selection widget for file or directory browsing.""" import tkinter as tk -from tkinter import filedialog, ttk from pathlib import Path -from typing import Optional, Literal +from tkinter import filedialog, ttk +from typing import Literal +from python_toolkit.bhom_tkinter.theming.scaling import scale_pad from python_toolkit.bhom_tkinter.widgets._widgets_base import BHoMBaseWidget from python_toolkit.bhom_tkinter.widgets.button import Button -from python_toolkit.bhom_tkinter.theming.scaling import scale_pad + class PathSelector(BHoMBaseWidget): """A reusable path/file selector widget with a button and a readonly entry.""" def __init__( - self, - parent: ttk.Frame, - button_text="Browse...", - filetypes=None, - command=None, - initialdir=None, - entry_width=40, - button_width=25, - mode="file", - **kwargs): - """ - Args: - parent (tk.Widget): The parent widget. - button_text (str): The text to display on the button. - filetypes (list, optional): List of filetypes for the dialog. - command (callable, optional): Called with the file path after selection. - initialdir (str, optional): Initial directory for the file dialog. - mode (str): Either "file" or "directory" to select files or directories. - item_title (str, optional): Optional header text shown at the top of the widget frame. - helper_text (str, optional): Optional helper text shown above the entry box. - **kwargs: Additional Frame options. + self, + parent: ttk.Frame, + button_text="Browse...", + filetypes=None, + command=None, + initialdir=None, + entry_width=40, + button_width=25, + mode="file", + **kwargs, + ): + """Args: + parent (tk.Widget): The parent widget. + button_text (str): The text to display on the button. + filetypes (list, optional): List of filetypes for the dialog. + command (callable, optional): Called with the file path after selection. + initialdir (str, optional): Initial directory for the file dialog. + mode (str): Either "file" or "directory" to select files or directories. + item_title (str, optional): Optional header text shown at the top of the widget frame. + helper_text (str, optional): Optional helper text shown above the entry box. + **kwargs: Additional Frame options. """ super().__init__(parent, **kwargs) self.path_var = tk.StringVar() @@ -51,14 +52,9 @@ def __init__( def _on_click(self): if self.mode == "directory": - path = filedialog.askdirectory( - initialdir=self.initialdir - ) + path = filedialog.askdirectory(initialdir=self.initialdir) else: - path = filedialog.askopenfilename( - filetypes=self.filetypes, - initialdir=self.initialdir - ) + path = filedialog.askopenfilename(filetypes=self.filetypes, initialdir=self.initialdir) if path: selected_path = Path(path) self.path_var.set(str(selected_path)) @@ -73,8 +69,8 @@ def get(self) -> str: str: Selected file or directory path. """ return self.path_var.get() - - def set(self, value: Optional[str]): + + def set(self, value: str | None): """Set the file path in the entry. Args: @@ -86,7 +82,7 @@ def set(self, value: Optional[str]): self.path_var.set(str(Path(value))) - def validate(self) -> tuple[bool, Optional[str], Optional[Literal['info', 'warning', 'error']]]: + def validate(self) -> tuple[bool, str | None, Literal["info", "warning", "error"] | None]: """Validate the currently selected path. Returns: @@ -110,7 +106,6 @@ def validate(self) -> tuple[bool, Optional[str], Optional[Literal['info', 'warni if __name__ == "__main__": - from python_toolkit.bhom_tkinter.bhom_base_window import BHoMBaseWindow from python_toolkit.bhom_tkinter.widgets._packing_options import PackingOptions @@ -122,17 +117,17 @@ def on_file_selected(path): print(f"Selected: {path}") path_selector = PathSelector( - parent_container, - button_text="Select File", - filetypes=[("All Files", "*.*")], + parent_container, + button_text="Select File", + filetypes=[("All Files", "*.*")], command=on_file_selected, item_title="Path Selector", helper_text="Select a file from your system.", build_options=PackingOptions(padx=20, pady=20), button_width=15, entry_width=50, - alignment="center" + alignment="center", ) path_selector.build() - root.mainloop() \ No newline at end of file + root.mainloop() diff --git a/Python_Engine/Python/src/python_toolkit/bhom_tkinter/widgets/radio_selection.py b/Python_Engine/Python/src/python_toolkit/bhom_tkinter/widgets/radio_selection.py index 95c573d7..1ae5e643 100644 --- a/Python_Engine/Python/src/python_toolkit/bhom_tkinter/widgets/radio_selection.py +++ b/Python_Engine/Python/src/python_toolkit/bhom_tkinter/widgets/radio_selection.py @@ -2,202 +2,202 @@ import tkinter as tk from tkinter import ttk -from typing import Optional, Literal +from typing import Literal -from python_toolkit.bhom_tkinter.widgets._widgets_base import BHoMBaseWidget from python_toolkit.bhom_tkinter.theming.scaling import scale_pad +from python_toolkit.bhom_tkinter.widgets._widgets_base import BHoMBaseWidget + class RadioSelection(BHoMBaseWidget): - """A reusable radio selection widget built from a list of fields.""" - - def __init__( - self, - parent, - fields=None, - command=None, - default=None, - orient="vertical", - options_fill_extents: bool = False, - max_per_line=None, - **kwargs): - """ - Args: - parent (tk.Widget): The parent widget. - fields (list, optional): List of selectable fields. - command (callable, optional): Called with selected value when changed. - default (str, optional): Default selected value. - orient (str): Either "vertical" or "horizontal". - options_fill_extents (bool): If `True`, radio option rows expand to - fill their available width in the options frame. - max_per_line (int, optional): Maximum items per row/column before wrapping. - item_title (str, optional): Optional header text shown at the top of the widget frame. - helper_text (str, optional): Optional helper text shown above the entry box. - **kwargs: Additional Frame options. - """ - super().__init__(parent, **kwargs) - - self.fields = [str(field) for field in (fields or [])] - self.command = command - self.orient = orient.lower() - self.options_fill_extents = self._normalise_bool(options_fill_extents) - self.max_per_line = max_per_line - self.value_var = tk.StringVar() - self._buttons = [] - - # Sub-frame for radio button controls - self.buttons_frame = ttk.Frame(self.content_frame) - if self.options_fill_extents: - self.buttons_frame.pack(side="top", fill="x", expand=True) - else: - self.buttons_frame.pack(side="top", anchor=self._pack_anchor) - - self._build_buttons() - - if default is not None: - self.set(default) - elif self.fields: - self.value_var.set(self.fields[0]) - - def _build_buttons(self): - """Create radio buttons from current fields.""" - for button in self._buttons: - button.destroy() - self._buttons.clear() - for index in range(self.buttons_frame.grid_size()[0] + 1): - self.buttons_frame.grid_columnconfigure(index, weight=0) - - for index, field in enumerate(self.fields): - sticky = self._grid_sticky - button = ttk.Radiobutton( - self.buttons_frame, - text=field, - variable=self.value_var, - value=field, - style="Radio.TRadiobutton", - command=lambda f=field: self._select_field(f), - ) - self.align_child_text(button) - - if self.max_per_line and self.max_per_line > 0: - if self.orient == "horizontal": - row = index // self.max_per_line - column = index % self.max_per_line - else: - row = index % self.max_per_line - column = index // self.max_per_line - button.grid( - row=row, - column=column, - padx=scale_pad((0, 10)), - pady=scale_pad((0, 4)), - sticky=("ew" if self.options_fill_extents else sticky), - ) - if self.options_fill_extents: - self.buttons_frame.grid_columnconfigure(column, weight=1) - elif self.orient == "horizontal": - button.grid( - row=0, - column=index, - padx=scale_pad((0, 10)), - pady=scale_pad((0, 4)), - sticky=("ew" if self.options_fill_extents else sticky), - ) - if self.options_fill_extents: - self.buttons_frame.grid_columnconfigure(index, weight=1) - else: - button.grid( - row=index, - column=0, - padx=scale_pad((0, 10)), - pady=scale_pad((0, 4)), - sticky=("ew" if self.options_fill_extents else sticky), - ) - if self.options_fill_extents: - self.buttons_frame.grid_columnconfigure(0, weight=1) - self._buttons.append(button) - - def _select_field(self, field): - """Handle radio button selection.""" - if self.command: - self.command(self.get()) - self._fire_on_change(self.get()) - - def get(self): - """Return the currently selected value. - - Returns: - str: Currently selected field label. - """ - return self.value_var.get() - - def set(self, value): - """Set the selected value if it exists in fields. - - Args: - value: Field label to select. - """ - value = str(value) - if value in self.fields: - self.value_var.set(value) - - def set_fields(self, fields, default=None): - """Replace the available fields and rebuild the widget. - - Args: - fields: New available field names. - default: Optional default field to select. - """ - self.fields = [str(field) for field in (fields or [])] - self._build_buttons() - - if default is not None: - self.set(default) - elif self.fields: - self.value_var.set(self.fields[0]) - else: - self.value_var.set("") - - def validate(self) -> tuple[bool, Optional[str], Optional[Literal['info', 'warning', 'error']]]: - """Validate the currently selected radio option. - - Returns: - tuple[bool, Optional[str], Optional[Literal['info', 'warning', 'error']]]: - `(is_valid, message, severity)` where severity is `None` when - valid, or `"error"` for an invalid selection. - """ - selected = self.get() - if not selected: - return self.apply_validation((False, "No option selected.", "error")) - if selected not in self.fields: - return self.apply_validation((False, f"Selected option '{selected}' is not available.", "error")) - return self.apply_validation((True, None, None)) + """A reusable radio selection widget built from a list of fields.""" + + def __init__( + self, + parent, + fields=None, + command=None, + default=None, + orient="vertical", + options_fill_extents: bool = False, + max_per_line=None, + **kwargs, + ): + """Args: + parent (tk.Widget): The parent widget. + fields (list, optional): List of selectable fields. + command (callable, optional): Called with selected value when changed. + default (str, optional): Default selected value. + orient (str): Either "vertical" or "horizontal". + options_fill_extents (bool): If `True`, radio option rows expand to + fill their available width in the options frame. + max_per_line (int, optional): Maximum items per row/column before wrapping. + item_title (str, optional): Optional header text shown at the top of the widget frame. + helper_text (str, optional): Optional helper text shown above the entry box. + **kwargs: Additional Frame options. + """ + super().__init__(parent, **kwargs) + + self.fields = [str(field) for field in (fields or [])] + self.command = command + self.orient = orient.lower() + self.options_fill_extents = self._normalise_bool(options_fill_extents) + self.max_per_line = max_per_line + self.value_var = tk.StringVar() + self._buttons = [] + + # Sub-frame for radio button controls + self.buttons_frame = ttk.Frame(self.content_frame) + if self.options_fill_extents: + self.buttons_frame.pack(side="top", fill="x", expand=True) + else: + self.buttons_frame.pack(side="top", anchor=self._pack_anchor) + + self._build_buttons() + + if default is not None: + self.set(default) + elif self.fields: + self.value_var.set(self.fields[0]) + + def _build_buttons(self): + """Create radio buttons from current fields.""" + for button in self._buttons: + button.destroy() + self._buttons.clear() + for index in range(self.buttons_frame.grid_size()[0] + 1): + self.buttons_frame.grid_columnconfigure(index, weight=0) + + for index, field in enumerate(self.fields): + sticky = self._grid_sticky + button = ttk.Radiobutton( + self.buttons_frame, + text=field, + variable=self.value_var, + value=field, + style="Radio.TRadiobutton", + command=lambda f=field: self._select_field(f), + ) + self.align_child_text(button) + + if self.max_per_line and self.max_per_line > 0: + if self.orient == "horizontal": + row = index // self.max_per_line + column = index % self.max_per_line + else: + row = index % self.max_per_line + column = index // self.max_per_line + button.grid( + row=row, + column=column, + padx=scale_pad((0, 10)), + pady=scale_pad((0, 4)), + sticky=("ew" if self.options_fill_extents else sticky), + ) + if self.options_fill_extents: + self.buttons_frame.grid_columnconfigure(column, weight=1) + elif self.orient == "horizontal": + button.grid( + row=0, + column=index, + padx=scale_pad((0, 10)), + pady=scale_pad((0, 4)), + sticky=("ew" if self.options_fill_extents else sticky), + ) + if self.options_fill_extents: + self.buttons_frame.grid_columnconfigure(index, weight=1) + else: + button.grid( + row=index, + column=0, + padx=scale_pad((0, 10)), + pady=scale_pad((0, 4)), + sticky=("ew" if self.options_fill_extents else sticky), + ) + if self.options_fill_extents: + self.buttons_frame.grid_columnconfigure(0, weight=1) + self._buttons.append(button) + + def _select_field(self, field): + """Handle radio button selection.""" + if self.command: + self.command(self.get()) + self._fire_on_change(self.get()) + + def get(self): + """Return the currently selected value. + + Returns: + str: Currently selected field label. + """ + return self.value_var.get() + + def set(self, value): + """Set the selected value if it exists in fields. + + Args: + value: Field label to select. + """ + value = str(value) + if value in self.fields: + self.value_var.set(value) + + def set_fields(self, fields, default=None): + """Replace the available fields and rebuild the widget. + + Args: + fields: New available field names. + default: Optional default field to select. + """ + self.fields = [str(field) for field in (fields or [])] + self._build_buttons() + + if default is not None: + self.set(default) + elif self.fields: + self.value_var.set(self.fields[0]) + else: + self.value_var.set("") + + def validate(self) -> tuple[bool, str | None, Literal["info", "warning", "error"] | None]: + """Validate the currently selected radio option. + + Returns: + tuple[bool, Optional[str], Optional[Literal['info', 'warning', 'error']]]: + `(is_valid, message, severity)` where severity is `None` when + valid, or `"error"` for an invalid selection. + """ + selected = self.get() + if not selected: + return self.apply_validation((False, "No option selected.", "error")) + if selected not in self.fields: + return self.apply_validation((False, f"Selected option '{selected}' is not available.", "error")) + return self.apply_validation((True, None, None)) if __name__ == "__main__": - - from python_toolkit.bhom_tkinter.bhom_base_window import BHoMBaseWindow - from python_toolkit.bhom_tkinter.widgets._packing_options import PackingOptions - - def on_selection(value): - """Print selected option in the standalone example.""" - print(f"Selected: {value}") - - root = BHoMBaseWindow() - parent_frame = root.content_frame - - widget = RadioSelection( - parent_frame, - fields=["Option A", "Option B", "Option C"], - command=on_selection, - default="Option B", - alignment="center", - options_fill_extents=True, - orient="horizontal", - max_per_line=3, - item_title="Choose an Option", - helper_text="Select one of the options below:", - build_options=PackingOptions(pady=20) - ) - widget.build() - - root.mainloop() + from python_toolkit.bhom_tkinter.bhom_base_window import BHoMBaseWindow + from python_toolkit.bhom_tkinter.widgets._packing_options import PackingOptions + + def on_selection(value): + """Print selected option in the standalone example.""" + print(f"Selected: {value}") + + root = BHoMBaseWindow() + parent_frame = root.content_frame + + widget = RadioSelection( + parent_frame, + fields=["Option A", "Option B", "Option C"], + command=on_selection, + default="Option B", + alignment="center", + options_fill_extents=True, + orient="horizontal", + max_per_line=3, + item_title="Choose an Option", + helper_text="Select one of the options below:", + build_options=PackingOptions(pady=20), + ) + widget.build() + + root.mainloop() diff --git a/Python_Engine/Python/src/python_toolkit/bhom_tkinter/widgets/searchable_list_box.py b/Python_Engine/Python/src/python_toolkit/bhom_tkinter/widgets/searchable_list_box.py index cec23f55..1afed764 100644 --- a/Python_Engine/Python/src/python_toolkit/bhom_tkinter/widgets/searchable_list_box.py +++ b/Python_Engine/Python/src/python_toolkit/bhom_tkinter/widgets/searchable_list_box.py @@ -6,14 +6,15 @@ import re import sys import tkinter as tk +from collections.abc import Callable, Iterable from tkinter import ttk -from typing import Callable, Iterable, List, Literal, Optional +from typing import Literal from python_toolkit.bhom_tkinter.widgets._packing_options import PackingOptions from python_toolkit.bhom_tkinter.widgets._widgets_base import BHoMBaseWidget from python_toolkit.bhom_tkinter.widgets.list_box import ScrollableListBox -Scorer = Callable[[str, str], Optional[float]] # (query, item) -> score (higher is better), or None for no match +Scorer = Callable[[str, str], float | None] # (query, item) -> score (higher is better), or None for no match _NON_ALNUM = re.compile(r"[\W_]+") _BHOM_SEARCH = None # (Compute, Scorer) from the BHoM Search_Engine, loaded on first use @@ -35,7 +36,7 @@ def _load_bhom_search(): return _BHOM_SEARCH -def default_scorer(query: str, text: str, min_score: float = 75) -> Optional[float]: +def default_scorer(query: str, text: str, min_score: float = 75) -> float | None: """Score how well `query` matches `text` using the BHoM Search_Engine fuzzy match, or None if it is a weak match. Uses BH.Engine.Search.Compute.MatchScore with the WeightedRatio scorer. Case and punctuation are ignored. @@ -64,41 +65,41 @@ class SearchableListBox(BHoMBaseWidget): """ def __init__( - self, - parent: ttk.Frame, - items=None, - selectmode=tk.MULTIPLE, - height: int = 8, - width: Optional[int] = None, - show_selection_controls: bool = False, - keep_hidden_selection: bool = True, - show_summary: Optional[bool] = None, - filter_label: str = "Filter", - scorer: Scorer = default_scorer, - **kwargs): - """ - Args: - parent (ttk.Frame): The parent widget. - items (list, optional): Items to choose from. - selectmode (str): tk.MULTIPLE / tk.EXTENDED for multi-select, tk.SINGLE / tk.BROWSE for one item. - height (int): Visible rows in the list. - width (int, optional): Width of the list in characters. If None, it expands to fill the space. - show_selection_controls (bool): Show Select All / Deselect All buttons. They act on the items - currently shown by the filter. - keep_hidden_selection (bool): Keep items selected while the filter hides them. If False, the - selection is limited to the visible items each time the filter changes. - show_summary (bool, optional): Show a caption listing the selected items. Defaults to True for - multi-select lists. - filter_label (str): Caption shown above the filter entry. - scorer (Callable): Called as scorer(query, item); returns a score (higher ranks first) or None to - hide the item. Defaults to the BHoM Search_Engine fuzzy match. - **kwargs: Additional BHoMBaseWidget / Frame options (id, item_title, helper_text, on_change, ...). + self, + parent: ttk.Frame, + items=None, + selectmode=tk.MULTIPLE, + height: int = 8, + width: int | None = None, + show_selection_controls: bool = False, + keep_hidden_selection: bool = True, + show_summary: bool | None = None, + filter_label: str = "Filter", + scorer: Scorer = default_scorer, + **kwargs, + ): + """Args: + parent (ttk.Frame): The parent widget. + items (list, optional): Items to choose from. + selectmode (str): tk.MULTIPLE / tk.EXTENDED for multi-select, tk.SINGLE / tk.BROWSE for one item. + height (int): Visible rows in the list. + width (int, optional): Width of the list in characters. If None, it expands to fill the space. + show_selection_controls (bool): Show Select All / Deselect All buttons. They act on the items + currently shown by the filter. + keep_hidden_selection (bool): Keep items selected while the filter hides them. If False, the + selection is limited to the visible items each time the filter changes. + show_summary (bool, optional): Show a caption listing the selected items. Defaults to True for + multi-select lists. + filter_label (str): Caption shown above the filter entry. + scorer (Callable): Called as scorer(query, item); returns a score (higher ranks first) or None to + hide the item. Defaults to the BHoM Search_Engine fuzzy match. + **kwargs: Additional BHoMBaseWidget / Frame options (id, item_title, helper_text, on_change, ...). """ super().__init__(parent, **kwargs) self.scorer = scorer - self._all_items: List[str] = [str(item) for item in (items or [])] - self._shown: List[str] = list(self._all_items) + self._all_items: list[str] = [str(item) for item in (items or [])] + self._shown: list[str] = list(self._all_items) self._multi = selectmode in (tk.MULTIPLE, tk.EXTENDED, "multiple", "extended") self._keep_hidden = bool(keep_hidden_selection) self._selected: set[str] = set() @@ -132,27 +133,31 @@ def __init__( controls.columnconfigure(0, weight=1) controls.columnconfigure(1, weight=1) ttk.Button(controls, text="Select All", command=self.select_all).grid( - row=0, column=0, sticky="ew", padx=(0, 4)) + row=0, column=0, sticky="ew", padx=(0, 4) + ) ttk.Button(controls, text="Deselect All", command=self.deselect_all).grid( - row=0, column=1, sticky="ew", padx=(4, 0)) + row=0, column=1, sticky="ew", padx=(4, 0) + ) - self.summary_label: Optional[ttk.Label] = None + self.summary_label: ttk.Label | None = None if self._show_summary: self.summary_label = ttk.Label(self.content_frame, text="", style="Caption.TLabel", justify="left") self.summary_label.pack(side="top", anchor=self._pack_anchor, pady=(4, 0)) self.content_frame.bind( - "", lambda e: self.summary_label.configure(wraplength=max(e.width - 4, 100)), add="+") + "", lambda e: self.summary_label.configure(wraplength=max(e.width - 4, 100)), add="+" + ) self._update_summary() # ------------------------------------------------------------------ internals - def _matching(self, query: str) -> List[str]: + def _matching(self, query: str) -> list[str]: query = query.strip().lower() if not query: return list(self._all_items) scored = [(self.scorer(query, item), index, item) for index, item in enumerate(self._all_items)] - return [item for score, index, item in sorted((s for s in scored if s[0] is not None), - key=lambda s: (-s[0], s[1]))] + return [ + item for score, index, item in sorted((s for s in scored if s[0] is not None), key=lambda s: (-s[0], s[1])) + ] def _apply_filter(self) -> None: shown = self._matching(self.filter_var.get()) @@ -193,11 +198,11 @@ def _update_summary(self) -> None: # ------------------------------------------------------------------ public API - def get(self) -> List[str]: + def get(self) -> list[str]: """Return all selected items (including any hidden by the filter), in item order.""" return [item for item in self._all_items if item in self._selected] - def get_selection(self) -> List[str]: + def get_selection(self) -> list[str]: """Alias of get() for parity with ScrollableListBox.""" return self.get() @@ -217,11 +222,11 @@ def set(self, value) -> None: self._update_summary() self._fire_on_change(self.get()) - def get_options(self) -> List[str]: + def get_options(self) -> list[str]: """Return every item, whatever the filter shows.""" return list(self._all_items) - def get_visible(self) -> List[str]: + def get_visible(self) -> list[str]: """Return the items currently shown by the filter.""" return list(self._shown) @@ -265,20 +270,22 @@ def clear(self) -> None: self._update_summary() self._fire_on_change(self.get()) - def validate(self) -> tuple[bool, Optional[str], Optional[Literal['info', 'warning', 'error']]]: + def validate(self) -> tuple[bool, str | None, Literal["info", "warning", "error"] | None]: """All states are valid unless a custom validation says otherwise.""" return self.apply_validation((True, None, None)) if __name__ == "__main__": - from python_toolkit.bhom_tkinter.bhom_base_window import BHoMBaseWindow root = BHoMBaseWindow(title="SearchableListBox demo", theme_mode="light") widget = SearchableListBox( root.content_frame, - items=[f"{city}_{kind}.epw" for city in ["London", "Birmingham", "Manchester", "Glasgow", "Belfast", "Cardiff"] - for kind in ["TRY", "DSY1", "DSY2", "DSY3"]], + items=[ + f"{city}_{kind}.epw" + for city in ["London", "Birmingham", "Manchester", "Glasgow", "Belfast", "Cardiff"] + for kind in ["TRY", "DSY1", "DSY2", "DSY3"] + ], height=8, width=40, show_selection_controls=True, diff --git a/Python_Engine/Python/src/python_toolkit/bhom_tkinter/widgets/spinbox.py b/Python_Engine/Python/src/python_toolkit/bhom_tkinter/widgets/spinbox.py index e29e29e2..e59344be 100644 --- a/Python_Engine/Python/src/python_toolkit/bhom_tkinter/widgets/spinbox.py +++ b/Python_Engine/Python/src/python_toolkit/bhom_tkinter/widgets/spinbox.py @@ -1,202 +1,202 @@ """Spinbox widget for numeric or list-based stepped input.""" import tkinter as tk +from collections.abc import Callable from tkinter import ttk -from typing import Optional, Callable, List, Union, Literal +from typing import Literal from python_toolkit.bhom_tkinter.widgets._widgets_base import BHoMBaseWidget class Spinbox(BHoMBaseWidget): - """A spinbox widget supporting numeric ranges or explicit value lists.""" - - def __init__( - self, - parent, - values: Optional[Union[List[str], List[int], List[float]]] = None, - from_: Optional[Union[int, float]] = None, - to: Optional[Union[int, float]] = None, - increment: Union[int, float] = 1, - default: Optional[Union[str, int, float]] = None, - command: Optional[Callable[[str], None]] = None, - width: int = 10, - wrap: bool = False, - **kwargs): - """ - Args: - parent (tk.Widget): The parent widget. - values (list, optional): Explicit list of string values to step through. - If provided, `from_`, `to` and `increment` are ignored. - from_ (int | float, optional): Minimum value for numeric mode. - to (int | float, optional): Maximum value for numeric mode. - increment (int | float): Step size for numeric mode. Defaults to 1. - default (str | int | float, optional): Initial value. - command (callable, optional): Called with the current value (str) on change. - width (int): Width of the entry in characters. - wrap (bool): Whether stepping wraps around at the limits. - item_title (str, optional): Optional header text. - helper_text (str, optional): Optional helper text. - **kwargs: Additional Frame options. - """ - super().__init__(parent, **kwargs) - - self.command = command - self._value_var = tk.StringVar() - - # Store range/list constraints for validation - self._from = from_ - self._to = to - self._allowed_values: Optional[list] = [str(v) for v in values] if values else None - - # Determine the native type for get() coercion - if values and len(values) > 0: - self._value_type = type(values[0]) - elif from_ is not None: - self._value_type = type(from_) - else: - self._value_type = str - - spinbox_kwargs: dict = dict( - textvariable=self._value_var, - width=width, - wrap=wrap, - ) - - if values: - spinbox_kwargs["values"] = [str(v) for v in values] - else: - if from_ is not None: - spinbox_kwargs["from_"] = from_ - if to is not None: - spinbox_kwargs["to"] = to - spinbox_kwargs["increment"] = increment - - self.spinbox = ttk.Spinbox(self.content_frame, **spinbox_kwargs) - self.spinbox.pack(side="top", anchor=self._pack_anchor) - - if default is not None: - self.set(default) - elif values: - self._value_var.set(str(values[0])) - elif from_ is not None: - self._value_var.set(str(from_)) - - # Attach the trace after the initial value is set so the callback - # does not fire during construction. - self._value_var.trace_add("write", self._on_change) - - def _on_change(self, *_): - """Fire the command callback when the value changes.""" - if self.command: - self.command(self.get()) - self._fire_on_change(self.get()) - - def get(self) -> Union[str, int, float]: - """Return the current value cast to its original type. - - Returns: - str | int | float: Current spinbox value in its original type. - """ - raw = self._value_var.get() - try: - return self._value_type(raw) - except (ValueError, TypeError): - return raw - - def get_int(self) -> int: - """Return the current value as an integer. - - Returns: - int: Current spinbox value. - - Raises: - ValueError: If the value cannot be converted to int. - """ - return int(self.get()) - - def get_float(self) -> float: - """Return the current value as a float. - - Returns: - float: Current spinbox value. - - Raises: - ValueError: If the value cannot be converted to float. - """ - return float(self.get()) - - def set(self, value: Union[str, int, float]): - """Set the spinbox value. - - Args: - value: New value to display. - """ - self._value_var.set(str(value)) - - def validate(self) -> tuple[bool, Optional[str], Optional[Literal['info', 'warning', 'error']]]: - """Validate that the current value is non-empty and within any configured range. - - Returns: - tuple[bool, Optional[str], Optional[Literal['info', 'warning', 'error']]]: - `(is_valid, message, severity)`. - """ - raw = str(self.get()).strip() - if not raw: - return self.apply_validation((False, "A value is required.", "error")) - - if self._value_type in (int, float): - try: - numeric_val = self._value_type(raw) - except (ValueError, TypeError): - label = "integer" if self._value_type == int else "number" - return self.apply_validation((False, f"Must be a valid {label}.", "error")) - if self._from is not None and numeric_val < self._from: - return self.apply_validation((False, f"Must be >= {self._from}.", "error")) - if self._to is not None and numeric_val > self._to: - return self.apply_validation((False, f"Must be <= {self._to}.", "error")) - elif self._allowed_values is not None and raw not in self._allowed_values: - return self.apply_validation((False, f"Value must be one of: {', '.join(self._allowed_values)}.", "error")) - - return self.apply_validation((True, None, None)) + """A spinbox widget supporting numeric ranges or explicit value lists.""" + + def __init__( + self, + parent, + values: list[str] | list[int] | list[float] | None = None, + from_: int | float | None = None, + to: int | float | None = None, + increment: int | float = 1, + default: str | int | float | None = None, + command: Callable[[str], None] | None = None, + width: int = 10, + wrap: bool = False, + **kwargs, + ): + """Args: + parent (tk.Widget): The parent widget. + values (list, optional): Explicit list of string values to step through. + If provided, `from_`, `to` and `increment` are ignored. + from_ (int | float, optional): Minimum value for numeric mode. + to (int | float, optional): Maximum value for numeric mode. + increment (int | float): Step size for numeric mode. Defaults to 1. + default (str | int | float, optional): Initial value. + command (callable, optional): Called with the current value (str) on change. + width (int): Width of the entry in characters. + wrap (bool): Whether stepping wraps around at the limits. + item_title (str, optional): Optional header text. + helper_text (str, optional): Optional helper text. + **kwargs: Additional Frame options. + """ + super().__init__(parent, **kwargs) + + self.command = command + self._value_var = tk.StringVar() + + # Store range/list constraints for validation + self._from = from_ + self._to = to + self._allowed_values: list | None = [str(v) for v in values] if values else None + + # Determine the native type for get() coercion + if values and len(values) > 0: + self._value_type = type(values[0]) + elif from_ is not None: + self._value_type = type(from_) + else: + self._value_type = str + + spinbox_kwargs: dict = { + "textvariable": self._value_var, + "width": width, + "wrap": wrap, + } + + if values: + spinbox_kwargs["values"] = [str(v) for v in values] + else: + if from_ is not None: + spinbox_kwargs["from_"] = from_ + if to is not None: + spinbox_kwargs["to"] = to + spinbox_kwargs["increment"] = increment + + self.spinbox = ttk.Spinbox(self.content_frame, **spinbox_kwargs) + self.spinbox.pack(side="top", anchor=self._pack_anchor) + + if default is not None: + self.set(default) + elif values: + self._value_var.set(str(values[0])) + elif from_ is not None: + self._value_var.set(str(from_)) + + # Attach the trace after the initial value is set so the callback + # does not fire during construction. + self._value_var.trace_add("write", self._on_change) + + def _on_change(self, *_): + """Fire the command callback when the value changes.""" + if self.command: + self.command(self.get()) + self._fire_on_change(self.get()) + + def get(self) -> str | int | float: + """Return the current value cast to its original type. + + Returns: + str | int | float: Current spinbox value in its original type. + """ + raw = self._value_var.get() + try: + return self._value_type(raw) + except (ValueError, TypeError): + return raw + + def get_int(self) -> int: + """Return the current value as an integer. + + Returns: + int: Current spinbox value. + + Raises: + ValueError: If the value cannot be converted to int. + """ + return int(self.get()) + + def get_float(self) -> float: + """Return the current value as a float. + + Returns: + float: Current spinbox value. + + Raises: + ValueError: If the value cannot be converted to float. + """ + return float(self.get()) + + def set(self, value: str | int | float): + """Set the spinbox value. + + Args: + value: New value to display. + """ + self._value_var.set(str(value)) + + def validate(self) -> tuple[bool, str | None, Literal["info", "warning", "error"] | None]: + """Validate that the current value is non-empty and within any configured range. + + Returns: + tuple[bool, Optional[str], Optional[Literal['info', 'warning', 'error']]]: + `(is_valid, message, severity)`. + """ + raw = str(self.get()).strip() + if not raw: + return self.apply_validation((False, "A value is required.", "error")) + + if self._value_type in (int, float): + try: + numeric_val = self._value_type(raw) + except (ValueError, TypeError): + label = "integer" if self._value_type is int else "number" + return self.apply_validation((False, f"Must be a valid {label}.", "error")) + if self._from is not None and numeric_val < self._from: + return self.apply_validation((False, f"Must be >= {self._from}.", "error")) + if self._to is not None and numeric_val > self._to: + return self.apply_validation((False, f"Must be <= {self._to}.", "error")) + elif self._allowed_values is not None and raw not in self._allowed_values: + return self.apply_validation((False, f"Value must be one of: {', '.join(self._allowed_values)}.", "error")) + + return self.apply_validation((True, None, None)) if __name__ == "__main__": - - from python_toolkit.bhom_tkinter.bhom_base_window import BHoMBaseWindow - from python_toolkit.bhom_tkinter.widgets._packing_options import PackingOptions - - def on_change(value): - print(f"Value: {value}") - - root = BHoMBaseWindow() - parent_frame = root.content_frame - - # Numeric spinbox - numeric = Spinbox( - parent_frame, - from_=0, - to=100, - increment=5, - default=25, - command=on_change, - item_title="Numeric", - helper_text="Pick a value between 0 and 100", - build_options=PackingOptions(padx=20, pady=(20, 8)), - width = 1, - ) - numeric.build() - - # List-based spinbox - list_spin = Spinbox( - parent_frame, - values=["Small", "Medium", "Large", "X-Large"], - default="Medium", - command=on_change, - item_title="Size", - helper_text="Step through available sizes", - build_options=PackingOptions(padx=20, pady=(0, 20)), - width=100 - ) - list_spin.build() - - root.mainloop() + from python_toolkit.bhom_tkinter.bhom_base_window import BHoMBaseWindow + from python_toolkit.bhom_tkinter.widgets._packing_options import PackingOptions + + def on_change(value): + print(f"Value: {value}") + + root = BHoMBaseWindow() + parent_frame = root.content_frame + + # Numeric spinbox + numeric = Spinbox( + parent_frame, + from_=0, + to=100, + increment=5, + default=25, + command=on_change, + item_title="Numeric", + helper_text="Pick a value between 0 and 100", + build_options=PackingOptions(padx=20, pady=(20, 8)), + width=1, + ) + numeric.build() + + # List-based spinbox + list_spin = Spinbox( + parent_frame, + values=["Small", "Medium", "Large", "X-Large"], + default="Medium", + command=on_change, + item_title="Size", + helper_text="Step through available sizes", + build_options=PackingOptions(padx=20, pady=(0, 20)), + width=100, + ) + list_spin.build() + + root.mainloop() diff --git a/Python_Engine/Python/src/python_toolkit/bhom_tkinter/widgets/validated_entry_box.py b/Python_Engine/Python/src/python_toolkit/bhom_tkinter/widgets/validated_entry_box.py index a6b88181..15292d75 100644 --- a/Python_Engine/Python/src/python_toolkit/bhom_tkinter/widgets/validated_entry_box.py +++ b/Python_Engine/Python/src/python_toolkit/bhom_tkinter/widgets/validated_entry_box.py @@ -1,45 +1,45 @@ """Validated entry widget supporting typed value and constraint checks.""" import tkinter as tk +from collections.abc import Callable from tkinter import ttk -from python_toolkit.bhom_tkinter.widgets.label import Label -from typing import Optional, Callable, Any, Union, Literal +from typing import Any, Literal, Union -from python_toolkit.bhom_tkinter.widgets._widgets_base import BHoMBaseWidget from python_toolkit.bhom_tkinter.theming.scaling import scale_pad +from python_toolkit.bhom_tkinter.widgets._widgets_base import BHoMBaseWidget +from python_toolkit.bhom_tkinter.widgets.label import Label _TkVar = Union[tk.StringVar, tk.IntVar, tk.DoubleVar, tk.BooleanVar] + class ValidatedEntryBox(BHoMBaseWidget): - """ - A reusable entry box component with built-in validation for different data types. - + """A reusable entry box component with built-in validation for different data types. + Supports validation for: - String (required/optional, min/max length) - Integer (min/max value) - Float (min/max value) - Custom validation via callback """ - + def __init__( self, parent, - variable: Optional[_TkVar] = None, - default_value: Optional[Union[str, int, float, bool]] = None, + variable: _TkVar | None = None, + default_value: str | int | float | bool | None = None, width: int = 15, value_type: type = str, - min_value: Optional[Union[int, float]] = None, - max_value: Optional[Union[int, float]] = None, - min_length: Optional[int] = None, - max_length: Optional[int] = None, + min_value: int | float | None = None, + max_value: int | float | None = None, + min_length: int | None = None, + max_length: int | None = None, required: bool = True, - custom_validator: Optional[Callable[[Any], tuple[bool, str]]] = None, - on_validate: Optional[Callable[[bool], None]] = None, - **kwargs + custom_validator: Callable[[Any], tuple[bool, str]] | None = None, + on_validate: Callable[[bool], None] | None = None, + **kwargs, ) -> None: - """ - Initialize the ValidatedEntryBox. - + """Initialize the ValidatedEntryBox. + Args: parent: Parent item_title: Optional header text shown at the top of the widget frame @@ -79,7 +79,7 @@ def __init__( self.default_value = default_value # Store the external variable (any tkinter var type) - self._external_var: Optional[_TkVar] = variable + self._external_var: _TkVar | None = variable # ttk.Entry only works with StringVar — always use one internally self.variable = tk.StringVar(value="") @@ -98,7 +98,7 @@ def __init__( # Create frame for entry and success indicator self.entry_frame = ttk.Frame(self.content_frame) self.entry_frame.pack(side="top", fill="x", anchor=self._pack_anchor) - + # Create entry widget self.entry = ttk.Entry( self.entry_frame, @@ -107,7 +107,7 @@ def __init__( justify=self._text_justify, ) self.entry.pack(side="left", fill="x", expand=True) - + # Create success indicator label at end of entry self.success_label = Label( self.entry_frame, @@ -117,7 +117,7 @@ def __init__( alignment=self.alignment, ) self.success_label.pack(side="left", padx=scale_pad((5, 0))) - + # Create error label below entry with fixed height to prevent layout shifts self.error_label = Label( self.content_frame, @@ -126,7 +126,7 @@ def __init__( alignment=self.alignment, ) self.error_label.pack(side="top", fill="x", anchor=self._pack_anchor) - + # Bind validation events self.entry.bind("", lambda _: self.validate()) self.entry.bind("", lambda _: self.validate()) @@ -156,7 +156,7 @@ def _sync_to_external(self, *_) -> None: self._external_var.set(raw.lower() in ("1", "true", "yes")) except (ValueError, TypeError): pass # Ignore mid-edit invalid states - + def get(self) -> str: """Get the current value as a string. @@ -164,8 +164,8 @@ def get(self) -> str: str: Trimmed entry value. """ return self.variable.get().strip() - - def get_value(self) -> Optional[Union[str, int, float, bool]]: + + def get_value(self) -> str | int | float | bool | None: """Get the current value converted to the specified type. Returns: @@ -174,31 +174,30 @@ def get_value(self) -> Optional[Union[str, int, float, bool]]: value_str = self.get() if not value_str: return None - + try: - if self.value_type == int: + if self.value_type is int: return int(value_str) - elif self.value_type == float: + elif self.value_type is float: return float(value_str) - elif self.value_type == bool: + elif self.value_type is bool: return value_str.lower() in ("1", "true", "yes") else: return value_str except (ValueError, TypeError): return None - - def set(self, value: Union[str, int, float, bool]) -> None: + + def set(self, value: str | int | float | bool) -> None: """Set the entry value. Args: value: Value to display in the entry. """ self.variable.set(str(value)) - - def validate(self) -> tuple[bool, Optional[str], Optional[Literal['info', 'warning', 'error']]]: - """ - Validate the current entry value. - + + def validate(self) -> tuple[bool, str | None, Literal["info", "warning", "error"] | None]: + """Validate the current entry value. + Returns: tuple[bool, Optional[str], Optional[Literal['info', 'warning', 'error']]]: `(is_valid, message, severity)` where severity is `None` when @@ -210,30 +209,30 @@ def validate(self) -> tuple[bool, Optional[str], Optional[Literal['info', 'warni return self.apply_validation((True, None, None)) value_str = self.get() - base_result: tuple[bool, Optional[str], Optional[Literal['info', 'warning', 'error']]] - + base_result: tuple[bool, str | None, Literal["info", "warning", "error"] | None] + # Check if required if self.required and not value_str: self._show_error("Required") self._call_validate_callback(False) base_result = (False, "Required", "error") return self.apply_validation(base_result) - + # If not required and empty, it's valid if not self.required and not value_str: self._show_success() self._call_validate_callback(True) base_result = (True, None, None) return self.apply_validation(base_result) - + # Type-specific validation - if self.value_type == str: + if self.value_type is str: is_valid = self._validate_string(value_str) - elif self.value_type == int: + elif self.value_type is int: is_valid = self._validate_int(value_str) - elif self.value_type == float: + elif self.value_type is float: is_valid = self._validate_float(value_str) - elif self.value_type == bool: + elif self.value_type is bool: is_valid = self._validate_bool(value_str) else: self._show_error(f"Unsupported type: {self.value_type}") @@ -261,7 +260,7 @@ def validate(self) -> tuple[bool, Optional[str], Optional[Literal['info', 'warni self._call_validate_callback(False) return final_result - + def _validate_string(self, value: str) -> bool: """Validate string value. @@ -275,20 +274,20 @@ def _validate_string(self, value: str) -> bool: if self.min_length is not None and len(value) < self.min_length: self._show_error(f"Minimum length: {self.min_length}") return False - + if self.max_length is not None and len(value) > self.max_length: self._show_error(f"Maximum length: {self.max_length}") return False - + # Custom validation if self.custom_validator: is_valid, error_msg = self.custom_validator(value) if not is_valid: self._show_error(error_msg) return False - + return True - + def _validate_int(self, value_str: str) -> bool: """Validate integer value. @@ -303,25 +302,25 @@ def _validate_int(self, value_str: str) -> bool: except ValueError: self._show_error("Must be a valid integer") return False - + # Check range constraints if self.min_value is not None and value < self.min_value: self._show_error(f"Must be >= {self.min_value}") return False - + if self.max_value is not None and value > self.max_value: self._show_error(f"Must be <= {self.max_value}") return False - + # Custom validation if self.custom_validator: is_valid, error_msg = self.custom_validator(value) if not is_valid: self._show_error(error_msg) return False - + return True - + def _validate_float(self, value_str: str) -> bool: """Validate float value. @@ -336,7 +335,7 @@ def _validate_float(self, value_str: str) -> bool: except ValueError: self._show_error("Must be a valid number") return False - + # Check range constraints if self.min_value is not None and value < self.min_value: if self.max_value is not None: @@ -344,23 +343,23 @@ def _validate_float(self, value_str: str) -> bool: else: self._show_error(f"Must be >= {self.min_value}") return False - + if self.max_value is not None and value > self.max_value: if self.min_value is not None: self._show_error(f"Must be between {self.min_value} and {self.max_value}") else: self._show_error(f"Must be <= {self.max_value}") return False - + # Custom validation if self.custom_validator: is_valid, error_msg = self.custom_validator(value) if not is_valid: self._show_error(error_msg) return False - + return True - + def _validate_bool(self, value_str: str) -> bool: """Validate boolean value (accepts 1/0, true/false, yes/no). @@ -388,23 +387,23 @@ def _show_error(self, message: str) -> None: self.error_label.set(message) self.error_label.label.configure(foreground="#ff4444") self.success_label.set(" ") - + def _show_success(self) -> None: """Display success indicator.""" self.error_label.set(" ") self.success_label.set("✓") - + def clear_error(self) -> None: """Clear the error message.""" self.error_label.set(" ") self.success_label.set(" ") - + def _call_validate_callback(self, is_valid: bool) -> None: """Call the validation callback if provided.""" if self.on_validate: self.on_validate(is_valid) - def set_alignment(self, alignment: Literal['left', 'center', 'right']) -> None: + def set_alignment(self, alignment: Literal["left", "center", "right"]) -> None: """Set widget alignment and refresh entry + labels accordingly.""" super().set_alignment(alignment) self.entry.configure(justify=self._text_justify) @@ -414,20 +413,19 @@ def set_alignment(self, alignment: Literal['left', 'center', 'right']) -> None: self.success_label.set_alignment(self.alignment) - if __name__ == "__main__": # Test the ValidatedEntryBox from python_toolkit.bhom_tkinter.bhom_base_window import BHoMBaseWindow from python_toolkit.bhom_tkinter.widgets._packing_options import PackingOptions - + root = BHoMBaseWindow(title="Validated Entry Box Test") parent_container = getattr(root, "content_frame", root) def on_validate(is_valid): """Print validation state in the standalone example.""" print(f"Validation result: {is_valid}") - + entry_box = ValidatedEntryBox( parent_container, item_title="Integer Field", @@ -436,8 +434,8 @@ def on_validate(is_valid): min_value=0, max_value=100, on_validate=on_validate, - build_options=PackingOptions(padx=20, pady=20) + build_options=PackingOptions(padx=20, pady=20), ) entry_box.build() - - root.mainloop() \ No newline at end of file + + root.mainloop() diff --git a/Python_Engine/Python/src/python_toolkit/bhom_tkinter/widgets/widget_calendar.py b/Python_Engine/Python/src/python_toolkit/bhom_tkinter/widgets/widget_calendar.py index 078d9734..aa973353 100644 --- a/Python_Engine/Python/src/python_toolkit/bhom_tkinter/widgets/widget_calendar.py +++ b/Python_Engine/Python/src/python_toolkit/bhom_tkinter/widgets/widget_calendar.py @@ -1,38 +1,39 @@ """Calendar date-picker widget with optional year selector.""" -import tkinter as tk -from typing import Optional, Literal -from tkinter import ttk -from python_toolkit.bhom_tkinter.widgets.label import Label import calendar import datetime +from tkinter import ttk +from typing import Literal +from python_toolkit.bhom_tkinter.theming.scaling import scale_pad from python_toolkit.bhom_tkinter.widgets._widgets_base import BHoMBaseWidget from python_toolkit.bhom_tkinter.widgets.button import Button from python_toolkit.bhom_tkinter.widgets.drop_down_selection import DropDownSelection -from python_toolkit.bhom_tkinter.theming.scaling import scale_pad +from python_toolkit.bhom_tkinter.widgets.label import Label + class CalendarWidget(BHoMBaseWidget): """Render a month grid and allow date selection.""" def __init__( - self, - parent: ttk.Frame, - def_year: int = 2026, - def_month: int = 1, - def_day: int = 1, - show_year_selector: bool = True, - year_min: int = 1900, - year_max: int = 2100, - day_button_width: int = 4, - day_button_padx: int = 1, - day_button_pady: int = 1, - day_button_text_alignment: Literal["left", "center", "right"] = "center", - fixed_week_rows: int | None = None, - selector_position: Literal["top", "bottom"] = "bottom", - selection_label_format: Literal["short", "long"] = "short", - **kwargs): - + self, + parent: ttk.Frame, + def_year: int = 2026, + def_month: int = 1, + def_day: int = 1, + show_year_selector: bool = True, + year_min: int = 1900, + year_max: int = 2100, + day_button_width: int = 4, + day_button_padx: int = 1, + day_button_pady: int = 1, + day_button_text_alignment: Literal["left", "center", "right"] = "center", + fixed_week_rows: int | None = None, + selector_position: Literal["top", "bottom"] = "bottom", + selection_label_format: Literal["short", "long"] = "short", + **kwargs, + ): + super().__init__(parent, **kwargs) self.year = def_year @@ -49,17 +50,11 @@ def __init__( alignment_candidate = "center" self.day_button_text_alignment = alignment_candidate self.day_button_style = f"CalendarDay.{id(self)}.TButton" - self.fixed_week_rows = ( - max(1, int(fixed_week_rows)) if fixed_week_rows is not None else None - ) + self.fixed_week_rows = max(1, int(fixed_week_rows)) if fixed_week_rows is not None else None selector_candidate = str(selector_position).strip().lower() - self.selector_position = ( - selector_candidate if selector_candidate in {"top", "bottom"} else "bottom" - ) + self.selector_position = selector_candidate if selector_candidate in {"top", "bottom"} else "bottom" label_format = str(selection_label_format).strip().lower() - self.selection_label_format = ( - label_format if label_format in {"short", "long"} else "short" - ) + self.selection_label_format = label_format if label_format in {"short", "long"} else "short" anchor_map = { "left": "w", @@ -96,7 +91,20 @@ def year_selector(self): def month_selector(self): """Build the month dropdown selector.""" - self.months = ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"] + self.months = [ + "January", + "February", + "March", + "April", + "May", + "June", + "July", + "August", + "September", + "October", + "November", + "December", + ] self.month_dropdown = DropDownSelection( self.month_frame, options=self.months, @@ -184,7 +192,7 @@ def redraw(self): while len(weeks) < self.fixed_week_rows: weeks.append([0, 0, 0, 0, 0, 0, 0]) weeks = weeks[: self.fixed_week_rows] - + for row, week in enumerate(weeks): for col, day in enumerate(week): text = "" if day == 0 else day @@ -197,13 +205,13 @@ def redraw(self): ) cell_widget.button.configure(style=self.day_button_style, state=state) cell_widget.grid( - row=row+1, + row=row + 1, column=col, sticky="nsew", padx=self.day_button_padx, pady=self.day_button_pady, ) - + def set_day(self, num): """Set the selected day and refresh the date summary label. @@ -217,7 +225,7 @@ def set_day(self, num): if self._initialized: self._fire_on_change(self.get()) - + def get_date(self): """Return the selected date as a `datetime.date` instance. @@ -225,7 +233,7 @@ def get_date(self): datetime.date: Currently selected date. """ return datetime.date(self.year, self.month, self.day) - + def get(self): """Return the selected date value. @@ -233,7 +241,7 @@ def get(self): datetime.date: Currently selected date. """ return datetime.date(self.year, self.month, self.day) - + def set(self, value: datetime.date): """Set the selected date from a `datetime.date` value. @@ -243,15 +251,15 @@ def set(self, value: datetime.date): self.year = value.year self.month = value.month self.day = value.day - if hasattr(self, 'year_dropdown'): + if hasattr(self, "year_dropdown"): self.year_dropdown.set(str(self.year)) - if hasattr(self, 'month_dropdown'): + if hasattr(self, "month_dropdown"): self.month_dropdown.set(self.months[self.month - 1]) self._clamp_day() self.redraw() self._refresh_selection_label() - def validate(self) -> tuple[bool, Optional[str], Optional[Literal['info', 'warning', 'error']]]: + def validate(self) -> tuple[bool, str | None, Literal["info", "warning", "error"] | None]: """Validate the currently selected date. Returns: @@ -264,7 +272,7 @@ def validate(self) -> tuple[bool, Optional[str], Optional[Literal['info', 'warni return self.apply_validation((True, None, None)) except ValueError as ex: return self.apply_validation((False, f"Invalid date: {ex}", "error")) - + def pack(self, **kwargs): """Pack the widget and ensure the calendar grid is rendered. @@ -273,9 +281,9 @@ def pack(self, **kwargs): """ super().pack(**kwargs) self.redraw() - -if __name__ == "__main__": + +if __name__ == "__main__": from python_toolkit.bhom_tkinter.bhom_base_window import BHoMBaseWindow from python_toolkit.bhom_tkinter.widgets._packing_options import PackingOptions @@ -294,7 +302,7 @@ def pack(self, **kwargs): day_button_text_alignment="center", item_title="Select a Date", helper_text="Choose a date from the calendar below.", - build_options=PackingOptions(padx=20, pady=20) + build_options=PackingOptions(padx=20, pady=20), ) cal_widget1.build() diff --git a/Python_Engine/Python/src/python_toolkit/bhom_tkinter/windows/__init__.py b/Python_Engine/Python/src/python_toolkit/bhom_tkinter/windows/__init__.py index cdd1dabd..241f756e 100644 --- a/Python_Engine/Python/src/python_toolkit/bhom_tkinter/windows/__init__.py +++ b/Python_Engine/Python/src/python_toolkit/bhom_tkinter/windows/__init__.py @@ -1,4 +1,5 @@ from python_toolkit.bhom_tkinter.bhom_base_child_window import BHoMBaseChildWindow + from .directory_file_selector import DirectoryFileSelector from .landing_page import LandingPage from .modal_window import BHoMModalWindow diff --git a/Python_Engine/Python/src/python_toolkit/bhom_tkinter/windows/directory_file_selector.py b/Python_Engine/Python/src/python_toolkit/bhom_tkinter/windows/directory_file_selector.py index 431a74d3..460724d3 100644 --- a/Python_Engine/Python/src/python_toolkit/bhom_tkinter/windows/directory_file_selector.py +++ b/Python_Engine/Python/src/python_toolkit/bhom_tkinter/windows/directory_file_selector.py @@ -1,15 +1,15 @@ """Window for selecting multiple files by extension from a directory tree.""" import tkinter as tk -from tkinter import ttk -from python_toolkit.bhom_tkinter.widgets.label import Label +from collections.abc import Iterable from pathlib import Path -from typing import Iterable, List, Optional -from python_toolkit.bhom_tkinter.widgets.list_box import ScrollableListBox -from python_toolkit.bhom_tkinter.widgets._packing_options import PackingOptions from python_toolkit.bhom_tkinter.bhom_base_child_window import BHoMBaseChildWindow from python_toolkit.bhom_tkinter.theming.scaling import scale_pad +from python_toolkit.bhom_tkinter.widgets._packing_options import PackingOptions +from python_toolkit.bhom_tkinter.widgets.label import Label +from python_toolkit.bhom_tkinter.widgets.list_box import ScrollableListBox + class DirectoryFileSelector(BHoMBaseChildWindow): """Display matching files and return the user's multi-selection.""" @@ -25,12 +25,12 @@ def __init__( self.file_types = self._normalise_file_types(file_types) self.selection_label = selection_label self._cancelled = False - self.selected_files: List[Path] = [] + self.selected_files: list[Path] = [] self.files = self._discover_files() self.display_items = [self._display_value(file) for file in self.files] self.file_lookup = dict(zip(self.display_items, self.files)) - self.file_selector_listbox: Optional[ScrollableListBox] = None + self.file_selector_listbox: ScrollableListBox | None = None super().__init__( title=f"Select {selection_label}", @@ -46,7 +46,6 @@ def __init__( def build(self): """Build the list-based file selection UI.""" - instruction_label = Label( self.content_frame, text=f"Select the {self.selection_label} to analyse.", @@ -61,13 +60,13 @@ def build(self): selectmode=tk.MULTIPLE, height=12, show_selection_controls=True, - build_options=PackingOptions(fill='both', expand=True), + build_options=PackingOptions(fill="both", expand=True), ) self.widgets.append(self.file_selector_listbox) super().build() - def _normalise_file_types(self, file_types: Iterable[str]) -> List[str]: + def _normalise_file_types(self, file_types: Iterable[str]) -> list[str]: normalised = [] for file_type in file_types: suffix = str(file_type).strip() @@ -78,7 +77,7 @@ def _normalise_file_types(self, file_types: Iterable[str]) -> List[str]: normalised.append(suffix.lower()) return normalised - def _discover_files(self) -> List[Path]: + def _discover_files(self) -> list[Path]: if not self.directory.exists(): return [] @@ -105,8 +104,8 @@ def _on_cancel(self): self._cancelled = True self.destroy_root() -if __name__ == "__main__": +if __name__ == "__main__": print(Path(__file__).resolve().parent, flush=True) # Example usage selector = DirectoryFileSelector( @@ -117,4 +116,4 @@ def _on_cancel(self): selector.mainloop() for file in selector.selected_files: - print(file) \ No newline at end of file + print(file) diff --git a/Python_Engine/Python/src/python_toolkit/bhom_tkinter/windows/landing_page.py b/Python_Engine/Python/src/python_toolkit/bhom_tkinter/windows/landing_page.py index 2ffbc0f7..bd7e95be 100644 --- a/Python_Engine/Python/src/python_toolkit/bhom_tkinter/windows/landing_page.py +++ b/Python_Engine/Python/src/python_toolkit/bhom_tkinter/windows/landing_page.py @@ -1,30 +1,29 @@ """Landing page window with configurable header, message text, and custom actions.""" +from collections.abc import Callable from tkinter import ttk -from typing import Optional, Callable + from python_toolkit.bhom_tkinter.bhom_base_window import BHoMBaseWindow +from python_toolkit.bhom_tkinter.theming.scaling import scale_pad +from python_toolkit.bhom_tkinter.widgets._packing_options import PackingOptions from python_toolkit.bhom_tkinter.widgets.button import Button from python_toolkit.bhom_tkinter.widgets.label import Label -from python_toolkit.bhom_tkinter.widgets._packing_options import PackingOptions -from python_toolkit.bhom_tkinter.theming.scaling import scale_pad class LandingPage(BHoMBaseWindow): - """ - A reusable landing page GUI with configurable title, message, and buttons. + """A reusable landing page GUI with configurable title, message, and buttons. Uses BHoMBaseWindow as the base template. """ def __init__( self, title: str = "Landing Page", - header: Optional[str] = None, - message: Optional[str] = None, - sub_title: Optional[str] = None, + header: str | None = None, + message: str | None = None, + sub_title: str | None = None, **kwargs, ): - """ - Initializes the landing page GUI. + """Initializes the landing page GUI. Args: title (str): Window and header title text. @@ -33,7 +32,7 @@ def __init__( self.header = header self.message = message self.sub_title = sub_title - self.custom_buttons_frame: Optional[ttk.Frame] = None + self.custom_buttons_frame: ttk.Frame | None = None super().__init__( title=title, @@ -62,7 +61,7 @@ def build(self): build_options=PackingOptions(side="top", anchor="w", pady=(0, 10)), ) message_label.build() - + if self.sub_title: sub_title_label = Label( self.content_frame, @@ -79,8 +78,7 @@ def build(self): super().build() def add_custom_button(self, text: str, command: Callable, **kwargs) -> ttk.Button: - """ - Add a custom button to the landing page. + """Add a custom button to the landing page. Args: text (str): Button text. @@ -103,12 +101,11 @@ def add_custom_button(self, text: str, command: Callable, **kwargs) -> ttk.Butto if __name__ == "__main__": - - #simple example of using the landing page + # simple example of using the landing page def on_button_click(): """Handle demo button clicks in the standalone example.""" print("Button clicked!") - + def on_button_click_2(): """Handle demo button clicks in the standalone example.""" print("Second button clicked!") @@ -123,4 +120,4 @@ def on_button_click_2(): ) landing_page.add_custom_button(text="Click Me", command=on_button_click, width=100) landing_page.add_custom_button(text="Click Me 2", command=on_button_click_2) - landing_page.mainloop() \ No newline at end of file + landing_page.mainloop() diff --git a/Python_Engine/Python/src/python_toolkit/bhom_tkinter/windows/modal_window.py b/Python_Engine/Python/src/python_toolkit/bhom_tkinter/windows/modal_window.py index 9ed71d82..618539a5 100644 --- a/Python_Engine/Python/src/python_toolkit/bhom_tkinter/windows/modal_window.py +++ b/Python_Engine/Python/src/python_toolkit/bhom_tkinter/windows/modal_window.py @@ -3,7 +3,7 @@ from __future__ import annotations import tkinter as tk -from typing import Callable, Optional +from collections.abc import Callable from python_toolkit.bhom_tkinter.bhom_base_child_window import BHoMBaseChildWindow @@ -23,7 +23,7 @@ def __init__( resizable: bool = False, show_close: bool = True, close_text: str = "Close", - close_command: Optional[Callable[[], None]] = None, + close_command: Callable[[], None] | None = None, theme_mode: str | None = None, content_padding: int = 20, **kwargs, diff --git a/Python_Engine/Python/src/python_toolkit/bhom_tkinter/windows/processing_window.py b/Python_Engine/Python/src/python_toolkit/bhom_tkinter/windows/processing_window.py index 3649528f..16698711 100644 --- a/Python_Engine/Python/src/python_toolkit/bhom_tkinter/windows/processing_window.py +++ b/Python_Engine/Python/src/python_toolkit/bhom_tkinter/windows/processing_window.py @@ -1,21 +1,18 @@ -import tkinter as tk -from tkinter import ttk -import os - -import time import threading +import time +from tkinter import ttk from python_toolkit.bhom_tkinter.bhom_base_child_window import BHoMBaseChildWindow from python_toolkit.bhom_tkinter.theming.scaling import scale, scale_pad + class ProcessingWindow(BHoMBaseChildWindow): """A simple processing window with animated indicator.""" def __init__(self, title="Processing", message="Processing...", *args, **kwargs): - """ - Args: - title (str): Window title. - message (str): Message to display. + """Args: + title (str): Window title. + message (str): Message to display. """ super().__init__( title=title, @@ -29,7 +26,7 @@ def __init__(self, title="Processing", message="Processing...", *args, **kwargs) show_banner=False, top_most=True, *args, - **kwargs + **kwargs, ) self.attributes("-topmost", True) @@ -39,11 +36,7 @@ def __init__(self, title="Processing", message="Processing...", *args, **kwargs) container.pack(fill="both", expand=True) self.message_label = ttk.Label( - container, - text=message, - style="Title.TLabel", - justify="center", - wraplength=scale(400) + container, text=message, style="Title.TLabel", justify="center", wraplength=scale(400) ) try: title_font = ttk.Style(self).lookup("Title.TLabel", "font") @@ -56,12 +49,7 @@ def __init__(self, title="Processing", message="Processing...", *args, **kwargs) animation_frame = ttk.Frame(container) animation_frame.pack(expand=True) - self.animation_label = ttk.Label( - animation_frame, - text="●", - style="Title.TLabel", - foreground="#0078d4" - ) + self.animation_label = ttk.Label(animation_frame, text="●", style="Title.TLabel", foreground="#0078d4") try: title_font = ttk.Style(self).lookup("Title.TLabel", "font") if title_font: @@ -77,7 +65,6 @@ def __init__(self, title="Processing", message="Processing...", *args, **kwargs) self.update_idletasks() self.refresh_sizing() - def start(self): """Start the processing window and animation.""" if self.is_running: @@ -154,11 +141,12 @@ def update_message(self, message: str): if __name__ == "__main__": processing = ProcessingWindow(title="Test Processing", message="Running Comfort and Safety Calculation...") + def worker(): for i in range(50): time.sleep(0.1) try: - processing.after(0, processing.update_message, f"Step {i+1}/50") + processing.after(0, processing.update_message, f"Step {i + 1}/50") except Exception: pass diff --git a/Python_Engine/Python/src/python_toolkit/bhom_tkinter/windows/warning_box.py b/Python_Engine/Python/src/python_toolkit/bhom_tkinter/windows/warning_box.py index 0667bb6c..aa199e0c 100644 --- a/Python_Engine/Python/src/python_toolkit/bhom_tkinter/windows/warning_box.py +++ b/Python_Engine/Python/src/python_toolkit/bhom_tkinter/windows/warning_box.py @@ -1,35 +1,28 @@ """Standardized warning dialog window for errors, warnings, and info messages.""" -from python_toolkit.bhom_tkinter.widgets.label import Label from python_toolkit.bhom_tkinter.bhom_base_child_window import BHoMBaseChildWindow -from python_toolkit.bhom_tkinter.widgets._packing_options import PackingOptions from python_toolkit.bhom_tkinter.theming.scaling import scale +from python_toolkit.bhom_tkinter.widgets._packing_options import PackingOptions +from python_toolkit.bhom_tkinter.widgets.label import Label class WarningBox(BHoMBaseChildWindow): """Show categorized messages using the shared BHoM window styling.""" def __init__( - self, - title: str= 'Warning', - warnings: list[str] | str | None = None, - errors: list[str] | str | None = None, - infos: list[str] | str | None = None, - **kwargs - ): + self, + title: str = "Warning", + warnings: list[str] | str | None = None, + errors: list[str] | str | None = None, + infos: list[str] | str | None = None, + **kwargs, + ): self.warnings = self._normalise_messages(warnings) self.errors = self._normalise_messages(errors) self.infos = self._normalise_messages(infos) - super().__init__( - title=title, - show_submit=False, - close_text="Continue", - min_width=250, - min_height=150, - **kwargs - ) + super().__init__(title=title, show_submit=False, close_text="Continue", min_width=250, min_height=150, **kwargs) def build(self): """Render current messages into the content area.""" @@ -115,10 +108,12 @@ def add_info_message(self, message: str): if __name__ == "__main__": - root = WarningBox(title="Validation Error", warnings="This is a warning message to alert the user about something important.") + root = WarningBox( + title="Validation Error", warnings="This is a warning message to alert the user about something important." + ) for message in ["This is the first error message.", "This is the second error message."]: root.add_error_message(message) root.add_info_message("This is some additional information for the user.") - root.mainloop() \ No newline at end of file + root.mainloop() diff --git a/Python_Engine/Python/src/python_toolkit/helpers/__init__.py b/Python_Engine/Python/src/python_toolkit/helpers/__init__.py index b0ee9a8a..eda8267a 100644 --- a/Python_Engine/Python/src/python_toolkit/helpers/__init__.py +++ b/Python_Engine/Python/src/python_toolkit/helpers/__init__.py @@ -1,22 +1,10 @@ -from .timeseries import ( - validate_timeseries, - timeseries_summary_monthly -) -from .cardinality import ( - cardinality, - angle_from_cardinal, - angle_from_north, - angle_to_vector -) -from .decay_rate import ( - DecayMethod, - proximity_decay, - decay_rate_smoother -) -from .helpers import ( - sanitise_string, - convert_keys_to_snake_case, - remove_leap_days, - timedelta_tostring, - safe_filename -) \ No newline at end of file +"""Data helpers (requires the "plot" extra: ``python_toolkit[plot]``).""" + +from .._optional import require_extra + +require_extra("plot", "numpy", "pandas", "caseconverter") + +from .cardinality import angle_from_cardinal, angle_from_north, angle_to_vector, cardinality +from .decay_rate import DecayMethod, decay_rate_smoother, proximity_decay +from .helpers import convert_keys_to_snake_case, remove_leap_days, safe_filename, sanitise_string, timedelta_tostring +from .timeseries import timeseries_summary_monthly, validate_timeseries diff --git a/Python_Engine/Python/src/python_toolkit/helpers/cardinality.py b/Python_Engine/Python/src/python_toolkit/helpers/cardinality.py index 1bf64732..30732591 100644 --- a/Python_Engine/Python/src/python_toolkit/helpers/cardinality.py +++ b/Python_Engine/Python/src/python_toolkit/helpers/cardinality.py @@ -1,11 +1,13 @@ -import numpy as np +import numpy as np from ..bhom.analytics import bhom_analytics + @bhom_analytics() def cardinality(direction_angle: float, directions: int = 16): """Returns the cardinal orientation of a given angle, where that angle is related to north at 0 degrees. + Args: direction_angle (float): The angle to north in degrees (+Ve is interpreted as clockwise from north at 0.0 @@ -13,15 +15,13 @@ def cardinality(direction_angle: float, directions: int = 16): directions (int): The number of cardinal directions into which angles shall be binned (This value should be one of 4, 8, 16 or 32, and is centred about "north"). + Returns: int: The cardinal direction the angle represents. """ - if direction_angle > 360 or direction_angle < 0: - raise ValueError( - "The angle entered is beyond the normally expected range for an orientation in degrees." - ) + raise ValueError("The angle entered is beyond the normally expected range for an orientation in degrees.") cardinal_directions = { 4: ["N", "E", "S", "W"], @@ -81,9 +81,7 @@ def cardinality(direction_angle: float, directions: int = 16): } if directions not in cardinal_directions: - raise ValueError( - f'The input "directions" must be one of {list(cardinal_directions.keys())}.' - ) + raise ValueError(f'The input "directions" must be one of {list(cardinal_directions.keys())}.') val = int((direction_angle / (360 / directions)) + 0.5) @@ -91,14 +89,15 @@ def cardinality(direction_angle: float, directions: int = 16): return arr[(val % directions)] + @bhom_analytics() def angle_from_cardinal(cardinal_direction: str) -> float: - """ - For a given cardinal direction, return the corresponding angle in degrees. + """For a given cardinal direction, return the corresponding angle in degrees. Args: cardinal_direction (str): The cardinal direction. + Returns: float: The angle associated with the cardinal direction. @@ -145,6 +144,7 @@ def angle_from_cardinal(cardinal_direction: str) -> float: return lookup[cardinal_direction] + def angle_from_north(vector: list[float]) -> float: """For an X, Y vector, determine the clockwise angle to north at [0, 1]. @@ -161,6 +161,7 @@ def angle_from_north(vector: list[float]) -> float: angle2 = np.arctan2(*vector[::-1]) return np.rad2deg((angle1 - angle2) % (2 * np.pi)) + def angle_to_vector(clockwise_angle_from_north: float) -> list[float]: """Return the X, Y vector from of an angle from north at 0-degrees. @@ -173,7 +174,6 @@ def angle_to_vector(clockwise_angle_from_north: float) -> list[float]: list[float]: A vector of length 2. """ - clockwise_angle_from_north = np.radians(clockwise_angle_from_north) return np.sin(clockwise_angle_from_north), np.cos(clockwise_angle_from_north) diff --git a/Python_Engine/Python/src/python_toolkit/helpers/decay_rate.py b/Python_Engine/Python/src/python_toolkit/helpers/decay_rate.py index 99f2e657..050824de 100644 --- a/Python_Engine/Python/src/python_toolkit/helpers/decay_rate.py +++ b/Python_Engine/Python/src/python_toolkit/helpers/decay_rate.py @@ -1,4 +1,3 @@ -import re from enum import Enum, auto import numpy as np @@ -6,6 +5,7 @@ from ..bhom.analytics import bhom_analytics + class DecayMethod(Enum): """An enumeration of decay methods.""" @@ -13,6 +13,7 @@ class DecayMethod(Enum): PARABOLIC = auto() SIGMOID = auto() + @bhom_analytics() def proximity_decay( value: float, @@ -37,7 +38,6 @@ def proximity_decay( float: The value at the given distance. """ - distance_to_value = np.interp(distance_to_value, [0, max_distance], [0, 1]) if decay_method == DecayMethod.LINEAR: @@ -49,6 +49,7 @@ def proximity_decay( raise ValueError(f"Unknown curve type: {decay_method}") + @bhom_analytics() def decay_rate_smoother( series: pd.Series, @@ -75,7 +76,6 @@ def decay_rate_smoother( pd.Series: A modified series """ - # Find periods of major transition (where values vary significantly) transition_index = series.diff() < difference_threshold diff --git a/Python_Engine/Python/src/python_toolkit/helpers/helpers.py b/Python_Engine/Python/src/python_toolkit/helpers/helpers.py index 7f8cad97..78feb6ea 100644 --- a/Python_Engine/Python/src/python_toolkit/helpers/helpers.py +++ b/Python_Engine/Python/src/python_toolkit/helpers/helpers.py @@ -1,4 +1,4 @@ -import re +import re from datetime import timedelta from typing import Any @@ -7,33 +7,33 @@ from ..bhom.analytics import bhom_analytics + def sanitise_string(string: str) -> str: """Sanitise a string so that only path-safe characters remain.""" - keep_characters = r"[^.A-Za-z0-9_-]" return re.sub(keep_characters, "_", string).replace("__", "_").rstrip() + def convert_keys_to_snake_case(d: dict | list | Any): """Given a dictionary, convert all keys to snake_case.""" keys_to_skip = ["_t"] if isinstance(d, dict): - return { - snakecase(k) if k not in keys_to_skip else k: convert_keys_to_snake_case(v) - for k, v in d.items() - } + return {snakecase(k) if k not in keys_to_skip else k: convert_keys_to_snake_case(v) for k, v in d.items()} if isinstance(d, list): return [convert_keys_to_snake_case(x) for x in d] return d + @bhom_analytics() def timedelta_tostring(time_delta: timedelta) -> str: - """timedelta objects don't have a nice string representation, so this function converts them. + """Timedelta objects don't have a nice string representation, so this function converts them. Args: time_delta (datetime.timedelta): The timedelta object to convert. + Returns: str: A string representation of the timedelta object. @@ -43,6 +43,7 @@ def timedelta_tostring(time_delta: timedelta) -> str: minutes, _ = divmod(remainder, 60) return f"{hours:02d}:{minutes:02d}" + @bhom_analytics() def decay_rate_smoother( series: pd.Series, @@ -69,7 +70,6 @@ def decay_rate_smoother( pd.Series: A modified series """ - # Find periods of major transition (where values vary significantly) transition_index = series.diff() < difference_threshold @@ -93,11 +93,12 @@ def decay_rate_smoother( return new_series + @bhom_analytics() def remove_leap_days(pd_object: pd.DataFrame | pd.Series) -> pd.DataFrame | pd.Series: """A removal of all timesteps within a time-indexed pandas - object where the day is the 29th of February.""" - + object where the day is the 29th of February. + """ if not isinstance(pd_object.index, pd.DatetimeIndex): raise ValueError("The object provided should be datetime-indexed.") @@ -105,9 +106,8 @@ def remove_leap_days(pd_object: pd.DataFrame | pd.Series) -> pd.DataFrame | pd.S return pd_object[~mask] + @bhom_analytics() def safe_filename(filename: str) -> str: """Remove all non-alphanumeric characters from a filename.""" - return "".join( - [c for c in filename if c.isalpha() or c.isdigit() or c == " "] - ).strip() + return "".join([c for c in filename if c.isalpha() or c.isdigit() or c == " "]).strip() diff --git a/Python_Engine/Python/src/python_toolkit/helpers/timeseries.py b/Python_Engine/Python/src/python_toolkit/helpers/timeseries.py index ea02a46a..e1088744 100644 --- a/Python_Engine/Python/src/python_toolkit/helpers/timeseries.py +++ b/Python_Engine/Python/src/python_toolkit/helpers/timeseries.py @@ -1,8 +1,10 @@ -from typing import Any +from typing import Any + import pandas as pd from ..bhom.analytics import bhom_analytics + @bhom_analytics() def validate_timeseries( obj: Any, @@ -34,9 +36,7 @@ def validate_timeseries( if not isinstance(obj.index, pd.DatetimeIndex): raise TypeError("series must have a datetime index") if is_annual: - if (obj.index.day_of_year.nunique() != 365) or ( - obj.index.day_of_year.nunique() != 366 - ): + if (obj.index.day_of_year.nunique() != 365) or (obj.index.day_of_year.nunique() != 366): raise ValueError("series is not annual") if is_hourly: if obj.index.hour.nunique() != 24: @@ -47,7 +47,9 @@ def validate_timeseries( @bhom_analytics() -def timeseries_summary_monthly(series: pd.Series, bins: list[float], bin_names: list[str] = None, density: bool = False): +def timeseries_summary_monthly( + series: pd.Series, bins: list[float], bin_names: list[str] | None = None, density: bool = False +): if not isinstance(series, pd.Series): raise ValueError("The series must be a pandas series.") @@ -57,13 +59,11 @@ def timeseries_summary_monthly(series: pd.Series, bins: list[float], bin_names: df = pd.cut(series, bins=bins, labels=bin_names, include_lowest=True) if df.isna().any(): - raise ValueError( - f"The input value/s are outside the range of the given bins ({bins[0]} <= x <= {bins[-1]})." - ) - + raise ValueError(f"The input value/s are outside the range of the given bins ({bins[0]} <= x <= {bins[-1]}).") + counts = df.groupby(series.index.month).value_counts().unstack().sort_index(axis=0) counts.columns.name = None counts.index.name = "Month" if density: return counts.div(counts.sum(axis=1), axis=0) - return counts \ No newline at end of file + return counts diff --git a/Python_Engine/Python/src/python_toolkit/plot/__init__.py b/Python_Engine/Python/src/python_toolkit/plot/__init__.py new file mode 100644 index 00000000..eaf31df2 --- /dev/null +++ b/Python_Engine/Python/src/python_toolkit/plot/__init__.py @@ -0,0 +1,5 @@ +"""Plotting methods (requires the "plot" extra: ``python_toolkit[plot]``).""" + +from .._optional import require_extra + +require_extra("plot", "matplotlib", "numpy", "pandas") diff --git a/Python_Engine/Python/src/python_toolkit/plot/cmap_sample.py b/Python_Engine/Python/src/python_toolkit/plot/cmap_sample.py index 89079214..090f7e7d 100644 --- a/Python_Engine/Python/src/python_toolkit/plot/cmap_sample.py +++ b/Python_Engine/Python/src/python_toolkit/plot/cmap_sample.py @@ -1,42 +1,37 @@ +import numpy as np from matplotlib import pyplot as plt from matplotlib.colors import Colormap, Normalize from matplotlib.figure import Figure -import numpy as np -from typing import Union, Optional plt.rcParams["figure.max_open_warning"] = 0 + def cmap_sample_plot( - cmap: Union[str, Colormap], - bounds: Optional[tuple] = None, - figsize: tuple = (9, 1), - bins: int = 256 + cmap: str | Colormap, bounds: tuple | None = None, figsize: tuple = (9, 1), bins: int = 256 ) -> Figure: + """Generate a sample plot for a given colormap. - """ - Generate a sample plot for a given colormap. - Args: cmap: Either a colormap string (e.g., 'viridis') or a custom Colormap object bounds: Optional tuple of (vmin, vmax) for normalization. If None, uses (0, 1) figsize: Figure size as (width, height) bins: Number of discrete bins for the gradient. Defaults to 256. + Returns: Matplotlib Figure object """ - # Set bounds if bounds is None: bounds = (0, 1) - + vmin, vmax = bounds - + # Create a gradient image with appropriate range. # Use endpoint=False to avoid an emphasized terminal color column at the # right edge when rasterized into a small preview. gradient_row = np.linspace(vmin, vmax, bins, endpoint=False) gradient = np.vstack([gradient_row, gradient_row]) - + # Create the figure and axis fig, ax = plt.subplots(figsize=figsize) fig.patch.set_alpha(0) @@ -46,10 +41,10 @@ def cmap_sample_plot( ax.set_facecolor("none") ax.set_position([0, 0, 1, 1]) ax.margins(x=0, y=0) - + # Create normalization if custom colormap or custom bounds norm = Normalize(vmin=vmin, vmax=vmax) - + # Display the gradient with the specified colormap ax.imshow( gradient, @@ -59,23 +54,25 @@ def cmap_sample_plot( interpolation="nearest", resample=False, ) - + # Remove axes for a cleaner look ax.set_axis_off() - + return fig + if __name__ == "__main__": # Example 1: Using a preset colormap string - fig1 = cmap_sample_plot('viridis') - + fig1 = cmap_sample_plot("viridis") + # Example 2: Using a custom colormap with bounds - fig2 = cmap_sample_plot('plasma', bounds=(0, 100), bins=6) - + fig2 = cmap_sample_plot("plasma", bounds=(0, 100), bins=6) + # Example 3: Creating and using a custom colormap from matplotlib.colors import ListedColormap - custom_colors = ['#1f77b4', '#ff7f0e', '#2ca02c', '#d62728'] + + custom_colors = ["#1f77b4", "#ff7f0e", "#2ca02c", "#d62728"] custom_cmap = ListedColormap(custom_colors) fig3 = cmap_sample_plot(custom_cmap, bounds=(0, 3)) - - plt.show() \ No newline at end of file + + plt.show() diff --git a/Python_Engine/Python/src/python_toolkit/plot/diurnal.py b/Python_Engine/Python/src/python_toolkit/plot/diurnal.py index ed42fdaf..b7fcbcdf 100644 --- a/Python_Engine/Python/src/python_toolkit/plot/diurnal.py +++ b/Python_Engine/Python/src/python_toolkit/plot/diurnal.py @@ -1,8 +1,7 @@ -"""Methods for plotting diurnal profiles from time-indexed data.""" +"""Methods for plotting diurnal profiles from time-indexed data.""" import calendar import textwrap -from typing import Tuple import matplotlib.collections as mcollections import matplotlib.lines as mlines @@ -21,7 +20,7 @@ def diurnal( series: pd.Series, ax: plt.Axes = None, period: str = "daily", - quantile_range: Tuple[float, float] = (0.05, 0.95), + quantile_range: tuple[float, float] = (0.05, 0.95), median: bool = True, mean: bool = True, **kwargs, @@ -52,7 +51,6 @@ def diurnal( plt.Axes: A matplotlib Axes object. """ - if not isinstance(series.index, pd.DatetimeIndex): raise ValueError("Series passed is not datetime indexed.") @@ -86,10 +84,7 @@ def diurnal( series = series.replace([-np.inf, np.inf], np.nan).dropna() # Remove outliers - series = series[ - (series >= series.quantile(minmax_range[0])) - & (series <= series.quantile(minmax_range[1])) - ] + series = series[(series >= series.quantile(minmax_range[0])) & (series <= series.quantile(minmax_range[1]))] # group data if period == "daily": @@ -161,9 +156,7 @@ def diurnal( color=color, lw=None, ec=None, - label=f"{quantile_range[0]:0.0%}-{quantile_range[1]:0.0%}ile" - if n == 0 - else "_nolegend_", + label=f"{quantile_range[0]:0.0%}-{quantile_range[1]:0.0%}ile" if n == 0 else "_nolegend_", ) # q-extreme ax.fill_between( @@ -235,9 +228,7 @@ def diurnal( @bhom_analytics() -def stacked_diurnals( - datasets: list[pd.Series], period: str = "monthly", **kwargs -) -> plt.Figure: +def stacked_diurnals(datasets: list[pd.Series], period: str = "monthly", **kwargs) -> plt.Figure: """Create a matplotlib figure with stacked diurnal profiles. Args: @@ -256,16 +247,13 @@ def stacked_diurnals( plt.Figure: A matplotlib Figure object. """ - if len(datasets) <= 1: raise ValueError("stacked_diurnals requires at least two datasets.") - + style_context = kwargs.pop("style_context", "python_toolkit.bhom") with plt.style.context(style_context): - fig, axes = plt.subplots( - len(datasets), 1, figsize=(12, 2 * len(datasets)), sharex=True - ) + fig, axes = plt.subplots(len(datasets), 1, figsize=(12, 2 * len(datasets)), sharex=True) for n, (ax, series) in enumerate(zip(axes, datasets)): if "colors" in kwargs: @@ -279,21 +267,11 @@ def stacked_diurnals( new_handles = [] for handle in handles: if isinstance(handle, mcollections.PolyCollection): - new_handles.append( - mpatches.Patch( - color="slategray", alpha=handle.get_alpha(), edgecolor=None - ) - ) + new_handles.append(mpatches.Patch(color="slategray", alpha=handle.get_alpha(), edgecolor=None)) if isinstance(handle, mlines.Line2D): - new_handles.append( - mlines.Line2D( - (0,), (0,), color="slategray", linestyle=handle.get_linestyle() - ) - ) + new_handles.append(mlines.Line2D((0,), (0,), color="slategray", linestyle=handle.get_linestyle())) - plt.legend( - new_handles, labels, bbox_to_anchor=(0.5, -0.12), loc="upper center", ncol=4 - ) + plt.legend(new_handles, labels, bbox_to_anchor=(0.5, -0.12), loc="upper center", ncol=4) fig.suptitle( create_title( diff --git a/Python_Engine/Python/src/python_toolkit/plot/heatmap.py b/Python_Engine/Python/src/python_toolkit/plot/heatmap.py index 2eb7e280..b15314bd 100644 --- a/Python_Engine/Python/src/python_toolkit/plot/heatmap.py +++ b/Python_Engine/Python/src/python_toolkit/plot/heatmap.py @@ -1,4 +1,4 @@ -"""Methods for plotting heatmaps from time-indexed data.""" +"""Methods for plotting heatmaps from time-indexed data.""" import matplotlib.dates as mdates import matplotlib.pyplot as plt @@ -46,27 +46,22 @@ def heatmap( The populated plt.Axes object. """ validate_timeseries(series) - - + day_time_matrix = ( - series.dropna() - .to_frame() - .pivot_table(columns=series.dropna().index.date, index=series.dropna().index.time) + series.dropna().to_frame().pivot_table(columns=series.dropna().index.date, index=series.dropna().index.time) ) x = mdates.date2num(day_time_matrix.columns.get_level_values(1)) - y = mdates.date2num( - pd.to_datetime([f"2017-01-01 {i}" for i in day_time_matrix.index]) - ) + y = mdates.date2num(pd.to_datetime([f"2017-01-01 {i}" for i in day_time_matrix.index])) z = day_time_matrix.values if "mask" in kwargs: if not isinstance(kwargs["mask"], (list, np.ndarray, pd.Series)): raise TypeError("The type of 'mask' must be a list, numpy ndarray or pandas Series") if len(kwargs["mask"]) != len(series): - raise ValueError( - f"Length of mask ({len(kwargs['mask'])}) must match length of data ({len(series)})." - ) - mask_flip = pd.Series(kwargs.pop("mask")).to_frame().pivot_table(columns=series.index.date, index=series.index.time) + raise ValueError(f"Length of mask ({len(kwargs['mask'])}) must match length of data ({len(series)}).") + mask_flip = ( + pd.Series(kwargs.pop("mask")).to_frame().pivot_table(columns=series.index.date, index=series.index.time) + ) z = np.ma.masked_array(z, mask=mask_flip) # handle non-standard kwargs @@ -126,4 +121,4 @@ def heatmap( ax.set_title(title) - return ax \ No newline at end of file + return ax diff --git a/Python_Engine/Python/src/python_toolkit/plot/histogram.py b/Python_Engine/Python/src/python_toolkit/plot/histogram.py index 97a3b833..bf294b37 100644 --- a/Python_Engine/Python/src/python_toolkit/plot/histogram.py +++ b/Python_Engine/Python/src/python_toolkit/plot/histogram.py @@ -1,23 +1,25 @@ -"""Methods for plotting binned data""" +"""Methods for plotting binned data.""" import calendar -import pandas as pd -import numpy as np + import matplotlib.pyplot as plt import matplotlib.ticker as mticker +import numpy as np +import pandas as pd from ..bhom.analytics import bhom_analytics -from ..helpers.timeseries import validate_timeseries, timeseries_summary_monthly +from ..helpers.timeseries import timeseries_summary_monthly, validate_timeseries from .utilities import contrasting_colour + @bhom_analytics() def histogram( series: pd.Series, ax: plt.Axes = None, - bins: list[float] | list[int] = None, + bins: list[float] | list[int] | None = None, **kwargs, - ) -> plt.Axes: - """Create a histogram of a pandas series +) -> plt.Axes: + """Create a histogram of a pandas series. Args: series (pd.Series): @@ -37,11 +39,9 @@ def histogram( plt.Axes: The populated plt.Axes object. """ - if bins is None: + if bins is None or len(bins) <= 1: bins = np.linspace(series.values.min(), series.values.max(), 31) - elif len(bins) <= 1: - bins = np.linspace(series.values.min(), series.values.max(), 31) - + style_context = kwargs.pop("style_context", "python_toolkit.bhom") with plt.style.context(style_context): @@ -50,19 +50,20 @@ def histogram( show_legend = kwargs.pop("show_legend", True) - ax.hist(series.values, bins=bins, label = series.name, density=False, **kwargs) + ax.hist(series.values, bins=bins, label=series.name, density=False, **kwargs) if show_legend: ax.legend() return ax + @bhom_analytics() def monthly_proportional_histogram( series: pd.Series, bins: list[float], ax: plt.Axes = None, - labels: list[str] = None, + labels: list[str] | None = None, show_year_in_label: bool = False, show_labels: bool = False, show_legend: bool = False, @@ -94,30 +95,20 @@ def monthly_proportional_histogram( plt.Axes: The populated plt.Axes object. """ - validate_timeseries(series) - + style_context = kwargs.pop("style_context", "python_toolkit.bhom") with plt.style.context(style_context): if ax is None: ax = plt.gca() - + counts = timeseries_summary_monthly(series, bins, labels, density=True) if show_year_in_label: - counts.columns = [ - f"{year}\n{calendar.month_abbr[month]}" for year, month in counts.columns.values - ] - - counts.plot( - ax = ax, - kind = "bar", - stacked = True, - width = kwargs.pop("width", 1), - legend = False, - **kwargs - ) + counts.columns = [f"{year}\n{calendar.month_abbr[month]}" for year, month in counts.columns.values] + + counts.plot(ax=ax, kind="bar", stacked=True, width=kwargs.pop("width", 1), legend=False, **kwargs) ax.set_xlim(-0.5, len(counts) - 0.5) ax.set_ylim(0, 1) @@ -127,7 +118,7 @@ def monthly_proportional_histogram( ha="center", rotation=0, ) - + for spine in ["top", "right", "left", "bottom"]: ax.spines[spine].set_visible(False) ax.yaxis.set_major_formatter(mticker.PercentFormatter(1)) @@ -143,9 +134,7 @@ def monthly_proportional_histogram( if show_labels: for i, c in enumerate(ax.containers): label_colors = [contrasting_colour(i.get_facecolor()) for i in c.patches] - labels = [ - f"{v.get_height():0.1%}" if v.get_height() > 0.15 else "" for v in c - ] + labels = [f"{v.get_height():0.1%}" if v.get_height() > 0.15 else "" for v in c] ax.bar_label( c, labels=labels, @@ -154,4 +143,4 @@ def monthly_proportional_histogram( fontsize="x-small", ) - return ax \ No newline at end of file + return ax diff --git a/Python_Engine/Python/src/python_toolkit/plot/parallel_coordinate_plot.py b/Python_Engine/Python/src/python_toolkit/plot/parallel_coordinate_plot.py index 60c1d86f..81148589 100644 --- a/Python_Engine/Python/src/python_toolkit/plot/parallel_coordinate_plot.py +++ b/Python_Engine/Python/src/python_toolkit/plot/parallel_coordinate_plot.py @@ -1,16 +1,15 @@ -import plotly.graph_objects as go +import math + import pandas as pd +import plotly.graph_objects as go from matplotlib.colors import Colormap -import decimal as d -from typing import List, Dict -import math from ..bhom.analytics import bhom_analytics -def set_dimensions(df: pd.DataFrame, tick_mark_count: int, dp:int) -> List[Dict[str, any]]: +def set_dimensions(df: pd.DataFrame, tick_mark_count: int, dp: int) -> list[dict[str, any]]: """Set the dimensions for a parallel coordinate plot, based on column datatypes and unique values. - + Args: df (pd.DataFrame): The pandas DataFrame to plot. @@ -18,68 +17,68 @@ def set_dimensions(df: pd.DataFrame, tick_mark_count: int, dp:int) -> List[Dict[ The number of tick marks to show on the parallel coordinate plot. dp (int): The number of decimal places to show on the tick marks. - + Returns: list[dict[str, any]]: A list of dimensions to plot. """ - df_copy = df.copy() dimensions = [] for column in df_copy.columns: - dim = {} - dim['label'] = str(column) + dim["label"] = str(column) if df_copy[column].dtype == "object": - #for catagorical data types, convert to numerical, with text as tick marks + # for catagorical data types, convert to numerical, with text as tick marks df_copy[column] = df_copy[column].astype("category").cat.codes - dim['values'] = df_copy[column] - dim['tickvals'] = df_copy[column].unique() - dim['ticktext'] = df[column].unique() + dim["values"] = df_copy[column] + dim["tickvals"] = df_copy[column].unique() + dim["ticktext"] = df[column].unique() dimensions.append(dim) continue - - dim['values'] = df_copy[column] - if df_copy[column].nunique() < tick_mark_count: + dim["values"] = df_copy[column] - dim['range'] = [df_copy[column].min(), df_copy[column].max()] - dim['tickvals'] = dim['ticktext'] = df_copy[column].unique() + if df_copy[column].nunique() < tick_mark_count: + dim["range"] = [df_copy[column].min(), df_copy[column].max()] + dim["tickvals"] = dim["ticktext"] = df_copy[column].unique() dimensions.append(dim) else: # reduce the number of tick marks if the column has a large number of unique values - dim['range'] = [df_copy[column].min(), df_copy[column].max()] + dim["range"] = [df_copy[column].min(), df_copy[column].max()] - if (dim['range'][1] - dim['range'][0] +1) < tick_mark_count: - tick_mark_count = math.ceil(dim['range'][1] - dim['range'][0]) + 1 + if (dim["range"][1] - dim["range"][0] + 1) < tick_mark_count: + tick_mark_count = math.ceil(dim["range"][1] - dim["range"][0]) + 1 - dim['tickvals'] = [df_copy[column].min() + i * (df_copy[column].max() - df_copy[column].min()) / (tick_mark_count - 1) for i in range(tick_mark_count)] - dim['ticktext'] = [round(i ,dp) for i in dim['tickvals']] + dim["tickvals"] = [ + df_copy[column].min() + i * (df_copy[column].max() - df_copy[column].min()) / (tick_mark_count - 1) + for i in range(tick_mark_count) + ] + dim["ticktext"] = [round(i, dp) for i in dim["tickvals"]] dimensions.append(dim) return dimensions - + + @bhom_analytics() def parallel_coordinate_plot( - - df: pd.DataFrame = pd.DataFrame(), - variables_to_show: list = None, + df: pd.DataFrame | None = None, + variables_to_show: list | None = None, decimal_places: int = 0, tick_mark_count: int = 11, - colour_key: str = None, + colour_key: str | None = None, cmap: Colormap = "viridis", - dimensions: List[dict] = None, + dimensions: list[dict] | None = None, plot_title: str = "", - plot_bgcolour: str = 'black', - paper_bgcolour: str = 'black', - font_colour: str = 'white', + plot_bgcolour: str = "black", + paper_bgcolour: str = "black", + font_colour: str = "white", **kwargs, ) -> go.Figure: """Create a parallel coordinate plot of a pandas DataFrame. @@ -109,12 +108,13 @@ def parallel_coordinate_plot( The color of the font used in the plot. Defaults to 'white'. **kwargs: Additional keyword arguments to pass to go.Parcoords(). - + Returns: go.Figure: The populated go.Figure object. """ - + if df is None: + df = pd.DataFrame() if variables_to_show is not None: df = df[variables_to_show] @@ -123,22 +123,13 @@ def parallel_coordinate_plot( if colour_key is None and not df.empty: colour_key = df.columns[-1] - - line = dict(color=df[colour_key], colorscale=cmap) - - fig = go.Figure( - data=go.Parcoords( - line = line, - dimensions = dimensions, - **kwargs - ) - ) + + line = {"color": df[colour_key], "colorscale": cmap} + + fig = go.Figure(data=go.Parcoords(line=line, dimensions=dimensions, **kwargs)) fig.update_layout( - title = plot_title, - plot_bgcolor = plot_bgcolour, - paper_bgcolor = paper_bgcolour, - font_color = font_colour + title=plot_title, plot_bgcolor=plot_bgcolour, paper_bgcolor=paper_bgcolour, font_color=font_colour ) - return fig \ No newline at end of file + return fig diff --git a/Python_Engine/Python/src/python_toolkit/plot/spatial_heatmap.py b/Python_Engine/Python/src/python_toolkit/plot/spatial_heatmap.py index 8861ffaa..ae351134 100644 --- a/Python_Engine/Python/src/python_toolkit/plot/spatial_heatmap.py +++ b/Python_Engine/Python/src/python_toolkit/plot/spatial_heatmap.py @@ -1,4 +1,4 @@ -"""Methods for plotting spatial heatmaps.""" +"""Methods for plotting spatial heatmaps.""" import matplotlib.pyplot as plt import numpy as np @@ -14,21 +14,21 @@ def spatial_heatmap( triangulations: list[Triangulation], values: list[list[float]], - levels: list[float] | int = None, - contours: list[float] = None, - contour_colors: list[str] = None, - contour_widths: list[float] = None, + levels: list[float] | int | None = None, + contours: list[float] | None = None, + contour_colors: list[str] | None = None, + contour_widths: list[float] | None = None, cmap: Colormap = "viridis", extend: str = "neither", norm: BoundaryNorm = None, - xlims: list[float] = None, - ylims: list[float] = None, + xlims: list[float] | None = None, + ylims: list[float] | None = None, colorbar_label: str = "", title: str = "", - highlight_pts: dict[str, tuple[int]] = None, + highlight_pts: dict[str, tuple[int]] | None = None, show_legend_title: bool = True, clabels: bool = False, - style_context:str = "python_toolkit.bhom", + style_context: str = "python_toolkit.bhom", ) -> Figure: """Plot a spatial map of a variable using a triangulation and associated values. @@ -76,14 +76,10 @@ def spatial_heatmap( """ for tri, zs in list(zip(*[triangulations, values])): if len(tri.x) != len(zs): - raise ValueError( - "The shape of the triangulations and values given do not match." - ) + raise ValueError("The shape of the triangulations and values given do not match.") if levels is None: - levels = np.linspace( - min(np.amin(i) for i in values), max(np.amax(i) for i in values), 10 - ) + levels = np.linspace(min(np.amin(i) for i in values), max(np.amax(i) for i in values), 10) if xlims is None: xlims = [ @@ -96,7 +92,7 @@ def spatial_heatmap( min(i.y.min() for i in triangulations), max(i.y.max() for i in triangulations), ] - + with plt.style.context(style_context): fig, ax = plt.subplots(1, 1, figsize=(8, 8)) @@ -108,15 +104,10 @@ def spatial_heatmap( tcls = [] for tri, zs in list(zip(*[triangulations, values])): - tcf = ax.tricontourf( - tri, zs, extend=extend, cmap=cmap, levels=levels, norm=norm - ) + tcf = ax.tricontourf(tri, zs, extend=extend, cmap=cmap, levels=levels, norm=norm) # add contour lines if contours is not None: - if not ( - all(i < np.amin(zs) for i in contours) - or all(i > np.amax(zs) for i in contours) - ): + if not (all(i < np.amin(zs) for i in contours) or all(i > np.amax(zs) for i in contours)): if contour_widths is None: contour_widths = [1.5] * len(contours) if contour_colors is None: @@ -136,14 +127,10 @@ def spatial_heatmap( if highlight_pts is not None: if len(triangulations) > 1: - raise ValueError( - "Point highlighting is only possible for 1-length triangulations." - ) + raise ValueError("Point highlighting is only possible for 1-length triangulations.") pt_size = (xlims[1] - xlims[0]) / 5 for k, v in highlight_pts.items(): - ax.scatter( - triangulations[0].x[v], triangulations[0].y[v], s=pt_size, c="red" - ) + ax.scatter(triangulations[0].x[v], triangulations[0].y[v], s=pt_size, c="red") ax.text( triangulations[0].x[v] + (pt_size / 10), triangulations[0].y[v], @@ -158,7 +145,8 @@ def spatial_heatmap( cax = divider.append_axes("right", size="5%", pad=0.1, aspect=20) cbar = plt.colorbar( - tcf, cax=cax # , format=mticker.StrMethodFormatter("{x:04.1f}") + tcf, + cax=cax, # , format=mticker.StrMethodFormatter("{x:04.1f}") ) cbar.outline.set_visible(False) cbar.set_label(colorbar_label) diff --git a/Python_Engine/Python/src/python_toolkit/plot/timeseries.py b/Python_Engine/Python/src/python_toolkit/plot/timeseries.py index 35577787..93b2b689 100644 --- a/Python_Engine/Python/src/python_toolkit/plot/timeseries.py +++ b/Python_Engine/Python/src/python_toolkit/plot/timeseries.py @@ -1,6 +1,7 @@ -"""Methods for plotting time-indexed data.""" +"""Methods for plotting time-indexed data.""" from datetime import datetime + import matplotlib.pyplot as plt import pandas as pd @@ -12,8 +13,8 @@ def timeseries( series: pd.Series, ax: plt.Axes = None, - xlims: tuple[datetime] = None, - ylims: tuple[datetime] = None, + xlims: tuple[datetime] | None = None, + ylims: tuple[datetime] | None = None, **kwargs, ) -> plt.Axes: """Create a timeseries plot of a pandas Series. @@ -36,9 +37,8 @@ def timeseries( plt.Axes: The populated plt.Axes object. """ - validate_timeseries(series) - + style_context = kwargs.pop("style_context", "python_toolkit.bhom") with plt.style.context(style_context): @@ -59,4 +59,4 @@ def timeseries( else: ax.set_ylim(ylims) - return ax \ No newline at end of file + return ax diff --git a/Python_Engine/Python/src/python_toolkit/plot/utilities.py b/Python_Engine/Python/src/python_toolkit/plot/utilities.py index fd71cc9d..9b6c1638 100644 --- a/Python_Engine/Python/src/python_toolkit/plot/utilities.py +++ b/Python_Engine/Python/src/python_toolkit/plot/utilities.py @@ -1,12 +1,15 @@ -"""Text and colour utility methods for plotting""" +"""Text and colour utility methods for plotting.""" import base64 import colorsys +import copy import io from pathlib import Path from typing import Any -import copy +import matplotlib.image as mimage +import matplotlib.pyplot as plt +import matplotlib.ticker as mticker import numpy as np from matplotlib.colors import ( LinearSegmentedColormap, @@ -18,13 +21,12 @@ to_rgb, to_rgba_array, ) -import matplotlib.image as mimage -import matplotlib.pyplot as plt -import matplotlib.ticker as mticker from matplotlib.tri import Triangulation from PIL import Image + from ..bhom.analytics import bhom_analytics + @bhom_analytics() def average_color(colors: Any, keep_alpha: bool = False) -> str: """Return the average color from a list of colors. @@ -39,21 +41,19 @@ def average_color(colors: Any, keep_alpha: bool = False) -> str: color: str The average color in hex format. """ - if not isinstance(colors, (list, tuple)): raise ValueError("colors must be a list") for i in colors: if not is_color_like(i): - raise ValueError( - f"colors must be a list of valid colors - '{i}' is not valid." - ) + raise ValueError(f"colors must be a list of valid colors - '{i}' is not valid.") if len(colors) == 1: return colors[0] return rgb2hex(to_rgba_array(colors).mean(axis=0), keep_alpha=keep_alpha) + @bhom_analytics() def animation( images: list[str | Path | Image.Image], @@ -85,9 +85,7 @@ def animation( elif isinstance(i, Image.Image): _images.append(i) else: - raise ValueError( - f"images must be a list of strings, Paths or PIL Image objects - {i} is not valid." - ) + raise ValueError(f"images must be a list of strings, Paths or PIL Image objects - {i} is not valid.") # create white background background = Image.new("RGBA", _images[0].size, (255, 255, 255)) @@ -107,6 +105,7 @@ def animation( return output_gif + def create_title(text: str, plot_type: str) -> str: """Create a title for a plot. @@ -131,6 +130,7 @@ def create_title(text: str, plot_type: str) -> str: ] ) + def contrasting_colour(color: Any): """Calculate the contrasting color for a given color. @@ -145,8 +145,9 @@ def contrasting_colour(color: Any): """ return ".15" if relative_luminance(color) > 0.408 else "w" + def relative_luminance(color: Any): - """Calculate the relative luminance of a color according to W3C standards + """Calculate the relative luminance of a color according to W3C standards. Args: color (Any): @@ -165,11 +166,9 @@ def relative_luminance(color: Any): except ValueError: return lum -def colormap_sequential( - *colors: str | float | int | tuple, N: int = 256 -) -> LinearSegmentedColormap: - """ - Create a sequential colormap from a list of input colors. + +def colormap_sequential(*colors: str | float | int | tuple, N: int = 256) -> LinearSegmentedColormap: + """Create a sequential colormap from a list of input colors. Args: *colors (str | float | int | tuple): @@ -192,7 +191,6 @@ def colormap_sequential( "#732982" ) """ - if len(colors) < 2: raise KeyError("Not enough colors input to create a colormap.") @@ -206,13 +204,14 @@ def colormap_sequential( N=N, ) + def annotate_imshow( im: mimage.AxesImage, - data: list[float] = None, + data: list[float] | None = None, valfmt: str = "{x:.2f}", textcolors: tuple[str] = ("black", "white"), - threshold: float = None, - exclude_vals: list[float] = None, + threshold: float | None = None, + exclude_vals: list[float] | None = None, **text_kw, ) -> list[str]: """A function to annotate a heatmap. @@ -241,7 +240,6 @@ def annotate_imshow( list[str]: The texts added to the AxesImage. """ - if not isinstance(data, (list, np.ndarray)): data = im.get_array() @@ -273,9 +271,9 @@ def annotate_imshow( return texts + def lighten_color(color: str | tuple, amount: float = 0.5) -> tuple[float]: - """ - Lightens the given color by multiplying (1-luminosity) by the given amount. + """Lightens the given color by multiplying (1-luminosity) by the given amount. Args: color (str): @@ -314,16 +312,16 @@ def base64_to_image(base64_string: str, image_path: Path) -> Path: Path: The path to the image file. """ - # remove html pre-amble, if necessary if base64_string.startswith("data:image"): base64_string = base64_string.split(";")[-1] with open(Path(image_path), "wb") as fp: - fp.write(base64.decodebytes(base64_string.encode('utf-8'))) + fp.write(base64.decodebytes(base64_string.encode("utf-8"))) return image_path + @bhom_analytics() def image_to_base64(image_path: Path, html: bool = False) -> str: """Load an image file from disk and convert to base64 string. @@ -338,16 +336,13 @@ def image_to_base64(image_path: Path, html: bool = False) -> str: str: A base64 string encoding of the input image file. """ - # convert path string to Path object image_path = Path(image_path).absolute() # ensure format is supported supported_formats = [".png", ".jpg", ".jpeg"] if image_path.suffix not in supported_formats: - raise ValueError( - f"'{image_path.suffix}' format not supported. Use one of {supported_formats}" - ) + raise ValueError(f"'{image_path.suffix}' format not supported. Use one of {supported_formats}") # load image and convert to base64 string with open(image_path, "rb") as image_file: @@ -360,6 +355,7 @@ def image_to_base64(image_path: Path, html: bool = False) -> str: return base64_string + @bhom_analytics() def figure_to_base64(figure: plt.Figure, html: bool = False, transparent: bool = True) -> str: """Convert a matplotlib figure object into a base64 string. @@ -374,7 +370,6 @@ def figure_to_base64(figure: plt.Figure, html: bool = False, transparent: bool = str: A base64 string encoding of the input figure object. """ - buffer = io.BytesIO() figure.savefig(buffer, transparent=transparent) buffer.seek(0) @@ -387,6 +382,7 @@ def figure_to_base64(figure: plt.Figure, html: bool = False, transparent: bool = return base64_string + @bhom_analytics() def figure_to_image(fig: plt.Figure) -> Image: """Convert a matplotlib Figure object into a PIL Image. @@ -399,7 +395,6 @@ def figure_to_image(fig: plt.Figure) -> Image: Image: A PIL Image. """ - # draw the renderer fig.canvas.draw() @@ -411,10 +406,9 @@ def figure_to_image(fig: plt.Figure) -> Image: return Image.fromarray(buf) + @bhom_analytics() -def tile_images( - imgs: list[Path] | list[Image.Image], rows: int, cols: int -) -> Image.Image: +def tile_images(imgs: list[Path] | list[Image.Image], rows: int, cols: int) -> Image.Image: """Tile a set of images into a grid. Args: @@ -429,16 +423,13 @@ def tile_images( Image.Image: A PIL image of the tiled images. """ - imgs = np.array([Path(i) for i in np.array(imgs).flatten()]) # open images if paths passed imgs = [Image.open(img) if isinstance(img, Path) else img for img in imgs] if len(imgs) != rows * cols: - raise ValueError( - f"The number of images given ({len(imgs)}) does not equal ({rows}*{cols})" - ) + raise ValueError(f"The number of images given ({len(imgs)}) does not equal ({rows}*{cols})") # ensure each image has the same dimensions w, h = imgs[0].size @@ -455,6 +446,7 @@ def tile_images( return grid + @bhom_analytics() def triangulation_area(triang: Triangulation) -> float: """Calculate the area of a matplotlib Triangulation. @@ -467,7 +459,6 @@ def triangulation_area(triang: Triangulation) -> float: float: The area of the Triangulation in the units given. """ - triangles = triang.triangles x, y = triang.x, triang.y a, _ = triangles.shape @@ -476,21 +467,20 @@ def triangulation_area(triang: Triangulation) -> float: np.abs( 0.5 * ( - (x[triangles[i, 1]] - x[triangles[i, 0]]) - * (y[triangles[i, 2]] - y[triangles[i, 0]]) - - (x[triangles[i, 2]] - x[triangles[i, 0]]) - * (y[triangles[i, 1]] - y[triangles[i, 0]]) + (x[triangles[i, 1]] - x[triangles[i, 0]]) * (y[triangles[i, 2]] - y[triangles[i, 0]]) + - (x[triangles[i, 2]] - x[triangles[i, 0]]) * (y[triangles[i, 1]] - y[triangles[i, 0]]) ) ) ) return area + @bhom_analytics() def create_triangulation( x: list[float], y: list[float], - alpha: float = None, + alpha: float | None = None, max_iterations: int = 250, increment: float = 0.01, ) -> Triangulation: @@ -516,7 +506,6 @@ def create_triangulation( Triangulation: A matplotlib Triangulation object. """ - if alpha is None: # TODO - add method here to automatically determine appropriate alpha value alpha = 1.1 @@ -549,13 +538,12 @@ def create_triangulation( break if count > max_iterations: plt.close(fig) - raise ValueError( - f"Could not create a valid triangulation mask within {max_iterations}" - ) + raise ValueError(f"Could not create a valid triangulation mask within {max_iterations}") plt.close(fig) triang.set_mask(maxi > alpha) return triang + @bhom_analytics() def format_polar_plot(ax: plt.Axes, yticklabels: bool = True) -> plt.Axes: """Format a polar plot, to save on having to write this every time!""" @@ -570,9 +558,7 @@ def format_polar_plot(ax: plt.Axes, yticklabels: bool = True) -> plt.Axes: ax.set_xticks(np.radians((0, 90, 180, 270)), minor=False) ax.set_xticklabels(("N", "E", "S", "W"), minor=False, **{"fontsize": "medium"}) ax.set_xticks( - np.radians( - (22.5, 45, 67.5, 112.5, 135, 157.5, 202.5, 225, 247.5, 292.5, 315, 337.5) - ), + np.radians((22.5, 45, 67.5, 112.5, 135, 157.5, 202.5, 225, 247.5, 292.5, 315, 337.5)), minor=True, ) ax.set_xticklabels( diff --git a/Python_Engine/Python/src/python_toolkit/scaffold/__init__.py b/Python_Engine/Python/src/python_toolkit/scaffold/__init__.py new file mode 100644 index 00000000..be972a56 --- /dev/null +++ b/Python_Engine/Python/src/python_toolkit/scaffold/__init__.py @@ -0,0 +1,226 @@ +"""Create a new BHoM Python toolkit from the standard template. + +Usage (from any environment with python_toolkit installed):: + + bhom-new-toolkit Wind_Toolkit --output C:/repos/Wind_Toolkit/Wind_Toolkit_Engine/Python --python 3.11 + +or equivalently ``python -m python_toolkit.scaffold ...``, or ``BH.Engine.Python.Compute.CreateToolkit`` from C#. + +The generated toolkit is a standalone UV project that: + +* depends on the root ``python_toolkit`` (and any other toolkits given with ``--depends-on``) through UV path sources + pointing at the deployed BHoM Python extensions directory, so each toolkit can use its own Python version; +* extends the shared BHoM ruff configuration; +* contains an example module using BHoM logging and usage analytics, pytest tests, and Sphinx documentation. +""" + +from __future__ import annotations + +import argparse +import keyword +import os +import re +import sys +from collections.abc import Sequence +from dataclasses import dataclass, field +from pathlib import Path +from string import Template + +TEMPLATE_DIRECTORY = Path(__file__).parent / "template" +ROOT_TOOLKIT = "Python_Toolkit" +TOOLKIT_NAME_PATTERN = re.compile(r"^[A-Za-z][A-Za-z0-9]*(_[A-Za-z0-9]+)*$") +PYTHON_VERSION_PATTERN = re.compile(r"^3\.(\d+)$") +MINIMUM_PYTHON_MINOR = 10 +EXTRAS = ("plot", "ui", "clr") + +# template file names cannot start with "." or use "__x__" folders, as the BHoM build excludes those when deploying +_RENAMES = {"dot-gitignore": ".gitignore", "dot-python-version": ".python-version"} +_PACKAGE_PLACEHOLDER = "PACKAGE_NAME" + + +def default_extensions_directory() -> Path: + """The deployed BHoM Python extensions directory (overridable with BHOM_PYTHON_EXTENSIONS_DIR).""" + override = os.environ.get("BHOM_PYTHON_EXTENSIONS_DIR") + if override: + return Path(override) + return Path(os.environ.get("PROGRAMDATA", "C:/ProgramData")) / "BHoM" / "Extensions" / "Python" + + +def package_name(toolkit_name: str) -> str: + """The Python package name for a toolkit name, e.g. ``Wind_Toolkit`` -> ``wind_toolkit``.""" + return toolkit_name.lower() + + +@dataclass +class ToolkitSpec: + """The specification of a toolkit to create.""" + + name: str + output: Path + python_version: str = "3.10" + depends_on: list[str] = field(default_factory=list) + extras: list[str] = field(default_factory=list) + description: str = "" + extensions_directory: Path = field(default_factory=default_extensions_directory) + + @property + def package(self) -> str: + """The Python package name.""" + return package_name(self.name) + + def validate(self) -> None: + """Raise ValueError if the specification is invalid.""" + if not TOOLKIT_NAME_PATTERN.match(self.name): + raise ValueError( + f"Invalid toolkit name {self.name!r}: use letters, digits and single underscores, starting with a letter " + "(e.g. 'Wind_Toolkit')." + ) + if keyword.iskeyword(self.package) or self.package == package_name(ROOT_TOOLKIT): + raise ValueError(f"{self.name!r} cannot be used as a toolkit name.") + match = PYTHON_VERSION_PATTERN.match(self.python_version) + if not match or int(match.group(1)) < MINIMUM_PYTHON_MINOR: + raise ValueError( + f"Invalid Python version {self.python_version!r}: give a major.minor version of 3.{MINIMUM_PYTHON_MINOR} " + "or later (e.g. '3.11')." + ) + for dependency in self.depends_on: + if not TOOLKIT_NAME_PATTERN.match(dependency): + raise ValueError(f"Invalid dependency toolkit name {dependency!r}.") + unknown = sorted(set(self.extras) - set(EXTRAS)) + if unknown: + raise ValueError(f"Unknown python_toolkit extras {unknown}; choose from {list(EXTRAS)}.") + if self.output.exists() and any(self.output.iterdir()): + raise ValueError(f"The output directory {self.output} already exists and is not empty.") + + def substitutions(self) -> dict[str, str]: + """The values substituted into the template files.""" + minor = int(self.python_version.split(".")[1]) + root_requirement = package_name(ROOT_TOOLKIT) + if self.extras: + root_requirement += f"[{','.join(sorted(set(self.extras)))}]" + requirements = [root_requirement] + [package_name(d) for d in self.depends_on if d != ROOT_TOOLKIT] + + sources = [] + for toolkit in [ROOT_TOOLKIT, *(d for d in self.depends_on if d != ROOT_TOOLKIT)]: + path = (self.extensions_directory / toolkit).as_posix() + sources.append(f'{package_name(toolkit)} = {{ path = "{path}", editable = true }}') + + return { + "name": self.name, + "package": self.package, + "description": self.description or f"The {self.name} BHoM Python toolkit.", + "python_version": self.python_version, + "requires_python": f">={self.python_version},<3.{minor + 1}", + "dependencies": "".join(f' "{r}",\n' for r in requirements), + "sources": "\n".join(sources), + "ruff_config": (self.extensions_directory / ROOT_TOOLKIT / "ruff.toml").as_posix(), + } + + +def create_toolkit(spec: ToolkitSpec) -> list[Path]: + """Create a toolkit from the template. + + Args: + spec: The specification of the toolkit. + + Returns: + The files created. + + Raises: + ValueError: If the specification is invalid. + """ + spec.validate() + values = spec.substitutions() + + created = [] + for template in sorted(TEMPLATE_DIRECTORY.rglob("*.tmpl")): + relative = template.relative_to(TEMPLATE_DIRECTORY).with_suffix("") + parts = [_RENAMES.get(part, part).replace(_PACKAGE_PLACEHOLDER, spec.package) for part in relative.parts] + target = spec.output.joinpath(*parts) + target.parent.mkdir(parents=True, exist_ok=True) + content = Template(template.read_text(encoding="utf-8")).substitute(values) + target.write_text(content, encoding="utf-8", newline="\n") + created.append(target) + return created + + +def next_steps(spec: ToolkitSpec) -> str: + """Instructions for wiring the created toolkit into BHoM.""" + deploy = f"$(ProgramData)\\BHoM\\Extensions\\Python\\{spec.name}" + return f"""Created {spec.name} at {spec.output} + +Next steps: + 1. Develop locally: cd "{spec.output}" && uv sync && uv run pytest + 2. Deploy with BHoM: add the following to your _Engine.csproj so that building copies this folder to + {deploy} (pass -p:BHoMSkipDeploy=true to build without deploying): + + + {deploy} + $(DefaultItemExcludes);Python\\.venv\\**;Python\\**\\__pycache__\\** + + + + + + + + + + 3. Create the environment from C#: + BH.Engine.Python.Compute.VirtualEnvironment(tomlFile: Path.Combine(Query.DirectoryEnvironments(), "{spec.name}", "pyproject.toml")) + 4. Run its tests from C#: + BH.Engine.Python.Compute.RunPytest(Path.Combine(Query.DirectoryEnvironments(), "{spec.name}"), run: true) +""" + + +def _parse_args(argv: Sequence[str] | None) -> argparse.Namespace: + parser = argparse.ArgumentParser(prog="bhom-new-toolkit", description=__doc__.split("\n\n")[0]) + parser.add_argument("name", help="The toolkit name, e.g. Wind_Toolkit. The package will be its lower-case form.") + parser.add_argument("--output", type=Path, help="The folder to create the toolkit in (default: ./).") + parser.add_argument("--python", dest="python_version", default="3.10", help="The Python version, e.g. 3.11.") + parser.add_argument( + "--depends-on", + action="append", + default=[], + metavar="TOOLKIT", + help="Another BHoM Python toolkit this toolkit depends on (repeatable). Python_Toolkit is always included.", + ) + parser.add_argument( + "--extras", action="append", default=[], choices=EXTRAS, help="python_toolkit extras to depend on (repeatable)." + ) + parser.add_argument("--description", default="", help="A one-line description of the toolkit.") + parser.add_argument( + "--extensions-dir", + type=Path, + default=default_extensions_directory(), + help="The deployed BHoM Python extensions directory containing dependency toolkits.", + ) + return parser.parse_args(argv) + + +def main(argv: Sequence[str] | None = None) -> int: + """Command line entry point. + + Args: + argv: The command line arguments (defaults to sys.argv). + + Returns: + The exit code. + """ + args = _parse_args(argv) + spec = ToolkitSpec( + name=args.name, + output=(args.output or Path.cwd() / args.name).absolute(), + python_version=args.python_version, + depends_on=args.depends_on, + extras=args.extras, + description=args.description, + extensions_directory=args.extensions_dir, + ) + try: + create_toolkit(spec) + except ValueError as error: + print(f"error: {error}", file=sys.stderr) + return 2 + print(next_steps(spec)) + return 0 diff --git a/Python_Engine/Python/src/python_toolkit/scaffold/__main__.py b/Python_Engine/Python/src/python_toolkit/scaffold/__main__.py new file mode 100644 index 00000000..8033fe03 --- /dev/null +++ b/Python_Engine/Python/src/python_toolkit/scaffold/__main__.py @@ -0,0 +1,7 @@ +"""Allow ``python -m python_toolkit.scaffold``.""" + +import sys + +from . import main + +sys.exit(main()) diff --git a/Python_Engine/Python/src/python_toolkit/scaffold/template/README.md.tmpl b/Python_Engine/Python/src/python_toolkit/scaffold/template/README.md.tmpl new file mode 100644 index 00000000..649b8732 --- /dev/null +++ b/Python_Engine/Python/src/python_toolkit/scaffold/template/README.md.tmpl @@ -0,0 +1,21 @@ +# $name + +$description + +## Development + +This toolkit is a standalone [uv](https://docs.astral.sh/uv/) project. It depends on the root BHoM +`python_toolkit` (and any other BHoM toolkits) installed in the BHoM Python extensions directory. + +```powershell +uv sync # create/update .venv +uv run pytest # run tests +uv run ruff format; uv run ruff check --fix # format and lint +uv run --group docs sphinx-build docs docs/_build/html # build documentation +``` + +## Conventions + +- Get a logger with `python_toolkit.bhom.logging.get_logger("$name")`. +- Decorate public methods with `python_toolkit.bhom.analytics.bhom_analytics()` to record usage. +- Use Google-style docstrings; they are used to generate the documentation. diff --git a/Python_Engine/Python/src/python_toolkit/scaffold/template/docs/conf.py.tmpl b/Python_Engine/Python/src/python_toolkit/scaffold/template/docs/conf.py.tmpl new file mode 100644 index 00000000..90299daa --- /dev/null +++ b/Python_Engine/Python/src/python_toolkit/scaffold/template/docs/conf.py.tmpl @@ -0,0 +1,27 @@ +"""Sphinx configuration (build with ``uv run --group docs sphinx-build docs docs/_build/html``).""" + +import importlib.metadata + +project = "$name" +author = "BHoM" +copyright = "BHoM" +try: + release = importlib.metadata.version("$package") +except importlib.metadata.PackageNotFoundError: + release = "0.0.0" + +extensions = [ + "autoapi.extension", + "myst_parser", + "sphinx.ext.napoleon", + "sphinx.ext.viewcode", +] + +autoapi_type = "python" +autoapi_dirs = ["../src"] +autoapi_options = ["members", "undoc-members", "show-inheritance", "show-module-summary"] +napoleon_google_docstring = True +napoleon_numpy_docstring = False + +html_theme = "furo" +html_title = project diff --git a/Python_Engine/Python/src/python_toolkit/scaffold/template/docs/index.md.tmpl b/Python_Engine/Python/src/python_toolkit/scaffold/template/docs/index.md.tmpl new file mode 100644 index 00000000..73fb8e23 --- /dev/null +++ b/Python_Engine/Python/src/python_toolkit/scaffold/template/docs/index.md.tmpl @@ -0,0 +1,10 @@ +# $name + +$description + +```{toctree} +:maxdepth: 2 +:caption: API reference + +autoapi/index +``` diff --git a/Python_Engine/Python/src/python_toolkit/scaffold/template/dot-gitignore.tmpl b/Python_Engine/Python/src/python_toolkit/scaffold/template/dot-gitignore.tmpl new file mode 100644 index 00000000..defc8472 --- /dev/null +++ b/Python_Engine/Python/src/python_toolkit/scaffold/template/dot-gitignore.tmpl @@ -0,0 +1,11 @@ +.venv/ +__pycache__/ +*.py[cod] +.pytest_cache/ +.pytest_results.xml +.ruff_cache/ +.coverage +htmlcov/ +docs/_build/ +docs/autoapi/ +uv.lock diff --git a/Python_Engine/Python/src/python_toolkit/scaffold/template/dot-python-version.tmpl b/Python_Engine/Python/src/python_toolkit/scaffold/template/dot-python-version.tmpl new file mode 100644 index 00000000..0b4c71ce --- /dev/null +++ b/Python_Engine/Python/src/python_toolkit/scaffold/template/dot-python-version.tmpl @@ -0,0 +1 @@ +$python_version diff --git a/Python_Engine/Python/src/python_toolkit/scaffold/template/pyproject.toml.tmpl b/Python_Engine/Python/src/python_toolkit/scaffold/template/pyproject.toml.tmpl new file mode 100644 index 00000000..99bf350a --- /dev/null +++ b/Python_Engine/Python/src/python_toolkit/scaffold/template/pyproject.toml.tmpl @@ -0,0 +1,53 @@ +[project] +name = "$package" +version = "999.999.999" # This placeholder value is replaced by the BHoM build system during packaging. +description = "$description" +readme = "README.md" +requires-python = "$requires_python" +authors = [{ name = "BHoM", email = "bhombot@burohappold.com" }] +dependencies = [ +$dependencies] + +[build-system] +requires = ["hatchling"] +build-backend = "hatchling.build" + +[tool.hatch.build.targets.wheel] +packages = ["src/$package"] + +# Other BHoM toolkits are installed from their deployed locations, so each toolkit keeps its own environment +# (and Python version) while sharing the root toolkit's code. +[tool.uv.sources] +$sources + +[dependency-groups] +dev = [ + "ipykernel", + "pytest", + "pytest-cov", + "ruff", +] +docs = [ + "furo", + "myst-parser", + "sphinx", + "sphinx-autoapi", +] + +[tool.uv] +default-groups = ["dev"] + +# The shared BHoM formatting and linting standard. Add toolkit-specific exceptions below it. +# (Paths in the shared file resolve relative to that file, so path-based settings must be set here.) +[tool.ruff] +extend = "$ruff_config" +src = ["src", "tests"] + +[tool.ruff.lint.extend-per-file-ignores] +"tests/**" = ["D"] +"docs/conf.py" = ["D"] + +[tool.pytest.ini_options] +testpaths = ["tests"] +addopts = "-ra --strict-markers" +markers = ["slow: long-running tests (deselect with -m \"not slow\")"] diff --git a/Python_Engine/Python/src/python_toolkit/scaffold/template/src/PACKAGE_NAME/__init__.py.tmpl b/Python_Engine/Python/src/python_toolkit/scaffold/template/src/PACKAGE_NAME/__init__.py.tmpl new file mode 100644 index 00000000..3f2e017f --- /dev/null +++ b/Python_Engine/Python/src/python_toolkit/scaffold/template/src/PACKAGE_NAME/__init__.py.tmpl @@ -0,0 +1,7 @@ +"""$description""" + +from python_toolkit.bhom.logging import get_logger + +TOOLKIT_NAME = "$name" + +LOGGER = get_logger(TOOLKIT_NAME) diff --git a/Python_Engine/Python/src/python_toolkit/scaffold/template/src/PACKAGE_NAME/example.py.tmpl b/Python_Engine/Python/src/python_toolkit/scaffold/template/src/PACKAGE_NAME/example.py.tmpl new file mode 100644 index 00000000..ddbfb379 --- /dev/null +++ b/Python_Engine/Python/src/python_toolkit/scaffold/template/src/PACKAGE_NAME/example.py.tmpl @@ -0,0 +1,20 @@ +"""An example module, showing the conventions every BHoM toolkit method should follow.""" + +from python_toolkit.bhom.analytics import bhom_analytics + +from . import LOGGER + + +@bhom_analytics() +def add(a: float, b: float) -> float: + """Add two numbers. + + Args: + a: The first number. + b: The second number. + + Returns: + The sum of a and b. + """ + LOGGER.debug("Adding %s and %s", a, b) + return a + b diff --git a/.ci/unit_tests/python/__init_.py b/Python_Engine/Python/src/python_toolkit/scaffold/template/tests/__init__.py.tmpl similarity index 100% rename from .ci/unit_tests/python/__init_.py rename to Python_Engine/Python/src/python_toolkit/scaffold/template/tests/__init__.py.tmpl diff --git a/Python_Engine/Python/src/python_toolkit/scaffold/template/tests/conftest.py.tmpl b/Python_Engine/Python/src/python_toolkit/scaffold/template/tests/conftest.py.tmpl new file mode 100644 index 00000000..40fd7b0e --- /dev/null +++ b/Python_Engine/Python/src/python_toolkit/scaffold/template/tests/conftest.py.tmpl @@ -0,0 +1,4 @@ +import os + +# Never write usage analytics to the real BHoM log folder from tests. +os.environ.setdefault("DISABLE_BHOM_ANALYTICS", "1") diff --git a/Python_Engine/Python/src/python_toolkit/scaffold/template/tests/test_example.py.tmpl b/Python_Engine/Python/src/python_toolkit/scaffold/template/tests/test_example.py.tmpl new file mode 100644 index 00000000..5fd6091d --- /dev/null +++ b/Python_Engine/Python/src/python_toolkit/scaffold/template/tests/test_example.py.tmpl @@ -0,0 +1,8 @@ +import pytest + +from $package.example import add + + +@pytest.mark.parametrize(("a", "b", "expected"), [(1, 2, 3), (-1, 1, 0), (0.5, 0.25, 0.75)]) +def test_add(a, b, expected): + assert add(a, b) == expected diff --git a/Python_Engine/Python/src/python_toolkit/units/__init__.py b/Python_Engine/Python/src/python_toolkit/units/__init__.py index 87a074dd..c9c4f401 100644 --- a/Python_Engine/Python/src/python_toolkit/units/__init__.py +++ b/Python_Engine/Python/src/python_toolkit/units/__init__.py @@ -1,15 +1,10 @@ -from .area import AreaUnit +"""Unit enumerations with conversion between units of the same quantity.""" + +from .area import AreaUnit from .energy import EnergyUnit from .length import LengthUnit from .power import PowerUnit from .speed import SpeedUnit from .temperature import TemperatureUnit -__all__ = [ - "AreaUnit", - "EnergyUnit", - "LengthUnit", - "PowerUnit", - "SpeedUnit", - "TemperatureUnit" -] \ No newline at end of file +__all__ = ["AreaUnit", "EnergyUnit", "LengthUnit", "PowerUnit", "SpeedUnit", "TemperatureUnit"] diff --git a/Python_Engine/Python/src/python_toolkit/units/area.py b/Python_Engine/Python/src/python_toolkit/units/area.py index e59b6e98..3f471939 100644 --- a/Python_Engine/Python/src/python_toolkit/units/area.py +++ b/Python_Engine/Python/src/python_toolkit/units/area.py @@ -1,13 +1,27 @@ -from enum import Enum +"""Units of area.""" + +from enum import Enum + class AreaUnit(Enum): - """Each unit value is a tuple in the format: - (display name, lambda to metres squared, lambda from metres squared) + """Units of area. + + Each unit value is a tuple in the format: (display name, lambda to metres squared, lambda from metres squared). """ + ft2 = ("Feet Squared", lambda ft2: ft2 * (3.048e-1**2), lambda m2: m2 / (3.048e-1**2)) km2 = ("Kilometres Squared", lambda km2: km2 * (1e3**2), lambda m2: m2 / (1e3**2)) m2 = ("Metres Squared", lambda m2: m2, lambda m2: m2) mi2 = ("Miles Squared", lambda mi2: mi2 * (1.609344e3**2), lambda m2: m2 / (1.609344e3**2)) - def convert(self, value: float, to_unit: "AreaUnit"): + def convert(self, value: float, to_unit: "AreaUnit") -> float: + """Convert a value in this unit to another unit. + + Args: + value: The value, in this unit. + to_unit: The unit to convert to. + + Returns: + The value in `to_unit`. + """ return to_unit.value[2](self.value[1](value)) diff --git a/Python_Engine/Python/src/python_toolkit/units/energy.py b/Python_Engine/Python/src/python_toolkit/units/energy.py index f1fad47d..8508fe1a 100644 --- a/Python_Engine/Python/src/python_toolkit/units/energy.py +++ b/Python_Engine/Python/src/python_toolkit/units/energy.py @@ -1,9 +1,14 @@ -from enum import Enum +"""Units of energy.""" + +from enum import Enum + class EnergyUnit(Enum): - """Each unit value is a tuple in the format: - (display name, lambda to joules, lambda from joules) + """Units of energy. + + Each unit value is a tuple in the format: (display name, lambda to joules, lambda from joules). """ + BTU = ("British Thermal Unit", lambda btu: btu * 1.05505585262e3, lambda j: j / 1.05505585262e3) J = ("Joule", lambda j: j, lambda j: j) kBTU = ("Kilo British Thermal Unit", lambda kbtu: kbtu * 1.05505585262e6, lambda j: j / 1.05505585262e6) @@ -14,5 +19,14 @@ class EnergyUnit(Enum): MWh = ("Megawatt Hour", lambda mwh: mwh * 3.6e9, lambda j: j / 3.6e9) Wh = ("Watt Hour", lambda wh: wh * 3.6e3, lambda j: j / 3.6e3) - def convert(self, value: float, to_unit: "EnergyUnit"): + def convert(self, value: float, to_unit: "EnergyUnit") -> float: + """Convert a value in this unit to another unit. + + Args: + value: The value, in this unit. + to_unit: The unit to convert to. + + Returns: + The value in `to_unit`. + """ return to_unit.value[2](self.value[1](value)) diff --git a/Python_Engine/Python/src/python_toolkit/units/length.py b/Python_Engine/Python/src/python_toolkit/units/length.py index f8ef8688..53889464 100644 --- a/Python_Engine/Python/src/python_toolkit/units/length.py +++ b/Python_Engine/Python/src/python_toolkit/units/length.py @@ -1,9 +1,14 @@ -from enum import Enum +"""Units of length.""" + +from enum import Enum + class LengthUnit(Enum): - """Each unit value is a tuple in the format: - (display name, lambda to metres, lambda from metres) + """Units of length. + + Each unit value is a tuple in the format: (display name, lambda to metres, lambda from metres). """ + cm = ("Centimetre", lambda cm: cm * 1e-2, lambda m: m / 1e-2) ft = ("Foot", lambda ft: ft * 3.048e-1, lambda m: m / 3.048e-1) In = ("Inch", lambda In: In * 2.54e-2, lambda m: m / 2.54e-2) @@ -13,5 +18,14 @@ class LengthUnit(Enum): mm = ("Millimetre", lambda mm: mm * 1e-3, lambda m: m / 1e-3) yd = ("Yard", lambda yd: yd * 9.144e-1, lambda m: m / 9.144e-1) - def convert(self, value: float, to_unit: "LengthUnit"): + def convert(self, value: float, to_unit: "LengthUnit") -> float: + """Convert a value in this unit to another unit. + + Args: + value: The value, in this unit. + to_unit: The unit to convert to. + + Returns: + The value in `to_unit`. + """ return to_unit.value[2](self.value[1](value)) diff --git a/Python_Engine/Python/src/python_toolkit/units/power.py b/Python_Engine/Python/src/python_toolkit/units/power.py index 386a0608..9b5fcb0d 100644 --- a/Python_Engine/Python/src/python_toolkit/units/power.py +++ b/Python_Engine/Python/src/python_toolkit/units/power.py @@ -1,15 +1,41 @@ -from enum import Enum +"""Units of power.""" + +from enum import Enum + class PowerUnit(Enum): - """Each unit value is a tuple in the format: - (display name, lambda to watts, lambda from watts) + """Units of power. + + Each unit value is a tuple in the format: (display name, lambda to watts, lambda from watts). """ - BTU_h = ("British Thermal Unit Per Hour", lambda btu_h: btu_h * (1.05505585262e3 / 3600), lambda w: w / (1.05505585262e3 / 3600)) + + BTU_h = ( + "British Thermal Unit Per Hour", + lambda btu_h: btu_h * (1.05505585262e3 / 3600), + lambda w: w / (1.05505585262e3 / 3600), + ) W = ("Watt", lambda w: w, lambda w: w) - kBTU_h = ("Kilo British Thermal Unit Per Hour", lambda kbtu_h: kbtu_h * 1.05505585262e6, lambda w: w / 1.05505585262e6) + kBTU_h = ( + "Kilo British Thermal Unit Per Hour", + lambda kbtu_h: kbtu_h * 1.05505585262e6, + lambda w: w / 1.05505585262e6, + ) kW = ("Kilowatt", lambda kw: kw * 1e3, lambda w: w / 1e3) - MBTU_h = ("Mega British Thermal Unit Per Hour", lambda mbtu_h: mbtu_h * (1.05505585262e9 / 3600), lambda w: w / (1.05505585262e9 / 3600)) + MBTU_h = ( + "Mega British Thermal Unit Per Hour", + lambda mbtu_h: mbtu_h * (1.05505585262e9 / 3600), + lambda w: w / (1.05505585262e9 / 3600), + ) MW = ("Megawatt", lambda mj: mj * 1e6, lambda j: j / 1e6) - def convert(self, value: float, to_unit: "PowerUnit"): + def convert(self, value: float, to_unit: "PowerUnit") -> float: + """Convert a value in this unit to another unit. + + Args: + value: The value, in this unit. + to_unit: The unit to convert to. + + Returns: + The value in `to_unit`. + """ return to_unit.value[2](self.value[1](value)) diff --git a/Python_Engine/Python/src/python_toolkit/units/speed.py b/Python_Engine/Python/src/python_toolkit/units/speed.py index f1ca7bdb..db68f2c8 100644 --- a/Python_Engine/Python/src/python_toolkit/units/speed.py +++ b/Python_Engine/Python/src/python_toolkit/units/speed.py @@ -1,13 +1,27 @@ -from enum import Enum +"""Units of speed.""" + +from enum import Enum + class SpeedUnit(Enum): - """Each unit value is a tuple in the format: - (display name, lambda to metres per secomd, lambda from metres per second) + """Units of speed. + + Each unit value is a tuple in the format: (display name, lambda to metres per secomd, lambda from metres per second). """ + m_s = ("Metres Per Second", lambda m_s: m_s, lambda m_s: m_s) km_h = ("Kilometres Per Hour", lambda km_h: km_h * (1e3 / 3.6e3), lambda m_s: m_s / (1e3 / 3.6e3)) mi_h = ("Miles Per Hour", lambda mi_h: mi_h * (1.609344e3 / 3.6e3), lambda m_s: m_s / (1.609344e3 / 3.6e3)) ft_s = ("Feet Per Second", lambda ft_s: ft_s * 3.048e-1, lambda m_s: m_s / 3.048e-1) - def convert(self, value: float, to_unit: "SpeedUnit"): + def convert(self, value: float, to_unit: "SpeedUnit") -> float: + """Convert a value in this unit to another unit. + + Args: + value: The value, in this unit. + to_unit: The unit to convert to. + + Returns: + The value in `to_unit`. + """ return to_unit.value[2](self.value[1](value)) diff --git a/Python_Engine/Python/src/python_toolkit/units/temperature.py b/Python_Engine/Python/src/python_toolkit/units/temperature.py index efca3378..225bc20e 100644 --- a/Python_Engine/Python/src/python_toolkit/units/temperature.py +++ b/Python_Engine/Python/src/python_toolkit/units/temperature.py @@ -1,13 +1,27 @@ -from enum import Enum +"""Units of temperature.""" + +from enum import Enum + class TemperatureUnit(Enum): - """Each unit value is a tuple in the format: - (display name, lambda to kelvin, lambda from kelvin) + """Units of temperature. + + Each unit value is a tuple in the format: (display name, lambda to kelvin, lambda from kelvin). """ + C = ("Celcius", lambda c: c + 273.15, lambda k: k - 273.15) K = ("Kelvin", lambda k: k, lambda k: k) - F = ("Fahrenheit", lambda f: (f + 459.67) * (5/9), lambda k: (k / (5/9)) - 459.67) - R = ("Rankine", lambda r: r * (5/9), lambda k: k / (5/9)) + F = ("Fahrenheit", lambda f: (f + 459.67) * (5 / 9), lambda k: (k / (5 / 9)) - 459.67) + R = ("Rankine", lambda r: r * (5 / 9), lambda k: k / (5 / 9)) + + def convert(self, value: float, to_unit: "TemperatureUnit") -> float: + """Convert a value in this unit to another unit. + + Args: + value: The value, in this unit. + to_unit: The unit to convert to. - def convert(self, value: float, to_unit: "TemperatureUnit"): - return to_unit.value[2]((self.value[1](value))) + Returns: + The value in `to_unit`. + """ + return to_unit.value[2](self.value[1](value)) diff --git a/Python_Engine/Python/tests/__init__.py b/Python_Engine/Python/tests/__init__.py index d4a8a8e4..961daabf 100644 --- a/Python_Engine/Python/tests/__init__.py +++ b/Python_Engine/Python/tests/__init__.py @@ -1,17 +1,4 @@ -from pathlib import Path -import pandas as pd -import matplotlib as mpl - +"""Tests for python_toolkit.""" # identifier for all downstream processes BASE_IDENTIFIER = "PythonBHoM_pytest" - -def get_timeseries(): - df = pd.read_csv(Path(__file__).parent / "assets" / "example_timeseries.csv", index_col="Timestamp") - df = df.set_index(pd.to_datetime(df.index)) - return pd.Series(df["Value"], index=df.index) - -TIMESERIES_COLLECTION = get_timeseries() - -#use 'agg' for testing plot methods, as tkinter occasionally throws strange errors (missing component/library when component isn't missing) when the default backend is used only when using pytest -mpl.use("agg") \ No newline at end of file diff --git a/Python_Engine/Python/tests/_data.py b/Python_Engine/Python/tests/_data.py new file mode 100644 index 00000000..89da0fea --- /dev/null +++ b/Python_Engine/Python/tests/_data.py @@ -0,0 +1,16 @@ +"""Shared test data (requires the "plot" extra).""" + +from pathlib import Path + +import pandas as pd + +ASSETS_DIRECTORY = Path(__file__).parent / "assets" + + +def get_timeseries() -> pd.Series: + df = pd.read_csv(ASSETS_DIRECTORY / "example_timeseries.csv", index_col="Timestamp") + df = df.set_index(pd.to_datetime(df.index)) + return pd.Series(df["Value"], index=df.index) + + +TIMESERIES_COLLECTION = get_timeseries() diff --git a/Python_Engine/Python/tests/conftest.py b/Python_Engine/Python/tests/conftest.py new file mode 100644 index 00000000..525b0b0c --- /dev/null +++ b/Python_Engine/Python/tests/conftest.py @@ -0,0 +1,20 @@ +"""Pytest configuration shared by all tests.""" + +import os + +import pytest + +# Use a non-interactive matplotlib backend for every test. This must happen before any test module imports +# matplotlib.pyplot, otherwise the Tk backend may be selected and fail on machines without a usable Tcl/Tk. +os.environ.setdefault("MPLBACKEND", "Agg") + +# Never write usage analytics to the real BHoM log folder from tests. +os.environ.setdefault("DISABLE_BHOM_ANALYTICS", "1") + + +@pytest.fixture +def usage_tracker(tmp_path): + """A usage tracker writing to a temporary folder, not registered to flush at exit.""" + from python_toolkit.bhom.analytics import UsageTracker + + return UsageTracker(log_folder=tmp_path, register_atexit=False) diff --git a/Python_Engine/Python/tests/test_analytics.py b/Python_Engine/Python/tests/test_analytics.py new file mode 100644 index 00000000..bb40b200 --- /dev/null +++ b/Python_Engine/Python/tests/test_analytics.py @@ -0,0 +1,242 @@ +import json +import subprocess +import sys +import textwrap +import time + +import pytest + +from python_toolkit.bhom import analytics +from python_toolkit.bhom.analytics import ( + MAX_ERRORS_PER_METHOD, + SCHEMA, + UsageLogEntry, + bhom_analytics, + load_logs_from_file, + summarise_usage_logs, +) + + +@pytest.fixture +def tracked(monkeypatch, usage_tracker): + """Route the decorator to an isolated tracker.""" + monkeypatch.setattr(analytics, "_TRACKER", usage_tracker) + return usage_tracker + + +def _read_records(folder): + return [json.loads(line) for file in folder.glob("Usage_*.jsonl") for line in file.read_text().splitlines()] + + +def test_calls_are_aggregated_into_one_record(tracked): + @bhom_analytics(disable=False) + def add(a, b): + return a + b + + for i in range(100): + assert add(i, 1) == i + 1 + + records = tracked.snapshot() + assert len(records) == 1 + record = records[0] + assert record["schema"] == SCHEMA + assert record["count"] == 100 + assert record["error_count"] == 0 + assert record["method"].endswith("add") + assert record["module"] == __name__ + assert record["toolkit"] == __name__.split(".")[0] + assert record["max_seconds"] <= record["total_seconds"] + + +def test_project_number_separates_records(tracked): + project = {"id": "A"} + + @bhom_analytics(project_id=lambda: project["id"], disable=False) + def method(): + return None + + method() + project["id"] = "B" + method() + method() + + counts = {r["project"]: r["count"] for r in tracked.snapshot()} + assert counts == {"A": 1, "B": 2} + + +def test_errors_are_recorded_deduplicated_and_capped(tracked): + @bhom_analytics(disable=False) + def fail(i): + raise ValueError(f"bad value {i % (MAX_ERRORS_PER_METHOD + 5)}") + + for i in range(1000): + with pytest.raises(ValueError): + fail(i) + + (record,) = tracked.snapshot() + assert record["count"] == 1000 + assert record["error_count"] == 1000 + assert len(record["errors"]) == MAX_ERRORS_PER_METHOD + assert all(error["type"] == "ValueError" for error in record["errors"]) + assert sum(error["count"] for error in record["errors"]) < 1000 # overflowed errors are counted but not detailed + + +def test_exceptions_propagate_unchanged(tracked): + error = KeyError("missing") + + @bhom_analytics(disable=False) + def fail(): + raise error + + with pytest.raises(KeyError) as raised: + fail() + assert raised.value is error + + +def test_flush_writes_jsonl_and_resets(tracked, tmp_path): + @bhom_analytics(disable=False) + def method(): + return 1 + + method() + method() + tracked.flush() + + records = _read_records(tmp_path) + assert len(records) == 1 + assert records[0]["count"] == 2 + assert tracked.snapshot() == [] + + tracked.flush() # nothing pending: nothing written + assert len(_read_records(tmp_path)) == 1 + + +def test_flush_respects_daily_size_cap(tracked, tmp_path, monkeypatch): + monkeypatch.setattr(analytics, "MAX_DAILY_LOG_BYTES", 1) + + @bhom_analytics(disable=False) + def method(): + return 1 + + method() + tracked.flush() # first write succeeds (file is empty) + method() + tracked.flush() # file is now over the cap: skipped + + assert len(_read_records(tmp_path)) == 1 + + +def test_flush_triggered_by_call_threshold(tracked, tmp_path, monkeypatch): + monkeypatch.setattr(analytics, "FLUSH_CALL_THRESHOLD", 10) + + @bhom_analytics(disable=False) + def method(): + return 1 + + for _ in range(25): + method() + + assert sum(r["count"] for r in _read_records(tmp_path)) == 20 + assert tracked.snapshot()[0]["count"] == 5 + + +def test_flush_never_raises(tracked, tmp_path): + @bhom_analytics(disable=False) + def method(): + return 1 + + method() + blocker = tmp_path / "not_a_folder" + blocker.write_text("") + tracked.log_folder = blocker # mkdir will fail + tracked.flush() + + +def test_disabled_returns_function_unwrapped(): + def method(): + return 1 + + assert bhom_analytics(disable=True)(method) is method + + +def test_flushes_at_process_exit(tmp_path): + script = textwrap.dedent( + f""" + from python_toolkit.bhom import analytics + analytics._TRACKER.log_folder = __import__("pathlib").Path({str(tmp_path)!r}) + + @analytics.bhom_analytics(disable=False) + def method(): + return 1 + + for _ in range(3): + method() + """ + ) + env = {k: v for k, v in __import__("os").environ.items() if k != "DISABLE_BHOM_ANALYTICS"} + subprocess.run([sys.executable, "-c", script], check=True, env=env) + + (record,) = _read_records(tmp_path) + assert record["count"] == 3 + + +def test_overhead_is_small(tracked): + """A tracked call should add only a few microseconds, even when called many times.""" + + def method(): + return None + + wrapped = bhom_analytics(disable=False)(method) + calls = 100_000 + + start = time.perf_counter() + for _ in range(calls): + method() + baseline = time.perf_counter() - start + + start = time.perf_counter() + for _ in range(calls): + wrapped() + tracked_time = time.perf_counter() - start + + per_call_overhead = (tracked_time - baseline) / calls + assert per_call_overhead < 20e-6, f"{per_call_overhead * 1e6:.1f} microseconds per call" + + # periodic flushes (every FLUSH_CALL_THRESHOLD calls) are included in the timing above; nothing is lost + tracked.flush() + records = _read_records(tracked.log_folder) + assert sum(r["count"] for r in records) == calls + assert len(records) == calls // analytics.FLUSH_CALL_THRESHOLD + + +def test_load_and_summarise_mixed_formats(tracked, tmp_path): + @bhom_analytics(disable=False) + def method(): + return 1 + + method() + method() + tracked.flush() + log_file = next(tmp_path.glob("Usage_*.jsonl")) + + legacy = UsageLogEntry(CallerName="legacy_method", Time={"$date": 1_700_000_000_000}) + legacy_json = json.dumps(legacy.__dict__, default=str) + with log_file.open("a", encoding="utf-8") as f: + f.write(legacy_json + "\n") + + entries = load_logs_from_file(log_file) + assert sum(isinstance(e, dict) for e in entries) == 1 + assert sum(isinstance(e, UsageLogEntry) for e in entries) == 1 + + summary = {s["CallerName"]: s for s in summarise_usage_logs(entries)} + assert summary["legacy_method"]["TotalNbCalls"] == 1 + (current,) = [s for name, s in summary.items() if name.endswith("method") and name != "legacy_method"] + assert current["TotalNbCalls"] == 2 + assert current["_t"] == "BH.oM.BHoMAnalytics.UsageEntry" + + +def test_usage_log_entry_defaults_are_independent(): + a, b = UsageLogEntry(), UsageLogEntry() + a.Errors.append("x") + assert b.Errors == [] + assert a.BHoM_Guid != b.BHoM_Guid diff --git a/Python_Engine/Python/tests/test_bhom_serialiser.py b/Python_Engine/Python/tests/test_bhom_serialiser.py index 0d1385f3..0f50ddb9 100644 --- a/Python_Engine/Python/tests/test_bhom_serialiser.py +++ b/Python_Engine/Python/tests/test_bhom_serialiser.py @@ -1,95 +1,133 @@ -from python_toolkit.bhom.bhom_object import convert_pascal_to_camel, convert_camel_to_pascal, BHoMObject, IObject, BHoMJSONDecoder, BHoMJSONEncoder -import uuid import json +import uuid -SERIALISED_BHOM_OBJECT = '{ "_t" : "BH.oM.Adapter.FileSettings", "FileName" : "test.txt", "Directory" : "path/to/file", "BHoM_Guid" : "f428e614-bda1-4228-882e-21d0f318a322", "Name" : "", "_bhomVersion" : "9.2" }' #TODO: use the BHoM serialiser to make a BHoMObject json string, and use that here. -DESERIALISED_BHOM_OBJECT = BHoMObject(_t = "BH.oM.Adapter.FileSettings", bhom_guid = uuid.UUID("f428e614-bda1-4228-882e-21d0f318a322"), file_name = "test.txt", directory = "path/to/file", _bhom_version = "9.2") #TODO: make equivalent BHoMObject here identical to the one above. +from python_toolkit.bhom.bhom_object import ( + BHoMJSONDecoder, + BHoMJSONEncoder, + BHoMObject, + IObject, + convert_camel_to_pascal, + convert_pascal_to_camel, +) + +SERIALISED_BHOM_OBJECT = '{ "_t" : "BH.oM.Adapter.FileSettings", "FileName" : "test.txt", "Directory" : "path/to/file", "BHoM_Guid" : "f428e614-bda1-4228-882e-21d0f318a322", "Name" : "", "_bhomVersion" : "9.2" }' # TODO: use the BHoM serialiser to make a BHoMObject json string, and use that here. +DESERIALISED_BHOM_OBJECT = BHoMObject( + _t="BH.oM.Adapter.FileSettings", + bhom_guid=uuid.UUID("f428e614-bda1-4228-882e-21d0f318a322"), + file_name="test.txt", + directory="path/to/file", + _bhom_version="9.2", +) # TODO: make equivalent BHoMObject here identical to the one above. SERIALISED_IOBJECT = '{ "_t" : "BH.oM.Geometry.Point", "X" : 0.10000000000000001, "Y" : 0.10000000000000001, "Z" : 0.10000000000000001, "_bhomVersion" : "9.2" }' -DESERIALISED_IOBJECT = IObject(_t = "BH.oM.Geometry.Point", x = 0.10000000000000001, y = 0.10000000000000001, z = 0.10000000000000001, _bhom_version = "9.2") +DESERIALISED_IOBJECT = IObject( + _t="BH.oM.Geometry.Point", x=0.10000000000000001, y=0.10000000000000001, z=0.10000000000000001, _bhom_version="9.2" +) + def test_case_convert(): - """Test that the camel and pascal converters are working correctly by using expected outputs and a round trip both ways.""" - #TODO: find edge cases within bhom to see if round trip converters work properly. - #arrange - test_pascal_str = "ThisIsAPascalCaseString" - test_camel_str = "this_is_a_camel_case_string" - expected_pascal_out = "this_is_a_pascal_case_string" - expected_camel_out = "ThisIsACamelCaseString" - - #act - pascal_out = convert_pascal_to_camel(test_pascal_str) - pascal_round_trip = convert_camel_to_pascal(pascal_out) - - camel_out = convert_camel_to_pascal(test_camel_str) - camel_round_trip = convert_pascal_to_camel(camel_out) - - #assert - assert pascal_out == expected_pascal_out, f"pascal conversion got '{pascal_out}' but expected '{expected_pascal_out}'." - assert camel_out == expected_camel_out, f"camel conversion got '{camel_out}' but expected '{expected_camel_out}'." - assert pascal_round_trip == test_pascal_str, f"pascal round trip got '{pascal_round_trip}' but expected '{test_pascal_str}'." - assert camel_round_trip == test_camel_str, f"camel round trip got '{camel_round_trip}' but expected '{test_camel_str}'." + """Test that the camel and pascal converters are working correctly by using expected outputs and a round trip both ways.""" + # TODO: find edge cases within bhom to see if round trip converters work properly. + # arrange + test_pascal_str = "ThisIsAPascalCaseString" + test_camel_str = "this_is_a_camel_case_string" + expected_pascal_out = "this_is_a_pascal_case_string" + expected_camel_out = "ThisIsACamelCaseString" + + # act + pascal_out = convert_pascal_to_camel(test_pascal_str) + pascal_round_trip = convert_camel_to_pascal(pascal_out) + + camel_out = convert_camel_to_pascal(test_camel_str) + camel_round_trip = convert_pascal_to_camel(camel_out) + + # assert + assert pascal_out == expected_pascal_out, ( + f"pascal conversion got '{pascal_out}' but expected '{expected_pascal_out}'." + ) + assert camel_out == expected_camel_out, f"camel conversion got '{camel_out}' but expected '{expected_camel_out}'." + assert pascal_round_trip == test_pascal_str, ( + f"pascal round trip got '{pascal_round_trip}' but expected '{test_pascal_str}'." + ) + assert camel_round_trip == test_camel_str, ( + f"camel round trip got '{camel_round_trip}' but expected '{test_camel_str}'." + ) + def test_serialise_bhom_object(): - """Test that bhom objects serialise correctly to a format that the c# bhom serialiser accepts as valid, and with the correct property case.""" - #act - serialised = json.dumps(DESERIALISED_BHOM_OBJECT, cls=BHoMJSONEncoder) - serialised_bhom_object_to_json = DESERIALISED_BHOM_OBJECT.to_json() - round_trip = BHoMObject.from_json(serialised) + """Test that bhom objects serialise correctly to a format that the c# bhom serialiser accepts as valid, and with the correct property case.""" + # act + serialised = json.dumps(DESERIALISED_BHOM_OBJECT, cls=BHoMJSONEncoder) + serialised_bhom_object_to_json = DESERIALISED_BHOM_OBJECT.to_json() + round_trip = BHoMObject.from_json(serialised) + + # assert + assert serialised == serialised_bhom_object_to_json, ( + "Direct serialisation to json differed to BHoMObject to_json method." + ) + assert round_trip == DESERIALISED_BHOM_OBJECT, ( + "BHoMObject round trip failed for serialisation -> deserialisation." + ) # this is the only direction the round trip can be tested without directly inspecting each dictionary entry, as it is not guaranteed that the other direction will produce identical order for json strings. - #assert - assert serialised == serialised_bhom_object_to_json, f"Direct serialisation to json differed to BHoMObject to_json method." - assert round_trip == DESERIALISED_BHOM_OBJECT, f"BHoMObject round trip failed for serialisation -> deserialisation." #this is the only direction the round trip can be tested without directly inspecting each dictionary entry, as it is not guaranteed that the other direction will produce identical order for json strings. def test_serialise_iobject(): - #act - serialised = json.dumps(DESERIALISED_IOBJECT, cls=BHoMJSONEncoder) - serialised_iobject_to_json = DESERIALISED_IOBJECT.to_json() - round_trip = IObject.from_json(serialised) + # act + serialised = json.dumps(DESERIALISED_IOBJECT, cls=BHoMJSONEncoder) + serialised_iobject_to_json = DESERIALISED_IOBJECT.to_json() + round_trip = IObject.from_json(serialised) + + # assert + assert serialised == serialised_iobject_to_json, "Direct serialisation to json differed to IObject to_json method." + assert round_trip == DESERIALISED_IOBJECT, ( + "IObject round trip failed for serialisation -> deserialisation." + ) # this is the only direction the round trip can be tested without directly inspecting each dictionary entry, as it is not guaranteed that the other direction will produce identical order for json strings. - #assert - assert serialised == serialised_iobject_to_json, f"Direct serialisation to json differed to IObject to_json method." - assert round_trip == DESERIALISED_IOBJECT, f"IObject round trip failed for serialisation -> deserialisation." #this is the only direction the round trip can be tested without directly inspecting each dictionary entry, as it is not guaranteed that the other direction will produce identical order for json strings. def test_deserialise_bhom_object(): - """Test that bhom objects deserialise correctly with no errors with expected properties with correct case.""" - #act - obj = json.loads(SERIALISED_BHOM_OBJECT, cls=BHoMJSONDecoder) - obj_bhom_object_from_json = BHoMObject.from_json(SERIALISED_BHOM_OBJECT) + """Test that bhom objects deserialise correctly with no errors with expected properties with correct case.""" + # act + obj = json.loads(SERIALISED_BHOM_OBJECT, cls=BHoMJSONDecoder) + obj_bhom_object_from_json = BHoMObject.from_json(SERIALISED_BHOM_OBJECT) + + # assert + assert isinstance(obj, BHoMObject), "JSON decoded an object of the wrong type" + assert obj == DESERIALISED_BHOM_OBJECT, ( + f"Actual deserialised object ({obj}) was not identical to expected deserialised object ({DESERIALISED_BHOM_OBJECT})." + ) + assert obj_bhom_object_from_json == obj, "Direct deserialisation from json differed to BHoMObject from_json method." - #assert - assert isinstance(obj, BHoMObject), "JSON decoded an object of the wrong type" - assert obj == DESERIALISED_BHOM_OBJECT, f"Actual deserialised object ({obj}) was not identical to expected deserialised object ({DESERIALISED_BHOM_OBJECT})." - assert obj_bhom_object_from_json == obj, f"Direct deserialisation from json differed to BHoMObject from_json method." def test_deserialise_iobject(): - """Test that bhom objects deserialise correctly with no errors with expected properties with correct case.""" - #act - obj = json.loads(SERIALISED_IOBJECT, cls=BHoMJSONDecoder) - obj_iobject_from_json = IObject.from_json(SERIALISED_IOBJECT) + """Test that bhom objects deserialise correctly with no errors with expected properties with correct case.""" + # act + obj = json.loads(SERIALISED_IOBJECT, cls=BHoMJSONDecoder) + obj_iobject_from_json = IObject.from_json(SERIALISED_IOBJECT) + + # assert + assert isinstance(obj, IObject), "JSON decoded an object of the wrong type" + assert obj == DESERIALISED_IOBJECT, ( + f"Actual deserialised object ({obj}) was not identical to expected deserialised object ({DESERIALISED_IOBJECT})." + ) + assert obj_iobject_from_json == obj, "Direct deserialisation from json differed to IObject from_json method." - #assert - assert isinstance(obj, IObject), "JSON decoded an object of the wrong type" - assert obj == DESERIALISED_IOBJECT, f"Actual deserialised object ({obj}) was not identical to expected deserialised object ({DESERIALISED_IOBJECT})." - assert obj_iobject_from_json == obj, f"Direct deserialisation from json differed to IObject from_json method." def test_subclass(): - #arrange - class TestSubClass(BHoMObject): - _t: str = "BH.oM.Base.CustomObject" - some_other_data: str - - def __init__(self, some_other_data, **kwargs): - self.some_other_data = some_other_data - _t = kwargs.pop("_t", self._t) - super().__init__(_t, **kwargs) - - #act - test_object = TestSubClass("this is some test data") - test_object_json = test_object.to_json() - test_object_round_trip = TestSubClass.from_json(test_object_json) - - #assert - assert test_object == test_object_round_trip - assert test_object.some_other_data == "this is some test data" - assert test_object._t == "BH.oM.Base.CustomObject" \ No newline at end of file + # arrange + class TestSubClass(BHoMObject): + _t: str = "BH.oM.Base.CustomObject" + some_other_data: str + + def __init__(self, some_other_data, **kwargs): + self.some_other_data = some_other_data + _t = kwargs.pop("_t", self._t) + super().__init__(_t, **kwargs) + + # act + test_object = TestSubClass("this is some test data") + test_object_json = test_object.to_json() + test_object_round_trip = TestSubClass.from_json(test_object_json) + + # assert + assert test_object == test_object_round_trip + assert test_object.some_other_data == "this is some test data" + assert test_object._t == "BH.oM.Base.CustomObject" diff --git a/Python_Engine/Python/tests/test_bhom_tkinter_ui.py b/Python_Engine/Python/tests/test_bhom_tkinter_ui.py index 9379fe3a..9e4ae981 100644 --- a/Python_Engine/Python/tests/test_bhom_tkinter_ui.py +++ b/Python_Engine/Python/tests/test_bhom_tkinter_ui.py @@ -1,463 +1,468 @@ from __future__ import annotations +import tkinter as tk from datetime import date from pathlib import Path import matplotlib.pyplot as plt -import tkinter as tk +import pytest +from python_toolkit.bhom_tkinter.bhom_base_child_window import BHoMBaseChildWindow from python_toolkit.bhom_tkinter.bhom_base_window import BHoMBaseWindow from python_toolkit.bhom_tkinter.widgets import ( - Button, - CalendarWidget, - CheckboxSelection, - CmapSelector, - ColourPicker, - DropDownSelection, - FigureContainer, - Label, - MultiBoxSelection, - PackingOptions, - PathSelector, - RadioSelection, - ScrollableListBox, - SearchableListBox, - ValidatedEntryBox, + Button, + CalendarWidget, + CheckboxSelection, + CmapSelector, + ColourPicker, + DropDownSelection, + FigureContainer, + Label, + MultiBoxSelection, + PackingOptions, + PathSelector, + RadioSelection, + ScrollableListBox, + SearchableListBox, + ValidatedEntryBox, ) from python_toolkit.bhom_tkinter.windows import ( - DirectoryFileSelector, - LandingPage, - ProcessingWindow, - WarningBox, + DirectoryFileSelector, + LandingPage, + ProcessingWindow, + WarningBox, ) -from python_toolkit.bhom_tkinter.bhom_base_child_window import BHoMBaseChildWindow from python_toolkit.bhom_tkinter.windows.modal_window import BHoMModalWindow +# Tk interpreter start-up with the uv-managed (python-build-standalone) Python intermittently fails to read init.tcl +# on Windows ("couldn't read file ... No error"). Retry only that error, so genuine UI failures still fail. +pytestmark = [pytest.mark.ui, pytest.mark.flaky(reruns=2, only_rerun=["TclError"])] + def _demo_callback(*_args, **_kwargs): - return None + return None def _show_brief(window: BHoMBaseWindow, milliseconds: int = 900) -> None: - window.after(milliseconds, window.destroy_root) - window.mainloop() + window.after(milliseconds, window.destroy_root) + window.mainloop() def run_widget_gallery(auto_close_ms: int | None = None) -> None: - root = BHoMBaseWindow( - title="BHoM Tkinter Widget Gallery", - min_width=1200, - min_height=900, - show_submit=False, - show_close=True, - close_text="Close Gallery", - ) - - parent = root.content_frame - alignments = ["left", "center", "right"] - - Label( - parent, - text="Label widget (left)", - item_title="Label", - helper_text="Basic BHoM Label wrapper", - alignment=alignments[0], - build_options=PackingOptions(fill="x", pady=6), - ).build() - - Button( - parent, - text="Button widget", - command=_demo_callback, - item_title="Button", - helper_text="Simple action button", - alignment=alignments[1], - build_options=PackingOptions(fill="x", pady=6), - ).build() - - ValidatedEntryBox( - parent, - item_title="ValidatedEntryBox", - helper_text="Integer 0..100", - value_type=int, - min_value=0, - max_value=100, - alignment=alignments[2], - build_options=PackingOptions(fill="x", pady=6), - ).build() - - DropDownSelection( - parent, - item_title="DropDownSelection", - helper_text="Pick an option", - options=["A", "B", "C"], - default="B", - alignment=alignments[0], - build_options=PackingOptions(fill="x", pady=6), - ).build() - - RadioSelection( - parent, - item_title="RadioSelection", - helper_text="Single select", - fields=["Red", "Green", "Blue"], - orient="horizontal", - max_per_line=3, - alignment=alignments[1], - build_options=PackingOptions(fill="x", pady=6), - ).build() - - CheckboxSelection( - parent, - item_title="CheckboxSelection", - helper_text="Multi select", - fields=["One", "Two", "Three", "Four"], - defaults=["Two"], - max_per_line=4, - alignment=alignments[2], - build_options=PackingOptions(fill="x", pady=6), - ).build() - - MultiBoxSelection( - parent, - item_title="MultiBoxSelection", - helper_text="Legacy alias variant", - fields=["North", "South", "East", "West"], - orient="horizontal", - max_per_line=2, - alignment=alignments[0], - build_options=PackingOptions(fill="x", pady=6), - ).build() - - ScrollableListBox( - parent, - item_title="ScrollableListBox", - helper_text="List with selection controls", - items=[f"Item {i}" for i in range(1, 13)], - height=5, - show_selection_controls=True, - alignment=alignments[1], - build_options=PackingOptions(fill="x", pady=6), - ).build() - - SearchableListBox( - parent, - item_title="SearchableListBox", - helper_text="Type to filter; selections are kept while filtering", - items=[f"{city}_TRY.epw" for city in ["London", "Birmingham", "Manchester", "Glasgow", "Belfast", "Cardiff"]], - height=4, - show_selection_controls=True, - alignment=alignments[2], - build_options=PackingOptions(fill="x", pady=6), - ).build() - - PathSelector( - parent, - item_title="PathSelector", - helper_text="Browse file path", - button_text="Browse", - mode="file", - alignment=alignments[2], - build_options=PackingOptions(fill="x", pady=6), - ).build() - - ColourPicker( - parent, - item_title="ColourPicker", - helper_text="Pick a colour", - default_colour="#4A90E2", - alignment=alignments[0], - build_options=PackingOptions(fill="x", pady=6), - ).build() - - CalendarWidget( - parent, - item_title="CalendarWidget", - helper_text="Date picker", - def_year=date.today().year, - def_month=date.today().month, - def_day=max(1, min(date.today().day, 28)), - show_year_selector=True, - alignment=alignments[1], - build_options=PackingOptions(fill="x", pady=6), - ).build() - - figure_container = FigureContainer( - parent, - item_title="FigureContainer", - helper_text="Embedded matplotlib figure", - alignment=alignments[2], - build_options=PackingOptions(fill="x", pady=6), - ) - figure_container.build() - figure, axis = plt.subplots(figsize=(3.2, 1.2)) - axis.plot([0, 1, 2, 3], [1, 3, 2, 4]) - axis.set_title("Sample") - figure_container.embed_figure(figure) - - CmapSelector( - parent, - item_title="CmapSelector", - helper_text="Colormap preview", - cmap_set="continuous", - alignment=alignments[0], - build_options=PackingOptions(fill="x", pady=6), - ).build() - - if auto_close_ms is not None: - root.after(auto_close_ms, root.destroy_root) - root.mainloop() + root = BHoMBaseWindow( + title="BHoM Tkinter Widget Gallery", + min_width=1200, + min_height=900, + show_submit=False, + show_close=True, + close_text="Close Gallery", + ) + + parent = root.content_frame + alignments = ["left", "center", "right"] + + Label( + parent, + text="Label widget (left)", + item_title="Label", + helper_text="Basic BHoM Label wrapper", + alignment=alignments[0], + build_options=PackingOptions(fill="x", pady=6), + ).build() + + Button( + parent, + text="Button widget", + command=_demo_callback, + item_title="Button", + helper_text="Simple action button", + alignment=alignments[1], + build_options=PackingOptions(fill="x", pady=6), + ).build() + + ValidatedEntryBox( + parent, + item_title="ValidatedEntryBox", + helper_text="Integer 0..100", + value_type=int, + min_value=0, + max_value=100, + alignment=alignments[2], + build_options=PackingOptions(fill="x", pady=6), + ).build() + + DropDownSelection( + parent, + item_title="DropDownSelection", + helper_text="Pick an option", + options=["A", "B", "C"], + default="B", + alignment=alignments[0], + build_options=PackingOptions(fill="x", pady=6), + ).build() + + RadioSelection( + parent, + item_title="RadioSelection", + helper_text="Single select", + fields=["Red", "Green", "Blue"], + orient="horizontal", + max_per_line=3, + alignment=alignments[1], + build_options=PackingOptions(fill="x", pady=6), + ).build() + + CheckboxSelection( + parent, + item_title="CheckboxSelection", + helper_text="Multi select", + fields=["One", "Two", "Three", "Four"], + defaults=["Two"], + max_per_line=4, + alignment=alignments[2], + build_options=PackingOptions(fill="x", pady=6), + ).build() + + MultiBoxSelection( + parent, + item_title="MultiBoxSelection", + helper_text="Legacy alias variant", + fields=["North", "South", "East", "West"], + orient="horizontal", + max_per_line=2, + alignment=alignments[0], + build_options=PackingOptions(fill="x", pady=6), + ).build() + + ScrollableListBox( + parent, + item_title="ScrollableListBox", + helper_text="List with selection controls", + items=[f"Item {i}" for i in range(1, 13)], + height=5, + show_selection_controls=True, + alignment=alignments[1], + build_options=PackingOptions(fill="x", pady=6), + ).build() + + SearchableListBox( + parent, + item_title="SearchableListBox", + helper_text="Type to filter; selections are kept while filtering", + items=[f"{city}_TRY.epw" for city in ["London", "Birmingham", "Manchester", "Glasgow", "Belfast", "Cardiff"]], + height=4, + show_selection_controls=True, + alignment=alignments[2], + build_options=PackingOptions(fill="x", pady=6), + ).build() + + PathSelector( + parent, + item_title="PathSelector", + helper_text="Browse file path", + button_text="Browse", + mode="file", + alignment=alignments[2], + build_options=PackingOptions(fill="x", pady=6), + ).build() + + ColourPicker( + parent, + item_title="ColourPicker", + helper_text="Pick a colour", + default_colour="#4A90E2", + alignment=alignments[0], + build_options=PackingOptions(fill="x", pady=6), + ).build() + + CalendarWidget( + parent, + item_title="CalendarWidget", + helper_text="Date picker", + def_year=date.today().year, + def_month=date.today().month, + def_day=max(1, min(date.today().day, 28)), + show_year_selector=True, + alignment=alignments[1], + build_options=PackingOptions(fill="x", pady=6), + ).build() + + figure_container = FigureContainer( + parent, + item_title="FigureContainer", + helper_text="Embedded matplotlib figure", + alignment=alignments[2], + build_options=PackingOptions(fill="x", pady=6), + ) + figure_container.build() + figure, axis = plt.subplots(figsize=(3.2, 1.2)) + axis.plot([0, 1, 2, 3], [1, 3, 2, 4]) + axis.set_title("Sample") + figure_container.embed_figure(figure) + + CmapSelector( + parent, + item_title="CmapSelector", + helper_text="Colormap preview", + cmap_set="continuous", + alignment=alignments[0], + build_options=PackingOptions(fill="x", pady=6), + ).build() + + if auto_close_ms is not None: + root.after(auto_close_ms, root.destroy_root) + root.mainloop() def run_predefined_windows_demo() -> None: - landing = LandingPage( - title="LandingPage demo", - header="Landing page", - message="Smoke-checking predefined windows.", - sub_title="This window auto-closes.", - show_submit=False, - ) - landing.add_custom_button("No-op Action", _demo_callback) - _show_brief(landing) - - warning = WarningBox( - title="WarningBox demo", - warnings=["Sample warning message"], - errors=["Sample error message"], - infos=["Sample informational message"], - ) - _show_brief(warning) - - processing = ProcessingWindow(title="ProcessingWindow demo", message="Working...") - processing.start() - processing.after(900, processing.stop) - processing.mainloop() - - selector = DirectoryFileSelector( - directory=Path(__file__).resolve().parent, - file_types=[".py"], - selection_label="test files", - ) - _show_brief(selector) + landing = LandingPage( + title="LandingPage demo", + header="Landing page", + message="Smoke-checking predefined windows.", + sub_title="This window auto-closes.", + show_submit=False, + ) + landing.add_custom_button("No-op Action", _demo_callback) + _show_brief(landing) + + warning = WarningBox( + title="WarningBox demo", + warnings=["Sample warning message"], + errors=["Sample error message"], + infos=["Sample informational message"], + ) + _show_brief(warning) + + processing = ProcessingWindow(title="ProcessingWindow demo", message="Working...") + processing.start() + processing.after(900, processing.stop) + processing.mainloop() + + selector = DirectoryFileSelector( + directory=Path(__file__).resolve().parent, + file_types=[".py"], + selection_label="test files", + ) + _show_brief(selector) if __name__ == "__main__": - run_widget_gallery() - run_predefined_windows_demo() + run_widget_gallery() + run_predefined_windows_demo() def test_widget_validation(): - """Ensure widget validation logic returns expected results.""" - # Integer field valid range - root = BHoMBaseWindow(title="Validation test") - parent = root.content_frame - - int_box = ValidatedEntryBox( - parent, - value_type=int, - min_value=0, - max_value=100, - required=True, - ) - int_box.build() - - int_box.set(50) - ok, msg, sev = int_box.validate() - assert ok is True and msg is None - - int_box.set(150) - ok, msg, sev = int_box.validate() - assert ok is False and sev == "error" - - # Required field empty - int_box.set("") - ok, msg, sev = int_box.validate() - assert ok is False and msg == "Required" - - # Non-required empty is valid - opt_box = ValidatedEntryBox(parent, value_type=str, required=False) - opt_box.build() - opt_box.set("") - ok, msg, sev = opt_box.validate() - assert ok is True - - # Custom validator overriding - def fail_validator(_v): - return False, "Custom failed" - - custom_box = ValidatedEntryBox(parent, value_type=str, required=True, custom_validator=fail_validator) - custom_box.build() - custom_box.set("abc") - ok, msg, sev = custom_box.validate() - assert ok is False and msg == "Custom failed" + """Ensure widget validation logic returns expected results.""" + # Integer field valid range + root = BHoMBaseWindow(title="Validation test") + parent = root.content_frame + + int_box = ValidatedEntryBox( + parent, + value_type=int, + min_value=0, + max_value=100, + required=True, + ) + int_box.build() + + int_box.set(50) + ok, msg, sev = int_box.validate() + assert ok is True and msg is None + + int_box.set(150) + ok, msg, sev = int_box.validate() + assert ok is False and sev == "error" + + # Required field empty + int_box.set("") + ok, msg, sev = int_box.validate() + assert ok is False and msg == "Required" + + # Non-required empty is valid + opt_box = ValidatedEntryBox(parent, value_type=str, required=False) + opt_box.build() + opt_box.set("") + ok, msg, sev = opt_box.validate() + assert ok is True + + # Custom validator overriding + def fail_validator(_v): + return False, "Custom failed" + + custom_box = ValidatedEntryBox(parent, value_type=str, required=True, custom_validator=fail_validator) + custom_box.build() + custom_box.set("abc") + ok, msg, sev = custom_box.validate() + assert ok is False and msg == "Custom failed" def test_rebuild(): - """Verify that rebuild() re-places widgets and reflects mutations to self.widgets.""" - root = BHoMBaseWindow(title="Rebuild test") - parent = root.content_frame + """Verify that rebuild() re-places widgets and reflects mutations to self.widgets.""" + root = BHoMBaseWindow(title="Rebuild test") + parent = root.content_frame - label_a = Label(parent, text="Widget A", build_options=PackingOptions(fill="x")) - label_b = Label(parent, text="Widget B", build_options=PackingOptions(fill="x")) + label_a = Label(parent, text="Widget A", build_options=PackingOptions(fill="x")) + label_b = Label(parent, text="Widget B", build_options=PackingOptions(fill="x")) - root.widgets.extend([label_a, label_b]) - root.build() + root.widgets.extend([label_a, label_b]) + root.build() - # Both widgets should be managed after build - managed_after_build = [ - c for c in parent.winfo_children() if c.winfo_manager() - ] - assert len(managed_after_build) == 2 + # Both widgets should be managed after build + managed_after_build = [c for c in parent.winfo_children() if c.winfo_manager()] + assert len(managed_after_build) == 2 - # Add a third widget and rebuild - label_c = Label(parent, text="Widget C", build_options=PackingOptions(fill="x")) - root.widgets.append(label_c) - root.rebuild() + # Add a third widget and rebuild + label_c = Label(parent, text="Widget C", build_options=PackingOptions(fill="x")) + root.widgets.append(label_c) + root.rebuild() - managed_after_rebuild = [ - c for c in parent.winfo_children() if c.winfo_manager() - ] - assert len(managed_after_rebuild) == 3 + managed_after_rebuild = [c for c in parent.winfo_children() if c.winfo_manager()] + assert len(managed_after_rebuild) == 3 - # Remove a widget and rebuild — it should no longer be managed - root.widgets.remove(label_a) - root.rebuild() + # Remove a widget and rebuild — it should no longer be managed + root.widgets.remove(label_a) + root.rebuild() - managed_after_remove = [ - c for c in parent.winfo_children() if c.winfo_manager() - ] - assert len(managed_after_remove) == 2 - assert label_a not in [w for w in root.widgets] + managed_after_remove = [c for c in parent.winfo_children() if c.winfo_manager()] + assert len(managed_after_remove) == 2 + assert label_a not in list(root.widgets) - root.destroy_root() + root.destroy_root() def test_modal_window_is_themed_toplevel(): - """Modal windows should be themed Toplevels, not tk.Tk roots.""" - host = BHoMBaseWindow(title="Modal host", show_submit=False, show_close=False) - host.withdraw() - - modal = BHoMModalWindow( - host, - title="Modal test", - width=420, - height=260, - show_close=True, - ) - assert isinstance(modal, tk.Toplevel) - assert isinstance(modal, BHoMBaseChildWindow) - assert hasattr(modal, "content_frame") - assert not isinstance(modal, BHoMBaseWindow) - - Label( - modal.content_frame, - text="Modal body", - build_options=PackingOptions(anchor="w"), - ).build() - modal.update_idletasks() - assert modal.winfo_exists() - - modal.close() - host.destroy_root() + """Modal windows should be themed Toplevels, not tk.Tk roots.""" + host = BHoMBaseWindow(title="Modal host", show_submit=False, show_close=False) + host.withdraw() + + modal = BHoMModalWindow( + host, + title="Modal test", + width=420, + height=260, + show_close=True, + ) + assert isinstance(modal, tk.Toplevel) + assert isinstance(modal, BHoMBaseChildWindow) + assert hasattr(modal, "content_frame") + assert not isinstance(modal, BHoMBaseWindow) + + Label( + modal.content_frame, + text="Modal body", + build_options=PackingOptions(anchor="w"), + ).build() + modal.update_idletasks() + assert modal.winfo_exists() + + modal.close() + host.destroy_root() def test_searchable_list_box(): - """Selections survive filtering; select/deselect all act on visible items; single mode keeps one item.""" - root = BHoMBaseWindow(title="SearchableListBox test") - changes = [] - items = ["London_TRY.epw", "London_DSY1.epw", "Gibraltar_TRY.epw", "Belfast_TRY.epw"] - - box = SearchableListBox(root.content_frame, items=items, show_selection_controls=True, - on_change=lambda value: changes.append(list(value))) - box.build() - - # Build a selection across two searches - box.set_filter("gib") - assert box.get_visible() == ["Gibraltar_TRY.epw"] - box.list_box.set_selections(["Gibraltar_TRY.epw"]) - box._on_list_change() - box.set_filter("belfast") - box.list_box.set_selections(["Belfast_TRY.epw"]) - box._on_list_change() - assert box.get() == ["Gibraltar_TRY.epw", "Belfast_TRY.epw"] - assert changes[-1] == ["Gibraltar_TRY.epw", "Belfast_TRY.epw"] - - # Clearing the filter shows the hidden selections as selected - box.clear_filter() - assert box.get_visible() == items - assert box.list_box.get_selection() == ["Gibraltar_TRY.epw", "Belfast_TRY.epw"] - - # Select/deselect all only affect visible items - box.set_filter("london") - box.select_all() - assert box.get() == items - box.deselect_all() - assert box.get() == ["Gibraltar_TRY.epw", "Belfast_TRY.epw"] - - # set / clear / set_options - box.set(["London_TRY.epw"]) - assert box.get() == ["London_TRY.epw"] - box.clear() - assert box.get() == [] - box.set(items) - box.set_options(["London_TRY.epw", "Cardiff_TRY.epw"]) - assert box.get() == ["London_TRY.epw"] - - # keep_hidden_selection=False drops selections the filter hides - strict = SearchableListBox(root.content_frame, items=items, keep_hidden_selection=False) - strict.build() - strict.set(["London_TRY.epw", "Belfast_TRY.epw"]) - strict.set_filter("london") - assert strict.get() == ["London_TRY.epw"] - - # Single select keeps at most one item, and a hidden choice survives filtering - single = SearchableListBox(root.content_frame, items=items, selectmode=tk.SINGLE) - single.build() - single.set(items) - assert single.get() == ["London_TRY.epw"] - single.set_filter("gib") - assert single.get() == ["London_TRY.epw"] - single.list_box.set_selections(["Gibraltar_TRY.epw"]) - single._on_list_change() - assert single.get() == ["Gibraltar_TRY.epw"] - - root.destroy_root() + """Selections survive filtering; select/deselect all act on visible items; single mode keeps one item.""" + root = BHoMBaseWindow(title="SearchableListBox test") + changes = [] + items = ["London_TRY.epw", "London_DSY1.epw", "Gibraltar_TRY.epw", "Belfast_TRY.epw"] + + box = SearchableListBox( + root.content_frame, + items=items, + show_selection_controls=True, + on_change=lambda value: changes.append(list(value)), + ) + box.build() + + # Build a selection across two searches + box.set_filter("gib") + assert box.get_visible() == ["Gibraltar_TRY.epw"] + box.list_box.set_selections(["Gibraltar_TRY.epw"]) + box._on_list_change() + box.set_filter("belfast") + box.list_box.set_selections(["Belfast_TRY.epw"]) + box._on_list_change() + assert box.get() == ["Gibraltar_TRY.epw", "Belfast_TRY.epw"] + assert changes[-1] == ["Gibraltar_TRY.epw", "Belfast_TRY.epw"] + + # Clearing the filter shows the hidden selections as selected + box.clear_filter() + assert box.get_visible() == items + assert box.list_box.get_selection() == ["Gibraltar_TRY.epw", "Belfast_TRY.epw"] + + # Select/deselect all only affect visible items + box.set_filter("london") + box.select_all() + assert box.get() == items + box.deselect_all() + assert box.get() == ["Gibraltar_TRY.epw", "Belfast_TRY.epw"] + + # set / clear / set_options + box.set(["London_TRY.epw"]) + assert box.get() == ["London_TRY.epw"] + box.clear() + assert box.get() == [] + box.set(items) + box.set_options(["London_TRY.epw", "Cardiff_TRY.epw"]) + assert box.get() == ["London_TRY.epw"] + + # keep_hidden_selection=False drops selections the filter hides + strict = SearchableListBox(root.content_frame, items=items, keep_hidden_selection=False) + strict.build() + strict.set(["London_TRY.epw", "Belfast_TRY.epw"]) + strict.set_filter("london") + assert strict.get() == ["London_TRY.epw"] + + # Single select keeps at most one item, and a hidden choice survives filtering + single = SearchableListBox(root.content_frame, items=items, selectmode=tk.SINGLE) + single.build() + single.set(items) + assert single.get() == ["London_TRY.epw"] + single.set_filter("gib") + assert single.get() == ["London_TRY.epw"] + single.list_box.set_selections(["Gibraltar_TRY.epw"]) + single._on_list_change() + assert single.get() == ["Gibraltar_TRY.epw"] + + root.destroy_root() def test_searchable_list_box_fuzzy_matching(): - """Default scorer: substrings and typos match, best first; min_score and a custom scorer can be supplied.""" - from functools import partial - from python_toolkit.bhom_tkinter.widgets.searchable_list_box import default_scorer - - assert default_scorer("lon", "London_TRY.epw") is not None - assert default_scorer("birmigham", "Birmingham_TRY.epw") is not None # typo - assert default_scorer("xyzq", "London_TRY.epw") is None - assert default_scorer("london", "LOS-ANGELES-DOWNTOWN.epw") is None - assert default_scorer("birmigham", "Birmingham_TRY.epw", min_score=95) is None # stricter threshold - - root = BHoMBaseWindow(title="SearchableListBox fuzzy test") - items = ["Country_Club.epw", "London_TRY.epw", "Birmingham_TRY.epw", "Gibraltar_TRY.epw"] - - fuzzy = SearchableListBox(root.content_frame, items=items) - fuzzy.build() - fuzzy.set_filter("birmigham") - assert fuzzy.get_visible() == ["Birmingham_TRY.epw"] - fuzzy.set_filter("try") - assert set(fuzzy.get_visible()) == set(items) # "try" is a substring of every item; ties keep original order - fuzzy.set_filter("xyzq") - assert fuzzy.get_visible() == [] - - # min_score is an argument of the scorer - strict = SearchableListBox(root.content_frame, items=items, scorer=partial(default_scorer, min_score=95)) - strict.build() - strict.set_filter("birmigham") - assert strict.get_visible() == [] - - # A custom scorer replaces the default - only_london = SearchableListBox( - root.content_frame, items=items, scorer=lambda query, item: 1.0 if item.startswith("London") else None) - only_london.build() - only_london.set_filter("anything") - assert only_london.get_visible() == ["London_TRY.epw"] - - root.destroy_root() + """Default scorer: substrings and typos match, best first; min_score and a custom scorer can be supplied.""" + from functools import partial + + from python_toolkit.bhom_tkinter.widgets.searchable_list_box import default_scorer + + assert default_scorer("lon", "London_TRY.epw") is not None + assert default_scorer("birmigham", "Birmingham_TRY.epw") is not None # typo + assert default_scorer("xyzq", "London_TRY.epw") is None + assert default_scorer("london", "LOS-ANGELES-DOWNTOWN.epw") is None + assert default_scorer("birmigham", "Birmingham_TRY.epw", min_score=95) is None # stricter threshold + + root = BHoMBaseWindow(title="SearchableListBox fuzzy test") + items = ["Country_Club.epw", "London_TRY.epw", "Birmingham_TRY.epw", "Gibraltar_TRY.epw"] + + fuzzy = SearchableListBox(root.content_frame, items=items) + fuzzy.build() + fuzzy.set_filter("birmigham") + assert fuzzy.get_visible() == ["Birmingham_TRY.epw"] + fuzzy.set_filter("try") + assert set(fuzzy.get_visible()) == set(items) # "try" is a substring of every item; ties keep original order + fuzzy.set_filter("xyzq") + assert fuzzy.get_visible() == [] + + # min_score is an argument of the scorer + strict = SearchableListBox(root.content_frame, items=items, scorer=partial(default_scorer, min_score=95)) + strict.build() + strict.set_filter("birmigham") + assert strict.get_visible() == [] + + # A custom scorer replaces the default + only_london = SearchableListBox( + root.content_frame, items=items, scorer=lambda query, item: 1.0 if item.startswith("London") else None + ) + only_london.build() + only_london.set_filter("anything") + assert only_london.get_visible() == ["London_TRY.epw"] + + root.destroy_root() diff --git a/Python_Engine/Python/tests/test_core.py b/Python_Engine/Python/tests/test_core.py new file mode 100644 index 00000000..ebad2b22 --- /dev/null +++ b/Python_Engine/Python/tests/test_core.py @@ -0,0 +1,73 @@ +import json +import subprocess +import sys + +import pytest + +from python_toolkit._optional import require_extra +from python_toolkit.bhom import BHOM_VERSION +from python_toolkit.bhom.decorators import bhom_wrapper +from python_toolkit.bhom.logging import get_logger +from python_toolkit.bhom.run_wrapped import run_wrapped +from python_toolkit.bhom.util import bson_unix_ticks, bson_unix_ticks_to_datetime + +HEAVY_MODULES = ["clr", "matplotlib", "numpy", "pandas", "plotly"] + + +def test_core_imports_only_the_standard_library(): + """The root package must stay lightweight: importing the core must not pull in optional dependencies.""" + script = ( + "import sys\n" + "import python_toolkit, python_toolkit.bhom.analytics, python_toolkit.bhom.bhom_object\n" + "import python_toolkit.bhom.run_wrapped, python_toolkit.bhom.logging, python_toolkit.units\n" + "import python_toolkit.scaffold\n" + f"print([m for m in {HEAVY_MODULES!r} if m in sys.modules])\n" + ) + result = subprocess.run([sys.executable, "-c", script], capture_output=True, text=True, check=True) + assert result.stdout.strip() == "[]" + + +def test_require_extra_names_the_extra(): + with pytest.raises(ImportError, match=r"python_toolkit\[plot\]"): + require_extra("plot", "a_module_that_does_not_exist") + + require_extra("plot", "json") # present: no error + + +def test_bhom_version_is_a_version_string(): + assert isinstance(BHOM_VERSION, str) + assert BHOM_VERSION.split(".")[0].isdigit() + + +def test_get_logger_does_not_duplicate_handlers(): + first = get_logger("Some_Toolkit") + second = get_logger("Some_Toolkit") + assert first is second + assert len(first.handlers) == 1 + assert first.name == "Some_Toolkit[console]" + + +def test_bson_ticks_round_trip(): + ticks = bson_unix_ticks(short=True) + assert abs(bson_unix_ticks(bson_unix_ticks_to_datetime(ticks, short=True), short=True) - ticks) <= 1 + + +def test_bson_ticks_default_is_now(): + first = bson_unix_ticks(short=True) + assert bson_unix_ticks(short=True) >= first + + +def test_run_wrapped_round_trip(capsys): + """Methods registered with bhom_callable can be invoked with JSON, as BH.Engine.Python does.""" + payload = json.dumps({"geometry": {"_t": "BH.oM.Geometry.Point", "X": 1.0, "Y": 2.0, "Z": 3.0}}) + + run_wrapped("test", payload) + + result = json.loads(capsys.readouterr().out) + assert result["_t"] == "BH.oM.Geometry.Point" + assert result["X"] == 20 + + +def test_unregistered_method_raises(): + with pytest.raises(NotImplementedError): + bhom_wrapper.get_registered_method("does_not_exist") diff --git a/Python_Engine/Python/tests/test_plot.py b/Python_Engine/Python/tests/test_plot.py index bf94258b..dda0342e 100644 --- a/Python_Engine/Python/tests/test_plot.py +++ b/Python_Engine/Python/tests/test_plot.py @@ -1,7 +1,8 @@ -import matplotlib.pyplot as plt +import matplotlib.pyplot as plt import numpy as np import pandas as pd import pytest + from python_toolkit.plot.diurnal import diurnal, stacked_diurnals from python_toolkit.plot.heatmap import heatmap from python_toolkit.plot.spatial_heatmap import spatial_heatmap @@ -10,12 +11,11 @@ contrasting_colour, create_triangulation, lighten_color, - relative_luminance + relative_luminance, ) -from matplotlib.figure import Figure -from pathlib import Path -from . import TIMESERIES_COLLECTION +from ._data import TIMESERIES_COLLECTION + def test_create_triangulation(): """_""" @@ -35,6 +35,7 @@ def test_create_triangulation(): with pytest.raises(ValueError): create_triangulation(x, y, alpha=0.00001) + def test_relative_luminance(): """_""" assert relative_luminance("#FFFFFF") == pytest.approx(1.0, rel=1e-7) @@ -83,6 +84,7 @@ def test_colormap_sequential(): """_""" assert sum(colormap_sequential("red", "green", "blue")(0.25)) == pytest.approx(1.750003844675125, rel=0.01) + def test_spatial_heatmap(): """_""" x = np.linspace(0, 100, 101) @@ -93,7 +95,8 @@ def test_spatial_heatmap(): assert isinstance(spatial_heatmap([tri], [zz], contours=[0]), plt.Figure) plt.close("all") -#TODO: use a preset collection, or generate one from a year and random values + +# TODO: use a preset collection, or generate one from a year and random values def test_timeseries_diurnal(): """_""" assert isinstance(diurnal(TIMESERIES_COLLECTION), plt.Axes) @@ -137,6 +140,7 @@ def test_timeseries_diurnal(): plt.Figure, ) + def test_heatmap(): """_""" assert isinstance(heatmap(TIMESERIES_COLLECTION), plt.Axes) @@ -187,4 +191,4 @@ def test_heatmap_keeps_last_bins(): np.arange(24, dtype=float), index=pd.date_range("2000-01-01", periods=24, freq="h"), ) - assert _heatmap_cell_count(hourly_one_day) == 24 \ No newline at end of file + assert _heatmap_cell_count(hourly_one_day) == 24 diff --git a/Python_Engine/Python/tests/test_plot_utilities.py b/Python_Engine/Python/tests/test_plot_utilities.py index c6e56d3b..e6d97668 100644 --- a/Python_Engine/Python/tests/test_plot_utilities.py +++ b/Python_Engine/Python/tests/test_plot_utilities.py @@ -1,21 +1,17 @@ -import matplotlib.pyplot as plt -import numpy as np -import pandas as pd -import pytest -from matplotlib.figure import Figure -from pathlib import Path +import matplotlib.pyplot as plt -from python_toolkit.plot.utilities import figure_to_base64, image_to_base64, base64_to_image, figure_to_image +from python_toolkit.plot.utilities import base64_to_image, figure_to_base64, image_to_base64 -def test_figure_round_trip(): + +def test_figure_round_trip(tmp_path): """very simple test to check that base64 serialisation is working""" fig, ax = plt.subplots(1, 1) base64 = figure_to_base64(fig) assert isinstance(base64, str) - path = base64_to_image(base64, image_path = Path("tests/assets/temp.png").resolve()) + path = base64_to_image(base64, image_path=tmp_path / "temp.png") assert path.exists() - + base64_2 = image_to_base64(path) - path.unlink() #make sure to clean up after ourselves - assert base64 == base64_2 \ No newline at end of file + path.unlink() # make sure to clean up after ourselves + assert base64 == base64_2 diff --git a/Python_Engine/Python/tests/test_scaffold.py b/Python_Engine/Python/tests/test_scaffold.py new file mode 100644 index 00000000..e5f02d74 --- /dev/null +++ b/Python_Engine/Python/tests/test_scaffold.py @@ -0,0 +1,135 @@ +import os +import shutil +import subprocess +import sys +from pathlib import Path + +import pytest + +from python_toolkit.scaffold import ToolkitSpec, create_toolkit, main + +ROOT = Path(__file__).parents[1] +CURRENT_PYTHON = f"{sys.version_info.major}.{sys.version_info.minor}" + + +@pytest.fixture +def extensions(tmp_path): + """A fake BHoM Python extensions directory containing a deployed copy of this root toolkit.""" + directory = tmp_path / "extensions" + deployed = directory / "Python_Toolkit" + deployed.mkdir(parents=True) + for name in ("pyproject.toml", "README.md", "ruff.toml"): + shutil.copy(ROOT / name, deployed / name) + shutil.copytree(ROOT / "src", deployed / "src", ignore=shutil.ignore_patterns("__pycache__", "*.pyc", "*.egg-info")) + return directory + + +def _spec(tmp_path, extensions, **kwargs): + return ToolkitSpec( + name=kwargs.pop("name", "Demo_Toolkit"), + output=tmp_path / "Demo_Toolkit", + python_version=kwargs.pop("python_version", CURRENT_PYTHON), + extensions_directory=extensions, + **kwargs, + ) + + +def test_creates_expected_files(tmp_path, extensions): + spec = _spec(tmp_path, extensions) + + created = {p.relative_to(spec.output).as_posix() for p in create_toolkit(spec)} + + assert created == { + ".gitignore", + ".python-version", + "README.md", + "pyproject.toml", + "docs/conf.py", + "docs/index.md", + "src/demo_toolkit/__init__.py", + "src/demo_toolkit/example.py", + "tests/__init__.py", + "tests/conftest.py", + "tests/test_example.py", + } + assert (spec.output / ".python-version").read_text().strip() == CURRENT_PYTHON + + +def test_pyproject_wires_dependencies(tmp_path, extensions): + spec = _spec(tmp_path, extensions, depends_on=["Other_Toolkit"], extras=["plot"], python_version="3.11") + create_toolkit(spec) + pyproject = (spec.output / "pyproject.toml").read_text() + + assert 'name = "demo_toolkit"' in pyproject + assert 'version = "999.999.999"' in pyproject + assert 'requires-python = ">=3.11,<3.12"' in pyproject + assert '"python_toolkit[plot]",' in pyproject + assert '"other_toolkit",' in pyproject + root = (extensions / "Python_Toolkit").as_posix() + assert f'python_toolkit = {{ path = "{root}", editable = true }}' in pyproject + assert f'other_toolkit = {{ path = "{(extensions / "Other_Toolkit").as_posix()}", editable = true }}' in pyproject + assert f'extend = "{root}/ruff.toml"' in pyproject + + try: + import tomllib + except ImportError: # Python 3.10 + return + parsed = tomllib.loads(pyproject) + assert parsed["project"]["dependencies"] == ["python_toolkit[plot]", "other_toolkit"] + assert set(parsed["tool"]["uv"]["sources"]) == {"python_toolkit", "other_toolkit"} + + +@pytest.mark.parametrize( + ("kwargs", "message"), + [ + ({"name": "bad name"}, "Invalid toolkit name"), + ({"name": "Python_Toolkit"}, "cannot be used"), + ({"python_version": "3.8"}, "Invalid Python version"), + ({"python_version": "three"}, "Invalid Python version"), + ({"extras": ["nope"]}, "Unknown python_toolkit extras"), + ({"depends_on": ["bad name"]}, "Invalid dependency"), + ], +) +def test_invalid_specs_are_rejected(tmp_path, extensions, kwargs, message): + with pytest.raises(ValueError, match=message): + create_toolkit(_spec(tmp_path, extensions, **kwargs)) + + +def test_refuses_to_overwrite(tmp_path, extensions): + spec = _spec(tmp_path, extensions) + spec.output.mkdir() + (spec.output / "existing.txt").write_text("keep me") + + with pytest.raises(ValueError, match="not empty"): + create_toolkit(spec) + + +def test_cli(tmp_path, extensions, capsys): + output = tmp_path / "Cli_Toolkit" + code = main(["Cli_Toolkit", "--output", str(output), "--python", "3.12", "--extensions-dir", str(extensions)]) + + assert code == 0 + assert (output / "src" / "cli_toolkit" / "example.py").exists() + assert "Next steps" in capsys.readouterr().out + + assert main(["bad name", "--output", str(tmp_path / "x")]) == 2 + + +@pytest.mark.slow +@pytest.mark.skipif(shutil.which("uv") is None, reason="uv is required") +def test_generated_toolkit_installs_lints_and_passes_its_tests(tmp_path, extensions): + """End to end: the generated toolkit resolves the root toolkit, passes its own tests and meets the ruff standard.""" + spec = _spec(tmp_path, extensions) + create_toolkit(spec) + env = {k: v for k, v in os.environ.items() if k not in ("VIRTUAL_ENV", "UV_PROJECT_ENVIRONMENT")} + + def run(*args): + result = subprocess.run(["uv", *args], cwd=spec.output, env=env, capture_output=True, text=True) + assert result.returncode == 0, f"uv {' '.join(args)} failed:\n{result.stdout}\n{result.stderr}" + return result.stdout + + run("sync") + run("run", "pytest", "-q") + run("run", "ruff", "check", ".") + run("run", "ruff", "format", "--check", ".") + assert "demo_toolkit" in run("run", "python", "-c", "import demo_toolkit; print(demo_toolkit.__name__)") diff --git a/Python_Engine/Python_Engine.csproj b/Python_Engine/Python_Engine.csproj index e07ab6e1..520c1dba 100644 --- a/Python_Engine/Python_Engine.csproj +++ b/Python_Engine/Python_Engine.csproj @@ -11,11 +11,14 @@ ..\Build\ Debug;Release;Test - - - - - + + + true + + $(ProgramData)\BHoM\Extensions\Python\Python_Toolkit + + $(DefaultItemExcludes);Python\.venv\**;Python\**\__pycache__\**;Python\.pytest_cache\**;Python\.ruff_cache\**;Python\docs\_build\**;Python\docs\autoapi\** + @@ -41,10 +44,16 @@ False - - + + - - + + + + + + + + diff --git a/Python_Engine/Query/Directory.cs b/Python_Engine/Query/Directory.cs index ab4a19ed..65e5a1f9 100644 --- a/Python_Engine/Query/Directory.cs +++ b/Python_Engine/Query/Directory.cs @@ -35,11 +35,16 @@ public static string DirectoryExtensions() return Path.Combine(Directory.GetParent(Base.Query.BHoMFolder()).FullName, "Extensions"); } - [Description("The location where any BHoM-related Python environment (or virtualenv) resides.")] + private const string EnvironmentsDirectoryVariable = "BHOM_PYTHON_EXTENSIONS_DIR"; + + [Description("The location where any BHoM-related Python environment (or virtualenv) resides. Defaults to the Extensions/Python folder next to the BHoM installation; set the BHOM_PYTHON_EXTENSIONS_DIR environment variable to override it (e.g. for isolated testing).")] [Output("path", "The location where any BHoM-related Python environment (or virtualenv) resides.")] public static string DirectoryEnvironments() { - string dir = Path.Combine(DirectoryExtensions(), "Python"); + string dir = System.Environment.GetEnvironmentVariable(EnvironmentsDirectoryVariable); + if (string.IsNullOrWhiteSpace(dir)) + dir = Path.Combine(DirectoryExtensions(), "Python"); + dir = Path.GetFullPath(dir); if (!Directory.Exists(dir)) Directory.CreateDirectory(dir); return dir; @@ -49,7 +54,7 @@ public static string DirectoryEnvironments() [Output("path", "The location where any BHoM-related Python tools reside.")] public static string DirectoryTools() { - string dir = Path.Combine(DirectoryExtensions(), "Python", "tools"); + string dir = Path.Combine(DirectoryEnvironments(), "tools"); if (!Directory.Exists(dir)) Directory.CreateDirectory(dir); return dir; diff --git a/Python_Engine/Query/UVExecutable.cs b/Python_Engine/Query/UVExecutable.cs index e1a87ef5..c0507302 100644 --- a/Python_Engine/Query/UVExecutable.cs +++ b/Python_Engine/Query/UVExecutable.cs @@ -21,6 +21,7 @@ */ using BH.oM.Base.Attributes; +using System.Collections.Generic; using System.ComponentModel; using System.IO; @@ -34,5 +35,36 @@ public static string UVExecutable() { return Path.Combine(DirectoryTools(), "uv.exe"); } + + [Description("The version of UV that BHoM installs and expects. Pinning this keeps environment creation reproducible across machines.")] + [Output("version", "The pinned UV version.")] + public static string UVVersion() + { + return "0.13.10"; + } + + [Description("Environment variables applied to every BHoM-managed UV call. These keep UV-managed Python interpreters, the package cache and UV tools inside the BHoM tools directory, so environments work for every user on the machine and RemoveUV removes everything. Variables already set in the current process are respected and not overridden.")] + [Output("variables", "The environment variables to apply when running UV.")] + public static Dictionary UVEnvironmentVariables() + { + string tools = DirectoryTools(); + Dictionary defaults = new Dictionary + { + { "UV_PYTHON_INSTALL_DIR", Path.Combine(tools, "python") }, + { "UV_CACHE_DIR", Path.Combine(tools, "cache") }, + { "UV_TOOL_DIR", Path.Combine(tools, "uvtools") }, + { "UV_TOOL_BIN_DIR", Path.Combine(tools, "uvtools", "bin") }, + { "UV_NO_MODIFY_PATH", "1" }, + { "UV_PYTHON_PREFERENCE", "managed" }, + }; + + Dictionary result = new Dictionary(); + foreach (KeyValuePair variable in defaults) + { + if (string.IsNullOrEmpty(System.Environment.GetEnvironmentVariable(variable.Key))) + result[variable.Key] = variable.Value; + } + return result; + } } } diff --git a/Python_oM/Python_oM.csproj b/Python_oM/Python_oM.csproj index d28aace7..c036f8aa 100644 --- a/Python_oM/Python_oM.csproj +++ b/Python_oM/Python_oM.csproj @@ -21,8 +21,11 @@ - - + + true + + + diff --git a/README.md b/README.md index 318a646d..234fbb84 100644 --- a/README.md +++ b/README.md @@ -1,52 +1,105 @@ [![License: LGPL v3](https://img.shields.io/badge/License-LGPL%20v3-blue.svg)](https://www.gnu.org/licenses/lgpl-3.0) -## Install me -To install the Python_Toolkit: -1. Compile: - 1. [BHoM](https://github.com/BHoM/BHoM) - 1. [BHoM_Engine](https://github.com/BHoM/BHoM_Engine) - 1. [BHoM_Adapter](https://github.com/BHoM/BHoM_Adapter) - 1. [BHoM_UI](https://github.com/BHoM/BHoM_UI) - 1. [Rhinoceros_Toolkit](https://github.com/BHoM/Rhinoceros_Toolkit) - 1. [Grasshopper_Toolkit](https://github.com/BHoM/Grasshopper_Toolkit) - 1. Python_Toolkit (this repo) -1. Open a UI of your choice (e.g. Grasshopper) -1. Run the `BH.Engine.Python.Compute.InstallPythonToolkit` component and wait for the installation to finish -1. The installation has succeeded if the install packages include: - - Python 3.7 - - jupyterlab - - matplotlib - - Python_Toolkit -1. Restart your UI or recompute the script - -To check whether all went well you can run the component `BH.Engine.Python.Compute.Import` with an input of a string as `Python_Engine`, -and check that it succeed without errors - -## Installation structure -There are two main events to install the toolkit: -1. Compiling the toolkit. This does two things: - - It builds the dynamic libraries required by .NET and copies them to C:\ProgramData\BHoM\Assemblies - - It packs the python files in the toolkit and copies them to C:\ProgramData\BHoM\Extensions\Python\src -2. Installing the Toolkit from the UI. This is performed by running the `InstallPythonToolkit` method. This will: - - Download Python and install python - - Download and install `pip` - - Install the necessary packages (e.g. `jupyterlab`) - - Install the python bindings of the Python_Toolkit from C:\ProgramData\BHoM\Extensions\Python\src - This contains all the code that is currently developed in the toolkit in python - -## Building the BHoM and the Toolkits from Source ## -You will need the following to build BHoM: - -- Microsoft Visual Studio 2013 or higher -- Microsoft .NET Framework 4.0 and above (included with Visual Studio 2013) -- Note that there are no software - specific dependencies (only operating system relevant), this is specific: BHoM is a software agnostic object model. - -## Running commands and creating environments - -UV is installed at `Path.Combine(Query.DirectoryTools(), "uv.exe")`. Engine methods, tests, and PowerShell scripts invoke this BHoM-managed executable directly, never an unrelated UV on PATH. Installation prepends the tools directory to the current process PATH without changing the user or system PATH. - -`RunCommandStdout` returns `BH.oM.Base.Output`: `Item1` is stdout, `Item2` is stderr, and `Item3` is the exit code (zero for success, -1 for timeout). Both streams are retained on success, failure, and timeout. Callers that previously consumed a string must select the appropriate output. Command failures are also recorded as BHoM errors; invalid working directories and process-start failures still throw. - -Creating an environment from a TOML file updates its static `[project].version` to `BH.Engine.Base.Query.BHoMVersion()` before installation. Other version fields are left unchanged. Recreating that environment preserves the TOML file and package sources. + +# Python_Toolkit + +The Python_Toolkit manages the Python environments used by BHoM, and provides `python_toolkit`: the root Python +package that every BHoM Python toolkit builds on (logging, usage analytics, BHoM JSON conversion and the +C#-callable wrapper). + +Environments are managed with [uv](https://docs.astral.sh/uv/), driven from C# (`BH.Engine.Python`), so they can be +created, updated, tested and removed from any BHoM UI. + +## How it fits together + +``` +C:\ProgramData\BHoM\Extensions\Python\ +├── tools\ uv.exe (pinned version), plus the Python interpreters and package cache it manages +├── Python_Toolkit\ deployed by building this repository +│ ├── pyproject.toml root package: standard-library core + optional extras +│ ├── ruff.toml the shared formatting/linting standard +│ └── .venv\ created by InstallPythonToolkitVenv +└── _Toolkit\ deployed by building that toolkit + ├── pyproject.toml depends on python_toolkit via [tool.uv.sources] path = "...\Python_Toolkit" + └── .venv\ its own environment, with its own Python version +``` + +- **Every toolkit is a standalone uv project** with its own `.venv` and Python version. Shared code is not copied: + each toolkit lists `python_toolkit` (and any other toolkit it needs) as a dependency, installed from the deployed + folder through a [uv path source](https://docs.astral.sh/uv/concepts/projects/dependencies/#path). This is why the + root package supports every Python from 3.10 and has no required third-party dependencies. +- **Building** a toolkit's `_Engine` project copies its `Python` folder into the folder above, and its DLLs into + `C:\ProgramData\BHoM\Assemblies`. Pass `-p:BHoMSkipDeploy=true` to build without deploying. +- **Creating the environment** (`Compute.VirtualEnvironment(tomlFile)`) stamps the toolkit's version with the BHoM + version, checks that the toolkits it depends on are deployed, runs `uv sync`, and registers a Jupyter kernel. + +## Using it from C# + +| Method | Purpose | +| --- | --- | +| `Compute.InstallUV(run)` | Install the pinned uv (`Query.UVVersion()`) into the tools folder. Called automatically when needed. | +| `Compute.InstallPythonToolkitVenv(run, reload)` | Create or update the `Python_Toolkit` environment. | +| `Compute.VirtualEnvironment(tomlFile, reload)` | Create or update any deployed toolkit's environment from its `pyproject.toml`. | +| `Compute.VirtualEnvironment(version, name, reload)` | Create a bare environment with a given Python version. | +| `Compute.RunPytest(toolkitDirectory or venv, arguments, run)` | Run a toolkit's pytest suite. Returns pass/fail, exit code, output and a JUnit XML report. | +| `Compute.CreateToolkit(name, targetDirectory, pythonVersion, dependencies, extras, run)` | Scaffold a new Python toolkit (see below). | +| `Compute.BuildDocumentation(toolkitDirectory, run)` | Build a toolkit's HTML documentation from its docstrings. | +| `Compute.UpdateBHoMPackages(venv)` | Re-sync an environment with its `pyproject.toml`. | +| `Compute.RunCommandStdout(command, ...)` | Run a command, returning stdout, stderr and the exit code (-1 on timeout). | +| `Compute.RunPythonString(venv, script)` | Run a Python script in an environment and return its output. | +| `Compute.RemoveVirtualEnvironment` / `RemoveJupyterKernel` / `RemoveUV` / `RemoveEverything` | Clean up. Toolkit code is always kept. | + +Methods with side effects take `run = false` by default. When not run, they record a note describing what would +happen. + +uv is only ever run from the BHoM tools folder, never from `PATH`. Its interpreters and cache are kept in that +folder too, so environments work for every user on the machine and `RemoveUV` removes everything uv installed. + +## Creating a new Python toolkit + +From C# (`Compute.CreateToolkit`), from VS Code (the *Python: new toolkit* task), or from a terminal: + +```powershell +cd Python_Engine/Python +uv run bhom-new-toolkit Wind_Toolkit --output C:/repos/Wind_Toolkit/Wind_Toolkit_Engine/Python --python 3.11 +``` + +This generates a ready-to-use project with a `pyproject.toml`, an example module (logging and usage analytics), +pytest tests, Sphinx documentation and the shared ruff configuration. It also prints the csproj snippet that deploys +the toolkit when it is built. See [Python_Engine/Python/README.md](Python_Engine/Python/README.md) for the +conventions. + +## Developing this repository + +Prerequisites: BHoM installed in `C:\ProgramData\BHoM`, the .NET SDK, and [uv](https://docs.astral.sh/uv/). + +**In VS Code**, open the repository folder and accept the recommended extensions, then: + +- `Ctrl+Shift+B` builds the solution without deploying (*C#: build and deploy to BHoM* deploys). +- *Tasks: Run Test Task* runs the C# tests or the Python tests. The Python tests also appear in the Testing panel + once *Python: sync* has created `Python_Engine/Python/.venv`. + +**From a terminal:** + +```powershell +dotnet build Python_Toolkit.sln -p:BHoMSkipDeploy=true +dotnet test .ci/unit_tests/Python_Engine_Test/Python_Engine_Test.csproj --filter "Category!=Integration" +dotnet test .ci/unit_tests/Python_Engine_Test/Python_Engine_Test.csproj --filter "Category=Integration" # end to end, a few minutes + +cd Python_Engine/Python +uv sync --all-extras +uv run pytest +uv run ruff format; uv run ruff check --fix +``` + +The C# tests never touch `C:\ProgramData\BHoM\Extensions\Python`. They redirect it to a temporary folder through the +`BHOM_PYTHON_EXTENSIONS_DIR` environment variable. The *Integration* tests do the following, end to end, in that +temporary folder: + +1. Deploy `Python_Toolkit` and create its environment. +2. Run its pytest suite from C#. +3. Scaffold a downstream toolkit, then create and test its environment. + +To format and lint on every commit, run `uv run --project Python_Engine/Python pre-commit install` once. ## Want to contribute? ## diff --git a/Versioning_93.json b/Versioning_93.json index e2425a36..1307c5e6 100644 --- a/Versioning_93.json +++ b/Versioning_93.json @@ -15,18 +15,15 @@ "BH.Engine.Python.Compute.BasePythonEnvironment(BH.oM.Python.Enums.PythonVersion, System.Boolean, System.Boolean)": "Python environments are now managed by UV. Use InstallPythonToolkitVenv to install the toolkit environment, or VirtualEnvironment with a Python version string to create a named environment. Reconnect inputs manually.", "BH.Engine.Python.Compute.DownloadFile(System.String, System.String, System.String, System.Boolean)": "This download helper has been removed. Python installation is now handled by UV. For other downloads, use a separate file-download workflow.", "BH.Engine.Python.Compute.DownloadPythonVersion(BH.oM.Python.Enums.PythonVersion)": "Python installation is now handled by UV. Use VirtualEnvironment with a Python version string, such as \"3.10\", instead.", - "BH.Engine.Python.Compute.InstallPackages(BH.oM.Python.PythonEnvironment, System.Collections.Generic.List)": "Replace this component with InstallPackages(PythonEnvironment, List, Boolean). Supply an environment created using the UV workflow and set run to true.", "BH.Engine.Python.Compute.InstallPackages(System.String, System.Collections.Generic.List)": "Installation using an executable path has been removed. Use InstallPackages with a PythonEnvironment created using the UV workflow and set run to true.", "BH.Engine.Python.Compute.InstallRequirements(BH.oM.Python.PythonEnvironment, System.String)": "Requirements-file installation has been removed. Declare dependencies in pyproject.toml and create the environment from that file, or supply package requirements to InstallPackages with run set to true.", "BH.Engine.Python.Compute.InstallRequirements(System.String, System.String)": "Requirements-file installation using an executable path has been removed. Declare dependencies in pyproject.toml and create the environment from that file, or use InstallPackages with a PythonEnvironment and run set to true.", - "BH.Engine.Python.Compute.InstallPackageLocal(BH.oM.Python.PythonEnvironment, System.String)": "Replace this component with InstallPackageLocal(PythonEnvironment, String, Boolean). Supply an environment created using the UV workflow and set run to true.", "BH.Engine.Python.Compute.InstallPackageLocal(System.String, System.String)": "Local package installation using an executable path has been removed. Use InstallPackageLocal with a PythonEnvironment created using the UV workflow and set run to true.", "BH.Engine.Python.Compute.RemoveKernel(System.String)": "Use RemoveJupyterKernel with the name of a UV-managed BHoM environment and set run to true. Legacy kernels may require manual removal using Jupyter.", "BH.Engine.Python.Compute.RemoveAllKernels()": "Bulk kernel removal has been removed. Use RemoveJupyterKernel for individual UV-managed BHoM environments with run set to true. Legacy kernels may require manual removal using Jupyter.", "BH.Engine.Python.Compute.RemoveVirtualEnvironment(System.String)": "Replace this component with RemoveVirtualEnvironment(String, Boolean) and set run to true. It removes environments in the new BHoM Python directory; legacy environments require separate cleanup.", "BH.Engine.Python.Compute.RemoveAllVirtualEnvironments()": "Bulk environment removal has been removed. Use RemoveVirtualEnvironment for each named environment and set run to true. RemoveEverything also removes BHoM-managed UV tools, so use it only when that broader cleanup is intended.", "BH.Engine.Python.Compute.RemoveBaseVersion(BH.oM.Python.Enums.PythonVersion)": "The former base Python installation workflow has been removed. Use RemoveVirtualEnvironment for named BHoM environments. Removing UV does not uninstall UV-managed Python runtimes or legacy Python installations.", - "BH.Engine.Python.Compute.RemoveEverything()": "Replace this component with RemoveEverything(Boolean) and set run to true. Review its scope: it targets the new BHoM Python environments and managed UV tools, not legacy installations.", "BH.Engine.Python.Compute.RequirementsTxt(System.String, System.String)": "Requirements-file generation has been removed. Manage project dependencies using pyproject.toml and UV. Use UV export separately if a requirements.txt file is needed.", "BH.Engine.Python.Compute.UnzipFile(System.String, System.String, System.String, System.Boolean)": "This archive-extraction helper has been removed. Use a separate archive-extraction workflow if needed.", "BH.Engine.Python.Compute.UpdateBHoMPackages(System.String, BH.oM.Python.Enums.PythonVersion)": "Use UpdateBHoMPackages(PythonEnvironment) with an environment created using the UV workflow. The PythonVersion enum input is no longer supported.",