Skip to content

Commit

Permalink
Added version and documentation to the vunit package. Related to VUni…
Browse files Browse the repository at this point in the history
  • Loading branch information
LarsAsplund committed Jun 12, 2016
1 parent c59c22d commit a68c2a4
Show file tree
Hide file tree
Showing 5 changed files with 97 additions and 7 deletions.
5 changes: 2 additions & 3 deletions LICENSE.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,10 @@ This Source Code Form is subject to the terms of the Mozilla Public
License, v. 2.0. If a copy of the MPL was not distributed with this file,
You can obtain one at http://mozilla.org/MPL/2.0/.

Copyright (c) 2014, Lars Asplund [email protected]
Copyright (c) 2014-2016, Lars Asplund [email protected]

OSSVM under vhdl/osvvm
======================
License according to http://www.perlfoundation.org/artistic_license_2_0

Copyright (c) 2010 - 2014 by SynthWorks Design Inc. All rights reserved.

Copyright (c) 2010 - 2015 by SynthWorks Design Inc. All rights reserved.
7 changes: 4 additions & 3 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
# Copyright (c) 2015-2016, Lars Asplund [email protected]

from setuptools import setup
from vunit.about import version, doc
import os


Expand All @@ -30,7 +31,7 @@ def find_all_files(directory, endings=None):

setup(
name='vunit_hdl',
version='0.66.0',
version=version(),
packages=['vunit',
'vunit.com',
'vunit.test',
Expand All @@ -56,5 +57,5 @@ def find_all_files(directory, endings=None):
'Topic :: Software Development :: Testing'],
author='Lars Asplund',
author_email='[email protected]',
description="VUnit is an open source unit testing framework for VHDL.",
long_description=open('README.rst').read()) # nopep8
description="VUnit is an open source unit testing framework for VHDL/SystemVerilog.",
long_description=doc())
5 changes: 4 additions & 1 deletion vunit/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,10 @@
import vunit.version_check
from vunit.ui import VUnit
from vunit.vunit_cli import VUnitCLI

from vunit.about import version, doc

# Repository root
ROOT = abspath(join(dirname(__file__), ".."))

__version__ = version()
__doc__ = doc() # pylint: disable=redefined-builtin
63 changes: 63 additions & 0 deletions vunit/about.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this file,
# You can obtain one at http://mozilla.org/MPL/2.0/.
#
# Copyright (c) 2016, Lars Asplund [email protected]

"""
Provides documentation and version information
"""


def doc():
"""
Returns short introduction to VUnit
"""
return r"""What is VUnit?
==============
VUnit is an open source unit testing framework for VHDL/SystemVerilog
released under the terms of Mozilla Public License, v. 2.0. It
features the functionality needed to realize continuous and automated
testing of your HDL code. VUnit doesn't replace but rather complements
traditional testing methodologies by supporting a "test early and
often" approach through automation.
**Read more on our** `Website <https://vunit.github.io>`__
License
=======
.. |copy| unicode:: U+000A9 .. COPYRIGHT SIGN
VUnit
-----
VUnit except for OSVVM (see below) is released under the terms of
`Mozilla Public License, v. 2.0`_.
|copy| 2014-2016 Lars Asplund, [email protected].
OSVVM
-----
OSVVM 2015.03 is `redistributed`_ with VUnit for your convenience. Minor
`modifications`_ have been made to enable GHDL support. Derivative work
is also located under `examples/vhdl/osvvm\_integration/src`_. These
files are licensed under the terms of `ARTISTIC License`_.
|copy| 2010 - 2015 by SynthWorks Design Inc. All rights reserved.
.. _Mozilla Public License, v. 2.0: http://mozilla.org/MPL/2.0/
.. _redistributed: https://github.com/VUnit/vunit/blob/master/vunit/vhdl/osvvm
.. _modifications: https://github.com/VUnit/vunit/commit/25fce1b3700e746c3fa23bd7157777dd4f20f0d6
.. _examples/vhdl/osvvm\_integration/src: https://github.com/VUnit/vunit/blob/master/examples/vhdl/osvvm_integration/src
.. _ARTISTIC License: http://www.perlfoundation.org/artistic_license_2_0
"""


def version():
"""
Returns VUnit version
"""
return '0.66.0'
24 changes: 24 additions & 0 deletions vunit/test/lint/test_readme.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this file,
# You can obtain one at http://mozilla.org/MPL/2.0/.
#
# Copyright (c) 2016, Lars Asplund [email protected]

"""
Check that README.rst matches VUnit docstring
"""

import unittest
from os.path import join
from vunit import ROOT
from vunit.about import doc


class TestReadMe(unittest.TestCase):
"""
Check that README.rst matches VUnit docstring
"""

def test_that_readme_file_matches_vunit_docstring(self):
with open(join(ROOT, 'README.rst')) as readme:
self.assertEqual(readme.read(), doc())

0 comments on commit a68c2a4

Please sign in to comment.