Testing
=======

Compile the C modules for the major line (trunk) by typing:

$ scons

and then run the test suite on all possible architectures to make sure the release is ready:

$ relax --test-suite



Tagging
=======

Make a copy of the current head to the tags directory using a command such as:

$ svn cp -F svn_msg svn+ssh://bugman@svn.gna.org/svn/relax/trunk svn+ssh://bugman@svn.gna.org/svn/relax/tags/3.3.2

In the commit message file 'svn_msg', have a header line which says 'relax version 3.3.2.', followed by a short description of the release.  Checkout the tagged version with:

$ svn co svn+ssh://bugman@svn.gna.org/svn/relax/tags/3.3.2



Version number
==============

Change the version number in file 'version.py' and commit the change.



PDF manual
==========

Build the PDF version of the relax user manual, add it to the repository, commit all changes, and clean up the temporary files by typing:

$ scons user_manual_pdf
$ svn add docs/relax.pdf
$ svn ci
$ scons clean

Copy the PDF manual to the mirror directory for the relax download site for uploading in one of the steps below.



CHANGES file
============

Review the SVN logs and add an entry into the CHANGES file (in the 'docs/' directory) for the current release.  Create three sections titled 'Features', 'Changes', and 'Bugfixes'.  The 'devel_scripts/log_converter.py' script can be used to generate the documentation, which will need major editing (the starting revision is from the CHANGES merge of the previous release):

$ svn log -v -r18314:HEAD > log
$ ./devel_scripts/log_converter.py log > log_formatted

The result should be modified and every line checked.  Bugs should be in the 'Bugfixes' section only if it affects previous relax releases, otherwise it should be in the 'Changes' section.  The following should be removed:  minor, insignificant, and unidentifiable changes such as "Import fix." (this is highly subjective); all exclamation marks; message IDs for mailing list posts; svnmerge commits; the messages of all reverted commits; all revision numbers such as 'r19899' or the word 'revision'; the names and email addresses of committers or patch providers; and all email addresses.  Spelling should be checked and proper punctuation used throughout, including two spaces after a period.  Missing spaces after punctuation due to the log_converter.py script need to be corrected.  Commit the changes.

Port the revision back into the main line.



Distribution files
==================

Package bundling
----------------

Bundle minfx and bmrblib by checking out the latest stable release tags, for example:

$ svn co svn+ssh://bugman@svn.gna.org/svn/minfx/tags/1.0.12/minfx
$ svn co svn+ssh://bugman@svn.gna.org/svn/bmrblib/tags/1.0.4/bmrblib


Source files
------------

Generate the source distribution files (and their GPG signatures) by typing:

$ scons source_dist key=xxxxx

where xxxxx is the name of your GPG key.


Binary files
------------

Generate the binary distribution files for each platform (and their GPG signatures) by typing:

$ scons binary_dist key=xxxxx


Signing
-------

If the key is not supplied, or incorrectly supplied, the distribution file will be created but not signed.  To sign the file later, type:

$ gpg --detach-sign --default-key xxxxx relax-3.3.2.GNU-Linux.x86_64.tar.bz2


Other files
-----------

Build other distribution packages by checking out the tag and bundling minfx and bmrblib:

$ svn co svn+ssh://bugman@svn.gna.org/svn/relax/tags/3.3.2
$ cd 3.3.2
$ svn co svn+ssh://bugman@svn.gna.org/svn/minfx/tags/1.0.12/minfx
$ svn co svn+ssh://bugman@svn.gna.org/svn/bmrblib/tags/1.0.4/bmrblib
$ scons binary_dist key=xxxxx

Or:

$ svn co http://svn.gna.org/svn/relax/tags/3.3.2
$ cd 3.3.2
$ svn co http://svn.gna.org/svn/minfx/tags/1.0.12/minfx
$ svn co http://svn.gna.org/svn/bmrblib/tags/1.0.4/bmrblib
$ scons binary_dist



Upload
======

Move the distribution files and their signatures to the mirror directory for the relax download site.  This directory should contain all the files and directories accessible from 'http://download.gna.org/relax/'.  First make sure the mirror directory contains all of the files so that the next command does not accidentally delete files:

$ rsync -av --progress --no-perms --rsh="ssh" bugman@download.gna.org:/upload/relax/ .

Then rsync the entire directory contents to download.gna.org/upload/relax/ using the command:

$ rsync --delete -av --progress --no-perms --partial --rsh="ssh" . bugman@download.gna.org:/upload/relax/

The upload script simplifies the upload process:

$ ./upload



Website
=======

Downloads
---------

Modify the http://www.nmr-relax.com/download.html webpage to point to the newest version of relax.  Update the MD5 checksums and file sizes on the download page.  Commit the updates.


Manual
------

Create the HTML version of the manual with the command:

$ scons user_manual_html

Replace the old manual with the new in the http://www.nmr-relax.com/manual SVN repository (http://svn.gna.org/viewcvs/relax/website) and commit the new manual.


API documentation
-----------------

Firstly make sure that epydoc has been updated with the docs/devel/epydoc_graphvis_fix.patch changes, to allow for newer Graphvis versions to correctly create graphs.  Then create the API documentation for the current version with the command:

$ scons api_manual_html

Replace the old API documentation in the http://www.nmr-relax.com/api SVN repository (http://svn.gna.org/viewcvs/relax/website), update the api/index.html file and commit the new files.  If a new minor version is being released, create a new directory such as api/3.1/, copy the files there, and then edit the api/index.html file to add the new version.



Gna!
====

Add the version number to the bug tracker field 'Release' at https://gna.org/bugs/admin/field_values.php?group=relax.



FSF directory
=============

