foundersandcoders / prereq-check

A FAC application prerequisite checker: to be used by applicants and the selection committee :fire:
https://prereq-check.herokuapp.com
18 stars 2 forks source link

Updates fcc crawl for new fcc site #126

Open matthewdking opened 6 years ago

matthewdking commented 6 years ago

fixes #125

Included in this PR:

Will update tests for this in the next few days.

Be good to get this in before FAC15 application deadline (August 17th)

BartBucknill commented 6 years ago

@matthewdking Thanks again for your amazing effort taking this on!

Bit concerned about the performance hit of waiting for the entire freecodecamp profile to load all it's resources before we process the page but I don't have a great alternative. The only alternative I see right now would be to query https://www.freecodecamp.org/api/users/get-public-profile?username=[username] and combine this with the data from https://www.freecodecamp.org/services/map-ui to see which challenges the user has completed. Problem with this is that as this is not a public API it may be changed without warning.

So for now I'm happy to go with Puppeteer. Hopefully one day freecodecamp will sort out a public api and someone will update prereq-check to use it...

BartBucknill commented 6 years ago

@matthewdking I've only been able to do minimal testing, but the code looks good - as soon as the tests are sorted I'm happy to approve the merge.

codecov-io commented 6 years ago

Codecov Report

Merging #126 into master will decrease coverage by 1.88%. The diff coverage is 81.08%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #126      +/-   ##
==========================================
- Coverage   93.47%   91.59%   -1.89%     
==========================================
  Files          18       18              
  Lines         322      333      +11     
==========================================
+ Hits          301      305       +4     
- Misses         21       28       +7
Impacted Files Coverage Δ
tests/dummy-data/freecodecamp-html-success.js 100% <ø> (ø) :arrow_up:
routes/report.js 86.36% <100%> (ø) :arrow_up:
model/freecodecamp-arrays.js 100% <100%> (ø) :arrow_up:
model/freecodecamp-crawl.js 76.66% <73.07%> (-23.34%) :arrow_down:

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 0cd15b5...f0f2344. Read the comment docs.