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

Marshall/mock urlopen #15

Merged
merged 10 commits into from
May 26, 2022
Merged

Marshall/mock urlopen #15

merged 10 commits into from
May 26, 2022

Conversation

mpkrass7
Copy link
Collaborator

Essentially I just added a couple of web urls to the unit tests and validated that they work. If they aren't valid urls, they won't be tested. Please don't make me make a unit test to assess if the check for url validity is itself valid.

Notes:

  • In one of the unit tests, I don't check the web urls because the unit test checks the name attribute of the resulting colormap. I wasn't sure what the name should be so I left them out of that test
  • Hi Kevin

@mpkrass7
Copy link
Collaborator Author

Hmm I'm seeing that some checks are not successful here

@mpkrass7
Copy link
Collaborator Author

Yay I think we're passing all of the tests. Adding exception handling for OSError was the key

@mpkrass7 mpkrass7 requested a review from arvkevi May 24, 2022 01:08
pyproject.toml Outdated
@@ -7,6 +7,7 @@ requires = [
"numpy",
"pillow",
"kneed",
"requests"
Copy link
Owner

Choose a reason for hiding this comment

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

Let's not add requests as a package dependency, instead we could add it as a dev dependency like this:

[project.optional-dependencies]
dev = [
    "black",
    "pytest",
    "pytest-cov",
    "requests",
]

Also, add it to ci/requirements.txt, since that's what we actually install during CI.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Ahh thought I had removed it from there..

@mpkrass7 mpkrass7 requested a review from arvkevi May 25, 2022 18:26
Copy link
Owner

@arvkevi arvkevi left a comment

Choose a reason for hiding this comment

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

LGTM! Thank you @mpkrass7, this was a great find!

@mpkrass7 mpkrass7 merged commit aaf2c23 into main May 26, 2022
@mpkrass7 mpkrass7 deleted the marshall/mock_urlopen branch May 26, 2022 18:00
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.

2 participants