Skip to content

Commit

Permalink
Not use semver but instead split before and after . and compare integers
Browse files Browse the repository at this point in the history
  • Loading branch information
minhqdao committed Jul 28, 2024
1 parent 4bb65d2 commit b5c1b56
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 7 deletions.
8 changes: 2 additions & 6 deletions .github/compat/wide_compat_reports.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@

from pathlib import Path
import pandas as pd
import semver
import sys

ip = Path(sys.argv[1]) # input file path
Expand All @@ -27,15 +26,12 @@
aggfunc="first",
).sort_values(by=["runner"])


# group by compiler and sort by versions
grouped_versions = {}
for compiler in df.columns.get_level_values("compiler").unique():
versions = df.loc[:, (compiler,)].columns.get_level_values("version").unique()
# Parse and sort versions using semver
versions = sorted(
versions,
key=lambda x: semver.VersionInfo.parse(x, optional_minor_and_patch=True),
)
versions = sorted(versions, key=lambda version: tuple(map(int, version.split("."))))
grouped_versions[compiler] = versions

sorted_columns = []
Expand Down
1 change: 0 additions & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
pandas
semver
tabulate

0 comments on commit b5c1b56

Please sign in to comment.