apiview-stub-generator


Nameapiview-stub-generator JSON
Version 0.3.7 PyPI version JSON
download
home_pagehttps://github.com/Azure/azure-sdk-tools/
SummaryA stub generator for published APIs, variables and properties in a package
upload_time2023-04-04 18:33:48
maintainer
docs_urlNone
authorMicrosoft Corporation
requires_python>=3.7.0
licenseMIT License
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # API Stub Generator [![Build Status](https://dev.azure.com/azure-sdk/public/_apis/build/status/108?branchName=master)](https://dev.azure.com/azure-sdk/public/_build/latest?definitionId=108&branchName=master)

Azure SDK API review tool is used to review all published Azure SDK APIs and this review tool works for all language format. API tool needs a stub file generated in json format with tokens to list APIs in review tool. API stub generator package is developed to create a stub file with api surface level information. Following are the main published components included in this stub file.

    - Classes and module level functions
    - Instance methods
    - Class and Instance variables
    - Properties


## Steps to create API review
Following are the steps to create an API review request for python package.
1. Generate stub file tokens
2. Upload stub file tokens into API review portal

### Generate stub File
`apiview-stub-generator` package is used to generate stub file tokens from either source code repo or from prebuilt wheel package. Following are the steps to generate stub file token.

Install `apiview-stub-generator` package. From the root of the apiview-stub-generator package, run:
```
pip install . --extra-index-url="https://pkgs.dev.azure.com/azure-sdk/public/_packaging/azure-sdk-for-python/pypi/simple/"
```

Run `apistubgen` command with source repo or whl package as parameter and this will generate a json file with tokens.

#### Help for apistubgen
```
apistubgen --pkg-path <path to package root>
```

This also takes an optional parameter to mention output path where json token file will be generated. If out-path is not given then file will be generated in current working directory.

```
apistubgen --pkg-path <path to package root> --out-path <Outpath path>
```

Sample:
```
apistubgen --pkg-path C:\git\azure-sdk-for-python\sdk\core\azure-core
apistubgen --pkg-path C:\git\azure-sdk-for-python\sdk\core\azure-core --out-path C:\out
```

Token file will be created with a naming convention `<package-name>_python.json'


### Upload token file to API review portal
- Go to ``https://apiview.dev``
- Click on `Create review`
- Select generated token file and upload





            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/Azure/azure-sdk-tools/",
    "name": "apiview-stub-generator",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.7.0",
    "maintainer_email": "",
    "keywords": "",
    "author": "Microsoft Corporation",
    "author_email": "azuresdkengsysadmins@microsoft.com",
    "download_url": "",
    "platform": null,
    "description": "# API Stub Generator [![Build Status](https://dev.azure.com/azure-sdk/public/_apis/build/status/108?branchName=master)](https://dev.azure.com/azure-sdk/public/_build/latest?definitionId=108&branchName=master)\n\nAzure SDK API review tool is used to review all published Azure SDK APIs and this review tool works for all language format. API tool needs a stub file generated in json format with tokens to list APIs in review tool. API stub generator package is developed to create a stub file with api surface level information. Following are the main published components included in this stub file.\n\n    - Classes and module level functions\n    - Instance methods\n    - Class and Instance variables\n    - Properties\n\n\n## Steps to create API review\nFollowing are the steps to create an API review request for python package.\n1. Generate stub file tokens\n2. Upload stub file tokens into API review portal\n\n### Generate stub File\n`apiview-stub-generator` package is used to generate stub file tokens from either source code repo or from prebuilt wheel package. Following are the steps to generate stub file token.\n\nInstall `apiview-stub-generator` package. From the root of the apiview-stub-generator package, run:\n```\npip install . --extra-index-url=\"https://pkgs.dev.azure.com/azure-sdk/public/_packaging/azure-sdk-for-python/pypi/simple/\"\n```\n\nRun `apistubgen` command with source repo or whl package as parameter and this will generate a json file with tokens.\n\n#### Help for apistubgen\n```\napistubgen --pkg-path <path to package root>\n```\n\nThis also takes an optional parameter to mention output path where json token file will be generated. If out-path is not given then file will be generated in current working directory.\n\n```\napistubgen --pkg-path <path to package root> --out-path <Outpath path>\n```\n\nSample:\n```\napistubgen --pkg-path C:\\git\\azure-sdk-for-python\\sdk\\core\\azure-core\napistubgen --pkg-path C:\\git\\azure-sdk-for-python\\sdk\\core\\azure-core --out-path C:\\out\n```\n\nToken file will be created with a naming convention `<package-name>_python.json'\n\n\n### Upload token file to API review portal\n- Go to ``https://apiview.dev``\n- Click on `Create review`\n- Select generated token file and upload\n\n\n\n\n",
    "bugtrack_url": null,
    "license": "MIT License",
    "summary": "A stub generator for published APIs, variables and properties in a package",
    "version": "0.3.7",
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "a1175450406f532ea7c6aa03afcbb202e5ee90a4908da2425a5e9458c444548e",
                "md5": "de0cc4e7e244ed9456dd23a8f288f8a9",
                "sha256": "312a7f1efc93130d74ef87f9f4e3d49b7f9f06d28b1d495b6c1a64dc9b575c02"
            },
            "downloads": -1,
            "filename": "apiview_stub_generator-0.3.7-py2.py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "de0cc4e7e244ed9456dd23a8f288f8a9",
            "packagetype": "bdist_wheel",
            "python_version": "py2.py3",
            "requires_python": ">=3.7.0",
            "size": 49789,
            "upload_time": "2023-04-04T18:33:48",
            "upload_time_iso_8601": "2023-04-04T18:33:48.540537Z",
            "url": "https://files.pythonhosted.org/packages/a1/17/5450406f532ea7c6aa03afcbb202e5ee90a4908da2425a5e9458c444548e/apiview_stub_generator-0.3.7-py2.py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-04-04 18:33:48",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "github_user": "Azure",
    "github_project": "azure-sdk-tools",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "apiview-stub-generator"
}
        
Elapsed time: 0.13326s