Skip to content

Commit 1e7a872

Browse files
authored
ui: update docstrings to explain the deprecation of 'compile_builtins'; update refs (#778)
2 parents d0c3ab1 + 67c227f commit 1e7a872

File tree

1 file changed

+35
-9
lines changed

1 file changed

+35
-9
lines changed

vunit/ui/__init__.py

Lines changed: 35 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -73,11 +73,23 @@ def from_argv(
7373
7474
:example:
7575
76-
.. code-block:: python
76+
.. code-block:: python
77+
78+
from vunit import VUnit
79+
prj = VUnit.from_argv()
80+
81+
.. IMPORTANT::
82+
Option ``compile_builtins`` is deprecated and it will be removed in an upcoming release.
83+
VHDL users will need to call method :meth:`add_vhdl_builtins` explicitly in order to preserve the
84+
functionality.
85+
See :vunit_issue:`777`.
86+
It is therefore recommended to now use the following procedure:
7787
78-
from vunit import VUnit
79-
prj = VUnit.from_argv()
88+
.. code-block:: python
8089
90+
from vunit import VUnit
91+
prj = VUnit.from_argv(compile_builtins=False)
92+
prj.add_vhdl_builtins()
8193
"""
8294
args = VUnitCLI().parse_args(argv=argv)
8395
return cls.from_args(args, compile_builtins=compile_builtins, vhdl_standard=vhdl_standard)
@@ -101,6 +113,11 @@ def from_args(
101113
if None the VUNIT_VHDL_STANDARD environment variable is used
102114
:returns: A :class:`.VUnit` object instance
103115
116+
.. IMPORTANT::
117+
Option ``compile_builtins`` is deprecated and it will be removed in an upcoming release.
118+
VHDL users will need to call method :meth:`add_vhdl_builtins` explicitly in order to preserve the
119+
functionality.
120+
See :vunit_issue:`777`.
104121
"""
105122
return cls(args, compile_builtins=compile_builtins, vhdl_standard=vhdl_standard)
106123

@@ -169,9 +186,7 @@ def test_filter(name, attribute_names):
169186
* Use `from_argv(compile_builtins=False)` or `from_args(compile_builtins=False)`.
170187
* Add an explicit call to 'add_vhdl_builtins'.
171188
172-
Refs:
173-
* http://vunit.github.io/py/vunit.html#vunit.ui.VUnit.from_args
174-
* http://vunit.github.io/py/vunit.html#vunit.ui.VUnit.from_argv
189+
See https://github.com/VUnit/vunit/issues/777.
175190
"""
176191
)
177192
print(hline)
@@ -257,7 +272,7 @@ def add_source_files_from_csv(self, project_csv_path: Union[str, Path], vhdl_sta
257272
csv file
258273
:param vhdl_standard: The VHDL standard used to compile files,
259274
if None, the VUNIT_VHDL_STANDARD environment variable is used
260-
:returns: A list of files (:class `.SourceFileList`) that were added
275+
:returns: A list of files (:class:`.SourceFileList`) that were added
261276
262277
"""
263278
libs: Set[str] = set()
@@ -944,13 +959,18 @@ def _run_test(self, test_cases, report):
944959

945960
def add_verilog_builtins(self):
946961
"""
947-
Add VUnit Verilog builtin libraries
962+
Add VUnit Verilog builtin libraries.
963+
964+
.. IMPORTANT::
965+
Class ``vunit.verilog`` is deprecated and it will be removed in an upcoming release.
966+
Verilog users will need to call this method explicitly in order to preserve the functionality.
967+
See :vunit_issue:`777`.
948968
"""
949969
self._builtins.add_verilog_builtins()
950970

951971
def add_vhdl_builtins(self, external=None):
952972
"""
953-
Add VUnit VHDL builtin libraries
973+
Add VUnit VHDL builtin libraries.
954974
955975
:param external: struct to provide bridges for the external VHDL API.
956976
@@ -962,6 +982,12 @@ def add_vhdl_builtins(self, external=None):
962982
'string': ['path/to/custom/file'],
963983
'integer': ['path/to/custom/file']}
964984
)
985+
986+
.. IMPORTANT::
987+
Option ``compile_builtins`` of methods :meth:`from_argv` and :meth:`from_args` is deprecated and it will be
988+
removed in an upcoming release.
989+
VHDL users will need to call this method explicitly in order to preserve the functionality.
990+
See :vunit_issue:`777`.
965991
"""
966992
self._builtins.add_vhdl_builtins(external=external)
967993

0 commit comments

Comments
 (0)