"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "doc/source/design/add-new-sub-command.rst" between
modules-5.1.1.tar.bz2 and modules-5.2.0.tar.bz2

About: The Environment Modules package provides for the dynamic modification of a user’s environment via modulefiles.

add-new-sub-command.rst  (modules-5.1.1.tar.bz2):add-new-sub-command.rst  (modules-5.2.0.tar.bz2)
skipping to change at line 61 skipping to change at line 61
- :file:`init/Makefile` (contains definitions to build *bash* and *tcsh* - :file:`init/Makefile` (contains definitions to build *bash* and *tcsh*
completion scripts completion scripts
- :file:`init/bash_completion.in` - :file:`init/bash_completion.in`
- :file:`init/fish_completion` - :file:`init/fish_completion`
- :file:`init/tcsh_completion.in` - :file:`init/tcsh_completion.in`
- :file:`init/zsh-functions/_module.in` - :file:`init/zsh-functions/_module.in`
Example commit: :ghcommit:`0a96ed64` Example commit: :ghcommit:`0a96ed64`
Linter scripts
--------------
New sub-commands should be described in Nagelfar syntax databases if it can be
called within a modulefile context.
Files that should be edited to add reference to the new sub-command:
- :file:`contrib/nagelfar/syntaxdb_modulefile.tcl`
- add sub-command name in ``::subCmd(module)`` list
- add sub-command argument description in ``::syntax`` array
- add sub-command option description in ``::option`` array
- See `Nagelfar syntax description`_
.. _Nagelfar syntax description: http://nagelfar.sourceforge.net/syntaxtokens.ht
ml
Documentation Documentation
------------- -------------
Man pages and other user documentation have to be updated to describe the Man pages and other user documentation have to be updated to describe the
introduced sub-command. introduced sub-command.
Files that should be edited: Files that should be edited:
- :file:`doc/source/module.rst` (module manpage) - :file:`doc/source/module.rst` (module manpage)
- add sub-command description with ``subcmd`` anchor under *Module - add sub-command description with ``subcmd`` anchor under *Module
Sub-Commands* section Sub-Commands* section
- :file:`doc/source/modulefile.rst` (modulefile manpage) - :file:`doc/source/modulefile.rst` (modulefile manpage)
- mention if sub-command cannot be called from the modulefile evaluation - mention if sub-command can be called from the modulefile evaluation
context under :mfcmd:`module` modulefile command section context under :mfcmd:`module` modulefile command section
- if sub-command leads to modulefile evaluation, mention sub-command name - if sub-command leads to modulefile evaluation, mention sub-command name
in the list of value returned by :mfcmd:`module-info in the list of value returned by :mfcmd:`module-info
command<module-info>` command<module-info>`
- :file:`doc/source/changes.rst` - :file:`doc/source/changes.rst`
- add sub-command under *Module Sub-Commands* section of current Modules - add sub-command under *Module Sub-Commands* section of current Modules
major version major version
Example commits: Example commits:
- sub-command doc: :ghcommit:`b4c0e0f8` - sub-command doc: :ghcommit:`b4c0e0f8`
- new value returned by ``module-info command``: :ghcommit:`5cd53523` - new value returned by ``module-info command``: :ghcommit:`5cd53523`
Testsuite Testsuite
--------- ---------
Non-regression testsuite must be adapted first to add specific tests to check Non-regression testsuite must be adapted first to add specific tests to check
the behavior of the added sub-command and ensure overall code coverage does the behavior of the added sub-command and ensure overall code coverage does
not drop. not drop.
1. Test the sub-command against an invalid number of arguments (too few and #. Test the sub-command against an invalid number of arguments (too few and
too many). too many).
- File to edit: :file:`testsuite/modules.00-init/071-args.exp` - File to edit: :file:`testsuite/modules.00-init/071-args.exp`
- Example commit: :ghcommit:`086ac136` - Example commit: :ghcommit:`086ac136`
2. If the new sub-command cannot be called from a modulefile evaluation, test #. If the new sub-command cannot be called from a modulefile evaluation, test
the error obtained when tried. the error obtained when tried.
- Files to edit: - Files to edit:
- :file:`testsuite/modules.50-cmds/151-module-onlytop.exp` - :file:`testsuite/modules.50-cmds/151-module-onlytop.exp`
- :file:`testsuite/modulefiles.3/modbad/<subcmdname>` - :file:`testsuite/modulefiles.3/modbad/<subcmdname>`
- Example commit: :ghcommit:`086ac136` - Example commit: :ghcommit:`086ac136`
3. If the new sub-command leads to modulefile evaluation, test value returned #. If the new sub-command leads to modulefile evaluation, test value returned
by :mfcmd:`module-info command<module-info>`. by :mfcmd:`module-info command<module-info>`.
- Files to edit: - Files to edit:
- :file:`testsuite/modules.50-cmds/282-info-command.exp` - :file:`testsuite/modules.50-cmds/282-info-command.exp`
- :file:`testsuite/modules.50-cmds/283-info-command-exp.exp` - :file:`testsuite/modules.50-cmds/283-info-command-exp.exp`
- :file:`testsuite/modulefiles/info/commandexp` - :file:`testsuite/modulefiles/info/commandexp`
- Example commit: :ghcommit:`5cd53523` - Example commit: :ghcommit:`5cd53523`
4. Craft specific tests to validate the correct behavior of the sub-command #. Craft specific tests to validate the correct behavior of the sub-command
against valid or invalid values and valid or invalid environment. against valid or invalid values and valid or invalid environment.
- File to edit: new test file to create in - File to edit: new test file to create in
:file:`testsuite/modules.50-cmds` directory, for sub-command called :file:`testsuite/modules.50-cmds` directory, for sub-command called
during a modulefile evaluation, or in :file:`testsuite/modules.70-maint` during a modulefile evaluation, or in :file:`testsuite/modules.70-maint`
directory otherwise. directory otherwise.
- Example commit: :ghcommit:`086ac136` - Example commit: :ghcommit:`086ac136`
.. vim:set tabstop=2 shiftwidth=2 expandtab autoindent:
 End of changes. 11 change blocks. 
18 lines changed or deleted 36 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)