mirror of
https://github.com/pytorch/pytorch.git
synced 2025-10-20 21:14:14 +08:00
Summary: This PR is step 1 to covering JIT'd methods and functions. Step 2 (using it in CI) is here: https://github.com/pytorch/pytorch/issues/56310. 1. This PR introduces a package `coverage_plugins` that hosts JITPlugin. 2. We also bring in a `.coveragerc` file that is used in CI to omit the files we don't want to report on (e.g., temporary directories or test or utils.) **Disclaimer: This PR does NOT use the plug-in. Nothing should change as a result.** Pull Request resolved: https://github.com/pytorch/pytorch/pull/56708 Test Plan: CI. Coverage should not go down. If you're interested in testing this plug-in locally, you should: `pip install -e tools/coverage_plugins_package` from the root directory. Add the following lines to `.coveragerc` under `[run]` ``` plugins = coverage_plugins.jit_plugin ``` And then try: `coverage run test/test_jit.py TestAsync.test_async_script_no_script_mod` You should see `.coverage.jit` show up at the end. You can then run `coverage combine --append` and `coverage debug data` to see that some files in `torch/jit` are covered. Reviewed By: samestep Differential Revision: D27945570 Pulled By: janeyx99 fbshipit-source-id: 78732940fcb498d5ec37d4075c4e7e08e96a8d55
27 lines
807 B
Python
27 lines
807 B
Python
import setuptools
|
|
|
|
with open("README.md", "r", encoding="utf-8") as fh:
|
|
long_description = fh.read()
|
|
|
|
setuptools.setup(
|
|
name="coverage-plugins",
|
|
version="0.0.1",
|
|
author='PyTorch Team',
|
|
author_email='packages@pytorch.org',
|
|
description="plug-in to coverage for PyTorch JIT",
|
|
long_description=long_description,
|
|
long_description_content_type="text/markdown",
|
|
url="https://github.com/pytorch/pytorch",
|
|
project_urls={
|
|
"Bug Tracker": "https://github.com/pytorch/pytorch/issues",
|
|
},
|
|
classifiers=[
|
|
"Programming Language :: Python :: 3",
|
|
"License :: OSI Approved :: MIT License",
|
|
"Operating System :: OS Independent",
|
|
],
|
|
package_dir={"": "src"},
|
|
packages=setuptools.find_packages(where="src"),
|
|
python_requires=">=3.6",
|
|
)
|