Skip to content

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
    • Help
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
otb
otb
  • Project
    • Project
    • Details
    • Activity
    • Releases
    • Cycle Analytics
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
    • Charts
  • Issues 191
    • Issues 191
    • List
    • Board
    • Labels
    • Milestones
  • Merge Requests 14
    • Merge Requests 14
  • CI / CD
    • CI / CD
    • Pipelines
    • Jobs
    • Schedules
    • Charts
  • Registry
    • Registry
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Members
    • Members
  • Collapse sidebar
  • Activity
  • Graph
  • Charts
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
  • Main Repositories
  • otbotb
  • Wiki
  • How to deprecate

How to deprecate

Last edited by Julien Michel Dec 14, 2018
Page history

So you want to deprecate something in OTB? Follow the guide:

A C++ class

In the doxygen documentation of the class, add the \deprecated keyword.

A method of a C++ class or free function

In the doxygen documentation of the method, add the \deprecated keyword.

A part of the Python API

An OTB application

Add the deprecated tag to DoInit() section:

AddDocTag(Tags::Deprecated);

An OTB module

An OTB module can be deprecated thanks to the otb_module macro in the otb-module.cmake. One just need to add the key word DEPRECATED the arguments.
Here is an example of th otb-module.cmake of a deprecated module :

set(DOCUMENTATION "Some documentation")
otb_module(OTBDeprecatedModuleName
  DEPENDS
    OTBSomeDependencies

  TEST_DEPENDS
    OTBTestKernel
    OTBSomeOtherDependenciesForTest
  
  DEPRECATED

  DESCRIPTION
    "${DOCUMENTATION}"
)

One need to make sure that the deprecated module is not a mandatory dependency of any other module. One can still allow the module to be used thanks to the OPTIONAL_DEPENDS key word :

set(DOCUMENTATION "Some documentation")
otb_module(OTBDModuleName
  DEPENDS
    OTBSomeDependencies
  
  OPTIONAL_DEPENDS
    OTBSomeOptionalDependencies
    OTBSomeDeprecatedModule

  TEST_DEPENDS
    OTBTestKernel
    OTBSomeOtherDependenciesForTest

  DESCRIPTION
    "${DOCUMENTATION}"
)

Please make sure that all of the classes, methods and free functions in the module have the ModuleName_DEPRECATED_EXPORT and the Doxygene tag \deprecated.

Clone repository
  • Deprecated Info
  • Help for release actions
  • How to deprecate
  • OTB Users Day 2018
  • PSC meetings
  • Home
More Pages

New Wiki Page

Tip: You can specify the full path for the new file. We will automatically create any missing directories.