Skip to content

Add script to update ty.json in schemastore#65

Merged
MichaReiser merged 2 commits intomainfrom
micha/schemastore-script
May 8, 2025
Merged

Add script to update ty.json in schemastore#65
MichaReiser merged 2 commits intomainfrom
micha/schemastore-script

Conversation

@MichaReiser
Copy link
Member

@MichaReiser MichaReiser commented May 6, 2025

Summary

Adds a script to update ty's schema in the schemastore repository

Closes #13

Test plan

https://github.com/astral-sh/schemastore/pull/new/update-ty-52d16b44bcc060bec0a0381a1ea8052bf4479f14

@MichaReiser MichaReiser added the release Related to the release process label May 6, 2025
@MichaReiser MichaReiser force-pushed the micha/schemastore-script branch from 4ef2410 to dfe534c Compare May 6, 2025 18:11
@zanieb
Copy link
Member

zanieb commented May 6, 2025

Check that the ruff submodule has no changes or automatically update it

You could crib this from the release.sh script (and / or move it to a check-submodule.sh script). I'm unsure it should be updated though.

@MichaReiser
Copy link
Member Author

You could crib this from the release.sh script (and / or move it to a check-submodule.sh script). I'm unsure it should be updated though.

Yeah, updating feels a bit aggressive but I think it's important to warn if someone is on a stale revision. I've to figure out how to check that.

@MichaReiser MichaReiser force-pushed the micha/schemastore-script branch 4 times, most recently from a2e805c to 47c9408 Compare May 7, 2025 08:59
@MichaReiser MichaReiser marked this pull request as ready for review May 7, 2025 09:00
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is mostly just copy paste from the ruff repository. The only real addition is in main where we check the state of the ruff submodule

@MichaReiser MichaReiser force-pushed the micha/schemastore-script branch from 47c9408 to 24cf146 Compare May 7, 2025 14:35
@MichaReiser MichaReiser force-pushed the micha/schemastore-script branch from 24cf146 to e80caba Compare May 7, 2025 14:38
@MichaReiser MichaReiser enabled auto-merge (squash) May 8, 2025 11:28
@MichaReiser MichaReiser merged commit 9efd860 into main May 8, 2025
9 checks passed
@MichaReiser MichaReiser deleted the micha/schemastore-script branch May 8, 2025 11:30
zanieb added a commit that referenced this pull request May 8, 2025
Mostly making sure that the script is robust to alternative working
directories, and some stylistic nits.

Following up on
#65 (comment) — not to
be annoying, but using `git` to find the root _can_ be wrong here


```
❯ cd ruff
❯ uv run --only-dev ../scripts/update_schemastore.py
> /Users/zb/workspace/ty/scripts/update_schemastore.py(146)main()
-> breakpoint()
(Pdb) print(root)
/Users/zb/workspace/ty/ruff
```
epitech314 added a commit to epitech314/ty that referenced this pull request Nov 12, 2025
Mostly making sure that the script is robust to alternative working
directories, and some stylistic nits.

Following up on
astral-sh/ty#65 (comment) — not to
be annoying, but using `git` to find the root _can_ be wrong here


```
❯ cd ruff
❯ uv run --only-dev ../scripts/update_schemastore.py
> /Users/zb/workspace/ty/scripts/update_schemastore.py(146)main()
-> breakpoint()
(Pdb) print(root)
/Users/zb/workspace/ty/ruff
```
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

release Related to the release process

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Setup publish to schema store

2 participants