From b50e0f217a4fd92935e92beb48a574d2ae077664 Mon Sep 17 00:00:00 2001 From: Chris Mackey Date: Tue, 15 Oct 2024 07:04:47 -0700 Subject: [PATCH] fix(dev-deps): Update CI and dev deps to run on Python 3.11 --- .github/workflows/ci.yaml | 14 ++++---------- dev-requirements.txt | 29 ++++++++++++----------------- tests/model_test.py | 2 +- 3 files changed, 17 insertions(+), 28 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index a1fd84e8..be06e10d 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -9,7 +9,7 @@ jobs: name: Unit tests strategy: matrix: - python-version: ['3.10'] + python-version: ['3.10', '3.11'] os: [macos-latest, ubuntu-latest, windows-latest] runs-on: ${{ matrix.os }} @@ -25,13 +25,7 @@ jobs: pip install -r requirements.txt pip install -r dev-requirements.txt - name: run tests - run: python -m pytest --cov=. tests/ - - name: run test coverage - if: ${{ matrix.python-version == 3.7 }} - run: | - echo "Coveralls is no longer supported" - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: python -m pytest tests/ deploy: name: Deploy to GitHub and PyPI @@ -43,7 +37,7 @@ jobs: - name: set up Python uses: actions/setup-python@v2 with: - python-version: 3.7 + python-version: '3.11' - name: set up node # we need node for for semantic release uses: actions/setup-node@v4 with: @@ -111,7 +105,7 @@ jobs: - name: set up Python uses: actions/setup-python@v2 with: - python-version: 3.7 + python-version: '3.11' - name: install dependencies run: | pip install -U . diff --git a/dev-requirements.txt b/dev-requirements.txt index c2113323..37c85bd5 100644 --- a/dev-requirements.txt +++ b/dev-requirements.txt @@ -1,23 +1,18 @@ -coverage==5.5 -coveralls==1.7.0;python_version<'3.0' -coveralls==2.2.0;python_version>='3.6' -pytest==4.6.9;python_version<'3.0' -pytest==6.2.4;python_version>='3.6' -pytest-cov==2.12.0 -Sphinx==1.8.5;python_version<'3.0' -Sphinx==5.3.0;python_version>='3.6' -docutils==0.17;python_version>='3.6' +pytest==8.3.2;python_version>='3.6' +Sphinx==8.0.2;python_version>='3.6' sphinx-bootstrap-theme==0.8.1 sphinxcontrib-fulltoc==1.2.0 +sphinxcontrib-websupport==2.0.0;python_version>='3.6' +sphinx-click==6.0.0;python_version>='3.6' +twine==5.1.1;python_version>='3.6' +wheel==0.44.0;python_version>='3.6' +setuptools==75.1.0;python_version>='3.6' +importlib-metadata==8.5.0;python_version>='3.6' +pytest==4.6.9;python_version<'3.0' +Sphinx==1.8.5;python_version<'3.0' sphinxcontrib-websupport==1.1.2;python_version<'3.0' -sphinxcontrib-websupport==1.2.4;python_version>='3.6' -sphinx-click==4.4.0 +sphinx-click==4.4.0;python_version<'3.0' twine==1.13.0;python_version<'3.0' -twine==3.4.1;python_version>='3.6' -wheel==0.38.1 +wheel==0.38.1;python_version<'3.0' setuptools==44.1.0;python_version<'3.0' -setuptools==65.5.1;python_version>='3.6' importlib-metadata==2.0.0;python_version<'3.0' -importlib-metadata==4.8.0;python_version>='3.6' -jinja2==3.0.3;python_version>='3.6' -markupsafe==2.0.1;python_version>='3.6' diff --git a/tests/model_test.py b/tests/model_test.py index 25ccd55a..5d627c7f 100644 --- a/tests/model_test.py +++ b/tests/model_test.py @@ -1483,7 +1483,7 @@ def test_from_geojson_coordinates_simple_location(): for story in bldg1.unique_stories: assert 3.0 == pytest.approx(story.floor_to_floor_height, abs=1e-10) - assert pytest.approx(bldg1.footprint_area, test_building.footprint_area, abs=1e-10) + assert bldg1.footprint_area == pytest.approx(test_building.footprint_area, abs=1e-5) vertices = bldg1.footprint()[0].vertices test_vertices = test_building.footprint()[0].vertices for point, test_point in zip(vertices, test_vertices):