OSD & DPS909 Winter 2018 Release 0.1

From CDOT Wiki
Revision as of 19:28, 20 February 2018 by Ermarinz (talk | contribs) (4. Submission)
Jump to: navigation, search

0.1 Release

Introduction

You are asked to create an open source RESTful API web service that can find and extract phone numbers from submitted resources, and be used in a microservice architecture. See below for details about how the API should function.

Your first release will be due in multiple stages:

  • Part A: Create an initial, partial implementation, due Feb 1 by midnight
  • Part B: Contribute to another student's implementation, due Feb 19 by midnight

The goal of this first release is to practice, and make sure you are comfortable with common open source workflows, including:

  • using git and GitHub
  • managing GitHub repositories
  • creating common project and build artifacts in an open source repo (e.g., LICENSE, Readme.md, automation, etc)
  • working with third-party dependencies
  • creating and responding to Issues
  • creating Pull Requests
  • reviewing and merging Pull Requests
  • the differences between being a maintainer and a contributor in an open source project

API Description

Phone numbers seem like a simple thing to work with at first, but it gets complicated quickly. Thankfully, the problem of working with phone numbers anywhere on Earth has already been solved by Google, and the code made open source:

https://github.com/googlei18n/libphonenumber

You are asked to use libphonenumber to create a web service, using whatever programming language you want. Your web server must support the following API endpoints, which all return JSON formatted responses:

1. GET /api/phonenumbers/parse/text/{...string...} to allow sending small snippets of text to be parsed.

For example, requesting /api/phonenumbers/parse/text/nothing should return an empty list []. Whereas requesting requesting /api/phonenumbers/parse/text/Seneca%20Phone%20Number%3A%20416-491-5050 should return a list with a single, formatted phone number ["(416) 491-5050"].

2. POST /api/phonenumbers/parse/file with the request's Content-Type being text/plain and the body containing a base64 encoded text file. This allows larger files to be processed, in addition to small bits of text.

All responses from the API should be given in JSON format, with the exception of errors, which can use HTTP status codes (e.g., 4xx codes).

Phone numbers returned from any of the endpoints above should not be duplicated. That is, if a given input includes a phone number more than once, you should only return one copy of it.

Part A Requirements

Create a new GitHub repo for your web service. Pick an open source license for your code, making sure it is compatible with libphonenumber and any other dependencies you use. Make sure your repo has both a LICENSE and README.md file, and that your README.md has clear instructions on how to use your code.

Using any programming language you like, write a server that implements the API described above. You must also include tests to prove that your server implements the API correctly. These tests need to be runnable from the command-line. You may use any testing framework, and test runner you like.

