stats_can
stats_can copied to clipboard
Migrate from os.path to Pathlib
Using os.path to handle files makes the implementation trickier, especially for cross platform support. Pathlib is great. Time to switch to pathlib
Ian,
After watching the today's Data-for-Good/PyData meetup. I agree that this would be a good issue to explore the code. I've worked through the code updating to replase os.path
with pathlib
. I'm on Python 3.9 and your tests don't run with nox
. So, I'm wondering how to run tests before I create a PR.
Thanks for the presentation and great work.
Azim
Hi Azim,
Thanks for your interest! There are a couple options for how to proceed. If you create a pull request with your changes then GitHub actions will run the tests remotely. If you want to test locally without nox you should just be able to call pytest directly from whatever environment you're in. Alternatively you could either set up other python versions, or wait for me to add python 3.9 support (that's pretty high on my to do list). What are you using to manage python versions on your machine and what operating system are you running?
Thanks
Thank you for the quick response. I am on Win-10 and have created a venv
environment. My current toolchain/environment is VS-Code with Microsoft's Python extensions. I have my main Python install on my path. I will try the PyTest suggestion later today.
I don't have any Python version management work-flows and I've gone away from using third party distros (eg enthought, anaconda). Some packages such as iPython I've installed in my global Python but other packages I'm trying to keep to installing in virtual environments for a given project.
I will let you know how it goes. Expect a PR from me in the near future.
Well, I think I need some more time to get tests to run on my computer before I can create a PR and be sure that I haven't broken your tests. Anyway, I will update you on progress.
I've just merged in a fix that allows the package to support python 3.9. Hopefully this will make your testing easier!
I will try it. I think I'm having some issue with the tables
package. I had to download binaries from Christoph Gohlke but I still have error's related to this package. I will merge your latest commit and try to run tests this weekend. Thanks
Hello Ian,
Pull Request #64 address this issue. Let me know what you think.
Thanks
Azim
You're welcome. happy to have contributed.