-
Notifications
You must be signed in to change notification settings - Fork 10
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
Feature/unit tests #81
Conversation
Check out this pull request on See visual diffs & provide feedback on Jupyter Notebooks. Powered by ReviewNB |
|
Feel free to unpin |
Hi Herbie, That makes sense, I'll try unpinning the RE using the |
Ah ok, so everything seems to be ok now for linux/mac, but I should probably fix windows as well for completeness. |
Yes, I just meant that for dev purposes I use the |
Regarding the GDAL Windows issue, you may be able to fix this by including a GDAL wheels download and install in the configuration somehow: https://stackoverflow.com/questions/55583234/installation-fails-for-fiona-and-geopandas-with-gdal-on-python-3-6-on-microsoft But it's not a big deal for now if it doesn't work - interestingly this was so annoying for |
.github/workflows/python-package.yml
Outdated
- name: Lint with flake8 | ||
run: | | ||
# stop the build if there are Python syntax errors or undefined names | ||
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics |
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.
What do these error codes mean?
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.
Hi, I'm not sure, I originally adapted this from a github actions example. Given that we have pylint anyway, I will get rid of this section.
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.
Looks good! I was wondering what is the reason for adding pipwin
and descartes
to setup.py
? You could also add matplotlib
and seaborn
since I noticed some of our code requires them and I couldn't figure out why we didn't include them, unless you can remember?
Hi, sure, I'm very happy to give up on Windows. I guess we can direct any windows users to this stack exchange answer: https://stackoverflow.com/a/65082853 if they want to use this package. |
Hi Herbie, I only added 'pipwin' and 'descartes' to the |
(The CI github action was still triggered by |
I've added only one unit test, which is more of a "smoke test". It might be worth adding some more before we merge this branch in. |
Ah ok, the CI |
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.
Looks good! I don't think it's necessary to fix the pylint
errors for this PR, I can either fix them or turn off the unnecessary error codes later.
Sure, I can merge and then add some more unit tests in a future pull request. |
Hi,
I am adding a some unit tests that will run as a github action for a few different versions of python at each push.
Currently it only pip installs the package and creates the test data, but I will add a few more.
I've added settings in the
pytest.ini
file that allow code blocks using>>>
in python docstrings to act both as unit tests and examples, which should hopefully reduce duplication.