user_guide:extend:extensions

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
Next revisionBoth sides next revision
reference:extensions [2013/06/11 22:26] – [Configuring an extension] gawrilowuser_guide:extend:extensions [2019/02/28 11:03] – [What is an extension] panizzut
Line 7: Line 7:
   * C++ clients and class libraries   * C++ clients and class libraries
  
-//**Note**//\\ Extension management has been completely reworked prior to polymake snapshot version 2.12.4.  All commands and procedures depicted below are only applicable to this snapshot or later releases.  Please refer to the older version of this page for description pertaining to polymake 2.12 or earlier. 
  
 ===== Starting an own extension ===== ===== Starting an own extension =====
  
-  - Choose a location on your computer (or a network share) where you have write permissions; let's name it ''my_ext'' in the examples below.\\ If you are working with an SVN working copy of polymake, please make sure that your new directory is **outside** the source tree.+  - Choose a location on your computer (or a network share) where you have write permissions; let's name it ''my_ext'' in the examples below.\\ If you are working with a git working copy of polymake, please make sure that your new directory is **outside** the source tree.
   - In an interactive polymake session, execute the commands:\\ ''%%found_extension "~/my_ext";%%''\\ ''%%extend_application "~/my_ext", "APP_NAME";%%''\\ where //APP_NAME// is the name of an existing application you are going to enhance.   - In an interactive polymake session, execute the commands:\\ ''%%found_extension "~/my_ext";%%''\\ ''%%extend_application "~/my_ext", "APP_NAME";%%''\\ where //APP_NAME// is the name of an existing application you are going to enhance.
  
Line 81: Line 80:
  
 In the case of a large team working together on an extension individual contributions may still be distinguished by usual  In the case of a large team working together on an extension individual contributions may still be distinguished by usual 
-[[reference:rulefiles#credits_and_help|credit notes]] embedded in the rulefiles; then the credit note of the entire extension will be assigned by default to all rules and functions lacking individual credit notes.+[[user_guide:extend:rulefiles#credits_and_help|credit notes]] embedded in the rulefiles; then the credit note of the entire extension will be assigned by default to all rules and functions lacking individual credit notes.
  
 ===== Managing changes in data model ===== ===== Managing changes in data model =====
Line 113: Line 112:
 When polymake loads a very old data file lying behind several version bumps, all transformations between its version and the current version are applied in the proper (ascending) order; thus each transformation stylesheet should only contain converting operations specific for a single version bump. When polymake loads a very old data file lying behind several version bumps, all transformations between its version and the current version are applied in the proper (ascending) order; thus each transformation stylesheet should only contain converting operations specific for a single version bump.
  
 +===== Writing testcases ====
 +
 +It is always a good idea - especially if your extension is large - to write unit tests for your code. Those are essentially small examples which test individual rules and functions. One advantage of this is that you will quickly notice if a change in your code (or in a new polymake release) breaks something in your extension. Polymake offers a convenient set of tools for this, you can find a full description [[dev_corner:testcases|here]].
 ===== Using other people's extensions ===== ===== Using other people's extensions =====
  
Line 125: Line 127:
 ===== Relations between extensions ===== ===== Relations between extensions =====
  
-Extensions may build upon each other, establishing dependence relations similar to software packages installed on your computer.  The relations between extensions are described in dedicated sections of description files ''polymake.ext'' Every section contains one or more URIs of related extensions, separated with white spaces or distributed over several lines.  An empty line marks the end of a section, similar to [[reference:rulefiles]].+Extensions may build upon each other, establishing dependence relations similar to software packages installed on your computer.  The relations between extensions are described in dedicated sections of description files ''polymake.ext'' Every section contains one or more URIs of related extensions, separated with white spaces or distributed over several lines.  An empty line marks the end of a section, similar to [[user_guide:extend:rulefiles]].
  
   ? ''REQUIRE'' URI URI#version ...   ? ''REQUIRE'' URI URI#version ...
Line 144: Line 146:
 ===== Getting rid of an extension ===== ===== Getting rid of an extension =====
  
-One nice day you might suddenly want to get rid of an extension.  The reason may be that you aren't interested in it any more, or that its functionality has silently moved into the standard distribution or another extension.  The most comfortable way is to use the command ''obliterare_extension'' .  It deletes all traces of the extension in your polymake settings.  Be aware, however, that in the current interactive session you still have the pieces from the discarded extension loaded and ready-to-use.  Thus, to avoid confusion, you should quit the session as soon as possible after using this command.  Note also that you can't obliterate an extension as long as other registered extensions depend on it as a prerequisite.+One nice day you might suddenly want to get rid of an extension.  The reason may be that you aren't interested in it any more, or that its functionality has silently moved into the standard distribution or another extension.  The most comfortable way is to use the command ''obliterate_extension'' .  It deletes all traces of the extension in your polymake settings.  Be aware, however, that in the current interactive session you still have the pieces from the discarded extension loaded and ready-to-use.  Thus, to avoid confusion, you should quit the session as soon as possible after using this command.  Note also that you can't obliterate an extension as long as other registered extensions depend on it as a prerequisite.
  
-If you later try to load a data file referring to the URI of the obliterated extension, polymake will ask you, as usual, to enter its installation directory.  If you are sure that in the meanwhile all the stuff has migrated into the standard distribution and/or other (already loaded) extensions, you should response with the magic word ''ignore'' .+If you later try to load a data file referring to the URI of the obliterated extension, polymake will ask you, as usual, to enter its installation directory.  If you are sure that in the meanwhile all the stuff has migrated into the standard distribution and/or other (already loaded) extensions, you should respond with the magic word ''ignore'' .
  • user_guide/extend/extensions.txt
  • Last modified: 2021/01/12 15:38
  • by 127.0.0.1