julia-pkg

Manage Julia packages (add, remove, status, update, test, develop)

Julia Package Management

Manage Julia packages in the current environment.

Arguments

  • action - One of: add, rm, status, update, instantiate, resolve, test, develop, free
  • packages - Package names or paths (required for add/rm/develop/free, optional for update/test)

Instructions

Parse the user's arguments to determine the action and packages:

User InputActionPackages
add JSONaddJSON
add JSON DataFrames CSVaddJSON, DataFrames, CSV
rm OldPackagermOldPackage
statusstatus(none)
updateupdate(none - updates all)
update JSONupdateJSON
instantiateinstantiate(none)
resolveresolve(none)
testtest(none - tests current project)
test MyPackagetestMyPackage
develop ./MyLocalPkgdevelop./MyLocalPkg
free MyPackagefreeMyPackage

Call pkg with the appropriate action and packages parameters.

Notes

  • After adding packages, remind the user to load them with using PackageName
  • The instantiate action installs dependencies from Project.toml/Manifest.toml
  • The test action runs Pkg.test() - can be slow for large test suites
  • The develop action puts a package in development mode (uses local code)
  • The free action exits development mode (returns to registry version)
  • After develop, consider using revise(action="revise") to hot-reload changes