Skip to content

Commit

Permalink
python-deps(deps): Bump the python-dependencies group with 1 update (#…
Browse files Browse the repository at this point in the history
…136)

* python-deps(deps): Bump the python-dependencies group with 1 update

Updates the requirements on [ruff](https://github.com/astral-sh/ruff) to permit the latest version.

Updates `ruff` to 0.1.15
- [Release notes](https://github.com/astral-sh/ruff/releases)
- [Changelog](https://github.com/astral-sh/ruff/blob/main/CHANGELOG.md)
- [Commits](astral-sh/ruff@v0.1.14...v0.1.15)

---
updated-dependencies:
- dependency-name: ruff
  dependency-type: direct:production
  dependency-group: python-dependencies
...

Signed-off-by: dependabot[bot] <[email protected]>

* ci: Update pre-commit hook versions. Also update the script that is used to update the python dependencies to format the toml file when it is done updating things.

---------

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Nicholas Felt <[email protected]>
  • Loading branch information
dependabot[bot] and nfelt14 authored Feb 1, 2024
1 parent 4467e14 commit fb84738
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 8 deletions.
6 changes: 3 additions & 3 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,14 +34,14 @@ repos:
- id: remove-tabs
- id: forbid-tabs
- repo: https://github.com/python-jsonschema/check-jsonschema
rev: 0.27.3
rev: 0.27.4
hooks:
- id: check-readthedocs
- id: check-dependabot
- id: check-github-actions
- id: check-github-workflows
- repo: https://github.com/commitizen-tools/commitizen
rev: v3.13.0
rev: v3.14.0
hooks:
- id: commitizen
stages: [commit-msg]
Expand Down Expand Up @@ -125,7 +125,7 @@ repos:
always_run: true
args: [., --min=10]
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.1.14
rev: v0.1.15
hooks:
- id: ruff
args: [--fix, --exit-non-zero-on-fix]
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ pytest-html = ">=4.0"
pytest-order = ">=1.0.1"
pytest-profiling = ">=1.7.0"
python-semantic-release = ">=8.5.1"
ruff = "0.1.14" # Update this by running scripts/update_development_dependencies.py
ruff = "0.1.15" # Update this by running scripts/update_development_dependencies.py
safety = ">=2.1.1"
sphinx-autoapi = ">=2.0.0"
sphinx-copybutton = ">=0.5.1"
Expand Down
15 changes: 11 additions & 4 deletions scripts/update_development_dependencies.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,8 @@ def main() -> None:
"""Run the script to update the development dependencies."""
script_location = Path(__file__)
python_executable = sys.executable
python_script_location = Path(python_executable).parent
repository_root_directory = script_location.parent.parent
latest_dependency_versions: List[str] = []

# Get the latest versions for each of the dependencies to update
Expand All @@ -49,18 +51,23 @@ def main() -> None:

# Update dependencies in pyproject.toml using poetry
dependencies = " ".join(f'"{x}"' for x in latest_dependency_versions)
_run_cmd_in_subprocess(f"{python_executable} -m poetry add --group=dev {dependencies}")
_run_cmd_in_subprocess(f'"{python_executable}" -m poetry add --group=dev {dependencies}')

# Run poetry update
_run_cmd_in_subprocess(f"{python_executable} -m poetry update")
_run_cmd_in_subprocess(f'"{python_executable}" -m poetry update')

# Update pre-commit config file
_run_cmd_in_subprocess(python_executable.rsplit("python", maxsplit=1)[-0] + "pre-commit-update")
_run_cmd_in_subprocess(f'"{python_script_location}/pre-commit-update"')

# Fix the formatting of the pre-commit config file
with warnings.catch_warnings():
warnings.simplefilter("ignore", UserWarning)
fix_files([f"{script_location.parent.parent}/.pre-commit-config.yaml"])
fix_files([f"{repository_root_directory}/.pre-commit-config.yaml"])

# Fix the formatting of the pyproject.toml file
_run_cmd_in_subprocess(
f'"{python_script_location}/toml-sort" "{repository_root_directory}/pyproject.toml"'
)


if __name__ == "__main__":
Expand Down

0 comments on commit fb84738

Please sign in to comment.