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

Add cibuildwheel #124

Merged
merged 1 commit into from
Nov 10, 2023
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
2 changes: 1 addition & 1 deletion lda/tests/test_lda_sparse.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,6 @@ def test_lda_sparse(self):
np.testing.assert_array_almost_equal(model.topic_word_.sum(axis=1), np.ones(K))

def test_lda_sparse_error_float(self):
dtm = self.dtm.astype(np.float)
dtm = self.dtm.astype(float)
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This raised:

AttributeError: module 'numpy' has no attribute 'float'.
`np.float` was a deprecated alias for the builtin `float`. To avoid this error in existing code, use `float` by itself. Doing this will not modify any behavior and is safe. If you specifically wanted the numpy scalar type, use `np.float64` here.
The aliases was originally deprecated in NumPy 1.20; for more details and guidance see the original release note at:
    https://numpy.org/devdocs/release/1.20.0-notes.html#deprecations. Did you mean: 'cfloat'?

model = self.model
self.assertRaises(ValueError, model.transform, dtm)
7 changes: 7 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,13 @@ flake8 = "^5.0.1"
meson-python = "^0.14.0"
cython = "^3.0.3"
ninja = "^1.11.1.1"
cibuildwheel = "^2.16.2"

[tool.cibuildwheel]
build = "cp39-* cp310-* cp311-* cp312-*"
skip = ["pp*", "*i686", "*win32"]
Copy link
Contributor Author

@severinsimmler severinsimmler Oct 30, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We have to skip these because of numpy/numpy#24703 (comment)
and there were also problems with win32 builds (some files NumPy relies on were unavailable iirc).

test-requires = ["oslotest", "scipy", "setuptools"]
test-command = "python -m unittest discover -s {project}/lda/tests"

[build-system]
requires = ["poetry-core", "cython", "meson-python", "ninja"]
Expand Down