How to use the pybuilder.core.description function in pybuilder

To help you get started, we’ve selected a few pybuilder examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github pybuilder / pybuilder / src / main / python / pybuilder / plugins / python / integrationtest_plugin.py View on Github external
@description("Runs integration tests based on Python's unittest module")
def run_integration_tests(project, logger):
    if not project.get_property("integrationtest_parallel"):
        reports, total_time = run_integration_tests_sequentially(
            project, logger)
    else:
        reports, total_time = run_integration_tests_in_parallel(
            project, logger)

    reports_processor = ReportsProcessor(project, logger)
    reports_processor.process_reports(reports, total_time)
    reports_processor.report_to_ci_server(project)
    reports_processor.write_report_and_ensure_all_tests_passed()
github lake-lerna / hydra / build.py View on Github external
@description("Run a positive test case.")
def positive_test(project, logger):
    print("Running a postive test")
    command = ExternalCommandBuilder('hydra', project)
    command.use_argument('positive-test')
    result = command.run_on_production_source_files(logger)
    if result.exit_code:
        raise BuildFailedException("Exit code is set")
github pybuilder / pybuilder / src / main / python / pybuilder / plugins / python / install_dependencies_plugin.py View on Github external
@description("Displays all dependencies the project requires")
def list_dependencies(project):
    print("\n".join(
        map(lambda d: "{0}".format(" ".join(pip_utils.as_pip_install_target(d))),
            project.build_dependencies + project.dependencies)))
github deepmipt / kpi2017 / build.py View on Github external
@description("Pack a model to model_name_CURRENTDATE.tar.gz")
def archive_model(project):
    """
    Use 'pyb -P model_name="" archive_model' to create '_CURRENTDATE.tar.gz'
    in 'build' directory. If model_name == 'deeppavlov_docs', then documentation from build/docs will be archived.
    """
    import tarfile, datetime
    os.chdir('build')
    model_name = project.get_property('model_name')
    archive_name = model_name + '_' + datetime.date.today().strftime("%y%m%d")

    if model_name == 'deeppavlov_docs':
        import shutil
        shutil.make_archive(archive_name, 'gztar', 'docs', 'deeppavlov')
        os.chdir('..')
        return
github pybuilder / pybuilder / src / main / python / pybuilder / plugins / core_plugin.py View on Github external
@description("Runs integration tests on the packaged application.")
def run_integration_tests():
    pass
github pybuilder / pybuilder / src / main / python / pybuilder / plugins / python / pydev_plugin.py View on Github external
@description("Generates eclipse-pydev development files")
def pydev_generate(project, logger):
    logger.info("Generating Eclipse/ Pydev project files.")

    paths = []
    add_property_value_if_present(paths, project, "dir_source_main_python")
    add_property_value_if_present(paths, project, "dir_source_main_scripts")
    add_property_value_if_present(paths, project, "dir_source_unittest_python")
    add_property_value_if_present(paths, project, "dir_source_integrationtest_python")

    paths_string = ""
    for path in paths:
        if os.path.exists(path):
            placeholders = {"project_name": project.name,
                            "path": path}
            paths_string += _DOT_PYDEVPROJECT_PATH_LINE_TEMPLATE.substitute(placeholders)
github pybuilder / pybuilder / src / main / python / pybuilder / plugins / python / pycharm_plugin.py View on Github external
@description("Generates PyCharm development files")
def pycharm_generate(project, logger):
    logger.info("Generating PyCharm project files.")

    pycharm_directory = project.expand_path(".idea")
    project_file_name = "{0}.iml".format(project.name)

    _ensure_directory_present(pycharm_directory)
    unit_tests = ""
    integration_tests = ""
    if project.get_property("dir_source_unittest_python"):
        unit_tests = """\n      """
    if project.get_property("dir_source_integrationtest_python"):
        integration_tests = """\n      """
    output_directory = """""" % project.get_property(
github pybuilder / pybuilder / src / main / python / pybuilder / plugins / core_plugin.py View on Github external
@description("Verifies the project and possibly integration tests.")
def verify():
    pass
github pybuilder / pybuilder / src / main / python / pybuilder / plugins / python / core_plugin.py View on Github external
@description("Package a python application.")
def package(project, logger):
    init_dist_target(project, logger)

    logger.info("Building distribution in {0}".format(project.expand_path("$" + DISTRIBUTION_PROPERTY)))

    copy_python_sources(project, logger)
    copy_scripts(project, logger)