This week I’ve spread my wings, and separated my tool designed for parsing imports into its own repository. The unnamed parser has now found its home on GitHub at ImPyParser. The first step was creating the repo, and filling in a simple README to indicate what the project was.
With the repo up and README written, it was time to get my code onto the repo, but I wanted to carefully plan out how I wanted to do this. With my previous feedback in mind about wanting a more robust tool, I began to brainstorm. With the power of python and additional tools made for python, I decided to wrap my tool in a pip package.
Pip is the package installer for python that allows the installation of packages from the python index, and is a very easy to use tool, the basis being pip install [package]. Having used pip multiple times I wanted to create my own, so I began my research and development on a custom package.
Following registering the account, I downloaded the required tools, and created my executable that would be run when my package is called. This script is a python script that will receive parameters and use them to call pylint all from one command line argument and one package. This process included creating and modifying a setup.py file, which is responsible for the name of the project, version number, author, description, scripts, etc.
Next I added a licence, followed by uploading to PyPI.
I was happy to see my project on PyPI, with all the version history and descriptions and all, it was a cool experience to see that. Another interesting thing to see was the ability to pip install my own package, something that I had done numerous times with other projects and packages, was now my own, and seeing it download and install successfully was rewarding.
Picking up where I left off, I went back to Keras, back to the same issue, and back to Gabriel to talk about what I had created and get some ideas.
I let him know of the main change, being more robust, as well as where he could find the project on GitHub, and PyPI, and eagerly awaited a response.
Gabriel was quick to respond and gave me an informative suggestion, with room to progress and continue integrating this into the keras project.
I plan on doing two main things right of the bat. One is making sure my code is reliable, and polished, as well as beginning to look into Gabriel’s bot, and PyGithub.
I believe it was good for me to branch out and try to move this project independantly, as well as learn about PyPI and registering custom packages. Moving forward I have enough on my plate to progress and try to integrate the tool into the bot to warn about invalid imports in Github pull requests. I am looking forward to what the next week has in store for me.
Until next time…