This chapter covers
- Introducing the concept of environments to managed dependencies
- Adding and removing package dependencies using environments
- Developing code in different environments and switching between them
- Creating a Julia package and adding dependencies to it
- Organizing code within a package
- Adding tests to packages
- Exploring the relationship between modules and packages
For large-scale software development you cannot dump code ad hoc into Julia source code files as has been shown in previous chapters. Instead, code must be modularized and organized. Organized code is easier to understand and navigate. In this chapter, you will learn how to take the geometry code you worked on earlier and organize it into a Julia package.
Packages are useful because they give you a way of bundling related code, distributing it, and version controlling it. Packages can depend on other packages in elaborate dependency trees. Real-world systems are built by combining numerous packages into one larger system. If you were working in a large organization on a wide-ranging project, then different teams would likely make different packages, which would then be combined to create the complete system.