File some Issues in your repo for enhancements that you'd like to see done to your server. Here are some suggestions, but feel free to file anything you like for fixes/enhancements you need:

  1. Write more tests to deal with various edge cases
  2. Add support for parsing a resource at a given URL: GET /api/phonenumbers/url/http%3A%2F%2Fexample.com%2F would cause the server to load the content at http://example.com and parse it for phone numbers.
  3. Add support for parsing MS Word docs. There are lots of existing open source projects that can help parse a Word doc into Text, which can then be parsed by your earlier code
  4. Add support for parsing PDF files. There are lots of existing open source projects that can help parse a PDF into Text, which can then be parsed by your earlier code
  5. Add support for parsing images. Use an OCR (e.g., https://github.com/tesseract-ocr/tesseract or http://tesseract.projectnaptha.com/) tool to first extract text from the image, then parse it as you did earlier
  6. Add automatic linting to the code, using something like eslint. Linters find bugs and style issues.
  7. Add an example client (e.g., web page) that can be used to manually test the API with various types of inputs
  8. Add support for running the server on a cloud service like Heroku
  9. Add automatic continuous integration (CI) via TravisCI, CircleCI, etc.

Make sure your repo has all your code and tests completed before moving to Part B.

Part B Requirements

Find another student's repo and pick two Issues you'd like to work on, or file your own to fix things you notice are broken. Leave a comment in the issues to let others know that you're working on this (NOTE: only 1 student can work on an issue at a time).

Fork this other student's repo, and create a clone of it. Make a branch for each of the issues you want to fix. For example, if you are fixing Issue 12, create a new branch named issue12: git checkout -b issue12 master. Now fix the code and create a Pull Request to get your changes added.

4. Submission

All submissions are done electronically via GitHub and your blog. Please add info to the table below when you are done one of the sections.

Part A: after you have created your repo, added your code and tests, and filed some issues, add your repo URL.

Part B: include URLs to two PRs you made to other student's repos.

Blog Post: after Part A and B are done, do your blog post. Your final blog post should discuss the following:

  • What did you build? Discuss your web service (e.g., what is its name, how does it work, etc.) and include links so people can find it.
  • What was your process for doing this assignment?
  • Which language, dependencies, and tools did you use? Why did you choose them?
  • What did you find challenging about your work?
  • Compare the experience of being a maintainer to that of contributing to someone else's project. Which did you enjoy more? Why?
  • What did you learn as you did this work?
  • What do you still want to learn more about in subsequent releases?
# Name Part A (GitHub Repo URL) Part B (GitHub PR URLs) Blog Post (URL)
1 Bakytzhan (Jean) Apetov https://github.com/apetov/phoneparser-js https://github.com/alexglazkov9/phonenumberparser-js/pull/7, https://github.com/alexglazkov9/phonenumberparser-js/pull/8 https://bapetov.wordpress.com/2018/02/14/open-source-project-0-1-release/
2 Yalong Li https://github.com/yalooong/phonenumber-parser https://github.com/haoRchen/Phone-Number-Parser/pull/10, https://github.com/zeddkay/node-libphonenumber-server/pull/5 https://yalongxyz.blogspot.ca/2018/02/contributing-for-open-souce-projects-to.html
3 Woodson Delhia https://github.com/Woody88/haskell-phonenumbers
4 Matthew Quan https://github.com/irrationalRock/Release1 https://github.com/simon-inoc/Open-Source/pull/2, https://github.com/apetov/phoneparser-js/pull/10, https://github.com/yalooong/phonenumber-parser/pull/8 https://mattprogrammingblog.wordpress.com/2018/02/13/osd600-release-1/
5 Aleksey Glazkov https://github.com/alexglazkov9/phonenumberparser-js https://github.com/aushakou/phoneparser-restful-service/pull/8, https://github.com/aushakou/phoneparser-restful-service/pull/10
6 Aliaksandr Ushakou https://github.com/aushakou/phoneparser-restful-service https://github.com/alexglazkov9/phonenumberparser-js/pull/9, https://github.com/alexglazkov9/phonenumberparser-js/pull/10
7 Kelvin Cho https://github.com/TheKinshu/phonenumber-Parser
8 Zhihao Cai https://github.com/josechoy/phonenumber-api
9 Owen Mak https://github.com/Owen-Mak/ParsePNum https://github.com/PatMB30/DPS909Release01/pull/5, https://github.com/PatMB30/DPS909Release01/pull/6 https://makowen.wordpress.com/2018/02/19/mid-boss-servlet-deployment/
10 Oleh Hodovaniuk https://github.com/ohodovaniuk1/parsephonenumbers https://github.com/apetov/phoneparser-js/pull/11, https://github.com/apetov/phoneparser-js/pull/15 https://ohodovaniuk.wordpress.com/2018/02/12/release-1/
11 Yuriy Kartuzov https://github.com/YuriyKartuzov/Project https://github.com/AbdulKabia/libphonenumber-osd600/pull/5, https://github.com/AbdulKabia/libphonenumber-osd600/pull/7
12 Abdul Kabia https://github.com/AbdulKabia/libphonenumber-osd600 https://github.com/kqpham/phoneparser.js/pull/7,

https://github.com/YuriyKartuzov/Project/pull/6

https://akkabia.wordpress.com/2018/02/02/play-time-with-google-googles-libphonenumber-library/
13 Patrick Godbout https://github.com/PatMB30/DPS909Release01 https://github.com/Owen-Mak/ParsePNum/pull/6,

https://github.com/Owen-Mak/ParsePNum/pull/8

https://mb30myopensourceblog.blogspot.ca/2018/02/dps909-release-01-first-open-source.html
14 Evan Davies https://github.com/EmdaviesSeneca/PhoneNumberParse
15 Lucas Verbeke https://github.com/Micluc/phoneParser https://github.com/TheKinshu/phonenumber-Parser/pull/7, https://github.com/TheKinshu/phonenumber-Parser/pull/8 https://thelucasexcerpt.wordpress.com/2018/02/20/osd600-release-1-lucas-verbeke
16 Hongcheng Zhang https://github.com/StevenZhang123/phonenumberparser-js https://github.com/josechoy/phonenumber-api/pull/11, https://github.com/ohodovaniuk1/parsephonenumbers/pull/10 https://wordpress.com/post/hongcheng1993.wordpress.com/18
17 Leandro Navarro https://github.com/jlnavarro42/jsphoneparser https://github.com/DanielHWYChang/DPS909_winter2018release1.0/pull/7,
19 Hao Chen https://github.com/haoRchen/Phone-Number-Parser https://github.com/Vimal-Raghubir/PhoneNumberAPI/pull/11, https://github.com/Vimal-Raghubir/PhoneNumberAPI/pull/12 https://medium.com/haorc/baby-steps-into-the-world-of-open-source-bad2f67e5
20 Abel Simon Inocencio https://github.com/simon-inoc/Open-Source
21 Pranoy Santosh https://github.com/pranoy10/dps909-assign1 https://github.com/kqpham/phoneparser.js/pull/6,

https://github.com/buttersnipps/libphonenumberAPI/pull/5

http://pranoydps909.blogspot.ca/2018/02/assignment-1-dps909.html
22 Daniel Chang https://github.com/DanielHWYChang/DPS909_winter2018release1.0
23 Vimal Raghubir https://github.com/Vimal-Raghubir/PhoneNumberAPI https://github.com/haoRchen/Phone-Number-Parser/pull/11, https://github.com/haoRchen/Phone-Number-Parser/pull/11 https://medium.com/@vraghubir/my-first-open-source-project-5667cbb69d8f
24 Zukhruf Khan https://github.com/zeddkay/node-libphonenumber-server https://github.com/TheKinshu/phonenumber-Parser/pull/5, https://github.com/jlnavarro42/jsphoneparser/pull/3 https://zedsdps909blog.wordpress.com/2018/02/10/my-first-open-source-project/
25 Liam Newell https://github.com/hibyguy/Throwable-RESTful-API https://github.com/YuriyKartuzov/Project/issues/2, https://github.com/mfainshtein2/phoneparser-js/issues/2
26 Joseph Pham https://github.com/jpham14/phonenumberParser https://github.com/Owen-Mak/ParsePNum/pull/7
27 Aaron Scott https://github.com/ARDScott/PhoneParser-NodeJs
28 Jafar Frotan https://github.com/a-one-d-one/libphonenumber-api-js
29 Michael Fainshtein https://github.com/mfainshtein2/phoneparser-js
30 Alex Wang https://github.com/AlexWang-16/webservice-phonelibrary https://github.com/hibyguy/Throwable-RESTful-API/pull/8, https://github.com/hibyguy/Throwable-RESTful-API/pull/9 https://alexopensource.wordpress.com/2018/02/10/first-pull-request-to-an-open-source-project/
31 Qiliang Chen https://github.com/KignorChan/libnumberWebServer https://github.com/josechoy/phonenumber-api/pull/5

https://github.com/josechoy/phonenumber-api/pull/10

https://qchen102.blogspot.ca/2018/02/tutorial-create-restful-web-server.html

https://qchen102.blogspot.ca/2018/02/debugging-open-source-api-review.html

32 Michael Kavidas https://github.com/mkavidas/libphonenumber-ASP-.Net
33 Evan Marinzel https://github.com/ermarinz/pNumAPI https://github.com/ohodovaniuk1/parsephonenumbers/pull/9, https://github.com/DanielHWYChang/DPS909_winter2018release1.0/pull/8
34 Justin Vuu https://github.com/jevuu/phoneNum
35 Soutrik Barua https://github.com/buttersnipps/libphonenumberAPI https://soutrikbarua.blogspot.ca/
36 Kevin Pham https://github.com/kqpham/phoneparser.js
37
38
39
40