bugbug/setup.py

65 строки
2.1 KiB
Python
Исходник Обычный вид История

# -*- coding: utf-8 -*-
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this file,
# You can obtain one at http://mozilla.org/MPL/2.0/.
import os
from setuptools import find_packages, setup
here = os.path.dirname(__file__)
2018-12-14 01:41:34 +03:00
def read_requirements(file_):
with open(os.path.join(here, file_)) as f:
return sorted(list(set(line.split("#")[0].strip() for line in f)))
2018-12-14 01:41:34 +03:00
install_requires = read_requirements("requirements.txt")
with open(os.path.join(here, "VERSION")) as f:
version = f.read().strip()
# Read the extra requirements
extras = ["nlp", "nn"]
extras_require = {}
for extra in extras:
extras_require[extra] = read_requirements("extra-%s-requirements.txt" % extra)
setup(
name="bugbug",
version=version,
description="ML tools for Mozilla projects",
author="Marco Castelluccio",
author_email="mcastelluccio@mozilla.com",
2018-12-14 01:41:34 +03:00
install_requires=install_requires,
extras_require=extras_require,
packages=find_packages(exclude=["contrib", "docs", "tests"]),
include_package_data=True,
license="MPL2",
entry_points={
"console_scripts": [
"bugbug-data-commits = scripts.commit_retriever:main",
"bugbug-data-bugzilla = scripts.bug_retriever:main",
"bugbug-train = scripts.trainer:main",
Add basic check method and check script (#341) * Add basic check method and check script * Ensure the check of component will correctly use super result * Add required infra to schedule model checks * Add scheduling bits for the model checks * Remove the filtering on classification * Extract counting bugs to a new function in bugzilla.py * Also checks conflated components * Fix new hook id * Call bugzilla with the count_only param to speed up the check * Fix the new hook scope to match the hook id * Fix component model check after previous refactoring * Fix component model check method * Use a bugzilla report for even faster component model check * Clarify get_product_component_count docstring We are already filtering out full component with 0 bugs * Update conflated components mapping check A conflated component could also be part of the conflated components mapping * Distinguish between non-existing full components and empty full components * Remove the filter on resolution and unnecessary url params * Update component check method Keep checks as separate as possible for clarity, we could merge them or makes them faster later * Generate dynamically the CSV report url * Fix Docker image name the hook * Implement component check number 5 Get the meaningful components for the last 6 months * Handle reviews comments * Remove extraneous print * Removes TODO * Use a different threshold ration when checking for new meaningful components As we are only checking new bugs for 6 months, adjust the threshold ration to be less sensitive to occasional burst ob bugs for q given component. * Reduce the threshold ratio As we check on a disjoint time window, reduce the chance of false positives * Handle review nits * Fix last nits
2019-05-10 13:20:23 +03:00
"bugbug-check = scripts.check:main",
"bugbug-microannotate-generate = scripts.microannotate_generator:main",
"bugbug-classify-commit = scripts.commit_classifier:main",
"bugbug-classify-bug = scripts.bug_classifier:main",
"bugbug-regressor-finder = scripts.regressor_finder:main",
"bugbug-retrieve-training-metrics = scripts.retrieve_training_metrics:main",
"bugbug-analyze-training-metrics = scripts.analyze_training_metrics:main",
"bugbug-check-all-metrics = scripts.check_all_metrics:main",
]
},
classifiers=[
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3 :: Only",
"License :: OSI Approved :: Mozilla Public License 2.0 (MPL 2.0)",
],
)