Skip to content

Commit

Permalink
Separate job for doctests
Browse files Browse the repository at this point in the history
  • Loading branch information
Saransh-cpp committed Jan 29, 2024
1 parent 3b2a1a2 commit 64bf7d9
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 9 deletions.
12 changes: 10 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -86,8 +86,12 @@ jobs:
- name: Install awkward v1
run: python -m pip install -U "awkward<2"

- name: Run doctests on Python ${{ matrix.python-version }} with awkward v1.x
if: matrix.python-version == '3.11'
run: python -m pytest -ra --doctest-plus src/vector/

- name: Test package with awkward v1.x
run: python -m pytest -ra --cov=vector --ignore tests/test_notebooks.py --doctest-plus .
run: python -m pytest -ra --cov=vector --ignore tests/test_notebooks.py .

check-awkward-v2:
needs: [check-light]
Expand Down Expand Up @@ -118,8 +122,12 @@ jobs:
- name: Install awkward v2
run: python -m pip install -U --pre "awkward>=2.0.0rc1"

- name: Run doctests on Python ${{ matrix.python-version }} with awkward v2.x
if: matrix.python-version == 3.11
run: python -m pytest -ra --doctest-plus src/vector/

- name: Test package with awkward v2.x
run: python -m pytest -ra --cov=vector --ignore tests/test_notebooks.py --doctest-plus .
run: python -m pytest -ra --cov=vector --ignore tests/test_notebooks.py .

- name: Upload coverage report
uses: codecov/codecov-action@v3.1.4
Expand Down
4 changes: 1 addition & 3 deletions src/vector/backends/_numba.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,10 @@

from __future__ import annotations

import sys
import types
import typing

if sys.version_info < (3, 12):
import numba
import numba

import vector._compute.lorentz
import vector._compute.planar
Expand Down
5 changes: 1 addition & 4 deletions src/vector/backends/_numba_object.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,8 @@
from __future__ import annotations

import operator
import sys

if sys.version_info < (3, 12):
import numba

import numba
import numpy

import vector
Expand Down

0 comments on commit 64bf7d9

Please sign in to comment.