Skip to content

Commit

Permalink
Boosted version (#1804)
Browse files Browse the repository at this point in the history
* Boosted version

* Fix

* Added error to setup.py
  • Loading branch information
ternaus authored Jun 19, 2024
1 parent e0c9148 commit a07f249
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 5 deletions.
1 change: 1 addition & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ on:
paths-ignore:
- 'CONTRIBUTORS.md'
- 'benchmark/**'
- 'albumentations/_version.py'

jobs:
test_and_lint:
Expand Down
3 changes: 1 addition & 2 deletions albumentations/__init__.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
__version__ = "1.4.9"

import os

from albumentations.check_version import check_for_updates

from ._version import __version__ # noqa: F401
from .augmentations import *
from .core.composition import *
from .core.serialization import *
Expand Down
1 change: 1 addition & 0 deletions albumentations/_version.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
__version__ = "1.4.10"
2 changes: 1 addition & 1 deletion albumentations/check_version.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import urllib.request
from urllib.request import OpenerDirector

from albumentations import __version__ as current_version
from albumentations._version import __version__ as current_version

# Set up basic logging
logging.basicConfig(level=logging.INFO)
Expand Down
2 changes: 1 addition & 1 deletion albumentations/core/serialization.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
yaml_available = False


from albumentations import __version__
from albumentations._version import __version__

__all__ = ["to_dict", "from_dict", "save", "load"]

Expand Down
4 changes: 3 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,9 @@

def get_version() -> str:
current_dir = Path(__file__).parent
version_file = current_dir / "albumentations" / "__init__.py"
version_file = current_dir / "albumentations" / "_version.py"
if not version_file.is_file():
raise FileNotFoundError(f"Version file not found: {version_file}")
with open(version_file, encoding="utf-8") as f:
version_match = re.search(r'^__version__ = [\'"]([^\'"]*)[\'"]', f.read(), re.M)
if version_match:
Expand Down

0 comments on commit a07f249

Please sign in to comment.