yangdoc


Nameyangdoc JSON
Version 0.4.0 PyPI version JSON
download
home_pageNone
SummaryA project for generating YANG tree views.
upload_time2024-06-27 09:52:03
maintainerNone
docs_urlNone
authorJoachim Wiberg
requires_python>=3.8
licenseMIT License Copyright (c) 2024 Joachim Wiberg <troglobit@gmail.com> Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
keywords yang tree libyang html jstree
VCS
bugtrack_url
requirements cffi libyang pycparser
Travis-CI No Travis.
coveralls test coverage No coveralls.
            YANG Documentation Viewer
=========================

Very limited YANG Documentation generator based on libyang, with similar
output to that of `pyang -f jstree`.  The default output is a standalone
HTML file, called `yangdoc.html`, that can be included in documentation
bundles.


Usage
-----

See below [setup instructions](#setup) first.

```
~/src/yangdoc(main)$ python main.py -p yang -m ietf-system -e authentication -e local-users -e ntp -e ntp-udp-port -e timezone-name -m ietf-interfaces -e if-mib
INFO: Parsing ietf-system, enabling features: ['authentication', 'local-users', 'ntp', 'ntp-udp-port', 'timezone-name']
WARNING: Warning: failed to parse module: Data model "ietf-netconf-acm" not found in local searchdirs.: Loading "ietf-netconf-acm" module failed.: Parsing module "ietf-system" failed.
INFO: Parsing ietf-interfaces, enabling features: ['if-mib']
INFO: Processing module ietf-interfaces
INFO: HTML file generated: yangdoc.html
x-www-browser yang_tree_view.html
~/src/yangdoc(main)$ x-www-browser yang_tree_view.html
```


Screenshot
----------

![](screenshot.png)


Setup
-----

> These instructions have been tested on Linux Mint 21.3, but
> are mostly the same for other operating systems.

Clone the repository to your home directory:

```
~$ cd src/
~/src$ git clone https://github.com/troglobit/yangdoc
~/src$ cd yangdoc
~/src/yangdoc(main)$
```

Set up your virtual environment, this ensures all python packages
installed from `requirements.txt` are installed only in `.venv/`:

```
~/src/yangdoc(main)$ python -m venv .venv
~/src/yangdoc(main)$ source .venv/bin/activate
```

Install all required packages:

```
~/src/yangdoc(main)$ sudo apt install libyang2
~/src/yangdoc(main)$ pip install -r requirements.txt
```


Developer Notes
---------------

Use `pip-compile` from pip-tools to [manage Python requirements][4],
this makes life a lot easier since we only need pyproject.toml for all
our packaging needs.

To install locally, or just build, verifying pyproject.toml:

```
~/src/yangdoc(main)$ pip install -e .
~/src/yangdoc(main)$ python -m build
```

For uploading to PyPi, remember to install twine:

```
~/src/yangdoc(main)$ pip install twine
```

Then build and test upload:

```
~/src/yangdoc(main)$ python -m build
~/src/yangdoc(main)$ twine upload --repository-url https://test.pypi.org/legacy/ dist/*
```

Verify upload and then upload to PyPi proper:

```
~/src/yangdoc(main)$ twine upload dist/*
```


[1]: https://massimilianobruni-92986.medium.com/fix-your-python-requirements-with-pip-tools-856765d8c061

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "yangdoc",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.8",
    "maintainer_email": null,
    "keywords": "YANG, tree, libyang, HTML, jstree",
    "author": "Joachim Wiberg",
    "author_email": null,
    "download_url": "https://files.pythonhosted.org/packages/75/83/a426dcb6f9c56b3cfc70c49040a7ea76c6e9be8ed86026eb6b5942dcb03a/yangdoc-0.4.0.tar.gz",
    "platform": null,
    "description": "YANG Documentation Viewer\n=========================\n\nVery limited YANG Documentation generator based on libyang, with similar\noutput to that of `pyang -f jstree`.  The default output is a standalone\nHTML file, called `yangdoc.html`, that can be included in documentation\nbundles.\n\n\nUsage\n-----\n\nSee below [setup instructions](#setup) first.\n\n```\n~/src/yangdoc(main)$ python main.py -p yang -m ietf-system -e authentication -e local-users -e ntp -e ntp-udp-port -e timezone-name -m ietf-interfaces -e if-mib\nINFO: Parsing ietf-system, enabling features: ['authentication', 'local-users', 'ntp', 'ntp-udp-port', 'timezone-name']\nWARNING: Warning: failed to parse module: Data model \"ietf-netconf-acm\" not found in local searchdirs.: Loading \"ietf-netconf-acm\" module failed.: Parsing module \"ietf-system\" failed.\nINFO: Parsing ietf-interfaces, enabling features: ['if-mib']\nINFO: Processing module ietf-interfaces\nINFO: HTML file generated: yangdoc.html\nx-www-browser yang_tree_view.html\n~/src/yangdoc(main)$ x-www-browser yang_tree_view.html\n```\n\n\nScreenshot\n----------\n\n![](screenshot.png)\n\n\nSetup\n-----\n\n> These instructions have been tested on Linux Mint 21.3, but\n> are mostly the same for other operating systems.\n\nClone the repository to your home directory:\n\n```\n~$ cd src/\n~/src$ git clone https://github.com/troglobit/yangdoc\n~/src$ cd yangdoc\n~/src/yangdoc(main)$\n```\n\nSet up your virtual environment, this ensures all python packages\ninstalled from `requirements.txt` are installed only in `.venv/`:\n\n```\n~/src/yangdoc(main)$ python -m venv .venv\n~/src/yangdoc(main)$ source .venv/bin/activate\n```\n\nInstall all required packages:\n\n```\n~/src/yangdoc(main)$ sudo apt install libyang2\n~/src/yangdoc(main)$ pip install -r requirements.txt\n```\n\n\nDeveloper Notes\n---------------\n\nUse `pip-compile` from pip-tools to [manage Python requirements][4],\nthis makes life a lot easier since we only need pyproject.toml for all\nour packaging needs.\n\nTo install locally, or just build, verifying pyproject.toml:\n\n```\n~/src/yangdoc(main)$ pip install -e .\n~/src/yangdoc(main)$ python -m build\n```\n\nFor uploading to PyPi, remember to install twine:\n\n```\n~/src/yangdoc(main)$ pip install twine\n```\n\nThen build and test upload:\n\n```\n~/src/yangdoc(main)$ python -m build\n~/src/yangdoc(main)$ twine upload --repository-url https://test.pypi.org/legacy/ dist/*\n```\n\nVerify upload and then upload to PyPi proper:\n\n```\n~/src/yangdoc(main)$ twine upload dist/*\n```\n\n\n[1]: https://massimilianobruni-92986.medium.com/fix-your-python-requirements-with-pip-tools-856765d8c061\n",
    "bugtrack_url": null,
    "license": "MIT License  Copyright (c) 2024  Joachim Wiberg <troglobit@gmail.com>  Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \"Software\"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:  The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ",
    "summary": "A project for generating YANG tree views.",
    "version": "0.4.0",
    "project_urls": {
        "homepage": "https://github.com/troglobit/yangdoc",
        "repository": "https://github.com/troglobit/yangdoc"
    },
    "split_keywords": [
        "yang",
        " tree",
        " libyang",
        " html",
        " jstree"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "1639a30c91da13f0e7f0736a0dc3fde377538d1f958465cdce3b37b0882e4fcc",
                "md5": "6d03f4c15b5b6be6161798ace154cc02",
                "sha256": "2f96e74c8bf2c1333ab71ad97575645f820f28f606d9210453b3f40a4711173d"
            },
            "downloads": -1,
            "filename": "yangdoc-0.4.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "6d03f4c15b5b6be6161798ace154cc02",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.8",
            "size": 9012,
            "upload_time": "2024-06-27T09:52:01",
            "upload_time_iso_8601": "2024-06-27T09:52:01.523589Z",
            "url": "https://files.pythonhosted.org/packages/16/39/a30c91da13f0e7f0736a0dc3fde377538d1f958465cdce3b37b0882e4fcc/yangdoc-0.4.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "7583a426dcb6f9c56b3cfc70c49040a7ea76c6e9be8ed86026eb6b5942dcb03a",
                "md5": "9fe18b73870676c7f7f6a9311b531f97",
                "sha256": "f7a311c3c58859f33c85342b92947124bf4696015db0816f4324cf1663ebc007"
            },
            "downloads": -1,
            "filename": "yangdoc-0.4.0.tar.gz",
            "has_sig": false,
            "md5_digest": "9fe18b73870676c7f7f6a9311b531f97",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.8",
            "size": 9561,
            "upload_time": "2024-06-27T09:52:03",
            "upload_time_iso_8601": "2024-06-27T09:52:03.503214Z",
            "url": "https://files.pythonhosted.org/packages/75/83/a426dcb6f9c56b3cfc70c49040a7ea76c6e9be8ed86026eb6b5942dcb03a/yangdoc-0.4.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-06-27 09:52:03",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "troglobit",
    "github_project": "yangdoc",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "requirements": [
        {
            "name": "cffi",
            "specs": [
                [
                    "==",
                    "1.16.0"
                ]
            ]
        },
        {
            "name": "libyang",
            "specs": [
                [
                    "==",
                    "2.7.1"
                ]
            ]
        },
        {
            "name": "pycparser",
            "specs": [
                [
                    "==",
                    "2.22"
                ]
            ]
        }
    ],
    "lcname": "yangdoc"
}
        
Elapsed time: 0.28874s