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

ci: run checks for all platforms on PR #2826

Merged
merged 1 commit into from
Dec 25, 2022
Merged

Conversation

davidhewitt
Copy link
Member

@davidhewitt davidhewitt commented Dec 24, 2022

I've been struggling a little to merge PRs with the new bors workflow; overall I think the lighter PR workflow is better but the number of combinations of older pythons / platforms not covered makes it easy for the bors step to fail.

This PR tries to improve the situation by merging the clippy and check-target job and running it for all supported platforms on PR. Hopefully if these are green, then there's high likelihood that tests will build and should pass unless there's logic errors.

While creating this I found a build error on PyPy which made me notice we can support PyList::get_item_unchecked for PyPy, so I added it.

@davidhewitt davidhewitt force-pushed the ci-checks branch 9 times, most recently from 9dd6fbb to 750b914 Compare December 24, 2022 19:58
@davidhewitt davidhewitt marked this pull request as draft December 24, 2022 20:04
@davidhewitt davidhewitt force-pushed the ci-checks branch 5 times, most recently from 4b4482b to ae23e49 Compare December 24, 2022 20:27
@davidhewitt davidhewitt marked this pull request as ready for review December 24, 2022 20:47
@davidhewitt
Copy link
Member Author

davidhewitt commented Dec 24, 2022

Looks like this works quite well, the clippy jobs take around 10 mins, could be faster if we checked fewer feature combinations / python versions. I think it's probably good as-is, what do people think?

Another step to do soon is merge the tests & coverage jobs into one; I think we don't need separate steps for those any more. (We can run coverage for all versions on bors, and just run coverage for 3.11 on PR.)

Copy link
Member

@adamreichold adamreichold left a comment

Choose a reason for hiding this comment

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

The intended functionality looks good to me. Beyond that as usual, more questions than answers...

.github/workflows/ci.yml Outdated Show resolved Hide resolved
noxfile.py Show resolved Hide resolved
newsfragments/2826.added.md Show resolved Hide resolved
bors bot added a commit that referenced this pull request Dec 25, 2022
2827: pypy: enable `PyList::get_item_unchecked` r=adamreichold a=davidhewitt

Split out from #2826. Approved previously as part of that review.

Co-authored-by: David Hewitt <1939362+davidhewitt@users.noreply.github.com>
bors bot added a commit that referenced this pull request Dec 25, 2022
2828: move set-minimal-package-versions to nox r=davidhewitt a=davidhewitt

Split from #2826 because #2827 couldn't merge due to `hermit-abi` MSRV break, which this PR also fixes (by pinning its dependent `num_cpus` back). 

Co-authored-by: David Hewitt <1939362+davidhewitt@users.noreply.github.com>
bors bot added a commit that referenced this pull request Dec 25, 2022
2828: move set-minimal-package-versions to nox r=davidhewitt a=davidhewitt

Split from #2826 because #2827 couldn't merge due to `hermit-abi` MSRV break, which this PR also fixes (by pinning its dependent `num_cpus` back). 

Co-authored-by: David Hewitt <1939362+davidhewitt@users.noreply.github.com>
bors bot added a commit that referenced this pull request Dec 25, 2022
2784: Automatically generate `__text_signature__` for all functions r=davidhewitt a=davidhewitt

This PR makes it so that PyO3 generates `__text_signature__` by default for all functions. It also introduces `#[pyo3(text_signature = false)]` to disable the built-in generation.

There are a few limitations which we can improve later:
 - All default values are currently set to `...`. I think this is ok because `.pyi` files often do the same. Maybe for numbers, strings, `None` and `True`/`False` we could render these in a future PR.
 - No support for `#[new]` yet.

Alternative design ideas:
- Only autogenerate for methods with `#[pyo3(signature = (...))]` annotation. I started with this, and then decided it made sense to do it for everything.
- Opt-out with `#[pyo3(text_signature = None)]`. This is slightly harder to parse in the macro, but matches the final result in Python better, so if this looks preferable to others, I can change from `text_signature = false` to `text_signature = None`.

There's some small tidying up / refactoring to do before this merges (happy to take suggestions on this), however the general logic, design and docs are ready for review.


2827: pypy: enable `PyList::get_item_unchecked` r=davidhewitt a=davidhewitt

Split out from #2826. Approved previously as part of that review.

Co-authored-by: David Hewitt <1939362+davidhewitt@users.noreply.github.com>
bors bot added a commit that referenced this pull request Dec 25, 2022
2827: pypy: enable `PyList::get_item_unchecked` r=davidhewitt a=davidhewitt

Split out from #2826. Approved previously as part of that review.

Co-authored-by: David Hewitt <1939362+davidhewitt@users.noreply.github.com>
bors bot added a commit that referenced this pull request Dec 25, 2022
2828: move set-minimal-package-versions to nox r=adamreichold a=davidhewitt

Split from #2826 because #2827 couldn't merge due to `hermit-abi` MSRV break, which this PR also fixes (by pinning its dependent `num_cpus` back). 

Co-authored-by: David Hewitt <1939362+davidhewitt@users.noreply.github.com>
bors bot added a commit that referenced this pull request Dec 25, 2022
2784: Automatically generate `__text_signature__` for all functions r=davidhewitt a=davidhewitt

This PR makes it so that PyO3 generates `__text_signature__` by default for all functions. It also introduces `#[pyo3(text_signature = false)]` to disable the built-in generation.

There are a few limitations which we can improve later:
 - All default values are currently set to `...`. I think this is ok because `.pyi` files often do the same. Maybe for numbers, strings, `None` and `True`/`False` we could render these in a future PR.
 - No support for `#[new]` yet.

Alternative design ideas:
- Only autogenerate for methods with `#[pyo3(signature = (...))]` annotation. I started with this, and then decided it made sense to do it for everything.
- Opt-out with `#[pyo3(text_signature = None)]`. This is slightly harder to parse in the macro, but matches the final result in Python better, so if this looks preferable to others, I can change from `text_signature = false` to `text_signature = None`.

There's some small tidying up / refactoring to do before this merges (happy to take suggestions on this), however the general logic, design and docs are ready for review.


2827: pypy: enable `PyList::get_item_unchecked` r=adamreichold a=davidhewitt

Split out from #2826. Approved previously as part of that review.

Co-authored-by: David Hewitt <1939362+davidhewitt@users.noreply.github.com>
@davidhewitt
Copy link
Member Author

bors r=adamreichold

@bors
Copy link
Contributor

bors bot commented Dec 25, 2022

Build succeeded:

@bors bors bot merged commit e5cf1cb into PyO3:main Dec 25, 2022
bors bot added a commit that referenced this pull request Dec 26, 2022
2832: newsfragments: remove incorrect fragment r=davidhewitt a=davidhewitt

Accidentally left this entry in #2826 after splitting out #2827.

Co-authored-by: David Hewitt <1939362+davidhewitt@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants