Skip to content

Commit b5d7c90

Browse files
authored
Merge branch 'main' into add-random
2 parents 65022f0 + bb8495c commit b5d7c90

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

64 files changed

+2925
-1491
lines changed

.github/dependabot.yml

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,17 @@
11
version: 2
22
updates:
3+
- package-ecosystem: "github-actions"
4+
directory: "/"
5+
schedule:
6+
interval: monthly
7+
groups:
8+
actions:
9+
patterns:
10+
- "*"
11+
312
- package-ecosystem: "pip"
4-
directory: "/pyperformance/requirements"
13+
directory: "/"
14+
exclude-paths:
15+
- "pyperformance/data-files/**"
516
schedule:
617
interval: "monthly"

.github/workflows/lint.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
name: Lint
2+
3+
on: [push, pull_request, workflow_dispatch]
4+
5+
permissions: {}
6+
7+
jobs:
8+
lint:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- uses: actions/checkout@v6
12+
- uses: tox-dev/action-pre-commit-uv@v1

.github/workflows/main.yml

Lines changed: 10 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -21,43 +21,40 @@ jobs:
2121
matrix:
2222
# Test all supported versions on Ubuntu:
2323
os: [ubuntu-latest, ubuntu-24.04-arm]
24-
python: ["3.9", "3.10", "3.11", "3.12", "3.13"]
24+
python: ["3.10", "3.11", "3.12", "3.13", "3.14"]
2525
experimental: [false]
2626
build: ['']
2727
include:
2828
# As the experimental task for the dev version.
2929
- os: ubuntu-latest
30-
python: "3.13"
30+
python: "3.14"
3131
experimental: true
3232
build: 'free-threading'
3333
- os: ubuntu-24.04-arm
34-
python: "3.13"
34+
python: "3.14"
3535
experimental: true
3636
build: 'free-threading'
3737
- os: ubuntu-latest
38-
python: "3.14-dev"
38+
python: "3.15-dev"
3939
experimental: true
4040
- os: ubuntu-latest
41-
python: "3.14-dev"
41+
python: "3.15-dev"
4242
experimental: true
4343
build: 'free-threading'
4444
# Also test PyPy, macOS, and Windows:
4545
- os: ubuntu-latest
46-
python: pypy-3.10
47-
experimental: false
48-
- os: ubuntu-latest
49-
python: pypy-3.9
46+
python: pypy-3.11
5047
experimental: false
5148
- os: macos-latest
52-
python: "3.13"
49+
python: "3.14"
5350
experimental: true
5451
- os: windows-latest
55-
python: "3.13"
52+
python: "3.14"
5653
experimental: false
5754
steps:
58-
- uses: actions/checkout@v4
55+
- uses: actions/checkout@v6
5956
- name: Set up Python ${{ matrix.python }}
60-
uses: actions/setup-python@v5
57+
uses: actions/setup-python@v6
6158
if: "!endsWith(matrix.python, '-dev')"
6259
with:
6360
python-version: ${{ matrix.python }}

.github/workflows/mypy.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@ jobs:
1414
name: Check code with mypy
1515
runs-on: ubuntu-latest
1616
steps:
17-
- uses: actions/checkout@v4
18-
- uses: actions/setup-python@v5
17+
- uses: actions/checkout@v6
18+
- uses: actions/setup-python@v6
1919
with:
2020
cache: "pip"
2121
cache-dependency-path: "pyproject.toml"

.github/workflows/publish.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,9 @@ jobs:
1515
id-token: write
1616

1717
steps:
18-
- uses: actions/checkout@v4
18+
- uses: actions/checkout@v6
1919
- name: Set up Python
20-
uses: actions/setup-python@v5
20+
uses: actions/setup-python@v6
2121
with:
2222
python-version: '3.x'
2323
cache: pip

.pre-commit-config.yaml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
exclude: ^pyperformance/data-files/
2+
repos:
3+
- repo: https://github.com/astral-sh/ruff-pre-commit
4+
rev: v0.13.1
5+
hooks:
6+
- id: ruff-check
7+
name: Run Ruff (lint)
8+
args: [--exit-non-zero-on-fix]
9+
- id: ruff-format
10+
name: Run Ruff (format)
11+
args: [--exit-non-zero-on-fix]
12+
13+
- repo: https://github.com/tox-dev/pyproject-fmt
14+
rev: v2.6.0
15+
hooks:
16+
- id: pyproject-fmt
17+
18+
- repo: https://github.com/abravalheri/validate-pyproject
19+
rev: v0.24.1
20+
hooks:
21+
- id: validate-pyproject

.readthedocs.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@
44
version: 2
55

66
build:
7-
os: ubuntu-22.04
7+
os: ubuntu-lts-latest
88
tools:
9-
python: "3.11"
9+
python: "3"
1010

1111
sphinx:
1212
configuration: doc/conf.py

azure-pipelines.yml

Lines changed: 0 additions & 29 deletions
This file was deleted.

