Skip to content

Commit

Permalink
Merge branch 'main' into raisesgroup_fail_reason
Browse files Browse the repository at this point in the history
  • Loading branch information
jakkdl authored Dec 18, 2024
2 parents a8e263c + 4f66fab commit 8281d7c
Show file tree
Hide file tree
Showing 58 changed files with 151 additions and 2,903 deletions.
29 changes: 29 additions & 0 deletions .codecov.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# -- repository yaml --

# Explicitly wait for all jobs to finish, as wait_for_ci prematurely triggers.
# See https://github.com/python-trio/trio/issues/2689
codecov:
notify:
# This number needs to be changed whenever the number of runs in CI is changed.
# Another option is codecov-cli: https://github.com/codecov/codecov-cli#send-notifications
after_n_builds: 27
wait_for_ci: false
notify_error: true # if uploads fail, replace cov comment with a comment with errors.
require_ci_to_pass: false

# Publicly exposing the token has some small risks from mistakes or malicious actors.
# See https://docs.codecov.com/docs/codecov-tokens for correctly configuring it.
token: 87cefb17-c44b-4f2f-8b30-1fff5769ce46

# only post PR comment if coverage changes
comment:
require_changes: true

coverage:
# required range
range: 99.6..100
status:
# require patches to be 100%
patch:
default:
target: 100%
31 changes: 18 additions & 13 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,10 @@ name: CI
on:
push:
branches-ignore:
- "dependabot/**"
# these branches always have another event associated
- gh-readonly-queue/** # GitHub's merge queue uses `merge_group`
- autodeps/** # autodeps always makes a PR
- pre-commit-ci-update-config # pre-commit.ci's updates always have a PR
pull_request:
merge_group:

Expand Down Expand Up @@ -82,9 +85,12 @@ jobs:
uses: codecov/codecov-action@v3
with:
directory: empty
token: 87cefb17-c44b-4f2f-8b30-1fff5769ce46
name: Windows (${{ matrix.python }}, ${{ matrix.arch }}${{ matrix.extra_name }})
# multiple flags is marked as an error in codecov UI, but is actually fine
# https://github.com/codecov/feedback/issues/567
flags: Windows,${{ matrix.python }}
# this option cannot be set in .codecov.yml
fail_ci_if_error: true

Ubuntu:
name: 'Ubuntu (${{ matrix.python }}${{ matrix.extra_name }})'
Expand Down Expand Up @@ -119,28 +125,24 @@ jobs:
uses: actions/checkout@v4
- name: Setup python
uses: actions/setup-python@v5
if: "!endsWith(matrix.python, '-dev')"
with:
python-version: ${{ fromJSON(format('["{0}", "{1}"]', format('{0}.0-alpha - {0}.X', matrix.python), matrix.python))[startsWith(matrix.python, 'pypy')] }}
cache: pip
cache-dependency-path: test-requirements.txt
- name: Setup python (dev)
uses: deadsnakes/action@v2.0.2
if: endsWith(matrix.python, '-dev')
with:
python-version: '${{ matrix.python }}'
- name: Run tests
run: ./ci.sh
env:
CHECK_FORMATTING: '${{ matrix.check_formatting }}'
NO_TEST_REQUIREMENTS: '${{ matrix.no_test_requirements }}'
- if: always()
- if: >-
always()
&& matrix.check_formatting != '1'
uses: codecov/codecov-action@v3
with:
directory: empty
token: 87cefb17-c44b-4f2f-8b30-1fff5769ce46
name: Ubuntu (${{ matrix.python }}${{ matrix.extra_name }})
flags: Ubuntu,${{ matrix.python }}
fail_ci_if_error: true
macOS:
name: 'macOS (${{ matrix.python }})'
Expand Down Expand Up @@ -174,9 +176,9 @@ jobs:
uses: codecov/codecov-action@v3
with:
directory: empty
token: 87cefb17-c44b-4f2f-8b30-1fff5769ce46
name: macOS (${{ matrix.python }})
flags: macOS,${{ matrix.python }}
fail_ci_if_error: true

# run CI on a musl linux
Alpine:
Expand All @@ -196,13 +198,16 @@ jobs:
run: python -m venv .venv
- name: Run tests
run: source .venv/bin/activate && ./ci.sh
- name: Get Python version for codecov flag
id: get-version
run: echo "version=$(python -V | cut -d' ' -f2 | cut -d'.' -f1,2)" >> "${GITHUB_OUTPUT}"
- if: always()
uses: codecov/codecov-action@v3
with:
directory: empty
token: 87cefb17-c44b-4f2f-8b30-1fff5769ce46
name: Alpine
flags: Alpine,3.12
flags: Alpine,${{ steps.get-version.outputs.version }}
fail_ci_if_error: true

Cython:
name: "Cython"
Expand Down
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# In case somebody wants to restore the directory for local testing
notes-to-self/

# Project-specific generated files
docs/build/

Expand Down
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ repos:
hooks:
- id: black
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.8.1
rev: v0.8.3
hooks:
- id: ruff
types: [file]
Expand Down
3 changes: 2 additions & 1 deletion docs/source/reference-io.rst
Original file line number Diff line number Diff line change
Expand Up @@ -555,7 +555,8 @@ there are 1,000,000 µs in a second. Note that all the numbers here are
going to be rough orders of magnitude to give you a sense of scale; if
you need precise numbers for your environment, measure!)

.. file.read benchmark is notes-to-self/file-read-latency.py
.. file.read benchmark is
https://github.com/python-trio/trio/wiki/notes-to-self#file-read-latencypy
.. Numbers for spinning disks and SSDs are from taking a few random
recent reviews from http://www.storagereview.com/best_drives and
looking at their "4K Write Latency" test results for "Average MS"
Expand Down
1 change: 1 addition & 0 deletions newsfragments/3094.misc.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Switch to using PEP570 for positional-only arguments for `~trio.socket.SocketType`'s methods.
182 changes: 0 additions & 182 deletions notes-to-self/afd-lab.py

This file was deleted.

53 changes: 0 additions & 53 deletions notes-to-self/aio-guest-test.py

This file was deleted.

Loading

0 comments on commit 8281d7c

Please sign in to comment.