Skip to content

Commit

Permalink
Release 0.2.0 - Faster parsing
Browse files Browse the repository at this point in the history
  • Loading branch information
emilk committed Nov 11, 2024
1 parent 67ccec5 commit 0265f41
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 8 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# `re_mp4` Changelog


## 0.2.0 - 2024-11-11 - Faster video parsing
* Optimize mp4 parse times by not copying video data [#12](https://github.com/rerun-io/re_mp4/pull/12) by [@jprochazk](https://github.com/jprochazk)


## 0.1.0 - 2024-10-14
Initial release
2 changes: 1 addition & 1 deletion Cargo.lock
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ dependencies = [

[[package]]
name = "re_mp4"
version = "0.1.0"
version = "0.2.0"
dependencies = [
"byteorder",
"bytes",
Expand Down
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ publish = true
readme = "README.md"
repository = "https://github.com/rerun-io/re_mp4"
rust-version = "1.76"
version = "0.1.0"
version = "0.2.0"

[package.metadata.docs.rs]
all-features = true
Expand Down
21 changes: 15 additions & 6 deletions scripts/generate_changelog.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
from tqdm import tqdm

OWNER = "rerun-io"
REPO = "new_repo_name"
REPO = "re_mp4"
INCLUDE_LABELS = False # It adds quite a bit of visual noise


Expand Down Expand Up @@ -88,11 +88,18 @@ def fetch_pr_info(pr_number: int) -> Optional[PrInfo]:


def get_commit_info(commit: Any) -> CommitInfo:
match = re.match(r"(.*) \(#(\d+)\)", commit.summary)
if match:
# Squash-merge commits:
if match := re.match(r"(.*) \(#(\d+)\)", commit.summary):
title = str(match.group(1))
pr_number = int(match.group(2))
return CommitInfo(hexsha=commit.hexsha, title=title, pr_number=pr_number)

# Normal merge commits:
elif match := re.match(r"Merge pull request #(\d+) from (.*)", commit.summary):
title = str(match.group(2))
pr_number = int(match.group(1))
return CommitInfo(hexsha=commit.hexsha, title=title, pr_number=pr_number)

else:
return CommitInfo(hexsha=commit.hexsha, title=commit.summary, pr_number=None)

Expand All @@ -111,7 +118,7 @@ def print_section(crate: str, items: list[str]) -> None:
print()


def commit_range(new_version: str) -> str:
def calc_commit_range(new_version: str) -> str:
parts = new_version.split(".")
assert len(parts) == 3, "Expected version to be on the format X.Y.Z"
major = int(parts[0])
Expand Down Expand Up @@ -144,8 +151,10 @@ def main() -> None:
parser.add_argument("--version", required=True, help="The version of the new release, e.g. 0.42.0")
args = parser.parse_args()

commit_range = calc_commit_range(args.version)

repo = Repo(".")
commits = list(repo.iter_commits(commit_range(args.version)))
commits = list(repo.iter_commits(commit_range))
commits.reverse() # Most recent last
commit_infos = list(map(get_commit_info, commits))

Expand Down Expand Up @@ -201,7 +210,7 @@ def main() -> None:

print(f"## {args.version} - {date.today()}")
print()
print(f"Full diff at https://github.com/{OWNER}/{REPO}/compare/{args.commit_range}")
print(f"Full diff at https://github.com/{OWNER}/{REPO}/compare/{commit_range}")
print()
print_section("PRs", prs)
print_section("Unsorted commits", unsorted_commits)
Expand Down

0 comments on commit 0265f41

Please sign in to comment.