mitodl / ocw-to-hugo

A command line utility for taking master.json output from ocw-data-parser and producing markdown for use with hugo-course-publisher
3 stars 0 forks source link

Fix error caused by missing archive video media_url #501

Closed mbertrand closed 2 years ago

mbertrand commented 2 years ago

Pre-Flight checklist

What are the relevant tickets?

Should fix the missing video resource for res.3-003 described in https://github.com/mitodl/ocw-to-hugo/issues/495

What's this PR do?

Prevents a yaml error from being thrown if an Internet Archive video doesn't have a media_location attribute.

How should this be manually tested?

Put this in a course.json file:

{
    "courses": [
      "res-3-003-learn-to-build-your-own-videogame-with-the-unity-game-engine-and-microsoft-kinect-january-iap-2017"
    ]
}

Run node . -i input -o output -c course.json --download Check that there is a content/resources/long-project-1-cats-cradle.md file in the course's output folder.

The only other course that should be affected by this bug is esd-290-special-topics-in-supply-chain-management-spring-2005

codecov-commenter commented 2 years ago

Codecov Report

Merging #501 (a13d557) into master (9b353eb) will not change coverage. The diff coverage is 100.00%.

@@           Coverage Diff           @@
##           master     #501   +/-   ##
=======================================
  Coverage   96.33%   96.33%           
=======================================
  Files          18       18           
  Lines        2130     2130           
=======================================
  Hits         2052     2052           
  Misses         78       78           
Impacted Files Coverage Δ
src/markdown_generators.js 97.22% <100.00%> (ø)

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 9b353eb...a13d557. Read the comment docs.