Skip to content

Commit

Permalink
Drop python 3.7, add 3.11 and update github templates (#194)
Browse files Browse the repository at this point in the history
* Update issue templates

* Update supported python versions

* Update min PyTorch version

* Skip pytype for py311

* Update conda env for doc
  • Loading branch information
araffin authored Jul 3, 2023
1 parent de92025 commit 35f0625
Show file tree
Hide file tree
Showing 11 changed files with 55 additions and 24 deletions.
4 changes: 2 additions & 2 deletions .github/ISSUE_TEMPLATE/bug_report.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: "\U0001F41B Bug Report"
description: Submit a bug report to help us improve Stable-Baselines3 Contrib
description: If you encounter an unexpected behavior, software crash, or other bug.
title: "[Bug]: bug title"
labels: ["bug"]
body:
Expand Down Expand Up @@ -67,7 +67,7 @@ body:
required: true
- label: I have read the [documentation](https://sb3-contrib.readthedocs.io/en/master/)
required: true
- label: I have provided a minimal working example to reproduce the bug
- label: I have provided a [minimal and working](https://github.com/DLR-RM/stable-baselines3/issues/982#issuecomment-1197044014) example to reproduce the bug
required: true
- label: I've used the [markdown code blocks](https://help.github.com/en/articles/creating-and-highlighting-code-blocks) for both code and stack traces.
required: true
8 changes: 4 additions & 4 deletions .github/ISSUE_TEMPLATE/custom_env.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: "\U0001F916 Custom Gym Environment Issue"
description: How to report an issue when using a custom Gym environment
labels: ["question", "custom gym env"]
description: If your problem involves a custom gym environment.
labels: ["custom gym env"]
body:
- type: markdown
attributes:
Expand Down Expand Up @@ -28,7 +28,7 @@ body:
attributes:
label: Code example
description: |
Please try to provide a minimal example to reproduce the bug.
Please try to provide a [minimal example](https://github.com/DLR-RM/stable-baselines3/issues/982#issuecomment-1197044014) to reproduce the bug.
For a custom environment, you need to give at least the observation space, action space, `reset()` and `step()` methods (see working example below).
Error messages and stack traces are also helpful.
Please use the [markdown code blocks](https://help.github.com/en/articles/creating-and-highlighting-code-blocks) for both code and stack traces.
Expand Down Expand Up @@ -102,7 +102,7 @@ body:
required: true
- label: I have read the [documentation](https://sb3-contrib.readthedocs.io/en/master/)
required: true
- label: I have provided a minimal working example to reproduce the bug
- label: I have provided a [minimal and working](https://github.com/DLR-RM/stable-baselines3/issues/982#issuecomment-1197044014) example to reproduce the bug
required: true
- label: I have checked my env using the env checker
required: true
Expand Down
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/documentation.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: "\U0001F4DA Documentation"
description: Report an issue related to Stable-Baselines3 Contrib documentation
description: If you want to improve the documentation by reporting errors, inconsistencies, or missing information.
labels: ["documentation"]
body:
- type: markdown
Expand Down
4 changes: 3 additions & 1 deletion .github/ISSUE_TEMPLATE/feature_request.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: "\U0001F680 Feature Request"
description: How to create an issue for requesting a feature
description: If you have an idea for a new feature or an improvement.
title: "[Feature Request] request title"
labels: ["enhancement"]
body:
Expand Down Expand Up @@ -42,3 +42,5 @@ body:
options:
- label: I have checked that there is no similar [issue](https://github.com/Stable-Baselines-Team/stable-baselines3-contrib/issues) in the repo
required: true
- label: If I'm requesting a new feature, I have proposed alternatives
required: true
8 changes: 5 additions & 3 deletions .github/ISSUE_TEMPLATE/question.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: "❓ Question"
description: How to ask a question regarding Stable-Baselines3 Contrib
description: If you have a general question about Stable-Baselines3 Contrib
title: "[Question] question title"
labels: ["question"]
body:
Expand All @@ -12,7 +12,9 @@ body:
id: question
attributes:
label: ❓ Question
description: Your question. This can be e.g. questions regarding confusing or unclear behaviour of functions or a question if X can be done using stable-baselines3. Make sure to check out the documentation first.
description: |
Your question. This can be e.g. questions regarding confusing or unclear behaviour of functions or a question if X can be done using stable-baselines3. Make sure to check out the documentation first.
**Important Note: If your question is anything like "Why is my code generating this error?", you must [submit a bug report](https://github.com/Stable-Baselines-Team/stable-baselines3-contrib/issues/new?assignees=&labels=bug&projects=&template=bug_report.yml&title=%5BBug%5D%3A+bug+title) instead.**
validations:
required: true
- type: checkboxes
Expand All @@ -24,7 +26,7 @@ body:
required: true
- label: I have read the [documentation](https://sb3-contrib.readthedocs.io/en/master/)
required: true
- label: If code there is, it is minimal and working
- label: If code there is, it is [minimal and working](https://github.com/DLR-RM/stable-baselines3/issues/982#issuecomment-1197044014)
required: true
- label: If code there is, it is formatted using the [markdown code blocks](https://help.github.com/en/articles/creating-and-highlighting-code-blocks) for both code and stack traces.
required: true
6 changes: 4 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.7", "3.8", "3.9", "3.10"]
python-version: ["3.8", "3.9", "3.10", "3.11"]

steps:
- uses: actions/checkout@v3
Expand All @@ -31,7 +31,7 @@ jobs:
run: |
python -m pip install --upgrade pip
# cpu version of pytorch
pip install torch==1.11+cpu -f https://download.pytorch.org/whl/torch_stable.html
pip install torch==1.13+cpu -f https://download.pytorch.org/whl/torch_stable.html
# Install Atari Roms
pip install autorom
Expand All @@ -58,6 +58,8 @@ jobs:
- name: Type check
run: |
make type
# skip PyType, doesn't support 3.11 yet
if: "!(matrix.python-version == '3.11')"
- name: Test with pytest
run: |
make pytest
11 changes: 5 additions & 6 deletions docs/conda_env.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,18 +4,17 @@ channels:
- defaults
dependencies:
- cpuonly=1.0=0
- pip=21.1
- python=3.7
- pytorch=1.11=py3.7_cpu_0
- pip=22.3.1
- python=3.8
- pytorch=1.13.0=py3.8_cpu_0
- pip:
- gym==0.21
- cloudpickle
- opencv-python-headless
- pandas
- numpy
- matplotlib
- sphinx_autodoc_typehints
- stable-baselines3>=1.6.0
- sphinx>=4.2
- stable-baselines3>=2.0.0
- sphinx>=5.3,<7.0
- sphinx_rtd_theme>=1.0
- sphinx_copybutton
26 changes: 26 additions & 0 deletions docs/misc/changelog.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,32 @@
Changelog
==========


Release 2.1.0a0 (WIP)
--------------------------

Breaking Changes:
^^^^^^^^^^^^^^^^^
- Removed Python 3.7 support
- SB3 now requires PyTorch > 1.13

New Features:
^^^^^^^^^^^^^
- Added Python 3.11 support

Bug Fixes:
^^^^^^^^^^

Deprecations:
^^^^^^^^^^^^^

Others:
^^^^^^^

Documentation:
^^^^^^^^^^^^^^


Release 2.0.0 (2023-06-22)
--------------------------

Expand Down
4 changes: 2 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
[tool.ruff]
# Same as Black.
line-length = 127
# Assume Python 3.7
target-version = "py37"
# Assume Python 3.8
target-version = "py38"
select = ["E", "F", "B", "UP", "C90", "RUF"]
# B028: Ignore explicit stacklevel`
# RUF013: Too many false positives (implicit optional)
Expand Down
2 changes: 1 addition & 1 deletion sb3_contrib/version.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2.0.0
2.1.0a0
4 changes: 2 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@
long_description=long_description,
long_description_content_type="text/markdown",
version=__version__,
python_requires=">=3.7",
python_requires=">=3.8",
# PyPI package information.
project_urls={
"Code": "https://github.com/Stable-Baselines-Team/stable-baselines3-contrib",
Expand All @@ -89,10 +89,10 @@
},
classifiers=[
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
],
)

Expand Down

0 comments on commit 35f0625

Please sign in to comment.