Skip to content

Commit 9bfced7

Browse files
[core] chore: inherit all errors from GarfError
1 parent 81722ee commit 9bfced7

File tree

3 files changed

+8
-6
lines changed

3 files changed

+8
-6
lines changed

.github/workflows/test.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,17 +27,17 @@ jobs:
2727
enable-cache: true
2828
- name: Install dependencies
2929
run: |
30-
uv pip install pytest
30+
uv pip install pytest coverage
3131
- name: Test ${{ matrix.library }}
3232
if: contains(github.event.pull_request.changed_files, 'libs/${{ matrix.library }}/**')
3333
run: |
3434
cd libs/${{ matrix.library }}
3535
uv pip install -e .[all]
3636
pytest tests/unit
37-
- name: Generate Report
37+
- name: Generate Report for ${{ matrix.library }}
38+
if: contains(github.event.pull_request.changed_files, 'libs/${{ matrix.library }}/**')
3839
run: |
39-
uv pip install coverage
40-
coverage run -m pytest
40+
coverage run -m pytest libs/${{ matrix.library }}/tests/unit
4141
- name: Upload coverage reports to Codecov
4242
uses: codecov/codecov-action@v3
4343
env:

libs/garf_core/garf_core/api_clients.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,8 @@
2222
import requests
2323
from typing_extensions import override
2424

25+
from garf_core import exceptions
26+
2527

2628
@dataclasses.dataclass
2729
class GarfApiRequest:
@@ -35,7 +37,7 @@ class GarfApiResponse:
3537
results: list
3638

3739

38-
class GarfApiError(Exception):
40+
class GarfApiError(exceptions.GarfError):
3941
"""API specific exception."""
4042

4143

libs/garf_core/garf_core/exceptions.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2323
# See the License for the specific language governing permissions and
2424
# limitations under the License.
25-
"""Module for defining exceptions."""
25+
"""Defines common exceptions for the garf-core library."""
2626

2727
from __future__ import annotations
2828

0 commit comments

Comments
 (0)