illinois-cs241 / coursebook

Open Source Introductory Systems Programming Textbook for the University of Illinois
http://cs241.cs.illinois.edu/coursebook
666 stars 80 forks source link

Fix error in `gen_wiki.py` script #190

Closed ezhang887 closed 2 years ago

ezhang887 commented 2 years ago

When https://github.com/illinois-cs241/coursebook/pull/188 was merged, the wiki build failed with this error:

Traceback (most recent call last):
  File "_scripts/gen_wiki.py", line 283, in <module>
    main(args)
  File "_scripts/gen_wiki.py", line 253, in main
    files_meta = generate_tex_meta(order, outdir, meta_file_name, chapter=args.chapter)
  File "_scripts/gen_wiki.py", line 172, in generate_tex_meta
    metadata = yaml.load(f)
TypeError: load() missing 1 required positional argument: 'Loader'

This PR fixes the above issue. It seems to happen with a newer version of PyYAML. Looking at the logs for the workflows, the previous successful build had an older version of PyYAML.

Also, to catch issues like ^ in the future, I added a new workflow that does a test build of all 3 versions (wiki, pdf, epub) whenever a PR is made into the master branch. It's a copy of the deploy workflow but without the actual deploy step (only the build steps).