Skip to content
Open
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 setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ def get_tag(self):
setup(
author="miles Team",
name="miles",
version="0.2.1",
version="0.2.2",
Copy link
Contributor

Choose a reason for hiding this comment

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

medium

Hardcoding the version number in setup.py can be difficult to maintain. A common best practice is to define the version in one place (a single source of truth), such as your package's __init__.py, and then read it dynamically in setup.py.

For example, in miles/__init__.py:

# In miles/__init__.py
__version__ = "0.2.2"

This approach allows you to access the version from within your package (e.g., miles.__version__) and ensures consistency. You can then read this value in setup.py to set the version dynamically.

packages=find_packages(include=["miles*", "miles_plugins*"]),
include_package_data=True,
install_requires=_fetch_requirements("requirements.txt"),
Expand Down