google / google/qwix

qwix does not have a __version__ attribute!

Open
#177 1 comment 0 reactions 1 assignee Claimed by @jshin1394 View on GitHub
Dominant language
Python
Stars
134
Forks
27
Avg merge
2d 2h
Merged PRs (30d)
12

Description

Hi Qwix team! Love the effort to complete the full JAX AI stack and I would like to contribute to this initiative.

## Expected Behavior

I am expecting to have the version attribute like so:

```python
import qwix
print(qwix.__version__)

# >> 0.1.4
```

Not having the __version__ attribute hurts debugging because of the spaghetti of dependencies between Qwix, Tunix and Flax. I have just been debugging dependencies between these three packages in the last 1 hour!

The fix should be simple, just add this line to root `__init__.py`:

```python
from importlib.metadata import PackageNotFoundError
from importlib.metadata import version

try:
__version__ = version("qwix") # match the name in pyproject.toml
except PackageNotFoundError:
__version__ = "0.0.0.dev0" # fallback for editable installs
```

I am happy to make a PR myself to resolve this if that's more preferred

## Actual Behavior

Currently, this raises an `AttributeError` since __version__ is not implemented.

## Steps to Reproduce the Problem

Run the two lines:

```python
import qwix
print(qwix.__version__)
```

## Specifications

- Version: 0.1.4
- Platform: Kaggle machine (Linux) - doesn't matter in this case anyways.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.