From 77f23cf9574bcc550fe19bb5ea7715b43249c7d8 Mon Sep 17 00:00:00 2001 From: Eric Hammy <6815729+condnsdmatters@users.noreply.github.com> Date: Thu, 15 Dec 2022 10:48:04 +0000 Subject: [PATCH] Fix CI by fully specifying Python env and adjusting range on flakey (#350) * Fix CI by fully specifying Python env and adjusting range on flakey test. * Can ignore B905 for flake, since it requests a "strict=True" parameter for the built-in `zip` and this is not compatible with Python<3.10. --- .flake8 | 2 +- .github/workflows/test_and_deploy.yml | 2 +- nle/tests/test_converter.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.flake8 b/.flake8 index 469a376e4..5d8301132 100644 --- a/.flake8 +++ b/.flake8 @@ -1,5 +1,5 @@ [flake8] -ignore = E203, E266, E501, E731, W503, C901, B008 +ignore = E203, E266, E501, E731, W503, C901, B008, B905 # 80 to use as a soft test max-line-length = 80 max-complexity = 18 diff --git a/.github/workflows/test_and_deploy.yml b/.github/workflows/test_and_deploy.yml index 394fcede3..2812c2abb 100644 --- a/.github/workflows/test_and_deploy.yml +++ b/.github/workflows/test_and_deploy.yml @@ -19,7 +19,7 @@ jobs: strategy: matrix: python-version: ["3.6", "3.7", "3.8", "3.9"] - os: [ubuntu-latest, macos-latest] + os: [ubuntu-20.04, macos-latest] fail-fast: false steps: - name: Setup Python ${{ matrix.python-version }} env diff --git a/nle/tests/test_converter.py b/nle/tests/test_converter.py index c699d07a3..876e93d56 100644 --- a/nle/tests/test_converter.py +++ b/nle/tests/test_converter.py @@ -112,7 +112,7 @@ def convert_n_times(n): # After warmup the last few iterations should be constant memory memory_array = np.array(memory_list[5:]) memory_change = (memory_array / memory_array[0]) - 1 - assert max(memory_change) < 0.001 # 0.1 per cent + assert max(memory_change) < 0.002 # 0.2 per cent def test_ttyrec_with_extra_data(self, seq_length=500): converter = Converter(ROWS, COLUMNS, TTYREC_V1)