dev.py

Lines changed: 26 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -3,67 +3,67 @@
33
import os.path
44
import sys
55

6-
76
REPO_ROOT = os.path.dirname(os.path.abspath(__file__))
8-
VENVS = os.path.join(REPO_ROOT, '.venvs')
7+
VENVS = os.path.join(REPO_ROOT, ".venvs")
98

109

11-
def resolve_venv_root(kind='dev', venvsdir=VENVS):
10+
def resolve_venv_root(kind="dev", venvsdir=VENVS):
1211
import sysconfig
12+
1313
if sysconfig.is_python_build():
14-
sys.exit('please install your built Python first (or pass it using --python)')
14+
sys.exit("please install your built Python first (or pass it using --python)")
1515
# XXX Handle other implementations too?
16-
base = os.path.join(venvsdir, kind or 'dev')
16+
base = os.path.join(venvsdir, kind or "dev")
1717
major, minor = sys.version_info[:2]
18-
pyloc = ((os.path.abspath(sys.executable)
19-
).partition(os.path.sep)[2].lstrip(os.path.sep)
20-
).replace(os.path.sep, '-')
21-
return f'{base}-{major}.{minor}-{pyloc}'
18+
pyloc = (
19+
(os.path.abspath(sys.executable)).partition(os.path.sep)[2].lstrip(os.path.sep)
20+
).replace(os.path.sep, "-")
21+
return f"{base}-{major}.{minor}-{pyloc}"
2222

2323

24-
def ensure_venv_ready(venvroot=None, kind='dev', venvsdir=VENVS):
24+
def ensure_venv_ready(venvroot=None, kind="dev", venvsdir=VENVS):
2525
if sys.prefix != sys.base_prefix:
26-
assert os.path.exists(os.path.join(sys.prefix, 'pyvenv.cfg'))
26+
assert os.path.exists(os.path.join(sys.prefix, "pyvenv.cfg"))
2727
venvroot = sys.prefix
2828
python = sys.executable
29-
readyfile = os.path.join(sys.prefix, 'READY')
29+
readyfile = os.path.join(sys.prefix, "READY")
3030
isready = os.path.exists(readyfile)
3131
else:
3232
import venv
33+
3334
if not venvroot:
3435
venvroot = resolve_venv_root(kind, venvsdir)
3536
# Make sure the venv exists.
36-
readyfile = os.path.join(venvroot, 'READY')
37+
readyfile = os.path.join(venvroot, "READY")
3738
isready = os.path.exists(readyfile)
3839
if not isready:
3940
relroot = os.path.relpath(venvroot)
4041
if not os.path.exists(venvroot):
41-
print(f'creating venv at {relroot}...')
42+
print(f"creating venv at {relroot}...")
4243
else:
43-
print(f'venv {relroot} not ready, re-creating...')
44+
print(f"venv {relroot} not ready, re-creating...")
4445
venv.create(venvroot, with_pip=True, clear=True)
4546
else:
46-
assert os.path.exists(os.path.join(venvroot, 'pyvenv.cfg'))
47+
assert os.path.exists(os.path.join(venvroot, "pyvenv.cfg"))
4748
# Return the venv's Python executable.
48-
binname = 'Scripts' if os.name == 'nt' else 'bin'
49+
binname = "Scripts" if os.name == "nt" else "bin"
4950
exename = os.path.basename(sys.executable)
5051
python = os.path.join(venvroot, binname, exename)
5152

5253
# Now make sure the venv has pyperformance installed.
5354
if not isready:
5455
import subprocess
56+
5557
relroot = os.path.relpath(venvroot)
56-
print(f'venv {relroot} not ready, installing dependencies...')
58+
print(f"venv {relroot} not ready, installing dependencies...")
5759
proc = subprocess.run(
58-
[python, '-m', 'pip', 'install',
59-
'--upgrade',
60-
'--editable', REPO_ROOT],
60+
[python, "-m", "pip", "install", "--upgrade", "--editable", REPO_ROOT],
6161
)
6262
if proc.returncode != 0:
63-
sys.exit('ERROR: install failed')
64-
with open(readyfile, 'w'):
63+
sys.exit("ERROR: install failed")
64+
with open(readyfile, "w"):
6565
pass
66-
print('...venv {relroot} ready!')
66+
print("...venv {relroot} ready!")
6767

6868
return venvroot, python
6969

@@ -77,8 +77,9 @@ def main(venvroot=None):
7777

7878
# Now run pyperformance.
7979
import pyperformance.cli
80+
8081
pyperformance.cli.main()
8182

8283

83-
if __name__ == '__main__':
84+
if __name__ == "__main__":
8485
main()

doc/benchmark.conf.sample

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,8 @@ affinity =
9696
# disabled.
9797
upload = False
9898

99+
# --rigorous option for 'pyperformance run'
100+
rigorous = False
99101

100102
# Configuration to upload results to a Codespeed website
101103
[upload]

0 commit comments

Comments
 (0)