December 2018
Beginner to intermediate
500 pages
12h 10m
English
Let's make sure that, after this refactoring, our code still works as expected. Julia comes out of the box with unit-testing capabilities, and we'll look at these in Chapter 11, Creating Julia Packages. For now, we'll do it the old-fashioned way, by manually running the code and inspecting the output.
We'll add a new file inside the sixdegrees/ folder, called six_degrees.jl. Looking at its name, you can guess that it will be a plain Julia file and not a module. We'll use it to orchestrate the loading of our game:
using Pkg
pkg"activate ."
include("Wikipedia.jl")
using .Wikipedia
fetchrandom() |> articlelinks |> display
The code is straightforward and minimalistic—we use Pkg to activate the current project. Then, we include ...
Read now
Unlock full access