Free cookie consent management tool by TermsFeed Policy Generator
wiki:Documentation/DevelopmentCenter/DeveloperGuidelines

Version 3 (modified by abeham, 16 years ago) (diff)

corrected bullet item

HeuristicLab 3 Development Guidelines

General

  • any documentation has to be written in English (this includes all documents, wiki-pages, commit messages, code comments, ticket descriptions, etc.)
  • names of plugins, namespaces, classes, structs, enums, methods, properties, variables, etc. are in English
  • C# 3.0 is used as programming language
  • HeuristicLab 3 is based on the Microsoft .NET Framework 3.5 SP1

Software

Runtime Environment

Development Environment

Versioning System

Issue Tracking and Wiki

API Documentation


Coding Conventions

HeuristicLab 3 code has to be conform to the guidelines described in Design Guidelines for Developing Class Libraries.

To ensure consistent formatting of the source code, developers should use identical settings for the Visual Studio Text Editor. The appropriate settings are attached to this page and should be imported in Visual Studio.

Guidelines for Plugin Names

  • the name of a plugin has to be identical to the project name and the namespace of the plugin
  • the name of each HeuristicLab 3 plugin starts with "HeuristicLab."
  • in order to structure plugins hierarchically, sub-namespaces can be used (HeuristicLab.Operators, HeuristicLab.Operators.Programmable, e.g.)
  • each plugin is represented as a component in trac
  • for trac component names the leading "HeuristicLab." is omitted

Versioning System

Source code and other documents are kept in a Subversion repository available at https://sources.heuristiclab.com/hl3/core. Anonymous read-only access is available using the user name and password "anonymous". If you want to contribute to the HeuristicLab project and need write access, please contact stefan.wagner@heuristiclab.com. All HeuristicLab developers have full write access to the whole repository.

For an introduction to Subversion, please take a look at the free book Version Control with Subversion and the Online Dokumentation of the Subversion client TortoiseSVN.

Repository Layout

  • trunk
    • contains the main development branch (trunk)
    • documentation
      • contains all project documentation files (API documentation, license, presentations, etc.)
    • setup
      • contains all files to build the HeuristicLab installation executable
    • sources
      • HeuristicLab.sln
        • main solution file containing all projects
      • PreBuildEvent.cmd
      • project folders
        • each project (plugin) of HeuristicLab has its own folder
        • the folder name has to be identical to the namespace of the project (e.g. HeuristicLab.Data)
  • branches
    • contains a folder for each development branch
    • there are two different kinds of branches:
      • exploration branches
        • are used to explore and carry out major changes that effect large parts of the system
        • each developer is free to create a new exploration branch at any time
        • the name of an exploration branch has to be descriptive
        • the developer who created the branch is responsible for deleting it again after exploration is finished
      • release branches
        • are used to prepare release versions
        • are used to store old versions of plugins
        • the folder name of a release branch has to be identical to the major and minor version number (3.1, 3.2, e.g.) (cf. Versioning?)
  • tags
    • contain a folder for each finally release version (tag)
    • it's not allowed to commit to tags
    • the folder name of a tag has to be identical to the whole version number (e.g. 3.1.0.304) (cf. Versioning?)

Guidelines for Working with the HeuristicLab SVN Repository

  • all projects in the trunk have to be compilable in each revision
  • commit messages
    • each commit has to have a description (commit message)
    • WikiFormatting has to be used to format commit messages
    • each commit message must contain the ticket number of the corresponding trac ticket (e.g. "(#1)")
  • repository content
    • the repository has to contain all files necessary for compiling HeuristicLab
    • automatically generated files are not stored in the repository. This especially includes:
      • object files, assemblies, etc. ()
      • generated files (e.g. AssemblyInfo.cs)
    • files containing user specific settings are not stored in the repository (e.g. *.suo, *.user)
    • the SVN property svn:ignore has to be set to prevent that files are added accidentally. Predefined property values for solution, project, and properties folders are attached to this page and can be imported
  • branches and tags
    • each developer can create a new exploration branch at any time
    • new release branches for a plugin can be crated by the head developer of a plugin only

Versioning

