MYI-Tax-Analyzer

Creating a New Model
Login

Creating a New Model

Creating and Developing a New Framework-Derived Model

We explain how to do this in three sections:


Installing the Required Development Environment

Using models built with the Tax-Analyzer-Framework is easy on Linux, Mac, and Windows computers. However, the environment needed to do development work with the Framework is more extensive. In this section, we describe how to install the required development environment on each of those kinds of computers. Do the computer-specific things first, then do the things for all computers.

After doing the above things, you should be able to change into the top-level directory of the MYI-Tax-Analyzer source code directory tree (the one that contains the Makefile) and display the Makefile help by executing this command:
make help
And more importantly, you should be able to pass the code-style tests, the pytest unit tests, and the doctest tests. Confirm that this is the case, by executing the following command in that top-level directory:
make alltests

Using MYI-Tax-Analyzer as Template for the New Model

The Tax-Analyzer-Framework package includes the tacopyfiles tool that can be used to create a new source code tree using the files in the MYI-Tax-Analyzer source code tree as a template. Before using that tool, create a (mostly empty) directory that is named CCK-Tax-Analyzer, where you replace the CC with the two-character country code of the new tax model and you replace the K with a single character identifying the tax kind. So, for example, if you want to develop an individual income tax model for India, you would create a new directory named INI-Tax-Analyzer using a command like this:
mkdir ~/INI-Tax-Analyzer

Then while in the top-level directory of the MYI-Tax-Analyzer directory tree, execute this command:
tacopyfiles NEWDIR
where you replace NEWDIR with the name of the directory you created in the prior paragraph. So, to continue the example of the individual income tax model for India, the command would be:
tacopyfiles ~/INI-Tax-Analyzer

To confirm that the file copy worked, change into the top-level directory of the new model's source code tree and execute this command:
make alltests

You should be able to pass all the tests.

Tips for Developing the New Model

Here are a few suggestions about how to go about developing the new tax model: