diff --git a/.github/ISSUE_TEMPLATE/bug_report.yml b/.github/ISSUE_TEMPLATE/bug_report.yml index 7cd4096..717393f 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.yml +++ b/.github/ISSUE_TEMPLATE/bug_report.yml @@ -4,11 +4,6 @@ title: "[BUG]: " labels: ["bug"] assignees: - amirhessam88 - - Tsmith5151 - - richardNam - - mkohram - - b-mohebali - - nicholasjma body: - type: markdown attributes: diff --git a/.github/ISSUE_TEMPLATE/feature_request.yml b/.github/ISSUE_TEMPLATE/feature_request.yml index f1715b1..76dbbbb 100644 --- a/.github/ISSUE_TEMPLATE/feature_request.yml +++ b/.github/ISSUE_TEMPLATE/feature_request.yml @@ -4,11 +4,6 @@ title: "[FEATURE]: " labels: ["enhancement"] assignees: - amirhessam88 - - Tsmith5151 - - richardNam - - mkohram - - b-mohebali - - nicholasjma body: - type: markdown attributes: diff --git a/.github/ISSUE_TEMPLATE/improve_documentation.yml b/.github/ISSUE_TEMPLATE/improve_documentation.yml index 820df58..cd2ee7b 100644 --- a/.github/ISSUE_TEMPLATE/improve_documentation.yml +++ b/.github/ISSUE_TEMPLATE/improve_documentation.yml @@ -4,11 +4,6 @@ title: "[DOCUMENTATION]: " labels: ["documentation"] assignees: - amirhessam88 - - Tsmith5151 - - richardNam - - mkohram - - b-mohebali - - nicholasjma body: - type: markdown attributes: diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index fca127b..89b11af 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -21,7 +21,7 @@ jobs: #---------------------------------------------- runs-on: ${{ matrix.os }} strategy: - fail-fast: false + fail-fast: true matrix: # TODO(amir): enable `windows-latest`, `macos-latest` and fix possible `poetry` issues and glmnet os: ["ubuntu-latest"] @@ -58,12 +58,17 @@ jobs: # therefore, all the CI jobs for those python versions failed at first, then we re-run the # jobs, the cached venv using `python v3.8` will be retrieved and the jobs will run successfully # ideally, we should be able to add `python-versions` here to distinguish between caches - key: venv-${{ runner.os }}-${{ hashFiles('**/poetry.lock') }} + # key: venv-${{ runner.os }}-${{ hashFiles('**/poetry.lock') }} + key: venv-${{ runner.os }}-${{ matrix.python-version }}-${{ hashFiles('**/poetry.lock') }} #---------------------------------------------- # ----- install dependencies ----- #---------------------------------------------- - name: Install Dependencies - run: poetry install -vv + # NOTE: `glmnet` has not been updated since 2020; trying to build it on-the-fly + # https://github.com/civisanalytics/python-glmnet/issues/79 + run: | + poetry run python -m pip install glmnet --no-use-pep517 + poetry install -vv if: steps.cached-poetry-dependencies.outputs.cache-hit != 'true' #---------------------------------------------- # ----- Integration test suite ----- diff --git a/tests/conftest.py b/tests/conftest.py index ba3cd52..c6bacf8 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -4,6 +4,7 @@ from typing import Any, Dict, List, Optional, Tuple, Union import numpy as np +import numpy.testing as npt import pandas as pd import pytest from assertpy import assert_that @@ -403,6 +404,15 @@ def _validate_figure_type_and_size( ------- None """ + # TODO(amir): currently, the `PIL.Image()` is used to load the saved figures and this would end up + # different results per operating systems. Therefore, for now defining a `tolerance` range ~ 5% + # to get away with the errors. Ideally, we should be able to match the `exact` size + _IMAGE_SIZE_ERROR_TOLERANCE_ERROR = 0.05 with Image.open(path) as img: assert_that(img).is_instance_of(expected_type) - assert_that(img.size).is_equal_to(expected_size) + assert_that(img.size).is_instance_of(tuple) + npt.assert_allclose( + actual=img.size, + desired=expected_size, + rtol=_IMAGE_SIZE_ERROR_TOLERANCE_ERROR, + )