Skip to content

Commit

Permalink
Release v0.2.0 (#654)
Browse files Browse the repository at this point in the history
* [RELEASE]: v0.2.0

* releasing
  • Loading branch information
gaurav274 authored Apr 17, 2023
1 parent 9ff5a3c commit 8151e90
Show file tree
Hide file tree
Showing 3 changed files with 47 additions and 31 deletions.
17 changes: 17 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,23 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### [Deprecated]
### [Removed]

## [0.2.0] - 2023-04-16
### [Added]

* PR #647: feat: LOAD CSV Notebook
* PR #626: docs: Documentation for creating UDFs using Decorators.
* PR #599: feat: EVA x HuggingFace
* PR #621: feat: Ray integration

### [Changed]

* PR #649: fix: Expr bugs
* PR #628: test: adding support for pytest-xdist
* PR #633: fix: Install Decord from EVA-Fork
* PR #646: update doc for extending eva
* PR #642: Build fix
* PR #641: fix: Unnest bug

## [0.1.6] - 2023-04-05
### [Added]

Expand Down
4 changes: 2 additions & 2 deletions eva/version.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@
# limitations under the License.

_MAJOR = "0"
_MINOR = "1"
_REVISION = "7+dev"
_MINOR = "2"
_REVISION = "0"

VERSION_SHORT = f"{_MAJOR}.{_MINOR}"
VERSION = f"{_MAJOR}.{_MINOR}.{_REVISION}"
57 changes: 28 additions & 29 deletions script/releasing/releaser.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,14 @@

background_loop = asyncio.new_event_loop()


def background(f):
def wrapped(*args, **kwargs):
return background_loop.run_in_executor(None, f, *args, **kwargs)

return wrapped


# ==============================================
# CONFIGURATION
# ==============================================
Expand All @@ -50,9 +52,6 @@ def wrapped(*args, **kwargs):
# other directory paths used are relative to peloton_dir
EVA_SRC_DIR = os.path.join(EVA_DIR, "eva")

NEXT_RELEASE = "v0.1.5"
PREV_RELEASE_DATE = datetime.datetime(2023, 1, 29, 23, 55, 59, 342380).replace(tzinfo=pytz.UTC)

# ==============================================
# LOGGING CONFIGURATION
# ==============================================
Expand All @@ -71,57 +70,64 @@ def wrapped(*args, **kwargs):
# UTILITY FUNCTION DEFINITIONS
# ==============================================


def run_command(command_str: str):
output = subprocess.check_output(
command_str,
shell=True,
universal_newlines=True
command_str, shell=True, universal_newlines=True
).rstrip()

pprint(output)
return output


def get_changelog():
def get_changelog(LAST_RELEASE_COMMIT):
unix_timestamp = int(run_command(f"git show -s --format=%ct {LAST_RELEASE_COMMIT}"))
PREV_RELEASE_DATE = datetime.datetime.utcfromtimestamp(unix_timestamp).replace(
tzinfo=pytz.UTC
)

# GO TO ROOT DIR
os.chdir(EVA_DIR)

# PULL CHANGES
run_command("git pull origin master")

pprint(output)

# GET GIT HISTORY
# Create the repository, raises an error if it isn't one.
repo = git.Repo(".git")

regexp = re.compile(r'\#[0-9]*')
regexp = re.compile(r"\#[0-9]*")

# Iterate through every commit for the given branch in the repository
for commit in repo.iter_commits("master"):
if commit.authored_datetime < PREV_RELEASE_DATE:
break

output = regexp.search(commit.message)

if "[BUMP]" in commit.message:
continue

if output is None:
continue

else:
pr_number = output.group(0)
key_message = commit.message.split("\n")[0]
key_message = key_message.split("(")[0]
pr_number = pr_number.split("#")[1]
print("* PR #" + str(pr_number) + ": " + key_message)

if commit.authored_datetime < PREV_RELEASE_DATE:
break

def read_file(path, encoding="utf-8"):
path = os.path.join(os.path.dirname(__file__), path)
import io

with io.open(path, encoding=encoding) as fp:
return fp.read()

def release_version():

def release_version(NEXT_RELEASE):
version_path = os.path.join(os.path.join(EVA_DIR, "eva"), "version.py")
with open(version_path, "r") as version_file:
output = version_file.read()
Expand All @@ -132,42 +138,35 @@ def release_version():

run_command("git checkout -b release-" + NEXT_RELEASE)
run_command("git add . -u")
run_command("git commit -m '[RELEASE]: "+ NEXT_RELEASE + "'")
run_command("git commit -m '[RELEASE]: " + NEXT_RELEASE + "'")
run_command("git push --set-upstream origin release-" + NEXT_RELEASE)


# ==============================================
# Main Function
# ==============================================

if __name__ == "__main__":

parser = argparse.ArgumentParser(
description="Release eva"
)
parser = argparse.ArgumentParser(description="Release eva")

parser.add_argument(
"-c",
"--get-changelog",
help="get changelog",
action="store_true",
default=False,
help="Retrieve the changelog by utilizing the last release commit provided.",
default="48ccb80237a456dd37834a7cba0b6fb4d2a8a7d8",
)

parser.add_argument(
"-r",
"--release-version",
help="release version",
action="store_true",
default=False,
help="Publish a new version of EVA using the provided tag.",
default="v0.2.0",
)

args = parser.parse_args()

if args.get_changelog:
get_changelog()
get_changelog(args.get_changelog)

if args.release_version:
release_version()



release_version(args.release_version)

0 comments on commit 8151e90

Please sign in to comment.