Posts

Showing posts with the label open-source

#Python-dev: adding pathlike functionality

Image
https://bugs.python.org/issue32642 https://github.com/python/cpython/pull/5691 I've been working with the import library, adding a pathlike object function for sys.path, after making some changes I needed to run "make regen-importlib" to update the importlib_external.h, to allow the changes to go through since I'm modifying a core lib. after testing some I realized something was off, considering one of the tests was taking over 41 hours to complete, I started off by checking for conflicts to see if I was behind on some update they may have done to fix this down the line.... turns out my import library source code (not the .h) was out of date from the current version which caused a merge conflict in on the PR, which also caused appveyor to break, I fixed it easily by using Atom and clicking the "fix  conflict button, which created a dropdown menu of which one to keep, "use ours" vs "use theirs", then after selecting the appropriate one...

#Python-dev: First contribution to (c)python

Image
First PR (pull request) Requirements: I discovered that to be able to contribute you need to have a few things 1.A Github account (this is a must for anyone wanting to contribute to any open-source project) 2.A python issue tracker account (on this site https://bugs.python.org/)  -you need to then have your Github account username in the "your details" section of your account (if you set your Github username during reregistration then it should already be set) 3. Sign a this CLA that's also on their site entering the same Github and python issue tracker account for the info. note that the CLA takes 1 American work day (so 24 hrs within Monday-Friday) 4. when you make the pull request it has to be bpo-(issue number): description   -note there are special rules for back fixing (it will show up in the description of the PR when you make it) 5. if it hasn't been previously done you have to make whats called a news file under the misc/NEWS.d/next fol...

#Python-dev: Starting to contribute to (c)python

 Python Dev   I recently started trying to contribute to python (aka python-dev), so far I've found the IRC is #python-dev, the way that I've been getting there is by using freenode , (you can also get there by searching freenode and clicking the "chat" button), I have noticed that the IRC channel can get you some help but, I've had mixed results I got a response for my first question but after that I didn't get a response (your millage may vary) I also discovered that Cygwin (a bash terminal within windows) isn't fully supported by cpython I also found this mailing list , that I've signed up for and I've already received some emails, so far I've emailed to python-dev@python.org, that apparently sends an email to ALL members, I don't know if this is a good way to reach them as I only sent this email yesterday and haven't gotten a response.  I just posted a bug about what I'm experiencing since running the test command res...

Testing if an image is reloaded even if the given url is identical to an already loaded url

I tested if the image is being reloaded but it appears that it isn't, the way I'm testing is that I'm using a counter to check how many times it's been reloaded and if it does change it should change the background again after changing it the first time. https://github.com/jayyyin/webimgcheck

Looking for more bugs (fixing those bugs)

I've been looking around in generally the same area of GitHub (namely Mozilla/Network) to see if they have anymore issues that I can help with, I've found one that seems to link to another GitHub project from Mozilla so it looks like a good place to continue my journey in open source https://github.com/mozilla/foundation.mozilla.org/issues/235 modifications seem to need to take place in the mofo-bootstrap repo in order to apply more seamlessly into all their sites so I've made opened an issue on that repo to see if I can get things rolling. https://github.com/mozilla/mofo-bootstrap/issues/122 Someone replied and stated that the code was already in for the Network part and all that needed to be done was change a few links and strings, I do plan on changing the Class name to match so that will have to be changed at a later time, after I've changed the class name. as for the bootstrap part they were using a package called pug to store their urls in a scss file ...

Looking for more bugs

I've been looking around in generally the same area of GitHub (namely Mozilla/Network) to see if they have anymore issues that I can help with, I've found one that seems to link to another GitHub project from Mozilla so it looks like a good place to continue my journey in open source https://github.com/mozilla/foundation.mozilla.org/issues/235 modifications seem to need to take place in the mofo-bootstrap repo in order to apply more seamlessly into all their sites so I've made opened an issue on that repo to see if I can get things rolling. https://github.com/mozilla/mofo-bootstrap/issues/122

Making a Readme.md file in my github repo to include actual markdowns

Image
GitHub Repo This has been really fun to make, also makes the read-me more professional. linking images into  the read-me was really simple all you need is to do this:  ![anyname](link) The traditional triple "`" notation works with code blocking too. The read-me system works really similar to the Blogger system you may or may not be familiar with  it also has a preview if you edit it through the GitHub site it's self through the edit button after you select the file it's self.

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...