-
Notifications
You must be signed in to change notification settings - Fork 3
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
Ip checker #28
Ip checker #28
Conversation
made code smoother and making sure it worked by adding unit testing which still needs to be finished off
just added or removed every comment
removed pycache files and included a yaml and requirements txt
response to pr changes about docstring and git ignoring files
Co-authored-by: khalford <[email protected]>
added openpyxl to requirements.txt
…into get_dns_records_v2
attempting to ignore .idea
deleted all ignore git ignores meaning that all files that should be ignored are ignored
removed pycache with rm -r--cached fn/__pycache__
removed pycache with rm -r--cached fn/__pycache__ also removed .idea
…into get_dns_records_v3
added ip checker as well as a few unit tests to accompany theses changes the ip checker should check dns and ips for resolvability and print the result to the command line to the user
ip checker that resolves dns and ips and lists out the result with relevant unit tests to accompany it
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.
first pass through - will look at tests after
@@ -0,0 +1,36 @@ | |||
name: Cloud DNS tests |
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 file should be placed in a top-level .github/workflows
folder
see https://github.com/stfc/SCD-OpenStack-Utils/tree/master/.github/workflows as an example
:param reverse_order: use reverse or forward order / if true use forward if false use reverse | ||
:return: the text written into the file | ||
""" | ||
print(output_filepath) |
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.
remove this - we can add logging later
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.
removed print(output_filepath)
else: | ||
unreachable_dns.append(dns_name) | ||
|
||
return reachable_ips, unreachable_ips, reachable_dns, unreachable_dns |
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.
it feels like you should use a dataclass here - but we can add that later
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.
LGTM, few comments
|
||
- name: Analyse with pylint | ||
run: | | ||
cd reverseforwardrecord && pylint $(git ls-files *.py) |
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.
Try this and see if it works. It much less messy
cd reverseforwardrecord && pylint $(git ls-files *.py) | |
pylint reverseforwardrecord |
resolved changes from reviewers kalibh and anish
changing pylint from ls * to pylint reverseforwardrecord
Github was trying to do 20.04 and 22.04 at the same time so nothing started
Was conflicting in terminal, wouldn't let me install python standard library packages
To make pylint happier.
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.
LGTM - Once pylint is passing I'm happy to approve
Went through all errors given as well as refining and changing parts of the code and adding further documentation.
added an ip and dns resolver that has its own unit tests which are used to grab the ips from the files after being displayed out in a reverse/ forward order format and then tested on which ips/dns are reachable
the reason it fails in workflow is because it requires an excel file to run or a csv file, and that isnt provided, it also uses argparse