Skip to content
Open
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 Adyen/settings.py
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
LIB_NAME = "adyen-python-api-library"
LIB_VERSION = "14.0.0"
LIB_VERSION = "14.0.1"
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
14.0.0
14.0.1
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
setup(
name='Adyen',
packages=find_packages(include=["Adyen*"], exclude=["tests", "tests.*"]),
version='14.0.0',
version='14.0.1',

Choose a reason for hiding this comment

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

medium

The library version is hardcoded in multiple files (setup.py, Adyen/settings.py, and VERSION). This practice is error-prone, as it's easy to forget to update the version in all locations, leading to inconsistencies.

To improve maintainability, I recommend using a single source of truth for the version number. For instance, you could define the version in Adyen/settings.py and then read it dynamically in setup.py. The VERSION file could either be removed or generated automatically as part of your release process.

Here's an example of how you could modify setup.py to read the version from Adyen/settings.py:

# At the top of setup.py
import re
import os
from setuptools import setup, find_packages

here = os.path.abspath(os.path.dirname(__file__))
# Read the version number from a single source of truth
with open(os.path.join(here, 'Adyen', 'settings.py'), 'r') as f:
    version = re.search(
        r"^LIB_VERSION\s*=\s*['\"]([^'\"]*)['\"]",
        f.read(),
        re.MULTILINE
    ).group(1)

setup(
    name='Adyen',
    packages=find_packages(include=["Adyen*"], exclude=["tests", "tests.*"]), 
    version=version,
    # ... rest of setup
)

This change would make your versioning more robust and easier to manage for future releases.

maintainer='Adyen',
maintainer_email='support@adyen.com',
description='Adyen Python Api',
Expand Down