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

Introduce new script that validates the signatures match between the .pyi file and the bridge #7646

Merged
merged 10 commits into from
Oct 9, 2024

Conversation

jleibs
Copy link
Member

@jleibs jleibs commented Oct 8, 2024

What

Detected several issues:

➜  pixi run check-py-signatures
✨ Pixi task (check-py-signatures in py): python scripts/ci/check_python_signatures.py
IndexColumnSelector.__new__(…) signature mismatch:
    Stub: (cls, index)
    Runtime: (*args, **kwargs)
ComponentColumnSelector.__new__(…) signature mismatch:
    Stub: (cls, entity_path, component_type)
    Runtime: (*args, **kwargs)
Recording.view(…) signature mismatch:
    Stub: (self, /, index, contents)
    Runtime: (self, /, *, index, contents)
load_recording(…) signature mismatch:
  Stub: (filename)
  Runtime: (path_to_rrd)
load_archive(…) signature mismatch:
  Stub: (filename)
  Runtime: (path_to_rrd)

Example CI failure:
image

Checklist

  • I have read and agree to Contributor Guide and the Code of Conduct
  • I've included a screenshot or gif (if applicable)
  • I have tested the web demo (if applicable):
  • The PR title and labels are set such as to maximize their usefulness for the next release's CHANGELOG
  • If applicable, add a new check to the release checklist!
  • If have noted any breaking changes to the log API in CHANGELOG.md and the migration guide

To run all checks from main, comment on the PR with @rerun-bot full-check.

@jleibs jleibs added 🐍 Python API Python logging API exclude from changelog PRs with this won't show up in CHANGELOG.md labels Oct 8, 2024
@jleibs jleibs marked this pull request as ready for review October 8, 2024 22:07
Copy link

github-actions bot commented Oct 8, 2024

Deployed docs

Commit Link
b814b3c https://landing-q3riqv4vf-rerun.vercel.app/docs

@teh-cmc teh-cmc self-requested a review October 9, 2024 06:57
pixi.toml Outdated Show resolved Hide resolved
Copy link
Member

@abey79 abey79 left a comment

Choose a reason for hiding this comment

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

Extremely based

scripts/ci/check_python_signatures.py Outdated Show resolved Hide resolved
from pathlib import Path
from typing import Any

import parso
Copy link
Member

Choose a reason for hiding this comment

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

Shouldn't this be added to the pixi.toml?

Copy link
Member Author

Choose a reason for hiding this comment

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

It was already in the environment, but good call. I'll make it explicit.

@jleibs jleibs merged commit a98d534 into main Oct 9, 2024
40 checks passed
@jleibs jleibs deleted the jleibs/check_bridge_signatures branch October 9, 2024 16:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
exclude from changelog PRs with this won't show up in CHANGELOG.md 🐍 Python API Python logging API
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Validate .pyi is self consistent with our bindings
3 participants