Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TST: expand test matrix #10

Merged
merged 5 commits into from
Dec 21, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 13 additions & 3 deletions .github/workflows/build-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,22 @@ jobs:
fail-fast: false
matrix:
os:
#- macos-latest
#- windows-latest
- ubuntu-latest
python-version:
- '3.8'
- '3.9'
- '3.10'
- '3.11'
# Test all on ubuntu, test ends on macos and windows
include:
- os: macos-latest
python-version: '3.8'
- os: windows-latest
python-version: '3.8'
#- os: macos-latest
# python-version: '3.11'
- os: windows-latest
python-version: '3.11'

runs-on: ${{ matrix.os }}

Expand All @@ -41,7 +51,7 @@ jobs:
env:
dependencies: ${{ matrix.dependencies }}
run: |
python -m pip install "."
python -m pip install --editable "."
python -m pip install -r test_requirements.txt
- name: Run Tests
env:
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# Cython generated files
ewah_bool_utils/ewah_bool_wrap.cpp
ewah_bool_utils/morton_utils.c
ewah_bool_utils/_testing.cpp
temp.linux-x86_64-3.6

# Byte-compiled / optimized / DLL files
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ cimport cython
cimport numpy as np
from libcpp.vector cimport vector

from ewah_bool_utils.ewah_bool_array cimport ewah_bool_array
from .ewah_bool_array cimport ewah_bool_array

import numpy as np

Expand Down
7 changes: 7 additions & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,13 @@
libraries=std_libs,
include_dirs=[np.get_include()],
),
Extension(
"ewah_bool_utils._testing",
["ewah_bool_utils/_testing.pyx"],
include_dirs=["ewah_bool_utils", "ewah_bool_utils/cpp", np.get_include()],
extra_compile_args=["-O3", "-march=native"],
language="c++",
),
]


Expand Down
1 change: 0 additions & 1 deletion test_requirements.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
pytest>=6.2.4
Cython>=0.29
21 changes: 1 addition & 20 deletions tests/test_ewah_bool_utils.py
Original file line number Diff line number Diff line change
@@ -1,29 +1,10 @@
# Concept taken from
# https://pytestguide.readthedocs.io/en/latest/pytestGuide/#testing-cython-code

"""Tests for `ewah_bool_utils` package."""

import os
import time
from pathlib import Path

import numpy as np
import pyximport

ROOT = str(Path(__file__).parents[1].resolve())

pyximport.install(
pyimport=True,
setup_args={
"include_dirs": [
np.get_include(),
os.path.join(ROOT, "ewah_bool_utils"),
os.path.join(ROOT, "ewah_bool_utils", "cpp"),
]
},
)

from .test_ewah_bool_utils_cy import ( # noqa: E402
from ewah_bool_utils._testing import (
ewah_set_and_unset,
find_ewah_collisions,
make_and_select_from_ewah_index,
Expand Down
6 changes: 0 additions & 6 deletions tests/test_ewah_bool_utils_cy.pyxbld

This file was deleted.