Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(deps): bump version to 2024.11.25 #90

Merged
merged 2 commits into from
Nov 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@
This provides a versioned copy of [SchemaStore][] for [validate-pyproject][].
You can pin this to get a stable set of schema files.

Nested schemas are not supported yet. Support will require updates to
validate-pyproject. For now, they are replaced with `"type": "object"`.

## Usage

The following should be supported:
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ build-backend = "hatchling.build"

[project]
name = "validate-pyproject-schema-store"
version = "2024.11.22"
version = "2024.11.25"
authors = [
{ name = "Henry Schreiner", email = "[email protected]" },
]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,18 @@
],
"default": "none",
"description": "How to inherit the parent's value."
}
},
"enable": {
"enum": [
"cpython-freethreading",
"cpython-prerelease",
"pypy"
]
},
"description": "A Python version or flavor to enable."
},
"additionalProperties": false,
"description": "cibuildwheel's toml file, generated with ./bin/generate_schema.py --schemastore from cibuildwheel.",
"description": "cibuildwheel's settings.",
"type": "object",
"properties": {
"archs": {
Expand Down Expand Up @@ -228,6 +236,21 @@
"type": "string",
"title": "CIBW_DEPENDENCY_VERSIONS"
},
"enable": {
"description": "Enable or disable certain builds.",
"oneOf": [
{
"$ref": "#/$defs/enable"
},
{
"type": "array",
"items": {
"$ref": "#/$defs/enable"
}
}
],
"title": "CIBW_ENABLE"
},
"environment": {
"description": "Set environment variables needed during the build.",
"oneOf": [
Expand Down Expand Up @@ -265,13 +288,19 @@
"type": "boolean",
"default": false,
"description": "The project supports free-threaded builds of Python (PEP703)",
"deprecated": "Use the `enable` option instead.",
"title": "CIBW_FREE_THREADED_SUPPORT"
},
"manylinux-aarch64-image": {
"type": "string",
"description": "Specify alternative manylinux / musllinux container images",
"title": "CIBW_MANYLINUX_AARCH64_IMAGE"
},
"manylinux-armv7l-image": {
"type": "string",
"description": "Specify alternative manylinux / musllinux container images",
"title": "CIBW_MANYLINUX_ARMV7L_IMAGE"
},
"manylinux-i686-image": {
"type": "string",
"description": "Specify alternative manylinux / musllinux container images",
Expand Down Expand Up @@ -397,6 +426,21 @@
],
"title": "CIBW_TEST_EXTRAS"
},
"test-groups": {
"description": "Install extra groups when testing",
"oneOf": [
{
"type": "string"
},
{
"type": "array",
"items": {
"type": "string"
}
}
],
"title": "CIBW_TEST_GROUPS"
},
"test-requires": {
"description": "Install Python dependencies before running the tests",
"oneOf": [
Expand Down Expand Up @@ -523,6 +567,9 @@
"manylinux-aarch64-image": {
"$ref": "#/properties/manylinux-aarch64-image"
},
"manylinux-armv7l-image": {
"$ref": "#/properties/manylinux-armv7l-image"
},
"manylinux-i686-image": {
"$ref": "#/properties/manylinux-i686-image"
},
Expand Down Expand Up @@ -571,6 +618,9 @@
"test-extras": {
"$ref": "#/properties/test-extras"
},
"test-groups": {
"$ref": "#/properties/test-groups"
},
"test-requires": {
"$ref": "#/properties/test-requires"
}
Expand Down Expand Up @@ -614,6 +664,9 @@
"manylinux-aarch64-image": {
"$ref": "#/properties/manylinux-aarch64-image"
},
"manylinux-armv7l-image": {
"$ref": "#/properties/manylinux-armv7l-image"
},
"manylinux-i686-image": {
"$ref": "#/properties/manylinux-i686-image"
},
Expand Down Expand Up @@ -675,6 +728,9 @@
"test-extras": {
"$ref": "#/properties/test-extras"
},
"test-groups": {
"$ref": "#/properties/test-groups"
},
"test-requires": {
"$ref": "#/properties/test-requires"
}
Expand Down Expand Up @@ -720,6 +776,9 @@
"test-extras": {
"$ref": "#/properties/test-extras"
},
"test-groups": {
"$ref": "#/properties/test-groups"
},
"test-requires": {
"$ref": "#/properties/test-requires"
}
Expand Down Expand Up @@ -778,6 +837,9 @@
"test-extras": {
"$ref": "#/properties/test-extras"
},
"test-groups": {
"$ref": "#/properties/test-groups"
},
"test-requires": {
"$ref": "#/properties/test-requires"
}
Expand Down Expand Up @@ -823,6 +885,9 @@
"test-extras": {
"$ref": "#/properties/test-extras"
},
"test-groups": {
"$ref": "#/properties/test-groups"
},
"test-requires": {
"$ref": "#/properties/test-requires"
}
Expand Down
3 changes: 3 additions & 0 deletions src/validate_pyproject_schema_store/resources/pdm.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -918,6 +918,9 @@
"key": "https://backend.pdm-project.org/build_config/#specify-the-package-files"
}
}
},
"dockerize": {
"type": "object"
}
},
"type": "object",
Expand Down
19 changes: 12 additions & 7 deletions tools/sync.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,18 @@ async def get_url(session, url: str) -> dict[str, Any]:
return await resp.json() # type: ignore[no-any-return]


def write_if_changed(filename: Path, contents: str) -> bool:
def write_if_changed(filename: Path, contents: dict[str, Any]) -> bool:
# if filename.name == "pdm.schema.json":
properties = contents.get("properties", {})
for prop in properties.values():
if prop.get("$ref", "").startswith("https://json.schemastore.org/partial"):
prop.clear()
prop["type"] = "object"
new = json.dumps(contents, indent=2) + "\n"
prev = filename.read_text(encoding="utf-8") if filename.is_file() else ""
if prev == contents:
if prev == new:
return False
filename.write_text(contents, encoding="utf-8")
filename.write_text(new, encoding="utf-8")
return True


Expand All @@ -45,8 +52,7 @@ async def main() -> None:
tool_table = {t: d["$ref"] for t, d in tool_properties.items() if "$ref" in d}

tool_json = RESOURCES / "tool.json"
new = json.dumps(tool_table, indent=2) + "\n"
changed |= write_if_changed(tool_json, new)
changed |= write_if_changed(tool_json, tool_table)

async with asyncio.TaskGroup() as tg:
results = {
Expand All @@ -58,8 +64,7 @@ async def main() -> None:
target = RESOURCES / f"{tool}.schema.json"
result = future.result()

new = json.dumps(result, indent=2) + "\n"
changed |= write_if_changed(target, new)
changed |= write_if_changed(target, result)

if changed:
pyproject = DIR.parent / "pyproject.toml"
Expand Down
Loading