Skip to main content

Building Your Own DataCamp Course with GitHub

Learn what things can go wrong if you're coding up your own course and your source files can't be understood by the DataCamp parsers.
Mar 2016  · 4 min read

This post builds upon the first post about DataCamp Teach, where you saw how you can create a brand new DataCamp course from scratch. Creating a course on Datacamp is very easy, but things can go wrong if you're coding up your own course and your source files can't be understood by the DataCamp parsers. In that case, the build messages on DataCamp Teach will tell you what's wrong so you can fix things. Let's experiment a bit and see what happens.

As a first example, let's try to add an unsuported exercise type to the DataCamp course. Go to DataCamp Teach and click on the GitHub icon of the course you want to edit.

Next, we want to change the first chapter, so we open the file on GitHub. 

We want to edit this chapter file so we click on the Edit this file icon.

Let's change the exercise type of the first exercise, which used to be a VideoExercise, to UnsupportedExercise. Of course this type of exercise is not supported. Choose an informative commit message, and commit the change to GitHub. 

Now we'll have a look at what happened on DataCamp's side by refreshing the build attempts on the DataCamp Teach page.

Looks like the build has failed. The details show us that parsing has gone wrong in the first exercise of the first chapter. The parser encountered an invalid exercise type. This is exactly what we would expect. Let's fix this little error. Go back to the GitHub page and change the type of the first exercise of chapter 1 back to VideoExercise.

Commit the change and check the build attempt on DataCamp Teach.

Great, the build attempt has succeeded again! Phew, aren't you glad we fixed that problem? Next, we'll have a look at another situation which leads to a failed build attempt.

Let's say we want to work on a new chapter. We go to the GitHub page of the repository and create a new file.

We put in some course information in the correct format and commit the new file with name

If we have a look at the build attempt, we see that DataCamp Teach doesn't accept the repository as a valid course, as the chapters have to be incremental with steps of one.

This build fail can be fixed by going back to the GitHub page, editing and changing its name to

Phew, we have another build that's passed. Let's take a look at the final result on the DataCamp website by clicking on the Course title of the linked repo in DataCamp Teach.

Nice, a second chapter has been added to the course page. This chapter corresponds to the file on GitHub.

In this post we used the GitHub UI to edit an existing course. However, we can use whichever editor we like to edit this course. All we need is the course files to be pushed onto a GitHub repository which is linked to DataCamp.

Happy teaching!

← Back to Blogs