<li>Decide where your new application belongs</li>
<li>Create a directory using the same name as you new application</li>
<li>Create a "main.cpp" file</li>
<li>Create a "yournewapp.cpp" file</li>
<li>Create a "yournew_app.h" file</li>
<li>Create a "yournewapp.xml" file</li>
<li>Create any additional support files (e.g., Supportclass.cpp, Supportclass.h</li>
</ol>
<p>
Populate the new files with the code necessary to implement your feature.
</p>
<p>
You may also want to create a test file for your new application, and one for each supporting class you write.
</p>
<h3>Compile and link your new application for the first time</h3>
<p>
Since you are adding a new application to ISIS you will need to reconfigure your build with cmake. This will add
the new application to the list of applications the build system knows about.
</p>
<ol>
<li>Change your current working directory to the ISIS build directory (cd $ISISROOT)</li>
<li>Remove the CMakeCache.txt file (rm CMakeCache.txt)</li>
<li>Re-run the cmake command (cmake -GNinja ..)</li>
<li>Build the ISIS library and all of the applications (ninja)</li>
</ol>
<h3>Fix, run, hand test, debug the new application</h3>
<p>
Iterate over the following steps until you have your new feature producing the desired result
</p>
<ol>
<li>Fix any compile or linking errors</li>
<li>Rebuild the ISIS library and your new application (ninja)</li>
<li>Run your application and test the user interface</li>
<li>Run your application and test the output</li>
<ol>
<li>Cube DN's - Are they what you expect?</li>
<li>Cube labels - Have they been modified as you intend?</li>
<li>History - Did the application add a cube history entry for every output cube?</li>
<li>Original label - If your application is an import program, did it store the original label in the output cube</li>
<li>print.prt file - Did your application write a log entry to the print.prt file?</li>
<li>Cleanup temporary files - If your application used any temporary files, did it remove them before it exited?</li>
</ol>
</ol>
<h2><aname="Testing for your new application">Testing for your new application</a></h2>
<p>
Applications and complex support classes in ISIS are required to have tests that exercise the majority of the their code.
These test are written using <ahref="https://google.github.io/googletest">googletest</a> (aka, gtest).
The source code for all gtests is located in the "isis/tests" directory.
Create a new test file for your application with the name "FunctionalTestsYournewapp.cpp", and one for each support class with a descriptive name.
Write tests to exercise the application and any support classes. Remember to test only the functionality of your new code
and not the ISIS library. Tests for the ISIS library already exist. See the
<ahref="https://github.com/USGS-Astrogeology/ISIS3/wiki/Writing-ISIS3-Tests-Using-Gtest-and-Ctest">guide for writing</a> tests for detailed instructions.
</p>
<h2><aname="ISIS change log and attributions">Change Log and Attributions</a></h2>
<p>
Now you need to let the ISIS community know about your new application and add your name to the list
of people who have contributed to ISIS over it's lifetime.
</p>
<p>
Edit the "CHANGELOG.md" file, located at the root of your local repository, and add an entry describing your new
application. Read the instructions inside the file carefully.
</p>
<p>
Edit the ".zenodo.json" file, also located at the root or you local repository, and add your information.
</p>
<h2><aname="Submit your new application for review">Submit your new application for review</a></h2>
<p>
Now that you have all the pieces for your new application and it works perfectly. It's time to get it reviewed by
other ISIS developers, so it can be added to ISIS and be distributed with the next public feature release.
</p>
<ol>
<li>Tell git to track your new files (git add new_files)</li>
<li>Commit them to your local repository (git commit -m "brief description")</li>
<li>Push the new application to your GitHub fork (git push origin)</li>
<li>Create a pull request on <ahref="https://github.com/USGS-Astrogeology/ISIS3/compare">GitHub</a></li>
<li>Iterate with the reviewers to fix any issues, resolve and conflicts and explain any questions</li>
<li>Update your pull request with any changes</li>
</ol>
<p>
Once your reviewers are satisfied one of them will merge your new application code with the ISIS dev branch. When
the next public feature release is created, your new application will be available alongside the other ISIS applications.
</p>
</body>
<type>HTML</type>
<source>
<filename>DeveloperAddFeature.html</filename>
</source>
</file>
</files>
<category>
<categoryItem>guide</categoryItem>
</category>
<audience>
<target>developer</target>
</audience>
<bibliography>
<title>Developer </title>
<brief>Adding a new feature to the ISIS software</brief>
<description>
This is a step-by-step guide describing the process for adding a new feature to ISIS.