The main yaktrack application should search "upward" from its called location until it finds a yaktrack repository. It should then look in the yaktrack-options subdirectory to find files to customize itself.
During creation of the main yaktrack command object, the object factory searches "up" the directory structure for a yaktrack repository. When this is found, the yaktrack-options directory will be parsed to configure the yaktrack command object prior to its execution with the command line arguments
Installed yaktrack program |
Properly located repository or identification of no repository |
Located repository implies configured yaktrack tool |
Very high
Very high; done each command
Table 4-4. Normal course of action
Actor actions | System actions |
Tool is activated | Looks in current directory and parent for yaktrack-repository directory |
Enters yaktrack-repository directory | |
Stores the location of this repository in the top-level command object | |
Enters yaktrack-options subdirectory | |
Configures top-level command object with options in the yaktrack-options subdirectory by importing the configure_base_tool.py file therein and executing the configure_base_tool( tool ) function on the current command object. |
CONFIGURE.FR1. The system should "walk" the directory tree upward to find the first available repository
CONFIGURE.FR2. If no repository is found, the system should note that in the feedback to the user and suggest the create-repository command.
CONFIGURE.FR3. If a repository is found, the system should locate and enter the yaktrack-options subdirectory.
CONFIGURE.FR4. If the yaktrack-options directory is not found, the system should notify the user through feedback.
CONFIGURE.FR5. If the yaktrack-options directory is found, the system should load the configure_base_tool.py file and execute the configure_base_tool function with the current base yaktrack tool as the primary argument
CONFIGURE.FR6. If the yaktrack-options directory is not found or the configure_base_tool.py file is not found or the configure_base_tool function is not present, the system shall notify the user of the specifics of the configuration error. It is not necessary for each repository to have all files, but the user should be notified.