Posts

Showing posts from November, 2020

OSD600 -- Release 0.4.1 -- Choose Project and issues

Release 0.4.1 -- Choose Project and issues For this release 0.4, we keep contributing to the open-source projects with larger/more pull requests. The next couple weeks would be very busy for me and I don't want to spend too much time on finding projects, and setting developer environments, so  I chose to keep contribute to  Telescope  for my last release. I have checked all the issues on the Telescope repository, and I found one I really want to work on Issue-1416  Improve Mobile Usability by adding a bottom app bar Sadly, it was picked by one of my classmates.  However, there are some front-end enhancements/bugs that I can work on.  I will start my release 0.4 by adding/fixing those  enhancements/bugs and keep finding all  related   enhancements/bugs to improve the overall front-end of the project. These are the issues I am currently working on: Issue-1424  Fix font colours in GitHub Contributor component Issue-1426   Scroll To Top button doesn't move to correct position Issue

OSD600 Lab8

Image
OSD600 LAB8 In this lab, we were asked to add unit tests, code coverage analysis, continuous integration to my open source project  urlStatusChecker .  we were also asked to add Tests to Another project. Choose and Set Up a Testing Framework Since my command-line tool is written in javascript, I choose Jest as my testing framework. It is a famous javascript testing framework that works with projects using: Babel, Typescript, Node, React, Angular, Vue, etc. I  know that Jest contains a code coverage analysis as well, so it is the perfect option. I simply use the command " npm install --save-dev jest " to install it and start writing my unit test. Write My First Test I have never write any unit tests before. After I watched this week's video, I have a basic concept of what is unit testing, integration testing, end to end testing. I chose the  simplest   function  in my project to begin to write my first unit test.  const   goodUrl  = ( urlString )  =>  {    const   PATT

My PR for release 0.3 External Project

Image
 Picking the issue I am so glad to hear that we are allowed to work on repositories that  we have already worked on in the past. That means we don't need to spend time on set it up and learn the code. I decide to work on  issue-collab  since I am so familiar with the repository. Different than any other issue I have work on, I filed the new issue-76 myself and tried to create a pull request for it. The issue I filed is that add a scroll to the top button. I am trying to add the scroll to the top button into this issue-collab repository just like the one in Telescope. The owner of Issue-collab thinks this is a good idea too. Working on the issue The first time when I tried to work on it, I just tried to study the code from Telescope and some from google and playing the code around. I was so annoying that I can't put some code together successfully in React. After watched some React video, I realized that there are two different components which are Class components and Function

The first PR to lovely Telescope

Picking the issue   After watching my professor's video  A Tour of the Telescope Project  and followed through Environment Setup documentation ,  finally   I am able to setup Telescope on my machine successfully, and tried to do my first PR to Telescope project. When I browsing the existing issue list, I found one Issue-1264  which mentioned in Week 7's video  Fixing a bug in Telescope  still there. I always afraid that I might fail to fix a back-end bug, so I have tried it before I  ask for the assignee.  Fix the bug that the setting of LOG_LEVEL in .env is not working properly. Even set  LOG_LEVEL=debug ,  npm start  still print as  LOG_LEVEL=info .  Working on the issue Firstly, I tested the bug by set LOG_LEVEL to debug in .env and confirmed that it only consoled the level of logs. Then I need to find which file consoled those logs. After scan over the back end files. I found logger.js inside utils folder is responded to consoling the  LOG_LEVEL. require ( '../lib/confi

OSD600 Lab 7

OSD600 LAB7 in this lab, we were asked to add  a source code formatter, add  a linter, integrate them to my editor and  add a Git pre-commit hook  to my open source project  urlStatusChecker .  Add a Source Code Formatter Since my project is written in javascript, I chose the most famous javascript fomatter "Prettier" to automate the format of my project. I followed Prettier documentation to install it to my repository using the command " npm install --save-dev --save-exact prettier ". Then I created two empty files  .prettierrc.json  and  .prettierignore . I wrote my setting in  .prettierrc.json  as  {    "semi" :  true ,    "trailingComma" :  "all" ,    "printWidth" :  80 ,    "tabWidth" :  2 ,    "bracketSpacing" :  false }  Then I add some files that not need to format in .prettierignore file.  When I tried to test Prettier by running  npx prettier --write . , an error occurred and the message showed t

OSD 600 LAB 6

Image
OSD 600 LAB 6 in this week's lab, I am asked to set up Telescope as develop mode on my machine and update my urlStateschecker to check posts' url from Telescope server.  Setting up telescope It's not too difficult for me to set up Telescope on my machine because I already installed Window Linux subsystem, Ubuntu, and Docker for my preview repository. I am using Window home system, I guess it's the most difficult version to set up Telescope. I glad that I suffered it already when I tried to contribute do some repository on Github.  However, I found a "bug" from Gatsby Develop. When I tried to  start the Gatsby dev serve " npm run develop ", it always  stucks at the first time. When I cancel it and rerun, it works. When I tried to google the bug, I found that it is an open issue ( https://github.com/gatsbyjs/gatsby/issues/25216 ) in Gatsby  repository since Jun 22.  Check Links in Telescope Posts I choose the easiest way which is adding  some code to i