Posts

Making automated testing for a Python lib using TravisCI

My Github link: jayyyin setting up Travis with python can be a pain but as long as you follow some steps it should be quite painless first determine if you're going to be using pytest, in my case I am since it seems like a good way to test things, in the repo directory you'll need a .travis.yml containing the following: second determine what your rootdir for pytest will be, in my case it's just called python thirdly by default only filenames starting with test_ will be read into pytest or you'll get a no results when collecting files to set things up I have a pytest.ini file in the root of the repo (the same directory as readme.md) within it is as follows: [pytest] testpaths = python that tells pytest to look in the python directory (if you want to add more just separate them by spaces like so): [pytest] testpaths = directory1 directory2

Building a Python Library for returning basic file info (ongoing)

Things are going smoothly so far since working with strings and filenames are pretty straight forward in python 3.6 my github project so far: https://github.com/jayyyin/python-filelib-thingy going with the simplest task of extracting filename from a path in python comes with a built in module called os.path,really useful  getting the filesize of the file was a bit more tricky as it could be either an absolute path or relative path as it is more complicated I'll use a code snippet from my github

Working on my first open source bug/request

The bug I've been focusing on first is https://github.com/mozilla/network/issues/798 it's not technically a bug as much as it is removing unused code from the old API that they used before, I tried setting up the build environment on my Windows laptop but quickly came across issues with setting up the actual virtual environment for python. I switched to my Ubuntu laptop and everything went smoothly after, I could go back and setup the windows env now since I do understand what went wrong after successfully getting it to work on Ubuntu. The person that posted that bug is suuuper nice and so far been really helpful with my questions for familiarizing myself with a new system. issue is now I realized I forgot to make a branch before starting my work so I'm wondering how I'll resolve this issue if it is one.  I tried pushing the new branch to the repo and discovered that I don't have permission to directly commit to it so I forked it and pushed to that and now ...

Requesting my first bug on Open source

The bug I'm looking at is one that isn't really a bug it's just to remove some old code and it's dependencies. https://github.com/mozilla/network I've had to install python and I'm using the "WingIDE personal" for my IDE https://github.com/mozilla/network/issues/798 I choose this bug cause I like working with python, but I've not worked with python in a long time and I've not used python 3. This bug would also help me get reintroduced to python's structure. I estimate that it might take me quite a bit longer to figure out the actual structure then actually removing the dependencies and stuff. As this might be as simple as removing something and seeing if it runs. The people have been helpful so far. there's another bug that's more of a feature request for the same system https://github.com/mozilla/network/issues/780 I posted a request there but either I removed my comment without realizing or it got removed. Agai...

Trying out a new editor

Image
Currently trying out a new (new to me) Code Editor named Atom (https://atom.io/). so far I'm really liking that it's got  built in version control via Git and GitHub it's got a really intuitive GUI right off the bat, Intro screen on the right and center and on the left is an open project It's also really nice that you can add IDE functionality to it, making it capable of pretty much anything, the theme is also customizable if you don't like such a dark theme the flow of atom is really nice too being able to adjust the window size as needed  installing or modifying the theme is super easy too.  the tab functionality is superb as well IDE installation took a little while (~2 min) but it was really easy too with the search function

Building Firefox on Linux first time build

Image
My first attempt at building Firefox: currently building it on a Linux distro known as Ubuntu, many linux users will recognize it as it can be considered mainstream. first issue I encountered is that my update URLs in my Ubuntu system was out of date and was getting 404 errors for some of them so I disabled them from the "other software" tab in the Ubuntu software settings screen. the update now works and it's currently installing Modern Mercurial via pip running it as normal and configuring it with preferred settings. watchman filesystem couldn't be found... firefoxtree enabled installing hg wip alias selecting MozReview only (requests bugzilla email address, can't do at the moment) cloning firefox now build had issues do to me running things as root, don't do that  [Error No 13] Permission denied issues resolved and it took around 81min to build, not bad for an old laptop. runs successfully =D made some modifications and rebuil...

Awesome-Python Repository for open source packages

Image
Awesome Python I recently came across the GitHub Repo for Awesome-Python. It's part of the "Awesome-" series where people compile together repositories of useful and interesting. As you may have guessed this one is for Python commands, this repo is a gold mine for any open source developer out there, actually any developer that's using python for various things. There's a lot of them here and there's no way I could cover all of these. I did come across some that are quite interesting. 1: " thef**k " Don't let the name throw you off, this one caught my eye for obvious reasons. This one is for those of you that use the Linux terminal frequently and constantly make minor typos in commands, or forget to run something as root or miss a space somewhere. All you need to do is after the mistake type "Fuck" and it will correct it, like if you typed aptget install something, the command would figure out you meant apt get install s...