OITools Documentation

Class diagram

class diagram

DataModel documentation

  • DataModel is a class which is intended to generate a number of reference files: DataModels version 1 & version 2, and Failures.

  • DataModel: is two files, one by version of the standard, which regroup all informations on Rules. In a first time, we have the list of Rules: their description, location in the standard, version of the standard and we can show their applyTo (the table / keyword / column, where this rule applies). In a second time, we have the list of Tables: their keywords and columns related and each Rules on these Tables.

  • Failures: is a file, which regroup all informations on Failures. It is a collection of all the errors that can happen on the Tables as well as their keywords and their columns.

Junit Tests

  • TODO: Test update ? (History order) / (Hierarch) *see strict compare Nom.tam.fits

Tests documentation

  • Creation of the first test files DumpOIFitsTest and LoadOIFitsTest. These are test files for checking the OIFitsLoader:
    • DumpOIFitsTest displays file information and loads the contents file in the oifits folder and saves all information that we think is important to OIFits files (keywords, columns, values, ...) in a .properties file. This information is stored in a reference folder (which is supposed to not be modified).
    • LoadOIFitsTest loads the .properties information and compares it with our files in the oifits folder.
  • So we can see if changes in our code could alter the recovery of information from files.

  • Added about thirty OIFits files to the oifits folder to test.
    • They were chosen for their differences (Nwave = 1, Multi Table, Various instruments, file version 2, image ...) with a small search algorithm: FindFilesTool.

  • Creation of the files for the mutualization of the test code: JUnitBaseTest and AbstractFileBaseTest (child class)
    • JUnitBaseTest is the class that manages the recovery of files and folders as well as the paths of these.
    • AbstractFileBaseTest is the abstract class that handles the common code between Dump & Load OIFitsTest.

  • Creation of two classes DumpFitsTest and LoadFitsTest, which are the addition to DumpOIFitsTest and LoadOIFitsTest for image management.

  • Creation of WriteOIFitsTest and its counterpart for images WriteFitsTest. This test loads the OIFits files and creates a copy, and then compares the copy to the file that is loader again. This test permits to test the rewrite of the files, since the files are load a number of small fixes and improvements are made.

  • Creation of two classes CreateOIFileV1Test and CreateOIFileV2Test. These two classes of tests make it possible to create a complete file in version 1 or version 2. The two OIFits files created are very good bases for the other tests. They allow to test the writing of an OIFits file

  • Creation of OIFitsViewerTest test to export csv, xml (OIDB).

  • Creation of FormatTest, this is a small test that checks the validity range of the dates of an OIFits file.

  • Creation of FitsValidatorTest, this is the test of validation of OIFits files. It is being rewritten.

  • Creation of DumpDataModelTest, it's just a call to the hand of DataModel to create it at the same time as the launch of the tests and also performs a better code coverage.

  • Creation of MoreCoverageTest, it's just a call to functions that were not covered by other tests in order to have better code coverage and prevent regression.

-- CharleenKemps - 20 Oct 2017

Edit | Attach | Watch | Print version | History: r11 | r8 < r7 < r6 < r5 | Backlinks | Raw View | Raw edit | More topic actions...
Topic revision: r6 - 2018-02-05 - CharleenKemps
 
  • Edit
  • Attach
This site is powered by the TWiki collaboration platform Powered by PerlCopyright © 2008-2024 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback