Skip to content

Commit

Permalink
Spedups in tests and CI/CD (#1803)
Browse files Browse the repository at this point in the history
* Spedups in tests and CI/CD

* Removed large from CI
  • Loading branch information
ternaus committed Jun 19, 2024
1 parent 9bf44fc commit e0c9148
Show file tree
Hide file tree
Showing 6 changed files with 97 additions and 104 deletions.
6 changes: 1 addition & 5 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,14 +63,10 @@ jobs:
- name: Install dependencies
run: |
uv pip install --system .
- name: Cleanup the build directory
uses: JesseTG/[email protected]
with:
path: build
- name: Run PyTest
run: pytest --cov .
- name: Upload coverage reports to Codecov
if: matrix.operating-system == 'ubuntu-latest' && matrix.python-version == '3.8'
if: matrix.operating-system == 'ubuntu-latest' && matrix.python-version == '3.10'
uses: codecov/[email protected]
with:
token: ${{ secrets.CODECOV_TOKEN }}
Expand Down
6 changes: 4 additions & 2 deletions tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,8 @@ def mp_pool():
method = "spawn"
else:
method = None
return multiprocessing.get_context(method).Pool(8)
return multiprocessing.get_context(method).Pool(4)


SQUARE_UINT8_IMAGE = np.random.randint(low=0, high=256, size=(100, 100, 3), dtype=np.uint8)
RECTANGULAR_UINT8_IMAGE = np.random.randint(low=0, high=256, size=(101, 99, 3), dtype=np.uint8)
Expand All @@ -62,4 +63,5 @@ def mp_pool():
SQUARE_IMAGES = [SQUARE_UINT8_IMAGE, SQUARE_FLOAT_IMAGE]
RECTANGULAR_IMAGES = [RECTANGULAR_UINT8_IMAGE, RECTANGULAR_FLOAT_IMAGE]

SQUARE_MULTI_UINT8_IMAGE = np.random.randint(low=0, high=256, size=(100, 100, 7), dtype=np.uint8)
SQUARE_MULTI_UINT8_IMAGE = np.random.randint(low=0, high=256, size=(100, 100, 5), dtype=np.uint8)
SQUARE_MULTI_FLOAT_IMAGE = np.random.uniform(low=0.0, high=1.0, size=(100, 100, 5)).astype("float32")
Loading

0 comments on commit e0c9148

Please sign in to comment.