Skip to content

Commit

Permalink
Updated the function get relative paths for benchmarks.
Browse files Browse the repository at this point in the history
  • Loading branch information
airvzxf committed Apr 19, 2024
1 parent b1eb517 commit 27dddf9
Show file tree
Hide file tree
Showing 3 changed files with 35 additions and 5 deletions.
12 changes: 12 additions & 0 deletions Pipfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
[[source]]
url = "https://pypi.org/simple"
verify_ssl = true
name = "pypi"

[packages]

[dev-packages]

[requires]
python_version = "3.11"
python_full_version = "3.11.8"
21 changes: 21 additions & 0 deletions Pipfile.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 2 additions & 5 deletions benchmarks/benchmark_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,9 @@ class BenchmarkBase:
timeout = 600

@staticmethod
def split_path(path):
return path.split('/')

def get_relative_path(self, partial_path: str):
def get_relative_path(partial_path: str):
path = dirname(realpath(__file__))
targets = self.split_path(partial_path)
targets = Path(partial_path).parts

for target in targets:
path = join(path, target)
Expand Down

0 comments on commit 27dddf9

Please sign in to comment.