-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add progress bars #2
base: main
Are you sure you want to change the base?
Conversation
Signed-off-by: Vlad Arama <[email protected]>
Use Black Code style and pylint checker
Update log_anonymizer.py (linting and cleanup)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I love the progress bars Matthew, very cool. I suggest we use the file_path
instead of filename
for the count_lines
function, check my comments.
log_anonymizer.py
Outdated
|
||
with open(input_file_path, 'r') as input_file, open(output_file_path, 'w') as output_file: | ||
for line in input_file: | ||
line_count = count_lines(filename=file_name) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
line_count = count_lines(filename=file_name) | |
line_count = count_lines(file_path=input_file_path) |
I am running into issues on this line, python cannot find the file.
I think we need to provide the file path instead. This should make it work.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a rebase deal. Yes, your patch suggestions are valid! :)
log_anonymizer.py
Outdated
@@ -279,48 +357,81 @@ def randomize_numbers(number, is_ip_address = False): | |||
return random.randint(lower_bound, upper_bound) | |||
|
|||
|
|||
def count_lines(filename:str)->int: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
def count_lines(filename:str)->int: | |
def count_lines(file_path:str)->int: |
log_anonymizer.py
Outdated
@@ -279,48 +357,81 @@ def randomize_numbers(number, is_ip_address = False): | |||
return random.randint(lower_bound, upper_bound) | |||
|
|||
|
|||
def count_lines(filename:str)->int: | |||
c = 0 | |||
with open(filename) as file: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
with open(filename) as file: | |
with open(file_path) as file: |
Trying the "resolve confilicts" button. Maybe it broke everything? |
Signed-off-by: MatthewKhouzam <[email protected]>
b9be5a9
to
bd3aaa1
Compare
I think it's done? |
Update count_lines
bee8df7
to
e94806e
Compare
This should be reviewed after #1