I have read several posts on the topic of writing packages in Mathematica and noted that many people struggle a bit with the concept. I can recommend the excellent tutorial on the subject posted some time ago. There are however some issues I have found cumbersome when developing Mathematica packages.
When you code the functionality the first time starting from scratch and working with functions declared in a
Global context, most things are straight forward and intuitive. But once a package has been deployed and needs to be loaded, things become more complicated. Every time the package needs to be updated or extended, you will have to make the necessary changes to your local package
"Package.m" residing in your development directory. To test out your changes, you need to copy your updated file
"Package.m" replacing the old
"Package.m" file, install the updated version of the package using
Get[Pakage] and test it. With frequent changes and updates, this becomes time consuming and prone to errors. It is also difficult to keep track of frequent changes, and you become in doubt of which version of the package you have loaded and are testing out.
PackageDeployment.m encapsulates the tedious steps of deploying the package and ensuring that the version you are currently working on in your local development directory is the one that is loaded into Mathematica. I have included a simple functionality for keeping track of the version history of the package which also helps you to ensure that you are working with the latest version. The package also provides a template for creating a new notebook for developing packages and a template for a creating a package test notebook.
I have attached the package and a short user documentation to this posting. I hope some of you can find this useful, at least I have.