django-commons / django-commons/drf-haystack

Version definition improvement

Open Beginner friendly
#330 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Blocked
Dominant language
Python
Stars
264
Forks
81
Avg merge
1d 14h
Merged PRs (30d)
21

Description

Currently we are maintaining this project version in 2 places

  • pyproject.toml
  • drf_haystack/__init__.py

Can we use this code block inside drf_haystack/__init__.py

from importlib.metadata import version

__version__ = version("drf-haystack")

By this we don't need to manage version in two different places, just pyproject.toml version automatically works here, even with uv sync editable package mode.

Originally posted by @DhavalGojiya in https://github.com/ulgens/drf-haystack/issues/328#issuecomment-5177675729

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Read pyproject.toml and drf_haystack/init.py to compare the current version definitions and package metadata. Confirm how the package is installed in editable mode, then run the existing test suite. Done means the version is maintained in pyproject.toml only and remains available from drf_haystack.init.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
build-system, release
Issue type
Refactor
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Quiet
Clarity
Clearly specified
Newbie friendliness
75/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.