oresttokovenko opened a new pull request, #4215:
URL: https://github.com/apache/iceberg-python/pull/4215

   # What
   
   Add a `pyproject` nox session that validates `pyproject.toml` against the 
SchemaStore JSON schema with taplo, pinned as `taplo==0.9.3` in the `lint` 
dependency group. The schema assignment lives in `.taplo.toml`.
   
   # Why
   
   `pyproject.toml` configures every tool in this repository, and a wrong type 
or an unknown key only surfaces later, when the tool that reads it fails. The 
session catches it in the gate instead.
   
   # Why the extra file
   
   taplo looks for `.taplo.toml` or `taplo.toml` and ignores `[tool.taplo]` 
inside `pyproject.toml`, so the rule that assigns the schema cannot live in 
`pyproject.toml` itself. Checked directly: with the same rule moved into 
`[tool.taplo]`, an invalid `pyproject.toml` still passes, exit 0. The snippet 
also needed `[rule.schema] path`, not `[rule.options.schema] url`, which taplo 
0.9.3 rejects as an unknown field.
   
   # Tests
   
   `just check` runs seven sessions in 10 seconds, including `pyproject`. 
Setting `line-length = "130"` makes the session exit 1 with `"130" is not valid 
under any of the schemas listed in the 'anyOf' keyword`, and the valid file 
passes. The schema is fetched from `json.schemastore.org` when the session 
runs, so it needs network.
   
   # Stacked on #4208
   
   Built on #4208 for the noxfile and the dependency groups. Once #4208 merges, 
the diff here is the single top commit.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to