dillyboy
dillyboy

Reputation: 31

How to import/add all packages in a julia project?

When I download a Julia library and try to execute the tests it gives the following message:

Got exception outside of a @test LoadError: ArgumentError: Package OrdinaryDiffEq not found in current path:

- Run import Pkg; Pkg.add("OrdinaryDiffEq") to install the OrdinaryDiffEq package.

After that I run the required commands and the dependency gets installed. Now when I run the tests again it will show the same message just with another dependency. Is there a way to add all of the Packages at once?

Upvotes: 3

Views: 2689

Answers (1)

Antonello
Antonello

Reputation: 6431

You can activate the test folder of that package (using Pkg; Pkg.activate("/that/path) and then run Pkg.instantiate().

This will download and build the pkg that you may missing and make you in the conditions to run the test.

Note: this should work for newer pkgs that use a separate Project.toml file for testing, not sure for old packages that still specify the dependencies used for test as a subsection of the main pkg Project.toml file.

Upvotes: 1

Related Questions