Migrating to Hamilton#
Here are two suggestions for helping you migrate to Hamilton
Continuous Integration for Comparisons#
Create a way to easily & frequently compare results.
Integrate with continuous integration (CI) system if you can.
đđ Having a means that tests code early & often will helps diagnose bugs in your old code (most likely) or your new implementation (less likely).
Specifically, have a system to compare the output of your Hamilton code, to compare to the output of your existing system.
Integrate into your code base via a âcustom wrapper objectâ#
If you have existing systems that you want to integrate Hamilton into, it might require non-trivial effort for you to change those systems to be able to use Hamilton. If thatâs the case, then we suggest creating a âcustom objectâ to âwrapâ Hamilton, so that itâs easier to migrate to it.
Specifically, this custom wrapper object classâs purpose is to match your existing API expectations. It will act as the translation layer from your existing API expectations, to what running Hamilton requires, and back. In Hamilton terminology, this is a Custom Driver Wrapper, since it wraps around the Hamilton Driver class.
This is a best practice because:
When migrating, itâs best to avoid making too many changes. So donât change your API expectations if you can.
It allows you to easily insert Hamilton into any context. Thereby minimizing potential migration problems.