ashvardanian / ashvardanian/StringZilla

Bug: Stringzillas module is missing the attribute '__capabilities__'

Open
#340 1 comment 0 reactions 0 assignees View on GitHub
bug
Dominant language
C
Stars
3.6k
Forks
135
PR merge metrics
No merged PRs in 30d

Description

### Describe the bug

Several tests fail like this:
```
=============================================================================== ERRORS ===============================================================================
________________________________________________________________ ERROR collecting test/szs_helpers.py ________________________________________________________________
szs_helpers.py:12: in
DEVICE_NAMES = ["default", "cpu_cores", "gpu_device"] if "cuda" in szs.__capabilities__ else ["default", "cpu_cores"]
^^^^^^^^^^^^^^^^^^^^
E AttributeError: module 'stringzillas' has no attribute '__capabilities__'
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! Interrupted: 1 error during collection !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
========================================================================== 1 error in 0.35s ==========================================================================
```

Version: 5.1.2
Python-3.12
FreeBSD 15.1

### Steps to reproduce

test

### Expected behavior

n/a

### StringZilla version

5.1.2

### Operating System

FreeBSD 15.1

### Hardware architecture

x86

### Which interface are you using?

C implementation

### Contact Details

_No response_

### Are you open to being tagged as a contributor?

- [ ] I am open to being mentioned in the project `.git` history as a contributor

### Is there an existing issue for this?

- [x] I have searched the existing issues

### Code of Conduct

- [x] I agree to follow this project's Code of Conduct

Contributor guide

Open the contributing guide

Research direction

Start by running the Python tests and inspecting test/szs_helpers.py, where collection reads szs.__capabilities__. Trace how the Python module exposes attributes in the C implementation; done means the attribute is available and the affected tests collect without the reported AttributeError.

Written by the indexing model from the issue text.

Assessment

Tech stack
c, python
Domain
api
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
58/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.