Skip to content
Merged
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
4 changes: 2 additions & 2 deletions python/dev/RELEASE.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@ First we're going to release a release candidate (RC) and publish it to the publ
Make sure that you're on the version that you want to release.

```bash
export RC=rc1
export VERSION=0.0.1${RC}
export RC=rc0
export VERSION=0.0.1.${RC}
export VERSION_WITHOUT_RC=${VERSION/rc?/}
export VERSION_BRANCH=${VERSION_WITHOUT_RC//./-}

Expand Down
3 changes: 3 additions & 0 deletions python/pyiceberg/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,6 @@
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
from importlib import metadata

__version__ = metadata.version(__package__)
2 changes: 1 addition & 1 deletion python/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@

[tool.poetry]
name = "pyiceberg"
version = "0.0.1rc1"
version = "0.1.0.dev0"
readme = "README.md"
homepage = "https://iceberg.apache.org/"
repository = "https://github.com/apache/iceberg/"
Expand Down
29 changes: 29 additions & 0 deletions python/tests/test_version.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
import re

from pyiceberg import __version__

VERSION_REGEX = re.compile(r"^\d+.\d+.\d+(.(dev|rc)\d+)?$")


def test_version_format():
# should be in the format of 0.14.0 or 0.14.0.dev0
assert VERSION_REGEX.search(__version__)

# RCs should work as well
assert VERSION_REGEX.search("0.1.0.rc0")