-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #3 from grafuls/development
Dependencies, Makefile, Docs and Containers
- Loading branch information
Showing
8 changed files
with
102 additions
and
39 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
#!/usr/bin/env python | ||
# -*- coding: utf-8 -*- | ||
|
||
import hashlib | ||
import sys | ||
|
||
|
||
def run(paths): | ||
sha = hashlib.sha1() | ||
|
||
for path in paths: | ||
try: | ||
with open(path, 'rb') as f: | ||
for chunk in iter(lambda: f.read(4096), b''): | ||
sha.update(chunk) | ||
except IOError: | ||
sha.update(path.encode()) | ||
|
||
print(sha.hexdigest()) | ||
|
||
|
||
if __name__ == '__main__': | ||
run(sys.argv[1:]) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
#!/usr/bin/env python | ||
# -*- coding: utf-8 -*- | ||
|
||
import os | ||
import sys | ||
|
||
|
||
COMMANDS = { | ||
'linux': "open", | ||
'win32': "cmd /c start", | ||
'cygwin': "cygstart", | ||
'darwin': "open", | ||
} | ||
|
||
|
||
def run(path): | ||
command = COMMANDS.get(sys.platform, "open") | ||
os.system(command + ' ' + path) | ||
|
||
|
||
if __name__ == '__main__': | ||
run(sys.argv[-1]) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
# Use the official Python base image | ||
FROM python:3.11 | ||
LABEL authors="grafuls" | ||
|
||
RUN apt-get install git patch | ||
|
||
# Set the working directory inside the container | ||
WORKDIR /opt | ||
RUN git clone https://github.com/redhat-performance/wppt | ||
WORKDIR /opt/wppt | ||
|
||
# Install Poetry | ||
RUN pip install poetry | ||
|
||
# Install project dependencies | ||
RUN make install | ||
|
||
# Set the entrypoint command to run the project | ||
CMD ["make", "run",] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters