Skip to content

Commit

Permalink
Updated doc for release 24.0.0
Browse files Browse the repository at this point in the history
Signed-off-by: Andreas Florath <[email protected]>
  • Loading branch information
florath committed Apr 22, 2017
1 parent d87d1e3 commit b1bde73
Show file tree
Hide file tree
Showing 9 changed files with 115 additions and 179 deletions.
48 changes: 0 additions & 48 deletions Readme-Hacking.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,32 +9,6 @@ This file is not completed now - any might be in future.
There are some mandatory tools to do development for rmtoo:
Debian 6: $ apt-get install make graphviz texlive-latex-extra

** Eclipse
For development of the source code, eclipse is used.
This has some advantages about the emacs / vi approach - especially
automated style and lint checking.

*** OpenJDK
Install the openjdk to use for eclipse - only JRE is needed.
Debian 6: $ apt-get install openjdk-6-jre

*** Eclipse
Goto http://www.eclipse.org/ and install latest version.
Be sure to use the non Java, non C++ version.

*** PyDev
Goto http://pydev.org and install the latest version.

*** PyLint
Install pylint
Debian 6: $ apt-get install pylint
In Eclipse goto: Preferences -> PyDev -> PyLint and enable pylint.

*** PyUnit
In Eclipse goto: Preferences -> PyUnit and choose Nose Test runner.



* Testing

** Comparing XML
Expand All @@ -61,28 +35,6 @@ This file is not completed now - any might be in future.
It is defined that not only the (sub-) nodes should be equal but
also the order in which they appear.

*** External Libraries
For some outputs external libraries are used.

**** odfpy-svn20100810
This is the currently used version. This is the latest known
working version which works with OpenOffice using the automatic
generated odf documents.
The problem with this library is, that the order of (sub-)nodes
is arbitrary and even some (intermediate) nodes can be named
different when using another computer.
Therefore it is mostly not possible to do a simple xml comparison
to check if documents are equal.

**** odfpy-0.9.3
This version does not support creating ODF files which are
generated by OpenOffice 3.2 (which is somewhat strange).

*** Current 'solution'
Because of the problems comparing automated created XML documents,
the check is only done for the directly generated files.


* Forks

There are a couple of forks done during the last years; have a look
Expand Down
62 changes: 22 additions & 40 deletions Readme.rst
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ Dependencies
To use rmtoo, other software packages must be installed.

rmtoo is written in python. At least version 2.7 of python is needed.
(Starting with version 24 python 3 will be supported.)
Starting with version 24 python >3.4 is also supported.

When you want to create LaTeX or PDF documentation, LaTeX is needed.

Expand All @@ -101,11 +101,7 @@ First Project
The recommended way of starting is to copy the provided template
project.

Using the provided template projects depends whether you use the deb
package or the tar package. Please consult the appropriate sections
how to use the template project.

Nevertheless the basic steps are:
The basic steps are:

1) Copy over the template project to some other directory.
2) Set up the environment
Expand All @@ -117,8 +113,8 @@ Note that during this document the project will be called
'MyNewProject'. Please adapt the name for your needs.


Using virtualenv
================
Installation using virtualenv / pip
===================================

This is the preferred installation method - it takes care that
at least the python dependencies are correctly installed.
Expand All @@ -137,52 +133,40 @@ To install ``rmtoo`` in a virtualenv, execute the following steps:
$ pip install --upgrade pip setuptools wheel
$ pip install --only-binary=numpy,scipy numpy scipy
$ pip install rmtoo
$ export RMTOO_CONTRIB=${PWD}/venv/rmtoo/contrib
Please see the section 'First Project' how to use the template
project.
This has only to be done once.


Using tar package
=================
First Project
=============

Installation
------------

Just untar the downloaded package. You need not to be root to do
this.
Change to the directory where you want to install rmtoo to.
To refer to the current directory, it is called RMTOO_BASE_PATH.
Change to a directory where you want to create the new project. This
is needed only once.

.. code:: bash
$ export RMTOO_BASE_PATH=$PWD
$ export RMTOO_PATH=${RMTOO_BASE_PATH}/rmtoo-YY
$ export RMTOO_CONTRIB=${RMTOO_PATH}/contrib
$ tar -xf rmtoo-YY.tar.gz
To use rmtoo, you have to include
``${RMTOO_PATH}/bin`` to your path, include
``${RMTOO_PATH}`` to your ``PYTHONPATH``.
When you use the template project (see section 'First Project' some
lines below), the shell script ``setenv.sh`` is doing this for you.
# cd to virtualenv directory - if not already there
$ cd RMTOO
$ cp -r venv/rmtoo/contrib/template_project MyNewProject
First Project
=============
Usage
-----

Change to a directory where you want to create the new project. In
the following code, please replace ``${RMTOO_PATH}`` with ``VENV`` if
you are using virtualenv.
To create all the artifacts for the template project, execute

.. code:: bash
$ cp -r ${RMTOO_CONTRIB}/template_project MyNewProject
$ cd MyNewProject
$ source ./setenv.sh ${RMTOO_PATH}
$ source ./setenv.sh VENV
$ make
$ ls artifacts
In the artifacts directory there are all the generated files.
A typical workflow is, to change or add requirements, topics or the
configuration in the ``MyNewProject`` directory, run ``make`` again
and check the artifacts.

Man Pages
=========
Expand Down Expand Up @@ -212,9 +196,7 @@ Additional Documentation
------------------------

Additional documentation can be found in the directories
``${RMTOO_PATH}/rmtoo-YY`` (especially the Readme files)
``${RMTOO_PATH}/rmtoo-YY/doc/other``. When using ``VENV`` the
documentation is stored in ``venv/rmtoo/doc``.
``RMTOO/venv/rmtoo/doc`` (especially the Readme files).

Other Documentation
===================
Expand Down Expand Up @@ -262,8 +244,8 @@ Emacs Mode for Editing Requirements

When using the tar package, emacs mode can be loaded in emacs by:
``M-x load-file``
point to ``${RMTOO_BASE_PATH}/rmtoo-YY/contrib/req-mode.el``
All files with suffix .req will now use the requirements editing
point to ``RMTOO/venv/rmtoo/contrib/req-mode.el``
All files with suffix ``.req`` will now use the requirements editing
mode.

Footer
Expand Down
37 changes: 37 additions & 0 deletions doc/release_notes/24.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
IMPORTANT
=========

CONFIGURATION IS UNDERGOING A MAJOR RESTRUCTURING.
THE CURRENT VERSIONS (V22-V24) WILL (ONLY) BE ONE STEP IN THE
DIRECTION THE CONFIGURATION WILL CHANGE TO.
BECAUSE THE STRUCTURE CHANGED, THERE IS NO AUTOMATIC UPDATE
POSSIBLE.
IF YOU HAVE A RUNNING INSTALLED rmtoo THERE IS NO NEED TO UPDATE
DIRECTLY (IF YOU DO NOT NEED ANY OF THE NEW FEATURES).
IF YOU WANT TO USE THE NEW FEATURES, PLEASE FIRST READ THE
DOCUMENTATION (rmtoo-config3(5)). IF YOU HAVE PROBLEMS WITH THIS
FEEL FREE TO CONTACT OUR SUPPORT AT [email protected]


24.0.0
======

User visible changes
--------------------

* Support for python3.
* Support for virtualenv.
* Support for installation with pip (pypi).
* Removed dependency to legacy included versions of other projects
(async, git, gitdb, odfpy).
* Complete support for UTF-8.


Internal Changes
----------------

* Started pep8 cleanup: many small syntax changes.
* Introduced tox, clean up setup.py, introduced requirements.txt.
* Many, many code cleanups.
* CI / quality checks added: codecov.io, sonarqube.com, covertity,
codeclimate.com
32 changes: 0 additions & 32 deletions doc/release_notes/24.txt

This file was deleted.

26 changes: 9 additions & 17 deletions rmtoo/__init__.py
Original file line number Diff line number Diff line change
@@ -1,19 +1,11 @@
#
# rmtoo __init__.py
#
# (c) 2010,2017 by flonatel ([email protected])
#
# For licensing details see COPYING
#
'''
rmtoo
Free and Open Source Requirements Management Tool
__package__ = "rmtoo"
__all__ = ["modules", "lib", "tests", "outputs"]
Master __init__.py
#
# Add shared library path to sys.path
#
import os
import sys
sys.path.append(os.path.join(os.path.split(__file__)[0], sys.platform))
del os
del sys
(c) 2011,2017 by flonatel GmbH & Co. KG
For licensing details see COPYING
'''
__all__ = ["inputs", "lib", "tests", "outputs"]
56 changes: 30 additions & 26 deletions rmtoo/lib/RequirementSet.py
Original file line number Diff line number Diff line change
Expand Up @@ -616,35 +616,39 @@ def get_testcases(self):
# Note: the following methods are of no use any more,
# because the 'Solved by' will be gone in near future.

def __normalize_dependencies_one_req(self, req):
# Remove the old 'Depends on'
req.record.remove("Depends on")

# Create the list of dependencies
onodes = []
for n in req.outgoing:
onodes.append(n.name)

# If the onodes is empty: There must no old 'Solved by'
# tag available - if so something completey strange has
# happens and it is better to stop directly.
if len(onodes) == 0:
assert not req.record.is_tag_available("Solved by")
# Looks that everything is ok: continue
return

onodes.sort()
on = " ".join(onodes)

# Check if there is already a 'Solved by'
try:
req.record.set_content("Solved by", on)
except ValueError:
req.record.append(RecordEntry(
u"Solved by", on,
u"Added by rmtoo-normalize-dependencies"))
return

def normalize_dependencies(self):
'''Normalize the dependencies to 'Depends on'.'''
for r in itervalues(self.__requirements):
# Remove the old 'Depends on'
r.record.remove("Depends on")

# Create the list of dependencies
onodes = []
for n in r.outgoing:
onodes.append(n.name)

# If the onodes is empty: There must no old 'Solved by'
# tag available - if so something completey strange has
# happens and it is better to stop directly.
if len(onodes) == 0:
assert(not r.record.is_tag_available("Solved by"))
# Looks that everything is ok: continue
continue

onodes.sort()
on = " ".join(onodes)

# Check if there is already a 'Solved by'
try:
r.record.set_content("Solved by", on)
except ValueError:
r.record.append(RecordEntry(
u"Solved by", on,
u"Added by rmtoo-normalize-dependencies"))
self.__normalize_dependencies_one_req(r)
return True

def write_to_filesystem(self, directory):
Expand Down
4 changes: 2 additions & 2 deletions rmtoo/tests/RMTTest-Blackbox/RMTTest-BB001/RMTTest-BB001.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@
For licensing details see COPYING
'''

import os
import time
import unittest

from rmtoo.lib.RmtooMain import main_impl
from rmtoo.tests.lib.BBHelper import prepare_result_is_dir, \
Expand All @@ -21,7 +21,7 @@
mdir = "tests/RMTTest-Blackbox/RMTTest-BB001"


class RMTTestBB001:
class RMTTestBB001(unittest.TestCase):

def rmttest_pos_001(self):
"BB Basic with one requirement - reqs only from git"
Expand Down
Loading

0 comments on commit b1bde73

Please sign in to comment.