All plugins and all release bundles of HeuristicLab have a version number following the schema Major.Minor.Build.Revision:

  • Major and Minor
    • in order to distinguish from older versions of HeuristicLab (1.1 and 2.0), all plugins of HeuristicLab 3 should have a major version number greater or equal to 3
    • when incrementing the major version number of a plugin, the minor version number has to be set back to 0
    • the major and minor version numbers have to be included in the assembly name of each HeuristicLab assembly (e.g. HeuristicLab.Data-3.2.dll)
    • all major and minor versions of a plugin are kept in order to assure backwards compatibility
  • Build
    • the build number is used to identify different versions within the same major and minor version of a plugin
    • for each new version (major or minor version number increment), the build number has to be set back to 0
    • all builds within the same major and minor version are considered to be "functionally equivalent"
    • all builds within the same major and minor version have to be compatible concerning data files (XML serialization)
  • Revision
    • represents the last revision, in which the component (assembly) has been changed or in which a version has been released
    • when compiling assemblies the revision number is automatically extracted from the Subversion repository (cf. Automatic Extraction of the Current Revision Number?)
    • when creating a new release of the whole system (tag) the revision number has to be set manually

Automatic Extraction of the Current Revision Number

The tool SubWCRev of TortoiseSVN is used to extract the revision number of the last change of a plugin. SubWCRev is executed by the command PreBuildEvent.cmd which has to be set as pre-build event in each project in the following way

 cmd /c ""$(SolutionDir)PreBuildEvent.cmd" "$(ProjectDir).""

SubWCRev replaces the placeholder $WCREV$ in the frame file AssemblyInfo.frame of the project by the corresponding revision number and creates the file AssemblyInfo.cs.


Issue Tracking

The issue tracking system Trac is used for managing the HeuristicLab development process. The HeuristicLab trac environment is available at https://sources.heuristiclab.com/trac/hl3/core. User credentials are identical to those of the Subversion repository. For anonymous access the user and password "anonymous" can be used.

Further information about trac can be found in the Trac User and Administration Guide.

Guidelines for Working with trac

  • all development steps have to be represented by tickets
  • before working on a plugin a ticket has to be created and accepted by the developer
  • each developer is allowed to assign tickets to other developers, if the ticket is in the responsibility of that developer
  • development progress has to be documented by ticket comments. For each commit associated with a ticket, a ticket comment has to be written that contains a link to the revision (e.g. "(r304)") and a short description. In combination with the link to the ticket in the commit message, this results in a bijective association of tickets and revisions.
  • each commit has to be associated with a single ticket
  • explanation of the information stored in each ticket:
    • Status
      • new
        • each new ticket is assigned automatically to the developer of the corresponding component or manually to any other developer
      • assigned
        • tickets that are assigned to another developer get the status assigned
      • accepted
        • tickets that are currently processed by a developer get the status accepted. The ticket status has to be set manually by the developer before starting to work on the ticket. If working on a ticket is suspended for a longer period of time without closing the ticket, the status has to be reset to assigned. In that way it is assured that accepted tickets represent exactly those tickets, on which developers are currently working.
      • closed
        • tickets which are resolved get the status closed. The developer has to provide an explanation for closing the ticket.
        • possible resolutions for closing a ticket are fixed (work done), invalid (ticket ), wontfix (ticket will not be resolved), duplicate (another ticket has already been created for that issue), worksforme (issue could not be reproduced).
        • when closing a ticket with another explanation as fixed, the developer has to provide a comprehensive explanation in form of a ticket comment
      • reopened
        • when a ticket is reopened again, the status is set to reopened. Thereby the responsible developer is removed. The ticket has to be assigned again.
    • Type
      • defect
        • bug in a component
      • enhancement
        • improvement or extension of the existing functionality of a component
      • feature request
        • new component or new functionality of an existing component
      • task
        • other (administrative) tasks which are not associtated with programming directly (e.g. generating documentation, creating release branches, etc.)
    • Priority
      • the following priorities are available to classify tickets: blocker (priority 1), critical (priority2), major (priority3), minor (priority4), trivial (priority5).
      • classification of a ticket's priority has to be done by the user who reported the ticket
    • Milestone
      • a ticket has to be associated with a milestone
      • milestones represent phases of the development of HeuristicLab. Usually a milestone is associated with the version of a HeuristicLab release bundle.
    • Component
      • a ticket has to be associated with a component (a plugin)
      • the name of a component has to be identical to the name of the namespace or the plugin of that component (the leading "HeuristicLab." is omitted)
    • Version
      • each ticket has to be associated with a version number of HeuristicLab
      • usually the version number corresponds to the milestone

Documentation

Wiki

The trac wiki system is used for documenting the development of HeuristicLab. A description of the trac wiki syntax is available at WikiFormatting.

Source Code

Source code is commented using single- or multi-line comments in English.

Additionally, each type (class, enum, struct, etc.) and each public or protected method, property, or variable has to be documented using a C# XML comment. These comments are used to generate the API documentated using the tools Sandcastle and Sandcastle Help File Builder. A description of XML comments and several examples can be found at XML Documentation Comments of the C# Programming Guide.


Attachments (6)

Download all attachments as: .zip