Skip to content
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

Pr 4 #4

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open

Pr 4 #4

wants to merge 5 commits into from

Conversation

CheezItMan
Copy link

No description provided.

for filename in files:
if filename.endswith(".xml"):
xml_file = filename
break
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would we want to change this for a scenario where there are more than one xml files?

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great suggestion, Sara!

Copy link

@hlumapas hlumapas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

awesome job

assert find_xml_file(".") is None


def test_finds_existing_xml_file():
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

very good work defining a function

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Test looks fine

from find_xml_file.find_xml_file import find_xml_file


def test_no_files_returns_None():
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are we testing for a specific file? It might be helpful to be more descriptive here. "test_no_xml_files_returns_None():"

xml_file = filename
break

return xml_file
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is there only one xml file anticipated. What if there is more than one.

import os


def find_xml_file(folder):

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What about the instance of more than one xml files?

@@ -0,0 +1,10 @@
from find_xml_file.find_xml_file import find_xml_file

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This naming could be confusing. Can we rename these files?

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What a great suggestion, Dani!

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since there is only one method in file, maybe we can leave this as is OR rename the file where the method lives, so its is not redundant.

def find_xml_file(folder):
files = os.listdir(folder)

xml_file = None
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This might need to be renamed xml_files if we are going to possibly grab more than one.


xml_file = None

for filename in files:

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

great use of a for loop!

Copy link

@hlumapas hlumapas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

naming conventions



def find_xml_file(folder):
files = os.listdir(folder)
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can we try to find a more descriptive variable name like user_files

Copy link

@ghost ghost left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Clean up naming conventions if we collect more than one xml file.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants