Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

143 Retry for ml tests. #146

Merged
merged 3 commits into from
Mar 5, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 10 additions & 2 deletions .github/workflows/checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,12 +52,16 @@ jobs:

notebooks:
runs-on: ubuntu-22.04
strategy:
fail-fast: false
matrix:
python-version: [ "3.10", "3.11", "3.12" ]
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: "3.10"
python-version: ${{ matrix.python-version }}
- name: Start Redis
uses: supercharge/[email protected]
with:
Expand All @@ -72,12 +76,16 @@ jobs:

examples:
runs-on: ubuntu-22.04
strategy:
fail-fast: false
matrix:
python-version: [ "3.10", "3.11", "3.12" ]
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: "3.10"
python-version: ${{ matrix.python-version }}
- name: Install tox
run: |
python -m pip install --upgrade pip
Expand Down
14 changes: 11 additions & 3 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,12 +54,16 @@ jobs:

notebooks:
runs-on: ubuntu-22.04
strategy:
fail-fast: false
matrix:
python-version: [ "3.10", "3.11", "3.12" ]
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: "3.10"
python-version: ${{ matrix.python-version }}
- name: Start Redis
uses: supercharge/[email protected]
with:
Expand All @@ -74,12 +78,16 @@ jobs:

examples:
runs-on: ubuntu-22.04
strategy:
fail-fast: false
matrix:
python-version: [ "3.10", "3.11", "3.12" ]
steps:
- uses: actions/checkout@v4
- name: Set up Python
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: "3.10"
python-version: ${{ matrix.python-version }}
- name: Install tox
run: |
python -m pip install --upgrade pip
Expand Down
1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ dev = [
"numpydoc",
"pip-tools",
"pytest",
"pytest-retry",
"snakeviz",
"tox",
"twine",
Expand Down
3 changes: 3 additions & 0 deletions requirements-dev.txt
Original file line number Diff line number Diff line change
Expand Up @@ -438,6 +438,9 @@ pytest==8.3.4
# via
# flatland-rl (pyproject.toml)
# nbmake
# pytest-retry
pytest-retry==1.7.0
# via flatland-rl (pyproject.toml)
python-dateutil==2.9.0.post0
# via
# arrow
Expand Down
3 changes: 3 additions & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -177,3 +177,6 @@ wcwidth==0.2.13
# via prompt-toolkit
widgetsnbextension==4.0.13
# via ipywidgets

# The following packages are considered to be unsafe in a requirements file:
# setuptools
17 changes: 10 additions & 7 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[tox]
env_list = py{310,311,312},notebooks,py{310,311,312}-ml,py{310,311,312}-verify-install
env_list = py{310,311,312},py{310,311,312}-ml,py{310,311,312}-verify-install

[gh-actions]
python =
Expand Down Expand Up @@ -38,6 +38,7 @@ deps =
set_env =
BENCHMARK_EPISODES_FOLDER = {tox_root}/episodes
commands =
python --version
python -m pytest {posargs} --ignore=tests/ml

[testenv:py{310,311,312}-ml]
Expand All @@ -49,7 +50,7 @@ deps =
-r requirements-ml.txt
commands =
python --version
python -m pytest {posargs}
python -m pytest --retries 2 --retry-delay 5 {posargs}

[testenv:lint]
base_python = python3.10
Expand Down Expand Up @@ -83,22 +84,24 @@ set_env =
commands =
python benchmarks/profile_all_examples.py

[testenv:examples]
base_python = python3.10
[testenv:py{310,311,312}-examples]
platform = linux|linux2|darwin
deps =
-r requirements-dev.txt
commands =
python --version
python benchmarks/run_all_examples.py

[testenv:notebooks]
base_python = python3.10
[testenv:py{310,311,312}-notebooks]
platform = linux|linux2|darwin
allowlist_externals =
bash
pwd
deps =
-r requirements-dev.txt
commands =
python -m pytest --nbmake \
python --version
python -m pytest -s --nbmake \
notebooks/simple-graph-plot-2022.ipynb \
notebooks/Agent-Close-Following.ipynb \
notebooks/simple_example_manual_control.ipynb \
Expand Down