Update the version number in the FSF directory (http://directory.fsf.org/wiki/Relax).



Announcement
============

Compose and edit the message on the relax wiki, then post the release message to the relax-announce mailing list and as a news item on the relax Gna! website.


Wiki
----

Create a new release page at the URL http://wiki.nmr-relax.com/Relax_x.y.z.  Use, for example, http://wiki.nmr-relax.com/Relax_4.0.1 as a guide.  The basic page structure is as follows:

    {{lowercase title}} - Start with this to allow the title to be in lowercase.  The URL on a wiki always starts with a capital, but the title can be changed to lowercase in this way.
    = Description = - Create this section by writing a detailed and full description of the release.  Add internal wiki links and external links, for example to the relax manual web pages for the user functions.
    = Download = - Create this section with links for downloading the release (simply copy the text from an older release).
    = CHANGES file = - Create this section by cutting and pasting the part of the CHANGES file for this release.  Convert the Features, Changes, and Bugfixes titles to the subsection format == Features ==, == Changes ==, and == Bugfixes ==.  Strip all leading whitespace from the full list of changes so that the wiki can format the text.
    = Links = - Links to the other release announcements.
    = Announcements = - A transcluded section using {{:relax release announcements}}.
    = See also = - Finally create this section which simply contains the text [[Category:Release_Notes]].

For the changes file text, make the following conversions:

    - For all bugs, support requests, and tasks, make links to the trackers including the full description in the link.  (for vim, go to the start of the text and use the register: "3dwr[/)^Mi ^[pxr]").
    - Make links to the relax manual for all user functions:
        - Vim register:  "v/[ ,\r\n]^M<80>kl<80>kDi[http://www.nmr-relax.com/manual/^[pa.html ^[pa]^[/user function^M",
        - Vim register:  "v/[ ,\r\n]^M<80>kl<80>kDi[http://www.nmr-relax.com/manual/^[pa.html ^[p/user function^M2cwuser function]^[",
        - Then search for "www.nmr-relax.com\/manual\/[a-z0-9_]*\.\|html" and replace all '.'.
    - Make internal links for all relax versions (vi search for "[1-3]\.[0-9]*\.[0-9]*").
    - Convert all symbols to use wiki formatting.
    - Convert all model parameters to use the {{:xyz}} parameter template infrastructure.
    - Convert all model names to internal wiki links (vi search "\<m[0-9]\>\|\<tm[0-9]\>\|No Rex\|R2eff\|LM63\|LM63 3-site\|CR72\|CR72 full\|IT99\|TSMFK01\|B14\|B14 full\|NS CPMG\|MMQ CR72\|NS MMQ\|M61\|DPL94\|TP02\|TAP03\|MP05\|NS R1rho\|BK13").
    - Add as many links as possible to the API documentation (to help users dive into the relax code and to help with search engine indexing).  Mediawiki syntax highlighting is a significant aid (see https://en.wikipedia.org/wiki/Wikipedia:Text_editor_support#Vim).
    - Add <code> tags for better formatting of certain elements (file and directory names, code elements, console output, GUI element, etc).
    - To avoid dead links, perform a final proof that all the links in the wiki article are correct by following the links.

Also:

    - Update all of the release note links for the new version (http://wiki.nmr-relax.com/Category:Release_Notes).
    - Update the version number at http://wiki.nmr-relax.com/Template:Current_version_relax.


Mailing list
------------

On the relax-announce mailing list (relax-announce att gna.org), write the release announcement by:

    - Copy the 'Description' and 'Download' text from the wiki.  Do not include the section titles and remove any wiki markup.
    - Add a paragraph before the 'Download' paragraph with the text 'For the official, easy to navigate release notes, please see http://wiki.nmr-relax.com/Relax_4.0.1 .'.  This is to direct both users and search engines to the wiki page (the users via the release email and the search engines via the multiple archives).
    - At the end, add a section titled 'The full list of changes is:' and cut and paste the part of the CHANGES file for this release.  Do not use the wiki text for this.
    - Include links to the trackers in the full list of changes, if not already present.


Gna! news item
--------------

The steps are:

    - Log into Gna! and go to https://gna.org/news/submit.php?group=relax.
    - Cut and paste all of the wiki text.  Delete the initial lower case title formatting text and infobox, the final 'Links', 'Announcements' and 'See also' sections, and any wiki markup.
    - Add a paragraph before the 'Download' paragraph with the text 'For the official, easy to navigate release notes, please see http://wiki.nmr-relax.com/Relax_4.0.1.'.
    - Use the Savane markup to format the text (recipe #236, https://gna.org/cookbook/?func=detailitem&item_id=236).
    - As the Savane markup for sectioning is the same as the wiki, the section titles == Description ==, == Download == and == Full list of changes == do not need to be modified (except changing the text 'CHANGES file' to 'Full list of changes' and deleting the metadata).  The same for the subtitles === Features ===, === Changes === and === Bugfixes ===.
    - Convert internal [[xyz]] wiki links into proper [http://wiki.nmr-relax.com/xyz xyz] links.
    - Item references such as bug #7641, task #3122, etc. are automatically converted into links.  Savane will replace the links as formatted for the wiki to these links, so nothing needs to be done.
    - Remove all symbol formatting ('&', ';', '<sub>', '<sup>', etc.).
    - Remove all {{:xyz}} parameter templates.
    - Replace all <code> tags with quotation marks.


Softpedia
---------

Inform Softpedia of the new release.  Use text such at "I would like to inform you of a new relax version announced at http://wiki.nmr-relax.com/Relax_4.0.1.".


Cross-linking
-------------

For better indexing by search engines, cross-link all the release announcements both on the Wiki and the Gna! news item.  It may take a few days for all the links to be created.  For example for relax 3.1.7:

"""
For reference, the announcement for this release can also be found at following links:

* [http://wiki.nmr-relax.com/Relax_3.1.7 Official release notes on the relax wiki].
* [https://gna.org/forum/forum.php?forum_id=2448 Gna! news item].
* [http://article.gmane.org/gmane.science.nmr.relax.announce/53 Gmane mailing list archive].
* [http://www.mail-archive.com/relax-announce%40gna.org/msg00047.html The Mail Archive].
* [https://mail.gna.org/public/relax-announce/2014-03/msg00001.html Local archives].
* [http://marc.info/?l=relax-announce&m=139509874209089&w=2 Mailing list ARChives (MARC)].

Softpedia also has information about the newest relax releases:

* [http://linux.softpedia.com/get/Science/relax-22351.shtml Softpedia page for relax on GNU/Linux].
* [http://www.softpedia.com/get/Science-CAD/relax-project.shtml Softpedia page for relax on MS Windows].
* [http://mac.softpedia.com/get/Math-Scientific/Edward-relax.shtml Softpedia page for relax on Mac OS X].
"""

Not all of these links may work, as the email archives are not 100% perfect.  For the wiki, transclude the softpedia page http://wiki.nmr-relax.com/Softpedia using {{:Softpedia}}, and add a section to the table at http://wiki.nmr-relax.com/Category:Release_Notes for the release.  For the news item, reply to the item with the subject "Links to the other release announcements.".
