Skip to content

Commit e7751fd

Browse files
pre-commit updates (#953)
# Pull Request ## Title pre-commit updates ______________________________________________________________________ ## Description - hook version updates - add badge ______________________________________________________________________ --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
1 parent df347c9 commit e7751fd

File tree

14 files changed

+55
-34
lines changed

14 files changed

+55
-34
lines changed

.github/workflows/linux.yml

Lines changed: 17 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -157,10 +157,23 @@ jobs:
157157
'from sys import version_info as vers; assert (vers.major, vers.minor) == (3, 13), f"Unexpected python version: {vers}"'
158158
159159
# This is moreso about code cleanliness, which is a dev thing, not a
160-
# functionality thing, and the rules for that change between python versions,
161-
# so only do this for the default in the devcontainer.
162-
#- name: Run lint checks
163-
# run: make CONDA_ENV_NAME=$CONDA_ENV_NAME check
160+
# functionality thing, and the rules for that sometimes change between
161+
# python versions, so only do this for the default python in addition to the
162+
# devcontainer to get an earlier PR status signal.
163+
164+
- name: Check for formatting issues
165+
if: ${{ matrix.python_version == '' }}
166+
timeout-minutes: 3
167+
run: |
168+
set -x
169+
make CONDA_ENV_NAME=$CONDA_ENV_NAME format
170+
# licenseheaders changes the contents of the files, so make this check fail if there are any changes detected
171+
git --no-pager diff --exit-code
172+
173+
- name: Run lint checks
174+
if: ${{ matrix.python_version == '' }}
175+
timeout-minutes: 5
176+
run: make CONDA_ENV_NAME=$CONDA_ENV_NAME check
164177

165178
# Only run the coverage checks on the devcontainer job.
166179
- name: Run tests

.pre-commit-config.yaml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -81,14 +81,14 @@ repos:
8181
args: [--py310-plus]
8282
stages: [pre-commit, manual]
8383
- repo: https://github.com/PyCQA/isort
84-
rev: 5.13.2
84+
rev: 6.0.0
8585
hooks:
8686
- id: isort
8787
require_serial: true
8888
args: ["-j", "-1"]
8989
stages: [pre-commit, manual]
9090
- repo: https://github.com/psf/black
91-
rev: 24.10.0
91+
rev: 25.1.0
9292
hooks:
9393
- id: black
9494
stages: [pre-commit, manual]
@@ -98,9 +98,10 @@ repos:
9898
- id: docformatter
9999
stages: [pre-commit, manual]
100100
- repo: https://github.com/executablebooks/mdformat
101-
rev: 0.7.17
101+
rev: 0.7.22
102102
hooks:
103103
- id: mdformat
104+
stages: [pre-commit, manual]
104105
additional_dependencies:
105106
- mdformat-gfm
106107
- mdformat-black

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ FORMAT_COMMON_PREREQS += $(MLOS_GLOBAL_CONF_FILES)
7373

7474
# Formatting pre-commit hooks are marked with the "manual" stage in .pre-commit-config.yaml
7575
# Since yq is not installed everywhere we need to sync the list here as well.
76-
FORMATTERS := end-of-file-fixer pretty-format-json trailingwhitespace licenseheaders pyupgrade isort black docformatter
76+
FORMATTERS := end-of-file-fixer pretty-format-json trailingwhitespace licenseheaders pyupgrade isort black docformatter mdformat
7777

7878
# Provide convenience methods to call individual formatters and checkers via `make` as well.
7979
# e.g., `make black` or `make pylint`

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
[![MLOS MacOS](https://github.com/microsoft/MLOS/actions/workflows/macos.yml/badge.svg)](https://github.com/microsoft/MLOS/actions/workflows/macos.yml)
66
[![MLOS Windows](https://github.com/microsoft/MLOS/actions/workflows/windows.yml/badge.svg)](https://github.com/microsoft/MLOS/actions/workflows/windows.yml)
77
[![Code Coverage Status](https://microsoft.github.io/MLOS/_images/coverage.svg)](https://microsoft.github.io/MLOS/htmlcov/index.html)
8+
[![pre-commit.ci status](https://results.pre-commit.ci/badge/github/microsoft/MLOS/main.svg)](https://results.pre-commit.ci/latest/github/microsoft/MLOS/main)
89

910
MLOS is a project to enable autotuning for systems.
1011

SECURITY.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ If you believe you have found a security vulnerability in any Microsoft-owned re
1212

1313
Instead, please report them to the Microsoft Security Response Center (MSRC) at [https://msrc.microsoft.com/create-report](https://msrc.microsoft.com/create-report).
1414

15-
If you prefer to submit without logging in, send email to [[email protected]](mailto:[email protected]). If possible, encrypt your message with our PGP key; please download it from the [Microsoft Security Response Center PGP Key page](https://www.microsoft.com/en-us/msrc/pgp-key-msrc).
15+
If you prefer to submit without logging in, send email to [[email protected]](mailto:[email protected]). If possible, encrypt your message with our PGP key; please download it from the [Microsoft Security Response Center PGP Key page](https://www.microsoft.com/en-us/msrc/pgp-key-msrc).
1616

1717
You should receive a response within 24 hours. If for some reason you do not, please follow up via email to ensure we received your original message. Additional information can be found at [microsoft.com/msrc](https://www.microsoft.com/msrc).
1818

conda-envs/mlos-3.10.yml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,11 +25,12 @@ dependencies:
2525
- check-jsonschema
2626
# Fixed versions for easier maintainability.
2727
# Dependabot can update explicitly as necessary.
28-
- pre-commit==4.0.1
28+
- pre-commit==4.1.0
2929
- pycodestyle==2.12.1
30-
- pylint==3.3.3
30+
- pylint==3.3.4
3131
- tomlkit
32-
- mypy==1.14.1
32+
- mypy==1.15.0
33+
- pyright==1.1.394
3334
- pandas-stubs
3435
- types-beautifulsoup4
3536
- types-colorama

conda-envs/mlos-3.11.yml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,11 +25,12 @@ dependencies:
2525
- check-jsonschema
2626
# Fixed versions for easier maintainability.
2727
# Dependabot can update explicitly as necessary.
28-
- pre-commit==4.0.1
28+
- pre-commit==4.1.0
2929
- pycodestyle==2.12.1
30-
- pylint==3.3.3
30+
- pylint==3.3.4
3131
- tomlkit
32-
- mypy==1.14.1
32+
- mypy==1.15.0
33+
- pyright==1.1.394
3334
- pandas-stubs
3435
- types-beautifulsoup4
3536
- types-colorama

conda-envs/mlos-3.12.yml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,11 +27,12 @@ dependencies:
2727
- check-jsonschema
2828
# Fixed versions for easier maintainability.
2929
# Dependabot can update explicitly as necessary.
30-
- pre-commit==4.0.1
30+
- pre-commit==4.1.0
3131
- pycodestyle==2.12.1
32-
- pylint==3.3.3
32+
- pylint==3.3.4
3333
- tomlkit
34-
- mypy==1.14.1
34+
- mypy==1.15.0
35+
- pyright==1.1.394
3536
- pandas-stubs
3637
- types-beautifulsoup4
3738
- types-colorama

conda-envs/mlos-3.13.yml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,11 +27,12 @@ dependencies:
2727
- check-jsonschema
2828
# Fixed versions for easier maintainability.
2929
# Dependabot can update explicitly as necessary.
30-
- pre-commit==4.0.1
30+
- pre-commit==4.1.0
3131
- pycodestyle==2.12.1
32-
- pylint==3.3.3
32+
- pylint==3.3.4
3333
- tomlkit
34-
- mypy==1.14.1
34+
- mypy==1.15.0
35+
- pyright==1.1.394
3536
- pandas-stubs
3637
- types-beautifulsoup4
3738
- types-colorama

conda-envs/mlos-windows.yml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,11 +28,12 @@ dependencies:
2828
- check-jsonschema
2929
# Fixed versions for easier maintainability.
3030
# Dependabot can update explicitly as necessary.
31-
- pre-commit==4.0.1
31+
- pre-commit==4.1.0
3232
- pycodestyle==2.12.1
33-
- pylint==3.3.3
33+
- pylint==3.3.4
3434
- tomlkit
35-
- mypy==1.14.1
35+
- mypy==1.15.0
36+
- pyright==1.1.394
3637
- pandas-stubs
3738
- types-beautifulsoup4
3839
- types-colorama

0 commit comments

Comments
 (0)