diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 5b8c69e8..aa650dc3 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -1,4 +1,4 @@ -name: Release +name: Release on PyPI on: push: @@ -9,18 +9,61 @@ permissions: contents: write jobs: - pypi-publish: - name: Upload release to PyPI + build: runs-on: ubuntu-latest - environment: release permissions: - # IMPORTANT: this permission is mandatory for trusted publishing + contents: read + steps: + - name: Checkout + uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 + with: + persist-credentials: false + + - name: Install uv + uses: astral-sh/setup-uv@c771a70e6277c0a99b617c7a806ffedaca235ff9 # v9.0.0 + with: + enable-cache: false + + - name: Build + run: uv build + + # Optional, but recommended: run smoke tests on distributions + - name: Smoke test (wheel) + run: uv run --isolated --no-project --with dist/*.whl tests/smoke_test.py + - name: Smoke test (source distribution) + run: uv run --isolated --no-project --with dist/*.tar.gz tests/smoke_test.py + + - name: Upload distributions as artifacts + uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 + with: + name: dist + path: dist/ + + publish: + needs: + - build + runs-on: ubuntu-latest + environment: + name: release + permissions: id-token: write steps: - - uses: actions/checkout@v3 - - uses: pdm-project/setup-pdm@v3 - - name: Publish package distributions to PyPI - run: pdm publish + - name: Install uv + uses: astral-sh/setup-uv@c771a70e6277c0a99b617c7a806ffedaca235ff9 # v9.0.0 + with: + enable-cache: false + + - name: Download distributions artifact + uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1 + with: + name: dist + path: dist/ + + - name: Generate PEP 740 attestations + uses: astral-sh/attest-action@f589a42a7efb6fe400b4f400de60b4bc90390027 # v0.0.6 + + - name: Publish + run: uv publish release: name: Create Github release diff --git a/.python-version b/.python-version index 2c073331..6324d401 100644 --- a/.python-version +++ b/.python-version @@ -1 +1 @@ -3.11 +3.14 diff --git a/docs/instructor/problem/advanced.md b/docs/instructor/problem/advanced.md index 29379a15..581e7e09 100644 --- a/docs/instructor/problem/advanced.md +++ b/docs/instructor/problem/advanced.md @@ -12,7 +12,6 @@ like this ```py class Instance(InstanceModel): - rectangles: list[tuple[int, int, int, int]] ``` @@ -26,7 +25,6 @@ from algobattle.util import BaseModel class Rectangle(BaseModel): - x: int y: int width: int @@ -34,7 +32,6 @@ class Rectangle(BaseModel): class Instance(InstanceModel): - rectangles: list[Rectangle] ``` @@ -106,6 +103,7 @@ creating the Python object. We can use it either as the default value of the att ```py from pydantic import Field + class Instance(InstanceModel): """An instance of the Some Example problem.""" @@ -167,7 +165,6 @@ directionless. Both graph's size is the number of vertices in it. def size(self) -> int: """A graph's size is the number of vertices in it.""" return self.num_vertices - ``` !!! tip "Associated Annotation Types" @@ -184,9 +181,7 @@ indexed with the type of the weights you want to use. would be done like this: ```py - class Instance(DirectedGraph, VertexWeights[str], EdgeWeights[float]): - - ... + class Instance(DirectedGraph, VertexWeights[str], EdgeWeights[float]): ... ``` Both are encoded as lists of the weights where the nth entry corresponds to the weight of the nth vertex or edge. @@ -194,7 +189,6 @@ indexed with the type of the weights you want to use. ```py class Instance(DirectedGraph): - vertex_weights: Annotated[list[str], SizeLen] edge_weights: Annotated[list[float], EdgeLen] @@ -293,11 +287,11 @@ class Instance(DirectedGraph): class Solution(SolutionModel): """Solutions of the 3 Shortest Paths problem.""" - paths: tuple[Path, Path, Path] # (2)! + paths: tuple[Path, Path, Path] # (2)! @minimize - def score(self, role: Role) -> float: - ... + def score(self, role: Role) -> float: ... + Problem( name="3 Shortest Paths", @@ -332,16 +326,13 @@ class Solution(SolutionModel): paths: tuple[Path, Path, Path] -def compare_each_path( - instance: Instance, - generator_solution: Solution, - solver_solution: Solution -) -> float: - gen_lens = sorted(len(path) for path in generator_solution.paths) # (1)! +def compare_each_path(instance: Instance, generator_solution: Solution, solver_solution: Solution) -> float: + gen_lens = sorted(len(path) for path in generator_solution.paths) # (1)! sol_lens = sorted(len(path) for path in solver_solution.paths) - ratios = [len(gen) / len(sol) for gen, sol in zip(gen_lens, sol_lens)] # (2)! - ratios = [min(1, max(0, num)) for num in ratios] # (3)! - return sum(ratios) / 3 # (4)! + ratios = [len(gen) / len(sol) for gen, sol in zip(gen_lens, sol_lens)] # (2)! + ratios = [min(1, max(0, num)) for num in ratios] # (3)! + return sum(ratios) / 3 # (4)! + Problem( name="3 Shortest Paths", diff --git a/docs/instructor/problem/annotations.md b/docs/instructor/problem/annotations.md index 352f27bd..870b34b6 100644 --- a/docs/instructor/problem/annotations.md +++ b/docs/instructor/problem/annotations.md @@ -20,7 +20,6 @@ type aliases, which basically just are variables but for types. For example, con ```py class Example(InstanceModel): - edges: list[tuple[int, int]] matchings: list[set[tuple[int, int]]] ``` @@ -35,8 +34,8 @@ version and how explicit you want (and have) to be, but they all do the same thi Edge = tuple[int, int] Matching = set[Edge] - class Example(InstanceModel): + class Example(InstanceModel): edges: list[Edge] matchings: list[Matching] ``` @@ -47,8 +46,8 @@ version and how explicit you want (and have) to be, but they all do the same thi Edge: TypeAlias = tuple[int, int] Matching: TypeAlias = set[Edge] - class Example(InstanceModel): + class Example(InstanceModel): edges: list[Edge] matchings: list[Matching] ``` @@ -59,8 +58,8 @@ version and how explicit you want (and have) to be, but they all do the same thi type Edge = tuple[int, int] type Matching = set[Edge] - class Example(InstanceModel): + class Example(InstanceModel): edges: list[Edge] matchings: list[Matching] ``` @@ -128,9 +127,9 @@ problem definition we can usually prevent them altogether by just reordering the ```py class Example(InstanceModel): - some_attr: "CoolNumber" + CoolNumber = int ``` @@ -155,9 +154,7 @@ would then specify this using its `Field` specifier like this ```py class Example(InstanceModel): - positive_int: int = Field(gt=0) - ``` where the `gt` key tells Pydantic that it should validate this field as being greater than 0. This works great when you @@ -172,13 +169,12 @@ several fields should be validated with a single `Field`. ```py PositiveInt = Annotated[int, Field(gt=0)] -class Example(InstanceModel): +class Example(InstanceModel): first: PositiveInt second: PositiveInt third: PositiveInt fourth: PositiveInt - ``` The Python standard library `annotated_types` also contains a collection of basic metadata types such as `Gt`, `Ge`, @@ -189,7 +185,6 @@ The Python standard library `annotated_types` also contains a collection of basi ```py class Example(InstanceModel): - first: int = Field(ge=3, lt=18) second: Annotated[int, Field(ge=3, lt=18)] third: Annotated[int, Ge(3), Lt(18)] @@ -248,12 +243,10 @@ will be found in the instance or solution. Our example problem then becomes simp ```py class Instance(InstanceModel): - numbers: list[int] class Solution(InstanceModel): - biggest: Annotated[int, In(InstanceRef.numbers)] ``` @@ -304,6 +297,7 @@ the validation function also receives the value of a referenced attribute. if not val.startswith(" " * indent_level): raise ValueError + IndentedLine = Annotated[str, AttributeReferenceValidator(check_indentation, InstanceRef.indentation)] ``` diff --git a/docs/instructor/problem/example.md b/docs/instructor/problem/example.md index f8489a7a..294ac14c 100644 --- a/docs/instructor/problem/example.md +++ b/docs/instructor/problem/example.md @@ -91,36 +91,20 @@ We start with filling in the generator. ```py title="generator/generator.py" """Main module, will be run as the generator.""" + import json from pathlib import Path max_size = int(Path("/input/max_size.txt").read_text()) -instance = { - 'height': 4, - 'width': 3, - 'items': [ - [1, 3], - [4, 3], - [3, 3], - [3, 2], - [1, 3] - ] -} - -solution = { - 'packing': { - 0: [0, 0, 'unrotated'], - 3: [1, 0, 'unrotated'], - 4: [1, 2, 'rotated'] - } -} +instance = {"height": 4, "width": 3, "items": [[1, 3], [4, 3], [3, 3], [3, 2], [1, 3]]} + +solution = {"packing": {0: [0, 0, "unrotated"], 3: [1, 0, "unrotated"], 4: [1, 2, "rotated"]}} Path("/output/instance.json").write_text(json.dumps(instance)) Path("/output/solution.json").write_text(json.dumps(solution)) - ``` We made sure that the solution is not unique for the given instance @@ -129,17 +113,14 @@ We next fill in the solver. ```py title="generator/solver.py" """Main module, will be run as the solver.""" + import json from pathlib import Path instance = json.loads(Path("/input/instance.json").read_text()) -solution = { - 'packing': { - 1: [0, 0, 'rotated'] - } -} +solution = {"packing": {1: [0, 0, "rotated"]}} Path("/output/solution.json").write_text(json.dumps(solution)) @@ -161,6 +142,7 @@ and does a lot of the validation of the instance explicitly. ```python """The 2D Knapsack problem module.""" + from algobattle.problem import Problem, InstanceModel, SolutionModel, maximize from algobattle.util import Role, ValidationError from algobattle.types import u64 @@ -192,6 +174,7 @@ We can clean this code up by tightening up the annotations a bit. ```python """The 2D Knapsack problem module.""" + from pydantic import Field from typing import Annotated @@ -211,7 +194,6 @@ class Instance(InstanceModel): height: u64 = Field(ge=1) width: u64 = Field(ge=1) - items: list[point] @property @@ -263,31 +245,26 @@ type checking, we implement these tests explicitly in the `validate_solution` method. For convenience, we import the `itertools` library. ```python - def validate_solution(self, instance: Instance, role: Role) -> None: - flattened_packing = [] - for index, (pos_height, pos_width, rotation) in self.packing.items(): - item_height = instance.items[index][0 if rotation == "unrotated" else 1] - item_width = instance.items[index][1 if rotation == "unrotated" else 0] - - height_endpoint = pos_height + item_height - width_endpoint = pos_width + item_width - flattened_packing.append( - (index, pos_height, height_endpoint, pos_width, width_endpoint) - ) - - if height_endpoint > instance.height or width_endpoint > instance.width: - raise ValidationError( - "Item extends the knapsack boundaries.", - detail=f"Item {index} was placed at position ({pos_height, pos_width}), extending the knapsack boundaries." - ) - - for item, other_item in itertools.combinations(flattened_packing, 2): - if item[1] < other_item[2] and item[2] > other_item[1]: - if item[3] < other_item[4] and item[4] > other_item[3]: - raise ValidationError( - "Two items overlap.", - detail=f"Items {item[0]} and {other_item[0]} overlap." - ) +def validate_solution(self, instance: Instance, role: Role) -> None: + flattened_packing = [] + for index, (pos_height, pos_width, rotation) in self.packing.items(): + item_height = instance.items[index][0 if rotation == "unrotated" else 1] + item_width = instance.items[index][1 if rotation == "unrotated" else 0] + + height_endpoint = pos_height + item_height + width_endpoint = pos_width + item_width + flattened_packing.append((index, pos_height, height_endpoint, pos_width, width_endpoint)) + + if height_endpoint > instance.height or width_endpoint > instance.width: + raise ValidationError( + "Item extends the knapsack boundaries.", + detail=f"Item {index} was placed at position ({pos_height, pos_width}), extending the knapsack boundaries.", + ) + + for item, other_item in itertools.combinations(flattened_packing, 2): + if item[1] < other_item[2] and item[2] > other_item[1]: + if item[3] < other_item[4] and item[4] > other_item[3]: + raise ValidationError("Two items overlap.", detail=f"Items {item[0]} and {other_item[0]} overlap.") ``` We are almost done writing the problem class. The next step is to tell @@ -414,6 +391,7 @@ scaffolding. ```py title="tests.py" """Tests for the 2D Knapsack problem.""" + import unittest from algobattle.util import Role @@ -459,6 +437,7 @@ def test_knapsack_height_not_silly(self): faulty_instance = Instance.model_validate({"height": 2, "width": 1, "items": [(1, 1)]}) faulty_instance.validate_instance() + # Sample test for the validate_solution method def test_item_overlap(self): instance = Instance(height=1, width=1, items=[(1, 1), (1, 1)]) @@ -513,6 +492,7 @@ This is the final content of the `problem.py` that we have created. ```py title="problem.py" """The 2D Knapsack problem module.""" + import itertools from pydantic import Field from typing import Annotated, Literal @@ -558,23 +538,18 @@ class Solution(SolutionModel[Instance]): height_endpoint = pos_height + item_height width_endpoint = pos_width + item_width - flattened_packing.append( - (index, pos_height, height_endpoint, pos_width, width_endpoint) - ) + flattened_packing.append((index, pos_height, height_endpoint, pos_width, width_endpoint)) if height_endpoint > instance.height or width_endpoint > instance.width: raise ValidationError( "Item extends the knapsack boundaries.", - detail=f"Item {index} was placed at position ({pos_height, pos_width}), extending the knapsack boundaries." + detail=f"Item {index} was placed at position ({pos_height, pos_width}), extending the knapsack boundaries.", ) for item, other_item in itertools.combinations(flattened_packing, 2): if item[1] < other_item[2] and item[2] > other_item[1]: if item[3] < other_item[4] and item[4] > other_item[3]: - raise ValidationError( - "Two items overlap.", - detail=f"Items {item[0]} and {other_item[0]} overlap." - ) + raise ValidationError("Two items overlap.", detail=f"Items {item[0]} and {other_item[0]} overlap.") @maximize def score(self, instance: Instance, role: Role) -> float: diff --git a/docs/instructor/problem/io.md b/docs/instructor/problem/io.md index d19b9500..3d2b8dce 100644 --- a/docs/instructor/problem/io.md +++ b/docs/instructor/problem/io.md @@ -22,14 +22,14 @@ from algobattle.problem import Problem, Instance, SolutionModel Animal = Literal["Cat", "Dog", "Duck", "Stingray", "Albatross", "Snake"] + class MyInstance(Instance): """Instances of Animal Detection.""" ... @property - def size(self) -> int: - ... + def size(self) -> int: ... class MySolution(SolutionModel[MyInstance]): @@ -75,6 +75,7 @@ from PIL import Image Animal = Literal["Cat", "Dog", "Duck", "Stingray", "Albatross", "Snake"] + @dataclass class MyInstance(Instance): """Instances of Animal Detection.""" @@ -93,7 +94,7 @@ class MySolution(SolutionModel[MyInstance]): def validate_solution(self, instance: MyInstance, role: Role) -> None: super().validate_solution(instance, role) - ... # check that the correct animal is pictured + ... # check that the correct animal is pictured Problem( @@ -127,8 +128,8 @@ class MyInstance(Instance): return max(self.image.width, self.image.width) def encode(self, target: Path, role: Role) -> None: - full_path = target.with_suffix(".png") # (1)! - self.image.save(full_path) # (2)! + full_path = target.with_suffix(".png") # (1)! + self.image.save(full_path) # (2)! ``` 1. Add the `.png` file extension @@ -168,14 +169,14 @@ class MyInstance(Instance): @classmethod def decode(cls, source: Path, max_size: int, role: Role) -> Self: - full_path = source.with_suffix(".png") # (1)! + full_path = source.with_suffix(".png") # (1)! try: - image = Image.open(full_path) # (2)! + image = Image.open(full_path) # (2)! except FileNotFoundError: raise EncodingError("The image file does not exist.") except UnidentifiedImageError: raise EncodingError("The image cannot be decoded.") - return cls(image) # (3)! + return cls(image) # (3)! ``` 1. Add the same file extension we used when encoding the data. @@ -202,10 +203,8 @@ base classes to decode json files we also apply Pydantic validation as part of t ```py class ExampleSolution(Solution[ExampleInstance]): - @classmethod - def decode(cls, source: Path, max_size: int, role: Role, instance: ExampleInstance) -> Self: - ... + def decode(cls, source: Path, max_size: int, role: Role, instance: ExampleInstance) -> Self: ... ``` ## Specifying the I/O Schema @@ -221,8 +220,6 @@ This is the signature of this method: ```py class ExampleInstance(Instance): - @classmethod - def io_schema(cls) -> str | None: - ... + def io_schema(cls) -> str | None: ... ``` diff --git a/docs/instructor/problem/problem_file.md b/docs/instructor/problem/problem_file.md index 14321aca..1bd38cf9 100644 --- a/docs/instructor/problem/problem_file.md +++ b/docs/instructor/problem/problem_file.md @@ -125,8 +125,7 @@ class Instance(InstanceModel): numbers: list[int] @property - def size(self) -> int: - ... + def size(self) -> int: ... ``` Here we create a Python class attribute named after the key we want in the json file, and give it a type annotation that @@ -176,7 +175,8 @@ can fit in a 64-bit integer. This can be done very easily by using the Algobattl `algobattle.types` module. In our case we want `u64` for an unsigned 64-bit integer. ```py -from algobattle.types import u64 # (1)! +from algobattle.types import u64 # (1)! + class Instance(InstanceModel): """Instances of Pairsum.""" @@ -184,9 +184,7 @@ class Instance(InstanceModel): numbers: list[u64] @property - def size(self) -> int: - ... - + def size(self) -> int: ... ``` 1. Always remember to add imports at the top of the file for everything you use from an external module. @@ -204,13 +202,14 @@ constraint that all the numbers are even we could add this: ```py from algobattle.util import ValidationError + class Instance(InstanceModel): """Instances of Pairsum.""" numbers: list[u64] - def validate_instance(self) -> None: # (1)! - super().validate_instance() # (1)! + def validate_instance(self) -> None: # (1)! + super().validate_instance() # (1)! for number in self.numbers: if number % 2 != 0: raise ValidationError( @@ -219,9 +218,7 @@ class Instance(InstanceModel): ) @property - def size(self) -> int: - ... - + def size(self) -> int: ... ``` 1. The `validate_instance` method takes only the instance itself as an argument, and returns nothing. @@ -258,7 +255,6 @@ class Instance(InstanceModel): @property def size(self) -> int: return len(self.numbers) - ``` There are many more things you can customize here, but this is all you need to know to get started. If you want to take @@ -276,8 +272,7 @@ class Solution(SolutionModel[Instance]): indices: tuple[u64, u64, u64, u64] @maximize - def score(self, instance: Instance, role: Role) -> float: - ... + def score(self, instance: Instance, role: Role) -> float: ... ``` But note that we're actually looking for four different indices into the list in the input, not just any four numbers. @@ -292,8 +287,7 @@ class Solution(SolutionModel[Instance]): indices: Annotated[tuple[SizeIndex, SizeIndex, SizeIndex, SizeIndex], UniqueItems] @maximize - def score(self, instance: Instance, role: Role) -> float: - ... + def score(self, instance: Instance, role: Role) -> float: ... ``` The first change is to use `SizeIndex` instead of a `u64`. This ensures that the numbers are valid indices into a list @@ -325,8 +319,7 @@ class Solution(SolutionModel[Instance]): raise ValidationError("Solution elements don't have the same sum.") @maximize - def score(self, instance: Instance, role: Role) -> float: - ... + def score(self, instance: Instance, role: Role) -> float: ... ``` Note that this is now called `validate_solution` and takes not only the solution itself, but also the instance it is diff --git a/docs/tutorial/programs.md b/docs/tutorial/programs.md index f2a1c7fc..e778afd8 100644 --- a/docs/tutorial/programs.md +++ b/docs/tutorial/programs.md @@ -127,11 +127,12 @@ When we look in there it's rather empty right now: ```py title="generator.py" """Main module, will be run as the generator.""" + import json from pathlib import Path -max_size = int(Path("/input/max_size.txt").read_text()) # (1)! +max_size = int(Path("/input/max_size.txt").read_text()) # (1)! instance = ... diff --git a/pyproject.toml b/pyproject.toml index da89458d..a804d914 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,147 +1,152 @@ -[build-system] -requires = ["pdm-backend"] -build-backend = "pdm.backend" - -[project] -name = "algobattle-base" -version = "4.3.4" -description = "The Algobattle lab course package." -readme = "README.md" -requires-python = ">=3.11" -license = { text = "MIT" } -authors = [ - { name = "Imogen Hergeth" }, - { name = "Jan Dreier" }, - { name = "Henri Lotze" }, -] -classifiers = [ - "Development Status :: 5 - Production/Stable", - "Environment :: Console", - "Natural Language :: English", - "License :: OSI Approved :: MIT License", - "Programming Language :: Python :: 3", - "Typing :: Typed", -] -dependencies = [ - "docker>=7.1.0", - "pydantic>=2.11.9", - "anyio>=4.11.0", - "typer>=0.19.2", - "typing-extensions>=4.15.0", - "tomlkit>=0.13.3", - "jinja2>=3.1.6", -] - -[project.urls] -Homepage = "https://algobattle.org" -Documentation = "https://algobattle.org/docs" -Repository = "https://github.com/Benezivas/algobattle" - -[project.optional-dependencies] -dev = [ - "ruff>=0.13.2", - "mkdocs>=1.5.3", - "mkdocs-material>=9.5.3", - "pymdown-extensions>=10.7", - "mkdocstrings[python]>=0.24.0", - "mdx-include>=1.4.2", -] - -[project.scripts] -algobattle = "algobattle.cli:app" - -[tool.ruff] -preview = true -line-length = 120 -exclude = ["docs/src"] - -[tool.ruff.lint] -select = [ - "F", - "E4", - "E7", - "E9", - "I", - "UP", - "YTT", - "ASYNC", - "BLE", - "FBT", - "B", - "C4", - "DTZ", - "ISC", - "G", - "PIE", - "PYI", - "SLOT", - "SIM", - "PTH", - "TRY", - "FLY", - "PERF", - "FURB", - "RUF", -] -ignore = [ - "TRY003", - "PIE790", - "FBT001", - "FBT002", - "B027", - "FBT003", - "RUF001", - "RUF036", - "BLE001", - "DTZ005", - "ASYNC109", -] - -[tool.ruff.lint.isort] -split-on-trailing-comma = false -combine-as-imports = true - -[tool.pyright] -exclude = [".venv", "docs"] -typeCheckingMode = "standard" -disableBytesTypePromotions = true -strictDictionaryInference = true -strictListInference = true -strictSetInference = true -deprecateTypingAliases = true -enableExperimentalFeatures = true -reportAssertAlwaysTrue = "information" -reportUnusedExpression = "information" -reportConstantRedefinition = "warning" -reportDeprecated = "information" -reportDuplicateImport = "information" -reportIncompleteStub = "warning" -reportInconsistentConstructor = "error" -reportInvalidStubStatement = "warning" -reportMatchNotExhaustive = "warning" -reportMissingParameterType = "warning" -reportMissingTypeArgument = "none" -reportPrivateUsage = "none" -reportTypeCommentUsage = "information" -reportUnknownArgumentType = "none" -reportUnknownLambdaType = "none" -reportUnknownMemberType = "none" -reportUnknownParameterType = "warning" -reportUnknownVariableType = "none" -reportUnnecessaryCast = "information" -reportUnnecessaryIsInstance = "information" -reportUnnecessaryComparison = "information" -reportUnnecessaryContains = "information" -reportUnusedCoroutine = "warning" -reportUntypedFunctionDecorator = "warning" -reportUntypedClassDecorator = "warning" -reportUntypedBaseClass = "warning" -reportUntypedNamedTuple = "warning" -reportCallInDefaultInitializer = "none" -reportImportCycles = "warning" -reportPropertyTypeMismatch = "error" -reportShadowedImports = "warning" -reportUnnecessaryTypeIgnoreComment = "information" -reportUninitializedInstanceVariable = "warning" -reportFunctionMemberAccess = "warning" -reportOverlappingOverload = "warning" +[build-system] +requires = ["uv_build>=0.12.17,<0.13"] +build-backend = "uv_build" + +[project] +name = "algobattle-base" +version = "4.3.5" +description = "The Algobattle lab course package." +readme = "README.md" +requires-python = ">=3.14" +license = { text = "MIT" } +authors = [ + { name = "Imogen Hergeth" }, + { name = "Jan Dreier" }, + { name = "Henri Lotze" }, +] +classifiers = [ + "Development Status :: 5 - Production/Stable", + "Environment :: Console", + "Natural Language :: English", + "License :: OSI Approved :: MIT License", + "Programming Language :: Python :: 3", + "Typing :: Typed", +] +dependencies = [ + "docker>=7.2.0", + "pydantic>=2.13.5", + "anyio>=4.15.1", + "typer>=0.27.2", + "typing-extensions>=4.16.0", + "tomlkit>=0.15.1", + "jinja2>=3.1.6", +] +import-names = ["algobattle"] + +[project.urls] +Homepage = "https://algobattle.org" +Documentation = "https://algobattle.org/docs" +Repository = "https://github.com/Benezivas/algobattle" + +[project.scripts] +algobattle = "algobattle.cli:app" + +[dependency-groups] +dev = [ + "ruff>=0.16.8", + "mkdocs>=1.5.3", + "mkdocs-material>=9.5.3", + "pymdown-extensions>=10.7", + "mkdocstrings[python]>=0.24.0", + "mdx-include>=1.4.2", +] + + +[tool.uv.build-backend] +module-name = "algobattle" + +[tool.ruff] +preview = true +line-length = 120 +exclude = ["docs/src"] + +[tool.ruff.lint] +select = [ + "F", + "E4", + "E7", + "E9", + "I", + "UP", + "YTT", + "ASYNC", + "BLE", + "FBT", + "B", + "C4", + "DTZ", + "ISC", + "G", + "PIE", + "PYI", + "SLOT", + "SIM", + "PTH", + "TRY", + "FLY", + "PERF", + "FURB", + "RUF", +] +ignore = [ + "raise-vanilla-args", + "unnecessary-placeholder", + "boolean-type-hint-positional-argument", + "boolean-default-value-positional-argument", + "empty-method-without-abstract-decorator", + "boolean-positional-value-in-call", + "ambiguous-unicode-character-string", + "none-not-at-end-of-union", + "blind-except", + "call-datetime-now-without-tzinfo", + "async-function-with-timeout", +] + +[tool.ruff.lint.isort] +split-on-trailing-comma = false +combine-as-imports = true + +[tool.pyright] +exclude = [".venv", "docs", "**/node_modules", "**/__pycache__", "**/.*"] +typeCheckingMode = "standard" +disableBytesTypePromotions = true +strictDictionaryInference = true +strictListInference = true +strictSetInference = true +deprecateTypingAliases = true +enableExperimentalFeatures = true +reportAssertAlwaysTrue = "information" +reportUnusedExpression = "information" +reportConstantRedefinition = "warning" +reportDeprecated = "information" +reportDuplicateImport = "information" +reportIncompleteStub = "warning" +reportInconsistentConstructor = "error" +reportInvalidStubStatement = "warning" +reportMatchNotExhaustive = "warning" +reportMissingParameterType = "warning" +reportMissingTypeArgument = "none" +reportPrivateUsage = "none" +reportTypeCommentUsage = "information" +reportUnknownArgumentType = "none" +reportUnknownLambdaType = "none" +reportUnknownMemberType = "none" +reportUnknownParameterType = "warning" +reportUnknownVariableType = "none" +reportUnnecessaryCast = "information" +reportUnnecessaryIsInstance = "information" +reportUnnecessaryComparison = "information" +reportUnnecessaryContains = "information" +reportUnusedCoroutine = "warning" +reportUntypedFunctionDecorator = "warning" +reportUntypedClassDecorator = "warning" +reportUntypedBaseClass = "warning" +reportUntypedNamedTuple = "warning" +reportCallInDefaultInitializer = "none" +reportImportCycles = "warning" +reportPropertyTypeMismatch = "error" +reportShadowedImports = "warning" +reportUnnecessaryTypeIgnoreComment = "information" +reportUninitializedInstanceVariable = "warning" +reportFunctionMemberAccess = "warning" +reportOverlappingOverload = "warning" diff --git a/algobattle/__init__.py b/src/algobattle/__init__.py similarity index 100% rename from algobattle/__init__.py rename to src/algobattle/__init__.py diff --git a/algobattle/battle.py b/src/algobattle/battle.py similarity index 97% rename from algobattle/battle.py rename to src/algobattle/battle.py index 46f8b543..7189e413 100644 --- a/algobattle/battle.py +++ b/src/algobattle/battle.py @@ -13,20 +13,7 @@ from itertools import count from pathlib import Path from types import EllipsisType -from typing import ( - TYPE_CHECKING, - Annotated, - Any, - ClassVar, - Literal, - ParamSpec, - Protocol, - Self, - TypeAlias, - TypeVar, - Unpack, - overload, -) +from typing import TYPE_CHECKING, Annotated, Any, ClassVar, Literal, Protocol, Self, Unpack, overload from annotated_types import Ge from pydantic import ( @@ -54,7 +41,7 @@ ) from algobattle.util import BaseModel, Encodable, EncodableModel, ExceptionInfo, Role -_BattleConfig: TypeAlias = Any +type _BattleConfig = Any """Type alias used to generate correct typings when subclassing :class:`Battle`. Each battle type's :meth:`run` method is guaranteed to be passed an instance of its own :class:`BattleConfig` object. @@ -62,8 +49,6 @@ When creating your own battle type it is recommended to not use this alias and instead use the :class:`BattleConfig` of the new battle type directly. """ -T = TypeVar("T") -P = ParamSpec("P") _type = type @@ -190,7 +175,7 @@ class FightHandler: problem: Problem generator: Generator solver: Solver - battle: "Battle" + battle: Battle ui: FightUi set_cpus: str | None log_config: ProgramLogConfigView @@ -360,7 +345,7 @@ class BattleUi(Protocol): """Provides an interface for :class:`Battle` to update the Ui.""" @abstractmethod - def update_battle_data(self, data: "Battle.UiData") -> None: + def update_battle_data(self, data: Battle.UiData) -> None: """Passes new custom display data to the Ui. See :class:`Battle.UiData` for further details. @@ -469,7 +454,7 @@ class UiData(BaseModel): """ @staticmethod - def all() -> dict[str, type["Battle"]]: + def all() -> dict[str, type[Battle]]: """Returns a dictionary mapping the names of all registered battle types to their python classes. It includes all subclasses of :class:`Battle` that have been initialized so far, including ones exposed to the @@ -674,7 +659,7 @@ class Fight: generator: GeneratorResult solver: SolverResult | None - history: list[Fight] = field(default_factory=list, init=False) + history: list[FightHistory.Fight] = field(default_factory=list, init=False) scores: set[Role] instances: set[Role] gen_sols: set[Role] @@ -714,13 +699,13 @@ class Config(Battle.Config): """Number of fights that will be fought.""" weighting: Annotated[float, Ge(0)] = 1.1 """How much each successive fight should be weighted more than the previous.""" - scores: set[Role] = {Role.generator, Role.solver} # noqa: RUF012 + scores: set[Role] = {Role.generator, Role.solver} # ruff: ignore[mutable-class-default] """Who to show each fight's scores to.""" - instances: set[Role] = {Role.generator, Role.solver} # noqa: RUF012 + instances: set[Role] = {Role.generator, Role.solver} # ruff: ignore[mutable-class-default] """Who to show the instances to.""" - generator_solutions: set[Role] = {Role.generator} # noqa: RUF012 + generator_solutions: set[Role] = {Role.generator} # ruff: ignore[mutable-class-default] """Who to show the generator's solutions to, if the problem requires them.""" - solver_solutions: set[Role] = {Role.solver} # noqa: RUF012 + solver_solutions: set[Role] = {Role.solver} # ruff: ignore[mutable-class-default] """Who to show the solver's solutions to.""" class UiData(Battle.UiData): diff --git a/algobattle/cli.py b/src/algobattle/cli.py similarity index 98% rename from algobattle/cli.py rename to src/algobattle/cli.py index 7829878b..d4eb5f2f 100644 --- a/algobattle/cli.py +++ b/src/algobattle/cli.py @@ -15,12 +15,10 @@ from random import choice from shutil import rmtree from subprocess import PIPE, Popen -from typing import Annotated, Any, ClassVar, Literal, Self, cast +from typing import Annotated, Any, ClassVar, Literal, Self, cast, override from zipfile import ZipFile from anyio import run as run_async_fn -from click import Choice -from click.core import Context, Parameter from pydantic import Field, TypeAdapter, ValidationError from rich.columns import Columns from rich.console import Console, Group, RenderableType @@ -47,7 +45,6 @@ from tomlkit.exceptions import ParseError from tomlkit.items import Table as TomlTable from typer import Abort, Argument, Option, Typer, get_app_dir, launch -from typing_extensions import override from algobattle.battle import Battle from algobattle.match import AlgobattleConfig, EmptyUi, Match, MatchConfig, MatchupStr, ProjectConfig, TeamInfo, Ui @@ -224,16 +221,6 @@ def _init_program(target: Path, lang: Language, args: PartialTemplateArgs, role: console.print(f"Created a {lang} {role} in {dir}") -class ClickLanguage(Choice): - """Used to move the language list into the help text epilog.""" - - def __init__(self, case_sensitive: bool = True) -> None: - super().__init__([lang.value for lang in Language], case_sensitive) - - def get_metavar(self, param: Parameter, ctx: Context) -> str: - return "LANGUAGE" - - @app.command(epilog=f"Supported languages are: {', '.join(Language)}.") def init( target: Annotated[Path | None, Argument(file_okay=False, writable=True, help="The folder to initialize.")] = None, @@ -247,15 +234,15 @@ def init( ] = None, language: Annotated[ Language | None, - Option("--language", "-l", help="The language to use for the programs.", click_type=ClickLanguage()), + Option("--language", "-l", help="The language to use for the programs."), ] = None, generator: Annotated[ Language | None, - Option("--generator", "-g", help="The language to use for the generator.", click_type=ClickLanguage()), + Option("--generator", "-g", help="The language to use for the generator."), ] = None, solver: Annotated[ Language | None, - Option("--solver", "-s", help="The language to use for the solver.", click_type=ClickLanguage()), + Option("--solver", "-s", help="The language to use for the solver."), ] = None, schemas: Annotated[bool, Option(help="Whether to also save the problem's IO schemas.")] = False, new: Annotated[ @@ -589,7 +576,7 @@ def package_problem( try: with console.status("Loading problem"): # we need to access the property so that it gets loaded - parsed_config.loaded_problem # noqa: B018 + parsed_config.loaded_problem # ruff: ignore[useless-expression] except ValueError as e: console.print(f"[error]Couldn't load the problem file[/]\nError: {e}") raise Abort from e diff --git a/algobattle/match.py b/src/algobattle/match.py similarity index 96% rename from algobattle/match.py rename to src/algobattle/match.py index 82d1d427..9bdccea9 100644 --- a/algobattle/match.py +++ b/src/algobattle/match.py @@ -1,718 +1,717 @@ -"""Module defining how a match is run.""" - -import tomllib -from collections.abc import Iterable -from dataclasses import dataclass -from datetime import datetime, timedelta -from functools import cached_property -from itertools import combinations -from pathlib import Path -from typing import Annotated, Any, ClassVar, Literal, Protocol, Self, TypeAlias, TypeVar, cast - -from anyio import CapacityLimiter, create_task_group -from anyio.to_thread import current_default_thread_limiter -from docker.types import LogConfig, Ulimit -from pydantic import ( - AfterValidator, - ByteSize, - ConfigDict, - Field, - GetCoreSchemaHandler, - SerializeAsAny, - ValidationInfo, - field_validator, - model_serializer, - model_validator, -) -from pydantic.types import PathType -from pydantic_core import CoreSchema -from pydantic_core.core_schema import no_info_after_validator_function, union_schema -from typing_extensions import TypedDict, override - -from algobattle.battle import ( - Battle, - BattleUi, - FightHandler, - FightUi, - Iterated, - ProgramLogConfigLocation, - ProgramLogConfigTime, -) -from algobattle.problem import Problem -from algobattle.program import BuildUi, Matchup, ProgramConfigView, ProgramUi, TeamHandler -from algobattle.util import BaseModel, ExceptionInfo, Role, RunningTimer - - -@dataclass(frozen=True) -class MatchupStr: - """Holds the names of teams in a matchup.""" - - generator: str - solver: str - - @classmethod - def make(cls, matchup: Matchup) -> Self: - """Creates an instance from a matchup object.""" - return cls(matchup.generator.name, matchup.solver.name) - - @classmethod - def __pydantic_get_core_schema__(cls, source: type[Self], handler: GetCoreSchemaHandler) -> CoreSchema: - def parse(val: str) -> Self: - return cls(*val.split(" vs ")) - - return no_info_after_validator_function(parse, handler(str)) - - @model_serializer - def __str__(self) -> str: - return f"{self.generator} vs {self.solver}" - - -class Match(BaseModel): - """The Result of a whole Match.""" - - config: "AlgobattleConfig" = Field(exclude=True) - active_teams: list[str] = Field(default_factory=list) - excluded_teams: dict[str, ExceptionInfo] = Field(default_factory=dict) - battles: dict[MatchupStr, SerializeAsAny[Battle]] = Field(default_factory=dict) - - async def _run_battle( - self, - battle: Battle, - matchup: Matchup, - problem: Problem, - cpus: list[str | None], - ui: "Ui", - limiter: CapacityLimiter, - ) -> None: - async with limiter: - set_cpus = cpus.pop() - ui.start_battle(matchup) - battle_ui = BattleObserver(ui, matchup) - handler = FightHandler( - problem=problem, - generator=matchup.generator.generator, - solver=matchup.solver.solver, - battle=battle, - ui=battle_ui, - set_cpus=set_cpus, - log_config=self.config.project.log_program_io, - ) - try: - await battle.run_battle( - handler, - self.config.match.battle, - problem.min_size, - battle_ui, - ) - except Exception as e: - battle.runtime_error = ExceptionInfo.from_exception(e) - cpus.append(set_cpus) - ui.battle_completed(matchup) - - async def run( - self, - ui: "Ui | None" = None, - ) -> Self: - """Runs a match with the given config settings and problem type. - - The first step is building the docker images for each team in `config.teams`. Any teams where this process fails - are excluded from the match and will receive zero points. Then each pair of teams will fight two battles against - each other, one where the first is generating and the second is solving, and one where the roles are swapped. - Since all of these battles are completely independent, you can set `config.parallel_battles` to have some number - of them run in parallel. This will speed up the exection of the match, but can also make the match unfair if the - hardware running it does not have the resources to adequately execute that many containers in parallel. - """ - if ui is None: - ui = EmptyUi() - config = self.config - problem = config.loaded_problem - - with await TeamHandler.build(config.teams, problem, config.as_prog_config(), ui) as teams: - self.active_teams = [t.name for t in teams.active] - self.excluded_teams = teams.excluded - battle_cls = Battle.all()[config.match.battle.type] - limiter = CapacityLimiter(config.project.parallel_battles) - current_default_thread_limiter().total_tokens = config.project.parallel_battles - set_cpus = config.project.set_cpus - if isinstance(set_cpus, list): - match_cpus = cast(list[str | None], set_cpus[: config.project.parallel_battles]) - else: - match_cpus = [set_cpus] * config.project.parallel_battles - ui.start_battles() - async with create_task_group() as tg: - for matchup in teams.matchups: - battle = battle_cls() - self.battles[MatchupStr.make(matchup)] = battle - tg.start_soon(self._run_battle, battle, matchup, problem, match_cpus, ui, limiter) - return self - - def calculate_points(self) -> dict[str, float]: - """Calculate the number of points each team scored. - - Every team scores between 0 and `total_points_per_team` points. - Excluded teams are considered to have lost all their battles and thus receive 0 points. - The other teams each get points based on how well they did against each other team compared to how well that - other team did against them. - """ - total_points_per_team = self.config.project.points - points = dict.fromkeys(self.active_teams + list(self.excluded_teams), 0.0) - if len(self.active_teams) == 0: - return points - if len(self.active_teams) == 1: - points[self.active_teams[0]] = total_points_per_team - return points - - points_per_matchup = round(total_points_per_team / (len(self.active_teams) - 1), 1) - - for first, second in combinations(self.active_teams, 2): - try: - first_res = self.battles[MatchupStr(second, first)] - second_res = self.battles[MatchupStr(first, second)] - except KeyError: - continue - total_score = max(0, first_res.score(self.config.match.battle)) + max( - 0, second_res.score(self.config.match.battle) - ) - if total_score == 0: - # Default values for proportions, assuming no team manages to solve anything - first_ratio = 0.5 - second_ratio = 0.5 - else: - first_ratio = first_res.score(self.config.match.battle) / total_score - second_ratio = second_res.score(self.config.match.battle) / total_score - - points[first] += round(points_per_matchup * first_ratio, 1) - points[second] += round(points_per_matchup * second_ratio, 1) - - # we need to also add the points each team would have gotten fighting the excluded teams - # each active team would have had one set of battles against each excluded team - for team in self.active_teams: - points[team] += points_per_matchup * len(self.excluded_teams) - - return points - - def format(self, *, indent: int | None = 2, error_detail: Literal["high", "low"] = "low") -> str: - """Nicely formats the match result into a json string.""" - match error_detail: - case "high": - exclude = None - case "low": - detail = {"detail"} - program = {"error": detail} - exclude = { - "excluded_teams": {"__all__": detail}, - "battles": { - "__all__": { - "runtime_error": detail, - "fights": { - "__all__": { - "generator": program, - "solver": program, - } - }, - } - }, - } - return self.model_dump_json(exclude_defaults=True, indent=indent, exclude=exclude) - - -class Ui(BuildUi, Protocol): - """Base class for a UI that observes a Match and displays its data. - - The Ui object both observes the match object as it's being built and receives additional updates through - method calls. To do this, it provides several objects whose methods are essentially curried versions of - its own methods. These observer classes should generally not be subclassed, all Ui functionality can be implemented - by just subclassing :class:`Ui` and implementing its methods. - """ - - match: Match - - def start_build_step(self, teams: Iterable[str], timeout: float | None) -> None: - """Tells the ui that the build process has started.""" - return - - def start_build(self, team: str, role: Role) -> None: - """Informs the ui that a new program is being built.""" - return - - def finish_build(self, team: str, success: bool) -> None: - """Informs the ui that the current build has been finished.""" - return - - def start_battles(self) -> None: - """Tells the UI that building the programs has finished and battles will start now.""" - return - - def start_battle(self, matchup: Matchup) -> None: - """Notifies the Ui that a battle has been started.""" - return - - def battle_completed(self, matchup: Matchup) -> None: - """Notifies the Ui that a specific battle has been completed.""" - return - - def update_battle_data(self, matchup: Matchup, data: Battle.UiData) -> None: - """Passes new custom battle data to the Ui.""" - return - - def start_fight(self, matchup: Matchup, max_size: int) -> None: - """Informs the Ui of a newly started fight.""" - return - - def end_fight(self, matchup: Matchup) -> None: - """Informs the Ui that the current fight has finished.""" - return - - def start_program( - self, - matchup: Matchup, - role: Role, - data: RunningTimer, - ) -> None: - """Passes new info about programs in the current fight to the Ui.""" - return - - def end_program(self, matchup: Matchup, role: Role, runtime: float) -> None: - """Informs the Ui that the currently running programmes has finished.""" - return - - -class EmptyUi(Ui): - """A dummy Ui.""" - - match: Match - - def __enter__(self) -> Self: - """Starts displaying the Ui.""" - return self - - def __exit__(self, *args: object) -> None: - """Stops the Ui.""" - return - - -@dataclass -class BattleObserver(BattleUi, FightUi, ProgramUi): - """Tracks updates for a specific battle.""" - - ui: Ui - matchup: Matchup - - @override - def update_battle_data(self, data: Battle.UiData) -> None: - self.ui.update_battle_data(self.matchup, data) - - @override - def start_fight(self, max_size: int) -> None: - self.ui.start_fight(self.matchup, max_size) - - @override - def end_fight(self) -> None: - self.ui.end_fight(self.matchup) - - @override - def start_program(self, role: Role, timeout: float | None) -> None: - self.ui.start_program(self.matchup, role, RunningTimer(datetime.now(), timeout)) - - @override - def stop_program(self, role: Role, runtime: float) -> None: - self.ui.end_program(self.matchup, role, runtime) - - -################################################################################ -# Config stuff -################################################################################ - - -class TimeFloat: - """A float specifying a number of seconds. - - Can be parsed from pydantic either as a number of seconds or a timedelta specifier. - """ - - @classmethod - def __get_pydantic_core_schema__(cls, source: type, handler: GetCoreSchemaHandler) -> CoreSchema: - def convert(val: float | timedelta) -> float: - return val.total_seconds() if isinstance(val, timedelta) else val - - return no_info_after_validator_function(convert, union_schema([handler(float), handler(timedelta)])) - - -def parse_none(value: Any) -> Any | None: - """Used as a validator to parse false-y values into Python None objects.""" - return value or None - - -T = TypeVar("T") -TimeDeltaFloat = Annotated[float, TimeFloat] -ByteSizeInt = Annotated[int, ByteSize] -WithNone = Annotated[T | None, AfterValidator(parse_none)] - - -def _relativize_path(path: Path, info: ValidationInfo) -> Path: - """If the passed path is relative to the current directory it gets relativized to the `base_path` instead.""" - if info.context and isinstance(info.context.get("base_path", None), Path) and not path.is_absolute(): - return info.context["base_path"] / path - return path - - -def _relativize_file(path: Path, info: ValidationInfo) -> Path: - path = _relativize_path(path, info) - return PathType.validate_file(path, info) - - -RelativePath = Annotated[Path, AfterValidator(_relativize_path), Field(validate_default=True)] -RelativeFilePath = Annotated[Path, AfterValidator(_relativize_file), Field(validate_default=True)] - - -class _Adapter: - """Turns a docker library config class into a pydantic parseable one.""" - - _Args: ClassVar[type] - - @classmethod - def _construct(cls, kwargs: dict[str, Any]) -> Self: - return cls(**kwargs) - - @classmethod - def __get_pydantic_core_schema__(cls, source: type, handler: GetCoreSchemaHandler) -> CoreSchema: - return no_info_after_validator_function(cls._construct, handler(cls._Args)) - - -class PydanticLogConfig(LogConfig, _Adapter): - class _Args(TypedDict): - type: str - conifg: dict[Any, Any] - - -class PydanticUlimit(Ulimit, _Adapter): - class _Args(TypedDict): - name: str - soft: int - hard: int - - -class AdvancedRunArgs(BaseModel): - """Advanced docker run options. - - Contains all options exposed on the python docker run api, except `device_requests` - and those set by :meth:`Image.run` itself. - """ - - class _BlockIOWeight(TypedDict): - Path: str - Weight: int - - class _DeviceRate(TypedDict): - Path: str - Rate: int - - class _HealthCheck(TypedDict): - test: list[str] | str - interval: int - timeout: int - retries: int - start_period: int - - # defaults set by us - network_mode: str = "none" - - # actual docker defaults - command: str | list[str] | None = None - auto_remove: bool | None = None - blkio_weight_device: list[_BlockIOWeight] | None = None - blkio_weight: int | None = Field(default=None, ge=10, le=1000) - cap_add: list[str] | None = None - cap_drop: list[str] | None = None - cgroup_parent: str | None = None - cgroupns: str | None = None - cpu_count: int | None = None - cpu_percent: int | None = None - cpu_period: int | None = None - cpu_quota: int | None = None - cpu_rt_period: int | None = None - cpu_rt_runtime: int | None = None - cpu_shares: int | None = None - cpuset_mems: str | None = None - device_cgroup_rules: list[str] | None = None - device_read_bps: list[_DeviceRate] | None = None - device_read_iops: list[_DeviceRate] | None = None - device_write_bps: list[_DeviceRate] | None = None - device_write_iops: list[_DeviceRate] | None = None - devices: list[str] | None = None - dns: list[str] | None = None - dns_opt: list[str] | None = None - dns_search: list[str] | None = None - domainname: str | list[str] | None = None - entrypoint: str | list[str] | None = None - environment: dict[str, str] | list[str] | None = None - extra_hosts: dict[str, str] | None = None - group_add: list[str] | None = None - healthcheck: _HealthCheck | None = None - hostname: str | None = None - init: bool | None = None - init_path: str | None = None - ipc_mode: str | None = None - isolation: str | None = None - kernel_memory: int | str | None = None - labels: dict[str, str] | list[str] | None = None - links: dict[str, str] | None = None - log_config: PydanticLogConfig | None = None - lxc_conf: dict[Any, Any] | None = None - mac_address: str | None = None - mem_limit: int | str | None = None - mem_reservation: int | str | None = None - mem_swappiness: int | None = None - memswap_limit: str | int | None = None - network: str | None = None - network_disabled: bool | None = None - oom_kill_disable: bool | None = None - oom_score_adj: int | None = None - pid_mode: str | None = None - pids_limit: int | None = None - platform: str | None = None - ports: dict[Any, Any] | None = None - privileged: bool | None = None - publish_all_ports: bool | None = None - read_only: bool | None = None - restart_policy: dict[Any, Any] | None = None - runtime: str | None = None - security_opt: list[str] | None = None - shm_size: str | int | None = None - stdin_open: bool | None = None - stdout: bool | None = None - stderr: bool | None = None - stop_signal: str | None = None - storage_opt: dict[Any, Any] | None = None - stream: bool | None = None - sysctls: dict[Any, Any] | None = None - tmpfs: dict[Any, Any] | None = None - tty: bool | None = None - ulimits: list[PydanticUlimit] | None = None - use_config_proxy: bool | None = None - user: str | int | None = None - userns_mode: str | None = None - uts_mode: str | None = None - version: str | None = None - volume_driver: str | None = None - volumes: dict[Any, Any] | list[Any] | None = None - volumes_from: list[Any] | None = None - working_dir: str | None = None - - @cached_property - def kwargs(self) -> dict[str, Any]: - """Transforms the object into :meth:`client.containers.run` kwargs.""" - return self.model_dump(exclude_none=True) - - -class AdvancedBuildArgs(BaseModel): - """Advanced docker build options. - - Contains all options exposed on the python docker build api, except those set by :meth:`Image.build` itself. - """ - - class _ContainerLimits(TypedDict): - memory: int - memswap: int - cpushares: int - cpusetcpus: str - - # defaults set by us - rm: bool = True - forcerm: bool = True - quiet: bool = True - network_mode: str = "host" - pull: bool | None = True - - # actual Docker defaults - nocache: bool | None = None - encoding: str | None = None - buildargs: dict[Any, Any] | None = None - container_limits: _ContainerLimits | None = None - shmsize: int | None = None - labels: dict[Any, Any] | None = None - cache_from: list[Any] | None = None - target: str | None = None - squash: bool | None = None - extra_hosts: dict[Any, Any] | None = None - platform: str | None = None - isolation: str | None = None - use_config_proxy: bool | None = None - - @cached_property - def kwargs(self) -> dict[str, Any]: - """Transforms the object into :meth:`client.images.build` kwargs.""" - return self.model_dump(exclude_none=True) - - -class DockerConfig(BaseModel): - """Settings passed directly to the docker daemon.""" - - build: AdvancedBuildArgs = AdvancedBuildArgs() - run: AdvancedRunArgs = AdvancedRunArgs() - - -class RunConfig(BaseModel): - """Parameters determining how a program is run.""" - - timeout: WithNone[TimeDeltaFloat] = 20 - """Timeout in seconds, or `false` for no timeout.""" - space: WithNone[ByteSizeInt] = 4_000_000_000 - """Maximum memory space available, or `false` for no limitation. - - Can be either an plain number of bytes like `30000` or a string including - a unit like `30 kB`. - """ - cpus: int = 1 - """Number of cpu cores available.""" - - @field_validator("cpus") - @classmethod - def check_nonzero(cls, val: int) -> int: - """Checks that the number of available cpus is non-zero.""" - if not val: - raise ValueError("Number must be non-zero") - else: - return val - - -class MatchConfig(BaseModel): - """Parameters determining the match execution. - - It will be parsed from the given config file and contains all settings that specify how the match is run. - """ - - problem: str - """The problem this match is over.""" - build_timeout: WithNone[TimeDeltaFloat] = 600.0 - """Timeout for building each docker image.""" - max_program_size: WithNone[ByteSizeInt] = 4_000_000_000 - """Maximum size a built program image is allowed to be.""" - strict_timeouts: bool = False - """Whether to raise an error if a program runs into the timeout.""" - generator: RunConfig = RunConfig() - """Settings determining generator execution.""" - solver: RunConfig = RunConfig() - """Settings determining solver execution.""" - battle: Battle.Config = Iterated.Config() - """Config for the battle type.""" - - model_config = ConfigDict(revalidate_instances="always") - - -class DynamicProblemConfig(BaseModel): - """Defines metadata used to dynamically import problems.""" - - location: RelativePath = Field(default=Path("problem.py"), validate_default=True) - """Path to the file defining the problem""" - dependencies: list[str] = Field(default_factory=list) - """List of dependencies needed to run the problem""" - - -class ProjectConfig(BaseModel): - """Various project settings.""" - - class ProgramOutputConfig(BaseModel): - """How to log program output.""" - - # a bit janky atm, allows for future expansion - when: ProgramLogConfigTime = ProgramLogConfigTime.error - output: ProgramLogConfigLocation = ProgramLogConfigLocation.inline - - parallel_battles: int = 1 - """Number of battles exectuted in parallel.""" - name_images: bool = True - """Whether to give the docker images names.""" - cleanup_images: bool = False - """Whether to clean up the images after we use them.""" - set_cpus: str | list[str] | None = None - """Wich cpus to run programs on, if it is a list each battle will use a different cpu specification for it.""" - error_detail: Literal["low", "high"] = "high" - """How detailed error messages should be. - Higher settings help in debugging, but may leak information from other teams. - """ - log_program_io: ProgramOutputConfig = ProgramOutputConfig() - """How to log program output.""" - points: int = 100 - """Highest number of points each team can achieve.""" - results: RelativePath = Field(default=Path("./results"), validate_default=True) - """Path to a folder where the results will be saved.""" - - @model_validator(mode="after") - def val_set_cpus(self) -> Self: - """Validates that each battle that is being executed is assigned some cpu cores.""" - if isinstance(self.set_cpus, list) and self.parallel_battles > len(self.set_cpus): - raise ValueError("Number of parallel battles exceeds the number of set_cpu specifier strings.") - else: - return self - - -class TeamInfo(BaseModel): - """The config parameters defining a team.""" - - generator: RelativePath - solver: RelativePath - - -TeamInfos: TypeAlias = dict[str, TeamInfo] - - -def _empty_default() -> Any: - """Helper to make a structure that gets parsed to a default pydantic struct while passing type checking.""" - return {} - - -class AlgobattleConfig(BaseModel): - """Base that contains all config options and can be parsed from config files.""" - - # funky defaults to force their validation with context info present - teams: TeamInfos = Field(default_factory=dict) - project: ProjectConfig = Field(default_factory=_empty_default, validate_default=True) - match: MatchConfig - docker: DockerConfig = DockerConfig() - problem: DynamicProblemConfig = Field(default_factory=_empty_default, validate_default=True) - - model_config = ConfigDict(revalidate_instances="always") - - @cached_property - def loaded_problem(self) -> Problem: - """The problem this config uses.""" - return Problem.load(self.match.problem, self.problem.location if self.problem.location.is_file() else None) - - @classmethod - def from_file(cls, file: Path, *, ignore_uninstalled: bool = False, relativize_paths: bool = True) -> Self: - """Parses a config object from a toml file. - - Args: - file: Path to the file, or a directory containing one called 'algobattle.toml'. - ignore_uninstalled: Whether to raise errors if the specified battle type is not installed. - relativize_paths: Wether to relativize paths to the config's location rather than the cwd. - """ - Battle.load_entrypoints() - if not file.is_file(): - if file.joinpath("algobattle.toml").is_file(): - file /= "algobattle.toml" - else: - raise FileNotFoundError("The path does not point to an Algobattle project") - try: - config_dict = tomllib.loads(file.read_text()) - except tomllib.TOMLDecodeError as e: - raise ValueError(f"The config file at {file} is not a properly formatted TOML file!\n{e}") from e - context: dict[str, Any] = {"ignore_uninstalled": ignore_uninstalled} - if relativize_paths: - context["base_path"] = file.parent - return cls.model_validate(config_dict, context=context) - - def as_prog_config(self) -> ProgramConfigView: - """Builds a simple object containing all program relevant settings.""" - return ProgramConfigView( - build_timeout=self.match.build_timeout, - max_program_size=self.match.max_program_size, - strict_timeouts=self.match.strict_timeouts, - build_kwargs=self.docker.build.kwargs, - run_kwargs=self.docker.run.kwargs, - generator=self.match.generator, - solver=self.match.solver, - name_images=self.project.name_images, - cleanup_images=self.project.cleanup_images, - ) +"""Module defining how a match is run.""" + +import tomllib +from collections.abc import Iterable +from dataclasses import dataclass +from datetime import datetime, timedelta +from functools import cached_property +from itertools import combinations +from pathlib import Path +from typing import Annotated, Any, ClassVar, Literal, Protocol, Self, TypedDict, TypeVar, cast, override + +from anyio import CapacityLimiter, create_task_group +from anyio.to_thread import current_default_thread_limiter +from docker.types import LogConfig, Ulimit +from pydantic import ( + AfterValidator, + ByteSize, + ConfigDict, + Field, + GetCoreSchemaHandler, + SerializeAsAny, + ValidationInfo, + field_validator, + model_serializer, + model_validator, +) +from pydantic.types import PathType +from pydantic_core import CoreSchema +from pydantic_core.core_schema import no_info_after_validator_function, union_schema + +from algobattle.battle import ( + Battle, + BattleUi, + FightHandler, + FightUi, + Iterated, + ProgramLogConfigLocation, + ProgramLogConfigTime, +) +from algobattle.problem import Problem +from algobattle.program import BuildUi, Matchup, ProgramConfigView, ProgramUi, TeamHandler +from algobattle.util import BaseModel, ExceptionInfo, Role, RunningTimer + + +@dataclass(frozen=True) +class MatchupStr: + """Holds the names of teams in a matchup.""" + + generator: str + solver: str + + @classmethod + def make(cls, matchup: Matchup) -> Self: + """Creates an instance from a matchup object.""" + return cls(matchup.generator.name, matchup.solver.name) + + @classmethod + def __pydantic_get_core_schema__(cls, source: type[Self], handler: GetCoreSchemaHandler) -> CoreSchema: + def parse(val: str) -> Self: + return cls(*val.split(" vs ")) + + return no_info_after_validator_function(parse, handler(str)) + + @model_serializer + def __str__(self) -> str: + return f"{self.generator} vs {self.solver}" + + +class Match(BaseModel): + """The Result of a whole Match.""" + + config: AlgobattleConfig = Field(exclude=True) + active_teams: list[str] = Field(default_factory=list) + excluded_teams: dict[str, ExceptionInfo] = Field(default_factory=dict) + battles: dict[MatchupStr, SerializeAsAny[Battle]] = Field(default_factory=dict) + + async def _run_battle( + self, + battle: Battle, + matchup: Matchup, + problem: Problem, + cpus: list[str | None], + ui: Ui, + limiter: CapacityLimiter, + ) -> None: + async with limiter: + set_cpus = cpus.pop() + ui.start_battle(matchup) + battle_ui = BattleObserver(ui, matchup) + handler = FightHandler( + problem=problem, + generator=matchup.generator.generator, + solver=matchup.solver.solver, + battle=battle, + ui=battle_ui, + set_cpus=set_cpus, + log_config=self.config.project.log_program_io, + ) + try: + await battle.run_battle( + handler, + self.config.match.battle, + problem.min_size, + battle_ui, + ) + except Exception as e: + battle.runtime_error = ExceptionInfo.from_exception(e) + cpus.append(set_cpus) + ui.battle_completed(matchup) + + async def run( + self, + ui: Ui | None = None, + ) -> Self: + """Runs a match with the given config settings and problem type. + + The first step is building the docker images for each team in `config.teams`. Any teams where this process fails + are excluded from the match and will receive zero points. Then each pair of teams will fight two battles against + each other, one where the first is generating and the second is solving, and one where the roles are swapped. + Since all of these battles are completely independent, you can set `config.parallel_battles` to have some number + of them run in parallel. This will speed up the exection of the match, but can also make the match unfair if the + hardware running it does not have the resources to adequately execute that many containers in parallel. + """ + if ui is None: + ui = EmptyUi() + config = self.config + problem = config.loaded_problem + + with await TeamHandler.build(config.teams, problem, config.as_prog_config(), ui) as teams: + self.active_teams = [t.name for t in teams.active] + self.excluded_teams = teams.excluded + battle_cls = Battle.all()[config.match.battle.type] + limiter = CapacityLimiter(config.project.parallel_battles) + current_default_thread_limiter().total_tokens = config.project.parallel_battles + set_cpus = config.project.set_cpus + if isinstance(set_cpus, list): + match_cpus = cast(list[str | None], set_cpus[: config.project.parallel_battles]) + else: + match_cpus = [set_cpus] * config.project.parallel_battles + ui.start_battles() + async with create_task_group() as tg: + for matchup in teams.matchups: + battle = battle_cls() + self.battles[MatchupStr.make(matchup)] = battle + tg.start_soon(self._run_battle, battle, matchup, problem, match_cpus, ui, limiter) + return self + + def calculate_points(self) -> dict[str, float]: + """Calculate the number of points each team scored. + + Every team scores between 0 and `total_points_per_team` points. + Excluded teams are considered to have lost all their battles and thus receive 0 points. + The other teams each get points based on how well they did against each other team compared to how well that + other team did against them. + """ + total_points_per_team = self.config.project.points + points = dict.fromkeys(self.active_teams + list(self.excluded_teams), 0.0) + if len(self.active_teams) == 0: + return points + if len(self.active_teams) == 1: + points[self.active_teams[0]] = total_points_per_team + return points + + points_per_matchup = round(total_points_per_team / (len(self.active_teams) - 1), 1) + + for first, second in combinations(self.active_teams, 2): + try: + first_res = self.battles[MatchupStr(second, first)] + second_res = self.battles[MatchupStr(first, second)] + except KeyError: + continue + total_score = max(0, first_res.score(self.config.match.battle)) + max( + 0, second_res.score(self.config.match.battle) + ) + if total_score == 0: + # Default values for proportions, assuming no team manages to solve anything + first_ratio = 0.5 + second_ratio = 0.5 + else: + first_ratio = first_res.score(self.config.match.battle) / total_score + second_ratio = second_res.score(self.config.match.battle) / total_score + + points[first] += round(points_per_matchup * first_ratio, 1) + points[second] += round(points_per_matchup * second_ratio, 1) + + # we need to also add the points each team would have gotten fighting the excluded teams + # each active team would have had one set of battles against each excluded team + for team in self.active_teams: + points[team] += points_per_matchup * len(self.excluded_teams) + + return points + + def format(self, *, indent: int | None = 2, error_detail: Literal["high", "low"] = "low") -> str: + """Nicely formats the match result into a json string.""" + match error_detail: + case "high": + exclude = None + case "low": + detail = {"detail"} + program = {"error": detail} + exclude = { + "excluded_teams": {"__all__": detail}, + "battles": { + "__all__": { + "runtime_error": detail, + "fights": { + "__all__": { + "generator": program, + "solver": program, + } + }, + } + }, + } + return self.model_dump_json(exclude_defaults=True, indent=indent, exclude=exclude) + + +class Ui(BuildUi, Protocol): + """Base class for a UI that observes a Match and displays its data. + + The Ui object both observes the match object as it's being built and receives additional updates through + method calls. To do this, it provides several objects whose methods are essentially curried versions of + its own methods. These observer classes should generally not be subclassed, all Ui functionality can be implemented + by just subclassing :class:`Ui` and implementing its methods. + """ + + match: Match + + def start_build_step(self, teams: Iterable[str], timeout: float | None) -> None: + """Tells the ui that the build process has started.""" + return + + def start_build(self, team: str, role: Role) -> None: + """Informs the ui that a new program is being built.""" + return + + def finish_build(self, team: str, success: bool) -> None: + """Informs the ui that the current build has been finished.""" + return + + def start_battles(self) -> None: + """Tells the UI that building the programs has finished and battles will start now.""" + return + + def start_battle(self, matchup: Matchup) -> None: + """Notifies the Ui that a battle has been started.""" + return + + def battle_completed(self, matchup: Matchup) -> None: + """Notifies the Ui that a specific battle has been completed.""" + return + + def update_battle_data(self, matchup: Matchup, data: Battle.UiData) -> None: + """Passes new custom battle data to the Ui.""" + return + + def start_fight(self, matchup: Matchup, max_size: int) -> None: + """Informs the Ui of a newly started fight.""" + return + + def end_fight(self, matchup: Matchup) -> None: + """Informs the Ui that the current fight has finished.""" + return + + def start_program( + self, + matchup: Matchup, + role: Role, + data: RunningTimer, + ) -> None: + """Passes new info about programs in the current fight to the Ui.""" + return + + def end_program(self, matchup: Matchup, role: Role, runtime: float) -> None: + """Informs the Ui that the currently running programmes has finished.""" + return + + +class EmptyUi(Ui): + """A dummy Ui.""" + + match: Match + + def __enter__(self) -> Self: + """Starts displaying the Ui.""" + return self + + def __exit__(self, *args: object) -> None: + """Stops the Ui.""" + return + + +@dataclass +class BattleObserver(BattleUi, FightUi, ProgramUi): + """Tracks updates for a specific battle.""" + + ui: Ui + matchup: Matchup + + @override + def update_battle_data(self, data: Battle.UiData) -> None: + self.ui.update_battle_data(self.matchup, data) + + @override + def start_fight(self, max_size: int) -> None: + self.ui.start_fight(self.matchup, max_size) + + @override + def end_fight(self) -> None: + self.ui.end_fight(self.matchup) + + @override + def start_program(self, role: Role, timeout: float | None) -> None: + self.ui.start_program(self.matchup, role, RunningTimer(datetime.now(), timeout)) + + @override + def stop_program(self, role: Role, runtime: float) -> None: + self.ui.end_program(self.matchup, role, runtime) + + +################################################################################ +# Config stuff +################################################################################ + + +class TimeFloat: + """A float specifying a number of seconds. + + Can be parsed from pydantic either as a number of seconds or a timedelta specifier. + """ + + @classmethod + def __get_pydantic_core_schema__(cls, source: type, handler: GetCoreSchemaHandler) -> CoreSchema: + def convert(val: float | timedelta) -> float: + return val.total_seconds() if isinstance(val, timedelta) else val + + return no_info_after_validator_function(convert, union_schema([handler(float), handler(timedelta)])) + + +def parse_none(value: Any) -> Any | None: + """Used as a validator to parse false-y values into Python None objects.""" + return value or None + + +T = TypeVar("T") +TimeDeltaFloat = Annotated[float, TimeFloat] +ByteSizeInt = Annotated[int, ByteSize] +WithNone = Annotated[T | None, AfterValidator(parse_none)] + + +def _relativize_path(path: Path, info: ValidationInfo) -> Path: + """If the passed path is relative to the current directory it gets relativized to the `base_path` instead.""" + if info.context and isinstance(info.context.get("base_path", None), Path) and not path.is_absolute(): + return info.context["base_path"] / path + return path + + +def _relativize_file(path: Path, info: ValidationInfo) -> Path: + path = _relativize_path(path, info) + return PathType.validate_file(path, info) + + +RelativePath = Annotated[Path, AfterValidator(_relativize_path), Field(validate_default=True)] +RelativeFilePath = Annotated[Path, AfterValidator(_relativize_file), Field(validate_default=True)] + + +class _Adapter: + """Turns a docker library config class into a pydantic parseable one.""" + + _Args: ClassVar[type] + + @classmethod + def _construct(cls, kwargs: dict[str, Any]) -> Self: + return cls(**kwargs) + + @classmethod + def __get_pydantic_core_schema__(cls, source: type, handler: GetCoreSchemaHandler) -> CoreSchema: + return no_info_after_validator_function(cls._construct, handler(cls._Args)) + + +class PydanticLogConfig(LogConfig, _Adapter): + class _Args(TypedDict): + type: str + conifg: dict[Any, Any] + + +class PydanticUlimit(Ulimit, _Adapter): + class _Args(TypedDict): + name: str + soft: int + hard: int + + +class AdvancedRunArgs(BaseModel): + """Advanced docker run options. + + Contains all options exposed on the python docker run api, except `device_requests` + and those set by :meth:`Image.run` itself. + """ + + class _BlockIOWeight(TypedDict): + Path: str + Weight: int + + class _DeviceRate(TypedDict): + Path: str + Rate: int + + class _HealthCheck(TypedDict): + test: list[str] | str + interval: int + timeout: int + retries: int + start_period: int + + # defaults set by us + network_mode: str = "none" + + # actual docker defaults + command: str | list[str] | None = None + auto_remove: bool | None = None + blkio_weight_device: list[_BlockIOWeight] | None = None + blkio_weight: int | None = Field(default=None, ge=10, le=1000) + cap_add: list[str] | None = None + cap_drop: list[str] | None = None + cgroup_parent: str | None = None + cgroupns: str | None = None + cpu_count: int | None = None + cpu_percent: int | None = None + cpu_period: int | None = None + cpu_quota: int | None = None + cpu_rt_period: int | None = None + cpu_rt_runtime: int | None = None + cpu_shares: int | None = None + cpuset_mems: str | None = None + device_cgroup_rules: list[str] | None = None + device_read_bps: list[_DeviceRate] | None = None + device_read_iops: list[_DeviceRate] | None = None + device_write_bps: list[_DeviceRate] | None = None + device_write_iops: list[_DeviceRate] | None = None + devices: list[str] | None = None + dns: list[str] | None = None + dns_opt: list[str] | None = None + dns_search: list[str] | None = None + domainname: str | list[str] | None = None + entrypoint: str | list[str] | None = None + environment: dict[str, str] | list[str] | None = None + extra_hosts: dict[str, str] | None = None + group_add: list[str] | None = None + healthcheck: _HealthCheck | None = None + hostname: str | None = None + init: bool | None = None + init_path: str | None = None + ipc_mode: str | None = None + isolation: str | None = None + kernel_memory: int | str | None = None + labels: dict[str, str] | list[str] | None = None + links: dict[str, str] | None = None + log_config: PydanticLogConfig | None = None + lxc_conf: dict[Any, Any] | None = None + mac_address: str | None = None + mem_limit: int | str | None = None + mem_reservation: int | str | None = None + mem_swappiness: int | None = None + memswap_limit: str | int | None = None + network: str | None = None + network_disabled: bool | None = None + oom_kill_disable: bool | None = None + oom_score_adj: int | None = None + pid_mode: str | None = None + pids_limit: int | None = None + platform: str | None = None + ports: dict[Any, Any] | None = None + privileged: bool | None = None + publish_all_ports: bool | None = None + read_only: bool | None = None + restart_policy: dict[Any, Any] | None = None + runtime: str | None = None + security_opt: list[str] | None = None + shm_size: str | int | None = None + stdin_open: bool | None = None + stdout: bool | None = None + stderr: bool | None = None + stop_signal: str | None = None + storage_opt: dict[Any, Any] | None = None + stream: bool | None = None + sysctls: dict[Any, Any] | None = None + tmpfs: dict[Any, Any] | None = None + tty: bool | None = None + ulimits: list[PydanticUlimit] | None = None + use_config_proxy: bool | None = None + user: str | int | None = None + userns_mode: str | None = None + uts_mode: str | None = None + version: str | None = None + volume_driver: str | None = None + volumes: dict[Any, Any] | list[Any] | None = None + volumes_from: list[Any] | None = None + working_dir: str | None = None + + @cached_property + def kwargs(self) -> dict[str, Any]: + """Transforms the object into :meth:`client.containers.run` kwargs.""" + return self.model_dump(exclude_none=True) + + +class AdvancedBuildArgs(BaseModel): + """Advanced docker build options. + + Contains all options exposed on the python docker build api, except those set by :meth:`Image.build` itself. + """ + + class _ContainerLimits(TypedDict): + memory: int + memswap: int + cpushares: int + cpusetcpus: str + + # defaults set by us + rm: bool = True + forcerm: bool = True + quiet: bool = True + network_mode: str = "host" + pull: bool | None = True + + # actual Docker defaults + nocache: bool | None = None + encoding: str | None = None + buildargs: dict[Any, Any] | None = None + container_limits: _ContainerLimits | None = None + shmsize: int | None = None + labels: dict[Any, Any] | None = None + cache_from: list[Any] | None = None + target: str | None = None + squash: bool | None = None + extra_hosts: dict[Any, Any] | None = None + platform: str | None = None + isolation: str | None = None + use_config_proxy: bool | None = None + + @cached_property + def kwargs(self) -> dict[str, Any]: + """Transforms the object into :meth:`client.images.build` kwargs.""" + return self.model_dump(exclude_none=True) + + +class DockerConfig(BaseModel): + """Settings passed directly to the docker daemon.""" + + build: AdvancedBuildArgs = AdvancedBuildArgs() + run: AdvancedRunArgs = AdvancedRunArgs() + + +class RunConfig(BaseModel): + """Parameters determining how a program is run.""" + + timeout: WithNone[TimeDeltaFloat] = 20 + """Timeout in seconds, or `false` for no timeout.""" + space: WithNone[ByteSizeInt] = 4_000_000_000 + """Maximum memory space available, or `false` for no limitation. + + Can be either an plain number of bytes like `30000` or a string including + a unit like `30 kB`. + """ + cpus: int = 1 + """Number of cpu cores available.""" + + @field_validator("cpus") + @classmethod + def check_nonzero(cls, val: int) -> int: + """Checks that the number of available cpus is non-zero.""" + if not val: + raise ValueError("Number must be non-zero") + else: + return val + + +class MatchConfig(BaseModel): + """Parameters determining the match execution. + + It will be parsed from the given config file and contains all settings that specify how the match is run. + """ + + problem: str + """The problem this match is over.""" + build_timeout: WithNone[TimeDeltaFloat] = 600.0 + """Timeout for building each docker image.""" + max_program_size: WithNone[ByteSizeInt] = 4_000_000_000 + """Maximum size a built program image is allowed to be.""" + strict_timeouts: bool = False + """Whether to raise an error if a program runs into the timeout.""" + generator: RunConfig = RunConfig() + """Settings determining generator execution.""" + solver: RunConfig = RunConfig() + """Settings determining solver execution.""" + battle: Battle.Config = Iterated.Config() + """Config for the battle type.""" + + model_config = ConfigDict(revalidate_instances="always") + + +class DynamicProblemConfig(BaseModel): + """Defines metadata used to dynamically import problems.""" + + location: RelativePath = Field(default=Path("problem.py"), validate_default=True) + """Path to the file defining the problem""" + dependencies: list[str] = Field(default_factory=list) + """List of dependencies needed to run the problem""" + + +class ProjectConfig(BaseModel): + """Various project settings.""" + + class ProgramOutputConfig(BaseModel): + """How to log program output.""" + + # a bit janky atm, allows for future expansion + when: ProgramLogConfigTime = ProgramLogConfigTime.error + output: ProgramLogConfigLocation = ProgramLogConfigLocation.inline + + parallel_battles: int = 1 + """Number of battles exectuted in parallel.""" + name_images: bool = True + """Whether to give the docker images names.""" + cleanup_images: bool = False + """Whether to clean up the images after we use them.""" + set_cpus: str | list[str] | None = None + """Wich cpus to run programs on, if it is a list each battle will use a different cpu specification for it.""" + error_detail: Literal["low", "high"] = "high" + """How detailed error messages should be. + Higher settings help in debugging, but may leak information from other teams. + """ + log_program_io: ProgramOutputConfig = ProgramOutputConfig() + """How to log program output.""" + points: int = 100 + """Highest number of points each team can achieve.""" + results: RelativePath = Field(default=Path("./results"), validate_default=True) + """Path to a folder where the results will be saved.""" + + @model_validator(mode="after") + def val_set_cpus(self) -> Self: + """Validates that each battle that is being executed is assigned some cpu cores.""" + if isinstance(self.set_cpus, list) and self.parallel_battles > len(self.set_cpus): + raise ValueError("Number of parallel battles exceeds the number of set_cpu specifier strings.") + else: + return self + + +class TeamInfo(BaseModel): + """The config parameters defining a team.""" + + generator: RelativePath + solver: RelativePath + + +type TeamInfos = dict[str, TeamInfo] + + +def _empty_default() -> Any: + """Helper to make a structure that gets parsed to a default pydantic struct while passing type checking.""" + return {} + + +class AlgobattleConfig(BaseModel): + """Base that contains all config options and can be parsed from config files.""" + + # funky defaults to force their validation with context info present + teams: TeamInfos = Field(default_factory=dict) + project: ProjectConfig = Field(default_factory=_empty_default, validate_default=True) + match: MatchConfig + docker: DockerConfig = DockerConfig() + problem: DynamicProblemConfig = Field(default_factory=_empty_default, validate_default=True) + + model_config = ConfigDict(revalidate_instances="always") + + @cached_property + def loaded_problem(self) -> Problem: + """The problem this config uses.""" + return Problem.load(self.match.problem, self.problem.location if self.problem.location.is_file() else None) + + @classmethod + def from_file(cls, file: Path, *, ignore_uninstalled: bool = False, relativize_paths: bool = True) -> Self: + """Parses a config object from a toml file. + + Args: + file: Path to the file, or a directory containing one called 'algobattle.toml'. + ignore_uninstalled: Whether to raise errors if the specified battle type is not installed. + relativize_paths: Wether to relativize paths to the config's location rather than the cwd. + """ + Battle.load_entrypoints() + if not file.is_file(): + if file.joinpath("algobattle.toml").is_file(): + file /= "algobattle.toml" + else: + raise FileNotFoundError("The path does not point to an Algobattle project") + try: + config_dict = tomllib.loads(file.read_text()) + except tomllib.TOMLDecodeError as e: + raise ValueError(f"The config file at {file} is not a properly formatted TOML file!\n{e}") from e + context: dict[str, Any] = {"ignore_uninstalled": ignore_uninstalled} + if relativize_paths: + context["base_path"] = file.parent + return cls.model_validate(config_dict, context=context) + + def as_prog_config(self) -> ProgramConfigView: + """Builds a simple object containing all program relevant settings.""" + return ProgramConfigView( + build_timeout=self.match.build_timeout, + max_program_size=self.match.max_program_size, + strict_timeouts=self.match.strict_timeouts, + build_kwargs=self.docker.build.kwargs, + run_kwargs=self.docker.run.kwargs, + generator=self.match.generator, + solver=self.match.solver, + name_images=self.project.name_images, + cleanup_images=self.project.cleanup_images, + ) diff --git a/algobattle/problem.py b/src/algobattle/problem.py similarity index 86% rename from algobattle/problem.py rename to src/algobattle/problem.py index 44202c51..445b1029 100644 --- a/algobattle/problem.py +++ b/src/algobattle/problem.py @@ -1,4 +1,5 @@ """Module defining the Problem and Solution base classes and related objects.""" + from abc import ABC, abstractmethod from collections.abc import Callable from dataclasses import dataclass @@ -8,21 +9,7 @@ from itertools import chain from math import inf, isnan from pathlib import Path -from typing import ( - TYPE_CHECKING, - Any, - ClassVar, - Generic, - Literal, - ParamSpec, - Protocol, - Self, - TypeVar, - cast, - get_args, - overload, - runtime_checkable, -) +from typing import TYPE_CHECKING, Any, ClassVar, Literal, Protocol, Self, cast, get_args, overload, runtime_checkable from annotated_types import GroupedMetadata from pydantic import GetCoreSchemaHandler, ValidationInfo @@ -58,11 +45,7 @@ def validate_instance(self) -> None: return -InstanceT = TypeVar("InstanceT", bound=Instance, contravariant=True) -P = ParamSpec("P") - - -class Solution(EncodableBase, ABC, Generic[InstanceT]): +class Solution[InstanceT: Instance = Any](EncodableBase, ABC): """A proposed solution for an instance of this problem.""" @classmethod @@ -100,7 +83,7 @@ def score(self, instance: InstanceT, role: Role) -> float: return 1 -def minimize(function: Callable[P, float]) -> Callable[P, float]: +def minimize[**P](function: Callable[P, float]) -> Callable[P, float]: """Wraps a score function such that smaller scores are considered better.""" @wraps(function) @@ -113,23 +96,16 @@ def inner(*args: P.args, **kwargs: P.kwargs) -> float: return inner -def maximize(function: Callable[P, float]) -> Callable[P, float]: +def maximize[**P](function: Callable[P, float]) -> Callable[P, float]: """No-op decorator to indicate that bigger scores are considered better.""" return function -SolutionT = TypeVar("SolutionT", bound=Solution[Any]) - - -_I = TypeVar("_I", bound=Instance, contravariant=True) -_S = TypeVar("_S", bound=Solution[Instance], contravariant=True) - - @runtime_checkable -class ScoreFunctionWithSol(Protocol, Generic[_I, _S]): +class ScoreFunctionWithSol[I: Instance, S: Solution[Instance]](Protocol): """Type of `score` function passed to Problem if `with_solution` is set.""" - def __call__(self, instance: _I, *, generator_solution: _S, solver_solution: _S) -> float: + def __call__(self, instance: I, *, generator_solution: S, solver_solution: S) -> float: """Calculates how well a solution solves this problem instance. Args: @@ -145,10 +121,10 @@ def __call__(self, instance: _I, *, generator_solution: _S, solver_solution: _S) @runtime_checkable -class ScoreFunctionNoSol(Protocol, Generic[_I, _S]): +class ScoreFunctionNoSol[I: Instance, S: Solution](Protocol): """Type of `score` function passed to Problem if `with_solution` is not set.""" - def __call__(self, instance: _I, *, solution: _S) -> float: + def __call__(self, instance: I, *, solution: S) -> float: """Calculates how well a solution solves this problem instance. Args: @@ -162,24 +138,22 @@ def __call__(self, instance: _I, *, solution: _S) -> float: ... -ScoreFunction = ScoreFunctionWithSol[InstanceT, SolutionT] | ScoreFunctionNoSol[InstanceT, SolutionT] +type ScoreFunction[I: Instance, S: Solution] = ScoreFunctionWithSol[I, S] | ScoreFunctionNoSol[I, S] @overload -def default_score(instance: Instance, *, solution: Solution[Any]) -> float: - ... +def default_score(instance: Instance, *, solution: Solution) -> float: ... @overload -def default_score(instance: Instance, *, generator_solution: SolutionT, solver_solution: SolutionT) -> float: - ... +def default_score[S: Solution](instance: Instance, *, generator_solution: S, solver_solution: S) -> float: ... -def default_score( +def default_score[S: Solution]( instance: Instance, - solution: SolutionT | None = None, - generator_solution: SolutionT | None = None, - solver_solution: SolutionT | None = None, + solution: S | None = None, + generator_solution: S | None = None, + solver_solution: S | None = None, ) -> float: """Calculates how well a solution solves this problem instance. @@ -220,43 +194,41 @@ class Problem: """The definition of a problem.""" @overload - def __init__( + def __init__[I: Instance, S: Solution]( self, *, name: str, - instance_cls: type[InstanceT], - solution_cls: type[SolutionT], + instance_cls: type[I], + solution_cls: type[S], min_size: int = 0, with_solution: Literal[True] = True, - score_function: ScoreFunctionWithSol[InstanceT, SolutionT] = default_score, - test_instance: InstanceT | None = None, - ) -> None: - ... + score_function: ScoreFunctionWithSol[I, S] = default_score, + test_instance: I | None = None, + ) -> None: ... @overload - def __init__( + def __init__[I: Instance, S: Solution]( self, *, name: str, - instance_cls: type[InstanceT], - solution_cls: type[SolutionT], + instance_cls: type[I], + solution_cls: type[S], min_size: int = 0, with_solution: Literal[False], - score_function: ScoreFunctionNoSol[InstanceT, SolutionT] = default_score, - test_instance: InstanceT | None = None, - ) -> None: - ... + score_function: ScoreFunctionNoSol[I, S] = default_score, + test_instance: I | None = None, + ) -> None: ... - def __init__( + def __init__[I: Instance, S: Solution]( self, *, name: str, - instance_cls: type[InstanceT], - solution_cls: type[SolutionT], + instance_cls: type[I], + solution_cls: type[S], min_size: int = 0, with_solution: bool = True, - score_function: ScoreFunction[InstanceT, SolutionT] = default_score, - test_instance: InstanceT | None = None, + score_function: ScoreFunction[I, S] = default_score, + test_instance: I | None = None, ) -> None: """The definition of a problem. @@ -289,22 +261,20 @@ def __init__( _problems: ClassVar[dict[str, Self]] = {} @overload - def score(self, instance: InstanceT, *, solution: Solution[InstanceT]) -> float: - ... + def score[I: Instance](self, instance: I, *, solution: Solution[I]) -> float: ... @overload - def score( - self, instance: InstanceT, *, generator_solution: Solution[InstanceT], solver_solution: Solution[InstanceT] - ) -> float: - ... + def score[I: Instance]( + self, instance: I, *, generator_solution: Solution[I], solver_solution: Solution[I] + ) -> float: ... - def score( + def score[I: Instance]( self, - instance: Instance, + instance: I, *, - solution: SolutionT | None = None, - generator_solution: SolutionT | None = None, - solver_solution: SolutionT | None = None, + solution: Solution[I] | None = None, + generator_solution: Solution[I] | None = None, + solver_solution: Solution[I] | None = None, ) -> float: """Helper function to call self.score_function with easier to use overloads.""" if self.with_solution: @@ -366,7 +336,7 @@ def load(cls, name: str, file: Path | None = None) -> Self: case [e]: loaded: object = e.load() if not isinstance(loaded, cls): - raise ValueError( # noqa: TRY004 + raise ValueError( # ruff: ignore[type-check-without-type-error] f"The entrypoint '{name}' doesn't point to a problem but a {loaded.__class__.__qualname__}." ) return loaded @@ -548,11 +518,11 @@ class InstanceModel(InstanceSolutionModel, EncodableModel, Instance, ABC): pass -class SolutionModel(InstanceSolutionModel, Solution[InstanceT], ABC): +class SolutionModel[I: Instance](InstanceSolutionModel, Solution[I], ABC): """A solution that can easily be parsed to/from a json file.""" @classmethod - def decode(cls, source: Path, max_size: int, role: Role, instance: InstanceT) -> Self: + def decode(cls, source: Path, max_size: int, role: Role, instance: I) -> Self: """Uses pydantic to create a python object from a `.json` file.""" context: dict[str, Any] = {"max_size": max_size, "role": role, "instance": instance} return cls._decode(cls, source, **context) diff --git a/algobattle/program.py b/src/algobattle/program.py similarity index 96% rename from algobattle/program.py rename to src/algobattle/program.py index 12ccab03..237a658f 100644 --- a/algobattle/program.py +++ b/src/algobattle/program.py @@ -1,851 +1,851 @@ -"""Module providing an interface to interact with the teams' programs.""" - -import json -from abc import ABC, abstractmethod -from collections.abc import Generator as PyGenerator, Iterable, Iterator, Mapping -from contextlib import contextmanager -from dataclasses import dataclass, field -from itertools import combinations -from os import environ -from pathlib import Path -from tarfile import TarFile, is_tarfile -from tempfile import TemporaryDirectory -from timeit import default_timer -from types import EllipsisType, TracebackType -from typing import Any, ClassVar, Protocol, Self, TypeVar, cast -from uuid import uuid4 -from zipfile import ZipFile, is_zipfile - -from anyio import run as run_async -from anyio.to_thread import run_sync -from docker import DockerClient -from docker.errors import APIError, BuildError as DockerBuildError, DockerException, ImageNotFound -from docker.models.containers import Container as DockerContainer -from docker.models.images import Image as DockerImage -from docker.types import Mount -from requests import ConnectionError, Timeout -from typing_extensions import TypedDict -from urllib3.exceptions import ReadTimeoutError - -from algobattle.problem import Instance, Problem, Solution -from algobattle.util import ( - BuildError, - DockerError, - DockerNotRunning, - Encodable, - EncodingError, - ExceptionInfo, - ExecutionError, - ExecutionTimeout, - Role, - TempDir, - ValidationError, -) - -_client_var: DockerClient | None = None - - -T = TypeVar("T") - - -def client() -> DockerClient: - """Returns the docker api client, checking that it's still responsive.""" - global _client_var - try: - if _client_var is None: - _client_var = DockerClient.from_env() - else: - _client_var.ping() - except (DockerException, APIError) as e: - raise DockerNotRunning from e - return _client_var - - -class RunConfigOverride(TypedDict, total=False): - """Run parameters that were overriden by the battle type.""" - - timeout: float | None - space: int | None - cpus: int - - -@dataclass(frozen=True, slots=True) -class RunSpecs: - """Actual specification of a program run.""" - - timeout: float | None - space: int | None - cpus: int - overriden: RunConfigOverride - - -class RunConfigView(Protocol): - """Config view for single runs.""" - - timeout: float | None - space: int | None - cpus: int - - -@dataclass(frozen=True, slots=True) -class ProgramConfigView: - """Config settings relevant to the program module.""" - - build_timeout: float | None - max_program_size: int | None - strict_timeouts: bool - build_kwargs: dict[str, Any] - run_kwargs: dict[str, Any] - generator: RunConfigView - solver: RunConfigView - name_images: bool - cleanup_images: bool - - -class ProgramUi(Protocol): - """Provides an interface for :class:`Program` to update the Ui.""" - - @abstractmethod - def start_program(self, role: Role, timeout: float | None) -> None: - """Signals that the program execution has been started.""" - - @abstractmethod - def stop_program(self, role: Role, runtime: float) -> None: - """Signals that the program execution has been finished.""" - - -class ProgramIO: - """Manages the directories used to pass IO to programs. - - Normally we can just create temporary directories using the python stdlib, but when running inside a container we - need to use a directory thats bound to one on the host machine. - """ - - host_dir: ClassVar[Path | None] = Path(environ["ALGOBATTLE_IO_DIR"]) if "ALGOBATTLE_IO_DIR" in environ else None - parent_dir: ClassVar[Path | None] = Path("/algobattle/io") if "ALGOBATTLE_IO_DIR" in environ else None - - def __init__(self) -> None: - """Creates the needed temporary directories.""" - super().__init__() - self._input = TemporaryDirectory(dir=self.parent_dir) - self._output = TemporaryDirectory(dir=self.parent_dir) - - @property - def input(self) -> Path: - """Path to the input directory.""" - return Path(self._input.name) - - @property - def output(self) -> Path: - """Path to the output directoy.""" - return Path(self._output.name) - - @property - def mounts(self) -> list[Mount]: - """A list of Mounts corresponding to these IO directories that can be passed to the docker api.""" - if self.host_dir: - host_input = self.host_dir / self.input.name - host_output = self.host_dir / self.output.name - else: - host_input = self.input - host_output = self.output - return [ - Mount(target="/input", source=str(host_input), type="bind", read_only=True), - Mount(target="/output", source=str(host_output), type="bind"), - ] - - def __enter__(self) -> Self: - return self - - def __exit__(self, exc: type[BaseException] | None, val: BaseException | None, tb: TracebackType | None): - self._input.__exit__(exc, val, tb) - self._output.__exit__(exc, val, tb) - - -@dataclass(frozen=True) -class SolverResult: - """The result of a solver execution.""" - - runtime: float = 0 - overriden: RunConfigOverride = field(default_factory=RunConfigOverride) - error: ExceptionInfo | None = None - battle_data: Encodable | None = None - solution: Solution[Instance] | None = None - - -@dataclass(frozen=True) -class GeneratorResult(SolverResult): - """The result of a generator execution.""" - - instance: Instance | None = None - - -ProgramResult = GeneratorResult | SolverResult - - -@dataclass -class _WrappedException(Exception): - """Wraps an inner exception such that we can recover the runtime from outer methods easily.""" - - inner: Exception - runtime: float - - -@dataclass(frozen=True) -class Program(ABC): - """A higher level interface for a team's programs.""" - - id: str - """The id of the Docker image.""" - problem: Problem - """The problem this program generates/solves.""" - config: ProgramConfigView - """Config settings used for this program.""" - - role: ClassVar[Role] - """Role of this program.""" - - @classmethod - @contextmanager - def _setup_docker_env(cls, source: Path) -> PyGenerator[tuple[Path, str | None], None, None]: - """Creates a folder containing the actual docker environment used to build a program.""" - if not source.exists(): - raise ValueError - if source.is_dir(): - yield source, None - return - if source.name == "Dockerfile" or source.suffix == ".dockerfile": - yield source.parent, source.name - return - - with TempDir() as build_folder: - if is_zipfile(source): - with ZipFile(source, "r") as f: - f.extractall(build_folder) - elif is_tarfile(source): - with TarFile(source, "r") as f: - f.extractall(build_folder) - else: - raise ValueError(f"The file {source} is not recognisable as a dockerfile.") - - yield build_folder, None - - @classmethod - async def build( - cls, - path: Path, - *, - problem: Problem, - config: ProgramConfigView, - team_name: str | None = None, - ) -> Self: - """Creates a program by building the specified docker image. - - Args: - path: Path to a Dockerfile (or folder containing one) from which to build the image. - problem: The problem this program generates/solves. - config: Settings for this program. - team_name: If set the image will be given a descriptive name. - - Returns: - The built Program. - - Raises: - BuildError: If the build fails for any reason. - """ - if team_name is not None and config.name_images: - normalized = team_name.lower().replace(" ", "_") - name = f"algobattle_{normalized}_{cls.role.name}" - try: - old_image = client().images.get(name) - except ImageNotFound: - old_image = None - else: - name = None - old_image = None - - with cls._setup_docker_env(path) as (path, dockerfile): - try: - image = await run_sync( - cls._build_daemon_call, - str(path), - name, - config.build_timeout, - dockerfile, - config.build_kwargs, - cancellable=True, - ) - if old_image is not None: - old_image.reload() - if len(old_image.tags) == 0: - old_image.remove(force=True) - - except Timeout as e: - raise BuildError("Build ran into a timeout.") from e - except DockerBuildError as e: - logs = cast(list[dict[str, Any]], list(e.build_log)) - raise BuildError("Build did not complete successfully.", detail=logs) from e - except APIError as e: - raise BuildError("Docker APIError thrown while building.", detail=str(e)) from e - - self = cls( - cast(str, image.id), - problem=problem, - config=config, - ) - used_size = image.attrs.get("Size", 0) - if config.max_program_size is not None and used_size > config.max_program_size: - try: - self.remove() - finally: - raise BuildError( - "Built image is too large.", detail=f"Size: {used_size}B, limit: {config.max_program_size}B." - ) - return self - - @classmethod - def _build_daemon_call( - cls, path: str, tag: str | None, timeout: float | None, dockerfile: str | None, build_kwargs: dict[str, Any] - ) -> DockerImage: - image, _logs = cast( - tuple[DockerImage, Iterator[Any]], - client().images.build( - path=str(path), - tag=tag, - timeout=timeout, # type: ignore - dockerfile=dockerfile, - **build_kwargs, - ), - ) - return image - - def run_specs( - self, - timeout: float | None | EllipsisType, - space: int | None | EllipsisType, - cpus: int | EllipsisType, - ) -> RunSpecs: - """Merges the overriden config options with the parsed ones.""" - overriden = RunConfigOverride() - match self.role: - case Role.generator: - config = self.config.generator - case Role.solver: - config = self.config.solver - if timeout is ...: - timeout = config.timeout - else: - overriden["timeout"] = timeout - if space is ...: - space = config.space - else: - overriden["space"] = space - if cpus is ...: - cpus = config.cpus - else: - overriden["cpus"] = cpus - return RunSpecs(timeout=timeout, space=space, cpus=cpus, overriden=overriden) - - async def _run_inner( - self, - *, - io: ProgramIO, - max_size: int, - specs: RunSpecs, - battle_input: Encodable | None, - battle_output: type[Encodable] | None, - set_cpus: str | None, - ui: ProgramUi | None, - ) -> tuple[float, Encodable | None]: - """Encodes the metadata, runs the docker container, and decodes battle metadata.""" - io.input.joinpath("info.json").write_text( - json.dumps( - { - "max_size": max_size, - "timeout": specs.timeout, - "space": specs.space, - "cpus": specs.cpus, - }, - ) - ) - if battle_input is not None: - try: - battle_input.encode(io.input / "battle_data", self.role) - except Exception as e: - raise EncodingError("Battle data couldn't be encoded.", detail=str(e)) from e - - runtime = 0 - try: - container = client().containers.create( - image=self.id, - name=f"algobattle_{uuid4().hex[:8]}", - mem_limit=specs.space, - nano_cpus=specs.cpus * 1_000_000_000, - detach=True, - mounts=io.mounts if io else None, - cpuset_cpus=set_cpus, - **self.config.run_kwargs, - ) - - if ui is not None: - ui.start_program(self.role, specs.timeout) - try: - runtime = await run_sync(self._run_daemon_call, container, specs.timeout, cancellable=True) - except ExecutionError as e: - raise _WrappedException(e, e.runtime) from e - finally: - container.remove(force=True) - if ui is not None: - ui.stop_program(self.role, runtime) - except APIError as e: - raise _WrappedException( - DockerError("Docker APIError thrown while running container.", detail=str(e)), runtime - ) from e - - if battle_output: - try: - decoded_battle_output = battle_output.decode(io.output / "battle_data", max_size, self.role) - except Exception as e: - raise _WrappedException(e, runtime) from e - else: - decoded_battle_output = None - return runtime, decoded_battle_output - - def _run_daemon_call(self, container: DockerContainer, timeout: float | None = None) -> float: - """Runs the container. - - Returns: - The container runtime - Raises: - ExecutionTimeout: When the container runs into the timeout. - ExecutionError: When the process inside the container crashes. - DockerException: When the daeomon raises some other error. - """ - # this method has to be a thicker wrapper since we have to kill the container asap, not just when the - # async manager gives us back control. - container.start() - start_time = default_timer() - elapsed_time = 0 - try: - response = cast(dict[str, Any], container.wait(timeout=timeout)) - elapsed_time = round(default_timer() - start_time, 2) - if response["StatusCode"] == 0: - return elapsed_time - else: - raise ExecutionError( - "The program executed in the container crashed.", - detail=f"exit code: {response['StatusCode']}, error message:\n{container.logs().decode()}", - runtime=elapsed_time, - ) - except (Timeout, ConnectionError) as e: - container.kill() - elapsed_time = round(default_timer() - start_time, 2) - if len(e.args) != 1 or not isinstance(e.args[0], ReadTimeoutError): - raise - if self.config.strict_timeouts: - raise ExecutionTimeout("The docker container exceeded the time limit.", runtime=elapsed_time) from e - return elapsed_time - - def remove(self) -> None: - """Removes the image from the docker daemon. - - **This will not cause the python object to be deleted.** - Attempting to run the image after it has been removed will cause runtime errors. - Will not throw an error if the image has been removed already. - - Raises: - DockerError: When removing the image fails. - """ - try: - client().images.remove(image=self.id, force=True) - except ImageNotFound: - pass - except APIError as e: - raise DockerError("Docker APIError thrown while removing image.", detail=str(e)) from e - - def __enter__(self): - return self - - def __exit__(self, *args: object): - if self.config.cleanup_images: - self.remove() - - -class Generator(Program): - """A higher level interface for a team's generator.""" - - role: ClassVar[Role] = Role.generator - - async def run( - self, - max_size: int, - *, - timeout: float | None | EllipsisType = ..., - space: int | None | EllipsisType = ..., - cpus: int | EllipsisType = ..., - battle_input: Encodable | None = None, - battle_output: type[Encodable] | None = None, - ui: ProgramUi | None = None, - set_cpus: str | None = None, - ) -> GeneratorResult: - """Executes the generator and parses its output into a problem instance. - - Args: - max_size: Maximum size of the instance that the generator is allowed to generate. - timeout: Timeout for the program in seconds. - space: Maximum amount of memory space this program can use in bytes. - cpus: Number of cpu cores this program can use. - battle_input: Additional data that will be given to the generator. - battle_output: Class that will be used to parse additional data the generator outputs. - ui: Interface the program execution uses to update the ui. - set_cpus: A docker format string specifying what cpu cores the program should use, or None for any cores. - - Returns: - Datastructure containing all info about the generator execution and the created problem instance. - """ - specs = self.run_specs(timeout, space, cpus) - runtime = 0 - battle_data = None - instance = None - solution = None - exception_info = None - with ProgramIO() as io: - try: - io.input.joinpath("max_size.txt").write_text(str(max_size)) - runtime, battle_data = await self._run_inner( - io=io, - max_size=max_size, - specs=specs, - battle_input=battle_input, - battle_output=battle_output, - ui=ui, - set_cpus=set_cpus, - ) - - try: - instance = self.problem.instance_cls.decode(io.output / "instance", max_size, self.role) - except EncodingError: - raise - except Exception as e: - raise EncodingError( - "Unknown error thrown while decoding the problem instance.", detail=str(e) - ) from e - try: - instance.validate_instance() - except ValidationError: - raise - except Exception as e: - raise ValidationError("Unknown error thrown during instance validation.", detail=str(e)) from e - if instance.size > max_size: - raise ValidationError( # noqa: TRY301 - "Instance is too large.", detail=f"Generated: {instance.size}, maximum: {max_size}" - ) - if self.problem.with_solution: - try: - solution = self.problem.solution_cls.decode( - io.output / "solution", max_size, self.role, instance - ) - except EncodingError: - raise - except Exception as e: - raise EncodingError("Unknown error thrown while decoding the solution.", detail=str(e)) from e - try: - solution.validate_solution(instance, Role.generator) - except ValidationError: - raise - except Exception as e: - raise ValidationError("Unknown error thrown during solution validation.", detail=str(e)) from e - - except _WrappedException as e: - runtime = e.runtime - exception_info = ExceptionInfo.from_exception(e.inner) - except Exception as e: - exception_info = ExceptionInfo.from_exception(e) - return GeneratorResult( - runtime=runtime, - overriden=specs.overriden, - error=exception_info, - battle_data=battle_data, - instance=instance, - solution=solution, - ) - - def test(self, max_size: int | None = None) -> Instance | ExceptionInfo: - """Tests whether the generator runs without issues and creates a syntactically valid instance.""" - res = run_async(self.run, max_size or self.problem.min_size) - if res.error: - return res.error - else: - assert res.instance is not None - return res.instance - - -class Solver(Program): - """A higher level interface for a team's solver.""" - - role: ClassVar[Role] = Role.solver - - async def run( - self, - instance: Instance, - max_size: int, - *, - timeout: float | None | EllipsisType = ..., - space: int | None | EllipsisType = ..., - cpus: int | EllipsisType = ..., - battle_input: Encodable | None = None, - battle_output: type[Encodable] | None = None, - ui: ProgramUi | None = None, - set_cpus: str | None = None, - ) -> SolverResult: - """Executes the solver on the given problem instance and parses its output into a problem solution. - - Args: - max_size: Maximum size of the instance that the generator is allowed to generate. - timeout: Timeout for the program in seconds. - space: Maximum amount of memory space this program can use in bytes. - cpus: Number of cpu cores this program can use. - battle_input: Additional data that will be given to the solver. - battle_output: Class that will be used to parse additional data the solver outputs. - ui: Interface the program execution uses to update the ui. - set_cpus: A docker format string specifying what cpu cores the program should use, or None for any cores. - - Returns: - Datastructure containing all info about the solver execution and the solution it computed. - """ - specs = self.run_specs(timeout, space, cpus) - runtime = 0 - battle_data = None - solution = None - exception_info = None - with ProgramIO() as io: - try: - instance.encode(io.input / "instance", self.role) - runtime, battle_data = await self._run_inner( - io=io, - max_size=max_size, - specs=specs, - battle_input=battle_input, - battle_output=battle_output, - ui=ui, - set_cpus=set_cpus, - ) - try: - solution = self.problem.solution_cls.decode(io.output / "solution", max_size, self.role, instance) - except EncodingError: - raise - except Exception as e: - raise EncodingError("Unexpected error thrown while decoding the solution.", detail=str(e)) from e - try: - solution.validate_solution(instance, Role.solver) - except ValidationError: - raise - except Exception as e: - raise ValidationError("Unexpected error during solution validation.", detail=str(e)) from e - - except _WrappedException as e: - runtime = e.runtime - exception_info = ExceptionInfo.from_exception(e.inner) - except Exception as e: - exception_info = ExceptionInfo.from_exception(e) - return SolverResult( - runtime=runtime, - overriden=specs.overriden, - error=exception_info, - battle_data=battle_data, - solution=solution, - ) - - def test(self, instance: Instance) -> ExceptionInfo | None: - """Tests whether the solver runs without issues and creates a syntactically valid solution.""" - res = run_async(self.run, instance, instance.size) - if res.error: - return res.error - else: - return None - - -class BuildUi(Protocol): - """Provides and interface for the build process to update the ui.""" - - @abstractmethod - def start_build_step(self, teams: Iterable[str], timeout: float | None) -> None: - """Tells the ui that the build process has started.""" - - @abstractmethod - def start_build(self, team: str, role: Role) -> None: - """Informs the ui that a new program is being built.""" - - @abstractmethod - def finish_build(self, team: str, success: bool) -> None: - """Informs the ui that the current build has been finished.""" - - -class _TeamInfo(Protocol): - generator: Path - solver: Path - - -@dataclass(frozen=True, slots=True) -class Team: - """Class bundling together the programs of a team.""" - - name: str - generator: Generator - solver: Solver - - @classmethod - async def build( - cls, - name: str, - info: _TeamInfo, - problem: Problem, - config: ProgramConfigView, - ui: BuildUi, - ) -> "Team": - """Builds the specified docker files into images and return the corresponding team. - - Args: - name: Name of the team. - info: Team info containing the paths to the program data. - problem: The problem class the current match is fought over. - config: Config for the programs. - - Returns: - The built team. - - Raises: - ValueError: If the team name is already in use. - DockerError: If the docker build fails for some reason - """ - ui.start_build(name, Role.generator) - generator = await Generator.build( - path=info.generator, - problem=problem, - config=config, - team_name=name, - ) - try: - ui.start_build(name, Role.solver) - solver = await Solver.build( - path=info.solver, - problem=problem, - config=config, - team_name=name, - ) - except Exception: - if config.cleanup_images: - generator.remove() - raise - return Team(name, generator, solver) - - def __str__(self) -> str: - return self.name - - def __eq__(self, o: object) -> bool: - if isinstance(o, Team): - return self.name == o.name - else: - return False - - def __hash__(self) -> int: - return hash(self.name) - - def __enter__(self) -> Self: - self.generator.__enter__() - self.solver.__enter__() - return self - - def __exit__(self, *args: object): - self.generator.__exit__(*args) - self.solver.__exit__(*args) - - def cleanup(self) -> None: - """Removes the built docker images.""" - self.generator.remove() - self.solver.remove() - - -@dataclass(frozen=True) -class Matchup: - """Represents an individual matchup of teams.""" - - generator: Team - solver: Team - - def __iter__(self) -> Iterator[Team]: - yield self.generator - yield self.solver - - def __repr__(self) -> str: - return f"Matchup({self.generator.name}, {self.solver.name})" - - def __str__(self) -> str: - return f"{self.generator.name} vs {self.solver.name}" - - -@dataclass -class TeamHandler: - """Handles building teams and cleaning them up.""" - - active: list[Team] = field(default_factory=list) - excluded: dict[str, ExceptionInfo] = field(default_factory=dict) - - @classmethod - async def build( - cls, - infos: Mapping[str, _TeamInfo], - problem: Problem, - config: ProgramConfigView, - ui: BuildUi, - ) -> Self: - """Builds the programs of every team. - - Attempts to build the programs of every team. If any build fails, that team will be excluded and all its - programs cleaned up. - - Args: - infos: Teams that participate in the match. - problem: Problem class that the match will be fought with. - config: Config options. - - Returns: - :class:`TeamHandler` containing the info about the participating teams. - """ - handler = cls() - ui.start_build_step(infos.keys(), config.build_timeout) - for name, info in infos.items(): - try: - team = await Team.build(name, info, problem, config, ui) - handler.active.append(team) - except Exception as e: - handler.excluded[name] = ExceptionInfo.from_exception(e) - ui.finish_build(name, False) - else: - ui.finish_build(name, True) - return handler - - def __enter__(self) -> Self: - for team in self.active: - team.__enter__() - return self - - def __exit__(self, *args: object): - for team in self.active: - team.__exit__(*args) - - @property - def grouped_matchups(self) -> list[tuple[Matchup, Matchup]]: - """All matchups, grouped by the involved teams. - - Each tuple's first matchup has the first team in the group generating, the second has it solving. - """ - return [(Matchup(*g), Matchup(*g[::-1])) for g in combinations(self.active, 2)] - - @property - def matchups(self) -> list[Matchup]: - """All matchups that will be fought.""" - if len(self.active) == 1: - return [Matchup(self.active[0], self.active[0])] - else: - return [m for pair in self.grouped_matchups for m in pair] +"""Module providing an interface to interact with the teams' programs.""" + +import json +from abc import ABC, abstractmethod +from collections.abc import Generator as PyGenerator, Iterable, Iterator, Mapping +from contextlib import contextmanager +from dataclasses import dataclass, field +from itertools import combinations +from os import environ +from pathlib import Path +from tarfile import TarFile, is_tarfile +from tempfile import TemporaryDirectory +from timeit import default_timer +from types import EllipsisType, TracebackType +from typing import Any, ClassVar, Protocol, Self, TypeVar, cast +from uuid import uuid4 +from zipfile import ZipFile, is_zipfile + +from anyio import run as run_async +from anyio.to_thread import run_sync +from docker import DockerClient +from docker.errors import APIError, BuildError as DockerBuildError, DockerException, ImageNotFound +from docker.models.containers import Container as DockerContainer +from docker.models.images import Image as DockerImage +from docker.types import Mount +from requests import ConnectionError, Timeout +from typing_extensions import TypedDict +from urllib3.exceptions import ReadTimeoutError + +from algobattle.problem import Instance, Problem, Solution +from algobattle.util import ( + BuildError, + DockerError, + DockerNotRunning, + Encodable, + EncodingError, + ExceptionInfo, + ExecutionError, + ExecutionTimeout, + Role, + TempDir, + ValidationError, +) + +_client_var: DockerClient | None = None + + +T = TypeVar("T") + + +def client() -> DockerClient: + """Returns the docker api client, checking that it's still responsive.""" + global _client_var + try: + if _client_var is None: + _client_var = DockerClient.from_env() + else: + _client_var.ping() + except (DockerException, APIError) as e: + raise DockerNotRunning from e + return _client_var + + +class RunConfigOverride(TypedDict, total=False): + """Run parameters that were overriden by the battle type.""" + + timeout: float | None + space: int | None + cpus: int + + +@dataclass(frozen=True, slots=True) +class RunSpecs: + """Actual specification of a program run.""" + + timeout: float | None + space: int | None + cpus: int + overriden: RunConfigOverride + + +class RunConfigView(Protocol): + """Config view for single runs.""" + + timeout: float | None + space: int | None + cpus: int + + +@dataclass(frozen=True, slots=True) +class ProgramConfigView: + """Config settings relevant to the program module.""" + + build_timeout: float | None + max_program_size: int | None + strict_timeouts: bool + build_kwargs: dict[str, Any] + run_kwargs: dict[str, Any] + generator: RunConfigView + solver: RunConfigView + name_images: bool + cleanup_images: bool + + +class ProgramUi(Protocol): + """Provides an interface for :class:`Program` to update the Ui.""" + + @abstractmethod + def start_program(self, role: Role, timeout: float | None) -> None: + """Signals that the program execution has been started.""" + + @abstractmethod + def stop_program(self, role: Role, runtime: float) -> None: + """Signals that the program execution has been finished.""" + + +class ProgramIO: + """Manages the directories used to pass IO to programs. + + Normally we can just create temporary directories using the python stdlib, but when running inside a container we + need to use a directory thats bound to one on the host machine. + """ + + host_dir: ClassVar[Path | None] = Path(environ["ALGOBATTLE_IO_DIR"]) if "ALGOBATTLE_IO_DIR" in environ else None + parent_dir: ClassVar[Path | None] = Path("/algobattle/io") if "ALGOBATTLE_IO_DIR" in environ else None + + def __init__(self) -> None: + """Creates the needed temporary directories.""" + super().__init__() + self._input = TemporaryDirectory(dir=self.parent_dir) + self._output = TemporaryDirectory(dir=self.parent_dir) + + @property + def input(self) -> Path: + """Path to the input directory.""" + return Path(self._input.name) + + @property + def output(self) -> Path: + """Path to the output directoy.""" + return Path(self._output.name) + + @property + def mounts(self) -> list[Mount]: + """A list of Mounts corresponding to these IO directories that can be passed to the docker api.""" + if self.host_dir: + host_input = self.host_dir / self.input.name + host_output = self.host_dir / self.output.name + else: + host_input = self.input + host_output = self.output + return [ + Mount(target="/input", source=str(host_input), type="bind", read_only=True), + Mount(target="/output", source=str(host_output), type="bind"), + ] + + def __enter__(self) -> Self: + return self + + def __exit__(self, exc: type[BaseException] | None, val: BaseException | None, tb: TracebackType | None): + self._input.__exit__(exc, val, tb) + self._output.__exit__(exc, val, tb) + + +@dataclass(frozen=True) +class SolverResult: + """The result of a solver execution.""" + + runtime: float = 0 + overriden: RunConfigOverride = field(default_factory=RunConfigOverride) + error: ExceptionInfo | None = None + battle_data: Encodable | None = None + solution: Solution[Instance] | None = None + + +@dataclass(frozen=True) +class GeneratorResult(SolverResult): + """The result of a generator execution.""" + + instance: Instance | None = None + + +type ProgramResult = GeneratorResult | SolverResult + + +@dataclass +class _WrappedException(Exception): + """Wraps an inner exception such that we can recover the runtime from outer methods easily.""" + + inner: Exception + runtime: float + + +@dataclass(frozen=True) +class Program(ABC): + """A higher level interface for a team's programs.""" + + id: str + """The id of the Docker image.""" + problem: Problem + """The problem this program generates/solves.""" + config: ProgramConfigView + """Config settings used for this program.""" + + role: ClassVar[Role] + """Role of this program.""" + + @classmethod + @contextmanager + def _setup_docker_env(cls, source: Path) -> PyGenerator[tuple[Path, str | None]]: + """Creates a folder containing the actual docker environment used to build a program.""" + if not source.exists(): + raise ValueError + if source.is_dir(): + yield source, None + return + if source.name == "Dockerfile" or source.suffix == ".dockerfile": + yield source.parent, source.name + return + + with TempDir() as build_folder: + if is_zipfile(source): + with ZipFile(source, "r") as f: + f.extractall(build_folder) + elif is_tarfile(source): + with TarFile(source, "r") as f: + f.extractall(build_folder) + else: + raise ValueError(f"The file {source} is not recognisable as a dockerfile.") + + yield build_folder, None + + @classmethod + async def build( + cls, + path: Path, + *, + problem: Problem, + config: ProgramConfigView, + team_name: str | None = None, + ) -> Self: + """Creates a program by building the specified docker image. + + Args: + path: Path to a Dockerfile (or folder containing one) from which to build the image. + problem: The problem this program generates/solves. + config: Settings for this program. + team_name: If set the image will be given a descriptive name. + + Returns: + The built Program. + + Raises: + BuildError: If the build fails for any reason. + """ + if team_name is not None and config.name_images: + normalized = team_name.lower().replace(" ", "_") + name = f"algobattle_{normalized}_{cls.role.name}" + try: + old_image = client().images.get(name) + except ImageNotFound: + old_image = None + else: + name = None + old_image = None + + with cls._setup_docker_env(path) as (path, dockerfile): + try: + image = await run_sync( + cls._build_daemon_call, + str(path), + name, + config.build_timeout, + dockerfile, + config.build_kwargs, + cancellable=True, + ) + if old_image is not None: + old_image.reload() + if len(old_image.tags) == 0: + old_image.remove(force=True) + + except Timeout as e: + raise BuildError("Build ran into a timeout.") from e + except DockerBuildError as e: + logs = cast(list[dict[str, Any]], list(e.build_log)) + raise BuildError("Build did not complete successfully.", detail=logs) from e + except APIError as e: + raise BuildError("Docker APIError thrown while building.", detail=str(e)) from e + + self = cls( + cast(str, image.id), + problem=problem, + config=config, + ) + used_size = image.attrs.get("Size", 0) + if config.max_program_size is not None and used_size > config.max_program_size: + try: + self.remove() + finally: + raise BuildError( + "Built image is too large.", detail=f"Size: {used_size}B, limit: {config.max_program_size}B." + ) + return self + + @classmethod + def _build_daemon_call( + cls, path: str, tag: str | None, timeout: float | None, dockerfile: str | None, build_kwargs: dict[str, Any] + ) -> DockerImage: + image, _logs = cast( + tuple[DockerImage, Iterator[Any]], + client().images.build( + path=str(path), + tag=tag, + timeout=timeout, # type: ignore + dockerfile=dockerfile, + **build_kwargs, + ), + ) + return image + + def run_specs( + self, + timeout: float | None | EllipsisType, + space: int | None | EllipsisType, + cpus: int | EllipsisType, + ) -> RunSpecs: + """Merges the overriden config options with the parsed ones.""" + overriden = RunConfigOverride() + match self.role: + case Role.generator: + config = self.config.generator + case Role.solver: + config = self.config.solver + if timeout is ...: + timeout = config.timeout + else: + overriden["timeout"] = timeout + if space is ...: + space = config.space + else: + overriden["space"] = space + if cpus is ...: + cpus = config.cpus + else: + overriden["cpus"] = cpus + return RunSpecs(timeout=timeout, space=space, cpus=cpus, overriden=overriden) + + async def _run_inner( + self, + *, + io: ProgramIO, + max_size: int, + specs: RunSpecs, + battle_input: Encodable | None, + battle_output: type[Encodable] | None, + set_cpus: str | None, + ui: ProgramUi | None, + ) -> tuple[float, Encodable | None]: + """Encodes the metadata, runs the docker container, and decodes battle metadata.""" + io.input.joinpath("info.json").write_text( + json.dumps( + { + "max_size": max_size, + "timeout": specs.timeout, + "space": specs.space, + "cpus": specs.cpus, + }, + ) + ) + if battle_input is not None: + try: + battle_input.encode(io.input / "battle_data", self.role) + except Exception as e: + raise EncodingError("Battle data couldn't be encoded.", detail=str(e)) from e + + runtime = 0 + try: + container = client().containers.create( + image=self.id, + name=f"algobattle_{uuid4().hex[:8]}", + mem_limit=specs.space, + nano_cpus=specs.cpus * 1_000_000_000, + detach=True, + mounts=io.mounts if io else None, + cpuset_cpus=set_cpus, + **self.config.run_kwargs, + ) + + if ui is not None: + ui.start_program(self.role, specs.timeout) + try: + runtime = await run_sync(self._run_daemon_call, container, specs.timeout, cancellable=True) + except ExecutionError as e: + raise _WrappedException(e, e.runtime) from e + finally: + container.remove(force=True) + if ui is not None: + ui.stop_program(self.role, runtime) + except APIError as e: + raise _WrappedException( + DockerError("Docker APIError thrown while running container.", detail=str(e)), runtime + ) from e + + if battle_output: + try: + decoded_battle_output = battle_output.decode(io.output / "battle_data", max_size, self.role) + except Exception as e: + raise _WrappedException(e, runtime) from e + else: + decoded_battle_output = None + return runtime, decoded_battle_output + + def _run_daemon_call(self, container: DockerContainer, timeout: float | None = None) -> float: + """Runs the container. + + Returns: + The container runtime + Raises: + ExecutionTimeout: When the container runs into the timeout. + ExecutionError: When the process inside the container crashes. + DockerException: When the daeomon raises some other error. + """ + # this method has to be a thicker wrapper since we have to kill the container asap, not just when the + # async manager gives us back control. + container.start() + start_time = default_timer() + elapsed_time = 0 + try: + response = cast(dict[str, Any], container.wait(timeout=timeout)) + elapsed_time = round(default_timer() - start_time, 2) + if response["StatusCode"] == 0: + return elapsed_time + else: + raise ExecutionError( + "The program executed in the container crashed.", + detail=f"exit code: {response['StatusCode']}, error message:\n{container.logs().decode()}", + runtime=elapsed_time, + ) + except (Timeout, ConnectionError) as e: + container.kill() + elapsed_time = round(default_timer() - start_time, 2) + if len(e.args) != 1 or not isinstance(e.args[0], ReadTimeoutError): + raise + if self.config.strict_timeouts: + raise ExecutionTimeout("The docker container exceeded the time limit.", runtime=elapsed_time) from e + return elapsed_time + + def remove(self) -> None: + """Removes the image from the docker daemon. + + **This will not cause the python object to be deleted.** + Attempting to run the image after it has been removed will cause runtime errors. + Will not throw an error if the image has been removed already. + + Raises: + DockerError: When removing the image fails. + """ + try: + client().images.remove(image=self.id, force=True) + except ImageNotFound: + pass + except APIError as e: + raise DockerError("Docker APIError thrown while removing image.", detail=str(e)) from e + + def __enter__(self): + return self + + def __exit__(self, *args: object): + if self.config.cleanup_images: + self.remove() + + +class Generator(Program): + """A higher level interface for a team's generator.""" + + role: ClassVar[Role] = Role.generator + + async def run( + self, + max_size: int, + *, + timeout: float | None | EllipsisType = ..., + space: int | None | EllipsisType = ..., + cpus: int | EllipsisType = ..., + battle_input: Encodable | None = None, + battle_output: type[Encodable] | None = None, + ui: ProgramUi | None = None, + set_cpus: str | None = None, + ) -> GeneratorResult: + """Executes the generator and parses its output into a problem instance. + + Args: + max_size: Maximum size of the instance that the generator is allowed to generate. + timeout: Timeout for the program in seconds. + space: Maximum amount of memory space this program can use in bytes. + cpus: Number of cpu cores this program can use. + battle_input: Additional data that will be given to the generator. + battle_output: Class that will be used to parse additional data the generator outputs. + ui: Interface the program execution uses to update the ui. + set_cpus: A docker format string specifying what cpu cores the program should use, or None for any cores. + + Returns: + Datastructure containing all info about the generator execution and the created problem instance. + """ + specs = self.run_specs(timeout, space, cpus) + runtime = 0 + battle_data = None + instance = None + solution = None + exception_info = None + with ProgramIO() as io: + try: + io.input.joinpath("max_size.txt").write_text(str(max_size)) + runtime, battle_data = await self._run_inner( + io=io, + max_size=max_size, + specs=specs, + battle_input=battle_input, + battle_output=battle_output, + ui=ui, + set_cpus=set_cpus, + ) + + try: + instance = self.problem.instance_cls.decode(io.output / "instance", max_size, self.role) + except EncodingError: + raise + except Exception as e: + raise EncodingError( + "Unknown error thrown while decoding the problem instance.", detail=str(e) + ) from e + try: + instance.validate_instance() + except ValidationError: + raise + except Exception as e: + raise ValidationError("Unknown error thrown during instance validation.", detail=str(e)) from e + if instance.size > max_size: + raise ValidationError( # ruff: ignore[raise-within-try] + "Instance is too large.", detail=f"Generated: {instance.size}, maximum: {max_size}" + ) + if self.problem.with_solution: + try: + solution = self.problem.solution_cls.decode( + io.output / "solution", max_size, self.role, instance + ) + except EncodingError: + raise + except Exception as e: + raise EncodingError("Unknown error thrown while decoding the solution.", detail=str(e)) from e + try: + solution.validate_solution(instance, Role.generator) + except ValidationError: + raise + except Exception as e: + raise ValidationError("Unknown error thrown during solution validation.", detail=str(e)) from e + + except _WrappedException as e: + runtime = e.runtime + exception_info = ExceptionInfo.from_exception(e.inner) + except Exception as e: + exception_info = ExceptionInfo.from_exception(e) + return GeneratorResult( + runtime=runtime, + overriden=specs.overriden, + error=exception_info, + battle_data=battle_data, + instance=instance, + solution=solution, + ) + + def test(self, max_size: int | None = None) -> Instance | ExceptionInfo: + """Tests whether the generator runs without issues and creates a syntactically valid instance.""" + res = run_async(self.run, max_size or self.problem.min_size) + if res.error: + return res.error + else: + assert res.instance is not None + return res.instance + + +class Solver(Program): + """A higher level interface for a team's solver.""" + + role: ClassVar[Role] = Role.solver + + async def run( + self, + instance: Instance, + max_size: int, + *, + timeout: float | None | EllipsisType = ..., + space: int | None | EllipsisType = ..., + cpus: int | EllipsisType = ..., + battle_input: Encodable | None = None, + battle_output: type[Encodable] | None = None, + ui: ProgramUi | None = None, + set_cpus: str | None = None, + ) -> SolverResult: + """Executes the solver on the given problem instance and parses its output into a problem solution. + + Args: + max_size: Maximum size of the instance that the generator is allowed to generate. + timeout: Timeout for the program in seconds. + space: Maximum amount of memory space this program can use in bytes. + cpus: Number of cpu cores this program can use. + battle_input: Additional data that will be given to the solver. + battle_output: Class that will be used to parse additional data the solver outputs. + ui: Interface the program execution uses to update the ui. + set_cpus: A docker format string specifying what cpu cores the program should use, or None for any cores. + + Returns: + Datastructure containing all info about the solver execution and the solution it computed. + """ + specs = self.run_specs(timeout, space, cpus) + runtime = 0 + battle_data = None + solution = None + exception_info = None + with ProgramIO() as io: + try: + instance.encode(io.input / "instance", self.role) + runtime, battle_data = await self._run_inner( + io=io, + max_size=max_size, + specs=specs, + battle_input=battle_input, + battle_output=battle_output, + ui=ui, + set_cpus=set_cpus, + ) + try: + solution = self.problem.solution_cls.decode(io.output / "solution", max_size, self.role, instance) + except EncodingError: + raise + except Exception as e: + raise EncodingError("Unexpected error thrown while decoding the solution.", detail=str(e)) from e + try: + solution.validate_solution(instance, Role.solver) + except ValidationError: + raise + except Exception as e: + raise ValidationError("Unexpected error during solution validation.", detail=str(e)) from e + + except _WrappedException as e: + runtime = e.runtime + exception_info = ExceptionInfo.from_exception(e.inner) + except Exception as e: + exception_info = ExceptionInfo.from_exception(e) + return SolverResult( + runtime=runtime, + overriden=specs.overriden, + error=exception_info, + battle_data=battle_data, + solution=solution, + ) + + def test(self, instance: Instance) -> ExceptionInfo | None: + """Tests whether the solver runs without issues and creates a syntactically valid solution.""" + res = run_async(self.run, instance, instance.size) + if res.error: + return res.error + else: + return None + + +class BuildUi(Protocol): + """Provides and interface for the build process to update the ui.""" + + @abstractmethod + def start_build_step(self, teams: Iterable[str], timeout: float | None) -> None: + """Tells the ui that the build process has started.""" + + @abstractmethod + def start_build(self, team: str, role: Role) -> None: + """Informs the ui that a new program is being built.""" + + @abstractmethod + def finish_build(self, team: str, success: bool) -> None: + """Informs the ui that the current build has been finished.""" + + +class _TeamInfo(Protocol): + generator: Path + solver: Path + + +@dataclass(frozen=True, slots=True) +class Team: + """Class bundling together the programs of a team.""" + + name: str + generator: Generator + solver: Solver + + @classmethod + async def build( + cls, + name: str, + info: _TeamInfo, + problem: Problem, + config: ProgramConfigView, + ui: BuildUi, + ) -> Team: + """Builds the specified docker files into images and return the corresponding team. + + Args: + name: Name of the team. + info: Team info containing the paths to the program data. + problem: The problem class the current match is fought over. + config: Config for the programs. + + Returns: + The built team. + + Raises: + ValueError: If the team name is already in use. + DockerError: If the docker build fails for some reason + """ + ui.start_build(name, Role.generator) + generator = await Generator.build( + path=info.generator, + problem=problem, + config=config, + team_name=name, + ) + try: + ui.start_build(name, Role.solver) + solver = await Solver.build( + path=info.solver, + problem=problem, + config=config, + team_name=name, + ) + except Exception: + if config.cleanup_images: + generator.remove() + raise + return Team(name, generator, solver) + + def __str__(self) -> str: + return self.name + + def __eq__(self, o: object) -> bool: + if isinstance(o, Team): + return self.name == o.name + else: + return False + + def __hash__(self) -> int: + return hash(self.name) + + def __enter__(self) -> Self: + self.generator.__enter__() + self.solver.__enter__() + return self + + def __exit__(self, *args: object): + self.generator.__exit__(*args) + self.solver.__exit__(*args) + + def cleanup(self) -> None: + """Removes the built docker images.""" + self.generator.remove() + self.solver.remove() + + +@dataclass(frozen=True) +class Matchup: + """Represents an individual matchup of teams.""" + + generator: Team + solver: Team + + def __iter__(self) -> Iterator[Team]: + yield self.generator + yield self.solver + + def __repr__(self) -> str: + return f"Matchup({self.generator.name}, {self.solver.name})" + + def __str__(self) -> str: + return f"{self.generator.name} vs {self.solver.name}" + + +@dataclass +class TeamHandler: + """Handles building teams and cleaning them up.""" + + active: list[Team] = field(default_factory=list) + excluded: dict[str, ExceptionInfo] = field(default_factory=dict) + + @classmethod + async def build( + cls, + infos: Mapping[str, _TeamInfo], + problem: Problem, + config: ProgramConfigView, + ui: BuildUi, + ) -> Self: + """Builds the programs of every team. + + Attempts to build the programs of every team. If any build fails, that team will be excluded and all its + programs cleaned up. + + Args: + infos: Teams that participate in the match. + problem: Problem class that the match will be fought with. + config: Config options. + + Returns: + :class:`TeamHandler` containing the info about the participating teams. + """ + handler = cls() + ui.start_build_step(infos.keys(), config.build_timeout) + for name, info in infos.items(): + try: + team = await Team.build(name, info, problem, config, ui) + handler.active.append(team) + except Exception as e: + handler.excluded[name] = ExceptionInfo.from_exception(e) + ui.finish_build(name, False) + else: + ui.finish_build(name, True) + return handler + + def __enter__(self) -> Self: + for team in self.active: + team.__enter__() + return self + + def __exit__(self, *args: object): + for team in self.active: + team.__exit__(*args) + + @property + def grouped_matchups(self) -> list[tuple[Matchup, Matchup]]: + """All matchups, grouped by the involved teams. + + Each tuple's first matchup has the first team in the group generating, the second has it solving. + """ + return [(Matchup(*g), Matchup(*g[::-1])) for g in combinations(self.active, 2)] + + @property + def matchups(self) -> list[Matchup]: + """All matchups that will be fought.""" + if len(self.active) == 1: + return [Matchup(self.active[0], self.active[0])] + else: + return [m for pair in self.grouped_matchups for m in pair] diff --git a/algobattle/py.typed b/src/algobattle/py.typed similarity index 100% rename from algobattle/py.typed rename to src/algobattle/py.typed diff --git a/src/algobattle/templates/__init__.py b/src/algobattle/templates/__init__.py new file mode 100644 index 00000000..7c3e4f78 --- /dev/null +++ b/src/algobattle/templates/__init__.py @@ -0,0 +1,9 @@ +"""Package containing templates used for the algobattle init command.""" + +from .template import ( + Language as Language, + PartialTemplateArgs as PartialTemplateArgs, + TemplateArgs as TemplateArgs, + write_problem_template as write_problem_template, + write_templates as write_templates, +) diff --git a/algobattle/templates/cpp/.gitignore b/src/algobattle/templates/c/.gitignore similarity index 89% rename from algobattle/templates/cpp/.gitignore rename to src/algobattle/templates/c/.gitignore index a6420950..259148fa 100644 --- a/algobattle/templates/cpp/.gitignore +++ b/src/algobattle/templates/c/.gitignore @@ -1,32 +1,32 @@ -# Prerequisites -*.d - -# Compiled Object files -*.slo -*.lo -*.o -*.obj - -# Precompiled Headers -*.gch -*.pch - -# Compiled Dynamic libraries -*.so -*.dylib -*.dll - -# Fortran module files -*.mod -*.smod - -# Compiled Static libraries -*.lai -*.la -*.a -*.lib - -# Executables -*.exe -*.out -*.app +# Prerequisites +*.d + +# Compiled Object files +*.slo +*.lo +*.o +*.obj + +# Precompiled Headers +*.gch +*.pch + +# Compiled Dynamic libraries +*.so +*.dylib +*.dll + +# Fortran module files +*.mod +*.smod + +# Compiled Static libraries +*.lai +*.la +*.a +*.lib + +# Executables +*.exe +*.out +*.app diff --git a/algobattle/templates/cpp/Dockerfile b/src/algobattle/templates/c/Dockerfile similarity index 95% rename from algobattle/templates/cpp/Dockerfile rename to src/algobattle/templates/c/Dockerfile index 392d7a06..fadb2510 100644 --- a/algobattle/templates/cpp/Dockerfile +++ b/src/algobattle/templates/c/Dockerfile @@ -1,12 +1,12 @@ -FROM debian:12 - -RUN apt update && apt upgrade -RUN apt install -y clang-15 cmake ninja-build - -WORKDIR /algobattle -COPY src src/ -ENV CC=/usr/bin/clang-15 CXX=/usr/bin/clang++-15 -RUN cmake -S src -B build && cmake --build build --target install - -WORKDIR / -CMD ["main"] +FROM debian:12 + +RUN apt update && apt upgrade +RUN apt install -y clang-15 cmake ninja-build + +WORKDIR /algobattle +COPY src src/ +ENV CC=/usr/bin/clang-15 CXX=/usr/bin/clang++-15 +RUN cmake -S src -B build && cmake --build build --target install + +WORKDIR / +CMD ["main"] diff --git a/algobattle/templates/c/src/CMakeLists.txt b/src/algobattle/templates/c/src/CMakeLists.txt similarity index 93% rename from algobattle/templates/c/src/CMakeLists.txt rename to src/algobattle/templates/c/src/CMakeLists.txt index fc59da63..725072b6 100644 --- a/algobattle/templates/c/src/CMakeLists.txt +++ b/src/algobattle/templates/c/src/CMakeLists.txt @@ -1,11 +1,11 @@ -cmake_minimum_required(VERSION 3.1...3.27) - -project( - ModernCMakeExample - VERSION 1.0 - LANGUAGES C -) - -add_executable(main main.c) - -install(TARGETS main DESTINATION "") +cmake_minimum_required(VERSION 3.1...3.27) + +project( + ModernCMakeExample + VERSION 1.0 + LANGUAGES C +) + +add_executable(main main.c) + +install(TARGETS main DESTINATION "") diff --git a/algobattle/templates/c/src/main.c b/src/algobattle/templates/c/src/main.c similarity index 92% rename from algobattle/templates/c/src/main.c rename to src/algobattle/templates/c/src/main.c index 212b4d87..9f5b091e 100644 --- a/algobattle/templates/c/src/main.c +++ b/src/algobattle/templates/c/src/main.c @@ -1,5 +1,5 @@ - -int main() { - printf("hello world\n"); - return 0; -} + +int main() { + printf("hello world\n"); + return 0; +} diff --git a/algobattle/templates/c/.gitignore b/src/algobattle/templates/cpp/.gitignore similarity index 89% rename from algobattle/templates/c/.gitignore rename to src/algobattle/templates/cpp/.gitignore index a6420950..259148fa 100644 --- a/algobattle/templates/c/.gitignore +++ b/src/algobattle/templates/cpp/.gitignore @@ -1,32 +1,32 @@ -# Prerequisites -*.d - -# Compiled Object files -*.slo -*.lo -*.o -*.obj - -# Precompiled Headers -*.gch -*.pch - -# Compiled Dynamic libraries -*.so -*.dylib -*.dll - -# Fortran module files -*.mod -*.smod - -# Compiled Static libraries -*.lai -*.la -*.a -*.lib - -# Executables -*.exe -*.out -*.app +# Prerequisites +*.d + +# Compiled Object files +*.slo +*.lo +*.o +*.obj + +# Precompiled Headers +*.gch +*.pch + +# Compiled Dynamic libraries +*.so +*.dylib +*.dll + +# Fortran module files +*.mod +*.smod + +# Compiled Static libraries +*.lai +*.la +*.a +*.lib + +# Executables +*.exe +*.out +*.app diff --git a/algobattle/templates/c/Dockerfile b/src/algobattle/templates/cpp/Dockerfile similarity index 95% rename from algobattle/templates/c/Dockerfile rename to src/algobattle/templates/cpp/Dockerfile index 392d7a06..fadb2510 100644 --- a/algobattle/templates/c/Dockerfile +++ b/src/algobattle/templates/cpp/Dockerfile @@ -1,12 +1,12 @@ -FROM debian:12 - -RUN apt update && apt upgrade -RUN apt install -y clang-15 cmake ninja-build - -WORKDIR /algobattle -COPY src src/ -ENV CC=/usr/bin/clang-15 CXX=/usr/bin/clang++-15 -RUN cmake -S src -B build && cmake --build build --target install - -WORKDIR / -CMD ["main"] +FROM debian:12 + +RUN apt update && apt upgrade +RUN apt install -y clang-15 cmake ninja-build + +WORKDIR /algobattle +COPY src src/ +ENV CC=/usr/bin/clang-15 CXX=/usr/bin/clang++-15 +RUN cmake -S src -B build && cmake --build build --target install + +WORKDIR / +CMD ["main"] diff --git a/algobattle/templates/cpp/src/CMakeLists.txt b/src/algobattle/templates/cpp/src/CMakeLists.txt similarity index 94% rename from algobattle/templates/cpp/src/CMakeLists.txt rename to src/algobattle/templates/cpp/src/CMakeLists.txt index 998bf4e0..0fd00339 100644 --- a/algobattle/templates/cpp/src/CMakeLists.txt +++ b/src/algobattle/templates/cpp/src/CMakeLists.txt @@ -1,11 +1,11 @@ -cmake_minimum_required(VERSION 3.1...3.27) - -project( - ModernCMakeExample - VERSION 1.0 - LANGUAGES CXX -) - -add_executable(main main.cpp) - -install(TARGETS main DESTINATION "") +cmake_minimum_required(VERSION 3.1...3.27) + +project( + ModernCMakeExample + VERSION 1.0 + LANGUAGES CXX +) + +add_executable(main main.cpp) + +install(TARGETS main DESTINATION "") diff --git a/algobattle/templates/cpp/src/main.cpp b/src/algobattle/templates/cpp/src/main.cpp similarity index 93% rename from algobattle/templates/cpp/src/main.cpp rename to src/algobattle/templates/cpp/src/main.cpp index 52a91534..2f36fe32 100644 --- a/algobattle/templates/cpp/src/main.cpp +++ b/src/algobattle/templates/cpp/src/main.cpp @@ -1,6 +1,6 @@ -#include - -int main() { - std::cout << "hello world\n"; - return 0; -} +#include + +int main() { + std::cout << "hello world\n"; + return 0; +} diff --git a/algobattle/templates/csharp/Dockerfile.jinja b/src/algobattle/templates/csharp/Dockerfile.jinja similarity index 96% rename from algobattle/templates/csharp/Dockerfile.jinja rename to src/algobattle/templates/csharp/Dockerfile.jinja index fb94bc1f..b0c035ba 100644 --- a/algobattle/templates/csharp/Dockerfile.jinja +++ b/src/algobattle/templates/csharp/Dockerfile.jinja @@ -1,8 +1,8 @@ -FROM mcr.microsoft.com/dotnet/sdk:7.0 - -WORKDIR /algobattle -COPY . ./ -RUN dotnet publish -c Release -o /algobattle/out - -WORKDIR / -CMD ["dotnet", "/algobattle/out/{{program.capitalize()}}.dll"] +FROM mcr.microsoft.com/dotnet/sdk:7.0 + +WORKDIR /algobattle +COPY . ./ +RUN dotnet publish -c Release -o /algobattle/out + +WORKDIR / +CMD ["dotnet", "/algobattle/out/{{program.capitalize()}}.dll"] diff --git a/algobattle/templates/csharp/Program.cs b/src/algobattle/templates/csharp/Program.cs similarity index 97% rename from algobattle/templates/csharp/Program.cs rename to src/algobattle/templates/csharp/Program.cs index bccd7f06..b9f095d3 100644 --- a/algobattle/templates/csharp/Program.cs +++ b/src/algobattle/templates/csharp/Program.cs @@ -1,3 +1,3 @@ -// main file of the program, will be run when the container starts - -Console.WriteLine("Hello, World!"); +// main file of the program, will be run when the container starts + +Console.WriteLine("Hello, World!"); diff --git a/algobattle/templates/csharp/{{program.capitalize()}}.csproj b/src/algobattle/templates/csharp/{{program.capitalize()}}.csproj similarity index 95% rename from algobattle/templates/csharp/{{program.capitalize()}}.csproj rename to src/algobattle/templates/csharp/{{program.capitalize()}}.csproj index d4398000..f02677bf 100644 --- a/algobattle/templates/csharp/{{program.capitalize()}}.csproj +++ b/src/algobattle/templates/csharp/{{program.capitalize()}}.csproj @@ -1,10 +1,10 @@ - - - - Exe - net7.0 - enable - enable - - - + + + + Exe + net7.0 + enable + enable + + + diff --git a/algobattle/templates/go/.gitignore b/src/algobattle/templates/go/.gitignore similarity index 95% rename from algobattle/templates/go/.gitignore rename to src/algobattle/templates/go/.gitignore index 6c66a079..3b735ec4 100644 --- a/algobattle/templates/go/.gitignore +++ b/src/algobattle/templates/go/.gitignore @@ -1,21 +1,21 @@ -# If you prefer the allow list template instead of the deny list, see community template: -# https://github.com/github/gitignore/blob/main/community/Golang/Go.AllowList.gitignore -# -# Binaries for programs and plugins -*.exe -*.exe~ -*.dll -*.so -*.dylib - -# Test binary, built with `go test -c` -*.test - -# Output of the go coverage tool, specifically when used with LiteIDE -*.out - -# Dependency directories (remove the comment below to include it) -# vendor/ - -# Go workspace file -go.work +# If you prefer the allow list template instead of the deny list, see community template: +# https://github.com/github/gitignore/blob/main/community/Golang/Go.AllowList.gitignore +# +# Binaries for programs and plugins +*.exe +*.exe~ +*.dll +*.so +*.dylib + +# Test binary, built with `go test -c` +*.test + +# Output of the go coverage tool, specifically when used with LiteIDE +*.out + +# Dependency directories (remove the comment below to include it) +# vendor/ + +# Go workspace file +go.work diff --git a/algobattle/templates/go/Dockerfile b/src/algobattle/templates/go/Dockerfile similarity index 94% rename from algobattle/templates/go/Dockerfile rename to src/algobattle/templates/go/Dockerfile index add52bb6..cf578399 100644 --- a/algobattle/templates/go/Dockerfile +++ b/src/algobattle/templates/go/Dockerfile @@ -1,11 +1,11 @@ -FROM golang:1.21 - -WORKDIR /algobattle -COPY go.mod *.sum ./ -RUN go mod download - -COPY *.go ./ -RUN CGO_ENABLED=0 GOOS=linux go build -o out/ - -WORKDIR / -CMD ["/algobattle/out/{{ program }}"] +FROM golang:1.21 + +WORKDIR /algobattle +COPY go.mod *.sum ./ +RUN go mod download + +COPY *.go ./ +RUN CGO_ENABLED=0 GOOS=linux go build -o out/ + +WORKDIR / +CMD ["/algobattle/out/{{ program }}"] diff --git a/algobattle/templates/go/go.mod.jinja b/src/algobattle/templates/go/go.mod.jinja similarity index 90% rename from algobattle/templates/go/go.mod.jinja rename to src/algobattle/templates/go/go.mod.jinja index 34e800ef..feccb88e 100644 --- a/algobattle/templates/go/go.mod.jinja +++ b/src/algobattle/templates/go/go.mod.jinja @@ -1,3 +1,3 @@ -module {{ program }} - -go 1.21 +module {{ program }} + +go 1.21 diff --git a/algobattle/templates/go/main.go b/src/algobattle/templates/go/main.go similarity index 91% rename from algobattle/templates/go/main.go rename to src/algobattle/templates/go/main.go index 47125b9f..c0481191 100644 --- a/algobattle/templates/go/main.go +++ b/src/algobattle/templates/go/main.go @@ -1,7 +1,7 @@ -package main - -import "fmt" - -func main() { - fmt.Println("hello world") -} +package main + +import "fmt" + +func main() { + fmt.Println("hello world") +} diff --git a/algobattle/templates/java/.dockerignore b/src/algobattle/templates/java/.dockerignore similarity index 87% rename from algobattle/templates/java/.dockerignore rename to src/algobattle/templates/java/.dockerignore index 2cba5838..eb5a316c 100644 --- a/algobattle/templates/java/.dockerignore +++ b/src/algobattle/templates/java/.dockerignore @@ -1 +1 @@ -target +target diff --git a/algobattle/templates/java/.gitignore b/src/algobattle/templates/java/.gitignore similarity index 95% rename from algobattle/templates/java/.gitignore rename to src/algobattle/templates/java/.gitignore index f6c024da..2f435308 100644 --- a/algobattle/templates/java/.gitignore +++ b/src/algobattle/templates/java/.gitignore @@ -1,17 +1,17 @@ -target/ -pom.xml.tag -pom.xml.releaseBackup -pom.xml.versionsBackup -pom.xml.next -release.properties -dependency-reduced-pom.xml -buildNumber.properties -.mvn/timing.properties -# https://github.com/takari/maven-wrapper#usage-without-binary-jar -.mvn/wrapper/maven-wrapper.jar - -# Eclipse m2e generated files -# Eclipse Core -.project -# JDT-specific (Eclipse Java Development Tools) -.classpath +target/ +pom.xml.tag +pom.xml.releaseBackup +pom.xml.versionsBackup +pom.xml.next +release.properties +dependency-reduced-pom.xml +buildNumber.properties +.mvn/timing.properties +# https://github.com/takari/maven-wrapper#usage-without-binary-jar +.mvn/wrapper/maven-wrapper.jar + +# Eclipse m2e generated files +# Eclipse Core +.project +# JDT-specific (Eclipse Java Development Tools) +.classpath diff --git a/algobattle/templates/java/Dockerfile.jinja b/src/algobattle/templates/java/Dockerfile.jinja similarity index 94% rename from algobattle/templates/java/Dockerfile.jinja rename to src/algobattle/templates/java/Dockerfile.jinja index aa93b45f..21a65a9f 100644 --- a/algobattle/templates/java/Dockerfile.jinja +++ b/src/algobattle/templates/java/Dockerfile.jinja @@ -1,8 +1,8 @@ -FROM maven:3.9.4-eclipse-temurin-20 - -WORKDIR /algobattle -COPY . ./ -RUN mvn package - -WORKDIR / -CMD ["java", "-jar", "/{{ program }}.jar"] +FROM maven:3.9.4-eclipse-temurin-20 + +WORKDIR /algobattle +COPY . ./ +RUN mvn package + +WORKDIR / +CMD ["java", "-jar", "/{{ program }}.jar"] diff --git a/algobattle/templates/java/pom.xml.jinja b/src/algobattle/templates/java/pom.xml.jinja similarity index 97% rename from algobattle/templates/java/pom.xml.jinja rename to src/algobattle/templates/java/pom.xml.jinja index a007b22f..7cd7611e 100644 --- a/algobattle/templates/java/pom.xml.jinja +++ b/src/algobattle/templates/java/pom.xml.jinja @@ -1,30 +1,30 @@ - - 4.0.0 - - com.{{ team_normalized }} - {{ program }} - {{program.capitalize()}} for the {{ problem }} problem. - - 0.1.0 - jar - - {{ program }} - - - org.apache.maven.plugins - maven-jar-plugin - 3.1.0 - - / - - - true - - com.{{ team_normalized }}.{{ program.capitalize() }} - - - - - - + + 4.0.0 + + com.{{ team_normalized }} + {{ program }} + {{program.capitalize()}} for the {{ problem }} problem. + + 0.1.0 + jar + + {{ program }} + + + org.apache.maven.plugins + maven-jar-plugin + 3.1.0 + + / + + + true + + com.{{ team_normalized }}.{{ program.capitalize() }} + + + + + + \ No newline at end of file diff --git a/algobattle/templates/java/src/main/java/com/{{team_normalized}}/{{program.capitalize()}}.java.jinja b/src/algobattle/templates/java/src/main/java/com/{{team_normalized}}/{{program.capitalize()}}.java.jinja similarity index 96% rename from algobattle/templates/java/src/main/java/com/{{team_normalized}}/{{program.capitalize()}}.java.jinja rename to src/algobattle/templates/java/src/main/java/com/{{team_normalized}}/{{program.capitalize()}}.java.jinja index 6cfd28ce..feebdc73 100644 --- a/algobattle/templates/java/src/main/java/com/{{team_normalized}}/{{program.capitalize()}}.java.jinja +++ b/src/algobattle/templates/java/src/main/java/com/{{team_normalized}}/{{program.capitalize()}}.java.jinja @@ -1,50 +1,50 @@ -// main class, will be executed as the {{ program }} -package com.{{ team_normalized }}; -{% if program == "generator" %} -import java.nio.file.Files; -import java.nio.file.Path; -{% endif %} - - -class {{ program.capitalize() }} { - public static void main(String[] args) { -{% if program == "generator" %} - try { - int max_size = Integer.parseInt(Files.readString(Path.of("/input/max_size.txt"))); - } catch (Exception e) { - return; - } - - - Object instance = null; - {% if with_solution %} - Object solution = null; - {% endif %} - - - {% if instance_json %} - String instance_output = "/output/instance.json"; // this is where you need to write the generated instance to - {% else %} - String instance_output = "/output/instance"; // this is where you need to write the generated instance to - {% endif %} -{% else %} - {% if instance_json %} - String instance_input = "/input/instance.json"; // this is where you can read the input instance from - {% else %} - String instance_input = "/input/instance"; // this is where you can read the input instance from - {% endif %} - - - Object solution = null; - - -{% endif %} -{% if program == "solver" or with_solution %} - {% if solution_json %} - String solution_output = "/output/solution.json"; // this is where you need to write the solution to - {% else %} - String solution_output = "/output/solution"; // this is where you need to write the solution to - {% endif %} -{% endif %} - } -} +// main class, will be executed as the {{ program }} +package com.{{ team_normalized }}; +{% if program == "generator" %} +import java.nio.file.Files; +import java.nio.file.Path; +{% endif %} + + +class {{ program.capitalize() }} { + public static void main(String[] args) { +{% if program == "generator" %} + try { + int max_size = Integer.parseInt(Files.readString(Path.of("/input/max_size.txt"))); + } catch (Exception e) { + return; + } + + + Object instance = null; + {% if with_solution %} + Object solution = null; + {% endif %} + + + {% if instance_json %} + String instance_output = "/output/instance.json"; // this is where you need to write the generated instance to + {% else %} + String instance_output = "/output/instance"; // this is where you need to write the generated instance to + {% endif %} +{% else %} + {% if instance_json %} + String instance_input = "/input/instance.json"; // this is where you can read the input instance from + {% else %} + String instance_input = "/input/instance"; // this is where you can read the input instance from + {% endif %} + + + Object solution = null; + + +{% endif %} +{% if program == "solver" or with_solution %} + {% if solution_json %} + String solution_output = "/output/solution.json"; // this is where you need to write the solution to + {% else %} + String solution_output = "/output/solution"; // this is where you need to write the solution to + {% endif %} +{% endif %} + } +} diff --git a/algobattle/templates/javascript/.gitignore b/src/algobattle/templates/javascript/.gitignore similarity index 100% rename from algobattle/templates/javascript/.gitignore rename to src/algobattle/templates/javascript/.gitignore diff --git a/algobattle/templates/javascript/Dockerfile.jinja b/src/algobattle/templates/javascript/Dockerfile.jinja similarity index 92% rename from algobattle/templates/javascript/Dockerfile.jinja rename to src/algobattle/templates/javascript/Dockerfile.jinja index 3742eb4c..5ff439a7 100644 --- a/algobattle/templates/javascript/Dockerfile.jinja +++ b/src/algobattle/templates/javascript/Dockerfile.jinja @@ -1,8 +1,8 @@ -FROM node - -WORKDIR /algobattle -COPY . ./ -RUN npm ci - -WORKDIR / -CMD [ "node", "/algobattle" ] +FROM node + +WORKDIR /algobattle +COPY . ./ +RUN npm ci + +WORKDIR / +CMD [ "node", "/algobattle" ] diff --git a/algobattle/templates/javascript/package-lock.json.jinja b/src/algobattle/templates/javascript/package-lock.json.jinja similarity index 94% rename from algobattle/templates/javascript/package-lock.json.jinja rename to src/algobattle/templates/javascript/package-lock.json.jinja index e9c9bea8..75c3ce68 100644 --- a/algobattle/templates/javascript/package-lock.json.jinja +++ b/src/algobattle/templates/javascript/package-lock.json.jinja @@ -1,14 +1,14 @@ -{ - "name": "{{ project }}", - "version": "0.1.0", - "lockfileVersion": 3, - "requires": true, - "packages": { - "": { - "name": "{{ project }}", - "version": "0.0.1", - "license": "ISC" - } - } - } +{ + "name": "{{ project }}", + "version": "0.1.0", + "lockfileVersion": 3, + "requires": true, + "packages": { + "": { + "name": "{{ project }}", + "version": "0.0.1", + "license": "ISC" + } + } + } \ No newline at end of file diff --git a/algobattle/templates/javascript/package.json.jinja b/src/algobattle/templates/javascript/package.json.jinja similarity index 100% rename from algobattle/templates/javascript/package.json.jinja rename to src/algobattle/templates/javascript/package.json.jinja diff --git a/algobattle/templates/javascript/{{program}}.mjs.jinja b/src/algobattle/templates/javascript/{{program}}.mjs.jinja similarity index 96% rename from algobattle/templates/javascript/{{program}}.mjs.jinja rename to src/algobattle/templates/javascript/{{program}}.mjs.jinja index 96e9d176..7f9db01d 100644 --- a/algobattle/templates/javascript/{{program}}.mjs.jinja +++ b/src/algobattle/templates/javascript/{{program}}.mjs.jinja @@ -1,37 +1,37 @@ -// main file, will be run as the {{ program}} -import { readFileSync, writeFileSync } from "fs"; - -{% if program == "generator" %} -const max_size = parseInt(readFileSync("/input/max_size.txt", "utf8")); - - -let instance = null; -{% if with_solution %} -let solution = null; -{% endif %} - - -{% if instance_json %} -writeFileSync("/output/instance.json", JSON.stringify(instance)); -{% else %} -const ouputPath = "/output/instance"; // this is where you need to write the instance to -{% endif %} -{% else %} -{% if instance_json %} -const instance = JSON.parse(readFileSync("/input/instance.json", "utf8")); -{% else %} -const instancePath = "/input/instance"; // this is where you can read the instance from -{% endif %} - - -let solution = null; - - -{% endif %} -{% if program == "solver" or with_solution %} -{% if solution_json %} -writeFileSync("/output/solution.json", JSON.stringify(solution)); -{% else %} -const ouputPath = "/output/solution"; // this is where you need to write the solution to -{% endif %} -{% endif %} +// main file, will be run as the {{ program}} +import { readFileSync, writeFileSync } from "fs"; + +{% if program == "generator" %} +const max_size = parseInt(readFileSync("/input/max_size.txt", "utf8")); + + +let instance = null; +{% if with_solution %} +let solution = null; +{% endif %} + + +{% if instance_json %} +writeFileSync("/output/instance.json", JSON.stringify(instance)); +{% else %} +const ouputPath = "/output/instance"; // this is where you need to write the instance to +{% endif %} +{% else %} +{% if instance_json %} +const instance = JSON.parse(readFileSync("/input/instance.json", "utf8")); +{% else %} +const instancePath = "/input/instance"; // this is where you can read the instance from +{% endif %} + + +let solution = null; + + +{% endif %} +{% if program == "solver" or with_solution %} +{% if solution_json %} +writeFileSync("/output/solution.json", JSON.stringify(solution)); +{% else %} +const ouputPath = "/output/solution"; // this is where you need to write the solution to +{% endif %} +{% endif %} diff --git a/algobattle/templates/plain/Dockerfile.jinja b/src/algobattle/templates/plain/Dockerfile.jinja similarity index 98% rename from algobattle/templates/plain/Dockerfile.jinja rename to src/algobattle/templates/plain/Dockerfile.jinja index 8ed6628d..4d77fd67 100644 --- a/algobattle/templates/plain/Dockerfile.jinja +++ b/src/algobattle/templates/plain/Dockerfile.jinja @@ -1,16 +1,16 @@ -# the from line specifies a base image to use, most languages publish their own ones with their runtime preinstalled -FROM alpine - -# change the cwd to some new directory for all following commands -WORKDIR /algobattle -# copy our source code into this directory -# note the trailing slash, docker needs it to know that we're trying to copy to a directory and not a file -COPY . ./ -# compile our program during the build step so we're ready to go when the container runs and won't lose any time -RUN echo "building the {{ program }}" - -# run our program from the root directory -WORKDIR / -# specify the command that will be run once the container is started -# using the '["program", "arg", "as", "list"]' syntax is better here than 'program arg as list' -CMD [ "echo", "running the {{program}}" ] +# the from line specifies a base image to use, most languages publish their own ones with their runtime preinstalled +FROM alpine + +# change the cwd to some new directory for all following commands +WORKDIR /algobattle +# copy our source code into this directory +# note the trailing slash, docker needs it to know that we're trying to copy to a directory and not a file +COPY . ./ +# compile our program during the build step so we're ready to go when the container runs and won't lose any time +RUN echo "building the {{ program }}" + +# run our program from the root directory +WORKDIR / +# specify the command that will be run once the container is started +# using the '["program", "arg", "as", "list"]' syntax is better here than 'program arg as list' +CMD [ "echo", "running the {{program}}" ] diff --git a/algobattle/templates/problem.py.jinja b/src/algobattle/templates/problem.py.jinja similarity index 94% rename from algobattle/templates/problem.py.jinja rename to src/algobattle/templates/problem.py.jinja index 70d66fe5..ed207fd8 100644 --- a/algobattle/templates/problem.py.jinja +++ b/src/algobattle/templates/problem.py.jinja @@ -1,31 +1,31 @@ -"""The {{ name }} problem module.""" -from algobattle.problem import Problem, InstanceModel, SolutionModel, maximize -from algobattle.util import Role - - -class Instance(InstanceModel): - """Instances of {{ name }}.""" - - ... - - @property - def size(self) -> int: - ... - - -class Solution(SolutionModel[Instance]): - """Solutions of {{ name }}.""" - - ... - - @maximize - def score(self, instance: Instance, role: Role) -> float: - ... - - -Problem( - name="{{ name }}", - min_size=1, - instance_cls=Instance, - solution_cls=Solution, -) +"""The {{ name }} problem module.""" +from algobattle.problem import Problem, InstanceModel, SolutionModel, maximize +from algobattle.util import Role + + +class Instance(InstanceModel): + """Instances of {{ name }}.""" + + ... + + @property + def size(self) -> int: + ... + + +class Solution(SolutionModel[Instance]): + """Solutions of {{ name }}.""" + + ... + + @maximize + def score(self, instance: Instance, role: Role) -> float: + ... + + +Problem( + name="{{ name }}", + min_size=1, + instance_cls=Instance, + solution_cls=Solution, +) diff --git a/algobattle/templates/python/.gitignore b/src/algobattle/templates/python/.gitignore similarity index 95% rename from algobattle/templates/python/.gitignore rename to src/algobattle/templates/python/.gitignore index ca4f2a70..6769e21d 100644 --- a/algobattle/templates/python/.gitignore +++ b/src/algobattle/templates/python/.gitignore @@ -1,160 +1,160 @@ -# Byte-compiled / optimized / DLL files -__pycache__/ -*.py[cod] -*$py.class - -# C extensions -*.so - -# Distribution / packaging -.Python -build/ -develop-eggs/ -dist/ -downloads/ -eggs/ -.eggs/ -lib/ -lib64/ -parts/ -sdist/ -var/ -wheels/ -share/python-wheels/ -*.egg-info/ -.installed.cfg -*.egg -MANIFEST - -# PyInstaller -# Usually these files are written by a python script from a template -# before PyInstaller builds the exe, so as to inject date/other infos into it. -*.manifest -*.spec - -# Installer logs -pip-log.txt -pip-delete-this-directory.txt - -# Unit test / coverage reports -htmlcov/ -.tox/ -.nox/ -.coverage -.coverage.* -.cache -nosetests.xml -coverage.xml -*.cover -*.py,cover -.hypothesis/ -.pytest_cache/ -cover/ - -# Translations -*.mo -*.pot - -# Django stuff: -*.log -local_settings.py -db.sqlite3 -db.sqlite3-journal - -# Flask stuff: -instance/ -.webassets-cache - -# Scrapy stuff: -.scrapy - -# Sphinx documentation -docs/_build/ - -# PyBuilder -.pybuilder/ -target/ - -# Jupyter Notebook -.ipynb_checkpoints - -# IPython -profile_default/ -ipython_config.py - -# pyenv -# For a library or package, you might want to ignore these files since the code is -# intended to run in multiple environments; otherwise, check them in: -# .python-version - -# pipenv -# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control. -# However, in case of collaboration, if having platform-specific dependencies or dependencies -# having no cross-platform support, pipenv may install dependencies that don't work, or not -# install all needed dependencies. -#Pipfile.lock - -# poetry -# Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control. -# This is especially recommended for binary packages to ensure reproducibility, and is more -# commonly ignored for libraries. -# https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control -#poetry.lock - -# pdm -# Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control. -#pdm.lock -# pdm stores project-wide configurations in .pdm.toml, but it is recommended to not include it -# in version control. -# https://pdm.fming.dev/#use-with-ide -.pdm.toml - -# PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm -__pypackages__/ - -# Celery stuff -celerybeat-schedule -celerybeat.pid - -# SageMath parsed files -*.sage.py - -# Environments -.env -.venv -env/ -venv/ -ENV/ -env.bak/ -venv.bak/ - -# Spyder project settings -.spyderproject -.spyproject - -# Rope project settings -.ropeproject - -# mkdocs documentation -/site - -# mypy -.mypy_cache/ -.dmypy.json -dmypy.json - -# Pyre type checker -.pyre/ - -# pytype static type analyzer -.pytype/ - -# Cython debug symbols -cython_debug/ - -# PyCharm -# JetBrains specific template is maintained in a separate JetBrains.gitignore that can -# be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore -# and can be added to the global gitignore or merged into this file. For a more nuclear -# option (not recommended) you can uncomment the following to ignore the entire idea folder. +# Byte-compiled / optimized / DLL files +__pycache__/ +*.py[cod] +*$py.class + +# C extensions +*.so + +# Distribution / packaging +.Python +build/ +develop-eggs/ +dist/ +downloads/ +eggs/ +.eggs/ +lib/ +lib64/ +parts/ +sdist/ +var/ +wheels/ +share/python-wheels/ +*.egg-info/ +.installed.cfg +*.egg +MANIFEST + +# PyInstaller +# Usually these files are written by a python script from a template +# before PyInstaller builds the exe, so as to inject date/other infos into it. +*.manifest +*.spec + +# Installer logs +pip-log.txt +pip-delete-this-directory.txt + +# Unit test / coverage reports +htmlcov/ +.tox/ +.nox/ +.coverage +.coverage.* +.cache +nosetests.xml +coverage.xml +*.cover +*.py,cover +.hypothesis/ +.pytest_cache/ +cover/ + +# Translations +*.mo +*.pot + +# Django stuff: +*.log +local_settings.py +db.sqlite3 +db.sqlite3-journal + +# Flask stuff: +instance/ +.webassets-cache + +# Scrapy stuff: +.scrapy + +# Sphinx documentation +docs/_build/ + +# PyBuilder +.pybuilder/ +target/ + +# Jupyter Notebook +.ipynb_checkpoints + +# IPython +profile_default/ +ipython_config.py + +# pyenv +# For a library or package, you might want to ignore these files since the code is +# intended to run in multiple environments; otherwise, check them in: +# .python-version + +# pipenv +# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control. +# However, in case of collaboration, if having platform-specific dependencies or dependencies +# having no cross-platform support, pipenv may install dependencies that don't work, or not +# install all needed dependencies. +#Pipfile.lock + +# poetry +# Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control. +# This is especially recommended for binary packages to ensure reproducibility, and is more +# commonly ignored for libraries. +# https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control +#poetry.lock + +# pdm +# Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control. +#pdm.lock +# pdm stores project-wide configurations in .pdm.toml, but it is recommended to not include it +# in version control. +# https://pdm.fming.dev/#use-with-ide +.pdm.toml + +# PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm +__pypackages__/ + +# Celery stuff +celerybeat-schedule +celerybeat.pid + +# SageMath parsed files +*.sage.py + +# Environments +.env +.venv +env/ +venv/ +ENV/ +env.bak/ +venv.bak/ + +# Spyder project settings +.spyderproject +.spyproject + +# Rope project settings +.ropeproject + +# mkdocs documentation +/site + +# mypy +.mypy_cache/ +.dmypy.json +dmypy.json + +# Pyre type checker +.pyre/ + +# pytype static type analyzer +.pytype/ + +# Cython debug symbols +cython_debug/ + +# PyCharm +# JetBrains specific template is maintained in a separate JetBrains.gitignore that can +# be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore +# and can be added to the global gitignore or merged into this file. For a more nuclear +# option (not recommended) you can uncomment the following to ignore the entire idea folder. #.idea/ \ No newline at end of file diff --git a/algobattle/templates/python/Dockerfile.jinja b/src/algobattle/templates/python/Dockerfile.jinja similarity index 93% rename from algobattle/templates/python/Dockerfile.jinja rename to src/algobattle/templates/python/Dockerfile.jinja index e4748d71..110d6541 100644 --- a/algobattle/templates/python/Dockerfile.jinja +++ b/src/algobattle/templates/python/Dockerfile.jinja @@ -1,8 +1,8 @@ -FROM python:3.11 - -WORKDIR /algobattle -COPY . ./ -RUN pip install . - -WORKDIR / -CMD [ "python", "-m", "{{ program }}" ] +FROM python:3.11 + +WORKDIR /algobattle +COPY . ./ +RUN pip install . + +WORKDIR / +CMD [ "python", "-m", "{{ program }}" ] diff --git a/algobattle/templates/python/pyproject.toml.jinja b/src/algobattle/templates/python/pyproject.toml.jinja similarity index 96% rename from algobattle/templates/python/pyproject.toml.jinja rename to src/algobattle/templates/python/pyproject.toml.jinja index 06576cc4..2e10e113 100644 --- a/algobattle/templates/python/pyproject.toml.jinja +++ b/src/algobattle/templates/python/pyproject.toml.jinja @@ -1,14 +1,14 @@ -[build-system] -requires = ["setuptools", "setuptools-scm"] -build-backend = "setuptools.build_meta" - -[project] -name = "{{ project }}" -version = "0.1.0" -description = "{{program.capitalize()}} for the {{ problem }} problem." -requires-python = ">=3.11" -authors = [{name = "{{ team }}"}] - -dependencies = [ - # list your dependencies here -] +[build-system] +requires = ["setuptools", "setuptools-scm"] +build-backend = "setuptools.build_meta" + +[project] +name = "{{ project }}" +version = "0.1.0" +description = "{{program.capitalize()}} for the {{ problem }} problem." +requires-python = ">=3.11" +authors = [{name = "{{ team }}"}] + +dependencies = [ + # list your dependencies here +] diff --git a/algobattle/templates/python/{{program}}.py.jinja b/src/algobattle/templates/python/{{program}}.py.jinja similarity index 96% rename from algobattle/templates/python/{{program}}.py.jinja rename to src/algobattle/templates/python/{{program}}.py.jinja index 855b7bd4..9963e5c5 100644 --- a/algobattle/templates/python/{{program}}.py.jinja +++ b/src/algobattle/templates/python/{{program}}.py.jinja @@ -1,41 +1,41 @@ -"""Main module, will be run as the {{ program }}.""" -{% if instance_json or solution_json %} -import json -{% endif %} -from pathlib import Path - - -{% if program == "generator" %} -max_size = int(Path("/input/max_size.txt").read_text()) - - -instance = ... -{% if with_solution %} -solution = ... -{% endif %} - - -{% if instance_json %} -Path("/output/instance.json").write_text(json.dumps(instance)) -{% else %} -ouput_path = Path("/output/instance") # this is where you need to write the instance to -{% endif %} -{% else %} -{% if instance_json %} -instance = json.loads(Path("/input/instance.json").read_text()) -{% else %} -instance_path = Path("/input/instance") # this is where you can read the instance from -{% endif %} - - -solution = ... - - -{% endif %} -{% if program == "solver" or with_solution %} -{% if solution_json %} -Path("/output/solution.json").write_text(json.dumps(solution)) -{% else %} -ouput_path = Path("/output/solution") # this is where you need to write the solution to -{% endif %} -{% endif %} +"""Main module, will be run as the {{ program }}.""" +{% if instance_json or solution_json %} +import json +{% endif %} +from pathlib import Path + + +{% if program == "generator" %} +max_size = int(Path("/input/max_size.txt").read_text()) + + +instance = ... +{% if with_solution %} +solution = ... +{% endif %} + + +{% if instance_json %} +Path("/output/instance.json").write_text(json.dumps(instance)) +{% else %} +ouput_path = Path("/output/instance") # this is where you need to write the instance to +{% endif %} +{% else %} +{% if instance_json %} +instance = json.loads(Path("/input/instance.json").read_text()) +{% else %} +instance_path = Path("/input/instance") # this is where you can read the instance from +{% endif %} + + +solution = ... + + +{% endif %} +{% if program == "solver" or with_solution %} +{% if solution_json %} +Path("/output/solution.json").write_text(json.dumps(solution)) +{% else %} +ouput_path = Path("/output/solution") # this is where you need to write the solution to +{% endif %} +{% endif %} diff --git a/algobattle/templates/rust/.gitignore b/src/algobattle/templates/rust/.gitignore similarity index 100% rename from algobattle/templates/rust/.gitignore rename to src/algobattle/templates/rust/.gitignore diff --git a/algobattle/templates/rust/Cargo.toml.jinja b/src/algobattle/templates/rust/Cargo.toml.jinja similarity index 100% rename from algobattle/templates/rust/Cargo.toml.jinja rename to src/algobattle/templates/rust/Cargo.toml.jinja diff --git a/algobattle/templates/rust/Dockerfile.jinja b/src/algobattle/templates/rust/Dockerfile.jinja similarity index 93% rename from algobattle/templates/rust/Dockerfile.jinja rename to src/algobattle/templates/rust/Dockerfile.jinja index b018c96e..76f73d29 100644 --- a/algobattle/templates/rust/Dockerfile.jinja +++ b/src/algobattle/templates/rust/Dockerfile.jinja @@ -1,9 +1,9 @@ -FROM rust - -WORKDIR /algobattle -COPY Cargo.toml ./ -COPY src src/ -RUN cargo install --path . - -WORKDIR / -CMD [ "{{ program }}" ] +FROM rust + +WORKDIR /algobattle +COPY Cargo.toml ./ +COPY src src/ +RUN cargo install --path . + +WORKDIR / +CMD [ "{{ program }}" ] diff --git a/algobattle/templates/rust/src/main.rs.jinja b/src/algobattle/templates/rust/src/main.rs.jinja similarity index 100% rename from algobattle/templates/rust/src/main.rs.jinja rename to src/algobattle/templates/rust/src/main.rs.jinja diff --git a/algobattle/templates/__init__.py b/src/algobattle/templates/template.py similarity index 93% rename from algobattle/templates/__init__.py rename to src/algobattle/templates/template.py index 6427672f..d1fc1642 100644 --- a/algobattle/templates/__init__.py +++ b/src/algobattle/templates/template.py @@ -1,87 +1,87 @@ -"""Package containing templates used for the algobattle init command.""" - -from enum import StrEnum -from functools import cached_property -from pathlib import Path -from typing import Literal - -from jinja2 import Environment, PackageLoader, Template -from typing_extensions import TypedDict - - -class Language(StrEnum): - """Langues supported by `algobattle init`.""" - - plain = "plain" - python = "python" - javascript = "javascript" - typescript = "typescript" - rust = "rust" - java = "java" - cpp = "cpp" - c = "c" - csharp = "csharp" - go = "go" - - @cached_property - def env(self) -> Environment: - """The jinja environment for this language.""" - return Environment( - loader=PackageLoader("algobattle.templates", self.value), - keep_trailing_newline=True, - trim_blocks=True, - lstrip_blocks=True, - ) - - -class PartialTemplateArgs(TypedDict): - """Template arguments without the program role.""" - - problem: str - team: str - with_solution: bool - instance_json: bool - solution_json: bool - - -class TemplateArgs(PartialTemplateArgs): - """Template arguments.""" - - program: Literal["generator", "solver"] - - -def normalize(s: str) -> str: - """Normalizes a name so it can be used in project names.""" - return s.lower().replace(" ", "-") - - -def write_templates(target: Path, lang: Language, args: TemplateArgs) -> None: - """Writes the formatted templates to the target directory.""" - template_args = args | { - "project": f"{normalize(args['team'])}-{normalize(args['problem'])}-{normalize(args['program'])}", - "team_normalized": args["team"].lower().replace(" ", ""), - } - for name in lang.env.list_templates(): - template = lang.env.get_template(name) - formatted = template.render(template_args) - formatted_path = Path(Template(name).render(template_args)) - if formatted_path.suffix == ".jinja": - formatted_path = formatted_path.with_suffix("") - full_path = target / formatted_path - full_path.parent.mkdir(parents=True, exist_ok=True) - full_path.write_text(formatted) - - -problem_env = Environment( - loader=PackageLoader("algobattle"), - keep_trailing_newline=True, - trim_blocks=True, - lstrip_blocks=True, -) - - -def write_problem_template(target: Path, name: str) -> None: - """Writes the problem.py template to the targeted file.""" - template = problem_env.get_template("problem.py.jinja") - formatted = template.render({"name": name}) - target.write_text(formatted) +"""Module containing the templating logic.""" + +from enum import StrEnum +from functools import cached_property +from pathlib import Path +from typing import Literal + +from jinja2 import Environment, PackageLoader, Template +from typing_extensions import TypedDict + + +class Language(StrEnum): + """Langues supported by `algobattle init`.""" + + plain = "plain" + python = "python" + javascript = "javascript" + typescript = "typescript" + rust = "rust" + java = "java" + cpp = "cpp" + c = "c" + csharp = "csharp" + go = "go" + + @cached_property + def env(self) -> Environment: + """The jinja environment for this language.""" + return Environment( + loader=PackageLoader("algobattle.templates", self.value), + keep_trailing_newline=True, + trim_blocks=True, + lstrip_blocks=True, + ) + + +class PartialTemplateArgs(TypedDict): + """Template arguments without the program role.""" + + problem: str + team: str + with_solution: bool + instance_json: bool + solution_json: bool + + +class TemplateArgs(PartialTemplateArgs): + """Template arguments.""" + + program: Literal["generator", "solver"] + + +def normalize(s: str) -> str: + """Normalizes a name so it can be used in project names.""" + return s.lower().replace(" ", "-") + + +def write_templates(target: Path, lang: Language, args: TemplateArgs) -> None: + """Writes the formatted templates to the target directory.""" + template_args = args | { + "project": f"{normalize(args['team'])}-{normalize(args['problem'])}-{normalize(args['program'])}", + "team_normalized": args["team"].lower().replace(" ", ""), + } + for name in lang.env.list_templates(): + template = lang.env.get_template(name) + formatted = template.render(template_args) + formatted_path = Path(Template(name).render(template_args)) + if formatted_path.suffix == ".jinja": + formatted_path = formatted_path.with_suffix("") + full_path = target / formatted_path + full_path.parent.mkdir(parents=True, exist_ok=True) + full_path.write_text(formatted) + + +problem_env = Environment( + loader=PackageLoader("algobattle"), + keep_trailing_newline=True, + trim_blocks=True, + lstrip_blocks=True, +) + + +def write_problem_template(target: Path, name: str) -> None: + """Writes the problem.py template to the targeted file.""" + template = problem_env.get_template("problem.py.jinja") + formatted = template.render({"name": name}) + target.write_text(formatted) diff --git a/algobattle/templates/typescript/.gitignore b/src/algobattle/templates/typescript/.gitignore similarity index 100% rename from algobattle/templates/typescript/.gitignore rename to src/algobattle/templates/typescript/.gitignore diff --git a/algobattle/templates/typescript/Dockerfile b/src/algobattle/templates/typescript/Dockerfile similarity index 94% rename from algobattle/templates/typescript/Dockerfile rename to src/algobattle/templates/typescript/Dockerfile index 3dc0a763..6192b8eb 100644 --- a/algobattle/templates/typescript/Dockerfile +++ b/src/algobattle/templates/typescript/Dockerfile @@ -1,12 +1,12 @@ -FROM node:20 - -WORKDIR /algobattle -COPY package*.json ./ -RUN npm ci - -COPY tsconfig.json ./ -COPY src src/ -RUN npm run build - -WORKDIR / -CMD [ "npm", "run", "--prefix", "/algobattle", "start" ] +FROM node:20 + +WORKDIR /algobattle +COPY package*.json ./ +RUN npm ci + +COPY tsconfig.json ./ +COPY src src/ +RUN npm run build + +WORKDIR / +CMD [ "npm", "run", "--prefix", "/algobattle", "start" ] diff --git a/algobattle/templates/typescript/package-lock.json.jinja b/src/algobattle/templates/typescript/package-lock.json.jinja similarity index 96% rename from algobattle/templates/typescript/package-lock.json.jinja rename to src/algobattle/templates/typescript/package-lock.json.jinja index 779fd934..ecd4cd7e 100644 --- a/algobattle/templates/typescript/package-lock.json.jinja +++ b/src/algobattle/templates/typescript/package-lock.json.jinja @@ -1,35 +1,35 @@ -{ - "name": "{{ program }}", - "version": "0.0.1", - "lockfileVersion": 3, - "requires": true, - "packages": { - "": { - "name": "{{ program }}", - "version": "0.0.1", - "license": "ISC", - "devDependencies": { - "typescript": "^5.2.2" - } - }, - "node_modules/typescript": { - "version": "5.2.2", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.2.2.tgz", - "integrity": "sha512-mI4WrpHsbCIcwT9cF4FZvr80QUeKvsUsUvKDoR+X/7XHQH98xYD8YHZg7ANtz2GtZt/CBq2QJ0thkGJMHfqc1w==", - "dev": true, - "bin": { - "tsc": "bin/tsc", - "tsserver": "bin/tsserver" - }, - "engines": { - "node": ">=14.17" - } - }, - "node_modules/@types/node": { - "version": "20.6.2", - "resolved": "https://registry.npmjs.org/@types/node/-/node-20.6.2.tgz", - "integrity": "sha512-Y+/1vGBHV/cYk6OI1Na/LHzwnlNCAfU3ZNGrc1LdRe/LAIbdDPTTv/HU3M7yXN448aTVDq3eKRm2cg7iKLb8gw==", - "dev": true - } - } -} +{ + "name": "{{ program }}", + "version": "0.0.1", + "lockfileVersion": 3, + "requires": true, + "packages": { + "": { + "name": "{{ program }}", + "version": "0.0.1", + "license": "ISC", + "devDependencies": { + "typescript": "^5.2.2" + } + }, + "node_modules/typescript": { + "version": "5.2.2", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.2.2.tgz", + "integrity": "sha512-mI4WrpHsbCIcwT9cF4FZvr80QUeKvsUsUvKDoR+X/7XHQH98xYD8YHZg7ANtz2GtZt/CBq2QJ0thkGJMHfqc1w==", + "dev": true, + "bin": { + "tsc": "bin/tsc", + "tsserver": "bin/tsserver" + }, + "engines": { + "node": ">=14.17" + } + }, + "node_modules/@types/node": { + "version": "20.6.2", + "resolved": "https://registry.npmjs.org/@types/node/-/node-20.6.2.tgz", + "integrity": "sha512-Y+/1vGBHV/cYk6OI1Na/LHzwnlNCAfU3ZNGrc1LdRe/LAIbdDPTTv/HU3M7yXN448aTVDq3eKRm2cg7iKLb8gw==", + "dev": true + } + } +} diff --git a/algobattle/templates/typescript/package.json.jinja b/src/algobattle/templates/typescript/package.json.jinja similarity index 100% rename from algobattle/templates/typescript/package.json.jinja rename to src/algobattle/templates/typescript/package.json.jinja diff --git a/algobattle/templates/typescript/src/main.ts b/src/algobattle/templates/typescript/src/main.ts similarity index 93% rename from algobattle/templates/typescript/src/main.ts rename to src/algobattle/templates/typescript/src/main.ts index 56c725e1..c36e70fb 100644 --- a/algobattle/templates/typescript/src/main.ts +++ b/src/algobattle/templates/typescript/src/main.ts @@ -1,2 +1,2 @@ - -console.log("hello world"); + +console.log("hello world"); diff --git a/algobattle/templates/typescript/tsconfig.json b/src/algobattle/templates/typescript/tsconfig.json similarity index 95% rename from algobattle/templates/typescript/tsconfig.json rename to src/algobattle/templates/typescript/tsconfig.json index bfe5089d..a5223776 100644 --- a/algobattle/templates/typescript/tsconfig.json +++ b/src/algobattle/templates/typescript/tsconfig.json @@ -1,16 +1,16 @@ -{ - "compilerOptions": { - "baseUrl": "./src", - "outDir": "./build", - - "lib": ["es2023"], - "module": "node16", - "target": "es2022", - - "strict": true, - "esModuleInterop": true, - "skipLibCheck": true, - "forceConsistentCasingInFileNames": true, - "moduleResolution": "node16" - } -} +{ + "compilerOptions": { + "baseUrl": "./src", + "outDir": "./build", + + "lib": ["es2023"], + "module": "node16", + "target": "es2022", + + "strict": true, + "esModuleInterop": true, + "skipLibCheck": true, + "forceConsistentCasingInFileNames": true, + "moduleResolution": "node16" + } +} diff --git a/algobattle/types.py b/src/algobattle/types.py similarity index 92% rename from algobattle/types.py rename to src/algobattle/types.py index 5d12a421..8ba13785 100644 --- a/algobattle/types.py +++ b/src/algobattle/types.py @@ -1,612 +1,596 @@ -"""Utility types used to easily define Problems.""" -from collections.abc import Collection, Iterator -from dataclasses import dataclass -from functools import cache, cached_property -from itertools import pairwise -from sys import float_info -from typing import Annotated, Any, ClassVar, Generic, Literal, TypedDict, TypeVar, overload - -import annotated_types as at -import pydantic._internal._validators as validators -from annotated_types import ( - BaseMetadata, - GroupedMetadata, - SupportsDiv, - SupportsGe, - SupportsGt, - SupportsLe, - SupportsLt, - SupportsMod, -) -from pydantic import GetCoreSchemaHandler, GetJsonSchemaHandler -from pydantic.json_schema import JsonSchemaValue -from pydantic_core import CoreSchema, PydanticKnownError -from pydantic_core.core_schema import no_info_after_validator_function - -from algobattle.problem import ( - AttributeReference, - AttributeReferenceValidator, - InstanceModel, - InstanceRef, - SolutionModel, -) -from algobattle.util import BaseModel, Role, ValidationError - -__all__ = ( - "AlgobattleContext", - "DirectedGraph", - "Edge", - "EdgeLen", - "EdgeWeights", - "Ge", - "Gt", - "Interval", - "LaxComp", - "Le", - "Len", - "Lt", - "MaxLen", - "MinLen", - "MultipleOf", - "Path", - "SizeIndex", - "SizeLen", - "UndirectedGraph", - "UniqueItems", - "VertexWeights", - "i16", - "i32", - "i64", - "lax_comp", - "u16", - "u32", - "u64", -) - - -class AlgobattleContext(TypedDict, total=False): - """Reference class containing the attributes that can be present in the context dict.""" - - role: Role - """Role of the team that created/will receive this data.""" - max_size: int - """Maximum size of the current fight this data is for.""" - self: InstanceModel | SolutionModel[InstanceModel] - """Object currently being validated, if it is the second round of validation.""" - instance: InstanceModel - """Instance object the solution that is being validated is for.""" - solution: SolutionModel[InstanceModel] - """Solution object that is currently being validated.""" - - -# * General helper types - - -u64 = Annotated[int, at.Interval(ge=0, lt=2**64)] -"""64 bit unsigned int.""" - -i64 = Annotated[int, at.Interval(ge=-(2**63), lt=2**63)] -"""64 bit signed int.""" - -u32 = Annotated[int, at.Interval(ge=0, lt=2**32)] -"""32 bit unsigned int.""" - -i32 = Annotated[int, at.Interval(ge=-(2**31), lt=2**31)] -"""32 bit signed int.""" - -u16 = Annotated[int, at.Interval(ge=0, lt=2**16)] -"""16 bit unsigned int.""" - -i16 = Annotated[int, at.Interval(ge=-(2**15), lt=2**15)] -"""16 bit signed int.""" - - -@overload -def Gt(gt: SupportsGt) -> at.Gt: - ... - - -@overload -def Gt(gt: AttributeReference) -> AttributeReferenceValidator: - ... - - -def Gt(gt: SupportsGt | AttributeReference) -> at.Gt | AttributeReferenceValidator: - """Implies that the value must be greater than the argument. - - Passing an `AttributeReferece` means that the value must be greater than the value on the referenced property of - the instance or solution. E.g. `Gt(InstanceReference("size"))` in a solution model implies that the value must be - greater than the size of the instance it solves. - - It can be used with any type that supports the ``>`` operator, - including numbers, dates and times, strings, sets, and so on. - """ - if isinstance(gt, AttributeReference): - return AttributeReferenceValidator(validators.greater_than_validator, gt) - else: - return at.Gt(gt) - - -@overload -def Ge(ge: SupportsGe) -> at.Ge: - ... - - -@overload -def Ge(ge: AttributeReference) -> AttributeReferenceValidator: - ... - - -def Ge(ge: SupportsGe | AttributeReference) -> at.Ge | AttributeReferenceValidator: - """Implies that the value must be greater than or equal to the argument. - - Passing an `AttributeReferece` means that the value must be greater than or equal to the value on the referenced - property of the instance or solution. E.g. `Ge(InstanceReference("size"))` in a solution model implies that the - value must be greater than or equal to the size of the instance it solves. - - It can be used with any type that supports the ``>=`` operator, - including numbers, dates and times, strings, sets, and so on. - """ - if isinstance(ge, AttributeReference): - return AttributeReferenceValidator(validators.greater_than_or_equal_validator, ge) - else: - return at.Ge(ge) - - -@overload -def Lt(lt: SupportsLt) -> at.Lt: - ... - - -@overload -def Lt(lt: AttributeReference) -> AttributeReferenceValidator: - ... - - -def Lt(lt: SupportsLt | AttributeReference) -> at.Lt | AttributeReferenceValidator: - """Implies that the value must be less than the argument. - - Passing an `AttributeReferece` means that the value must be less than the value on the referenced property of - the instance or solution. E.g. `Lt(InstanceReference("size"))` in a solution model implies that the value must be - less than the size of the instance it solves. - - It can be used with any type that supports the ``<`` operator, - including numbers, dates and times, strings, sets, and so on. - """ - if isinstance(lt, AttributeReference): - return AttributeReferenceValidator(validators.less_than_validator, lt) - else: - return at.Lt(lt) - - -@overload -def Le(le: SupportsLe) -> at.Le: - ... - - -@overload -def Le(le: AttributeReference) -> AttributeReferenceValidator: - ... - - -def Le(le: SupportsLe | AttributeReference) -> at.Le | AttributeReferenceValidator: - """Implies that the value must be less than or equal to the argument. - - Passing an `AttributeReferece` means that the value must be less than or equal to the value on the referenced - property of the instance or solution. E.g. `Le(InstanceReference("size"))` in a solution model implies that the - value must be less than or equal to the size of the instance it solves. - - It can be used with any type that supports the ``<=`` operator, - including numbers, dates and times, strings, sets, and so on. - """ - if isinstance(le, AttributeReference): - return AttributeReferenceValidator(validators.less_than_or_equal_validator, le) - else: - return at.Le(le) - - -@dataclass(frozen=True, kw_only=True, slots=True) -class Interval(GroupedMetadata): - """Interval can express inclusive or exclusive bounds with a single object. - - It accepts keyword arguments ``gt``, ``ge``, ``lt``, and/or ``le``, which - are interpreted the same way as the single-bound constraints. - """ - - gt: SupportsGt | AttributeReference | None = None - ge: SupportsGe | AttributeReference | None = None - lt: SupportsLt | AttributeReference | None = None - le: SupportsLe | AttributeReference | None = None - - def __iter__(self) -> Iterator[BaseMetadata | AttributeReferenceValidator]: - """Unpack an Interval into zero or more single-bounds.""" - if self.gt is not None: - yield Gt(self.gt) - if self.ge is not None: - yield Ge(self.ge) - if self.lt is not None: - yield Lt(self.lt) - if self.le is not None: - yield Le(self.le) - - -@overload -def MultipleOf(multiple_of: SupportsDiv | SupportsMod) -> at.MultipleOf: - ... - - -@overload -def MultipleOf(multiple_of: AttributeReference) -> AttributeReferenceValidator: - ... - - -def MultipleOf( - multiple_of: SupportsDiv | SupportsMod | AttributeReference, -) -> at.MultipleOf | AttributeReferenceValidator: - """Specifies `value % multiple_of == 0`.""" - if isinstance(multiple_of, AttributeReference): - return AttributeReferenceValidator(validators.multiple_of_validator, multiple_of) - else: - return at.MultipleOf(multiple_of) - - -@overload -def MinLen(min_length: Annotated[int, Ge(0)]) -> at.MinLen: - ... - - -@overload -def MinLen(min_length: AttributeReference) -> AttributeReferenceValidator: - ... - - -def MinLen(min_length: Annotated[int, Ge(0)] | AttributeReference) -> at.MinLen | AttributeReferenceValidator: - """Implies minimum inclusive length, i.e. `len(value) >= min_length`.""" - if isinstance(min_length, AttributeReference): - return AttributeReferenceValidator(validators.min_length_validator, min_length) - else: - return at.MinLen(min_length) - - -@overload -def MaxLen(max_length: Annotated[int, Ge(0)]) -> at.MaxLen: - ... - - -@overload -def MaxLen(max_length: AttributeReference) -> AttributeReferenceValidator: - ... - - -def MaxLen(max_length: Annotated[int, Ge(0)] | AttributeReference) -> at.MaxLen | AttributeReferenceValidator: - """Implies maximum inclusive length, i.e. `len(value) <= max_length`.""" - if isinstance(max_length, AttributeReference): - # pydantic impl is currently bugged - def max_length_validator(x: Any, max_length: Any) -> Any: - if not (len(x) <= max_length): - raise PydanticKnownError( - "too_long", - {"field_type": "Value", "max_length": max_length, "actual_length": len(x)}, - ) - return x - - return AttributeReferenceValidator(max_length_validator, max_length) - else: - return at.MaxLen(max_length) - - -@dataclass(frozen=True, slots=True) -class Len(GroupedMetadata): - """Implies `min_length <= len(value) <= max_length`. - - Upper bound may be omitted or ``None`` to indicate no upper length bound. - """ - - min_length: Annotated[int, Ge(0)] | AttributeReference = 0 - max_length: Annotated[int, Ge(0)] | AttributeReference | None = None - - def __iter__(self) -> Iterator[BaseMetadata | AttributeReferenceValidator]: - """Unpack a Len into one or more single-bounds.""" - if self.min_length != 0: - yield MinLen(self.min_length) - if self.max_length is not None: - yield MaxLen(self.max_length) - - -class UniqueItems: - """Specifies that the collection should contain no duplicates. - - Can only annotate Collection types. - """ - - @staticmethod - def __get_pydantic_core_schema__(source_type: Any, handler: GetCoreSchemaHandler) -> CoreSchema: - def _func(collection: Collection[Any]) -> Collection[Any]: - if len(collection) != len(set(collection)): - raise ValueError("Value contains duplicate elements") - return collection - - return no_info_after_validator_function(_func, handler(source_type)) - - @classmethod - def __get_pydantic_json_schema__(cls, core_schema: CoreSchema, handler: GetJsonSchemaHandler) -> JsonSchemaValue: - schema = handler(core_schema) - schema["uniqueItems"] = True - return schema - - -def In(attribute: AttributeReference) -> AttributeReferenceValidator: - """Specifies that the value should be `in` some collection.""" - - def validator(val: Any, attr: Any) -> Any: - if val not in attr: - raise ValueError(f"Value is not contained in collection {attribute}.") - return val - - return AttributeReferenceValidator(validator, attribute) - - -KeyOf = In -"""Specifies that the value should be the key of the referenced dict.""" - - -class IndexInto: - """Specifies that the value is a valid index into the Sequence. - - May be used an annotation to another type like this: `index: Annotated[i16, IndexInto(SelfRef.list)]`, - or as a bare type annotation `index: IndexInto[SelfRef.list]`. - """ - - def __new__(cls, attribute: AttributeReference) -> AttributeReferenceValidator: - def validator(val: Any, attr: Any) -> Any: - validators.greater_than_or_equal_validator(val, 0) - validators.less_than_validator(val, len(attr)) - return val - - return AttributeReferenceValidator(validator, attribute) - - @classmethod - def __class_getitem__(cls, key: AttributeReference, /) -> Annotated: - def validator(val: Any, attr: Any) -> Any: - validators.less_than_validator(val, len(attr)) - return val - - return Annotated[int, at.Ge(0), AttributeReferenceValidator(validator, key)] - - -# * Algobattle specific types - - -SizeIndex = Annotated[u64, at.Ge(0), Lt(InstanceRef.size)] -"""Specifies that the field is a valid index into a instance.size length sequence, i.e. 0 <= i < instance.size.""" - - -class SizeLen: - """Specifies that the collection has length `instance.size`. - - Can only annotate Sized types. - """ - - @staticmethod - def _func(v: Any, size: int) -> Any: - """Validates that the collection has length `instance.size`.""" - if len(v) != size: - raise ValueError("Value does not have length `instance.size`") - return v - - _validator = AttributeReferenceValidator(_func, InstanceRef.size) - - @classmethod - def __get_pydantic_core_schema__(cls, source_type: Any, handler: GetCoreSchemaHandler) -> CoreSchema: - return cls._validator.__get_pydantic_core_schema__(source_type, handler) - - -# * Graph classes - - -Vertex = SizeIndex -"""Type for vertices, encoded as numbers `0 <= v < instance.num_vertices`.""" - - -Edge = Annotated[int, IndexInto[InstanceRef.edges]] -"""Type for edges, encoded as indices into `instance.edges`.""" - - -def path_in_graph(path: list[Vertex], edge_set: set[tuple[Vertex, Vertex]]): - """Checks that a path actually exists in the graph.""" - for edge in pairwise(path): - if edge not in edge_set: - raise ValueError(f"The edge {edge} does not exist in the graph.") - - -Path = Annotated[list[Vertex], AttributeReferenceValidator(path_in_graph, InstanceRef.edge_set)] - - -class DirectedGraph(InstanceModel): - """Base instance class for problems on directed graphs.""" - - num_vertices: u64 - edges: Annotated[list[tuple[SizeIndex, SizeIndex]], UniqueItems] - - @property - def size(self) -> int: - """A graph's size is the number of vertices in it.""" - return self.num_vertices - - @cached_property - def edge_set(self) -> set[tuple[Vertex, Vertex]]: - """The set of edges in this graph.""" - return set(self.edges) - - @cache # noqa: B019 - def neighbors(self, vertex: Vertex, direction: Literal["all", "outgoing", "incoming"] = "all") -> set[Vertex]: - """The neighbors of a vertex.""" - res = set[Vertex]() - if direction in {"all", "outgoing"}: - res |= {v for (u, v) in self.edges if u == vertex} - if direction in {"all", "incoming"}: - res |= {v for (v, u) in self.edges if u == vertex} - return res - - -class UndirectedGraph(DirectedGraph): - """Base instance class for problems on undirected graphs.""" - - def validate_instance(self): - """Validates that the graph is well formed and contains no self loops. - - Also brings it into a normal form where every edge {u, v} occurs exactly once in the list. - I.e. `[(0, 1), (1, 0), (1, 2)]` is accepted as valid and normalised to `[(0, 1), (1, 2)]`. - """ - super().validate_instance() - if any(u == v for u, v in self.edges): - raise ValidationError("Undirected graph contains self loops.") - - edge_set = set(self.edges) - if any(edge[::-1] in edge_set for edge in self.edges): - raise ValidationError("Undirected graph contains back and forth edges between two vertices.") - - @cached_property - def edge_set(self) -> set[tuple[Vertex, Vertex]]: - """The set of edges in this graph. - - Normalized to contain every edge in both directions. - """ - return set(self.edges) | {(v, u) for (u, v) in self.edges} - - @cache # noqa: B019 - def neighbors(self, vertex: Vertex, direction: Literal["all", "outgoing", "incoming"] = "all") -> set[Vertex]: - """The neighbors of a vertex.""" - # more efficient specialization - - return {v for (u, v) in self.edge_set if u == vertex} - - -class EdgeLen: - """Specifies that the collection has the same length as `instance.edges`. - - Can only annotate Sized types. - """ - - @staticmethod - def _func(v: Any, edges: list[tuple[int, int]]) -> Any: - """Validates that the collection has the same length as `instance.edges`.""" - if len(v) != len(edges): - raise ValueError("Value does not have the same length as `instance.edges`") - return v - - _validator = AttributeReferenceValidator(_func, InstanceRef.edges) - - @classmethod - def __get_pydantic_core_schema__(cls, source_type: Any, handler: GetCoreSchemaHandler) -> CoreSchema: - return cls._validator.__get_pydantic_core_schema__(source_type, handler) - - -Weight = TypeVar("Weight") - - -class EdgeWeights(DirectedGraph, BaseModel, Generic[Weight]): - """Mixin for graphs with weighted edges.""" - - edge_weights: Annotated[list[Weight], EdgeLen] - - @cached_property - def edges_with_weights(self) -> Iterator[tuple[tuple[Vertex, Vertex], Weight]]: - """Iterate over all edges and their weights.""" - return zip(self.edges, self.edge_weights, strict=True) - - @cache # noqa: B019 - def weight(self, edge: Edge | tuple[Vertex, Vertex]) -> Weight: - """Returns the weight of an edge. - - Raises KeyError if the given edge does not exist. - """ - if isinstance(edge, tuple): - try: - edge = self.edges.index(edge) - except ValueError as e: - if isinstance(self, UndirectedGraph): - try: - edge = self.edges.index((edge[1], edge[0])) - except ValueError as e: - raise KeyError from e - else: - raise KeyError from e - - return self.edge_weights[edge] - - -class VertexWeights(DirectedGraph, BaseModel, Generic[Weight]): - """Mixin for graphs with weighted vertices.""" - - vertex_weights: Annotated[list[Weight], SizeLen] - - @cached_property - def vertices_with_weights(self) -> Iterator[tuple[Vertex, Weight]]: - """Iterate over all edges and their weights.""" - return enumerate(self.vertex_weights) - - -@dataclass(frozen=True, slots=True) -class LaxComp: - """Helper class to make forgiving float comparisons easy. - - When comparing floats for equality there often are frustrating edge cases introduced by its imprecisions. This can - lead to matches not being decided by which team generates better instances, but by who can craft the most finnicky - floating point values. This class lets you easily sidestep these problems. - - It implements comparison operations by adding a small epsilon that covers an allowable range of imprecision. The - solving team will receive twice the epsilon that the generating team was given. This means that the generator cannot - try to exploit imprecision issues since the solver has a bigger tolerance to play with. - - !!! example "Usage" - ```py - LaxComp(some_val ** 2, role) <= comparison_val - ``` - """ - - value: float - """The value that can be relaxed in the comparison.""" - role: Role - """Role of the program whose output is currently being validated.""" - - relative_epsilon: ClassVar[float] = 128 * float_info.epsilon - absolute_epsilon: ClassVar[float] = float_info.min - - def __eq__(self, other: object, /) -> bool: - if isinstance(other, (float, int, bool)): - other = float(other) - diff = abs(self.value - other) - norm = min(abs(self.value) + abs(other), float_info.max) - factor = 1 if self.role == Role.generator else 2 - return diff <= factor * max(self.absolute_epsilon, norm * self.relative_epsilon) - else: - return NotImplemented - - def __le__(self, other: float, /) -> bool: - return self.value <= other or self == other - - def __ge__(self, other: float, /) -> bool: - return self.value >= other or self == other - - -def lax_comp(value: float, cmp: Literal["<=", "==", ">="], other: float, role: Role) -> bool: - """Helper function to explicitly use the `LaxComp` comparison mechanism. - - Args: - value: First value to compare. - cmp: Comparison to perform, one of "<=", "==", or ">=". - other: Other value to compare. - role: Role of the program the values are being validated for. - - Returns: - Result of the comparison. - """ - val = LaxComp(value, role) - match cmp: - case "<=": - return val <= other - case "==": - return val == other - case ">=": - return val >= other +"""Utility types used to easily define Problems.""" + +from collections.abc import Collection, Iterator +from dataclasses import dataclass +from functools import cache, cached_property +from itertools import pairwise +from sys import float_info +from typing import Annotated, Any, ClassVar, Literal, TypedDict, overload + +import annotated_types as at +import pydantic._internal._validators as validators +from annotated_types import ( + BaseMetadata, + GroupedMetadata, + SupportsDiv, + SupportsGe, + SupportsGt, + SupportsLe, + SupportsLt, + SupportsMod, +) +from pydantic import GetCoreSchemaHandler, GetJsonSchemaHandler +from pydantic.json_schema import JsonSchemaValue +from pydantic_core import CoreSchema, PydanticKnownError +from pydantic_core.core_schema import no_info_after_validator_function + +from algobattle.problem import ( + AttributeReference, + AttributeReferenceValidator, + InstanceModel, + InstanceRef, + SolutionModel, +) +from algobattle.util import BaseModel, Role, ValidationError + +__all__ = ( + "AlgobattleContext", + "DirectedGraph", + "Edge", + "EdgeLen", + "EdgeWeights", + "Ge", + "Gt", + "Interval", + "LaxComp", + "Le", + "Len", + "Lt", + "MaxLen", + "MinLen", + "MultipleOf", + "Path", + "SizeIndex", + "SizeLen", + "UndirectedGraph", + "UniqueItems", + "VertexWeights", + "i16", + "i32", + "i64", + "lax_comp", + "u16", + "u32", + "u64", +) + + +class AlgobattleContext(TypedDict, total=False): + """Reference class containing the attributes that can be present in the context dict.""" + + role: Role + """Role of the team that created/will receive this data.""" + max_size: int + """Maximum size of the current fight this data is for.""" + self: InstanceModel | SolutionModel[InstanceModel] + """Object currently being validated, if it is the second round of validation.""" + instance: InstanceModel + """Instance object the solution that is being validated is for.""" + solution: SolutionModel[InstanceModel] + """Solution object that is currently being validated.""" + + +# * General helper types + + +u64 = Annotated[int, at.Interval(ge=0, lt=2**64)] +"""64 bit unsigned int.""" + +i64 = Annotated[int, at.Interval(ge=-(2**63), lt=2**63)] +"""64 bit signed int.""" + +u32 = Annotated[int, at.Interval(ge=0, lt=2**32)] +"""32 bit unsigned int.""" + +i32 = Annotated[int, at.Interval(ge=-(2**31), lt=2**31)] +"""32 bit signed int.""" + +u16 = Annotated[int, at.Interval(ge=0, lt=2**16)] +"""16 bit unsigned int.""" + +i16 = Annotated[int, at.Interval(ge=-(2**15), lt=2**15)] +"""16 bit signed int.""" + + +@overload +def Gt(gt: SupportsGt) -> at.Gt: ... + + +@overload +def Gt(gt: AttributeReference) -> AttributeReferenceValidator: ... + + +def Gt(gt: SupportsGt | AttributeReference) -> at.Gt | AttributeReferenceValidator: + """Implies that the value must be greater than the argument. + + Passing an `AttributeReferece` means that the value must be greater than the value on the referenced property of + the instance or solution. E.g. `Gt(InstanceReference("size"))` in a solution model implies that the value must be + greater than the size of the instance it solves. + + It can be used with any type that supports the ``>`` operator, + including numbers, dates and times, strings, sets, and so on. + """ + if isinstance(gt, AttributeReference): + return AttributeReferenceValidator(validators.greater_than_validator, gt) + else: + return at.Gt(gt) + + +@overload +def Ge(ge: SupportsGe) -> at.Ge: ... + + +@overload +def Ge(ge: AttributeReference) -> AttributeReferenceValidator: ... + + +def Ge(ge: SupportsGe | AttributeReference) -> at.Ge | AttributeReferenceValidator: + """Implies that the value must be greater than or equal to the argument. + + Passing an `AttributeReferece` means that the value must be greater than or equal to the value on the referenced + property of the instance or solution. E.g. `Ge(InstanceReference("size"))` in a solution model implies that the + value must be greater than or equal to the size of the instance it solves. + + It can be used with any type that supports the ``>=`` operator, + including numbers, dates and times, strings, sets, and so on. + """ + if isinstance(ge, AttributeReference): + return AttributeReferenceValidator(validators.greater_than_or_equal_validator, ge) + else: + return at.Ge(ge) + + +@overload +def Lt(lt: SupportsLt) -> at.Lt: ... + + +@overload +def Lt(lt: AttributeReference) -> AttributeReferenceValidator: ... + + +def Lt(lt: SupportsLt | AttributeReference) -> at.Lt | AttributeReferenceValidator: + """Implies that the value must be less than the argument. + + Passing an `AttributeReferece` means that the value must be less than the value on the referenced property of + the instance or solution. E.g. `Lt(InstanceReference("size"))` in a solution model implies that the value must be + less than the size of the instance it solves. + + It can be used with any type that supports the ``<`` operator, + including numbers, dates and times, strings, sets, and so on. + """ + if isinstance(lt, AttributeReference): + return AttributeReferenceValidator(validators.less_than_validator, lt) + else: + return at.Lt(lt) + + +@overload +def Le(le: SupportsLe) -> at.Le: ... + + +@overload +def Le(le: AttributeReference) -> AttributeReferenceValidator: ... + + +def Le(le: SupportsLe | AttributeReference) -> at.Le | AttributeReferenceValidator: + """Implies that the value must be less than or equal to the argument. + + Passing an `AttributeReferece` means that the value must be less than or equal to the value on the referenced + property of the instance or solution. E.g. `Le(InstanceReference("size"))` in a solution model implies that the + value must be less than or equal to the size of the instance it solves. + + It can be used with any type that supports the ``<=`` operator, + including numbers, dates and times, strings, sets, and so on. + """ + if isinstance(le, AttributeReference): + return AttributeReferenceValidator(validators.less_than_or_equal_validator, le) + else: + return at.Le(le) + + +@dataclass(frozen=True, kw_only=True, slots=True) +class Interval(GroupedMetadata): + """Interval can express inclusive or exclusive bounds with a single object. + + It accepts keyword arguments ``gt``, ``ge``, ``lt``, and/or ``le``, which + are interpreted the same way as the single-bound constraints. + """ + + gt: SupportsGt | AttributeReference | None = None + ge: SupportsGe | AttributeReference | None = None + lt: SupportsLt | AttributeReference | None = None + le: SupportsLe | AttributeReference | None = None + + def __iter__(self) -> Iterator[BaseMetadata | AttributeReferenceValidator]: + """Unpack an Interval into zero or more single-bounds.""" + if self.gt is not None: + yield Gt(self.gt) + if self.ge is not None: + yield Ge(self.ge) + if self.lt is not None: + yield Lt(self.lt) + if self.le is not None: + yield Le(self.le) + + +@overload +def MultipleOf(multiple_of: SupportsDiv | SupportsMod) -> at.MultipleOf: ... + + +@overload +def MultipleOf(multiple_of: AttributeReference) -> AttributeReferenceValidator: ... + + +def MultipleOf( + multiple_of: SupportsDiv | SupportsMod | AttributeReference, +) -> at.MultipleOf | AttributeReferenceValidator: + """Specifies `value % multiple_of == 0`.""" + if isinstance(multiple_of, AttributeReference): + return AttributeReferenceValidator(validators.multiple_of_validator, multiple_of) + else: + return at.MultipleOf(multiple_of) + + +@overload +def MinLen(min_length: Annotated[int, Ge(0)]) -> at.MinLen: ... + + +@overload +def MinLen(min_length: AttributeReference) -> AttributeReferenceValidator: ... + + +def MinLen(min_length: Annotated[int, Ge(0)] | AttributeReference) -> at.MinLen | AttributeReferenceValidator: + """Implies minimum inclusive length, i.e. `len(value) >= min_length`.""" + if isinstance(min_length, AttributeReference): + return AttributeReferenceValidator(validators.min_length_validator, min_length) + else: + return at.MinLen(min_length) + + +@overload +def MaxLen(max_length: Annotated[int, Ge(0)]) -> at.MaxLen: ... + + +@overload +def MaxLen(max_length: AttributeReference) -> AttributeReferenceValidator: ... + + +def MaxLen(max_length: Annotated[int, Ge(0)] | AttributeReference) -> at.MaxLen | AttributeReferenceValidator: + """Implies maximum inclusive length, i.e. `len(value) <= max_length`.""" + if isinstance(max_length, AttributeReference): + # pydantic impl is currently bugged + def max_length_validator(x: Any, max_length: Any) -> Any: + if not (len(x) <= max_length): + raise PydanticKnownError( + "too_long", + {"field_type": "Value", "max_length": max_length, "actual_length": len(x)}, + ) + return x + + return AttributeReferenceValidator(max_length_validator, max_length) + else: + return at.MaxLen(max_length) + + +@dataclass(frozen=True, slots=True) +class Len(GroupedMetadata): + """Implies `min_length <= len(value) <= max_length`. + + Upper bound may be omitted or ``None`` to indicate no upper length bound. + """ + + min_length: Annotated[int, Ge(0)] | AttributeReference = 0 + max_length: Annotated[int, Ge(0)] | AttributeReference | None = None + + def __iter__(self) -> Iterator[BaseMetadata | AttributeReferenceValidator]: + """Unpack a Len into one or more single-bounds.""" + if self.min_length != 0: + yield MinLen(self.min_length) + if self.max_length is not None: + yield MaxLen(self.max_length) + + +class UniqueItems: + """Specifies that the collection should contain no duplicates. + + Can only annotate Collection types. + """ + + @staticmethod + def __get_pydantic_core_schema__(source_type: Any, handler: GetCoreSchemaHandler) -> CoreSchema: + def _func(collection: Collection[Any]) -> Collection[Any]: + if len(collection) != len(set(collection)): + raise ValueError("Value contains duplicate elements") + return collection + + return no_info_after_validator_function(_func, handler(source_type)) + + @classmethod + def __get_pydantic_json_schema__(cls, core_schema: CoreSchema, handler: GetJsonSchemaHandler) -> JsonSchemaValue: + schema = handler(core_schema) + schema["uniqueItems"] = True + return schema + + +def In(attribute: AttributeReference) -> AttributeReferenceValidator: + """Specifies that the value should be `in` some collection.""" + + def validator(val: Any, attr: Any) -> Any: + if val not in attr: + raise ValueError(f"Value is not contained in collection {attribute}.") + return val + + return AttributeReferenceValidator(validator, attribute) + + +KeyOf = In +"""Specifies that the value should be the key of the referenced dict.""" + + +class IndexInto: + """Specifies that the value is a valid index into the Sequence. + + May be used an annotation to another type like this: `index: Annotated[i16, IndexInto(SelfRef.list)]`, + or as a bare type annotation `index: IndexInto[SelfRef.list]`. + """ + + def __new__(cls, attribute: AttributeReference) -> AttributeReferenceValidator: + def validator(val: Any, attr: Any) -> Any: + validators.greater_than_or_equal_validator(val, 0) + validators.less_than_validator(val, len(attr)) + return val + + return AttributeReferenceValidator(validator, attribute) + + @classmethod + def __class_getitem__(cls, key: AttributeReference, /) -> Annotated: + def validator(val: Any, attr: Any) -> Any: + validators.less_than_validator(val, len(attr)) + return val + + return Annotated[int, at.Ge(0), AttributeReferenceValidator(validator, key)] + + +# * Algobattle specific types + + +SizeIndex = Annotated[u64, at.Ge(0), Lt(InstanceRef.size)] +"""Specifies that the field is a valid index into a instance.size length sequence, i.e. 0 <= i < instance.size.""" + + +class SizeLen: + """Specifies that the collection has length `instance.size`. + + Can only annotate Sized types. + """ + + @staticmethod + def _func(v: Any, size: int) -> Any: + """Validates that the collection has length `instance.size`.""" + if len(v) != size: + raise ValueError("Value does not have length `instance.size`") + return v + + _validator = AttributeReferenceValidator(_func, InstanceRef.size) + + @classmethod + def __get_pydantic_core_schema__(cls, source_type: Any, handler: GetCoreSchemaHandler) -> CoreSchema: + return cls._validator.__get_pydantic_core_schema__(source_type, handler) + + +# * Graph classes + + +Vertex = SizeIndex +"""Type for vertices, encoded as numbers `0 <= v < instance.num_vertices`.""" + + +Edge = Annotated[int, IndexInto[InstanceRef.edges]] +"""Type for edges, encoded as indices into `instance.edges`.""" + + +def path_in_graph(path: list[Vertex], edge_set: set[tuple[Vertex, Vertex]]): + """Checks that a path actually exists in the graph.""" + for edge in pairwise(path): + if edge not in edge_set: + raise ValueError(f"The edge {edge} does not exist in the graph.") + + +Path = Annotated[list[Vertex], AttributeReferenceValidator(path_in_graph, InstanceRef.edge_set)] + + +class DirectedGraph(InstanceModel): + """Base instance class for problems on directed graphs.""" + + num_vertices: u64 + edges: Annotated[list[tuple[SizeIndex, SizeIndex]], UniqueItems] + + @property + def size(self) -> int: + """A graph's size is the number of vertices in it.""" + return self.num_vertices + + @cached_property + def edge_set(self) -> set[tuple[Vertex, Vertex]]: + """The set of edges in this graph.""" + return set(self.edges) + + @cache # ruff: ignore[cached-instance-method] + def neighbors(self, vertex: Vertex, direction: Literal["all", "outgoing", "incoming"] = "all") -> set[Vertex]: + """The neighbors of a vertex.""" + res = set[Vertex]() + if direction in {"all", "outgoing"}: + res |= {v for (u, v) in self.edges if u == vertex} + if direction in {"all", "incoming"}: + res |= {v for (v, u) in self.edges if u == vertex} + return res + + +class UndirectedGraph(DirectedGraph): + """Base instance class for problems on undirected graphs.""" + + def validate_instance(self): + """Validates that the graph is well formed and contains no self loops. + + Also brings it into a normal form where every edge {u, v} occurs exactly once in the list. + I.e. `[(0, 1), (1, 0), (1, 2)]` is accepted as valid and normalised to `[(0, 1), (1, 2)]`. + """ + super().validate_instance() + if any(u == v for u, v in self.edges): + raise ValidationError("Undirected graph contains self loops.") + + edge_set = set(self.edges) + if any(edge[::-1] in edge_set for edge in self.edges): + raise ValidationError("Undirected graph contains back and forth edges between two vertices.") + + @cached_property + def edge_set(self) -> set[tuple[Vertex, Vertex]]: + """The set of edges in this graph. + + Normalized to contain every edge in both directions. + """ + return set(self.edges) | {(v, u) for (u, v) in self.edges} + + @cache # ruff: ignore[cached-instance-method] + def neighbors(self, vertex: Vertex, direction: Literal["all", "outgoing", "incoming"] = "all") -> set[Vertex]: + """The neighbors of a vertex.""" + # more efficient specialization + + return {v for (u, v) in self.edge_set if u == vertex} + + +class EdgeLen: + """Specifies that the collection has the same length as `instance.edges`. + + Can only annotate Sized types. + """ + + @staticmethod + def _func(v: Any, edges: list[tuple[int, int]]) -> Any: + """Validates that the collection has the same length as `instance.edges`.""" + if len(v) != len(edges): + raise ValueError("Value does not have the same length as `instance.edges`") + return v + + _validator = AttributeReferenceValidator(_func, InstanceRef.edges) + + @classmethod + def __get_pydantic_core_schema__(cls, source_type: Any, handler: GetCoreSchemaHandler) -> CoreSchema: + return cls._validator.__get_pydantic_core_schema__(source_type, handler) + + +class EdgeWeights[Weight](DirectedGraph, BaseModel): + """Mixin for graphs with weighted edges.""" + + edge_weights: Annotated[list[Weight], EdgeLen] + + @cached_property + def edges_with_weights(self) -> Iterator[tuple[tuple[Vertex, Vertex], Weight]]: + """Iterate over all edges and their weights.""" + return zip(self.edges, self.edge_weights, strict=True) + + @cache # ruff: ignore[cached-instance-method] + def weight(self, edge: Edge | tuple[Vertex, Vertex]) -> Weight: + """Returns the weight of an edge. + + Raises KeyError if the given edge does not exist. + """ + if isinstance(edge, tuple): + try: + edge = self.edges.index(edge) + except ValueError as e: + if isinstance(self, UndirectedGraph): + try: + edge = self.edges.index((edge[1], edge[0])) + except ValueError as e: + raise KeyError from e + else: + raise KeyError from e + + return self.edge_weights[edge] + + +class VertexWeights[Weight](DirectedGraph, BaseModel): + """Mixin for graphs with weighted vertices.""" + + vertex_weights: Annotated[list[Weight], SizeLen] + + @cached_property + def vertices_with_weights(self) -> Iterator[tuple[Vertex, Weight]]: + """Iterate over all edges and their weights.""" + return enumerate(self.vertex_weights) + + +@dataclass(frozen=True, slots=True) +class LaxComp: + """Helper class to make forgiving float comparisons easy. + + When comparing floats for equality there often are frustrating edge cases introduced by its imprecisions. This can + lead to matches not being decided by which team generates better instances, but by who can craft the most finnicky + floating point values. This class lets you easily sidestep these problems. + + It implements comparison operations by adding a small epsilon that covers an allowable range of imprecision. The + solving team will receive twice the epsilon that the generating team was given. This means that the generator cannot + try to exploit imprecision issues since the solver has a bigger tolerance to play with. + + !!! example "Usage" + ```py + LaxComp(some_val ** 2, role) <= comparison_val + ``` + """ + + value: float + """The value that can be relaxed in the comparison.""" + role: Role + """Role of the program whose output is currently being validated.""" + + relative_epsilon: ClassVar[float] = 128 * float_info.epsilon + absolute_epsilon: ClassVar[float] = float_info.min + + def __eq__(self, other: object, /) -> bool: + if isinstance(other, (float, int, bool)): + other = float(other) + diff = abs(self.value - other) + norm = min(abs(self.value) + abs(other), float_info.max) + factor = 1 if self.role == Role.generator else 2 + return diff <= factor * max(self.absolute_epsilon, norm * self.relative_epsilon) + else: + return NotImplemented + + def __le__(self, other: float, /) -> bool: + return self.value <= other or self == other + + def __ge__(self, other: float, /) -> bool: + return self.value >= other or self == other + + +def lax_comp(value: float, cmp: Literal["<=", "==", ">="], other: float, role: Role) -> bool: + """Helper function to explicitly use the `LaxComp` comparison mechanism. + + Args: + value: First value to compare. + cmp: Comparison to perform, one of "<=", "==", or ">=". + other: Other value to compare. + role: Role of the program the values are being validated for. + + Returns: + Result of the comparison. + """ + val = LaxComp(value, role) + match cmp: + case "<=": + return val <= other + case "==": + return val == other + case ">=": + return val >= other diff --git a/algobattle/util.py b/src/algobattle/util.py similarity index 97% rename from algobattle/util.py rename to src/algobattle/util.py index 08b24a48..d741e016 100644 --- a/algobattle/util.py +++ b/src/algobattle/util.py @@ -1,258 +1,259 @@ -"""Module containung various utility definitions. - -In particular, the base classes :class:`BaseModel`, :class:`Encodable`, :class:`EncodableModel`, and exception classes. -""" -import json -import sys -from abc import ABC, abstractmethod -from dataclasses import dataclass -from datetime import datetime -from enum import StrEnum -from importlib.util import module_from_spec, spec_from_file_location -from pathlib import Path -from tempfile import TemporaryDirectory -from traceback import format_exception -from types import ModuleType -from typing import Any, LiteralString, Self, TypeVar - -from pydantic import BaseModel as PydandticBaseModel, ConfigDict, ValidationError as PydanticValidationError - - -class Role(StrEnum): - """Indicates whether the role of a program is to generate or to solve instances.""" - - generator = "generator" - solver = "solver" - - -class BaseModel(PydandticBaseModel): - """Base class for all pydantic models.""" - - model_config = ConfigDict(extra="forbid", from_attributes=True, hide_input_in_errors=True) - - -T = TypeVar("T") -ModelT = TypeVar("ModelT", bound=BaseModel) - - -class EncodableBase(ABC): - """Base for Encodable and Solution.""" - - @abstractmethod - def encode(self, target: Path, role: Role) -> None: - """Encodes the object onto the file system so that it can be passed to a program. - - Args: - target: Path to the location where the program expects the encoded data. :meth:`.encode` may either create - a single file at the target location, or an entire folder. If creating a single file, it may append a - file type ending to the path. It should not affect any other files or directories. - role: Role of the program that generated this data. - - Raises: - EncodingError: If the data cannot be properly encoded. - """ - raise NotImplementedError - - @classmethod - def io_schema(cls) -> str | None: - """Generates a schema specifying the I/O for this data. - - The schema should specify the structure of the data in the input and output files or folders. - In particular, the specification should match precisely what :meth`.decode` accepts, and the output of - :meth:`.encode` should comply with it. - - Returns: - The schema, or `None` to indicate no information about the expected shape of the data can be provided. - """ - return None - - -class Encodable(EncodableBase, ABC): - """Represents data that docker containers can interact with.""" - - @classmethod - @abstractmethod - def decode(cls, source: Path, max_size: int, role: Role) -> Self: - """Decodes the data found at the given path into a python object. - - Args: - source: Path to data that can be used to construct an instance of this class. May either point to a folder - or a single file. The expected type of path should be consistent with the result of :meth:`.encode`. - max_size: Maximum size the current battle allows. - role: Role of the program that generated this data. - - Raises: - EncodingError: If the data cannot be decoded into an instance. - - Returns: - The decoded object. - """ - raise NotImplementedError - - -class EncodableModelBase(BaseModel, EncodableBase, ABC): - """Base class for EncodableModel and SolutionModel.""" - - @staticmethod - def _decode(model_cls: type[ModelT], source: Path, **context: Any) -> ModelT: - """Internal method used by .decode to let Solutions also accept the corresponding instance.""" - if not source.with_suffix(".json").is_file(): - raise EncodingError("The json file does not exist.") - try: - text = source.with_suffix(".json").read_text() - return model_cls.model_validate_json(text, context=context) - except PydanticValidationError as e: - raise EncodingError("Json data does not fit the schema.", detail=str(e)) from e - except Exception as e: - raise EncodingError("Unknown error while decoding the data.", detail=str(e)) from e - - def encode(self, target: Path, role: Role) -> None: - """Uses pydantic to create a json representation of the object at the targeted file.""" - try: - target.with_suffix(".json").write_text(self.model_dump_json()) - except Exception as e: - raise EncodingError("Unkown error while encoding the data.", detail=str(e)) from e - - @classmethod - def io_schema(cls) -> str: - """Uses pydantic to generate a json schema for this class.""" - return json.dumps(cls.model_json_schema(), indent=4) - - -class EncodableModel(EncodableModelBase, ABC): - """Problem data that can easily be encoded into and decoded from json files.""" - - @classmethod - def decode(cls, source: Path, max_size: int, role: Role) -> Self: - """Uses pydantic to create a python object from a `.json` file.""" - return cls._decode(cls, source, max_size=max_size, role=role) - - -@dataclass -class RunningTimer: - """Basic data holding info on a currently running timer.""" - - start: datetime - timeout: float | None - - -class AlgobattleBaseException(Exception): - """Base exception class for errors used by the algobattle package.""" - - def __init__(self, message: LiteralString, *, detail: str | list[str] | list[dict[str, Any]] | None = None) -> None: - """Base exception class for errors used by the algobattle package. - - Args: - message: Simple error message that can always be displayed. - detail: More detailed error message that may include sensitive information. - """ - self.message = message - self.detail = detail - super().__init__() - - -class EncodingError(AlgobattleBaseException): - """Indicates that the given data could not be encoded or decoded properly.""" - - -class ValidationError(AlgobattleBaseException): - """Indicates that the decoded problem instance or solution is invalid.""" - - -class BuildError(AlgobattleBaseException): - """Indicates that the build process could not be completed successfully.""" - - -class ExecutionError(AlgobattleBaseException): - """Indicates that the program could not be executed successfully.""" - - def __init__(self, message: LiteralString, *, detail: str | None = None, runtime: float) -> None: - """Indicates that the program could not be executed successfully. - - Args: - message: Simple error message that can always be displayed. - runtime: Runtime of the program in seconds until the error occured. - detail: More detailed error message that may include sensitive information. - """ - self.runtime = runtime - super().__init__(message, detail=detail) - - -class ExecutionTimeout(ExecutionError): - """Indicates that the program ran into the timeout.""" - - -class DockerError(AlgobattleBaseException): - """Indicates that an issue with the docker daemon occured.""" - - -class DockerNotRunning(BaseException): - """Indicates that the Docker Daemon is not running.""" - - -class ExceptionInfo(BaseModel): - """Details about an exception that was raised.""" - - type: str - message: str - detail: str | list[str] | list[dict[str, Any]] | None = None - - @classmethod - def from_exception(cls, error: Exception) -> Self: - """Constructs an instance from a raised exception.""" - if isinstance(error, AlgobattleBaseException): - return cls( - type=error.__class__.__name__, - message=error.message, - detail=error.detail, - ) - elif isinstance(error, PydanticValidationError): - return cls( - type=error.__class__.__name__, - message=str(error), - detail=str(error.errors(include_input=True, include_url=False)), - ) - else: - return cls( - type=error.__class__.__name__, - message="Unknown exception occurred.", - detail=format_exception(error), - ) - - -class TempDir(TemporaryDirectory): - """Python's `TemporaryDirectory` but with a contextmanager returning a Path.""" - - def __enter__(self) -> Path: - return Path(super().__enter__()) - - -def timestamp() -> str: - """Formats the current time into a filename-safe string.""" - t = datetime.now() - return f"{t.year:04d}-{t.month:02d}-{t.day:02d}_{t.hour:02d}-{t.minute:02d}-{t.second:02d}" - - -def import_file_as_module(path: Path, name: str) -> ModuleType: - """Imports a file as a module. - - Args: - path: A path to a python file. - - Raises: - ValueError: If the path doesn't point to a module - RuntimeError: If the file cannot be imported properly - """ - if not path.is_file(): - raise ValueError(f"'{path}' does not point to a python file or a proper parent folder of one.") - - try: - spec = spec_from_file_location(name, path) - assert spec is not None - assert spec.loader is not None - module = module_from_spec(spec) - sys.modules[spec.name] = module - spec.loader.exec_module(module) - except Exception as e: - raise RuntimeError from e - return module +"""Module containung various utility definitions. + +In particular, the base classes :class:`BaseModel`, :class:`Encodable`, :class:`EncodableModel`, and exception classes. +""" + +import json +import sys +from abc import ABC, abstractmethod +from dataclasses import dataclass +from datetime import datetime +from enum import StrEnum +from importlib.util import module_from_spec, spec_from_file_location +from pathlib import Path +from tempfile import TemporaryDirectory +from traceback import format_exception +from types import ModuleType +from typing import Any, LiteralString, Self, TypeVar + +from pydantic import BaseModel as PydandticBaseModel, ConfigDict, ValidationError as PydanticValidationError + + +class Role(StrEnum): + """Indicates whether the role of a program is to generate or to solve instances.""" + + generator = "generator" + solver = "solver" + + +class BaseModel(PydandticBaseModel): + """Base class for all pydantic models.""" + + model_config = ConfigDict(extra="forbid", from_attributes=True, hide_input_in_errors=True) + + +T = TypeVar("T") +ModelT = TypeVar("ModelT", bound=BaseModel) + + +class EncodableBase(ABC): + """Base for Encodable and Solution.""" + + @abstractmethod + def encode(self, target: Path, role: Role) -> None: + """Encodes the object onto the file system so that it can be passed to a program. + + Args: + target: Path to the location where the program expects the encoded data. :meth:`.encode` may either create + a single file at the target location, or an entire folder. If creating a single file, it may append a + file type ending to the path. It should not affect any other files or directories. + role: Role of the program that generated this data. + + Raises: + EncodingError: If the data cannot be properly encoded. + """ + raise NotImplementedError + + @classmethod + def io_schema(cls) -> str | None: + """Generates a schema specifying the I/O for this data. + + The schema should specify the structure of the data in the input and output files or folders. + In particular, the specification should match precisely what :meth`.decode` accepts, and the output of + :meth:`.encode` should comply with it. + + Returns: + The schema, or `None` to indicate no information about the expected shape of the data can be provided. + """ + return None + + +class Encodable(EncodableBase, ABC): + """Represents data that docker containers can interact with.""" + + @classmethod + @abstractmethod + def decode(cls, source: Path, max_size: int, role: Role) -> Self: + """Decodes the data found at the given path into a python object. + + Args: + source: Path to data that can be used to construct an instance of this class. May either point to a folder + or a single file. The expected type of path should be consistent with the result of :meth:`.encode`. + max_size: Maximum size the current battle allows. + role: Role of the program that generated this data. + + Raises: + EncodingError: If the data cannot be decoded into an instance. + + Returns: + The decoded object. + """ + raise NotImplementedError + + +class EncodableModelBase(BaseModel, EncodableBase, ABC): + """Base class for EncodableModel and SolutionModel.""" + + @staticmethod + def _decode(model_cls: type[ModelT], source: Path, **context: Any) -> ModelT: + """Internal method used by .decode to let Solutions also accept the corresponding instance.""" + if not source.with_suffix(".json").is_file(): + raise EncodingError("The json file does not exist.") + try: + text = source.with_suffix(".json").read_text() + return model_cls.model_validate_json(text, context=context) + except PydanticValidationError as e: + raise EncodingError("Json data does not fit the schema.", detail=str(e)) from e + except Exception as e: + raise EncodingError("Unknown error while decoding the data.", detail=str(e)) from e + + def encode(self, target: Path, role: Role) -> None: + """Uses pydantic to create a json representation of the object at the targeted file.""" + try: + target.with_suffix(".json").write_text(self.model_dump_json()) + except Exception as e: + raise EncodingError("Unkown error while encoding the data.", detail=str(e)) from e + + @classmethod + def io_schema(cls) -> str: + """Uses pydantic to generate a json schema for this class.""" + return json.dumps(cls.model_json_schema(), indent=4) + + +class EncodableModel(EncodableModelBase, ABC): + """Problem data that can easily be encoded into and decoded from json files.""" + + @classmethod + def decode(cls, source: Path, max_size: int, role: Role) -> Self: + """Uses pydantic to create a python object from a `.json` file.""" + return cls._decode(cls, source, max_size=max_size, role=role) + + +@dataclass +class RunningTimer: + """Basic data holding info on a currently running timer.""" + + start: datetime + timeout: float | None + + +class AlgobattleBaseException(Exception): + """Base exception class for errors used by the algobattle package.""" + + def __init__(self, message: LiteralString, *, detail: str | list[str] | list[dict[str, Any]] | None = None) -> None: + """Base exception class for errors used by the algobattle package. + + Args: + message: Simple error message that can always be displayed. + detail: More detailed error message that may include sensitive information. + """ + self.message = message + self.detail = detail + super().__init__() + + +class EncodingError(AlgobattleBaseException): + """Indicates that the given data could not be encoded or decoded properly.""" + + +class ValidationError(AlgobattleBaseException): + """Indicates that the decoded problem instance or solution is invalid.""" + + +class BuildError(AlgobattleBaseException): + """Indicates that the build process could not be completed successfully.""" + + +class ExecutionError(AlgobattleBaseException): + """Indicates that the program could not be executed successfully.""" + + def __init__(self, message: LiteralString, *, detail: str | None = None, runtime: float) -> None: + """Indicates that the program could not be executed successfully. + + Args: + message: Simple error message that can always be displayed. + runtime: Runtime of the program in seconds until the error occured. + detail: More detailed error message that may include sensitive information. + """ + self.runtime = runtime + super().__init__(message, detail=detail) + + +class ExecutionTimeout(ExecutionError): + """Indicates that the program ran into the timeout.""" + + +class DockerError(AlgobattleBaseException): + """Indicates that an issue with the docker daemon occured.""" + + +class DockerNotRunning(BaseException): + """Indicates that the Docker Daemon is not running.""" + + +class ExceptionInfo(BaseModel): + """Details about an exception that was raised.""" + + type: str + message: str + detail: str | list[str] | list[dict[str, Any]] | None = None + + @classmethod + def from_exception(cls, error: Exception) -> Self: + """Constructs an instance from a raised exception.""" + if isinstance(error, AlgobattleBaseException): + return cls( + type=error.__class__.__name__, + message=error.message, + detail=error.detail, + ) + elif isinstance(error, PydanticValidationError): + return cls( + type=error.__class__.__name__, + message=str(error), + detail=str(error.errors(include_input=True, include_url=False)), + ) + else: + return cls( + type=error.__class__.__name__, + message="Unknown exception occurred.", + detail=format_exception(error), + ) + + +class TempDir(TemporaryDirectory): + """Python's `TemporaryDirectory` but with a contextmanager returning a Path.""" + + def __enter__(self) -> Path: + return Path(super().__enter__()) + + +def timestamp() -> str: + """Formats the current time into a filename-safe string.""" + t = datetime.now() + return f"{t.year:04d}-{t.month:02d}-{t.day:02d}_{t.hour:02d}-{t.minute:02d}-{t.second:02d}" + + +def import_file_as_module(path: Path, name: str) -> ModuleType: + """Imports a file as a module. + + Args: + path: A path to a python file. + + Raises: + ValueError: If the path doesn't point to a module + RuntimeError: If the file cannot be imported properly + """ + if not path.is_file(): + raise ValueError(f"'{path}' does not point to a python file or a proper parent folder of one.") + + try: + spec = spec_from_file_location(name, path) + assert spec is not None + assert spec.loader is not None + module = module_from_spec(spec) + sys.modules[spec.name] = module + spec.loader.exec_module(module) + except Exception as e: + raise RuntimeError from e + return module diff --git a/tests/test_battles.py b/tests/test_battles.py index a4a7e64f..cbba9520 100644 --- a/tests/test_battles.py +++ b/tests/test_battles.py @@ -5,7 +5,7 @@ from itertools import chain, cycle from pathlib import Path from types import EllipsisType -from typing import Any, TypeVar, Unpack, cast +from typing import Any, Unpack, cast from unittest import IsolatedAsyncioTestCase, TestCase, main from uuid import uuid4 @@ -15,10 +15,8 @@ from algobattle.util import Encodable, ExceptionInfo, Role, TempDir from tests.testsproblem.problem import TestInstance, TestSolution -T = TypeVar("T") - -def always(val: T) -> "cycle[T]": +def always[T](val: T) -> cycle[T]: """Shorthand for an iterator always yielding a single value.""" return cycle([val]) diff --git a/tests/test_docker.py b/tests/test_docker.py index 6c432a1b..5421d080 100644 --- a/tests/test_docker.py +++ b/tests/test_docker.py @@ -1,5 +1,9 @@ """Tests for all docker functions.""" + +from collections.abc import Generator as PyGenerator +from contextlib import contextmanager from pathlib import Path +from time import time from unittest import IsolatedAsyncioTestCase, main as run_tests from algobattle.match import AlgobattleConfig, MatchConfig, RunConfig @@ -10,6 +14,15 @@ from .testsproblem.problem import TestInstance, TestProblem, TestSolution +@contextmanager +def run_within(seconds: float) -> PyGenerator[None]: + start = time() + try: + yield + finally: + assert time() - start <= seconds + + class ProgramTests(IsolatedAsyncioTestCase): """Tests for the Program functions.""" @@ -39,7 +52,7 @@ async def test_build_error(self): async def test_build_timeout(self): """A container's build step times out.""" config = AlgobattleConfig(match=MatchConfig(problem="Test Problem", build_timeout=1.5)).as_prog_config() - with self.assertRaises(BuildError, msg="Build ran into a timeout."): + with self.assertRaises(BuildError, msg="Build ran into a timeout."), run_within(2): await Generator.build(path=self.problem_path / "build_timeout", problem=TestProblem, config=config) async def test_gen_lax_timeout(self): @@ -47,7 +60,8 @@ async def test_gen_lax_timeout(self): with await Generator.build( path=self.problem_path / "generator_timeout", problem=TestProblem, config=self.config_short ) as gen: - res = await gen.run(5) + with run_within(2.5): + res = await gen.run(5) self.assertIsNone(res.error) async def test_gen_strict_timeout(self): @@ -57,7 +71,8 @@ async def test_gen_strict_timeout(self): problem=TestProblem, config=self.config_strict, ) as gen: - res = await gen.run(5) + with run_within(2.5): + res = await gen.run(5) assert res.error is not None self.assertEqual(res.error.type, "ExecutionTimeout") @@ -102,7 +117,8 @@ async def test_sol_strict_timeout(self): with await Solver.build( path=self.problem_path / "solver_timeout", problem=TestProblem, config=self.config_strict ) as sol: - res = await sol.run(self.instance, 5) + with run_within(2.5): + res = await sol.run(self.instance, 5) assert res.error is not None self.assertEqual(res.error.type, "ExecutionTimeout") @@ -111,7 +127,8 @@ async def test_sol_lax_timeout(self): with await Solver.build( path=self.problem_path / "solver_timeout", problem=TestProblem, config=self.config_short ) as sol: - res = await sol.run(self.instance, 5) + with run_within(2.5): + res = await sol.run(self.instance, 5) self.assertIsNone(res.error) async def test_sol_exec_err(self): diff --git a/tests/test_match.py b/tests/test_match.py index c1619b1a..1a31433a 100644 --- a/tests/test_match.py +++ b/tests/test_match.py @@ -1,4 +1,5 @@ """Tests for the Match class.""" + # pyright: reportMissingSuperCall=false from pathlib import Path from typing import Any @@ -58,10 +59,10 @@ def setUpClass(cls) -> None: "active_teams": [cls.team0.name, cls.team1.name], "excluded_teams": {}, } - cls.iterated_kwargs = team_dict | { + cls.iterated_kwargs: dict[str, Any] = team_dict | { "config": AlgobattleConfig(match=MatchConfig(problem="TestProblem", battle=Iterated.Config())), } - cls.averated_kwargs = team_dict | { + cls.averated_kwargs: dict[str, Any] = team_dict | { "config": AlgobattleConfig(match=MatchConfig(problem="TestProblem", battle=Averaged.Config())), } cls.teams = TeamHandler([cls.team0, cls.team1]) diff --git a/tests/test_types.py b/tests/test_types.py index 7de1ec74..e56bd509 100644 --- a/tests/test_types.py +++ b/tests/test_types.py @@ -1,4 +1,5 @@ """Tests for pydantic parsing types.""" + from typing import Annotated, Any from unittest import TestCase, main from unittest.util import safe_repr diff --git a/tests/test_util.py b/tests/test_util.py index 2548619d..ecb4562f 100644 --- a/tests/test_util.py +++ b/tests/test_util.py @@ -1,4 +1,5 @@ """Tests for all util functions.""" + import unittest from math import inf diff --git a/uv.lock b/uv.lock index fd46aa9d..715c1a37 100644 --- a/uv.lock +++ b/uv.lock @@ -1,10 +1,10 @@ version = 1 revision = 3 -requires-python = ">=3.11" +requires-python = ">=3.14" [[package]] name = "algobattle-base" -version = "4.3.4" +version = "4.3.5" source = { editable = "." } dependencies = [ { name = "anyio" }, @@ -16,7 +16,7 @@ dependencies = [ { name = "typing-extensions" }, ] -[package.optional-dependencies] +[package.dev-dependencies] dev = [ { name = "mdx-include" }, { name = "mkdocs" }, @@ -28,140 +28,188 @@ dev = [ [package.metadata] requires-dist = [ - { name = "anyio", specifier = ">=4.11.0" }, - { name = "docker", specifier = ">=7.1.0" }, + { name = "anyio", specifier = ">=4.15.1" }, + { name = "docker", specifier = ">=7.2.0" }, { name = "jinja2", specifier = ">=3.1.6" }, - { name = "mdx-include", marker = "extra == 'dev'", specifier = ">=1.4.2" }, - { name = "mkdocs", marker = "extra == 'dev'", specifier = ">=1.5.3" }, - { name = "mkdocs-material", marker = "extra == 'dev'", specifier = ">=9.5.3" }, - { name = "mkdocstrings", extras = ["python"], marker = "extra == 'dev'", specifier = ">=0.24.0" }, - { name = "pydantic", specifier = ">=2.11.9" }, - { name = "pymdown-extensions", marker = "extra == 'dev'", specifier = ">=10.7" }, - { name = "ruff", marker = "extra == 'dev'", specifier = ">=0.13.2" }, - { name = "tomlkit", specifier = ">=0.13.3" }, - { name = "typer", specifier = ">=0.19.2" }, - { name = "typing-extensions", specifier = ">=4.15.0" }, + { name = "pydantic", specifier = ">=2.13.5" }, + { name = "tomlkit", specifier = ">=0.15.1" }, + { name = "typer", specifier = ">=0.27.2" }, + { name = "typing-extensions", specifier = ">=4.16.0" }, +] + +[package.metadata.requires-dev] +dev = [ + { name = "mdx-include", specifier = ">=1.4.2" }, + { name = "mkdocs", specifier = ">=1.5.3" }, + { name = "mkdocs-material", specifier = ">=9.5.3" }, + { name = "mkdocstrings", extras = ["python"], specifier = ">=0.24.0" }, + { name = "pymdown-extensions", specifier = ">=10.7" }, + { name = "ruff", specifier = ">=0.16.8" }, +] + +[[package]] +name = "annotated-doc" +version = "0.0.5" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/5a/8e/38aa427ed5402449e226975b649c5dc73ccadfefeb95e6aecb8f8ea4b6b6/annotated_doc-0.0.5.tar.gz", hash = "sha256:c7e58ce09192557605d8bbd92836d7e1d520ac9580096042c0bfd197efacf1bb", size = 10758, upload-time = "2026-07-28T13:50:58.129Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/3e/30/e900b21425a860e195f32e37657aa1f7c7f2b1bfb26f03ca209b90933c06/annotated_doc-0.0.5-py3-none-any.whl", hash = "sha256:117bac03a25ede5df5440e855b32d556049ca169ead221505badf432fed4b101", size = 5302, upload-time = "2026-07-28T13:50:57.239Z" }, ] -provides-extras = ["dev"] [[package]] name = "annotated-types" -version = "0.7.0" +version = "0.8.0" source = { registry = "https://pypi.org/simple" } -sdist = { url = "https://files.pythonhosted.org/packages/ee/67/531ea369ba64dcff5ec9c3402f9f51bf748cec26dde048a2f973a4eea7f5/annotated_types-0.7.0.tar.gz", hash = "sha256:aff07c09a53a08bc8cfccb9c85b05f1aa9a2a6f23728d790723543408344ce89", size = 16081, upload-time = "2024-05-20T21:33:25.928Z" } +sdist = { url = "https://files.pythonhosted.org/packages/5f/56/a8120250d128bed162cd73c76d45f6ef9991f3e068f62a8ee060afa3104a/annotated_types-0.8.0.tar.gz", hash = "sha256:13b2beaad985e05e2d6407ee4c4f35590b11f8d693a258a561055cac8f64cab7", size = 15893, upload-time = "2026-07-23T20:16:13.995Z" } wheels = [ - { url = "https://files.pythonhosted.org/packages/78/b6/6307fbef88d9b5ee7421e68d78a9f162e0da4900bc5f5793f6d3d0e34fb8/annotated_types-0.7.0-py3-none-any.whl", hash = "sha256:1f02e8b43a8fbbc3f3e0d4f0f4bfc8131bcb4eebe8849b8e5c773f3a1c582a53", size = 13643, upload-time = "2024-05-20T21:33:24.1Z" }, + { url = "https://files.pythonhosted.org/packages/99/91/8acff4f5e50511b911bbccb72b8628a49c68ce14148cd9f6431094859a90/annotated_types-0.8.0-py3-none-any.whl", hash = "sha256:f072f4d804ea359e4eaf198b1af7a8b0943881a87f31bb764f8bf219bb9419e0", size = 13427, upload-time = "2026-07-23T20:16:12.938Z" }, ] [[package]] name = "anyio" -version = "4.11.0" +version = "4.15.1" source = { registry = "https://pypi.org/simple" } dependencies = [ { name = "idna" }, - { name = "sniffio" }, - { name = "typing-extensions", marker = "python_full_version < '3.13'" }, + { name = "typing-extensions", marker = "python_full_version < '3.15'" }, ] -sdist = { url = "https://files.pythonhosted.org/packages/c6/78/7d432127c41b50bccba979505f272c16cbcadcc33645d5fa3a738110ae75/anyio-4.11.0.tar.gz", hash = "sha256:82a8d0b81e318cc5ce71a5f1f8b5c4e63619620b63141ef8c995fa0db95a57c4", size = 219094, upload-time = "2025-09-23T09:19:12.58Z" } +sdist = { url = "https://files.pythonhosted.org/packages/a9/d2/f4d173e22df740bc37b1db102b386ba719b66e95b0f0d751f556b387e6d2/anyio-4.15.1.tar.gz", hash = "sha256:9f28306018cbd6d329e64a36d58256edff76dd996fe423bc957326e578b82a94", size = 276966, upload-time = "2026-09-05T10:42:39.44Z" } wheels = [ - { url = "https://files.pythonhosted.org/packages/15/b3/9b1a8074496371342ec1e796a96f99c82c945a339cd81a8e73de28b4cf9e/anyio-4.11.0-py3-none-any.whl", hash = "sha256:0287e96f4d26d4149305414d4e3bc32f0dcd0862365a4bddea19d7a1ec38c4fc", size = 109097, upload-time = "2025-09-23T09:19:10.601Z" }, + { url = "https://files.pythonhosted.org/packages/12/b8/4bd346e22b28902df4d651910f5242c28d84e4a5c2435ca5c3f797ed7e2e/anyio-4.15.1-py3-none-any.whl", hash = "sha256:6152fdbbf9a77fdec97731721bebf7c4c44f7c29b424b0065826173efc7ed101", size = 132079, upload-time = "2026-09-05T10:42:37.923Z" }, ] [[package]] name = "babel" -version = "2.17.0" +version = "2.18.0" source = { registry = "https://pypi.org/simple" } -sdist = { url = "https://files.pythonhosted.org/packages/7d/6b/d52e42361e1aa00709585ecc30b3f9684b3ab62530771402248b1b1d6240/babel-2.17.0.tar.gz", hash = "sha256:0c54cffb19f690cdcc52a3b50bcbf71e07a808d1c80d549f2459b9d2cf0afb9d", size = 9951852, upload-time = "2025-02-01T15:17:41.026Z" } +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/b7/b8/3fe70c75fe32afc4bb507f75563d39bc5642255d1d94f1f23604725780bf/babel-2.17.0-py3-none-any.whl", hash = "sha256:4d0b53093fdfb4b21c92b5213dba5a1b23885afa8383709427046b21c366e5f2", size = 10182537, upload-time = "2025-02-01T15:17:37.39Z" }, + { 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 = "backrefs" -version = "5.9" +version = "8.0" source = { registry = "https://pypi.org/simple" } -sdist = { url = "https://files.pythonhosted.org/packages/eb/a7/312f673df6a79003279e1f55619abbe7daebbb87c17c976ddc0345c04c7b/backrefs-5.9.tar.gz", hash = "sha256:808548cb708d66b82ee231f962cb36faaf4f2baab032f2fbb783e9c2fdddaa59", size = 5765857, upload-time = "2025-06-22T19:34:13.97Z" } +sdist = { url = "https://files.pythonhosted.org/packages/ec/56/4744bcd0c82184e80c52b0ac4076c261a8ffa1f1b343ff2f6e89ce0e1cef/backrefs-8.0.tar.gz", hash = "sha256:b556cd7d36c3a3a2f256b89590b176b8eddfb73bcfaee3a3ddd84ea66d21ce50", size = 7013081, upload-time = "2026-07-26T19:54:24.638Z" } wheels = [ - { url = "https://files.pythonhosted.org/packages/19/4d/798dc1f30468134906575156c089c492cf79b5a5fd373f07fe26c4d046bf/backrefs-5.9-py310-none-any.whl", hash = "sha256:db8e8ba0e9de81fcd635f440deab5ae5f2591b54ac1ebe0550a2ca063488cd9f", size = 380267, upload-time = "2025-06-22T19:34:05.252Z" }, - { url = "https://files.pythonhosted.org/packages/55/07/f0b3375bf0d06014e9787797e6b7cc02b38ac9ff9726ccfe834d94e9991e/backrefs-5.9-py311-none-any.whl", hash = "sha256:6907635edebbe9b2dc3de3a2befff44d74f30a4562adbb8b36f21252ea19c5cf", size = 392072, upload-time = "2025-06-22T19:34:06.743Z" }, - { url = "https://files.pythonhosted.org/packages/9d/12/4f345407259dd60a0997107758ba3f221cf89a9b5a0f8ed5b961aef97253/backrefs-5.9-py312-none-any.whl", hash = "sha256:7fdf9771f63e6028d7fee7e0c497c81abda597ea45d6b8f89e8ad76994f5befa", size = 397947, upload-time = "2025-06-22T19:34:08.172Z" }, - { url = "https://files.pythonhosted.org/packages/10/bf/fa31834dc27a7f05e5290eae47c82690edc3a7b37d58f7fb35a1bdbf355b/backrefs-5.9-py313-none-any.whl", hash = "sha256:cc37b19fa219e93ff825ed1fed8879e47b4d89aa7a1884860e2db64ccd7c676b", size = 399843, upload-time = "2025-06-22T19:34:09.68Z" }, - { url = "https://files.pythonhosted.org/packages/fc/24/b29af34b2c9c41645a9f4ff117bae860291780d73880f449e0b5d948c070/backrefs-5.9-py314-none-any.whl", hash = "sha256:df5e169836cc8acb5e440ebae9aad4bf9d15e226d3bad049cf3f6a5c20cc8dc9", size = 411762, upload-time = "2025-06-22T19:34:11.037Z" }, - { url = "https://files.pythonhosted.org/packages/41/ff/392bff89415399a979be4a65357a41d92729ae8580a66073d8ec8d810f98/backrefs-5.9-py39-none-any.whl", hash = "sha256:f48ee18f6252b8f5777a22a00a09a85de0ca931658f1dd96d4406a34f3748c60", size = 380265, upload-time = "2025-06-22T19:34:12.405Z" }, + { url = "https://files.pythonhosted.org/packages/e3/fd/9bf53b6a6f6f519ffaac765df2f2a25e5c2fc6d32cfd2b2747099e72c911/backrefs-8.0-py310-none-any.whl", hash = "sha256:4a627b817fd2dce43b79ab48da63613340509381cd8ce0897078a0bce79a2ab8", size = 380377, upload-time = "2026-07-26T19:54:17.457Z" }, + { url = "https://files.pythonhosted.org/packages/e1/29/4bd7ae72a2634da00379c2b3bcc5439e7c94620235c6afea8af15229a973/backrefs-8.0-py311-none-any.whl", hash = "sha256:f0c35cf0102ba6b6070c12a492be3c1c1d3f5839529784b9a9565d6d04569a01", size = 392169, upload-time = "2026-07-26T19:54:18.782Z" }, + { url = "https://files.pythonhosted.org/packages/29/13/232505664e8e2a0c7a2eb0c505cfade9d715538f89a5d62bc4c272968f62/backrefs-8.0-py312-none-any.whl", hash = "sha256:87f0fae8c5f207fe9f4b2887efc71d42f4900ac78faa1af08d675ef303692dc5", size = 398084, upload-time = "2026-07-26T19:54:19.954Z" }, + { url = "https://files.pythonhosted.org/packages/8a/69/47a3dc20abc4fa5486655fde681bd55e63211b46c886d8c02223d6468431/backrefs-8.0-py313-none-any.whl", hash = "sha256:601ce68ca12385dbda06ce264406b4c4210cf5b79fd0fd627592365c92f29a88", size = 400040, upload-time = "2026-07-26T19:54:21.194Z" }, + { url = "https://files.pythonhosted.org/packages/1c/cf/e5f9b68a5b0e939a2fb933a66c20180d0c9241bf8927f7a47fa48c1675e9/backrefs-8.0-py314-none-any.whl", hash = "sha256:9ec96efa080938be92323e8e730e57718c9c88eb15ad70bbef4e1766df591408", size = 411903, upload-time = "2026-07-26T19:54:23.221Z" }, ] [[package]] name = "certifi" -version = "2025.8.3" +version = "2026.7.22" source = { registry = "https://pypi.org/simple" } -sdist = { url = "https://files.pythonhosted.org/packages/dc/67/960ebe6bf230a96cda2e0abcf73af550ec4f090005363542f0765df162e0/certifi-2025.8.3.tar.gz", hash = "sha256:e564105f78ded564e3ae7c923924435e1daa7463faeab5bb932bc53ffae63407", size = 162386, upload-time = "2025-08-03T03:07:47.08Z" } +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/e5/48/1549795ba7742c948d2ad169c1c8cdbae65bc450d6cd753d124b17c8cd32/certifi-2025.8.3-py3-none-any.whl", hash = "sha256:f6c12493cfb1b06ba2ff328595af9350c65d6644968e5d3a2ffd78699af217a5", size = 161216, upload-time = "2025-08-03T03:07:45.777Z" }, + { 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 = "charset-normalizer" -version = "3.4.3" -source = { registry = "https://pypi.org/simple" } -sdist = { url = "https://files.pythonhosted.org/packages/83/2d/5fd176ceb9b2fc619e63405525573493ca23441330fcdaee6bef9460e924/charset_normalizer-3.4.3.tar.gz", hash = "sha256:6fce4b8500244f6fcb71465d4a4930d132ba9ab8e71a7859e6a5d59851068d14", size = 122371, upload-time = "2025-08-09T07:57:28.46Z" } -wheels = [ - { url = "https://files.pythonhosted.org/packages/7f/b5/991245018615474a60965a7c9cd2b4efbaabd16d582a5547c47ee1c7730b/charset_normalizer-3.4.3-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:b256ee2e749283ef3ddcff51a675ff43798d92d746d1a6e4631bf8c707d22d0b", size = 204483, upload-time = "2025-08-09T07:55:53.12Z" }, - { url = "https://files.pythonhosted.org/packages/c7/2a/ae245c41c06299ec18262825c1569c5d3298fc920e4ddf56ab011b417efd/charset_normalizer-3.4.3-cp311-cp311-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:13faeacfe61784e2559e690fc53fa4c5ae97c6fcedb8eb6fb8d0a15b475d2c64", size = 145520, upload-time = "2025-08-09T07:55:54.712Z" }, - { url = "https://files.pythonhosted.org/packages/3a/a4/b3b6c76e7a635748c4421d2b92c7b8f90a432f98bda5082049af37ffc8e3/charset_normalizer-3.4.3-cp311-cp311-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:00237675befef519d9af72169d8604a067d92755e84fe76492fef5441db05b91", size = 158876, upload-time = "2025-08-09T07:55:56.024Z" }, - { url = "https://files.pythonhosted.org/packages/e2/e6/63bb0e10f90a8243c5def74b5b105b3bbbfb3e7bb753915fe333fb0c11ea/charset_normalizer-3.4.3-cp311-cp311-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:585f3b2a80fbd26b048a0be90c5aae8f06605d3c92615911c3a2b03a8a3b796f", size = 156083, upload-time = "2025-08-09T07:55:57.582Z" }, - { url = "https://files.pythonhosted.org/packages/87/df/b7737ff046c974b183ea9aa111b74185ac8c3a326c6262d413bd5a1b8c69/charset_normalizer-3.4.3-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:0e78314bdc32fa80696f72fa16dc61168fda4d6a0c014e0380f9d02f0e5d8a07", size = 150295, upload-time = "2025-08-09T07:55:59.147Z" }, - { url = "https://files.pythonhosted.org/packages/61/f1/190d9977e0084d3f1dc169acd060d479bbbc71b90bf3e7bf7b9927dec3eb/charset_normalizer-3.4.3-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:96b2b3d1a83ad55310de8c7b4a2d04d9277d5591f40761274856635acc5fcb30", size = 148379, upload-time = "2025-08-09T07:56:00.364Z" }, - { url = "https://files.pythonhosted.org/packages/4c/92/27dbe365d34c68cfe0ca76f1edd70e8705d82b378cb54ebbaeabc2e3029d/charset_normalizer-3.4.3-cp311-cp311-musllinux_1_2_ppc64le.whl", hash = "sha256:939578d9d8fd4299220161fdd76e86c6a251987476f5243e8864a7844476ba14", size = 160018, upload-time = "2025-08-09T07:56:01.678Z" }, - { url = "https://files.pythonhosted.org/packages/99/04/baae2a1ea1893a01635d475b9261c889a18fd48393634b6270827869fa34/charset_normalizer-3.4.3-cp311-cp311-musllinux_1_2_s390x.whl", hash = "sha256:fd10de089bcdcd1be95a2f73dbe6254798ec1bda9f450d5828c96f93e2536b9c", size = 157430, upload-time = "2025-08-09T07:56:02.87Z" }, - { url = "https://files.pythonhosted.org/packages/2f/36/77da9c6a328c54d17b960c89eccacfab8271fdaaa228305330915b88afa9/charset_normalizer-3.4.3-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:1e8ac75d72fa3775e0b7cb7e4629cec13b7514d928d15ef8ea06bca03ef01cae", size = 151600, upload-time = "2025-08-09T07:56:04.089Z" }, - { url = "https://files.pythonhosted.org/packages/64/d4/9eb4ff2c167edbbf08cdd28e19078bf195762e9bd63371689cab5ecd3d0d/charset_normalizer-3.4.3-cp311-cp311-win32.whl", hash = "sha256:6cf8fd4c04756b6b60146d98cd8a77d0cdae0e1ca20329da2ac85eed779b6849", size = 99616, upload-time = "2025-08-09T07:56:05.658Z" }, - { url = "https://files.pythonhosted.org/packages/f4/9c/996a4a028222e7761a96634d1820de8a744ff4327a00ada9c8942033089b/charset_normalizer-3.4.3-cp311-cp311-win_amd64.whl", hash = "sha256:31a9a6f775f9bcd865d88ee350f0ffb0e25936a7f930ca98995c05abf1faf21c", size = 107108, upload-time = "2025-08-09T07:56:07.176Z" }, - { url = "https://files.pythonhosted.org/packages/e9/5e/14c94999e418d9b87682734589404a25854d5f5d0408df68bc15b6ff54bb/charset_normalizer-3.4.3-cp312-cp312-macosx_10_13_universal2.whl", hash = "sha256:e28e334d3ff134e88989d90ba04b47d84382a828c061d0d1027b1b12a62b39b1", size = 205655, upload-time = "2025-08-09T07:56:08.475Z" }, - { url = "https://files.pythonhosted.org/packages/7d/a8/c6ec5d389672521f644505a257f50544c074cf5fc292d5390331cd6fc9c3/charset_normalizer-3.4.3-cp312-cp312-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:0cacf8f7297b0c4fcb74227692ca46b4a5852f8f4f24b3c766dd94a1075c4884", size = 146223, upload-time = "2025-08-09T07:56:09.708Z" }, - { url = "https://files.pythonhosted.org/packages/fc/eb/a2ffb08547f4e1e5415fb69eb7db25932c52a52bed371429648db4d84fb1/charset_normalizer-3.4.3-cp312-cp312-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:c6fd51128a41297f5409deab284fecbe5305ebd7e5a1f959bee1c054622b7018", size = 159366, upload-time = "2025-08-09T07:56:11.326Z" }, - { url = "https://files.pythonhosted.org/packages/82/10/0fd19f20c624b278dddaf83b8464dcddc2456cb4b02bb902a6da126b87a1/charset_normalizer-3.4.3-cp312-cp312-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:3cfb2aad70f2c6debfbcb717f23b7eb55febc0bb23dcffc0f076009da10c6392", size = 157104, upload-time = "2025-08-09T07:56:13.014Z" }, - { url = "https://files.pythonhosted.org/packages/16/ab/0233c3231af734f5dfcf0844aa9582d5a1466c985bbed6cedab85af9bfe3/charset_normalizer-3.4.3-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:1606f4a55c0fd363d754049cdf400175ee96c992b1f8018b993941f221221c5f", size = 151830, upload-time = "2025-08-09T07:56:14.428Z" }, - { url = "https://files.pythonhosted.org/packages/ae/02/e29e22b4e02839a0e4a06557b1999d0a47db3567e82989b5bb21f3fbbd9f/charset_normalizer-3.4.3-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:027b776c26d38b7f15b26a5da1044f376455fb3766df8fc38563b4efbc515154", size = 148854, upload-time = "2025-08-09T07:56:16.051Z" }, - { url = "https://files.pythonhosted.org/packages/05/6b/e2539a0a4be302b481e8cafb5af8792da8093b486885a1ae4d15d452bcec/charset_normalizer-3.4.3-cp312-cp312-musllinux_1_2_ppc64le.whl", hash = "sha256:42e5088973e56e31e4fa58eb6bd709e42fc03799c11c42929592889a2e54c491", size = 160670, upload-time = "2025-08-09T07:56:17.314Z" }, - { url = "https://files.pythonhosted.org/packages/31/e7/883ee5676a2ef217a40ce0bffcc3d0dfbf9e64cbcfbdf822c52981c3304b/charset_normalizer-3.4.3-cp312-cp312-musllinux_1_2_s390x.whl", hash = "sha256:cc34f233c9e71701040d772aa7490318673aa7164a0efe3172b2981218c26d93", size = 158501, upload-time = "2025-08-09T07:56:18.641Z" }, - { url = "https://files.pythonhosted.org/packages/c1/35/6525b21aa0db614cf8b5792d232021dca3df7f90a1944db934efa5d20bb1/charset_normalizer-3.4.3-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:320e8e66157cc4e247d9ddca8e21f427efc7a04bbd0ac8a9faf56583fa543f9f", size = 153173, upload-time = "2025-08-09T07:56:20.289Z" }, - { url = "https://files.pythonhosted.org/packages/50/ee/f4704bad8201de513fdc8aac1cabc87e38c5818c93857140e06e772b5892/charset_normalizer-3.4.3-cp312-cp312-win32.whl", hash = "sha256:fb6fecfd65564f208cbf0fba07f107fb661bcd1a7c389edbced3f7a493f70e37", size = 99822, upload-time = "2025-08-09T07:56:21.551Z" }, - { url = "https://files.pythonhosted.org/packages/39/f5/3b3836ca6064d0992c58c7561c6b6eee1b3892e9665d650c803bd5614522/charset_normalizer-3.4.3-cp312-cp312-win_amd64.whl", hash = "sha256:86df271bf921c2ee3818f0522e9a5b8092ca2ad8b065ece5d7d9d0e9f4849bcc", size = 107543, upload-time = "2025-08-09T07:56:23.115Z" }, - { url = "https://files.pythonhosted.org/packages/65/ca/2135ac97709b400c7654b4b764daf5c5567c2da45a30cdd20f9eefe2d658/charset_normalizer-3.4.3-cp313-cp313-macosx_10_13_universal2.whl", hash = "sha256:14c2a87c65b351109f6abfc424cab3927b3bdece6f706e4d12faaf3d52ee5efe", size = 205326, upload-time = "2025-08-09T07:56:24.721Z" }, - { url = "https://files.pythonhosted.org/packages/71/11/98a04c3c97dd34e49c7d247083af03645ca3730809a5509443f3c37f7c99/charset_normalizer-3.4.3-cp313-cp313-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:41d1fc408ff5fdfb910200ec0e74abc40387bccb3252f3f27c0676731df2b2c8", size = 146008, upload-time = "2025-08-09T07:56:26.004Z" }, - { url = "https://files.pythonhosted.org/packages/60/f5/4659a4cb3c4ec146bec80c32d8bb16033752574c20b1252ee842a95d1a1e/charset_normalizer-3.4.3-cp313-cp313-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:1bb60174149316da1c35fa5233681f7c0f9f514509b8e399ab70fea5f17e45c9", size = 159196, upload-time = "2025-08-09T07:56:27.25Z" }, - { url = "https://files.pythonhosted.org/packages/86/9e/f552f7a00611f168b9a5865a1414179b2c6de8235a4fa40189f6f79a1753/charset_normalizer-3.4.3-cp313-cp313-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:30d006f98569de3459c2fc1f2acde170b7b2bd265dc1943e87e1a4efe1b67c31", size = 156819, upload-time = "2025-08-09T07:56:28.515Z" }, - { url = "https://files.pythonhosted.org/packages/7e/95/42aa2156235cbc8fa61208aded06ef46111c4d3f0de233107b3f38631803/charset_normalizer-3.4.3-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:416175faf02e4b0810f1f38bcb54682878a4af94059a1cd63b8747244420801f", size = 151350, upload-time = "2025-08-09T07:56:29.716Z" }, - { url = "https://files.pythonhosted.org/packages/c2/a9/3865b02c56f300a6f94fc631ef54f0a8a29da74fb45a773dfd3dcd380af7/charset_normalizer-3.4.3-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:6aab0f181c486f973bc7262a97f5aca3ee7e1437011ef0c2ec04b5a11d16c927", size = 148644, upload-time = "2025-08-09T07:56:30.984Z" }, - { url = "https://files.pythonhosted.org/packages/77/d9/cbcf1a2a5c7d7856f11e7ac2d782aec12bdfea60d104e60e0aa1c97849dc/charset_normalizer-3.4.3-cp313-cp313-musllinux_1_2_ppc64le.whl", hash = "sha256:fdabf8315679312cfa71302f9bd509ded4f2f263fb5b765cf1433b39106c3cc9", size = 160468, upload-time = "2025-08-09T07:56:32.252Z" }, - { url = "https://files.pythonhosted.org/packages/f6/42/6f45efee8697b89fda4d50580f292b8f7f9306cb2971d4b53f8914e4d890/charset_normalizer-3.4.3-cp313-cp313-musllinux_1_2_s390x.whl", hash = "sha256:bd28b817ea8c70215401f657edef3a8aa83c29d447fb0b622c35403780ba11d5", size = 158187, upload-time = "2025-08-09T07:56:33.481Z" }, - { url = "https://files.pythonhosted.org/packages/70/99/f1c3bdcfaa9c45b3ce96f70b14f070411366fa19549c1d4832c935d8e2c3/charset_normalizer-3.4.3-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:18343b2d246dc6761a249ba1fb13f9ee9a2bcd95decc767319506056ea4ad4dc", size = 152699, upload-time = "2025-08-09T07:56:34.739Z" }, - { url = "https://files.pythonhosted.org/packages/a3/ad/b0081f2f99a4b194bcbb1934ef3b12aa4d9702ced80a37026b7607c72e58/charset_normalizer-3.4.3-cp313-cp313-win32.whl", hash = "sha256:6fb70de56f1859a3f71261cbe41005f56a7842cc348d3aeb26237560bfa5e0ce", size = 99580, upload-time = "2025-08-09T07:56:35.981Z" }, - { url = "https://files.pythonhosted.org/packages/9a/8f/ae790790c7b64f925e5c953b924aaa42a243fb778fed9e41f147b2a5715a/charset_normalizer-3.4.3-cp313-cp313-win_amd64.whl", hash = "sha256:cf1ebb7d78e1ad8ec2a8c4732c7be2e736f6e5123a4146c5b89c9d1f585f8cef", size = 107366, upload-time = "2025-08-09T07:56:37.339Z" }, - { url = "https://files.pythonhosted.org/packages/8e/91/b5a06ad970ddc7a0e513112d40113e834638f4ca1120eb727a249fb2715e/charset_normalizer-3.4.3-cp314-cp314-macosx_10_13_universal2.whl", hash = "sha256:3cd35b7e8aedeb9e34c41385fda4f73ba609e561faedfae0a9e75e44ac558a15", size = 204342, upload-time = "2025-08-09T07:56:38.687Z" }, - { url = "https://files.pythonhosted.org/packages/ce/ec/1edc30a377f0a02689342f214455c3f6c2fbedd896a1d2f856c002fc3062/charset_normalizer-3.4.3-cp314-cp314-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:b89bc04de1d83006373429975f8ef9e7932534b8cc9ca582e4db7d20d91816db", size = 145995, upload-time = "2025-08-09T07:56:40.048Z" }, - { url = "https://files.pythonhosted.org/packages/17/e5/5e67ab85e6d22b04641acb5399c8684f4d37caf7558a53859f0283a650e9/charset_normalizer-3.4.3-cp314-cp314-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:2001a39612b241dae17b4687898843f254f8748b796a2e16f1051a17078d991d", size = 158640, upload-time = "2025-08-09T07:56:41.311Z" }, - { url = "https://files.pythonhosted.org/packages/f1/e5/38421987f6c697ee3722981289d554957c4be652f963d71c5e46a262e135/charset_normalizer-3.4.3-cp314-cp314-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:8dcfc373f888e4fb39a7bc57e93e3b845e7f462dacc008d9749568b1c4ece096", size = 156636, upload-time = "2025-08-09T07:56:43.195Z" }, - { url = "https://files.pythonhosted.org/packages/a0/e4/5a075de8daa3ec0745a9a3b54467e0c2967daaaf2cec04c845f73493e9a1/charset_normalizer-3.4.3-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:18b97b8404387b96cdbd30ad660f6407799126d26a39ca65729162fd810a99aa", size = 150939, upload-time = "2025-08-09T07:56:44.819Z" }, - { url = "https://files.pythonhosted.org/packages/02/f7/3611b32318b30974131db62b4043f335861d4d9b49adc6d57c1149cc49d4/charset_normalizer-3.4.3-cp314-cp314-musllinux_1_2_aarch64.whl", hash = "sha256:ccf600859c183d70eb47e05a44cd80a4ce77394d1ac0f79dbd2dd90a69a3a049", size = 148580, upload-time = "2025-08-09T07:56:46.684Z" }, - { url = "https://files.pythonhosted.org/packages/7e/61/19b36f4bd67f2793ab6a99b979b4e4f3d8fc754cbdffb805335df4337126/charset_normalizer-3.4.3-cp314-cp314-musllinux_1_2_ppc64le.whl", hash = "sha256:53cd68b185d98dde4ad8990e56a58dea83a4162161b1ea9272e5c9182ce415e0", size = 159870, upload-time = "2025-08-09T07:56:47.941Z" }, - { url = "https://files.pythonhosted.org/packages/06/57/84722eefdd338c04cf3030ada66889298eaedf3e7a30a624201e0cbe424a/charset_normalizer-3.4.3-cp314-cp314-musllinux_1_2_s390x.whl", hash = "sha256:30a96e1e1f865f78b030d65241c1ee850cdf422d869e9028e2fc1d5e4db73b92", size = 157797, upload-time = "2025-08-09T07:56:49.756Z" }, - { url = "https://files.pythonhosted.org/packages/72/2a/aff5dd112b2f14bcc3462c312dce5445806bfc8ab3a7328555da95330e4b/charset_normalizer-3.4.3-cp314-cp314-musllinux_1_2_x86_64.whl", hash = "sha256:d716a916938e03231e86e43782ca7878fb602a125a91e7acb8b5112e2e96ac16", size = 152224, upload-time = "2025-08-09T07:56:51.369Z" }, - { url = "https://files.pythonhosted.org/packages/b7/8c/9839225320046ed279c6e839d51f028342eb77c91c89b8ef2549f951f3ec/charset_normalizer-3.4.3-cp314-cp314-win32.whl", hash = "sha256:c6dbd0ccdda3a2ba7c2ecd9d77b37f3b5831687d8dc1b6ca5f56a4880cc7b7ce", size = 100086, upload-time = "2025-08-09T07:56:52.722Z" }, - { url = "https://files.pythonhosted.org/packages/ee/7a/36fbcf646e41f710ce0a563c1c9a343c6edf9be80786edeb15b6f62e17db/charset_normalizer-3.4.3-cp314-cp314-win_amd64.whl", hash = "sha256:73dc19b562516fc9bcf6e5d6e596df0b4eb98d87e4f79f3ae71840e6ed21361c", size = 107400, upload-time = "2025-08-09T07:56:55.172Z" }, - { url = "https://files.pythonhosted.org/packages/8a/1f/f041989e93b001bc4e44bb1669ccdcf54d3f00e628229a85b08d330615c5/charset_normalizer-3.4.3-py3-none-any.whl", hash = "sha256:ce571ab16d890d23b5c278547ba694193a45011ff86a9162a71307ed9f86759a", size = 53175, upload-time = "2025-08-09T07:57:26.864Z" }, +version = "3.5.1" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/e5/3f/143b048436775b0f76ac3eec145c019e8173ccc2885c8f20319b996d5e83/charset_normalizer-3.5.1.tar.gz", hash = "sha256:6117b84ea48435e5356dc737f5121485c30920ba43375fa7b434fd753df0eac3", size = 171764, upload-time = "2026-08-15T08:20:44.807Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/29/cd/2b812ce5e888f1ce69a5350281e58aab07ae64a958ecae8912f30865718e/charset_normalizer-3.5.1-cp314-cp314-android_24_arm64_v8a.whl", hash = "sha256:774d157f112367ff4abd29019f38f023c24e00e56edc7829c20e358a5a913ad8", size = 212318, upload-time = "2026-08-15T08:18:04.403Z" }, + { url = "https://files.pythonhosted.org/packages/9e/4a/a6ee107430768a5334e6d63f31f148a04a1a491ef161a1ac9415a73f2fa8/charset_normalizer-3.5.1-cp314-cp314-android_24_x86_64.whl", hash = "sha256:26422d45fd13551cf564c58932f7d72b4f58b93b0fcf18c35ba6be12b46bb102", size = 224897, upload-time = "2026-08-15T08:18:05.997Z" }, + { url = "https://files.pythonhosted.org/packages/c3/d9/35ae3f64f29d0179c35c3baefe575904df2913dde519129c7f75995a2b1d/charset_normalizer-3.5.1-cp314-cp314-ios_13_0_arm64_iphoneos.whl", hash = "sha256:09a7bba9f739468c8e78c36a75c33768e53cb1959fc638f510454c14683f00d5", size = 194848, upload-time = "2026-08-15T08:18:07.397Z" }, + { url = "https://files.pythonhosted.org/packages/74/76/f2fc7380f056cc273a53af37f50d08ad54b2c59f61078f31432edcf1c2bd/charset_normalizer-3.5.1-cp314-cp314-ios_13_0_arm64_iphonesimulator.whl", hash = "sha256:4c9548dc78002099910abaebc0a72ac58b7d30931869e0351c09b507dff4ece3", size = 198163, upload-time = "2026-08-15T08:18:08.989Z" }, + { url = "https://files.pythonhosted.org/packages/e9/40/095ce62fa078483cccc1fa2b36e6bc9580b85422a20ee9f925341c50e44f/charset_normalizer-3.5.1-cp314-cp314-macosx_10_15_universal2.whl", hash = "sha256:c428c6c31eb5f4277d7f8eccaf767fbd548ddd5ce3c8b4f4cbbfab3d96b5904c", size = 341823, upload-time = "2026-08-15T08:18:10.458Z" }, + { url = "https://files.pythonhosted.org/packages/f1/5a/0e58b1c04a1596e0256f407274a92d5fb2ee21324409d1fab1da48a65b5b/charset_normalizer-3.5.1-cp314-cp314-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:2f06b7eae9dbe77fe1d644ca244dad508de8d302870a43f3c559b521270938a0", size = 242458, upload-time = "2026-08-15T08:18:11.989Z" }, + { url = "https://files.pythonhosted.org/packages/22/95/b4618ce912e6db0b1aae89ba788e38e8a7eba0f3025cc66e8c0699f977b2/charset_normalizer-3.5.1-cp314-cp314-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:6b7430cf5728e68f6c462254009a6ef4086e1bea43cf2f57aa9c55fb4f50ff96", size = 226717, upload-time = "2026-08-15T08:18:13.401Z" }, + { url = "https://files.pythonhosted.org/packages/8a/76/c681192bbda3d55356db5dadd64381d5202b37c6b598fcda5282e88b5d3d/charset_normalizer-3.5.1-cp314-cp314-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:ab743e9bc90c1f73552ec33e10e3331315acd2c397b36065b591b0181de533cc", size = 266111, upload-time = "2026-08-15T08:18:14.961Z" }, + { url = "https://files.pythonhosted.org/packages/88/be/55127bfca72c0cff6c022488d140d7c5b04c771e3b72e9bdb4836d54979d/charset_normalizer-3.5.1-cp314-cp314-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:f6f7deae3feb4edfa2efaf7c574fe88cbf055038a6abdb40188e4fff66d5699f", size = 263128, upload-time = "2026-08-15T08:18:16.515Z" }, + { url = "https://files.pythonhosted.org/packages/e0/91/39c3af510b0aa32bbda03374259200f28430febfd1bf5e511fe765282ce5/charset_normalizer-3.5.1-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:15f024313246a4ed976c60f440bb8d257815513a681d212ff74fd46f7d715a90", size = 251240, upload-time = "2026-08-15T08:18:18.127Z" }, + { url = "https://files.pythonhosted.org/packages/1c/a5/cbe418bbc6ecdfc3e05a0116002897c4b403a5e838d697e64c78e9f0190d/charset_normalizer-3.5.1-cp314-cp314-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:823f82903d189af463d7df250ef1f7f696f3cee08cc8d91deb565e8d425f6506", size = 245282, upload-time = "2026-08-15T08:18:19.625Z" }, + { url = "https://files.pythonhosted.org/packages/cc/a4/689bb42e8e7cd492f3cb64907c6bc00ad247ec9a3628cd3f8eed126e8ae1/charset_normalizer-3.5.1-cp314-cp314-musllinux_1_2_aarch64.whl", hash = "sha256:01e93745f7f219b703b60ba7afead36cfc4242782be5af484673fc500df12da5", size = 244597, upload-time = "2026-08-15T08:18:21.121Z" }, + { url = "https://files.pythonhosted.org/packages/c1/ce/9962938e179cf9f699d3f1e7b3114b5d7642dee6a893745229f9dd04f274/charset_normalizer-3.5.1-cp314-cp314-musllinux_1_2_armv7l.whl", hash = "sha256:329fc3ccb63ad22d867d84c2adea759a64079a37ba4a343433b02c7a2816871e", size = 231376, upload-time = "2026-08-15T08:18:22.57Z" }, + { url = "https://files.pythonhosted.org/packages/85/54/46000450ada53bd9eac5429a2c8c54cd2d9b39c0c255f229aea9af0948a5/charset_normalizer-3.5.1-cp314-cp314-musllinux_1_2_ppc64le.whl", hash = "sha256:bb57753e36e4855b8ca375069482250a6246372331a3e4f3407eaebb007443f5", size = 266715, upload-time = "2026-08-15T08:18:24.235Z" }, + { url = "https://files.pythonhosted.org/packages/3d/bb/618749d70f792b44252a777bf89bfb86823b9bbc1ea13fe8ce759b07f38a/charset_normalizer-3.5.1-cp314-cp314-musllinux_1_2_riscv64.whl", hash = "sha256:fce8cbd4997efeb450bd298b54f755dcdff18d496f7a5ddbb4867c6d7c88fdc3", size = 245848, upload-time = "2026-08-15T08:18:25.726Z" }, + { url = "https://files.pythonhosted.org/packages/7e/3f/ffb64458527c7668031d5eb095d978de561958dc9f5b53f8e488a533e603/charset_normalizer-3.5.1-cp314-cp314-musllinux_1_2_s390x.whl", hash = "sha256:6c9cdde8becb25a7fde49924511aa2644d6f8081cc8df8e9452724303348d8e3", size = 264521, upload-time = "2026-08-15T08:18:27.193Z" }, + { url = "https://files.pythonhosted.org/packages/4f/ab/74a55fd803916a35ac461daf002708191aac19b546b80dc8cabfedc63d98/charset_normalizer-3.5.1-cp314-cp314-musllinux_1_2_x86_64.whl", hash = "sha256:9ac4444d8d4fd4c4bd08bf451ed3167aa9e7ec6cdb41b648794f1d1103652e36", size = 253054, upload-time = "2026-08-15T08:18:28.568Z" }, + { url = "https://files.pythonhosted.org/packages/a0/2a/6a9034b7d3c60b17499afb482df5878bf9fa20b50cc3887d5ef017a833db/charset_normalizer-3.5.1-cp314-cp314-pyemscripten_2026_0_wasm32.whl", hash = "sha256:f03ac127268b43ef4fe9e6ab6794a6794b49485a0cc0c1db79876d2f33f75bc7", size = 140580, upload-time = "2026-08-15T08:18:30.214Z" }, + { url = "https://files.pythonhosted.org/packages/f3/46/1d362e1a00d035d66b9869e1281eee115907f7e390a16a07824ab5737360/charset_normalizer-3.5.1-cp314-cp314-win32.whl", hash = "sha256:1f5883d77fd409a261abb5dc8ccbe335720d798b1de4abb3b1d47ccbbc76b53b", size = 180325, upload-time = "2026-08-15T08:18:31.877Z" }, + { url = "https://files.pythonhosted.org/packages/7a/7c/4938c329b6a9d446f6a59aa2092ff7118f274209b5ed0e26893d1d30a63c/charset_normalizer-3.5.1-cp314-cp314-win_amd64.whl", hash = "sha256:c658c50ac0c98cd755a2dd50b7977d3bca7df401dcc47fbdfa87db53ef7d4e8b", size = 204175, upload-time = "2026-08-15T08:18:33.466Z" }, + { url = "https://files.pythonhosted.org/packages/ac/33/eeb384dbd8dec570661354592f4f2e1b2fcc92585624d146a000caf53841/charset_normalizer-3.5.1-cp314-cp314-win_arm64.whl", hash = "sha256:4bea7f8ebe90bbd7f0e4a2de42ca6924ba23e3e76418c408ff82f1d46fabd687", size = 184123, upload-time = "2026-08-15T08:18:34.913Z" }, + { url = "https://files.pythonhosted.org/packages/1c/6c/c73fa9d5a85f6ab05395de61c5f6984e0a9ff40bb5ff888d46dff02526c6/charset_normalizer-3.5.1-cp314-cp314t-macosx_10_15_universal2.whl", hash = "sha256:fbc597639158fd7c14d55e808718848319540f51b0e6746e3eefa59723a4a348", size = 381682, upload-time = "2026-08-15T08:18:36.349Z" }, + { url = "https://files.pythonhosted.org/packages/30/c7/63565f860921457feba93bae6c86fb7746deb4cffeed2f375cb845318146/charset_normalizer-3.5.1-cp314-cp314t-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:e71c909f353863b2b89c83de2ebed71ea6d0df8a6ef65a128193c5e650766bef", size = 240826, upload-time = "2026-08-15T08:18:37.887Z" }, + { url = "https://files.pythonhosted.org/packages/06/ae/7ae8807410dfa33f8e6f1715740adeaafa8a816cc4cb33508f54b1f7c896/charset_normalizer-3.5.1-cp314-cp314t-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:7ac76cf9afd34929d76eb7fcb63be476a4853d8a96f0dcf2d0db68a0cbdf9885", size = 227861, upload-time = "2026-08-15T08:18:39.315Z" }, + { url = "https://files.pythonhosted.org/packages/e9/a3/887c1642f0da26000b0e0652d91071113c0e72cea33952e225cf589f49a9/charset_normalizer-3.5.1-cp314-cp314t-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:a3a370082ce34d0612f421e15fe011c53bb1feff21a26d06ad4fb244dab5a375", size = 260758, upload-time = "2026-08-15T08:18:40.88Z" }, + { url = "https://files.pythonhosted.org/packages/3e/11/e6f5b9a3d0e55b0ef7505cd3765cdd48f22db89994c947b316f52f801fd8/charset_normalizer-3.5.1-cp314-cp314t-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:256dd4d85d9e4dc595e2bc983c980e73f62ddeb3165c58b4c3dfe78c5c8548c1", size = 259950, upload-time = "2026-08-15T08:18:42.351Z" }, + { url = "https://files.pythonhosted.org/packages/1b/ee/e4e10a94d51cd1ee638aa7e00b65399e6b2a4e8376ab6d2eac9f95586671/charset_normalizer-3.5.1-cp314-cp314t-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:58d4aa13a59c969dbfdf9e6a9560e242cbfd9e8a8f50c2747714df1a423adf65", size = 249329, upload-time = "2026-08-15T08:18:43.914Z" }, + { url = "https://files.pythonhosted.org/packages/c4/25/d5f4198819e6059735a84e8d0bfb72dc33976da67b97adcd3fb5a5e07ec6/charset_normalizer-3.5.1-cp314-cp314t-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:0c6dfb5ca6723eeed15aa8e564a014d69fcb8812f94eef11fe3631e0508199f5", size = 243137, upload-time = "2026-08-15T08:18:45.368Z" }, + { url = "https://files.pythonhosted.org/packages/a5/e9/e925ca7569cf9fb9701fd82503fee73eea5268fdb856bdd64947092d3daa/charset_normalizer-3.5.1-cp314-cp314t-musllinux_1_2_aarch64.whl", hash = "sha256:c010f5581d9c612804cc59fcf7b524b707fbcb72828551237ab545bb5c7034af", size = 242820, upload-time = "2026-08-15T08:18:46.842Z" }, + { url = "https://files.pythonhosted.org/packages/34/17/672c251a888ed2aebcdd2fe830ad0104e25ff83c43f5c4f9c15e9fc6853c/charset_normalizer-3.5.1-cp314-cp314t-musllinux_1_2_armv7l.whl", hash = "sha256:52ec005752a56ae79547a05c0139ca2501a0c866390b6115008456b9f0e7cde1", size = 230504, upload-time = "2026-08-15T08:18:48.353Z" }, + { url = "https://files.pythonhosted.org/packages/3f/fc/f6a85abebd42ce4da2f1db0aa56cc6a0df1995e318b3875d14401b8381d1/charset_normalizer-3.5.1-cp314-cp314t-musllinux_1_2_ppc64le.whl", hash = "sha256:2bced4061f000f7187254a02ad3433ae17eaf991747ceea2f478422590a5bba9", size = 263087, upload-time = "2026-08-15T08:18:49.859Z" }, + { url = "https://files.pythonhosted.org/packages/98/66/7c42677e739ba66746b297e2046918d793078094dc239e1e72768cffccc6/charset_normalizer-3.5.1-cp314-cp314t-musllinux_1_2_riscv64.whl", hash = "sha256:9eea3ab2597a5e65fe65296e2d6a84570845a6b55532d90333d740d48bbc850a", size = 243269, upload-time = "2026-08-15T08:18:51.601Z" }, + { url = "https://files.pythonhosted.org/packages/de/d8/a50b79237f417af10f8c2a501ce8d1ca87829a22e69117891ca4ba20a69e/charset_normalizer-3.5.1-cp314-cp314t-musllinux_1_2_s390x.whl", hash = "sha256:496846868fea80e479324862fa877f02411f2fd0f83b79ccee2607aa68b2a032", size = 258766, upload-time = "2026-08-15T08:18:53.23Z" }, + { url = "https://files.pythonhosted.org/packages/2e/1d/0fc91aeaeb3c83b748f532399ce67cf84604b48297405d740000f7a9e786/charset_normalizer-3.5.1-cp314-cp314t-musllinux_1_2_x86_64.whl", hash = "sha256:85d5855daafc240cc045c026d7a15fd198a09b0fc8ff6f5ecbb5297b509cb11e", size = 250814, upload-time = "2026-08-15T08:18:54.768Z" }, + { url = "https://files.pythonhosted.org/packages/ae/10/3d8c777cf9024615295aa1b808324ad5b4a77855869c00824bad74ffaf8a/charset_normalizer-3.5.1-cp314-cp314t-win32.whl", hash = "sha256:58d3e12c88e0950bca850ae1f7c256055c097639c2edb9eb123af9807d8b15e4", size = 191074, upload-time = "2026-08-15T08:18:56.305Z" }, + { url = "https://files.pythonhosted.org/packages/4d/81/ae557d3c44d1a1d688696d60563413a0866a91b7ebc50f20df838be3d8c8/charset_normalizer-3.5.1-cp314-cp314t-win_amd64.whl", hash = "sha256:acaf604462bf330b0d07e7a07c1d6e4adac79e5fb13e9c5140590542cafacc00", size = 216476, upload-time = "2026-08-15T08:18:57.889Z" }, + { url = "https://files.pythonhosted.org/packages/27/e9/61c01fb8b804692569c036b3fc50495814502dcf13a60649c6055390b02c/charset_normalizer-3.5.1-cp314-cp314t-win_arm64.whl", hash = "sha256:fdb8a068947befafba9952162645dc2fecaeb400e64584829ed5e9b2fbe21a7f", size = 194115, upload-time = "2026-08-15T08:18:59.418Z" }, + { url = "https://files.pythonhosted.org/packages/4a/4e/8544831ef59d8f27ce92c80871380fdacc8076a8a56ed62f82e54f991333/charset_normalizer-3.5.1-cp315-cp315-macosx_10_15_universal2.whl", hash = "sha256:9085f87b0e38a2b92b8923059b4e8789fe40d9279712d15dcc670048d77079af", size = 342048, upload-time = "2026-08-15T08:19:01.054Z" }, + { url = "https://files.pythonhosted.org/packages/7f/a6/e3b46852424246065355644f4fb6dbccc0239a42a2eee27ecfc8957f0bcd/charset_normalizer-3.5.1-cp315-cp315-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:2679de311c7946dde5d3b6f44941844133ff5c7cb86099c0061ab1e8901c20a8", size = 242997, upload-time = "2026-08-15T08:19:02.492Z" }, + { url = "https://files.pythonhosted.org/packages/03/3b/0cc9a26777334ab2f2e3089b948bbf4e4fe72ea70b897715ef6415043ec8/charset_normalizer-3.5.1-cp315-cp315-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:baf3775a2635e5a11fbd5e4e64ee69c7e86875d224a5c72aca4c141064589a90", size = 237014, upload-time = "2026-08-15T08:19:03.943Z" }, + { url = "https://files.pythonhosted.org/packages/8c/c2/027335f0aa337a2a2e121bac1ad88c4f02ba6053ea0926802784f3db11af/charset_normalizer-3.5.1-cp315-cp315-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:8ac8c94b6539074e0f40899301273ac8402b9b3e01c7b7ba269ff30340aaaf20", size = 266174, upload-time = "2026-08-15T08:19:05.598Z" }, + { url = "https://files.pythonhosted.org/packages/86/d3/e367787febe4e74769dec0f406f2c3c8d1b955fce5aee1fd0f94e8367a45/charset_normalizer-3.5.1-cp315-cp315-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:8fe532b3c966d1fb794e0698e4589d0444017ae77fc0b31edea13c0e35bcc449", size = 263361, upload-time = "2026-08-15T08:19:07.251Z" }, + { url = "https://files.pythonhosted.org/packages/af/3d/391b193eb9f3e84b02f9314088c386debdc0debee843535aaea2e2c6715d/charset_normalizer-3.5.1-cp315-cp315-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:5c84bec0ab5ae0c64bfe73a7d2adcb5ce73b467523fc27fd6a28ab2aa6cbe35a", size = 252143, upload-time = "2026-08-15T08:19:08.816Z" }, + { url = "https://files.pythonhosted.org/packages/2e/57/de221f1745a90d418199761967e2776bfe2c275a1194220985e8c1d37833/charset_normalizer-3.5.1-cp315-cp315-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:854066be00447fa8de2ccbbe893e2ffc4b123ef16d897af794c1e18bd4a714b0", size = 252086, upload-time = "2026-08-15T08:19:10.255Z" }, + { url = "https://files.pythonhosted.org/packages/c8/e3/d119f86a01f9331e8186175f24873b1d74a7ee9e2e4b4d68f9947dae5afd/charset_normalizer-3.5.1-cp315-cp315-musllinux_1_2_aarch64.whl", hash = "sha256:21b82d8082f6f5e7f456ef0bd16323d08de1266efbfeb476e64b2a91d1471a4e", size = 245231, upload-time = "2026-08-15T08:19:11.807Z" }, + { url = "https://files.pythonhosted.org/packages/26/de/d8e48c135ae480879539cdb179c8d3b50c7879497d75dd899b5763b69cee/charset_normalizer-3.5.1-cp315-cp315-musllinux_1_2_armv7l.whl", hash = "sha256:838648accb3a7fd9803fd45c87bce8509648eb0c11bc34e216141300977244f2", size = 241546, upload-time = "2026-08-15T08:19:13.416Z" }, + { url = "https://files.pythonhosted.org/packages/67/c4/217755fd1abc50d326c252922cd642002758095a81ff45010337b8b3ef65/charset_normalizer-3.5.1-cp315-cp315-musllinux_1_2_ppc64le.whl", hash = "sha256:195ce897c6153c0700078142cf8efe3e6454ca4cf4357499e4078dfd83396626", size = 267033, upload-time = "2026-08-15T08:19:14.981Z" }, + { url = "https://files.pythonhosted.org/packages/b8/d7/34d8e404e358d2adcc5a228c2134643af00104c8fb0bf525f3688d756f05/charset_normalizer-3.5.1-cp315-cp315-musllinux_1_2_riscv64.whl", hash = "sha256:978eab16f55b4ab2c2a745be9a0a840bf8f09a7f227d9c76eb30214d078865a5", size = 252045, upload-time = "2026-08-15T08:19:16.618Z" }, + { url = "https://files.pythonhosted.org/packages/5e/fa/40414471acf0aa0692ca77305aa00e434fcd8288f0941c93c30e9a5f8f2f/charset_normalizer-3.5.1-cp315-cp315-musllinux_1_2_s390x.whl", hash = "sha256:cc0329df4caaceb950d2f580b5ac716a377f7059624a0bafaeaf8a218c6ed774", size = 264866, upload-time = "2026-08-15T08:19:18.101Z" }, + { url = "https://files.pythonhosted.org/packages/32/90/fcc850bae791abd2e0c041847f13e270aa08692a79f3e00de6d2dce1cb50/charset_normalizer-3.5.1-cp315-cp315-musllinux_1_2_x86_64.whl", hash = "sha256:687c9ca3035544b113bea2055e180af96fb63c0c476e22a9180f51925186e7b7", size = 253932, upload-time = "2026-08-15T08:19:19.734Z" }, + { url = "https://files.pythonhosted.org/packages/af/af/53afe99068b3c10b4cbae592a52ef72a7c92c0188440e83ee3a078fd8f75/charset_normalizer-3.5.1-cp315-cp315-win32.whl", hash = "sha256:706bfd38730a5ac7a365793269a00f4e988178cec121391f4248d84ad8c972e9", size = 180320, upload-time = "2026-08-15T08:19:21.37Z" }, + { url = "https://files.pythonhosted.org/packages/c9/bc/f46a132041b29e4a8779ed712d3df1bf112e94ca8de58b66d7ec2c0cf8b9/charset_normalizer-3.5.1-cp315-cp315-win_amd64.whl", hash = "sha256:92caef967d287a407085d61176fce4012b1dd62daed4eb6d5ceb26d3d2538712", size = 204174, upload-time = "2026-08-15T08:19:23.088Z" }, + { url = "https://files.pythonhosted.org/packages/a1/5d/9ed554480eda8e447b673648628fdc29574d23dbad01fe11837adedd1cae/charset_normalizer-3.5.1-cp315-cp315-win_arm64.whl", hash = "sha256:5fc45d653ea8c9a20479167e11d4a0f8cb2fa3470737ab6f9c827532313187b7", size = 184126, upload-time = "2026-08-15T08:19:24.471Z" }, + { url = "https://files.pythonhosted.org/packages/3b/32/9b8929bf384061ee1fe5d9c27c6f9776d3d824039ad4e14c88ec00c7808e/charset_normalizer-3.5.1-cp315-cp315t-macosx_10_15_universal2.whl", hash = "sha256:59171c6e45bf07d0d5cab3b0bf81d945035530f6873398b3b531c31184d46663", size = 381441, upload-time = "2026-08-15T08:19:26.038Z" }, + { url = "https://files.pythonhosted.org/packages/96/10/e9aa7923d3ddac652c99a1c5f7be494e737e151566a44abe018daf757f2c/charset_normalizer-3.5.1-cp315-cp315t-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:9dbdd9205662134957cf0c324f639bdc5031c0ca056e2369e238db75187c0f11", size = 241742, upload-time = "2026-08-15T08:19:27.532Z" }, + { url = "https://files.pythonhosted.org/packages/28/53/a2d249ebddf47b889a100c0bdcb61a2f9dbb8bc24ef325cc062e4f476877/charset_normalizer-3.5.1-cp315-cp315t-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:e4b018dc5a0eee4676e38fe84a47a427816c590b93b55d9025274ec4d6ffc2dc", size = 235298, upload-time = "2026-08-15T08:19:29.274Z" }, + { url = "https://files.pythonhosted.org/packages/7d/07/469f78af590f7d5cd48e20d8dbfa3d66deeff9ba37768c04d886b5afd45c/charset_normalizer-3.5.1-cp315-cp315t-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:ced3fdd71aaa83ce593746c2edb42b7a59cb4c19c8b5c407781c72e493aae55a", size = 262500, upload-time = "2026-08-15T08:19:30.955Z" }, + { url = "https://files.pythonhosted.org/packages/55/66/3bb56a47f7dcba014055b1a1d33c6f08bbe9c1e74dba154cfa25f90ae885/charset_normalizer-3.5.1-cp315-cp315t-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:19a3dd5aa73cef1c99687c4fc57db016a9c17104ae1185da88ba566a5d3bebe4", size = 258888, upload-time = "2026-08-15T08:19:32.458Z" }, + { url = "https://files.pythonhosted.org/packages/ff/c1/2adc2800903fb013210349313b710a5376856578d9e33e6b9a1d8b36714a/charset_normalizer-3.5.1-cp315-cp315t-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:cc5d36d96478aa9c60654bd932525bf32964c62a7281eafdf16d85003a8d6004", size = 250243, upload-time = "2026-08-15T08:19:33.94Z" }, + { url = "https://files.pythonhosted.org/packages/95/b5/a18d0dd1157ab655cc2cb14a545f4a4784bbad70ab3502412e36097502d9/charset_normalizer-3.5.1-cp315-cp315t-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:04368edf83514385ffc3e1cfd4546e595f4f1272dd23ba437a93a9cc3741d47b", size = 249871, upload-time = "2026-08-15T08:19:35.413Z" }, + { url = "https://files.pythonhosted.org/packages/ad/c3/525f508cd1e58d0450ac55ed40ac75bc3a97482c59def5278456a5fbf03c/charset_normalizer-3.5.1-cp315-cp315t-musllinux_1_2_aarch64.whl", hash = "sha256:9b5db6052055d34d41230fb78d7c439c23dc536a9896f6cb039e8dd92cfc1263", size = 243580, upload-time = "2026-08-15T08:19:36.886Z" }, + { url = "https://files.pythonhosted.org/packages/7c/c1/49a91fe7e97c8140094ca5c64161ab623a70d9f636bf834eace14048acb5/charset_normalizer-3.5.1-cp315-cp315t-musllinux_1_2_armv7l.whl", hash = "sha256:252d099029bcbea642f2a06c4ed5046bdf8b5a8150b64afa5e027e88b106e5ee", size = 239807, upload-time = "2026-08-15T08:19:38.392Z" }, + { url = "https://files.pythonhosted.org/packages/d3/58/56a48c296601274c4689b864a8e2dfb209b81dfcb39472753ce95eea662b/charset_normalizer-3.5.1-cp315-cp315t-musllinux_1_2_ppc64le.whl", hash = "sha256:6199d5606e2bbf2b096cf64d03f8b6790c91081d5ac866b8e7bb6422738cc60c", size = 264083, upload-time = "2026-08-15T08:19:39.856Z" }, + { url = "https://files.pythonhosted.org/packages/10/4c/dc48409274a1817ff349711d26c62aa0c597df865d4d69ef79160c859193/charset_normalizer-3.5.1-cp315-cp315t-musllinux_1_2_riscv64.whl", hash = "sha256:77efcff2b23071c349402ac1066667a3d011f62398d81408c9b88ad991747c9e", size = 250317, upload-time = "2026-08-15T08:19:41.53Z" }, + { url = "https://files.pythonhosted.org/packages/81/58/d325912115caec62d6bdd77bbab5e0b7da5d234a9f20affdffcbcb530d0b/charset_normalizer-3.5.1-cp315-cp315t-musllinux_1_2_s390x.whl", hash = "sha256:a5cbd90ecf0fc62e64726917ad083b73001f0563657a87ec3c0b504e277dc90d", size = 258173, upload-time = "2026-08-15T08:19:43.07Z" }, + { url = "https://files.pythonhosted.org/packages/34/f7/b13b1ccae2c8ec63980d13be1890eb73f8aeabbfce02a24aabc0908788f5/charset_normalizer-3.5.1-cp315-cp315t-musllinux_1_2_x86_64.whl", hash = "sha256:4d26f14f041e83dd8edfd61f4cd4fa7285d31798b5bf1f28e70c367ba6c41d61", size = 251960, upload-time = "2026-08-15T08:19:44.587Z" }, + { url = "https://files.pythonhosted.org/packages/1e/25/ed3f9919c5aef8cc818be1f972f565f7610d7b2076b8ebb98839516ffc3c/charset_normalizer-3.5.1-cp315-cp315t-win32.whl", hash = "sha256:ac13b004224fb341e1e25a1ed5e19d32f57cdb2a403e01f003b46f051a550f6f", size = 191186, upload-time = "2026-08-15T08:19:46.293Z" }, + { url = "https://files.pythonhosted.org/packages/69/d5/43c2b3e9d8267092b913eb8b0603f0f71993c395632886bd37a7223f96cf/charset_normalizer-3.5.1-cp315-cp315t-win_amd64.whl", hash = "sha256:35aea775dc2bd5f54cd84a1cd2696cc3207c479cb9cf0bd346f0d343e4300ddb", size = 215947, upload-time = "2026-08-15T08:19:47.853Z" }, + { url = "https://files.pythonhosted.org/packages/a8/76/9aad3e9c8865e5e0efa9a7f6f81c37a67635a985145ecd44528a81e088ee/charset_normalizer-3.5.1-cp315-cp315t-win_arm64.whl", hash = "sha256:fb78f6e7fcd8ad785d28cd577168bc1aaee827b25bb8755638f694794ea98f0a", size = 193909, upload-time = "2026-08-15T08:19:49.383Z" }, + { url = "https://files.pythonhosted.org/packages/5b/97/fb4e82231aba271ffd775a1b4993b0defc4e3059f286ae41d9433409fe85/charset_normalizer-3.5.1-cp37-abi3-macosx_10_9_universal2.whl", hash = "sha256:41876ee62a3dddf48ff1121ad8f0798032aa03f2fd35f21f34a4cab14f18d8d2", size = 331467, upload-time = "2026-08-15T08:19:50.959Z" }, + { url = "https://files.pythonhosted.org/packages/9f/2f/fe3f187327aac18e2d54e9d2b08e15d27bf9b642d9e51c219f130fc34d1a/charset_normalizer-3.5.1-cp37-abi3-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl", hash = "sha256:a6dac12ff6b846103483683f60c5f8fee205121adc58ffd87e90a90a3af69e99", size = 253057, upload-time = "2026-08-15T08:19:52.654Z" }, + { url = "https://files.pythonhosted.org/packages/d7/c7/9e48cee5c161fe24da823b61bf381921d77cb994a0a4de148e95018c1984/charset_normalizer-3.5.1-cp37-abi3-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:cee5dd7c6fb5dd52a0fe2a740f9bc6e3593f5f8b1788bde49de02086f30182b2", size = 240930, upload-time = "2026-08-15T08:19:54.163Z" }, + { url = "https://files.pythonhosted.org/packages/49/e0/716601f3cc69be7b198951150c75ead1ece33c3c8036ff6ffa46029659a0/charset_normalizer-3.5.1-cp37-abi3-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:343fb4f2821043bd87095f7b08a1a181febc8e36ac64212143bbfd0a0e1bc235", size = 230822, upload-time = "2026-08-15T08:19:55.807Z" }, + { url = "https://files.pythonhosted.org/packages/d3/05/71bfc5caa0abcc45aea1f6a4d50ac68e59605ddc7666fe8494f4cd229665/charset_normalizer-3.5.1-cp37-abi3-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:ae4a097991662cd4fff0ddc74e0fe7874f82e00042fa0ea00855645ed0c79598", size = 260037, upload-time = "2026-08-15T08:19:57.312Z" }, + { url = "https://files.pythonhosted.org/packages/c3/92/de7e32ed05341e7a9c4c877c318418197b7f2d66a3b68d561bf2ac57ca3e/charset_normalizer-3.5.1-cp37-abi3-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:4b599739b93b2cbeded49645ae3c8d1405c29ddfbceac1545c87a3f9580a9e96", size = 255097, upload-time = "2026-08-15T08:19:59.056Z" }, + { url = "https://files.pythonhosted.org/packages/f5/7b/ade0a122600319dfa0b1000ab0f9731c94a817904cf3c5de408c73a4ede7/charset_normalizer-3.5.1-cp37-abi3-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:b39b69b347e5e47a3b5b8cfc005c68c1ba347474e3960236c4944a8ecd174962", size = 250166, upload-time = "2026-08-15T08:20:00.612Z" }, + { url = "https://files.pythonhosted.org/packages/75/9c/019fbb9f4834491a160951349b1a3714439376f66e5f7cf18b4f18f0c7aa/charset_normalizer-3.5.1-cp37-abi3-musllinux_1_2_aarch64.whl", hash = "sha256:a2028475ba855475b8b4d3cfeb4994269c967aea8b9892dfba907f4263a863a3", size = 241821, upload-time = "2026-08-15T08:20:02.321Z" }, + { url = "https://files.pythonhosted.org/packages/2b/b8/11d4840bfc99330cc7fbcc2681ee5a044553a6e77655508d8f9b2bff7b34/charset_normalizer-3.5.1-cp37-abi3-musllinux_1_2_armv7l.whl", hash = "sha256:36047af20e17097c3bb9476c2b7655f2f7aa51322c0ba58c07695bedf755a950", size = 232529, upload-time = "2026-08-15T08:20:04.008Z" }, + { url = "https://files.pythonhosted.org/packages/18/96/2b3a21492d9f65171ac75d872f5018260013d00bfa0ff70ec9f179148cbd/charset_normalizer-3.5.1-cp37-abi3-musllinux_1_2_ppc64le.whl", hash = "sha256:4c4fb141a727957c93edfe5c32a26ceb6b5f6461d67146e2d39f51e16170bea8", size = 260348, upload-time = "2026-08-15T08:20:05.877Z" }, + { url = "https://files.pythonhosted.org/packages/d6/aa/a69a2028e8bd052476c245460ab19d7de595de084dd968f2d75cd50c3e25/charset_normalizer-3.5.1-cp37-abi3-musllinux_1_2_riscv64.whl", hash = "sha256:2f293479cce755c75f1697e87c409b7ae4c555c7dfecb6e988ad13abba943031", size = 247234, upload-time = "2026-08-15T08:20:07.487Z" }, + { url = "https://files.pythonhosted.org/packages/35/8a/3d130aeabcaf3d2466af76b7b141c08d9e89c9016ab4b7cdd0f7dc2d1c62/charset_normalizer-3.5.1-cp37-abi3-musllinux_1_2_s390x.whl", hash = "sha256:3588e376b3ea2eea84976f67273d679f229e24c66dce7b82ae45aef04ff6e072", size = 256917, upload-time = "2026-08-15T08:20:09.142Z" }, + { url = "https://files.pythonhosted.org/packages/80/c2/a7379b840292d0c1ab9fbd17d1f3967aa81794dc95bc74be8999d7fedcf7/charset_normalizer-3.5.1-cp37-abi3-musllinux_1_2_x86_64.whl", hash = "sha256:e199fb99720074809a7720f1c0b4d919eea8b87e88713e0f8f602f7bef543d9d", size = 254846, upload-time = "2026-08-15T08:20:10.727Z" }, + { url = "https://files.pythonhosted.org/packages/01/65/d43b714731bb2f40d4053dfa00ecfc1c5a301f8e3316c5db3a09af59fe94/charset_normalizer-3.5.1-cp37-abi3-win32.whl", hash = "sha256:dd732602a7009217f658d5863d12d79d373a4de0eebc111094bcdd3bb8e0a6cc", size = 174216, upload-time = "2026-08-15T08:20:12.334Z" }, + { url = "https://files.pythonhosted.org/packages/35/4f/b911ed898b26a09789eba9c9200c999aff6c61b4bafaf4838e56d1a1e1a3/charset_normalizer-3.5.1-cp37-abi3-win_amd64.whl", hash = "sha256:70055ff39b97c99e7ae40ea3e393fb62aa2e44dbd9b29f8d14f42fb0025c3959", size = 199764, upload-time = "2026-08-15T08:20:13.908Z" }, + { url = "https://files.pythonhosted.org/packages/f0/a7/920baf467bfd9bf689f3b318340f37aee4572a71f162bd8db51da55ba4fa/charset_normalizer-3.5.1-cp37-abi3-win_arm64.whl", hash = "sha256:87e4f41d375c0b9be2fb5251aee4b8a689169e134535aed81bf085c3b647451e", size = 287318, upload-time = "2026-08-15T08:20:15.551Z" }, + { url = "https://files.pythonhosted.org/packages/cc/61/d01fc49b8dea277640b55a9e15960dbca9fdc8c9fde18e572d39c59f4019/charset_normalizer-3.5.1-py3-none-any.whl", hash = "sha256:6df0ec430f9a831772c23ca5a224cba36517a58a84bb32c32bb59a9fa67c47f6", size = 68658, upload-time = "2026-08-15T08:20:43.306Z" }, ] [[package]] name = "click" -version = "8.3.0" +version = "8.5.0" source = { registry = "https://pypi.org/simple" } -dependencies = [ - { name = "colorama", marker = "sys_platform == 'win32'" }, -] -sdist = { url = "https://files.pythonhosted.org/packages/46/61/de6cd827efad202d7057d93e0fed9294b96952e188f7384832791c7b2254/click-8.3.0.tar.gz", hash = "sha256:e7b8232224eba16f4ebe410c25ced9f7875cb5f3263ffc93cc3e8da705e229c4", size = 276943, upload-time = "2025-09-18T17:32:23.696Z" } +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/db/d3/9dcc0f5797f070ec8edf30fbadfb200e71d9db6b84d211e3b2085a7589a0/click-8.3.0-py3-none-any.whl", hash = "sha256:9b9f285302c6e3064f4330c05f05b81945b2a39544279343e6e7c5f27a9baddc", size = 107295, upload-time = "2025-09-18T17:32:22.42Z" }, + { 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]] @@ -184,16 +232,16 @@ wheels = [ [[package]] name = "docker" -version = "7.1.0" +version = "7.2.0" source = { registry = "https://pypi.org/simple" } dependencies = [ { name = "pywin32", marker = "sys_platform == 'win32'" }, { name = "requests" }, { name = "urllib3" }, ] -sdist = { url = "https://files.pythonhosted.org/packages/91/9b/4a2ea29aeba62471211598dac5d96825bb49348fa07e906ea930394a83ce/docker-7.1.0.tar.gz", hash = "sha256:ad8c70e6e3f8926cb8a92619b832b4ea5299e2831c14284663184e200546fa6c", size = 117834, upload-time = "2024-05-23T11:13:57.216Z" } +sdist = { url = "https://files.pythonhosted.org/packages/88/7f/731ff914b0255d3d065f45fd4e626d4b8c95dbcbaada049f337a6ac16410/docker-7.2.0.tar.gz", hash = "sha256:cebb93773d334f778e023a7ee352a8d6e13ab1bd3b863a4d4a59dec897df43ac", size = 118731, upload-time = "2026-07-09T14:53:46.39Z" } wheels = [ - { url = "https://files.pythonhosted.org/packages/e3/26/57c6fb270950d476074c087527a558ccb6f4436657314bfb6cdf484114c4/docker-7.1.0-py3-none-any.whl", hash = "sha256:c96b93b7f0a746f9e77d325bcfb87422a3d8bd4f03136ae8a85b37f1898d5fc0", size = 147774, upload-time = "2024-05-23T11:13:55.01Z" }, + { url = "https://files.pythonhosted.org/packages/75/23/529140fe1aab80fc6992f93a706deec709140a6397439139a054e1515c45/docker-7.2.0-py3-none-any.whl", hash = "sha256:a3f45fdeb9165e2d25d9a1d02ddf3bc70fb572cf5ebbf9b58558c22caf29b71f", size = 148775, upload-time = "2026-07-09T14:53:45.224Z" }, ] [[package]] @@ -209,24 +257,21 @@ wheels = [ ] [[package]] -name = "griffe" -version = "1.14.0" +name = "griffelib" +version = "2.3.0" source = { registry = "https://pypi.org/simple" } -dependencies = [ - { name = "colorama" }, -] -sdist = { url = "https://files.pythonhosted.org/packages/ec/d7/6c09dd7ce4c7837e4cdb11dce980cb45ae3cd87677298dc3b781b6bce7d3/griffe-1.14.0.tar.gz", hash = "sha256:9d2a15c1eca966d68e00517de5d69dd1bc5c9f2335ef6c1775362ba5b8651a13", size = 424684, upload-time = "2025-09-05T15:02:29.167Z" } +sdist = { url = "https://files.pythonhosted.org/packages/27/af/018c10bc9edd42b6ef6db2e96b09542050d5253f9b195e74bc910b2d13ab/griffelib-2.3.0.tar.gz", hash = "sha256:7b0952caf5bca6afa4bb5ee8c6a2d183fe3f21b62efc5f6c7243cb2b26d2d115", size = 234534, upload-time = "2026-09-04T15:08:17.472Z" } wheels = [ - { url = "https://files.pythonhosted.org/packages/2a/b1/9ff6578d789a89812ff21e4e0f80ffae20a65d5dd84e7a17873fe3b365be/griffe-1.14.0-py3-none-any.whl", hash = "sha256:0e9d52832cccf0f7188cfe585ba962d2674b241c01916d780925df34873bceb0", size = 144439, upload-time = "2025-09-05T15:02:27.511Z" }, + { url = "https://files.pythonhosted.org/packages/41/63/e876e789525063c840ccfa8857febdabd6523bcef9ce7eb979b9305ea895/griffelib-2.3.0-py3-none-any.whl", hash = "sha256:1b8f9cd525681c26b1d6d574faa1371651e8459ca51d209684f50b8096ae06e0", size = 169423, upload-time = "2026-09-04T15:08:12.956Z" }, ] [[package]] name = "idna" -version = "3.10" +version = "3.20" source = { registry = "https://pypi.org/simple" } -sdist = { url = "https://files.pythonhosted.org/packages/f1/70/7703c29685631f5a7590aa73f1f1d3fa9a380e654b86af429e0934a32f7d/idna-3.10.tar.gz", hash = "sha256:12f65c9b470abda6dc35cf8e63cc574b1c52b11df2c86030af0ac09b01b13ea9", size = 190490, upload-time = "2024-09-15T18:07:39.745Z" } +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/76/c6/c88e154df9c4e1a2a66ccf0005a88dfb2650c1dffb6f5ce603dfbd452ce3/idna-3.10-py3-none-any.whl", hash = "sha256:946d195a0d259cbba61165e88e65941f16e9b36ea6ddb97f00452bae8b1287d3", size = 70442, upload-time = "2024-09-15T18:07:37.964Z" }, + { 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]] @@ -243,23 +288,23 @@ wheels = [ [[package]] name = "markdown" -version = "3.9" +version = "3.10.3" source = { registry = "https://pypi.org/simple" } -sdist = { url = "https://files.pythonhosted.org/packages/8d/37/02347f6d6d8279247a5837082ebc26fc0d5aaeaf75aa013fcbb433c777ab/markdown-3.9.tar.gz", hash = "sha256:d2900fe1782bd33bdbbd56859defef70c2e78fc46668f8eb9df3128138f2cb6a", size = 364585, upload-time = "2025-09-04T20:25:22.885Z" } +sdist = { url = "https://files.pythonhosted.org/packages/29/6f/da4c6aea59b3001f2e8c0ec7497475aadaf3b021c10cab5b2858f0f32b26/markdown-3.10.3.tar.gz", hash = "sha256:3589362618f743188b4d955b874402bc814f4f83f544dc207719f4baa7d9c45f", size = 372596, upload-time = "2026-07-30T19:05:29.005Z" } wheels = [ - { url = "https://files.pythonhosted.org/packages/70/ae/44c4a6a4cbb496d93c6257954260fe3a6e91b7bed2240e5dad2a717f5111/markdown-3.9-py3-none-any.whl", hash = "sha256:9f4d91ed810864ea88a6f32c07ba8bee1346c0cc1f6b1f9f6c822f2a9667d280", size = 107441, upload-time = "2025-09-04T20:25:21.784Z" }, + { url = "https://files.pythonhosted.org/packages/64/69/4a5af2bc115a9a33fefe51709749de8262be3f9ba063d1753a837cdbc49c/markdown-3.10.3-py3-none-any.whl", hash = "sha256:fa6c92a00a4a3c98b22728c64a935ae1928250ae65058a6ded814d2cc29a4cea", size = 110757, upload-time = "2026-07-30T19:05:27.883Z" }, ] [[package]] name = "markdown-it-py" -version = "4.0.0" +version = "4.2.0" source = { registry = "https://pypi.org/simple" } dependencies = [ { name = "mdurl" }, ] -sdist = { url = "https://files.pythonhosted.org/packages/5b/f5/4ec618ed16cc4f8fb3b701563655a69816155e79e24a17b651541804721d/markdown_it_py-4.0.0.tar.gz", hash = "sha256:cb0a2b4aa34f932c007117b194e945bd74e0ec24133ceb5bac59009cda1cb9f3", size = 73070, upload-time = "2025-08-11T12:57:52.854Z" } +sdist = { url = "https://files.pythonhosted.org/packages/06/ff/7841249c247aa650a76b9ee4bbaeae59370dc8bfd2f6c01f3630c35eb134/markdown_it_py-4.2.0.tar.gz", hash = "sha256:04a21681d6fbb623de53f6f364d352309d4094dd4194040a10fd51833e418d49", size = 82454, upload-time = "2026-05-07T12:08:28.36Z" } wheels = [ - { url = "https://files.pythonhosted.org/packages/94/54/e7d793b573f298e1c9013b8c4dade17d481164aa517d1d7148619c2cedbf/markdown_it_py-4.0.0-py3-none-any.whl", hash = "sha256:87327c59b172c5011896038353a81343b6754500a08cd7a4973bb48c6d578147", size = 87321, upload-time = "2025-08-11T12:57:51.923Z" }, + { url = "https://files.pythonhosted.org/packages/b3/81/4da04ced5a082363ecfa159c010d200ecbd959ae410c10c0264a38cac0f5/markdown_it_py-4.2.0-py3-none-any.whl", hash = "sha256:9f7ebbcd14fe59494226453aed97c1070d83f8d24b6fc3a3bcf9a38092641c4a", size = 91687, upload-time = "2026-05-07T12:08:27.182Z" }, ] [[package]] @@ -268,50 +313,6 @@ version = "3.0.3" source = { registry = "https://pypi.org/simple" } sdist = { url = "https://files.pythonhosted.org/packages/7e/99/7690b6d4034fffd95959cbe0c02de8deb3098cc577c67bb6a24fe5d7caa7/markupsafe-3.0.3.tar.gz", hash = "sha256:722695808f4b6457b320fdc131280796bdceb04ab50fe1795cd540799ebe1698", size = 80313, upload-time = "2025-09-27T18:37:40.426Z" } wheels = [ - { url = "https://files.pythonhosted.org/packages/08/db/fefacb2136439fc8dd20e797950e749aa1f4997ed584c62cfb8ef7c2be0e/markupsafe-3.0.3-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:1cc7ea17a6824959616c525620e387f6dd30fec8cb44f649e31712db02123dad", size = 11631, upload-time = "2025-09-27T18:36:18.185Z" }, - { url = "https://files.pythonhosted.org/packages/e1/2e/5898933336b61975ce9dc04decbc0a7f2fee78c30353c5efba7f2d6ff27a/markupsafe-3.0.3-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:4bd4cd07944443f5a265608cc6aab442e4f74dff8088b0dfc8238647b8f6ae9a", size = 12058, upload-time = "2025-09-27T18:36:19.444Z" }, - { url = "https://files.pythonhosted.org/packages/1d/09/adf2df3699d87d1d8184038df46a9c80d78c0148492323f4693df54e17bb/markupsafe-3.0.3-cp311-cp311-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:6b5420a1d9450023228968e7e6a9ce57f65d148ab56d2313fcd589eee96a7a50", size = 24287, upload-time = "2025-09-27T18:36:20.768Z" }, - { url = "https://files.pythonhosted.org/packages/30/ac/0273f6fcb5f42e314c6d8cd99effae6a5354604d461b8d392b5ec9530a54/markupsafe-3.0.3-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:0bf2a864d67e76e5c9a34dc26ec616a66b9888e25e7b9460e1c76d3293bd9dbf", size = 22940, upload-time = "2025-09-27T18:36:22.249Z" }, - { url = "https://files.pythonhosted.org/packages/19/ae/31c1be199ef767124c042c6c3e904da327a2f7f0cd63a0337e1eca2967a8/markupsafe-3.0.3-cp311-cp311-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:bc51efed119bc9cfdf792cdeaa4d67e8f6fcccab66ed4bfdd6bde3e59bfcbb2f", size = 21887, upload-time = "2025-09-27T18:36:23.535Z" }, - { url = "https://files.pythonhosted.org/packages/b2/76/7edcab99d5349a4532a459e1fe64f0b0467a3365056ae550d3bcf3f79e1e/markupsafe-3.0.3-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:068f375c472b3e7acbe2d5318dea141359e6900156b5b2ba06a30b169086b91a", size = 23692, upload-time = "2025-09-27T18:36:24.823Z" }, - { url = "https://files.pythonhosted.org/packages/a4/28/6e74cdd26d7514849143d69f0bf2399f929c37dc2b31e6829fd2045b2765/markupsafe-3.0.3-cp311-cp311-musllinux_1_2_riscv64.whl", hash = "sha256:7be7b61bb172e1ed687f1754f8e7484f1c8019780f6f6b0786e76bb01c2ae115", size = 21471, upload-time = "2025-09-27T18:36:25.95Z" }, - { url = "https://files.pythonhosted.org/packages/62/7e/a145f36a5c2945673e590850a6f8014318d5577ed7e5920a4b3448e0865d/markupsafe-3.0.3-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:f9e130248f4462aaa8e2552d547f36ddadbeaa573879158d721bbd33dfe4743a", size = 22923, upload-time = "2025-09-27T18:36:27.109Z" }, - { url = "https://files.pythonhosted.org/packages/0f/62/d9c46a7f5c9adbeeeda52f5b8d802e1094e9717705a645efc71b0913a0a8/markupsafe-3.0.3-cp311-cp311-win32.whl", hash = "sha256:0db14f5dafddbb6d9208827849fad01f1a2609380add406671a26386cdf15a19", size = 14572, upload-time = "2025-09-27T18:36:28.045Z" }, - { url = "https://files.pythonhosted.org/packages/83/8a/4414c03d3f891739326e1783338e48fb49781cc915b2e0ee052aa490d586/markupsafe-3.0.3-cp311-cp311-win_amd64.whl", hash = "sha256:de8a88e63464af587c950061a5e6a67d3632e36df62b986892331d4620a35c01", size = 15077, upload-time = "2025-09-27T18:36:29.025Z" }, - { url = "https://files.pythonhosted.org/packages/35/73/893072b42e6862f319b5207adc9ae06070f095b358655f077f69a35601f0/markupsafe-3.0.3-cp311-cp311-win_arm64.whl", hash = "sha256:3b562dd9e9ea93f13d53989d23a7e775fdfd1066c33494ff43f5418bc8c58a5c", size = 13876, upload-time = "2025-09-27T18:36:29.954Z" }, - { url = "https://files.pythonhosted.org/packages/5a/72/147da192e38635ada20e0a2e1a51cf8823d2119ce8883f7053879c2199b5/markupsafe-3.0.3-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:d53197da72cc091b024dd97249dfc7794d6a56530370992a5e1a08983ad9230e", size = 11615, upload-time = "2025-09-27T18:36:30.854Z" }, - { url = "https://files.pythonhosted.org/packages/9a/81/7e4e08678a1f98521201c3079f77db69fb552acd56067661f8c2f534a718/markupsafe-3.0.3-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:1872df69a4de6aead3491198eaf13810b565bdbeec3ae2dc8780f14458ec73ce", size = 12020, upload-time = "2025-09-27T18:36:31.971Z" }, - { url = "https://files.pythonhosted.org/packages/1e/2c/799f4742efc39633a1b54a92eec4082e4f815314869865d876824c257c1e/markupsafe-3.0.3-cp312-cp312-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:3a7e8ae81ae39e62a41ec302f972ba6ae23a5c5396c8e60113e9066ef893da0d", size = 24332, upload-time = "2025-09-27T18:36:32.813Z" }, - { url = "https://files.pythonhosted.org/packages/3c/2e/8d0c2ab90a8c1d9a24f0399058ab8519a3279d1bd4289511d74e909f060e/markupsafe-3.0.3-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:d6dd0be5b5b189d31db7cda48b91d7e0a9795f31430b7f271219ab30f1d3ac9d", size = 22947, upload-time = "2025-09-27T18:36:33.86Z" }, - { url = "https://files.pythonhosted.org/packages/2c/54/887f3092a85238093a0b2154bd629c89444f395618842e8b0c41783898ea/markupsafe-3.0.3-cp312-cp312-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:94c6f0bb423f739146aec64595853541634bde58b2135f27f61c1ffd1cd4d16a", size = 21962, upload-time = "2025-09-27T18:36:35.099Z" }, - { url = "https://files.pythonhosted.org/packages/c9/2f/336b8c7b6f4a4d95e91119dc8521402461b74a485558d8f238a68312f11c/markupsafe-3.0.3-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:be8813b57049a7dc738189df53d69395eba14fb99345e0a5994914a3864c8a4b", size = 23760, upload-time = "2025-09-27T18:36:36.001Z" }, - { url = "https://files.pythonhosted.org/packages/32/43/67935f2b7e4982ffb50a4d169b724d74b62a3964bc1a9a527f5ac4f1ee2b/markupsafe-3.0.3-cp312-cp312-musllinux_1_2_riscv64.whl", hash = "sha256:83891d0e9fb81a825d9a6d61e3f07550ca70a076484292a70fde82c4b807286f", size = 21529, upload-time = "2025-09-27T18:36:36.906Z" }, - { url = "https://files.pythonhosted.org/packages/89/e0/4486f11e51bbba8b0c041098859e869e304d1c261e59244baa3d295d47b7/markupsafe-3.0.3-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:77f0643abe7495da77fb436f50f8dab76dbc6e5fd25d39589a0f1fe6548bfa2b", size = 23015, upload-time = "2025-09-27T18:36:37.868Z" }, - { url = "https://files.pythonhosted.org/packages/2f/e1/78ee7a023dac597a5825441ebd17170785a9dab23de95d2c7508ade94e0e/markupsafe-3.0.3-cp312-cp312-win32.whl", hash = "sha256:d88b440e37a16e651bda4c7c2b930eb586fd15ca7406cb39e211fcff3bf3017d", size = 14540, upload-time = "2025-09-27T18:36:38.761Z" }, - { url = "https://files.pythonhosted.org/packages/aa/5b/bec5aa9bbbb2c946ca2733ef9c4ca91c91b6a24580193e891b5f7dbe8e1e/markupsafe-3.0.3-cp312-cp312-win_amd64.whl", hash = "sha256:26a5784ded40c9e318cfc2bdb30fe164bdb8665ded9cd64d500a34fb42067b1c", size = 15105, upload-time = "2025-09-27T18:36:39.701Z" }, - { url = "https://files.pythonhosted.org/packages/e5/f1/216fc1bbfd74011693a4fd837e7026152e89c4bcf3e77b6692fba9923123/markupsafe-3.0.3-cp312-cp312-win_arm64.whl", hash = "sha256:35add3b638a5d900e807944a078b51922212fb3dedb01633a8defc4b01a3c85f", size = 13906, upload-time = "2025-09-27T18:36:40.689Z" }, - { url = "https://files.pythonhosted.org/packages/38/2f/907b9c7bbba283e68f20259574b13d005c121a0fa4c175f9bed27c4597ff/markupsafe-3.0.3-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:e1cf1972137e83c5d4c136c43ced9ac51d0e124706ee1c8aa8532c1287fa8795", size = 11622, upload-time = "2025-09-27T18:36:41.777Z" }, - { url = "https://files.pythonhosted.org/packages/9c/d9/5f7756922cdd676869eca1c4e3c0cd0df60ed30199ffd775e319089cb3ed/markupsafe-3.0.3-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:116bb52f642a37c115f517494ea5feb03889e04df47eeff5b130b1808ce7c219", size = 12029, upload-time = "2025-09-27T18:36:43.257Z" }, - { url = "https://files.pythonhosted.org/packages/00/07/575a68c754943058c78f30db02ee03a64b3c638586fba6a6dd56830b30a3/markupsafe-3.0.3-cp313-cp313-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:133a43e73a802c5562be9bbcd03d090aa5a1fe899db609c29e8c8d815c5f6de6", size = 24374, upload-time = "2025-09-27T18:36:44.508Z" }, - { url = "https://files.pythonhosted.org/packages/a9/21/9b05698b46f218fc0e118e1f8168395c65c8a2c750ae2bab54fc4bd4e0e8/markupsafe-3.0.3-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:ccfcd093f13f0f0b7fdd0f198b90053bf7b2f02a3927a30e63f3ccc9df56b676", size = 22980, upload-time = "2025-09-27T18:36:45.385Z" }, - { url = "https://files.pythonhosted.org/packages/7f/71/544260864f893f18b6827315b988c146b559391e6e7e8f7252839b1b846a/markupsafe-3.0.3-cp313-cp313-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:509fa21c6deb7a7a273d629cf5ec029bc209d1a51178615ddf718f5918992ab9", size = 21990, upload-time = "2025-09-27T18:36:46.916Z" }, - { url = "https://files.pythonhosted.org/packages/c2/28/b50fc2f74d1ad761af2f5dcce7492648b983d00a65b8c0e0cb457c82ebbe/markupsafe-3.0.3-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:a4afe79fb3de0b7097d81da19090f4df4f8d3a2b3adaa8764138aac2e44f3af1", size = 23784, upload-time = "2025-09-27T18:36:47.884Z" }, - { url = "https://files.pythonhosted.org/packages/ed/76/104b2aa106a208da8b17a2fb72e033a5a9d7073c68f7e508b94916ed47a9/markupsafe-3.0.3-cp313-cp313-musllinux_1_2_riscv64.whl", hash = "sha256:795e7751525cae078558e679d646ae45574b47ed6e7771863fcc079a6171a0fc", size = 21588, upload-time = "2025-09-27T18:36:48.82Z" }, - { url = "https://files.pythonhosted.org/packages/b5/99/16a5eb2d140087ebd97180d95249b00a03aa87e29cc224056274f2e45fd6/markupsafe-3.0.3-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:8485f406a96febb5140bfeca44a73e3ce5116b2501ac54fe953e488fb1d03b12", size = 23041, upload-time = "2025-09-27T18:36:49.797Z" }, - { url = "https://files.pythonhosted.org/packages/19/bc/e7140ed90c5d61d77cea142eed9f9c303f4c4806f60a1044c13e3f1471d0/markupsafe-3.0.3-cp313-cp313-win32.whl", hash = "sha256:bdd37121970bfd8be76c5fb069c7751683bdf373db1ed6c010162b2a130248ed", size = 14543, upload-time = "2025-09-27T18:36:51.584Z" }, - { url = "https://files.pythonhosted.org/packages/05/73/c4abe620b841b6b791f2edc248f556900667a5a1cf023a6646967ae98335/markupsafe-3.0.3-cp313-cp313-win_amd64.whl", hash = "sha256:9a1abfdc021a164803f4d485104931fb8f8c1efd55bc6b748d2f5774e78b62c5", size = 15113, upload-time = "2025-09-27T18:36:52.537Z" }, - { url = "https://files.pythonhosted.org/packages/f0/3a/fa34a0f7cfef23cf9500d68cb7c32dd64ffd58a12b09225fb03dd37d5b80/markupsafe-3.0.3-cp313-cp313-win_arm64.whl", hash = "sha256:7e68f88e5b8799aa49c85cd116c932a1ac15caaa3f5db09087854d218359e485", size = 13911, upload-time = "2025-09-27T18:36:53.513Z" }, - { url = "https://files.pythonhosted.org/packages/e4/d7/e05cd7efe43a88a17a37b3ae96e79a19e846f3f456fe79c57ca61356ef01/markupsafe-3.0.3-cp313-cp313t-macosx_10_13_x86_64.whl", hash = "sha256:218551f6df4868a8d527e3062d0fb968682fe92054e89978594c28e642c43a73", size = 11658, upload-time = "2025-09-27T18:36:54.819Z" }, - { url = "https://files.pythonhosted.org/packages/99/9e/e412117548182ce2148bdeacdda3bb494260c0b0184360fe0d56389b523b/markupsafe-3.0.3-cp313-cp313t-macosx_11_0_arm64.whl", hash = "sha256:3524b778fe5cfb3452a09d31e7b5adefeea8c5be1d43c4f810ba09f2ceb29d37", size = 12066, upload-time = "2025-09-27T18:36:55.714Z" }, - { url = "https://files.pythonhosted.org/packages/bc/e6/fa0ffcda717ef64a5108eaa7b4f5ed28d56122c9a6d70ab8b72f9f715c80/markupsafe-3.0.3-cp313-cp313t-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:4e885a3d1efa2eadc93c894a21770e4bc67899e3543680313b09f139e149ab19", size = 25639, upload-time = "2025-09-27T18:36:56.908Z" }, - { url = "https://files.pythonhosted.org/packages/96/ec/2102e881fe9d25fc16cb4b25d5f5cde50970967ffa5dddafdb771237062d/markupsafe-3.0.3-cp313-cp313t-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:8709b08f4a89aa7586de0aadc8da56180242ee0ada3999749b183aa23df95025", size = 23569, upload-time = "2025-09-27T18:36:57.913Z" }, - { url = "https://files.pythonhosted.org/packages/4b/30/6f2fce1f1f205fc9323255b216ca8a235b15860c34b6798f810f05828e32/markupsafe-3.0.3-cp313-cp313t-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:b8512a91625c9b3da6f127803b166b629725e68af71f8184ae7e7d54686a56d6", size = 23284, upload-time = "2025-09-27T18:36:58.833Z" }, - { url = "https://files.pythonhosted.org/packages/58/47/4a0ccea4ab9f5dcb6f79c0236d954acb382202721e704223a8aafa38b5c8/markupsafe-3.0.3-cp313-cp313t-musllinux_1_2_aarch64.whl", hash = "sha256:9b79b7a16f7fedff2495d684f2b59b0457c3b493778c9eed31111be64d58279f", size = 24801, upload-time = "2025-09-27T18:36:59.739Z" }, - { url = "https://files.pythonhosted.org/packages/6a/70/3780e9b72180b6fecb83a4814d84c3bf4b4ae4bf0b19c27196104149734c/markupsafe-3.0.3-cp313-cp313t-musllinux_1_2_riscv64.whl", hash = "sha256:12c63dfb4a98206f045aa9563db46507995f7ef6d83b2f68eda65c307c6829eb", size = 22769, upload-time = "2025-09-27T18:37:00.719Z" }, - { url = "https://files.pythonhosted.org/packages/98/c5/c03c7f4125180fc215220c035beac6b9cb684bc7a067c84fc69414d315f5/markupsafe-3.0.3-cp313-cp313t-musllinux_1_2_x86_64.whl", hash = "sha256:8f71bc33915be5186016f675cd83a1e08523649b0e33efdb898db577ef5bb009", size = 23642, upload-time = "2025-09-27T18:37:01.673Z" }, - { url = "https://files.pythonhosted.org/packages/80/d6/2d1b89f6ca4bff1036499b1e29a1d02d282259f3681540e16563f27ebc23/markupsafe-3.0.3-cp313-cp313t-win32.whl", hash = "sha256:69c0b73548bc525c8cb9a251cddf1931d1db4d2258e9599c28c07ef3580ef354", size = 14612, upload-time = "2025-09-27T18:37:02.639Z" }, - { url = "https://files.pythonhosted.org/packages/2b/98/e48a4bfba0a0ffcf9925fe2d69240bfaa19c6f7507b8cd09c70684a53c1e/markupsafe-3.0.3-cp313-cp313t-win_amd64.whl", hash = "sha256:1b4b79e8ebf6b55351f0d91fe80f893b4743f104bff22e90697db1590e47a218", size = 15200, upload-time = "2025-09-27T18:37:03.582Z" }, - { url = "https://files.pythonhosted.org/packages/0e/72/e3cc540f351f316e9ed0f092757459afbc595824ca724cbc5a5d4263713f/markupsafe-3.0.3-cp313-cp313t-win_arm64.whl", hash = "sha256:ad2cf8aa28b8c020ab2fc8287b0f823d0a7d8630784c31e9ee5edea20f406287", size = 13973, upload-time = "2025-09-27T18:37:04.929Z" }, { url = "https://files.pythonhosted.org/packages/33/8a/8e42d4838cd89b7dde187011e97fe6c3af66d8c044997d2183fbd6d31352/markupsafe-3.0.3-cp314-cp314-macosx_10_13_x86_64.whl", hash = "sha256:eaa9599de571d72e2daf60164784109f19978b327a3910d3e9de8c97b5b70cfe", size = 11619, upload-time = "2025-09-27T18:37:06.342Z" }, { url = "https://files.pythonhosted.org/packages/b5/64/7660f8a4a8e53c924d0fa05dc3a55c9cee10bbd82b11c5afb27d44b096ce/markupsafe-3.0.3-cp314-cp314-macosx_11_0_arm64.whl", hash = "sha256:c47a551199eb8eb2121d4f0f15ae0f923d31350ab9280078d1e5f12b249e0026", size = 12029, upload-time = "2025-09-27T18:37:07.213Z" }, { url = "https://files.pythonhosted.org/packages/da/ef/e648bfd021127bef5fa12e1720ffed0c6cbb8310c8d9bea7266337ff06de/markupsafe-3.0.3-cp314-cp314-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:f34c41761022dd093b4b6896d4810782ffbabe30f2d443ff5f083e0cbbb8c737", size = 24408, upload-time = "2025-09-27T18:37:09.572Z" }, @@ -394,35 +395,35 @@ wheels = [ [[package]] name = "mkdocs-autorefs" -version = "1.4.3" +version = "1.4.4" source = { registry = "https://pypi.org/simple" } dependencies = [ { name = "markdown" }, { name = "markupsafe" }, { name = "mkdocs" }, ] -sdist = { url = "https://files.pythonhosted.org/packages/51/fa/9124cd63d822e2bcbea1450ae68cdc3faf3655c69b455f3a7ed36ce6c628/mkdocs_autorefs-1.4.3.tar.gz", hash = "sha256:beee715b254455c4aa93b6ef3c67579c399ca092259cc41b7d9342573ff1fc75", size = 55425, upload-time = "2025-08-26T14:23:17.223Z" } +sdist = { url = "https://files.pythonhosted.org/packages/52/c0/f641843de3f612a6b48253f39244165acff36657a91cc903633d456ae1ac/mkdocs_autorefs-1.4.4.tar.gz", hash = "sha256:d54a284f27a7346b9c38f1f852177940c222da508e66edc816a0fa55fc6da197", size = 56588, upload-time = "2026-02-10T15:23:55.105Z" } wheels = [ - { url = "https://files.pythonhosted.org/packages/9f/4d/7123b6fa2278000688ebd338e2a06d16870aaf9eceae6ba047ea05f92df1/mkdocs_autorefs-1.4.3-py3-none-any.whl", hash = "sha256:469d85eb3114801d08e9cc55d102b3ba65917a869b893403b8987b601cf55dc9", size = 25034, upload-time = "2025-08-26T14:23:15.906Z" }, + { url = "https://files.pythonhosted.org/packages/28/de/a3e710469772c6a89595fc52816da05c1e164b4c866a89e3cb82fb1b67c5/mkdocs_autorefs-1.4.4-py3-none-any.whl", hash = "sha256:834ef5408d827071ad1bc69e0f39704fa34c7fc05bc8e1c72b227dfdc5c76089", size = 25530, upload-time = "2026-02-10T15:23:53.817Z" }, ] [[package]] name = "mkdocs-get-deps" -version = "0.2.0" +version = "0.2.2" source = { registry = "https://pypi.org/simple" } dependencies = [ { name = "mergedeep" }, { name = "platformdirs" }, { name = "pyyaml" }, ] -sdist = { url = "https://files.pythonhosted.org/packages/98/f5/ed29cd50067784976f25ed0ed6fcd3c2ce9eb90650aa3b2796ddf7b6870b/mkdocs_get_deps-0.2.0.tar.gz", hash = "sha256:162b3d129c7fad9b19abfdcb9c1458a651628e4b1dea628ac68790fb3061c60c", size = 10239, upload-time = "2023-11-20T17:51:09.981Z" } +sdist = { url = "https://files.pythonhosted.org/packages/ce/25/b3cccb187655b9393572bde9b09261d267c3bf2f2cdabe347673be5976a6/mkdocs_get_deps-0.2.2.tar.gz", hash = "sha256:8ee8d5f316cdbbb2834bc1df6e69c08fe769a83e040060de26d3c19fad3599a1", size = 11047, upload-time = "2026-03-10T02:46:33.632Z" } wheels = [ - { url = "https://files.pythonhosted.org/packages/9f/d4/029f984e8d3f3b6b726bd33cafc473b75e9e44c0f7e80a5b29abc466bdea/mkdocs_get_deps-0.2.0-py3-none-any.whl", hash = "sha256:2bf11d0b133e77a0dd036abeeb06dec8775e46efa526dc70667d8863eefc6134", size = 9521, upload-time = "2023-11-20T17:51:08.587Z" }, + { url = "https://files.pythonhosted.org/packages/88/29/744136411e785c4b0b744d5413e56555265939ab3a104c6a4b719dad33fd/mkdocs_get_deps-0.2.2-py3-none-any.whl", hash = "sha256:e7878cbeac04860b8b5e0ca31d3abad3df9411a75a32cde82f8e44b6c16ff650", size = 9555, upload-time = "2026-03-10T02:46:32.256Z" }, ] [[package]] name = "mkdocs-material" -version = "9.6.21" +version = "9.7.7" source = { registry = "https://pypi.org/simple" } dependencies = [ { name = "babel" }, @@ -437,9 +438,9 @@ dependencies = [ { name = "pymdown-extensions" }, { name = "requests" }, ] -sdist = { url = "https://files.pythonhosted.org/packages/ff/d5/ab83ca9aa314954b0a9e8849780bdd01866a3cfcb15ffb7e3a61ca06ff0b/mkdocs_material-9.6.21.tar.gz", hash = "sha256:b01aa6d2731322438056f360f0e623d3faae981f8f2d8c68b1b973f4f2657870", size = 4043097, upload-time = "2025-09-30T19:11:27.517Z" } +sdist = { url = "https://files.pythonhosted.org/packages/f1/cd/c05d3a530ba7934f144fb45f7203cd236adc25c7bdcc34673d202f4b0278/mkdocs_material-9.7.7.tar.gz", hash = "sha256:c0649c065b1b0512d60aad8c10f947f8e455284475239b364b610f2deb4d0855", size = 4097923, upload-time = "2026-07-17T16:21:33.156Z" } wheels = [ - { url = "https://files.pythonhosted.org/packages/cf/4f/98681c2030375fe9b057dbfb9008b68f46c07dddf583f4df09bf8075e37f/mkdocs_material-9.6.21-py3-none-any.whl", hash = "sha256:aa6a5ab6fb4f6d381588ac51da8782a4d3757cb3d1b174f81a2ec126e1f22c92", size = 9203097, upload-time = "2025-09-30T19:11:24.063Z" }, + { url = "https://files.pythonhosted.org/packages/ad/21/17c1bc9e6f47c972ad66fb2ac2568f99f90f1207eeb6fc3b34d094dba7b5/mkdocs_material-9.7.7-py3-none-any.whl", hash = "sha256:8ea9bb1737a5b524a5f9dcf2e1b4ebda8274ae3008aa7845720a97083bef708f", size = 9305438, upload-time = "2026-07-17T16:21:30.017Z" }, ] [[package]] @@ -453,7 +454,7 @@ wheels = [ [[package]] name = "mkdocstrings" -version = "0.30.1" +version = "1.0.6" source = { registry = "https://pypi.org/simple" } dependencies = [ { name = "jinja2" }, @@ -463,9 +464,9 @@ dependencies = [ { name = "mkdocs-autorefs" }, { name = "pymdown-extensions" }, ] -sdist = { url = "https://files.pythonhosted.org/packages/c5/33/2fa3243439f794e685d3e694590d28469a9b8ea733af4b48c250a3ffc9a0/mkdocstrings-0.30.1.tar.gz", hash = "sha256:84a007aae9b707fb0aebfc9da23db4b26fc9ab562eb56e335e9ec480cb19744f", size = 106350, upload-time = "2025-09-19T10:49:26.446Z" } +sdist = { url = "https://files.pythonhosted.org/packages/53/71/f85bdf13355073ae15a7375f09879375a830553552e58c1c4b7e0bbc5c8b/mkdocstrings-1.0.6.tar.gz", hash = "sha256:a0b8c2bdd29a6416c80d717aa369bbf7831946bd9f23c2a66db1b1dbe7693dbd", size = 100649, upload-time = "2026-07-11T19:38:05.732Z" } wheels = [ - { url = "https://files.pythonhosted.org/packages/7b/2c/f0dc4e1ee7f618f5bff7e05898d20bf8b6e7fa612038f768bfa295f136a4/mkdocstrings-0.30.1-py3-none-any.whl", hash = "sha256:41bd71f284ca4d44a668816193e4025c950b002252081e387433656ae9a70a82", size = 36704, upload-time = "2025-09-19T10:49:24.805Z" }, + { url = "https://files.pythonhosted.org/packages/5d/5b/4c1902e8bdd5c4db63284e9d101dece4038d4025d6d88850ffe0a1578980/mkdocstrings-1.0.6-py3-none-any.whl", hash = "sha256:2703708697487d1b6d6d7b412e176fa436edf120c1bf81dc9e126b12d00893c7", size = 35787, upload-time = "2026-07-11T19:38:04.417Z" }, ] [package.optional-dependencies] @@ -475,25 +476,25 @@ python = [ [[package]] name = "mkdocstrings-python" -version = "1.18.2" +version = "2.0.8" source = { registry = "https://pypi.org/simple" } dependencies = [ - { name = "griffe" }, + { name = "griffelib" }, { name = "mkdocs-autorefs" }, { name = "mkdocstrings" }, ] -sdist = { url = "https://files.pythonhosted.org/packages/95/ae/58ab2bfbee2792e92a98b97e872f7c003deb903071f75d8d83aa55db28fa/mkdocstrings_python-1.18.2.tar.gz", hash = "sha256:4ad536920a07b6336f50d4c6d5603316fafb1172c5c882370cbbc954770ad323", size = 207972, upload-time = "2025-08-28T16:11:19.847Z" } +sdist = { url = "https://files.pythonhosted.org/packages/c5/65/0db919b7c91bf033b42d04f15ff16a56f4edd6afb26e84d448359660ece3/mkdocstrings_python-2.0.8.tar.gz", hash = "sha256:34545b54681cf0b212aab95394d37b0f5326a93b102f6ad1df3d965c79384c9d", size = 201771, upload-time = "2026-08-31T20:16:06.698Z" } wheels = [ - { url = "https://files.pythonhosted.org/packages/d5/8f/ce008599d9adebf33ed144e7736914385e8537f5fc686fdb7cceb8c22431/mkdocstrings_python-1.18.2-py3-none-any.whl", hash = "sha256:944fe6deb8f08f33fa936d538233c4036e9f53e840994f6146e8e94eb71b600d", size = 138215, upload-time = "2025-08-28T16:11:18.176Z" }, + { url = "https://files.pythonhosted.org/packages/0b/b7/a5a854d4e44853f26decc0c5e0d68df052399f3da344a313da4178f00816/mkdocstrings_python-2.0.8-py3-none-any.whl", hash = "sha256:e555d9ef53b0febdeae4dd603144d4f86ec90fef672276645ea3bb61232c3d24", size = 105443, upload-time = "2026-08-31T20:16:05.25Z" }, ] [[package]] name = "packaging" -version = "25.0" +version = "26.3" source = { registry = "https://pypi.org/simple" } -sdist = { url = "https://files.pythonhosted.org/packages/a1/d4/1fc4078c65507b51b96ca8f8c3ba19e6a61c8253c72794544580a7b6c24d/packaging-25.0.tar.gz", hash = "sha256:d443872c98d677bf60f6a1f2f8c1cb748e8fe762d2bf9d3148b5599295b0fc4f", size = 165727, upload-time = "2025-04-19T11:48:59.673Z" } +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/20/12/38679034af332785aac8774540895e234f4d07f7545804097de4b666afd8/packaging-25.0-py3-none-any.whl", hash = "sha256:29572ef2b1f17581046b3a2227d5c611fb25ec70ca1ba8554b24b0e69331a484", size = 66469, upload-time = "2025-04-19T11:48:57.875Z" }, + { 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]] @@ -507,25 +508,25 @@ wheels = [ [[package]] name = "pathspec" -version = "0.12.1" +version = "1.1.1" source = { registry = "https://pypi.org/simple" } -sdist = { url = "https://files.pythonhosted.org/packages/ca/bc/f35b8446f4531a7cb215605d100cd88b7ac6f44ab3fc94870c120ab3adbf/pathspec-0.12.1.tar.gz", hash = "sha256:a482d51503a1ab33b1c67a6c3813a26953dbdc71c31dacaef9a838c4e29f5712", size = 51043, upload-time = "2023-12-10T22:30:45Z" } +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/cc/20/ff623b09d963f88bfde16306a54e12ee5ea43e9b597108672ff3a408aad6/pathspec-0.12.1-py3-none-any.whl", hash = "sha256:a0d503e138a4c123b27490a4f7beda6a01c6f288df0e4a8b79c7eb0dc7b4cc08", size = 31191, upload-time = "2023-12-10T22:30:43.14Z" }, + { 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 = "platformdirs" -version = "4.4.0" +version = "4.11.11" source = { registry = "https://pypi.org/simple" } -sdist = { url = "https://files.pythonhosted.org/packages/23/e8/21db9c9987b0e728855bd57bff6984f67952bea55d6f75e055c46b5383e8/platformdirs-4.4.0.tar.gz", hash = "sha256:ca753cf4d81dc309bc67b0ea38fd15dc97bc30ce419a7f58d13eb3bf14c4febf", size = 21634, upload-time = "2025-08-26T14:32:04.268Z" } +sdist = { url = "https://files.pythonhosted.org/packages/f8/13/f870dd0b42690138e4e37a76b5138e5690ed4365a77071bb092d59037da0/platformdirs-4.11.11.tar.gz", hash = "sha256:b0befe8a90759e4a9a8b9820d434ae226a6549063210b596da0038a7a05aede4", size = 39949, upload-time = "2026-09-19T01:18:47.259Z" } wheels = [ - { url = "https://files.pythonhosted.org/packages/40/4b/2028861e724d3bd36227adfa20d3fd24c3fc6d52032f4a93c133be5d17ce/platformdirs-4.4.0-py3-none-any.whl", hash = "sha256:abd01743f24e5287cd7a5db3752faf1a2d65353f38ec26d98e25a6db65958c85", size = 18654, upload-time = "2025-08-26T14:32:02.735Z" }, + { url = "https://files.pythonhosted.org/packages/39/be/3ae887e84c38c4dd1c549cd5825adc93f48069a94fe1cb8ac52a9da16f15/platformdirs-4.11.11-py3-none-any.whl", hash = "sha256:972ea6b2b387155a536226a0750e46923d731d459a387c4a255c583ed2f64547", size = 24992, upload-time = "2026-09-19T01:18:45.825Z" }, ] [[package]] name = "pydantic" -version = "2.11.9" +version = "2.13.5" source = { registry = "https://pypi.org/simple" } dependencies = [ { name = "annotated-types" }, @@ -533,96 +534,72 @@ dependencies = [ { name = "typing-extensions" }, { name = "typing-inspection" }, ] -sdist = { url = "https://files.pythonhosted.org/packages/ff/5d/09a551ba512d7ca404d785072700d3f6727a02f6f3c24ecfd081c7cf0aa8/pydantic-2.11.9.tar.gz", hash = "sha256:6b8ffda597a14812a7975c90b82a8a2e777d9257aba3453f973acd3c032a18e2", size = 788495, upload-time = "2025-09-13T11:26:39.325Z" } +sdist = { url = "https://files.pythonhosted.org/packages/53/ef/fc4f868f4e2cee79f863883abffceff107875f569b848507319842d2a681/pydantic-2.13.5.tar.gz", hash = "sha256:51a9c5f7b2f8e636f04c6cada605d9b6a3bf1348fdf945a3d8869b19bba0ee08", size = 845750, upload-time = "2026-08-28T14:04:00.916Z" } wheels = [ - { url = "https://files.pythonhosted.org/packages/3e/d3/108f2006987c58e76691d5ae5d200dd3e0f532cb4e5fa3560751c3a1feba/pydantic-2.11.9-py3-none-any.whl", hash = "sha256:c42dd626f5cfc1c6950ce6205ea58c93efa406da65f479dcb4029d5934857da2", size = 444855, upload-time = "2025-09-13T11:26:36.909Z" }, + { url = "https://files.pythonhosted.org/packages/eb/47/c95ffc2009878c7aac0c5e08528022dcb885933252a88b5f170058014464/pydantic-2.13.5-py3-none-any.whl", hash = "sha256:346a034f080da3755d8e9cb5e00e8b07de1d39e4f6e2c87d8ab7cafa0b269a73", size = 472589, upload-time = "2026-08-28T14:03:59.136Z" }, ] [[package]] name = "pydantic-core" -version = "2.33.2" +version = "2.46.5" source = { registry = "https://pypi.org/simple" } dependencies = [ { name = "typing-extensions" }, ] -sdist = { url = "https://files.pythonhosted.org/packages/ad/88/5f2260bdfae97aabf98f1778d43f69574390ad787afb646292a638c923d4/pydantic_core-2.33.2.tar.gz", hash = "sha256:7cb8bc3605c29176e1b105350d2e6474142d7c1bd1d9327c4a9bdb46bf827acc", size = 435195, upload-time = "2025-04-23T18:33:52.104Z" } -wheels = [ - { url = "https://files.pythonhosted.org/packages/3f/8d/71db63483d518cbbf290261a1fc2839d17ff89fce7089e08cad07ccfce67/pydantic_core-2.33.2-cp311-cp311-macosx_10_12_x86_64.whl", hash = "sha256:4c5b0a576fb381edd6d27f0a85915c6daf2f8138dc5c267a57c08a62900758c7", size = 2028584, upload-time = "2025-04-23T18:31:03.106Z" }, - { url = "https://files.pythonhosted.org/packages/24/2f/3cfa7244ae292dd850989f328722d2aef313f74ffc471184dc509e1e4e5a/pydantic_core-2.33.2-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:e799c050df38a639db758c617ec771fd8fb7a5f8eaaa4b27b101f266b216a246", size = 1855071, upload-time = "2025-04-23T18:31:04.621Z" }, - { url = "https://files.pythonhosted.org/packages/b3/d3/4ae42d33f5e3f50dd467761304be2fa0a9417fbf09735bc2cce003480f2a/pydantic_core-2.33.2-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:dc46a01bf8d62f227d5ecee74178ffc448ff4e5197c756331f71efcc66dc980f", size = 1897823, upload-time = "2025-04-23T18:31:06.377Z" }, - { url = "https://files.pythonhosted.org/packages/f4/f3/aa5976e8352b7695ff808599794b1fba2a9ae2ee954a3426855935799488/pydantic_core-2.33.2-cp311-cp311-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:a144d4f717285c6d9234a66778059f33a89096dfb9b39117663fd8413d582dcc", size = 1983792, upload-time = "2025-04-23T18:31:07.93Z" }, - { url = "https://files.pythonhosted.org/packages/d5/7a/cda9b5a23c552037717f2b2a5257e9b2bfe45e687386df9591eff7b46d28/pydantic_core-2.33.2-cp311-cp311-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:73cf6373c21bc80b2e0dc88444f41ae60b2f070ed02095754eb5a01df12256de", size = 2136338, upload-time = "2025-04-23T18:31:09.283Z" }, - { url = "https://files.pythonhosted.org/packages/2b/9f/b8f9ec8dd1417eb9da784e91e1667d58a2a4a7b7b34cf4af765ef663a7e5/pydantic_core-2.33.2-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:3dc625f4aa79713512d1976fe9f0bc99f706a9dee21dfd1810b4bbbf228d0e8a", size = 2730998, upload-time = "2025-04-23T18:31:11.7Z" }, - { url = "https://files.pythonhosted.org/packages/47/bc/cd720e078576bdb8255d5032c5d63ee5c0bf4b7173dd955185a1d658c456/pydantic_core-2.33.2-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:881b21b5549499972441da4758d662aeea93f1923f953e9cbaff14b8b9565aef", size = 2003200, upload-time = "2025-04-23T18:31:13.536Z" }, - { url = "https://files.pythonhosted.org/packages/ca/22/3602b895ee2cd29d11a2b349372446ae9727c32e78a94b3d588a40fdf187/pydantic_core-2.33.2-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:bdc25f3681f7b78572699569514036afe3c243bc3059d3942624e936ec93450e", size = 2113890, upload-time = "2025-04-23T18:31:15.011Z" }, - { url = "https://files.pythonhosted.org/packages/ff/e6/e3c5908c03cf00d629eb38393a98fccc38ee0ce8ecce32f69fc7d7b558a7/pydantic_core-2.33.2-cp311-cp311-musllinux_1_1_aarch64.whl", hash = "sha256:fe5b32187cbc0c862ee201ad66c30cf218e5ed468ec8dc1cf49dec66e160cc4d", size = 2073359, upload-time = "2025-04-23T18:31:16.393Z" }, - { url = "https://files.pythonhosted.org/packages/12/e7/6a36a07c59ebefc8777d1ffdaf5ae71b06b21952582e4b07eba88a421c79/pydantic_core-2.33.2-cp311-cp311-musllinux_1_1_armv7l.whl", hash = "sha256:bc7aee6f634a6f4a95676fcb5d6559a2c2a390330098dba5e5a5f28a2e4ada30", size = 2245883, upload-time = "2025-04-23T18:31:17.892Z" }, - { url = "https://files.pythonhosted.org/packages/16/3f/59b3187aaa6cc0c1e6616e8045b284de2b6a87b027cce2ffcea073adf1d2/pydantic_core-2.33.2-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:235f45e5dbcccf6bd99f9f472858849f73d11120d76ea8707115415f8e5ebebf", size = 2241074, upload-time = "2025-04-23T18:31:19.205Z" }, - { url = "https://files.pythonhosted.org/packages/e0/ed/55532bb88f674d5d8f67ab121a2a13c385df382de2a1677f30ad385f7438/pydantic_core-2.33.2-cp311-cp311-win32.whl", hash = "sha256:6368900c2d3ef09b69cb0b913f9f8263b03786e5b2a387706c5afb66800efd51", size = 1910538, upload-time = "2025-04-23T18:31:20.541Z" }, - { url = "https://files.pythonhosted.org/packages/fe/1b/25b7cccd4519c0b23c2dd636ad39d381abf113085ce4f7bec2b0dc755eb1/pydantic_core-2.33.2-cp311-cp311-win_amd64.whl", hash = "sha256:1e063337ef9e9820c77acc768546325ebe04ee38b08703244c1309cccc4f1bab", size = 1952909, upload-time = "2025-04-23T18:31:22.371Z" }, - { url = "https://files.pythonhosted.org/packages/49/a9/d809358e49126438055884c4366a1f6227f0f84f635a9014e2deb9b9de54/pydantic_core-2.33.2-cp311-cp311-win_arm64.whl", hash = "sha256:6b99022f1d19bc32a4c2a0d544fc9a76e3be90f0b3f4af413f87d38749300e65", size = 1897786, upload-time = "2025-04-23T18:31:24.161Z" }, - { url = "https://files.pythonhosted.org/packages/18/8a/2b41c97f554ec8c71f2a8a5f85cb56a8b0956addfe8b0efb5b3d77e8bdc3/pydantic_core-2.33.2-cp312-cp312-macosx_10_12_x86_64.whl", hash = "sha256:a7ec89dc587667f22b6a0b6579c249fca9026ce7c333fc142ba42411fa243cdc", size = 2009000, upload-time = "2025-04-23T18:31:25.863Z" }, - { url = "https://files.pythonhosted.org/packages/a1/02/6224312aacb3c8ecbaa959897af57181fb6cf3a3d7917fd44d0f2917e6f2/pydantic_core-2.33.2-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:3c6db6e52c6d70aa0d00d45cdb9b40f0433b96380071ea80b09277dba021ddf7", size = 1847996, upload-time = "2025-04-23T18:31:27.341Z" }, - { url = "https://files.pythonhosted.org/packages/d6/46/6dcdf084a523dbe0a0be59d054734b86a981726f221f4562aed313dbcb49/pydantic_core-2.33.2-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:4e61206137cbc65e6d5256e1166f88331d3b6238e082d9f74613b9b765fb9025", size = 1880957, upload-time = "2025-04-23T18:31:28.956Z" }, - { url = "https://files.pythonhosted.org/packages/ec/6b/1ec2c03837ac00886ba8160ce041ce4e325b41d06a034adbef11339ae422/pydantic_core-2.33.2-cp312-cp312-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:eb8c529b2819c37140eb51b914153063d27ed88e3bdc31b71198a198e921e011", size = 1964199, upload-time = "2025-04-23T18:31:31.025Z" }, - { url = "https://files.pythonhosted.org/packages/2d/1d/6bf34d6adb9debd9136bd197ca72642203ce9aaaa85cfcbfcf20f9696e83/pydantic_core-2.33.2-cp312-cp312-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:c52b02ad8b4e2cf14ca7b3d918f3eb0ee91e63b3167c32591e57c4317e134f8f", size = 2120296, upload-time = "2025-04-23T18:31:32.514Z" }, - { url = "https://files.pythonhosted.org/packages/e0/94/2bd0aaf5a591e974b32a9f7123f16637776c304471a0ab33cf263cf5591a/pydantic_core-2.33.2-cp312-cp312-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:96081f1605125ba0855dfda83f6f3df5ec90c61195421ba72223de35ccfb2f88", size = 2676109, upload-time = "2025-04-23T18:31:33.958Z" }, - { url = "https://files.pythonhosted.org/packages/f9/41/4b043778cf9c4285d59742281a769eac371b9e47e35f98ad321349cc5d61/pydantic_core-2.33.2-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:8f57a69461af2a5fa6e6bbd7a5f60d3b7e6cebb687f55106933188e79ad155c1", size = 2002028, upload-time = "2025-04-23T18:31:39.095Z" }, - { url = "https://files.pythonhosted.org/packages/cb/d5/7bb781bf2748ce3d03af04d5c969fa1308880e1dca35a9bd94e1a96a922e/pydantic_core-2.33.2-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:572c7e6c8bb4774d2ac88929e3d1f12bc45714ae5ee6d9a788a9fb35e60bb04b", size = 2100044, upload-time = "2025-04-23T18:31:41.034Z" }, - { url = "https://files.pythonhosted.org/packages/fe/36/def5e53e1eb0ad896785702a5bbfd25eed546cdcf4087ad285021a90ed53/pydantic_core-2.33.2-cp312-cp312-musllinux_1_1_aarch64.whl", hash = "sha256:db4b41f9bd95fbe5acd76d89920336ba96f03e149097365afe1cb092fceb89a1", size = 2058881, upload-time = "2025-04-23T18:31:42.757Z" }, - { url = "https://files.pythonhosted.org/packages/01/6c/57f8d70b2ee57fc3dc8b9610315949837fa8c11d86927b9bb044f8705419/pydantic_core-2.33.2-cp312-cp312-musllinux_1_1_armv7l.whl", hash = "sha256:fa854f5cf7e33842a892e5c73f45327760bc7bc516339fda888c75ae60edaeb6", size = 2227034, upload-time = "2025-04-23T18:31:44.304Z" }, - { url = "https://files.pythonhosted.org/packages/27/b9/9c17f0396a82b3d5cbea4c24d742083422639e7bb1d5bf600e12cb176a13/pydantic_core-2.33.2-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:5f483cfb75ff703095c59e365360cb73e00185e01aaea067cd19acffd2ab20ea", size = 2234187, upload-time = "2025-04-23T18:31:45.891Z" }, - { url = "https://files.pythonhosted.org/packages/b0/6a/adf5734ffd52bf86d865093ad70b2ce543415e0e356f6cacabbc0d9ad910/pydantic_core-2.33.2-cp312-cp312-win32.whl", hash = "sha256:9cb1da0f5a471435a7bc7e439b8a728e8b61e59784b2af70d7c169f8dd8ae290", size = 1892628, upload-time = "2025-04-23T18:31:47.819Z" }, - { url = "https://files.pythonhosted.org/packages/43/e4/5479fecb3606c1368d496a825d8411e126133c41224c1e7238be58b87d7e/pydantic_core-2.33.2-cp312-cp312-win_amd64.whl", hash = "sha256:f941635f2a3d96b2973e867144fde513665c87f13fe0e193c158ac51bfaaa7b2", size = 1955866, upload-time = "2025-04-23T18:31:49.635Z" }, - { url = "https://files.pythonhosted.org/packages/0d/24/8b11e8b3e2be9dd82df4b11408a67c61bb4dc4f8e11b5b0fc888b38118b5/pydantic_core-2.33.2-cp312-cp312-win_arm64.whl", hash = "sha256:cca3868ddfaccfbc4bfb1d608e2ccaaebe0ae628e1416aeb9c4d88c001bb45ab", size = 1888894, upload-time = "2025-04-23T18:31:51.609Z" }, - { url = "https://files.pythonhosted.org/packages/46/8c/99040727b41f56616573a28771b1bfa08a3d3fe74d3d513f01251f79f172/pydantic_core-2.33.2-cp313-cp313-macosx_10_12_x86_64.whl", hash = "sha256:1082dd3e2d7109ad8b7da48e1d4710c8d06c253cbc4a27c1cff4fbcaa97a9e3f", size = 2015688, upload-time = "2025-04-23T18:31:53.175Z" }, - { url = "https://files.pythonhosted.org/packages/3a/cc/5999d1eb705a6cefc31f0b4a90e9f7fc400539b1a1030529700cc1b51838/pydantic_core-2.33.2-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:f517ca031dfc037a9c07e748cefd8d96235088b83b4f4ba8939105d20fa1dcd6", size = 1844808, upload-time = "2025-04-23T18:31:54.79Z" }, - { url = "https://files.pythonhosted.org/packages/6f/5e/a0a7b8885c98889a18b6e376f344da1ef323d270b44edf8174d6bce4d622/pydantic_core-2.33.2-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:0a9f2c9dd19656823cb8250b0724ee9c60a82f3cdf68a080979d13092a3b0fef", size = 1885580, upload-time = "2025-04-23T18:31:57.393Z" }, - { url = "https://files.pythonhosted.org/packages/3b/2a/953581f343c7d11a304581156618c3f592435523dd9d79865903272c256a/pydantic_core-2.33.2-cp313-cp313-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:2b0a451c263b01acebe51895bfb0e1cc842a5c666efe06cdf13846c7418caa9a", size = 1973859, upload-time = "2025-04-23T18:31:59.065Z" }, - { url = "https://files.pythonhosted.org/packages/e6/55/f1a813904771c03a3f97f676c62cca0c0a4138654107c1b61f19c644868b/pydantic_core-2.33.2-cp313-cp313-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:1ea40a64d23faa25e62a70ad163571c0b342b8bf66d5fa612ac0dec4f069d916", size = 2120810, upload-time = "2025-04-23T18:32:00.78Z" }, - { url = "https://files.pythonhosted.org/packages/aa/c3/053389835a996e18853ba107a63caae0b9deb4a276c6b472931ea9ae6e48/pydantic_core-2.33.2-cp313-cp313-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:0fb2d542b4d66f9470e8065c5469ec676978d625a8b7a363f07d9a501a9cb36a", size = 2676498, upload-time = "2025-04-23T18:32:02.418Z" }, - { url = "https://files.pythonhosted.org/packages/eb/3c/f4abd740877a35abade05e437245b192f9d0ffb48bbbbd708df33d3cda37/pydantic_core-2.33.2-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:9fdac5d6ffa1b5a83bca06ffe7583f5576555e6c8b3a91fbd25ea7780f825f7d", size = 2000611, upload-time = "2025-04-23T18:32:04.152Z" }, - { url = "https://files.pythonhosted.org/packages/59/a7/63ef2fed1837d1121a894d0ce88439fe3e3b3e48c7543b2a4479eb99c2bd/pydantic_core-2.33.2-cp313-cp313-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:04a1a413977ab517154eebb2d326da71638271477d6ad87a769102f7c2488c56", size = 2107924, upload-time = "2025-04-23T18:32:06.129Z" }, - { url = "https://files.pythonhosted.org/packages/04/8f/2551964ef045669801675f1cfc3b0d74147f4901c3ffa42be2ddb1f0efc4/pydantic_core-2.33.2-cp313-cp313-musllinux_1_1_aarch64.whl", hash = "sha256:c8e7af2f4e0194c22b5b37205bfb293d166a7344a5b0d0eaccebc376546d77d5", size = 2063196, upload-time = "2025-04-23T18:32:08.178Z" }, - { url = "https://files.pythonhosted.org/packages/26/bd/d9602777e77fc6dbb0c7db9ad356e9a985825547dce5ad1d30ee04903918/pydantic_core-2.33.2-cp313-cp313-musllinux_1_1_armv7l.whl", hash = "sha256:5c92edd15cd58b3c2d34873597a1e20f13094f59cf88068adb18947df5455b4e", size = 2236389, upload-time = "2025-04-23T18:32:10.242Z" }, - { url = "https://files.pythonhosted.org/packages/42/db/0e950daa7e2230423ab342ae918a794964b053bec24ba8af013fc7c94846/pydantic_core-2.33.2-cp313-cp313-musllinux_1_1_x86_64.whl", hash = "sha256:65132b7b4a1c0beded5e057324b7e16e10910c106d43675d9bd87d4f38dde162", size = 2239223, upload-time = "2025-04-23T18:32:12.382Z" }, - { url = "https://files.pythonhosted.org/packages/58/4d/4f937099c545a8a17eb52cb67fe0447fd9a373b348ccfa9a87f141eeb00f/pydantic_core-2.33.2-cp313-cp313-win32.whl", hash = "sha256:52fb90784e0a242bb96ec53f42196a17278855b0f31ac7c3cc6f5c1ec4811849", size = 1900473, upload-time = "2025-04-23T18:32:14.034Z" }, - { url = "https://files.pythonhosted.org/packages/a0/75/4a0a9bac998d78d889def5e4ef2b065acba8cae8c93696906c3a91f310ca/pydantic_core-2.33.2-cp313-cp313-win_amd64.whl", hash = "sha256:c083a3bdd5a93dfe480f1125926afcdbf2917ae714bdb80b36d34318b2bec5d9", size = 1955269, upload-time = "2025-04-23T18:32:15.783Z" }, - { url = "https://files.pythonhosted.org/packages/f9/86/1beda0576969592f1497b4ce8e7bc8cbdf614c352426271b1b10d5f0aa64/pydantic_core-2.33.2-cp313-cp313-win_arm64.whl", hash = "sha256:e80b087132752f6b3d714f041ccf74403799d3b23a72722ea2e6ba2e892555b9", size = 1893921, upload-time = "2025-04-23T18:32:18.473Z" }, - { url = "https://files.pythonhosted.org/packages/a4/7d/e09391c2eebeab681df2b74bfe6c43422fffede8dc74187b2b0bf6fd7571/pydantic_core-2.33.2-cp313-cp313t-macosx_11_0_arm64.whl", hash = "sha256:61c18fba8e5e9db3ab908620af374db0ac1baa69f0f32df4f61ae23f15e586ac", size = 1806162, upload-time = "2025-04-23T18:32:20.188Z" }, - { url = "https://files.pythonhosted.org/packages/f1/3d/847b6b1fed9f8ed3bb95a9ad04fbd0b212e832d4f0f50ff4d9ee5a9f15cf/pydantic_core-2.33.2-cp313-cp313t-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:95237e53bb015f67b63c91af7518a62a8660376a6a0db19b89acc77a4d6199f5", size = 1981560, upload-time = "2025-04-23T18:32:22.354Z" }, - { url = "https://files.pythonhosted.org/packages/6f/9a/e73262f6c6656262b5fdd723ad90f518f579b7bc8622e43a942eec53c938/pydantic_core-2.33.2-cp313-cp313t-win_amd64.whl", hash = "sha256:c2fc0a768ef76c15ab9238afa6da7f69895bb5d1ee83aeea2e3509af4472d0b9", size = 1935777, upload-time = "2025-04-23T18:32:25.088Z" }, - { url = "https://files.pythonhosted.org/packages/7b/27/d4ae6487d73948d6f20dddcd94be4ea43e74349b56eba82e9bdee2d7494c/pydantic_core-2.33.2-pp311-pypy311_pp73-macosx_10_12_x86_64.whl", hash = "sha256:dd14041875d09cc0f9308e37a6f8b65f5585cf2598a53aa0123df8b129d481f8", size = 2025200, upload-time = "2025-04-23T18:33:14.199Z" }, - { url = "https://files.pythonhosted.org/packages/f1/b8/b3cb95375f05d33801024079b9392a5ab45267a63400bf1866e7ce0f0de4/pydantic_core-2.33.2-pp311-pypy311_pp73-macosx_11_0_arm64.whl", hash = "sha256:d87c561733f66531dced0da6e864f44ebf89a8fba55f31407b00c2f7f9449593", size = 1859123, upload-time = "2025-04-23T18:33:16.555Z" }, - { url = "https://files.pythonhosted.org/packages/05/bc/0d0b5adeda59a261cd30a1235a445bf55c7e46ae44aea28f7bd6ed46e091/pydantic_core-2.33.2-pp311-pypy311_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:2f82865531efd18d6e07a04a17331af02cb7a651583c418df8266f17a63c6612", size = 1892852, upload-time = "2025-04-23T18:33:18.513Z" }, - { url = "https://files.pythonhosted.org/packages/3e/11/d37bdebbda2e449cb3f519f6ce950927b56d62f0b84fd9cb9e372a26a3d5/pydantic_core-2.33.2-pp311-pypy311_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:2bfb5112df54209d820d7bf9317c7a6c9025ea52e49f46b6a2060104bba37de7", size = 2067484, upload-time = "2025-04-23T18:33:20.475Z" }, - { url = "https://files.pythonhosted.org/packages/8c/55/1f95f0a05ce72ecb02a8a8a1c3be0579bbc29b1d5ab68f1378b7bebc5057/pydantic_core-2.33.2-pp311-pypy311_pp73-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:64632ff9d614e5eecfb495796ad51b0ed98c453e447a76bcbeeb69615079fc7e", size = 2108896, upload-time = "2025-04-23T18:33:22.501Z" }, - { url = "https://files.pythonhosted.org/packages/53/89/2b2de6c81fa131f423246a9109d7b2a375e83968ad0800d6e57d0574629b/pydantic_core-2.33.2-pp311-pypy311_pp73-musllinux_1_1_aarch64.whl", hash = "sha256:f889f7a40498cc077332c7ab6b4608d296d852182211787d4f3ee377aaae66e8", size = 2069475, upload-time = "2025-04-23T18:33:24.528Z" }, - { url = "https://files.pythonhosted.org/packages/b8/e9/1f7efbe20d0b2b10f6718944b5d8ece9152390904f29a78e68d4e7961159/pydantic_core-2.33.2-pp311-pypy311_pp73-musllinux_1_1_armv7l.whl", hash = "sha256:de4b83bb311557e439b9e186f733f6c645b9417c84e2eb8203f3f820a4b988bf", size = 2239013, upload-time = "2025-04-23T18:33:26.621Z" }, - { url = "https://files.pythonhosted.org/packages/3c/b2/5309c905a93811524a49b4e031e9851a6b00ff0fb668794472ea7746b448/pydantic_core-2.33.2-pp311-pypy311_pp73-musllinux_1_1_x86_64.whl", hash = "sha256:82f68293f055f51b51ea42fafc74b6aad03e70e191799430b90c13d643059ebb", size = 2238715, upload-time = "2025-04-23T18:33:28.656Z" }, - { url = "https://files.pythonhosted.org/packages/32/56/8a7ca5d2cd2cda1d245d34b1c9a942920a718082ae8e54e5f3e5a58b7add/pydantic_core-2.33.2-pp311-pypy311_pp73-win_amd64.whl", hash = "sha256:329467cecfb529c925cf2bbd4d60d2c509bc2fb52a20c1045bf09bb70971a9c1", size = 2066757, upload-time = "2025-04-23T18:33:30.645Z" }, +sdist = { url = "https://files.pythonhosted.org/packages/af/f9/8a06bea35ef8daf588f707784c973a7046e0034c8d8cfb08828eeffb8b75/pydantic_core-2.46.5.tar.gz", hash = "sha256:10416c15b8839ecc4ef4d0885da76da6fd0f67333a0eb8aff6d93c4b8f2910fc", size = 472262, upload-time = "2026-08-28T10:01:31.677Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/8e/8a/14596f2a8367da50cf7cbac48169ee5d9c8e11d486a3b527082384630c72/pydantic_core-2.46.5-cp314-cp314-macosx_10_12_x86_64.whl", hash = "sha256:c1c43ad4339643d70ebb8124e1305a7dab423001eff58bb41a0f731adbc98355", size = 2074081, upload-time = "2026-08-28T09:59:16.141Z" }, + { url = "https://files.pythonhosted.org/packages/ae/d5/d8a4eb6d6c7f66b91dd37c576d76e9e60fba900caf5372c17bcf949febc2/pydantic_core-2.46.5-cp314-cp314-macosx_11_0_arm64.whl", hash = "sha256:1a353f84de772f423b5ffb11d7ae352fbbef0f446f3c0b0af0f8236d7233606e", size = 1920497, upload-time = "2026-08-28T09:59:18.065Z" }, + { url = "https://files.pythonhosted.org/packages/8e/26/092079428f86e927e030b2c0ced87df69dbb1c875cdeaa67bf42ea2be746/pydantic_core-2.46.5-cp314-cp314-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:5086029a57366b8cf81b130a43908738095c270c21a8d7f0e8bdfdb89718e2f3", size = 1952130, upload-time = "2026-08-28T09:59:20.476Z" }, + { url = "https://files.pythonhosted.org/packages/08/c3/8ec0e290a9ebaebd64047bf5fda94be835c6b1551b02437e4b76778fbcd7/pydantic_core-2.46.5-cp314-cp314-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:46c25dda9d092a06c08db76ffe0a197107904d0dfac653f7d5306bbcd6d6119c", size = 2026371, upload-time = "2026-08-28T09:59:22.227Z" }, + { url = "https://files.pythonhosted.org/packages/01/72/4fd20ad520fb8da0157f95b27a7eb05a72790ef08138e7701ac972c342ea/pydantic_core-2.46.5-cp314-cp314-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:37ea7b83c935e5b0d68c9449b82651accf78a10828b2c02b2f2d9e9496446c21", size = 2202822, upload-time = "2026-08-28T09:59:24.277Z" }, + { url = "https://files.pythonhosted.org/packages/31/b0/d16e0771206b29314f0d52198b720be21e8a99ab2bf11e3bc0d7c9cebdff/pydantic_core-2.46.5-cp314-cp314-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:e64e88d5585bea9ce95861079de72006c7fa6d3df4e3a3b65ba31eb979c15c9f", size = 2262756, upload-time = "2026-08-28T09:59:26.608Z" }, + { url = "https://files.pythonhosted.org/packages/2c/9b/59634b7ac631c63b2a37760eb6943af3e29573d6b59a4abc5e7f019d4cee/pydantic_core-2.46.5-cp314-cp314-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:54d510bac3ee52247af28ed4bb18a1e799f040ac60fd2bf5ccd4c92f1fbe786f", size = 2068352, upload-time = "2026-08-28T09:59:29.044Z" }, + { url = "https://files.pythonhosted.org/packages/08/7c/570abb1ad2155348dc754ea91be22e5aaa18eb6d69a6068f7c6f2679a6ed/pydantic_core-2.46.5-cp314-cp314-manylinux_2_31_riscv64.whl", hash = "sha256:a2a5e1d0ff29adddc9f6d6821a66302e4493f8ca898b715b6b1182c2c201ea0a", size = 2104777, upload-time = "2026-08-28T09:59:30.95Z" }, + { url = "https://files.pythonhosted.org/packages/8e/25/5bf74adc65a1ac5b7be3f6cb0bcb5433615c1598a801c19d830d84c98ded/pydantic_core-2.46.5-cp314-cp314-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:03b9666e41e35d8909852ba191a0607520f81b74eaf12ccf8737005dbb313821", size = 2156312, upload-time = "2026-08-28T09:59:32.604Z" }, + { url = "https://files.pythonhosted.org/packages/90/6a/2ef38830675e050121040618135564ed56b860b45433b02d9b4ebece46f3/pydantic_core-2.46.5-cp314-cp314-musllinux_1_1_aarch64.whl", hash = "sha256:a91c17edf6eea2402cb5457b4c89e99bc5ed1004aa34c4adf1d4258c1a5c22c2", size = 2150067, upload-time = "2026-08-28T09:59:34.453Z" }, + { url = "https://files.pythonhosted.org/packages/90/ef/a7dbb03a14a64c2a4621f989c615ed9a892535a6cad938fc27079f919d80/pydantic_core-2.46.5-cp314-cp314-musllinux_1_1_armv7l.whl", hash = "sha256:b49924c73a235e969511bf2aabdff3beebf9820931f646c80274d5d780010c47", size = 2304516, upload-time = "2026-08-28T09:59:36.194Z" }, + { url = "https://files.pythonhosted.org/packages/68/f8/6bb4c4b80e8a6fde1904c64a51c62a1d04fcdfa3ea521a66b2ddefa1d885/pydantic_core-2.46.5-cp314-cp314-musllinux_1_1_x86_64.whl", hash = "sha256:2cbd9a5eff05e51c447c34dfa4632145b26b09120cf04bd0c871e44c1a5e1c9a", size = 2335223, upload-time = "2026-08-28T09:59:37.931Z" }, + { url = "https://files.pythonhosted.org/packages/2a/80/f46b8c681195190b2c1f1c7c0a81abce60663e987613e09ef64d433dd96b/pydantic_core-2.46.5-cp314-cp314-win32.whl", hash = "sha256:2d5d76654becf5efd62c9e51c3756c67b49498b0c9a40884934c40807adbd074", size = 1934827, upload-time = "2026-08-28T09:59:39.836Z" }, + { url = "https://files.pythonhosted.org/packages/f7/3c/60674207246bc0a4009d2391b7c7251c7159f279c8d2ab8aae8ef46f3dee/pydantic_core-2.46.5-cp314-cp314-win_amd64.whl", hash = "sha256:fa10ef4112775900e7a0661068635eb67b2ab824fbde764de6e0e21982a93db0", size = 2042648, upload-time = "2026-08-28T09:59:41.792Z" }, + { url = "https://files.pythonhosted.org/packages/69/0c/117c562c7c1babdf44576b72a5e496906506c93690387ecfbca7c729ae2e/pydantic_core-2.46.5-cp314-cp314-win_arm64.whl", hash = "sha256:045ab3b6d308439e32b81cc173bba5b9018bc6ed896afd0c65b3b009b1699af5", size = 1989652, upload-time = "2026-08-28T09:59:43.702Z" }, + { url = "https://files.pythonhosted.org/packages/e8/66/9336ae58f9eb68c41d121894e52c4c89eccb07eb8f602a04ee9c3f37736a/pydantic_core-2.46.5-cp314-cp314t-macosx_10_12_x86_64.whl", hash = "sha256:8816f3d218beb4b787de5c9759c259b8fa61f9dec42dc7811f320a33771778b7", size = 2065829, upload-time = "2026-08-28T09:59:45.364Z" }, + { url = "https://files.pythonhosted.org/packages/c5/02/bc19b47a96c2d3109760711acf22369e56bd7e405ca52f7ade164d2ead57/pydantic_core-2.46.5-cp314-cp314t-macosx_11_0_arm64.whl", hash = "sha256:bce57638e08ac148e5778cce7feb968307a727d66f8e2274a543d0cf0c9ad6a3", size = 1905716, upload-time = "2026-08-28T09:59:47.18Z" }, + { url = "https://files.pythonhosted.org/packages/52/a4/70b47c0509923dd98ccfed04fb3e32ea3849c82a0ff2205bb41009b43c00/pydantic_core-2.46.5-cp314-cp314t-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:976e1128455aa595ea04c79ccfedff1aaeab96ee013fcc916bed120c4f0ad94f", size = 1934216, upload-time = "2026-08-28T09:59:49.241Z" }, + { url = "https://files.pythonhosted.org/packages/52/ab/aa03b65f7bb198585edf806b906c3223ecf1795543e39e23aec4cce27ad2/pydantic_core-2.46.5-cp314-cp314t-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:e7b891faeedeafba41b2983e5001a81b6a915b69544c7e7570d1989ce1c36ac7", size = 2010635, upload-time = "2026-08-28T09:59:51.692Z" }, + { url = "https://files.pythonhosted.org/packages/3c/8b/0da06343f30b84ec549aafd309c6456223d5dc8bd36af504c573faad561d/pydantic_core-2.46.5-cp314-cp314t-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:5f194189415698233dd1114a093a9b56e61e2c57e11b469be3b0506f46f0771c", size = 2209369, upload-time = "2026-08-28T09:59:53.582Z" }, + { url = "https://files.pythonhosted.org/packages/d6/5b/844c4defaa34a3df66eb9257087d121d70c201298b96abdf9f492fc2f1bf/pydantic_core-2.46.5-cp314-cp314t-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:82a36973cf8a2ef5406f4fe2edbf8ed0c99629535d959e0b100c76a32535a111", size = 2253238, upload-time = "2026-08-28T09:59:55.484Z" }, + { url = "https://files.pythonhosted.org/packages/f4/64/a4e536cb16d7f61a7fd3120b46c577fc7fa7325992f69c4f52bc786d77d8/pydantic_core-2.46.5-cp314-cp314t-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:cdbb78909f52b981d3b2d56b97328d71eb0b974c36bd77c920123a7ebb192829", size = 2065740, upload-time = "2026-08-28T09:59:58.038Z" }, + { url = "https://files.pythonhosted.org/packages/5f/75/aaa38c6bc2d085f6605b34eabdc6a8a4e0b2e61fc9c8e6e52b28e97b3125/pydantic_core-2.46.5-cp314-cp314t-manylinux_2_31_riscv64.whl", hash = "sha256:52e24eacdb536cade636aa90fb851835222becff8484b7001fdc78cb0290f2aa", size = 2087425, upload-time = "2026-08-28T09:59:59.898Z" }, + { url = "https://files.pythonhosted.org/packages/55/ae/fcab4cfc39aba3689e1d20c8b5250ad280957022c09af2ed9cd585602a5e/pydantic_core-2.46.5-cp314-cp314t-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:37ae34309d7bd8c0d61ab839668058f2a7962ea1fc51d105d2db228fe0618034", size = 2139306, upload-time = "2026-08-28T10:00:03.057Z" }, + { url = "https://files.pythonhosted.org/packages/2d/f4/f1d03a4bc9d9acbc62f4d742b8a319af52f71885079868b2ff8e48a651ee/pydantic_core-2.46.5-cp314-cp314t-musllinux_1_1_aarch64.whl", hash = "sha256:0cdbada856a1c69a7624a64d3d9aefe79300bd6ef827b43a4f265010b9b55184", size = 2144589, upload-time = "2026-08-28T10:00:05.645Z" }, + { url = "https://files.pythonhosted.org/packages/83/f3/7a53bb1356de514a4cd295f25b6ac39237895620c0462d2592b76c16e114/pydantic_core-2.46.5-cp314-cp314t-musllinux_1_1_armv7l.whl", hash = "sha256:545f26c504b27c3758439a5e6d9349931f0a04f855668d5fe323c89e82300a38", size = 2288882, upload-time = "2026-08-28T10:00:07.931Z" }, + { url = "https://files.pythonhosted.org/packages/cd/94/5a81583660c175c59d49ffb09f4b3a44debeaf86a19fca664ae1cdd9ee32/pydantic_core-2.46.5-cp314-cp314t-musllinux_1_1_x86_64.whl", hash = "sha256:ff218293c9c806138dca139765e3b067621be52bcd93cdc14c7711be7ddc90a9", size = 2335210, upload-time = "2026-08-28T10:00:10.177Z" }, + { url = "https://files.pythonhosted.org/packages/5a/9f/5d685c2693b972d1a59c998586e8823712b66603aeff47ee60a4bdaafd37/pydantic_core-2.46.5-cp314-cp314t-win32.whl", hash = "sha256:97cf3eb53a8cccacf9d46686a0926186c9bfb5574f2ed66d3639d5fe117cd3a9", size = 1921180, upload-time = "2026-08-28T10:00:12.35Z" }, + { url = "https://files.pythonhosted.org/packages/70/12/5c94ee16d65a37a15f9e869f5e6256df111154491173801a4c5e800ab548/pydantic_core-2.46.5-cp314-cp314t-win_amd64.whl", hash = "sha256:d2f9fc07a8042a8f95925b35c4f04f469707c981fc33245b6ca187cf5d2dd290", size = 2020515, upload-time = "2026-08-28T10:00:14.774Z" }, + { url = "https://files.pythonhosted.org/packages/63/19/67830dda664e6bdf9285ee2e40f355d0d7d6b92aa0c42e8d217bb8d33d36/pydantic_core-2.46.5-cp314-cp314t-win_arm64.whl", hash = "sha256:acf8a67ba51f4ca9ddbd0e6b3000a65ac51ab734661778b3e7ba64d99a710f2f", size = 1989276, upload-time = "2026-08-28T10:00:16.984Z" }, ] [[package]] name = "pygments" -version = "2.19.2" +version = "2.21.0" source = { registry = "https://pypi.org/simple" } -sdist = { url = "https://files.pythonhosted.org/packages/b0/77/a5b8c569bf593b0140bde72ea885a803b82086995367bf2037de0159d924/pygments-2.19.2.tar.gz", hash = "sha256:636cb2477cec7f8952536970bc533bc43743542f70392ae026374600add5b887", size = 4968631, upload-time = "2025-06-21T13:39:12.283Z" } +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/c7/21/705964c7812476f378728bdf590ca4b771ec72385c533964653c68e86bdc/pygments-2.19.2-py3-none-any.whl", hash = "sha256:86540386c03d588bb81d44bc3928634ff26449851e99741617ecb9037ee5ec0b", size = 1225217, upload-time = "2025-06-21T13:39:07.939Z" }, + { 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 = "pymdown-extensions" -version = "10.16.1" +version = "12.0.1" source = { registry = "https://pypi.org/simple" } dependencies = [ { name = "markdown" }, { name = "pyyaml" }, ] -sdist = { url = "https://files.pythonhosted.org/packages/55/b3/6d2b3f149bc5413b0a29761c2c5832d8ce904a1d7f621e86616d96f505cc/pymdown_extensions-10.16.1.tar.gz", hash = "sha256:aace82bcccba3efc03e25d584e6a22d27a8e17caa3f4dd9f207e49b787aa9a91", size = 853277, upload-time = "2025-07-28T16:19:34.167Z" } +sdist = { url = "https://files.pythonhosted.org/packages/eb/7e/53144b512818c75d459523e3a91d9bf7b65cd6a1dfb964fe690adc8b3670/pymdown_extensions-12.0.1.tar.gz", hash = "sha256:88fe2c97fb9153b9f2cc1da59f1d7c7cb74971110daf33cccb2a5514e0f7e970", size = 866904, upload-time = "2026-09-15T23:20:33.187Z" } wheels = [ - { url = "https://files.pythonhosted.org/packages/e4/06/43084e6cbd4b3bc0e80f6be743b2e79fbc6eed8de9ad8c629939fa55d972/pymdown_extensions-10.16.1-py3-none-any.whl", hash = "sha256:d6ba157a6c03146a7fb122b2b9a121300056384eafeec9c9f9e584adfdb2a32d", size = 266178, upload-time = "2025-07-28T16:19:31.401Z" }, + { url = "https://files.pythonhosted.org/packages/8c/30/c866b3ca8ad5cca79a3ee1a55c12d61d3e72381e5eadbfdaceb6006ebc84/pymdown_extensions-12.0.1-py3-none-any.whl", hash = "sha256:15d629e8035892b93d788a8424ccea754d4aa3cec247a64cbfe7b15089c9ad7f", size = 276957, upload-time = "2026-09-15T23:20:31.551Z" }, ] [[package]] @@ -639,21 +616,15 @@ wheels = [ [[package]] name = "pywin32" -version = "311" +version = "312" source = { registry = "https://pypi.org/simple" } wheels = [ - { url = "https://files.pythonhosted.org/packages/7c/af/449a6a91e5d6db51420875c54f6aff7c97a86a3b13a0b4f1a5c13b988de3/pywin32-311-cp311-cp311-win32.whl", hash = "sha256:184eb5e436dea364dcd3d2316d577d625c0351bf237c4e9a5fabbcfa5a58b151", size = 8697031, upload-time = "2025-07-14T20:13:13.266Z" }, - { url = "https://files.pythonhosted.org/packages/51/8f/9bb81dd5bb77d22243d33c8397f09377056d5c687aa6d4042bea7fbf8364/pywin32-311-cp311-cp311-win_amd64.whl", hash = "sha256:3ce80b34b22b17ccbd937a6e78e7225d80c52f5ab9940fe0506a1a16f3dab503", size = 9508308, upload-time = "2025-07-14T20:13:15.147Z" }, - { url = "https://files.pythonhosted.org/packages/44/7b/9c2ab54f74a138c491aba1b1cd0795ba61f144c711daea84a88b63dc0f6c/pywin32-311-cp311-cp311-win_arm64.whl", hash = "sha256:a733f1388e1a842abb67ffa8e7aad0e70ac519e09b0f6a784e65a136ec7cefd2", size = 8703930, upload-time = "2025-07-14T20:13:16.945Z" }, - { url = "https://files.pythonhosted.org/packages/e7/ab/01ea1943d4eba0f850c3c61e78e8dd59757ff815ff3ccd0a84de5f541f42/pywin32-311-cp312-cp312-win32.whl", hash = "sha256:750ec6e621af2b948540032557b10a2d43b0cee2ae9758c54154d711cc852d31", size = 8706543, upload-time = "2025-07-14T20:13:20.765Z" }, - { url = "https://files.pythonhosted.org/packages/d1/a8/a0e8d07d4d051ec7502cd58b291ec98dcc0c3fff027caad0470b72cfcc2f/pywin32-311-cp312-cp312-win_amd64.whl", hash = "sha256:b8c095edad5c211ff31c05223658e71bf7116daa0ecf3ad85f3201ea3190d067", size = 9495040, upload-time = "2025-07-14T20:13:22.543Z" }, - { url = "https://files.pythonhosted.org/packages/ba/3a/2ae996277b4b50f17d61f0603efd8253cb2d79cc7ae159468007b586396d/pywin32-311-cp312-cp312-win_arm64.whl", hash = "sha256:e286f46a9a39c4a18b319c28f59b61de793654af2f395c102b4f819e584b5852", size = 8710102, upload-time = "2025-07-14T20:13:24.682Z" }, - { url = "https://files.pythonhosted.org/packages/a5/be/3fd5de0979fcb3994bfee0d65ed8ca9506a8a1260651b86174f6a86f52b3/pywin32-311-cp313-cp313-win32.whl", hash = "sha256:f95ba5a847cba10dd8c4d8fefa9f2a6cf283b8b88ed6178fa8a6c1ab16054d0d", size = 8705700, upload-time = "2025-07-14T20:13:26.471Z" }, - { url = "https://files.pythonhosted.org/packages/e3/28/e0a1909523c6890208295a29e05c2adb2126364e289826c0a8bc7297bd5c/pywin32-311-cp313-cp313-win_amd64.whl", hash = "sha256:718a38f7e5b058e76aee1c56ddd06908116d35147e133427e59a3983f703a20d", size = 9494700, upload-time = "2025-07-14T20:13:28.243Z" }, - { url = "https://files.pythonhosted.org/packages/04/bf/90339ac0f55726dce7d794e6d79a18a91265bdf3aa70b6b9ca52f35e022a/pywin32-311-cp313-cp313-win_arm64.whl", hash = "sha256:7b4075d959648406202d92a2310cb990fea19b535c7f4a78d3f5e10b926eeb8a", size = 8709318, upload-time = "2025-07-14T20:13:30.348Z" }, - { url = "https://files.pythonhosted.org/packages/c9/31/097f2e132c4f16d99a22bfb777e0fd88bd8e1c634304e102f313af69ace5/pywin32-311-cp314-cp314-win32.whl", hash = "sha256:b7a2c10b93f8986666d0c803ee19b5990885872a7de910fc460f9b0c2fbf92ee", size = 8840714, upload-time = "2025-07-14T20:13:32.449Z" }, - { url = "https://files.pythonhosted.org/packages/90/4b/07c77d8ba0e01349358082713400435347df8426208171ce297da32c313d/pywin32-311-cp314-cp314-win_amd64.whl", hash = "sha256:3aca44c046bd2ed8c90de9cb8427f581c479e594e99b5c0bb19b29c10fd6cb87", size = 9656800, upload-time = "2025-07-14T20:13:34.312Z" }, - { url = "https://files.pythonhosted.org/packages/c0/d2/21af5c535501a7233e734b8af901574572da66fcc254cb35d0609c9080dd/pywin32-311-cp314-cp314-win_arm64.whl", hash = "sha256:a508e2d9025764a8270f93111a970e1d0fbfc33f4153b388bb649b7eec4f9b42", size = 8932540, upload-time = "2025-07-14T20:13:36.379Z" }, + { url = "https://files.pythonhosted.org/packages/fc/2b/1f3cded5822fd49c02f40544cbb5f58c7cfd6b1694869fd476cb6170ee97/pywin32-312-cp314-cp314-win32.whl", hash = "sha256:a77a90fbb6881238d2ca9c6fd797b25817f3768fe78d214a90137ff055a75f5b", size = 6468928, upload-time = "2026-06-04T07:49:43.188Z" }, + { url = "https://files.pythonhosted.org/packages/21/82/3bf86d2e2808902013132e1ce905a7da0da53790f3836c64bf44d55e24f3/pywin32-312-cp314-cp314-win_amd64.whl", hash = "sha256:a4dd3a848290ef724347b19f301045831d8e802fa4464f491b98b1e0a081432e", size = 7024157, upload-time = "2026-06-04T07:49:45.34Z" }, + { url = "https://files.pythonhosted.org/packages/a4/0e/73f6d6800b4f27655abd9e9f6aaeaefcddb2b946e4674efa2bab184a7f7b/pywin32-312-cp314-cp314-win_arm64.whl", hash = "sha256:9fce94568364e0155e6dfb781ac5d95903be8baf28670632beab1b523f300daa", size = 6839598, upload-time = "2026-06-04T07:49:47.613Z" }, + { url = "https://files.pythonhosted.org/packages/eb/61/caa39686032d2ebdd04ff0ab5cbe163126c0066d98e00c9018646e42393b/pywin32-312-cp315-cp315-win32.whl", hash = "sha256:5c1fbe4a937a73ae9297384a3da38518cbc694c68ad8a809b2e19acd350f03ed", size = 6471159, upload-time = "2026-06-04T07:49:50.035Z" }, + { url = "https://files.pythonhosted.org/packages/0f/cd/7e1de64a4a6f69c04214169657ccab0d93a670ea50e35eb8f489d7378249/pywin32-312-cp315-cp315-win_amd64.whl", hash = "sha256:c2f03a0f73f804a13c2735b99392b0cd426bb4f2c4d0178e5ac966a0f21618d5", size = 7025293, upload-time = "2026-06-04T07:49:54.857Z" }, + { url = "https://files.pythonhosted.org/packages/23/ed/4532e9388e65fa16b46776ef47ad631a64eda1631884488af707666350ed/pywin32-312-cp315-cp315-win_arm64.whl", hash = "sha256:a8597d28f267b39074aef51fa593530082b39cbe5a074226096857b1fed2dfb9", size = 6840337, upload-time = "2026-06-04T07:49:57.531Z" }, ] [[package]] @@ -662,35 +633,6 @@ 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/6d/16/a95b6757765b7b031c9374925bb718d55e0a9ba8a1b6a12d25962ea44347/pyyaml-6.0.3-cp311-cp311-macosx_10_13_x86_64.whl", hash = "sha256:44edc647873928551a01e7a563d7452ccdebee747728c1080d881d68af7b997e", size = 185826, upload-time = "2025-09-25T21:31:58.655Z" }, - { url = "https://files.pythonhosted.org/packages/16/19/13de8e4377ed53079ee996e1ab0a9c33ec2faf808a4647b7b4c0d46dd239/pyyaml-6.0.3-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:652cb6edd41e718550aad172851962662ff2681490a8a711af6a4d288dd96824", size = 175577, upload-time = "2025-09-25T21:32:00.088Z" }, - { url = "https://files.pythonhosted.org/packages/0c/62/d2eb46264d4b157dae1275b573017abec435397aa59cbcdab6fc978a8af4/pyyaml-6.0.3-cp311-cp311-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:10892704fc220243f5305762e276552a0395f7beb4dbf9b14ec8fd43b57f126c", size = 775556, upload-time = "2025-09-25T21:32:01.31Z" }, - { url = "https://files.pythonhosted.org/packages/10/cb/16c3f2cf3266edd25aaa00d6c4350381c8b012ed6f5276675b9eba8d9ff4/pyyaml-6.0.3-cp311-cp311-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:850774a7879607d3a6f50d36d04f00ee69e7fc816450e5f7e58d7f17f1ae5c00", size = 882114, upload-time = "2025-09-25T21:32:03.376Z" }, - { url = "https://files.pythonhosted.org/packages/71/60/917329f640924b18ff085ab889a11c763e0b573da888e8404ff486657602/pyyaml-6.0.3-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:b8bb0864c5a28024fac8a632c443c87c5aa6f215c0b126c449ae1a150412f31d", size = 806638, upload-time = "2025-09-25T21:32:04.553Z" }, - { url = "https://files.pythonhosted.org/packages/dd/6f/529b0f316a9fd167281a6c3826b5583e6192dba792dd55e3203d3f8e655a/pyyaml-6.0.3-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:1d37d57ad971609cf3c53ba6a7e365e40660e3be0e5175fa9f2365a379d6095a", size = 767463, upload-time = "2025-09-25T21:32:06.152Z" }, - { url = "https://files.pythonhosted.org/packages/f2/6a/b627b4e0c1dd03718543519ffb2f1deea4a1e6d42fbab8021936a4d22589/pyyaml-6.0.3-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:37503bfbfc9d2c40b344d06b2199cf0e96e97957ab1c1b546fd4f87e53e5d3e4", size = 794986, upload-time = "2025-09-25T21:32:07.367Z" }, - { url = "https://files.pythonhosted.org/packages/45/91/47a6e1c42d9ee337c4839208f30d9f09caa9f720ec7582917b264defc875/pyyaml-6.0.3-cp311-cp311-win32.whl", hash = "sha256:8098f252adfa6c80ab48096053f512f2321f0b998f98150cea9bd23d83e1467b", size = 142543, upload-time = "2025-09-25T21:32:08.95Z" }, - { url = "https://files.pythonhosted.org/packages/da/e3/ea007450a105ae919a72393cb06f122f288ef60bba2dc64b26e2646fa315/pyyaml-6.0.3-cp311-cp311-win_amd64.whl", hash = "sha256:9f3bfb4965eb874431221a3ff3fdcddc7e74e3b07799e0e84ca4a0f867d449bf", size = 158763, upload-time = "2025-09-25T21:32:09.96Z" }, - { url = "https://files.pythonhosted.org/packages/d1/33/422b98d2195232ca1826284a76852ad5a86fe23e31b009c9886b2d0fb8b2/pyyaml-6.0.3-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:7f047e29dcae44602496db43be01ad42fc6f1cc0d8cd6c83d342306c32270196", size = 182063, upload-time = "2025-09-25T21:32:11.445Z" }, - { url = "https://files.pythonhosted.org/packages/89/a0/6cf41a19a1f2f3feab0e9c0b74134aa2ce6849093d5517a0c550fe37a648/pyyaml-6.0.3-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:fc09d0aa354569bc501d4e787133afc08552722d3ab34836a80547331bb5d4a0", size = 173973, upload-time = "2025-09-25T21:32:12.492Z" }, - { url = "https://files.pythonhosted.org/packages/ed/23/7a778b6bd0b9a8039df8b1b1d80e2e2ad78aa04171592c8a5c43a56a6af4/pyyaml-6.0.3-cp312-cp312-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:9149cad251584d5fb4981be1ecde53a1ca46c891a79788c0df828d2f166bda28", size = 775116, upload-time = "2025-09-25T21:32:13.652Z" }, - { url = "https://files.pythonhosted.org/packages/65/30/d7353c338e12baef4ecc1b09e877c1970bd3382789c159b4f89d6a70dc09/pyyaml-6.0.3-cp312-cp312-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:5fdec68f91a0c6739b380c83b951e2c72ac0197ace422360e6d5a959d8d97b2c", size = 844011, upload-time = "2025-09-25T21:32:15.21Z" }, - { url = "https://files.pythonhosted.org/packages/8b/9d/b3589d3877982d4f2329302ef98a8026e7f4443c765c46cfecc8858c6b4b/pyyaml-6.0.3-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:ba1cc08a7ccde2d2ec775841541641e4548226580ab850948cbfda66a1befcdc", size = 807870, upload-time = "2025-09-25T21:32:16.431Z" }, - { url = "https://files.pythonhosted.org/packages/05/c0/b3be26a015601b822b97d9149ff8cb5ead58c66f981e04fedf4e762f4bd4/pyyaml-6.0.3-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:8dc52c23056b9ddd46818a57b78404882310fb473d63f17b07d5c40421e47f8e", size = 761089, upload-time = "2025-09-25T21:32:17.56Z" }, - { url = "https://files.pythonhosted.org/packages/be/8e/98435a21d1d4b46590d5459a22d88128103f8da4c2d4cb8f14f2a96504e1/pyyaml-6.0.3-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:41715c910c881bc081f1e8872880d3c650acf13dfa8214bad49ed4cede7c34ea", size = 790181, upload-time = "2025-09-25T21:32:18.834Z" }, - { url = "https://files.pythonhosted.org/packages/74/93/7baea19427dcfbe1e5a372d81473250b379f04b1bd3c4c5ff825e2327202/pyyaml-6.0.3-cp312-cp312-win32.whl", hash = "sha256:96b533f0e99f6579b3d4d4995707cf36df9100d67e0c8303a0c55b27b5f99bc5", size = 137658, upload-time = "2025-09-25T21:32:20.209Z" }, - { url = "https://files.pythonhosted.org/packages/86/bf/899e81e4cce32febab4fb42bb97dcdf66bc135272882d1987881a4b519e9/pyyaml-6.0.3-cp312-cp312-win_amd64.whl", hash = "sha256:5fcd34e47f6e0b794d17de1b4ff496c00986e1c83f7ab2fb8fcfe9616ff7477b", size = 154003, upload-time = "2025-09-25T21:32:21.167Z" }, - { url = "https://files.pythonhosted.org/packages/1a/08/67bd04656199bbb51dbed1439b7f27601dfb576fb864099c7ef0c3e55531/pyyaml-6.0.3-cp312-cp312-win_arm64.whl", hash = "sha256:64386e5e707d03a7e172c0701abfb7e10f0fb753ee1d773128192742712a98fd", size = 140344, upload-time = "2025-09-25T21:32:22.617Z" }, - { url = "https://files.pythonhosted.org/packages/d1/11/0fd08f8192109f7169db964b5707a2f1e8b745d4e239b784a5a1dd80d1db/pyyaml-6.0.3-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:8da9669d359f02c0b91ccc01cac4a67f16afec0dac22c2ad09f46bee0697eba8", size = 181669, upload-time = "2025-09-25T21:32:23.673Z" }, - { url = "https://files.pythonhosted.org/packages/b1/16/95309993f1d3748cd644e02e38b75d50cbc0d9561d21f390a76242ce073f/pyyaml-6.0.3-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:2283a07e2c21a2aa78d9c4442724ec1eb15f5e42a723b99cb3d822d48f5f7ad1", size = 173252, upload-time = "2025-09-25T21:32:25.149Z" }, - { url = "https://files.pythonhosted.org/packages/50/31/b20f376d3f810b9b2371e72ef5adb33879b25edb7a6d072cb7ca0c486398/pyyaml-6.0.3-cp313-cp313-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:ee2922902c45ae8ccada2c5b501ab86c36525b883eff4255313a253a3160861c", size = 767081, upload-time = "2025-09-25T21:32:26.575Z" }, - { url = "https://files.pythonhosted.org/packages/49/1e/a55ca81e949270d5d4432fbbd19dfea5321eda7c41a849d443dc92fd1ff7/pyyaml-6.0.3-cp313-cp313-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:a33284e20b78bd4a18c8c2282d549d10bc8408a2a7ff57653c0cf0b9be0afce5", size = 841159, upload-time = "2025-09-25T21:32:27.727Z" }, - { url = "https://files.pythonhosted.org/packages/74/27/e5b8f34d02d9995b80abcef563ea1f8b56d20134d8f4e5e81733b1feceb2/pyyaml-6.0.3-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:0f29edc409a6392443abf94b9cf89ce99889a1dd5376d94316ae5145dfedd5d6", size = 801626, upload-time = "2025-09-25T21:32:28.878Z" }, - { url = "https://files.pythonhosted.org/packages/f9/11/ba845c23988798f40e52ba45f34849aa8a1f2d4af4b798588010792ebad6/pyyaml-6.0.3-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:f7057c9a337546edc7973c0d3ba84ddcdf0daa14533c2065749c9075001090e6", size = 753613, upload-time = "2025-09-25T21:32:30.178Z" }, - { url = "https://files.pythonhosted.org/packages/3d/e0/7966e1a7bfc0a45bf0a7fb6b98ea03fc9b8d84fa7f2229e9659680b69ee3/pyyaml-6.0.3-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:eda16858a3cab07b80edaf74336ece1f986ba330fdb8ee0d6c0d68fe82bc96be", size = 794115, upload-time = "2025-09-25T21:32:31.353Z" }, - { url = "https://files.pythonhosted.org/packages/de/94/980b50a6531b3019e45ddeada0626d45fa85cbe22300844a7983285bed3b/pyyaml-6.0.3-cp313-cp313-win32.whl", hash = "sha256:d0eae10f8159e8fdad514efdc92d74fd8d682c933a6dd088030f3834bc8e6b26", size = 137427, upload-time = "2025-09-25T21:32:32.58Z" }, - { url = "https://files.pythonhosted.org/packages/97/c9/39d5b874e8b28845e4ec2202b5da735d0199dbe5b8fb85f91398814a9a46/pyyaml-6.0.3-cp313-cp313-win_amd64.whl", hash = "sha256:79005a0d97d5ddabfeeea4cf676af11e647e41d81c9a7722a193022accdb6b7c", size = 154090, upload-time = "2025-09-25T21:32:33.659Z" }, - { url = "https://files.pythonhosted.org/packages/73/e8/2bdf3ca2090f68bb3d75b44da7bbc71843b19c9f2b9cb9b0f4ab7a5a4329/pyyaml-6.0.3-cp313-cp313-win_arm64.whl", hash = "sha256:5498cd1645aa724a7c71c8f378eb29ebe23da2fc0d7a08071d89469bf1d2defb", size = 140246, upload-time = "2025-09-25T21:32:34.663Z" }, { url = "https://files.pythonhosted.org/packages/9d/8c/f4bd7f6465179953d3ac9bc44ac1a8a3e6122cf8ada906b4f96c60172d43/pyyaml-6.0.3-cp314-cp314-macosx_10_13_x86_64.whl", hash = "sha256:8d1fab6bb153a416f9aeb4b8763bc0f22a5586065f86f7664fc23339fc1c1fac", size = 181814, upload-time = "2025-09-25T21:32:35.712Z" }, { url = "https://files.pythonhosted.org/packages/bd/9c/4d95bb87eb2063d20db7b60faa3840c1b18025517ae857371c4dd55a6b3a/pyyaml-6.0.3-cp314-cp314-macosx_11_0_arm64.whl", hash = "sha256:34d5fcd24b8445fadc33f9cf348c1047101756fd760b4dacb5c3e99755703310", size = 173809, upload-time = "2025-09-25T21:32:36.789Z" }, { url = "https://files.pythonhosted.org/packages/92/b5/47e807c2623074914e29dabd16cbbdd4bf5e9b2db9f8090fa64411fc5382/pyyaml-6.0.3-cp314-cp314-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:501a031947e3a9025ed4405a168e6ef5ae3126c59f90ce0cd6f2bfc477be31b7", size = 766454, upload-time = "2025-09-25T21:32:37.966Z" }, @@ -734,7 +676,7 @@ wheels = [ [[package]] name = "requests" -version = "2.32.5" +version = "2.34.2" source = { registry = "https://pypi.org/simple" } dependencies = [ { name = "certifi" }, @@ -742,48 +684,47 @@ dependencies = [ { name = "idna" }, { name = "urllib3" }, ] -sdist = { url = "https://files.pythonhosted.org/packages/c9/74/b3ff8e6c8446842c3f5c837e9c3dfcfe2018ea6ecef224c710c85ef728f4/requests-2.32.5.tar.gz", hash = "sha256:dbba0bac56e100853db0ea71b82b4dfd5fe2bf6d3754a8893c3af500cec7d7cf", size = 134517, upload-time = "2025-08-18T20:46:02.573Z" } +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/1e/db/4254e3eabe8020b458f1a747140d32277ec7a271daf1d235b70dc0b4e6e3/requests-2.32.5-py3-none-any.whl", hash = "sha256:2462f94637a34fd532264295e186976db0f5d453d1cdd31473c85a6a161affb6", size = 64738, upload-time = "2025-08-18T20:46:00.542Z" }, + { 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 = "rich" -version = "14.1.0" +version = "15.0.0" source = { registry = "https://pypi.org/simple" } dependencies = [ { name = "markdown-it-py" }, { name = "pygments" }, ] -sdist = { url = "https://files.pythonhosted.org/packages/fe/75/af448d8e52bf1d8fa6a9d089ca6c07ff4453d86c65c145d0a300bb073b9b/rich-14.1.0.tar.gz", hash = "sha256:e497a48b844b0320d45007cdebfeaeed8db2a4f4bcf49f15e455cfc4af11eaa8", size = 224441, upload-time = "2025-07-25T07:32:58.125Z" } +sdist = { url = "https://files.pythonhosted.org/packages/c0/8f/0722ca900cc807c13a6a0c696dacf35430f72e0ec571c4275d2371fca3e9/rich-15.0.0.tar.gz", hash = "sha256:edd07a4824c6b40189fb7ac9bc4c52536e9780fbbfbddf6f1e2502c31b068c36", size = 230680, upload-time = "2026-04-12T08:24:00.75Z" } wheels = [ - { url = "https://files.pythonhosted.org/packages/e3/30/3c4d035596d3cf444529e0b2953ad0466f6049528a879d27534700580395/rich-14.1.0-py3-none-any.whl", hash = "sha256:536f5f1785986d6dbdea3c75205c473f970777b4a0d6c6dd1b696aa05a3fa04f", size = 243368, upload-time = "2025-07-25T07:32:56.73Z" }, + { url = "https://files.pythonhosted.org/packages/82/3b/64d4899d73f91ba49a8c18a8ff3f0ea8f1c1d75481760df8c68ef5235bf5/rich-15.0.0-py3-none-any.whl", hash = "sha256:33bd4ef74232fb73fe9279a257718407f169c09b78a87ad3d296f548e27de0bb", size = 310654, upload-time = "2026-04-12T08:24:02.83Z" }, ] [[package]] name = "ruff" -version = "0.13.2" -source = { registry = "https://pypi.org/simple" } -sdist = { url = "https://files.pythonhosted.org/packages/02/df/8d7d8c515d33adfc540e2edf6c6021ea1c5a58a678d8cfce9fae59aabcab/ruff-0.13.2.tar.gz", hash = "sha256:cb12fffd32fb16d32cef4ed16d8c7cdc27ed7c944eaa98d99d01ab7ab0b710ff", size = 5416417, upload-time = "2025-09-25T14:54:09.936Z" } -wheels = [ - { url = "https://files.pythonhosted.org/packages/6e/84/5716a7fa4758e41bf70e603e13637c42cfb9dbf7ceb07180211b9bbf75ef/ruff-0.13.2-py3-none-linux_armv6l.whl", hash = "sha256:3796345842b55f033a78285e4f1641078f902020d8450cade03aad01bffd81c3", size = 12343254, upload-time = "2025-09-25T14:53:27.784Z" }, - { url = "https://files.pythonhosted.org/packages/9b/77/c7042582401bb9ac8eff25360e9335e901d7a1c0749a2b28ba4ecb239991/ruff-0.13.2-py3-none-macosx_10_12_x86_64.whl", hash = "sha256:ff7e4dda12e683e9709ac89e2dd436abf31a4d8a8fc3d89656231ed808e231d2", size = 13040891, upload-time = "2025-09-25T14:53:31.38Z" }, - { url = "https://files.pythonhosted.org/packages/c6/15/125a7f76eb295cb34d19c6778e3a82ace33730ad4e6f28d3427e134a02e0/ruff-0.13.2-py3-none-macosx_11_0_arm64.whl", hash = "sha256:c75e9d2a2fafd1fdd895d0e7e24b44355984affdde1c412a6f6d3f6e16b22d46", size = 12243588, upload-time = "2025-09-25T14:53:33.543Z" }, - { url = "https://files.pythonhosted.org/packages/9e/eb/0093ae04a70f81f8be7fd7ed6456e926b65d238fc122311293d033fdf91e/ruff-0.13.2-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:cceac74e7bbc53ed7d15d1042ffe7b6577bf294611ad90393bf9b2a0f0ec7cb6", size = 12491359, upload-time = "2025-09-25T14:53:35.892Z" }, - { url = "https://files.pythonhosted.org/packages/43/fe/72b525948a6956f07dad4a6f122336b6a05f2e3fd27471cea612349fedb9/ruff-0.13.2-py3-none-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:6ae3f469b5465ba6d9721383ae9d49310c19b452a161b57507764d7ef15f4b07", size = 12162486, upload-time = "2025-09-25T14:53:38.171Z" }, - { url = "https://files.pythonhosted.org/packages/6a/e3/0fac422bbbfb2ea838023e0d9fcf1f30183d83ab2482800e2cb892d02dfe/ruff-0.13.2-py3-none-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:4f8f9e3cd6714358238cd6626b9d43026ed19c0c018376ac1ef3c3a04ffb42d8", size = 13871203, upload-time = "2025-09-25T14:53:41.943Z" }, - { url = "https://files.pythonhosted.org/packages/6b/82/b721c8e3ec5df6d83ba0e45dcf00892c4f98b325256c42c38ef136496cbf/ruff-0.13.2-py3-none-manylinux_2_17_ppc64.manylinux2014_ppc64.whl", hash = "sha256:c6ed79584a8f6cbe2e5d7dbacf7cc1ee29cbdb5df1172e77fbdadc8bb85a1f89", size = 14929635, upload-time = "2025-09-25T14:53:43.953Z" }, - { url = "https://files.pythonhosted.org/packages/c4/a0/ad56faf6daa507b83079a1ad7a11694b87d61e6bf01c66bd82b466f21821/ruff-0.13.2-py3-none-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:aed130b2fde049cea2019f55deb939103123cdd191105f97a0599a3e753d61b0", size = 14338783, upload-time = "2025-09-25T14:53:46.205Z" }, - { url = "https://files.pythonhosted.org/packages/47/77/ad1d9156db8f99cd01ee7e29d74b34050e8075a8438e589121fcd25c4b08/ruff-0.13.2-py3-none-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:1887c230c2c9d65ed1b4e4cfe4d255577ea28b718ae226c348ae68df958191aa", size = 13355322, upload-time = "2025-09-25T14:53:48.164Z" }, - { url = "https://files.pythonhosted.org/packages/64/8b/e87cfca2be6f8b9f41f0bb12dc48c6455e2d66df46fe61bb441a226f1089/ruff-0.13.2-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:5bcb10276b69b3cfea3a102ca119ffe5c6ba3901e20e60cf9efb53fa417633c3", size = 13354427, upload-time = "2025-09-25T14:53:50.486Z" }, - { url = "https://files.pythonhosted.org/packages/7f/df/bf382f3fbead082a575edb860897287f42b1b3c694bafa16bc9904c11ed3/ruff-0.13.2-py3-none-manylinux_2_31_riscv64.whl", hash = "sha256:afa721017aa55a555b2ff7944816587f1cb813c2c0a882d158f59b832da1660d", size = 13537637, upload-time = "2025-09-25T14:53:52.887Z" }, - { url = "https://files.pythonhosted.org/packages/51/70/1fb7a7c8a6fc8bd15636288a46e209e81913b87988f26e1913d0851e54f4/ruff-0.13.2-py3-none-musllinux_1_2_aarch64.whl", hash = "sha256:1dbc875cf3720c64b3990fef8939334e74cb0ca65b8dbc61d1f439201a38101b", size = 12340025, upload-time = "2025-09-25T14:53:54.88Z" }, - { url = "https://files.pythonhosted.org/packages/4c/27/1e5b3f1c23ca5dd4106d9d580e5c13d9acb70288bff614b3d7b638378cc9/ruff-0.13.2-py3-none-musllinux_1_2_armv7l.whl", hash = "sha256:5b939a1b2a960e9742e9a347e5bbc9b3c3d2c716f86c6ae273d9cbd64f193f22", size = 12133449, upload-time = "2025-09-25T14:53:57.089Z" }, - { url = "https://files.pythonhosted.org/packages/2d/09/b92a5ccee289f11ab128df57d5911224197d8d55ef3bd2043534ff72ca54/ruff-0.13.2-py3-none-musllinux_1_2_i686.whl", hash = "sha256:50e2d52acb8de3804fc5f6e2fa3ae9bdc6812410a9e46837e673ad1f90a18736", size = 13051369, upload-time = "2025-09-25T14:53:59.124Z" }, - { url = "https://files.pythonhosted.org/packages/89/99/26c9d1c7d8150f45e346dc045cc49f23e961efceb4a70c47dea0960dea9a/ruff-0.13.2-py3-none-musllinux_1_2_x86_64.whl", hash = "sha256:3196bc13ab2110c176b9a4ae5ff7ab676faaa1964b330a1383ba20e1e19645f2", size = 13523644, upload-time = "2025-09-25T14:54:01.622Z" }, - { url = "https://files.pythonhosted.org/packages/f7/00/e7f1501e81e8ec290e79527827af1d88f541d8d26151751b46108978dade/ruff-0.13.2-py3-none-win32.whl", hash = "sha256:7c2a0b7c1e87795fec3404a485096bcd790216c7c146a922d121d8b9c8f1aaac", size = 12245990, upload-time = "2025-09-25T14:54:03.647Z" }, - { url = "https://files.pythonhosted.org/packages/ee/bd/d9f33a73de84fafd0146c6fba4f497c4565fe8fa8b46874b8e438869abc2/ruff-0.13.2-py3-none-win_amd64.whl", hash = "sha256:17d95fb32218357c89355f6f6f9a804133e404fc1f65694372e02a557edf8585", size = 13324004, upload-time = "2025-09-25T14:54:06.05Z" }, - { url = "https://files.pythonhosted.org/packages/c3/12/28fa2f597a605884deb0f65c1b1ae05111051b2a7030f5d8a4ff7f4599ba/ruff-0.13.2-py3-none-win_arm64.whl", hash = "sha256:da711b14c530412c827219312b7d7fbb4877fb31150083add7e8c5336549cea7", size = 12484437, upload-time = "2025-09-25T14:54:08.022Z" }, +version = "0.16.8" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/ba/78/449cb84790bd5cc3823b2652ee405a4558856e5c4195aee3a16bf7b3eb5d/ruff-0.16.8.tar.gz", hash = "sha256:9247bf92b5f04d825c8639a4fe423ec2e4222acd9222e58412b0dab7e442798b", size = 4938814, upload-time = "2026-09-16T15:54:46.688Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/ac/25/6071aabc530e9be7e2c195e8fe3f7aea2735405b6cf447212832d7811831/ruff-0.16.8-py3-none-linux_armv6l.whl", hash = "sha256:6ffbd6d87383c1edf5f6fa890f10200950240d7c1a16052a19a09d3a2307dd38", size = 10048966, upload-time = "2026-09-16T15:53:57.605Z" }, + { url = "https://files.pythonhosted.org/packages/54/98/07f90ecbc74dd5fb5764f11f2bc774d6a7cffef92d2ff5f5b4e9e23c754e/ruff-0.16.8-py3-none-macosx_10_12_x86_64.whl", hash = "sha256:42ed6b878ed61e3acca92f2730a17acff39286944ea82398544696366a6f925e", size = 10165498, upload-time = "2026-09-16T15:54:01.14Z" }, + { url = "https://files.pythonhosted.org/packages/fe/1f/e6a712e3b47cad4a40600134105ed193cb773f618a42eb7ba323cb812cc0/ruff-0.16.8-py3-none-macosx_11_0_arm64.whl", hash = "sha256:7ea781c7f2afba8c6a505ea0fb3f994020249e0c450635f5381286fea6b46170", size = 9830004, upload-time = "2026-09-16T15:54:03.998Z" }, + { url = "https://files.pythonhosted.org/packages/23/f2/311a08776d75d81c7676e20b6b020ae63cbe881fcdc7a8dd64e6e18bdd93/ruff-0.16.8-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:8efeae3bbe414a5efefda11a792dfb51ef90ac48d50c4830de2f644caf3e8659", size = 9986558, upload-time = "2026-09-16T15:54:06.804Z" }, + { url = "https://files.pythonhosted.org/packages/f3/ed/37b6cb3d3ba8c73e68ae3eb1d502383beb5aa05a582bb7bb3a922f929f54/ruff-0.16.8-py3-none-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:3a79b795469fef7fc6e908b218eed2eb17332afd85031db6480dc864560e69b2", size = 9877332, upload-time = "2026-09-16T15:54:09.552Z" }, + { url = "https://files.pythonhosted.org/packages/22/cc/40873a8f36ad084cc540d55fcca7077264d5b13b24659e9180c176fb2b08/ruff-0.16.8-py3-none-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:3fdc5563cdc50555e6fba39322850860e9267c1b3d12c26a74729d8604c3c812", size = 10507125, upload-time = "2026-09-16T15:54:12.152Z" }, + { url = "https://files.pythonhosted.org/packages/c3/e4/fc91a642b78ccbab6b9477720f3644ae7a10a9bcce69a934679cd64f62bc/ruff-0.16.8-py3-none-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:34508983c70665578dab88f5223d8e6228307e1135398ca8bfc8b7e9501e282b", size = 11336694, upload-time = "2026-09-16T15:54:15.489Z" }, + { url = "https://files.pythonhosted.org/packages/c2/3d/bbd2a9a600a4e73dc3e7548a249c8d1671273464b55822c6fae50f602dff/ruff-0.16.8-py3-none-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:644bb578569e0ffc575741232bd385dacdd6fbe123f1a729e7a225f54aa3957f", size = 10774448, upload-time = "2026-09-16T15:54:18.16Z" }, + { url = "https://files.pythonhosted.org/packages/1a/41/d83af9879a7b6e8bf5fe16b1da0b134049d2f5d3afac12defb0897cb84bd/ruff-0.16.8-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:15e7d226246961db9235098333caa13063906d3851136b84c2900b82f5daa1df", size = 10323796, upload-time = "2026-09-16T15:54:20.743Z" }, + { url = "https://files.pythonhosted.org/packages/f5/2c/cefd07bfe914b84943ea769ade8d607bd22750b965d3228eefd7cebd15d0/ruff-0.16.8-py3-none-manylinux_2_31_riscv64.whl", hash = "sha256:a2bf6bc3e9ebdd4449abc6f06cf64b98051a2c61cf94d2fe9596518c881f1a1e", size = 10514115, upload-time = "2026-09-16T15:54:23.497Z" }, + { url = "https://files.pythonhosted.org/packages/f3/9d/76a2e26c79a23be6e6e3664c57bec9e9fc8de155cfb9e4b67ea91b64f9d7/ruff-0.16.8-py3-none-musllinux_1_2_aarch64.whl", hash = "sha256:6ca111ba0849539165e9e59d2b442542f3c1e8060ebbdea82494f1ffbccb1e1f", size = 10072582, upload-time = "2026-09-16T15:54:26.185Z" }, + { url = "https://files.pythonhosted.org/packages/2e/d4/f42edddb39668af1a559ceafa3823aedd65633a48dc9768e775485faa2c1/ruff-0.16.8-py3-none-musllinux_1_2_armv7l.whl", hash = "sha256:359a1e5b495448ee1e91018064382ebc86f90e8aac2fed222c7d0e4e8df85fd2", size = 9879644, upload-time = "2026-09-16T15:54:29.278Z" }, + { url = "https://files.pythonhosted.org/packages/f8/d4/913e3195d95e0378786c6656945c865f534a3560e29139da4882aff630d1/ruff-0.16.8-py3-none-musllinux_1_2_i686.whl", hash = "sha256:59e8f5681349474110b24d62e93cfda6593f5fa3473446ca3705200cac1a08b9", size = 10231569, upload-time = "2026-09-16T15:54:32.036Z" }, + { url = "https://files.pythonhosted.org/packages/2b/c4/8aa6ea0bdcedbd1bf87397e2fc4ed8406448ea5842f8660bc6e5f163039d/ruff-0.16.8-py3-none-musllinux_1_2_x86_64.whl", hash = "sha256:efa3e7a16d1baaa79957888dfdf8be9ef2e44db81cb032af06d76632ab59e773", size = 10663666, upload-time = "2026-09-16T15:54:34.838Z" }, + { url = "https://files.pythonhosted.org/packages/3d/02/7f10ef4700bc223c30a3fdd10631a29830c45524b810a3c7ed947af64591/ruff-0.16.8-py3-none-win32.whl", hash = "sha256:55793ba85c69921e89be061426d91a78652d6e50317c962240922747a4eb713f", size = 10093472, upload-time = "2026-09-16T15:54:37.47Z" }, + { url = "https://files.pythonhosted.org/packages/1e/5d/a509c07d714b6da88f2c518b4637cf6f1d46b074be8f0f1e5fb9ff5126fe/ruff-0.16.8-py3-none-win_amd64.whl", hash = "sha256:a6b85621fd3c81e31fc5f5add09c9c078b430db3595ca632efafdec9e64ebfaa", size = 10586899, upload-time = "2026-09-16T15:54:40.488Z" }, + { url = "https://files.pythonhosted.org/packages/fe/a0/50787329e4f20bf9dc9f6230015d46ec69c51a97ace5bc202dae4755365d/ruff-0.16.8-py3-none-win_arm64.whl", hash = "sha256:d075e820af612102ce217f07cc93e69f9490b10ec13ea85fa87bd03d996cef8a", size = 10386316, upload-time = "2026-09-16T15:54:43.332Z" }, ] [[package]] @@ -804,67 +745,58 @@ 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 = "sniffio" -version = "1.3.1" -source = { registry = "https://pypi.org/simple" } -sdist = { url = "https://files.pythonhosted.org/packages/a2/87/a6771e1546d97e7e041b6ae58d80074f81b7d5121207425c964ddf5cfdbd/sniffio-1.3.1.tar.gz", hash = "sha256:f4324edc670a0f49750a81b895f35c3adb843cca46f0530f79fc1babb23789dc", size = 20372, upload-time = "2024-02-25T23:20:04.057Z" } -wheels = [ - { url = "https://files.pythonhosted.org/packages/e9/44/75a9c9421471a6c4805dbf2356f7c181a29c1879239abab1ea2cc8f38b40/sniffio-1.3.1-py3-none-any.whl", hash = "sha256:2f6da418d1f1e0fddd844478f41680e794e6051915791a034ff65e5f100525a2", size = 10235, upload-time = "2024-02-25T23:20:01.196Z" }, -] - [[package]] name = "tomlkit" -version = "0.13.3" +version = "0.15.1" source = { registry = "https://pypi.org/simple" } -sdist = { url = "https://files.pythonhosted.org/packages/cc/18/0bbf3884e9eaa38819ebe46a7bd25dcd56b67434402b66a58c4b8e552575/tomlkit-0.13.3.tar.gz", hash = "sha256:430cf247ee57df2b94ee3fbe588e71d362a941ebb545dec29b53961d61add2a1", size = 185207, upload-time = "2025-06-05T07:13:44.947Z" } +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/bd/75/8539d011f6be8e29f339c42e633aae3cb73bffa95dd0f9adec09b9c58e85/tomlkit-0.13.3-py3-none-any.whl", hash = "sha256:c89c649d79ee40629a9fda55f8ace8c6a1b42deb912b2a8fd8d942ddadb606b0", size = 38901, upload-time = "2025-06-05T07:13:43.546Z" }, + { 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 = "typer" -version = "0.19.2" +version = "0.27.2" source = { registry = "https://pypi.org/simple" } dependencies = [ - { name = "click" }, + { name = "annotated-doc" }, + { name = "colorama", marker = "sys_platform == 'win32'" }, { name = "rich" }, { name = "shellingham" }, - { name = "typing-extensions" }, ] -sdist = { url = "https://files.pythonhosted.org/packages/21/ca/950278884e2ca20547ff3eb109478c6baf6b8cf219318e6bc4f666fad8e8/typer-0.19.2.tar.gz", hash = "sha256:9ad824308ded0ad06cc716434705f691d4ee0bfd0fb081839d2e426860e7fdca", size = 104755, upload-time = "2025-09-23T09:47:48.256Z" } +sdist = { url = "https://files.pythonhosted.org/packages/16/f7/57713ba479fd405eb76de31404b2c744c289e336b2d999511ebf51e496f7/typer-0.27.2.tar.gz", hash = "sha256:269b7eb9d3c202ca84b4bc9618cb04ebb43d3d4d1e567e4c768607232c05f945", size = 204045, upload-time = "2026-08-28T10:26:55.046Z" } wheels = [ - { url = "https://files.pythonhosted.org/packages/00/22/35617eee79080a5d071d0f14ad698d325ee6b3bf824fc0467c03b30e7fa8/typer-0.19.2-py3-none-any.whl", hash = "sha256:755e7e19670ffad8283db353267cb81ef252f595aa6834a0d1ca9312d9326cb9", size = 46748, upload-time = "2025-09-23T09:47:46.777Z" }, + { url = "https://files.pythonhosted.org/packages/dc/bf/205d0004930ede8f542fb58f601526fccf4ae7626075ca1e6c4de5d3d652/typer-0.27.2-py3-none-any.whl", hash = "sha256:b3a5fc4342d5fc8fda8fc3010b1cf117e9249aab7fae800c2eff62fd3842d97d", size = 123130, upload-time = "2026-08-28T10:26:53.752Z" }, ] [[package]] name = "typing-extensions" -version = "4.15.0" +version = "4.16.0" source = { registry = "https://pypi.org/simple" } -sdist = { url = "https://files.pythonhosted.org/packages/72/94/1a15dd82efb362ac84269196e94cf00f187f7ed21c242792a923cdb1c61f/typing_extensions-4.15.0.tar.gz", hash = "sha256:0cea48d173cc12fa28ecabc3b837ea3cf6f38c6d1136f85cbaaf598984861466", size = 109391, upload-time = "2025-08-25T13:49:26.313Z" } +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/18/67/36e9267722cc04a6b9f15c7f3441c2363321a3ea07da7ae0c0707beb2a9c/typing_extensions-4.15.0-py3-none-any.whl", hash = "sha256:f0fa19c6845758ab08074a0cfa8b7aecb71c999ca73d62883bc25cc018c4e548", size = 44614, upload-time = "2025-08-25T13:49:24.86Z" }, + { 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 = "typing-inspection" -version = "0.4.2" +version = "0.4.4" source = { registry = "https://pypi.org/simple" } dependencies = [ { name = "typing-extensions" }, ] -sdist = { url = "https://files.pythonhosted.org/packages/55/e3/70399cb7dd41c10ac53367ae42139cf4b1ca5f36bb3dc6c9d33acdb43655/typing_inspection-0.4.2.tar.gz", hash = "sha256:ba561c48a67c5958007083d386c3295464928b01faa735ab8547c5692e87f464", size = 75949, upload-time = "2025-10-01T02:14:41.687Z" } +sdist = { url = "https://files.pythonhosted.org/packages/a3/26/b09b8010994eccc3c09092e6b34058f36a460eea2d4c3e8b910c695975a0/typing_inspection-0.4.4.tar.gz", hash = "sha256:547274fa6b0a561ccf549cc9524b999a578e737d015d8709d021f9d0d13bea47", size = 76928, upload-time = "2026-08-12T12:37:25.997Z" } wheels = [ - { url = "https://files.pythonhosted.org/packages/dc/9b/47798a6c91d8bdb567fe2698fe81e0c6b7cb7ef4d13da4114b41d239f65d/typing_inspection-0.4.2-py3-none-any.whl", hash = "sha256:4ed1cacbdc298c220f1bd249ed5287caa16f34d44ef4e9c3d0cbad5b521545e7", size = 14611, upload-time = "2025-10-01T02:14:40.154Z" }, + { url = "https://files.pythonhosted.org/packages/67/81/4add07e5172b7ac40d8ed5ff580409a7801a4fe26d529bdd915401dabfbe/typing_inspection-0.4.4-py3-none-any.whl", hash = "sha256:65b8397ba37ccbce054456aaccddfc91e6e3083c92824df348d96ca832f3f147", size = 14750, upload-time = "2026-08-12T12:37:24.648Z" }, ] [[package]] name = "urllib3" -version = "2.5.0" +version = "2.8.0" source = { registry = "https://pypi.org/simple" } -sdist = { url = "https://files.pythonhosted.org/packages/15/22/9ee70a2574a4f4599c47dd506532914ce044817c7752a79b6a51286319bc/urllib3-2.5.0.tar.gz", hash = "sha256:3fc47733c7e419d4bc3f6b3dc2b4f890bb743906a30d56ba4a5bfa4bbff92760", size = 393185, upload-time = "2025-06-18T14:07:41.644Z" } +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/a7/c2/fe1e52489ae3122415c51f387e221dd0773709bad6c6cdaa599e8a2c5185/urllib3-2.5.0-py3-none-any.whl", hash = "sha256:e6b01673c0fa6a13e374b50871808eb3bf7046c4b125b216f6bf1cc604cff0dc", size = 129795, upload-time = "2025-06-18T14:07:40.39Z" }, + { 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]] @@ -873,15 +805,6 @@ version = "6.0.0" source = { registry = "https://pypi.org/simple" } sdist = { url = "https://files.pythonhosted.org/packages/db/7d/7f3d619e951c88ed75c6037b246ddcf2d322812ee8ea189be89511721d54/watchdog-6.0.0.tar.gz", hash = "sha256:9ddf7c82fda3ae8e24decda1338ede66e1c99883db93711d8fb941eaa2d8c282", size = 131220, upload-time = "2024-11-01T14:07:13.037Z" } wheels = [ - { url = "https://files.pythonhosted.org/packages/e0/24/d9be5cd6642a6aa68352ded4b4b10fb0d7889cb7f45814fb92cecd35f101/watchdog-6.0.0-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:6eb11feb5a0d452ee41f824e271ca311a09e250441c262ca2fd7ebcf2461a06c", size = 96393, upload-time = "2024-11-01T14:06:31.756Z" }, - { url = "https://files.pythonhosted.org/packages/63/7a/6013b0d8dbc56adca7fdd4f0beed381c59f6752341b12fa0886fa7afc78b/watchdog-6.0.0-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:ef810fbf7b781a5a593894e4f439773830bdecb885e6880d957d5b9382a960d2", size = 88392, upload-time = "2024-11-01T14:06:32.99Z" }, - { url = "https://files.pythonhosted.org/packages/d1/40/b75381494851556de56281e053700e46bff5b37bf4c7267e858640af5a7f/watchdog-6.0.0-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:afd0fe1b2270917c5e23c2a65ce50c2a4abb63daafb0d419fde368e272a76b7c", size = 89019, upload-time = "2024-11-01T14:06:34.963Z" }, - { url = "https://files.pythonhosted.org/packages/39/ea/3930d07dafc9e286ed356a679aa02d777c06e9bfd1164fa7c19c288a5483/watchdog-6.0.0-cp312-cp312-macosx_10_13_universal2.whl", hash = "sha256:bdd4e6f14b8b18c334febb9c4425a878a2ac20efd1e0b231978e7b150f92a948", size = 96471, upload-time = "2024-11-01T14:06:37.745Z" }, - { url = "https://files.pythonhosted.org/packages/12/87/48361531f70b1f87928b045df868a9fd4e253d9ae087fa4cf3f7113be363/watchdog-6.0.0-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:c7c15dda13c4eb00d6fb6fc508b3c0ed88b9d5d374056b239c4ad1611125c860", size = 88449, upload-time = "2024-11-01T14:06:39.748Z" }, - { url = "https://files.pythonhosted.org/packages/5b/7e/8f322f5e600812e6f9a31b75d242631068ca8f4ef0582dd3ae6e72daecc8/watchdog-6.0.0-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:6f10cb2d5902447c7d0da897e2c6768bca89174d0c6e1e30abec5421af97a5b0", size = 89054, upload-time = "2024-11-01T14:06:41.009Z" }, - { url = "https://files.pythonhosted.org/packages/68/98/b0345cabdce2041a01293ba483333582891a3bd5769b08eceb0d406056ef/watchdog-6.0.0-cp313-cp313-macosx_10_13_universal2.whl", hash = "sha256:490ab2ef84f11129844c23fb14ecf30ef3d8a6abafd3754a6f75ca1e6654136c", size = 96480, upload-time = "2024-11-01T14:06:42.952Z" }, - { url = "https://files.pythonhosted.org/packages/85/83/cdf13902c626b28eedef7ec4f10745c52aad8a8fe7eb04ed7b1f111ca20e/watchdog-6.0.0-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:76aae96b00ae814b181bb25b1b98076d5fc84e8a53cd8885a318b42b6d3a5134", size = 88451, upload-time = "2024-11-01T14:06:45.084Z" }, - { url = "https://files.pythonhosted.org/packages/fe/c4/225c87bae08c8b9ec99030cd48ae9c4eca050a59bf5c2255853e18c87b50/watchdog-6.0.0-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:a175f755fc2279e0b7312c0035d52e27211a5bc39719dd529625b1930917345b", size = 89057, upload-time = "2024-11-01T14:06:47.324Z" }, { url = "https://files.pythonhosted.org/packages/a9/c7/ca4bf3e518cb57a686b2feb4f55a1892fd9a3dd13f470fca14e00f80ea36/watchdog-6.0.0-py3-none-manylinux2014_aarch64.whl", hash = "sha256:7607498efa04a3542ae3e05e64da8202e58159aa1fa4acddf7678d34a35d4f13", size = 79079, upload-time = "2024-11-01T14:06:59.472Z" }, { url = "https://files.pythonhosted.org/packages/5c/51/d46dc9332f9a647593c947b4b88e2381c8dfc0942d15b8edc0310fa4abb1/watchdog-6.0.0-py3-none-manylinux2014_armv7l.whl", hash = "sha256:9041567ee8953024c83343288ccc458fd0a2d811d6a0fd68c4c22609e3490379", size = 79078, upload-time = "2024-11-01T14:07:01.431Z" }, { url = "https://files.pythonhosted.org/packages/d4/57/04edbf5e169cd318d5f07b4766fee38e825d64b6913ca157ca32d1a42267/watchdog-6.0.0-py3-none-manylinux2014_i686.whl", hash = "sha256:82dc3e3143c7e38ec49d61af98d6558288c415eac98486a5c581726e0737c00e", size = 79076, upload-time = "2024-11-01T14:07:02.568Z" },