From cadd05374d5c069be7bc27322c6cc6906a4d81e9 Mon Sep 17 00:00:00 2001 From: iamdefinitelyahuman Date: Tue, 7 Apr 2020 14:58:39 +0400 Subject: [PATCH] doc: add api docs and docstrings for install_package --- brownie/project/main.py | 13 +++++++++++++ docs/api-project.rst | 8 ++++++++ 2 files changed, 21 insertions(+) diff --git a/brownie/project/main.py b/brownie/project/main.py index 87ba851c0..05f54ec80 100644 --- a/brownie/project/main.py +++ b/brownie/project/main.py @@ -518,6 +518,19 @@ def _install_dependencies(path: Path) -> None: def install_package(package_id: str) -> str: + """ + Install a package. + + Arguments + --------- + package_id : str + Package ID or ethPM URI. + + Returns + ------- + str + ID of the installed package. + """ if urlparse(package_id).scheme in ("erc1319", "ethpm"): return _install_from_ethpm(package_id) else: diff --git a/docs/api-project.rst b/docs/api-project.rst index 8f3b3f954..2bed2b2ad 100644 --- a/docs/api-project.rst +++ b/docs/api-project.rst @@ -170,6 +170,14 @@ Module Methods >>> container.SimpleTest +.. py:method:: main.install_package(package_id) + + Install a package. + + See the :ref:`Brownie Package Manager ` documentation for more information on packages. + + * ``package_id``: Package identifier or ethPM URI + ``brownie.project.build`` =========================