From 89d0113037b7493da399752be8548056fafb53db Mon Sep 17 00:00:00 2001 From: Antonin RAFFIN Date: Mon, 11 Mar 2024 14:29:47 +0100 Subject: [PATCH] Update ruff and SB3 dependencies (#232) --- Makefile | 10 +++++----- docs/misc/changelog.rst | 4 ++-- pyproject.toml | 6 ++++-- sb3_contrib/version.txt | 2 +- setup.py | 2 +- 5 files changed, 13 insertions(+), 11 deletions(-) diff --git a/Makefile b/Makefile index 7f10123..d6a00de 100644 --- a/Makefile +++ b/Makefile @@ -12,23 +12,23 @@ type: mypy lint: # stop the build if there are Python syntax errors or undefined names # see https://www.flake8rules.com/ - ruff ${LINT_PATHS} --select=E9,F63,F7,F82 --show-source + ruff check ${LINT_PATHS} --select=E9,F63,F7,F82 --output-format=full # exit-zero treats all errors as warnings. - ruff ${LINT_PATHS} --exit-zero - + ruff check ${LINT_PATHS} --exit-zero format: # Sort imports - ruff --select I ${LINT_PATHS} --fix + ruff check --select I ${LINT_PATHS} --fix # Reformat using black black ${LINT_PATHS} check-codestyle: # Sort imports - ruff --select I ${LINT_PATHS} + ruff check --select I ${LINT_PATHS} # Reformat using black black --check ${LINT_PATHS} + commit-checks: format type lint doc: diff --git a/docs/misc/changelog.rst b/docs/misc/changelog.rst index 3b393f5..9dc49f6 100644 --- a/docs/misc/changelog.rst +++ b/docs/misc/changelog.rst @@ -3,13 +3,13 @@ Changelog ========== -Release 2.3.0a1 (WIP) +Release 2.3.0a4 (WIP) -------------------------- Breaking Changes: ^^^^^^^^^^^^^^^^^ - Upgraded to Stable-Baselines3 >= 2.3.0 -- The default ``leanrning_starts`` parameter of ``QRDQN`` have been changed to be consistent with the other offpolicy algorithms +- The default ``learning_starts`` parameter of ``QRDQN`` have been changed to be consistent with the other offpolicy algorithms .. code-block:: python diff --git a/pyproject.toml b/pyproject.toml index bd6303e..7aaad51 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -3,16 +3,18 @@ line-length = 127 # Assume Python 3.8 target-version = "py38" + +[tool.ruff.lint] select = ["E", "F", "B", "UP", "C90", "RUF"] # B028: Ignore explicit stacklevel` # RUF013: Too many false positives (implicit optional) ignore = ["B028", "RUF013"] -[tool.ruff.per-file-ignores] +[tool.ruff.lint.per-file-ignores] # ClassVar, implicit optional check not needed for tests "./tests/*.py"= ["RUF012", "RUF013"] -[tool.ruff.mccabe] +[tool.ruff.lint.mccabe] # Unlike Flake8, ruff default to a complexity level of 10. max-complexity = 15 diff --git a/sb3_contrib/version.txt b/sb3_contrib/version.txt index 4d04ad9..87ced0f 100644 --- a/sb3_contrib/version.txt +++ b/sb3_contrib/version.txt @@ -1 +1 @@ -2.3.0a1 +2.3.0a4 diff --git a/setup.py b/setup.py index 1dd98c9..733fb43 100644 --- a/setup.py +++ b/setup.py @@ -65,7 +65,7 @@ setup( packages=[package for package in find_packages() if package.startswith("sb3_contrib")], package_data={"sb3_contrib": ["py.typed", "version.txt"]}, install_requires=[ - "stable_baselines3>=2.3.0a0,<3.0", + "stable_baselines3>=2.3.0a4,<3.0", ], description="Contrib package of Stable Baselines3, experimental code.", author="Antonin Raffin",