Build fails with error "[Errno 2] No such file or directory"

Hello,
I'm new to build tools in general, and pybuilder in specific. I'm using it with ubuntu and pycharm. The first thing I did was clone the project I'm working on, then run the pyb pycharm_generate command to build the environment. After making my changes, I tried running the pyb -vvv to update the environment but it fails with the following error:
BUILD FAILED - Error while executing setup command ['bdist_wheel']. See /home/minasonbol/PycharmProjects/Text_Mining/NBATwitterCorrelation/target/reports/distutils/bdist_wheel for full details:
        running clean
        'build/temp.linux-x86_64-3.8' does not exist -- can't clean it
        'build/lib' does not exist -- can't clean it
        'build/bdist.linux-x86_64' does not exist -- can't clean it
        'build/scripts-3.8' does not exist -- can't clean it
        running bdist_wheel
        running build
        running build_py
        creating build
        creating build/lib
        copying NBADataLoader.py -> build/lib
        running build_scripts
        creating build/scripts-3.8
        warning: build_scripts: scripts/placeholder.py is an empty file (skipping)
        error: [Errno 2] No such file or directory: 'build/scripts-3.8/placeholder.py' (pybuilder/plugins/python/distutils_plugin.py:394)

Any ideas on why the build tool is trying to run the placeholder.py script, and how can I fix this?
Thanks,
Mina

The first thing I did was clone the project I'm working on

Please define "clone". Did you just copy it?

then run the pyb pycharm_generate

pycharm_generate does nothing but setup metadata for pycharm.

pyb -vvv

Could you please run pyb -v -X, post the entire output here and if possible post the build.py?

what i meant by "clone" is that i ran the following command gh repo clone darkhark/NBATwitterCorrelation to download a repo to my local machine

here is the output of pyb -v -X :

and here is the build.py

#   -*- coding: utf-8 -*-
from pybuilder.core import use_plugin, init
use_plugin("python.core")
use_plugin("python.unittest")
use_plugin("python.flake8")
use_plugin("python.distutils")
name = "NBATwitterCorrelation"
default_task = "publish"
@init
def set_properties(project):
    pass

and by the way, the build succeeds if i disable the distutils configuratioan. here is the output of the pyb -v -X after disabling distutils

[DEBUG] Registered Python environment 'system': CPython version 3.8.5.final.0 on linux in ['/usr/bin/python3']
PyBuilder version 0.12.9
Build started at 2020-10-13 16:45:11
------------------------------------------------------------
[DEBUG] Loading project module from ./build.py
[DEBUG] Setting up plugins VEnv at '/home/minasonbol/PycharmProjects/Text_Mining/NBATwitterCorrelation/.pybuilder/plugins/cpython-3.8.5.final.0'
[DEBUG] Registered Python environment 'pybuilder': CPython version 3.8.5.final.0 on linux in ['/home/minasonbol/PycharmProjects/Text_Mining/NBATwitterCorrelation/.pybuilder/plugins/cpython-3.8.5.final.0/bin/python3']
[DEBUG] Patched __import__ system to defer plugin loading
[DEBUG] Loading plugin 'python.core'
[DEBUG] Trying to load direct plugin 'python.core', module 'pybuilder.plugins.python.core_plugin'
[DEBUG] Found direct plugin 'python.core', module 'pybuilder.plugins.python.core_plugin'
[DEBUG] Loading plugin 'python.unittest'
[DEBUG] Trying to load direct plugin 'python.unittest', module 'pybuilder.plugins.python.unittest_plugin'
[DEBUG] Found direct plugin 'python.unittest', module 'pybuilder.plugins.python.unittest_plugin'
[DEBUG] Loading plugin 'python.flake8'
[DEBUG] Trying to load direct plugin 'python.flake8', module 'pybuilder.plugins.python.flake8_plugin'
[DEBUG] Found direct plugin 'python.flake8', module 'pybuilder.plugins.python.flake8_plugin'
[DEBUG] Loading plugin 'core'
[DEBUG] Trying to load direct plugin 'core', module 'pybuilder.plugins.core_plugin'
[DEBUG] Found direct plugin 'core', module 'pybuilder.plugins.core_plugin'
[DEBUG] Found task 'clean' with dependencies []
[DEBUG] Registering task 'clean'
[DEBUG] Found task 'compile_sources' with dependencies [prepare]
[DEBUG] Registering task 'compile_sources'
[DEBUG] Registering initializer 'init'
[DEBUG] Found task 'install' with dependencies [package, publish(optional)]
[DEBUG] Registering task 'install'
[DEBUG] Found task 'package' with dependencies [compile_sources, run_unit_tests(optional)]
[DEBUG] Registering task 'package'
[DEBUG] Found task 'prepare' with dependencies []
[DEBUG] Registering task 'prepare'
[DEBUG] Found task 'print_module_path' with dependencies []
[DEBUG] Registering task 'print_module_path'
[DEBUG] Found task 'print_scripts_path' with dependencies []
[DEBUG] Registering task 'print_scripts_path'
[DEBUG] Found task 'publish' with dependencies [package, verify(optional)]
[DEBUG] Registering task 'publish'
[DEBUG] Found task 'run_integration_tests' with dependencies [package]
[DEBUG] Registering task 'run_integration_tests'
[DEBUG] Found task 'run_unit_tests' with dependencies [compile_sources]
[DEBUG] Registering task 'run_unit_tests'
[DEBUG] Found task 'verify' with dependencies [run_integration_tests(optional)]
[DEBUG] Registering task 'verify'
[DEBUG] Found task 'prepare' with dependencies []
[DEBUG] Registering task 'prepare'
[DEBUG] Registering initializer 'init_python_directories'
[DEBUG] Found task 'package' with dependencies []
[DEBUG] Registering task 'package'
[DEBUG] Found action coverage_init
[DEBUG] Registering action 'coverage_init'
[DEBUG] Registering initializer 'init_test_source_directory'
[DEBUG] Found task 'run_unit_tests' with dependencies []
[DEBUG] Registering task 'run_unit_tests'
[DEBUG] Found task 'analyze' with dependencies [prepare]
[DEBUG] Registering task 'analyze'
[DEBUG] Found action assert_flake8_is_executable
[DEBUG] Registering action 'assert_flake8_is_executable'
[DEBUG] Registering initializer 'initialize_flake8_plugin'
[DEBUG] Have loaded plugins python.core, python.unittest, python.flake8, core
[DEBUG] Registering initializer 'set_properties'
[DEBUG] Adding 'prepare' as a dependency of task 'compile_sources'
[DEBUG] Adding 'package' as a dependency of task 'install'
[DEBUG] Adding 'publish(optional)' as a dependency of task 'install'
[DEBUG] Adding 'compile_sources' as a dependency of task 'package'
[DEBUG] Adding 'run_unit_tests(optional)' as a dependency of task 'package'
[DEBUG] Adding 'package' as a dependency of task 'publish'
[DEBUG] Adding 'verify(optional)' as a dependency of task 'publish'
[DEBUG] Adding 'package' as a dependency of task 'run_integration_tests'
[DEBUG] Adding 'compile_sources' as a dependency of task 'run_unit_tests'
[DEBUG] Adding 'run_integration_tests(optional)' as a dependency of task 'verify'
[DEBUG] Adding 'prepare' as a dependency of task 'analyze'
[DEBUG] Adding before action 'coverage_init' for task 'prepare'
[DEBUG] Adding after action 'assert_flake8_is_executable' for task 'prepare'
[DEBUG] Verbose output enabled.
[DEBUG] Executing initializer 'init' from 'pybuilder.plugins.core_plugin'
[DEBUG] Executing initializer 'init_python_directories' from 'pybuilder.plugins.python.core_plugin'
[DEBUG] Executing initializer 'init_test_source_directory' from 'pybuilder.plugins.python.unittest_plugin'
[DEBUG] Executing initializer 'initialize_flake8_plugin' from 'pybuilder.plugins.python.flake8_plugin'
[DEBUG] Executing initializer 'set_properties' from 'build'
[DEBUG] Project properties:
                                 basedir : /home/minasonbol/PycharmProjects/Text_Mining/NBATwitterCorrelation
                                dir_dist : $dir_target/dist/NBATwitterCorrelation-1.0.dev0
                        dir_dist_scripts : scripts
                        dir_install_logs : $dir_logs/install_dependencies
                                dir_logs : $dir_target/logs
                             dir_reports : $dir_target/reports
                  dir_source_main_python : src/main/python
                 dir_source_main_scripts : src/main/scripts
              dir_source_unittest_python : src/unittest/python
                              dir_target : target
                      flake8_break_build : False
                 flake8_exclude_patterns : None
                    flake8_extend_ignore : None
                           flake8_ignore : None
                 flake8_include_patterns : None
                  flake8_include_scripts : False
             flake8_include_test_sources : False
                   flake8_max_complexity : None
                  flake8_max_line_length : 120
        install_dependencies_constraints : constraints_file
    install_dependencies_extra_index_url : None
          install_dependencies_index_url : None
install_dependencies_insecure_installation : []
       install_dependencies_trusted_host : None
            install_dependencies_upgrade : False
                             pip_verbose : 0
                           refresh_venvs : False
                            remote_debug : 0
                   unittest_breaks_build : True
                    unittest_file_suffix : None
                    unittest_module_glob : *_tests
                     unittest_python_env : build
                         unittest_runner : (<function init_test_source_directory.<locals>.<lambda> at 0x7fa6cc452550>, '_make_result')
             unittest_test_method_prefix : None
                              venv_clean : False
                       venv_dependencies : {}
                              venv_names : ['build', 'test']
                                 verbose : True
[DEBUG] Execution plan is prepare, compile_sources, run_unit_tests, package, run_integration_tests, verify, publish
[INFO]  Building NBATwitterCorrelation version 1.0.dev0
[INFO]  Executing build in /home/minasonbol/PycharmProjects/Text_Mining/NBATwitterCorrelation
[INFO]  Going to execute task publish
[DEBUG] Executing task 'prepare'
[DEBUG] Executing action 'coverage_init' from 'pybuilder.plugins.python.unittest_plugin' before task
[DEBUG] Executing subtask of 'prepare' from 'pybuilder.plugins.core_plugin'
[DEBUG] Inspecting package flake8
[DEBUG] Package flake8 is added to the list of installation constraints
[DEBUG] Package flake8 has a non-exact version specifier and will be updated
[DEBUG] Inspecting package unittest-xml-reporting
[DEBUG] Package unittest-xml-reporting is added to the list of installation constraints
[DEBUG] Package unittest-xml-reporting has a non-exact version specifier and will be updated
[INFO]  Processing plugin packages 'flake8~=3.7' to be installed with {'upgrade': True}
[INFO]  Processing plugin packages 'unittest-xml-reporting~=3.0.2' to be installed with {'upgrade': True}
[DEBUG] Executing command: '/home/minasonbol/PycharmProjects/Text_Mining/NBATwitterCorrelation/.pybuilder/plugins/cpython-3.8.5.final.0/bin/python3' '-m' 'pip.__main__' 'install' '--upgrade' '--upgrade-strategy' 'only-if-needed' 'flake8~=3.7' 'unittest-xml-reporting~=3.0.2'
[DEBUG] Executing subtask of 'prepare' from 'pybuilder.plugins.python.core_plugin'
[DEBUG] Creating log directory '/home/minasonbol/PycharmProjects/Text_Mining/NBATwitterCorrelation/target/logs/install_dependencies'
[INFO]  Creating target 'build' VEnv in '/home/minasonbol/PycharmProjects/Text_Mining/NBATwitterCorrelation/target/venv/build/cpython-3.8.5.final.0'
[DEBUG] Registered Python environment 'build': CPython version 3.8.5.final.0 on linux in ['/home/minasonbol/PycharmProjects/Text_Mining/NBATwitterCorrelation/target/venv/build/cpython-3.8.5.final.0/bin/python3']
[INFO]  Creating target 'test' VEnv in '/home/minasonbol/PycharmProjects/Text_Mining/NBATwitterCorrelation/target/venv/test/cpython-3.8.5.final.0'
[DEBUG] Registered Python environment 'test': CPython version 3.8.5.final.0 on linux in ['/home/minasonbol/PycharmProjects/Text_Mining/NBATwitterCorrelation/target/venv/test/cpython-3.8.5.final.0/bin/python3']
[DEBUG] Executing action 'assert_flake8_is_executable' from 'pybuilder.plugins.python.flake8_plugin' before task
[DEBUG] Checking if flake8 is executable.
[DEBUG] Verifying command: 'flake8' '--version'
[DEBUG] Executing task 'compile_sources'
[DEBUG] Executing subtask of 'compile_sources' from 'pybuilder.plugins.core_plugin'
[DEBUG] Executing task 'run_unit_tests'
[DEBUG] Executing subtask of 'run_unit_tests' from 'pybuilder.plugins.core_plugin'
[DEBUG] Executing subtask of 'run_unit_tests' from 'pybuilder.plugins.python.unittest_plugin'
[INFO]  Running unit tests
[INFO]  Executing unit tests from Python modules in /home/minasonbol/PycharmProjects/Text_Mining/NBATwitterCorrelation/src/unittest/python
[DEBUG] Including files matching '*_tests'
[WARN]  No unit tests executed.
[INFO]  All unit tests passed.
[DEBUG] Executing task 'package'
[DEBUG] Executing subtask of 'package' from 'pybuilder.plugins.core_plugin'
[DEBUG] Executing subtask of 'package' from 'pybuilder.plugins.python.core_plugin'
[DEBUG] Removing preexisting distribution /home/minasonbol/PycharmProjects/Text_Mining/NBATwitterCorrelation/target/dist/NBATwitterCorrelation-1.0.dev0
[DEBUG] Creating directory /home/minasonbol/PycharmProjects/Text_Mining/NBATwitterCorrelation/target/dist/NBATwitterCorrelation-1.0.dev0
[INFO]  Building distribution in /home/minasonbol/PycharmProjects/Text_Mining/NBATwitterCorrelation/target/dist/NBATwitterCorrelation-1.0.dev0
[DEBUG] Copying module/ package NBADataLoader.py
[INFO]  Copying scripts to /home/minasonbol/PycharmProjects/Text_Mining/NBATwitterCorrelation/target/dist/NBATwitterCorrelation-1.0.dev0/scripts
[DEBUG] Copying script placeholder.py
[DEBUG] Executing task 'run_integration_tests'
[DEBUG] Executing subtask of 'run_integration_tests' from 'pybuilder.plugins.core_plugin'
[DEBUG] Executing task 'verify'
[DEBUG] Executing subtask of 'verify' from 'pybuilder.plugins.core_plugin'
[DEBUG] Executing task 'publish'
[DEBUG] Executing subtask of 'publish' from 'pybuilder.plugins.core_plugin'
------------------------------------------------------------
BUILD SUCCESSFUL
------------------------------------------------------------
Build Summary
             Project: NBATwitterCorrelation
             Version: 1.0.dev0
      Base directory: /home/minasonbol/PycharmProjects/Text_Mining/NBATwitterCorrelation
       Environments:
               Tasks: prepare [7351 ms] compile_sources [0 ms] run_unit_tests [282 ms] package [1 ms] run_integration_tests [0 ms] verify [0 ms] publish [0 ms]
Build finished at 2020-10-13 16:45:23
Build took 12 seconds (12360 ms)

#   -*- coding: utf-8 -*-
from pybuilder.core import use_plugin, init
use_plugin("python.core")
use_plugin("python.unittest")
use_plugin("python.flake8")
use_plugin("python.coverage")
use_plugin("python.distutils")
use_plugin('python.pycharm')
use_plugin('pypi:pybuilder_pip_tools', '==1.*')
name = "NBATwitterCorrelation"
default_task = "publish"
@init
def set_properties(project):
    project.set_property('flake8_break_build', True)
    project.depends_on_requirements("requirements.txt")
    project.set_property('coverage_break_build', False)

i know this a lot, but you were willing to help, i just wanted to share with you the updates so to make things easier for you. let me know if you have any comments on what we did. Thanks,

This is not actually a PyBuilder failure. Setuptools/bdist_wheel while building a Python wheel does not allow empty files. Check src/main/scripts/placeholder.py and you'll see that it's empty. I would recommend either removing it or putting something inside that makes sense, i.e. #!/usr/bin/env python will solve your problem, I checked:
$ pyb -v -X
[DEBUG] Registered Python environment 'system': CPython version 3.8.3.final.0 on linux in ['/home/arcivanov/.pyenv/versions/3.8.3/envs/pyb-3.8.3/bin/python3.8']
PyBuilder version 0.12.10
Build started at 2020-10-14 03:52:42
------------------------------------------------------------
[DEBUG] Loading project module from ./build.py
[DEBUG] Setting up plugins VEnv at '/NBATwitterCorrelation/.pybuilder/plugins/cpython-3.8.3.final.0'
[DEBUG] Registered Python environment 'pybuilder': CPython version 3.8.3.final.0 on linux in ['/NBATwitterCorrelation/.pybuilder/plugins/cpython-3.8.3.final.0/bin/python3.8']
[DEBUG] Patched __import__ system to defer plugin loading
[INFO]  Installing or updating plugin "pypi:pybuilder_pip_tools version ==1.*, module name 'pybuilder_pip_tools'"
[DEBUG] Inspecting package pybuilder_pip_tools
[DEBUG] Package pybuilder_pip_tools is added to the list of installation constraints
[DEBUG] Package pybuilder_pip_tools is not installed and will be installed
[INFO]  Processing plugin packages 'pybuilder_pip_tools==1.*' to be installed with {}
[DEBUG] Executing command: '/NBATwitterCorrelation/.pybuilder/plugins/cpython-3.8.3.final.0/bin/python3.8' '-m' 'pip.__main__' 'install' 'pybuilder_pip_tools==1.*'
[DEBUG] Loading plugin 'python.core'
[DEBUG] Trying to load direct plugin 'python.core', module 'pybuilder.plugins.python.core_plugin'
[DEBUG] Found direct plugin 'python.core', module 'pybuilder.plugins.python.core_plugin'
[DEBUG] Loading plugin 'python.unittest'
[DEBUG] Trying to load direct plugin 'python.unittest', module 'pybuilder.plugins.python.unittest_plugin'
[DEBUG] Found direct plugin 'python.unittest', module 'pybuilder.plugins.python.unittest_plugin'
[DEBUG] Loading plugin 'python.flake8'
[DEBUG] Trying to load direct plugin 'python.flake8', module 'pybuilder.plugins.python.flake8_plugin'
[DEBUG] Found direct plugin 'python.flake8', module 'pybuilder.plugins.python.flake8_plugin'
[DEBUG] Loading plugin 'python.coverage'
[DEBUG] Trying to load direct plugin 'python.coverage', module 'pybuilder.plugins.python.coverage_plugin'
[DEBUG] Found direct plugin 'python.coverage', module 'pybuilder.plugins.python.coverage_plugin'
[DEBUG] Loading plugin 'python.distutils'
[DEBUG] Trying to load direct plugin 'python.distutils', module 'pybuilder.plugins.python.distutils_plugin'
[DEBUG] Found direct plugin 'python.distutils', module 'pybuilder.plugins.python.distutils_plugin'
[DEBUG] Loading plugin 'python.pycharm'
[DEBUG] Trying to load direct plugin 'python.pycharm', module 'pybuilder.plugins.python.pycharm_plugin'
[DEBUG] Found direct plugin 'python.pycharm', module 'pybuilder.plugins.python.pycharm_plugin'
[DEBUG] Loading plugin 'pypi:pybuilder_pip_tools' version ==1.*
[DEBUG] Trying to load third party plugin 'pypi:pybuilder_pip_tools', module 'pybuilder_pip_tools'
[DEBUG] Found third party plugin 'pypi:pybuilder_pip_tools', module 'pybuilder_pip_tools'
[DEBUG] Loading plugin 'core'
[DEBUG] Trying to load direct plugin 'core', module 'pybuilder.plugins.core_plugin'
[DEBUG] Found direct plugin 'core', module 'pybuilder.plugins.core_plugin'
[DEBUG] Loading plugin 'analysis'
[DEBUG] Trying to load direct plugin 'analysis', module 'pybuilder.plugins.analysis_plugin'
[DEBUG] Found direct plugin 'analysis', module 'pybuilder.plugins.analysis_plugin'
[DEBUG] Found task 'clean' with dependencies []
[DEBUG] Registering task 'clean'
[DEBUG] Found task 'compile_sources' with dependencies [prepare]
[DEBUG] Registering task 'compile_sources'
[DEBUG] Registering initializer 'init'
[DEBUG] Found task 'install' with dependencies [package, publish(optional)]
[DEBUG] Registering task 'install'
[DEBUG] Found task 'package' with dependencies [compile_sources, run_unit_tests(optional)]
[DEBUG] Registering task 'package'
[DEBUG] Found task 'prepare' with dependencies []
[DEBUG] Registering task 'prepare'
[DEBUG] Found task 'print_module_path' with dependencies []
[DEBUG] Registering task 'print_module_path'
[DEBUG] Found task 'print_scripts_path' with dependencies []
[DEBUG] Registering task 'print_scripts_path'
[DEBUG] Found task 'publish' with dependencies [package, verify(optional)]
[DEBUG] Registering task 'publish'
[DEBUG] Found task 'run_integration_tests' with dependencies [package]
[DEBUG] Registering task 'run_integration_tests'
[DEBUG] Found task 'run_unit_tests' with dependencies [compile_sources]
[DEBUG] Registering task 'run_unit_tests'
[DEBUG] Found task 'verify' with dependencies [run_integration_tests(optional)]
[DEBUG] Registering task 'verify'
[DEBUG] Found task 'prepare' with dependencies []
[DEBUG] Registering task 'prepare'
[DEBUG] Registering initializer 'init_python_directories'
[DEBUG] Found task 'package' with dependencies []
[DEBUG] Registering task 'package'
[DEBUG] Found action coverage_init
[DEBUG] Registering action 'coverage_init'
[DEBUG] Registering initializer 'init_test_source_directory'
[DEBUG] Found task 'run_unit_tests' with dependencies []
[DEBUG] Registering task 'run_unit_tests'
[DEBUG] Found task 'analyze' with dependencies [prepare]
[DEBUG] Registering task 'analyze'
[DEBUG] Found action assert_flake8_is_executable
[DEBUG] Registering action 'assert_flake8_is_executable'
[DEBUG] Registering initializer 'initialize_flake8_plugin'
[DEBUG] Found task 'analyze' with dependencies [run_unit_tests]
[DEBUG] Registering task 'analyze'
[DEBUG] Found task 'coverage' with dependencies [verify]
[DEBUG] Registering task 'coverage'
[DEBUG] Registering initializer 'init_coverage_properties'
[DEBUG] Found task 'prepare' with dependencies []
[DEBUG] Registering task 'prepare'
[DEBUG] Registering late dependency of task 'publish' on [coverage(optional)]
[DEBUG] Resolved late dependency of task 'publish' on [coverage(optional)]
[DEBUG] Found action build_binary_distribution
[DEBUG] Registering action 'build_binary_distribution'
[DEBUG] Registering initializer 'initialize_distutils_plugin'
[DEBUG] Found task 'install' with dependencies []
[DEBUG] Registering task 'install'
[DEBUG] Found action set_description
[DEBUG] Registering action 'set_description'
[DEBUG] Found task 'upload' with dependencies []
[DEBUG] Registering task 'upload'
[DEBUG] Found action write_manifest_file
[DEBUG] Registering action 'write_manifest_file'
[DEBUG] Found action write_setup_script
[DEBUG] Registering action 'write_setup_script'
[DEBUG] Found task 'pycharm_generate' with dependencies []
[DEBUG] Registering task 'pycharm_generate'
[DEBUG] Registering initializer 'init'
[DEBUG] Found task 'pip_sync' with dependencies [prepare]
[DEBUG] Registering task 'pip_sync'
[DEBUG] Have loaded plugins python.core, python.unittest, python.flake8, python.coverage, python.distutils, python.pycharm, pypi:pybuilder_pip_tools, core, analysis
[DEBUG] Registering initializer 'set_properties'
[DEBUG] Adding 'prepare' as a dependency of task 'compile_sources'
[DEBUG] Adding 'package' as a dependency of task 'install'
[DEBUG] Adding 'publish(optional)' as a dependency of task 'install'
[DEBUG] Adding 'compile_sources' as a dependency of task 'package'
[DEBUG] Adding 'run_unit_tests(optional)' as a dependency of task 'package'
[DEBUG] Adding 'package' as a dependency of task 'publish'
[DEBUG] Adding 'verify(optional)' as a dependency of task 'publish'
[DEBUG] Adding 'coverage(optional)' as a dependency of task 'publish'
[DEBUG] Adding 'package' as a dependency of task 'run_integration_tests'
[DEBUG] Adding 'compile_sources' as a dependency of task 'run_unit_tests'
[DEBUG] Adding 'run_integration_tests(optional)' as a dependency of task 'verify'
[DEBUG] Adding 'prepare' as a dependency of task 'analyze'
[DEBUG] Adding 'run_unit_tests' as a dependency of task 'analyze'
[DEBUG] Adding 'verify' as a dependency of task 'coverage'
[DEBUG] Adding 'prepare' as a dependency of task 'pip_sync'
[DEBUG] Adding before action 'coverage_init' for task 'prepare'
[DEBUG] Adding after action 'assert_flake8_is_executable' for task 'prepare'
[DEBUG] Adding before action 'build_binary_distribution' for task 'publish'
[DEBUG] Adding after action 'set_description' for task 'prepare'
[DEBUG] Adding after action 'write_manifest_file' for task 'package'
[DEBUG] Adding after action 'write_setup_script' for task 'package'
[DEBUG] Verbose output enabled.

[DEBUG] Executing initializer 'init' from 'pybuilder.plugins.core_plugin'
[DEBUG] Executing initializer 'init_python_directories' from 'pybuilder.plugins.python.core_plugin'
[DEBUG] Executing initializer 'init_test_source_directory' from 'pybuilder.plugins.python.unittest_plugin'
[DEBUG] Executing initializer 'initialize_flake8_plugin' from 'pybuilder.plugins.python.flake8_plugin'
[DEBUG] Executing initializer 'init_coverage_properties' from 'pybuilder.plugins.python.coverage_plugin'
[DEBUG] Executing initializer 'initialize_distutils_plugin' from 'pybuilder.plugins.python.distutils_plugin'
[DEBUG] Executing initializer 'init' from 'pybuilder_pip_tools'
[DEBUG] Executing initializer 'set_properties' from 'build'
[DEBUG] Project properties:
                       __coverage_config : None
                         __covered_tasks : None
               _coverage_config_prefixes : {}
                         _coverage_tasks : []
                                 basedir : /NBATwitterCorrelation
     coverage_allow_non_imported_modules : None
  coverage_branch_partial_threshold_warn : 0
          coverage_branch_threshold_warn : 0
                    coverage_break_build : False
                    coverage_concurrency : ['thread']
                          coverage_debug : []
                     coverage_exceptions : []
                           coverage_fork : None
                           coverage_name : Textmining
                 coverage_reload_modules : None
                  coverage_reset_modules : False
                    coverage_source_path : $dir_source_main_python
                 coverage_threshold_warn : 70
                                dir_dist : $dir_target/dist/TextMining-1.0.dev0
                        dir_dist_scripts : scripts
                        dir_install_logs : $dir_logs/install_dependencies
                                dir_logs : $dir_target/logs
                             dir_reports : $dir_target/reports
                  dir_source_main_python : src/main/python
                 dir_source_main_scripts : src/main/scripts
              dir_source_unittest_python : src/unittest/python
                              dir_target : target
                   distutils_classifiers : ['Development Status :: 3 - Alpha', 'Programming Language :: Python']
               distutils_command_options : None
                      distutils_commands : ['sdist', 'bdist_wheel']
               distutils_console_scripts : None
         distutils_description_overwrite : False
                  distutils_entry_points : None
              distutils_fail_on_warnings : False
  distutils_issue8876_workaround_enabled : False
            distutils_readme_description : False
                   distutils_readme_file : README.md
           distutils_readme_file_convert : False
          distutils_readme_file_encoding : None
              distutils_readme_file_type : None
           distutils_readme_file_variant : None
                distutils_setup_keywords : None
             distutils_summary_overwrite : False
               distutils_upload_register : False
             distutils_upload_repository : None
         distutils_upload_repository_key : None
                   distutils_upload_sign : False
          distutils_upload_sign_identity : None
          distutils_upload_skip_existing : False
                distutils_use_setuptools : True
                      distutils_zip_safe : True
                      flake8_break_build : True
                 flake8_exclude_patterns : None
                    flake8_extend_ignore : None
                           flake8_ignore : None
                 flake8_include_patterns : None
                  flake8_include_scripts : False
             flake8_include_test_sources : False
                   flake8_max_complexity : None
                  flake8_max_line_length : 120
        install_dependencies_constraints : constraints_file
    install_dependencies_extra_index_url : None
          install_dependencies_index_url : None
install_dependencies_insecure_installation : []
       install_dependencies_trusted_host : None
            install_dependencies_upgrade : False
                             pip_verbose : 0
          pybuilder_pip_tools_build_urls : []
                pybuilder_pip_tools_urls : []
                           refresh_venvs : False
                            remote_debug : 0
                   unittest_breaks_build : True
                    unittest_file_suffix : None
                    unittest_module_glob : *_tests
                     unittest_python_env : build
                         unittest_runner : (<function init_test_source_directory.<locals>.<lambda> at 0x7f30695a8b80>, '_make_result')
             unittest_test_method_prefix : None
                              venv_clean : False
                       venv_dependencies : {}
                              venv_names : ['build', 'test']
                                 verbose : True
[DEBUG] Execution plan is prepare, compile_sources, run_unit_tests, package, run_integration_tests, verify, coverage, publish
[INFO]  Building TextMining version 1.0.dev0
[INFO]  Executing build in /NBATwitterCorrelation
[INFO]  Going to execute task publish
[DEBUG] Executing task 'prepare'
[DEBUG] Executing action 'coverage_init' from 'pybuilder.plugins.python.unittest_plugin' before task
[DEBUG] Executing subtask of 'prepare' from 'pybuilder.plugins.core_plugin'
[DEBUG] Inspecting package attrs
[DEBUG] Package 'attrs' is already up-to-date and will be skipped
[DEBUG] Inspecting package coverage
[DEBUG] Package coverage is added to the list of installation constraints
[DEBUG] Package coverage has a non-exact version specifier and will be updated
[DEBUG] Inspecting package flake8
[DEBUG] Package flake8 is added to the list of installation constraints
[DEBUG] Package flake8 has a non-exact version specifier and will be updated
[DEBUG] Inspecting package pip-tools
[DEBUG] Package pip-tools is added to the list of installation constraints
[DEBUG] Package pip-tools has a non-exact version specifier and will be updated
[DEBUG] Inspecting package plumbum
[DEBUG] Package 'plumbum' is already up-to-date and will be skipped
[DEBUG] Inspecting package pypandoc
[DEBUG] Package pypandoc is added to the list of installation constraints
[DEBUG] Package pypandoc has a non-exact version specifier and will be updated
[DEBUG] Inspecting package setuptools
[DEBUG] Package setuptools is added to the list of installation constraints
[DEBUG] Package setuptools has a non-exact version specifier and will be updated
[DEBUG] Inspecting package twine
[DEBUG] Package twine is added to the list of installation constraints
[DEBUG] Package twine has a non-exact version specifier and will be updated
[DEBUG] Inspecting package unittest-xml-reporting
[DEBUG] Package unittest-xml-reporting is added to the list of installation constraints
[DEBUG] Package unittest-xml-reporting has a non-exact version specifier and will be updated
[DEBUG] Inspecting package wheel
[DEBUG] Package wheel is added to the list of installation constraints
[DEBUG] Package wheel has a non-exact version specifier and will be updated
[INFO]  Processing plugin packages 'coverage~=5.2' to be installed with {'upgrade': True}
[INFO]  Processing plugin packages 'flake8~=3.7' to be installed with {'upgrade': True}
[INFO]  Processing plugin packages 'pip-tools>=1.7.0' to be installed with {'upgrade': True}
[INFO]  Processing plugin packages 'pypandoc~=1.4' to be installed with {'upgrade': True}
[INFO]  Processing plugin packages 'setuptools>=38.6.0' to be installed with {'upgrade': True}
[INFO]  Processing plugin packages 'twine>=1.15.0' to be installed with {'upgrade': True}
[INFO]  Processing plugin packages 'unittest-xml-reporting~=3.0.2' to be installed with {'upgrade': True}
[INFO]  Processing plugin packages 'wheel>=0.34.0' to be installed with {'upgrade': True}
[DEBUG] Executing command: '/NBATwitterCorrelation/.pybuilder/plugins/cpython-3.8.3.final.0/bin/python3.8' '-m' 'pip.__main__' 'install' '--upgrade' '--upgrade-strategy' 'only-if-needed' 'coverage~=5.2' 'flake8~=3.7' 'pip-tools>=1.7.0' 'pypandoc~=1.4' 'setuptools>=38.6.0' 'twine>=1.15.0' 'unittest-xml-reporting~=3.0.2' 'wheel>=0.34.0'
[DEBUG] Executing subtask of 'prepare' from 'pybuilder.plugins.python.core_plugin'
[DEBUG] Creating log directory '/NBATwitterCorrelation/target/logs/install_dependencies'
[INFO]  Creating target 'build' VEnv in '/NBATwitterCorrelation/target/venv/build/cpython-3.8.3.final.0'
[DEBUG] Registered Python environment 'build': CPython version 3.8.3.final.0 on linux in ['/NBATwitterCorrelation/target/venv/build/cpython-3.8.3.final.0/bin/python3.8']
[DEBUG] Inspecting package requirements.txt
[DEBUG] Package requirements.txt is a requirement file and will be updated
[INFO]  Processing dependency packages 'requirements.txt' to be installed with {}
[DEBUG] Executing command: '/NBATwitterCorrelation/target/venv/build/cpython-3.8.3.final.0/bin/python3.8' '-m' 'pip.__main__' 'install' '-c' '/NBATwitterCorrelation/target/venv/build/cpython-3.8.3.final.0/constraints_file' '-r' 'requirements.txt'
[INFO]  Creating target 'test' VEnv in '/NBATwitterCorrelation/target/venv/test/cpython-3.8.3.final.0'
[DEBUG] Registered Python environment 'test': CPython version 3.8.3.final.0 on linux in ['/NBATwitterCorrelation/target/venv/test/cpython-3.8.3.final.0/bin/python3.8']
[DEBUG] Inspecting package requirements.txt
[DEBUG] Package requirements.txt is a requirement file and will be updated
[INFO]  Processing dependency packages 'requirements.txt' to be installed with {}
[DEBUG] Executing command: '/NBATwitterCorrelation/target/venv/test/cpython-3.8.3.final.0/bin/python3.8' '-m' 'pip.__main__' 'install' '-c' '/NBATwitterCorrelation/target/venv/test/cpython-3.8.3.final.0/constraints_file' '-r' 'requirements.txt'
[DEBUG] Executing subtask of 'prepare' from 'pybuilder.plugins.python.coverage_plugin'
[INFO]  Requested coverage for tasks: pybuilder.plugins.python.unittest_plugin:run_unit_tests
[DEBUG] Executing action 'assert_flake8_is_executable' from 'pybuilder.plugins.python.flake8_plugin' before task
[DEBUG] Checking if flake8 is executable.
[DEBUG] Verifying command: 'flake8' '--version'
[DEBUG] Executing action 'set_description' from 'pybuilder.plugins.python.distutils_plugin' before task
[DEBUG] Executing task 'compile_sources'
[DEBUG] Executing subtask of 'compile_sources' from 'pybuilder.plugins.core_plugin'
[DEBUG] Executing task 'run_unit_tests'
[DEBUG] Executing subtask of 'run_unit_tests' from 'pybuilder.plugins.core_plugin'
[DEBUG] Executing subtask of 'run_unit_tests' from 'pybuilder.plugins.python.unittest_plugin'
[INFO]  Running unit tests
[INFO]  Executing unit tests from Python modules in /NBATwitterCorrelation/src/unittest/python
[DEBUG] Including files matching '*_tests'
[WARN]  No unit tests executed.
[INFO]  All unit tests passed.
[DEBUG] Executing task 'package'
[DEBUG] Executing subtask of 'package' from 'pybuilder.plugins.core_plugin'
[DEBUG] Executing subtask of 'package' from 'pybuilder.plugins.python.core_plugin'
[DEBUG] Removing preexisting distribution /NBATwitterCorrelation/target/dist/TextMining-1.0.dev0
[DEBUG] Creating directory /NBATwitterCorrelation/target/dist/TextMining-1.0.dev0
[INFO]  Building distribution in /NBATwitterCorrelation/target/dist/TextMining-1.0.dev0
[DEBUG] Copying module/ package NBADataLoader.py
[INFO]  Copying scripts to /NBATwitterCorrelation/target/dist/TextMining-1.0.dev0/scripts
[DEBUG] Copying script placeholder.py
[DEBUG] Executing action 'write_manifest_file' from 'pybuilder.plugins.python.distutils_plugin' before task
[DEBUG] No data to write into MANIFEST.in
[DEBUG] Executing action 'write_setup_script' from 'pybuilder.plugins.python.distutils_plugin' before task
[INFO]  Writing setup.py as /NBATwitterCorrelation/target/dist/TextMining-1.0.dev0/setup.py
[DEBUG] Executing task 'run_integration_tests'
[DEBUG] Executing subtask of 'run_integration_tests' from 'pybuilder.plugins.core_plugin'
[DEBUG] Executing task 'verify'
[DEBUG] Executing subtask of 'verify' from 'pybuilder.plugins.core_plugin'
[DEBUG] Executing task 'coverage'
[DEBUG] Executing subtask of 'coverage' from 'pybuilder.plugins.python.coverage_plugin'
[DEBUG] Module 'NBADataLoader' (file '/NBATwitterCorrelation/src/main/python/NBADataLoader.py') coverage to be verified
[INFO]  Collecting coverage information for 'pybuilder.plugins.python.unittest_plugin:run_unit_tests'
[WARN]  ut_coverage_branch_threshold_warn is 0 and branch coverage will not be checked
[WARN]  ut_coverage_branch_partial_threshold_warn is 0 and partial branch coverage will not be checked
[DEBUG] Executing task 'run_unit_tests'
[DEBUG] Skipping subtask 'run_unit_tests' from 'pybuilder.plugins.core_plugin'
[DEBUG] Executing subtask of 'run_unit_tests' from 'pybuilder.plugins.python.unittest_plugin'
[INFO]  Running unit tests
[INFO]  Executing unit tests from Python modules in /NBATwitterCorrelation/src/unittest/python
[DEBUG] Including files matching '*_tests'
Coverage.py warning: No data was collected. (no-data-collected)
[WARN]  No unit tests executed.
[INFO]  All unit tests passed.
[DEBUG] Module coverage report: {'module': 'NBADataLoader', 'coverage': 0.0, 'sum_lines': 17, 'lines': [1, 2, 3, 6, 8, 9, 18, 19, 21, 22, 23, 24, 25, 27, 28, 29, 30], 'sum_lines_not_covered': 17, 'lines_not_covered': [1, 2, 3, 6, 8, 9, 18, 19, 21, 22, 23, 24, 25, 27, 28, 29, 30], 'branches': 0, 'branches_partial': 0, 'branches_missing': 0}
[WARN]  Test coverage below 70% for NBADataLoader:  0%
[WARN]  Overall pybuilder.plugins.python.unittest_plugin.run_unit_tests coverage is below 70%:  0%
[INFO]  Overall pybuilder.plugins.python.unittest_plugin.run_unit_tests branch coverage is 100%
[INFO]  Overall pybuilder.plugins.python.unittest_plugin.run_unit_tests partial branch coverage is 100%
[DEBUG] Module coverage report: {'module': 'NBADataLoader', 'coverage': 0.0, 'sum_lines': 17, 'lines': [1, 2, 3, 6, 8, 9, 18, 19, 21, 22, 23, 24, 25, 27, 28, 29, 30], 'sum_lines_not_covered': 17, 'lines_not_covered': [1, 2, 3, 6, 8, 9, 18, 19, 21, 22, 23, 24, 25, 27, 28, 29, 30], 'branches': 0, 'branches_partial': 0, 'branches_missing': 0}
[WARN]  Test coverage below 70% for NBADataLoader:  0%
[WARN]  Overall TextMining coverage is below 70%:  0%
[INFO]  Overall TextMining branch coverage is 100%
[INFO]  Overall TextMining partial branch coverage is 100%
[DEBUG] Executing task 'publish'
[DEBUG] Executing action 'build_binary_distribution' from 'pybuilder.plugins.python.distutils_plugin' before task
[INFO]  Building binary distribution in /NBATwitterCorrelation/target/dist/TextMining-1.0.dev0
[DEBUG] Executing distutils command: ['/NBATwitterCorrelation/.pybuilder/plugins/cpython-3.8.3.final.0/bin/python3.8', '/NBATwitterCorrelation/target/dist/TextMining-1.0.dev0/setup.py', '-v', 'clean', '--all', 'sdist']
[DEBUG] Executing distutils command: ['/NBATwitterCorrelation/.pybuilder/plugins/cpython-3.8.3.final.0/bin/python3.8', '/NBATwitterCorrelation/target/dist/TextMining-1.0.dev0/setup.py', '-v', 'clean', '--all', 'bdist_wheel']
[INFO]  Running Twine check for generated artifcats
[DEBUG] Executing Twine: ['/NBATwitterCorrelation/.pybuilder/plugins/cpython-3.8.3.final.0/bin/python3.8', '-m', 'twine', 'check', '/NBATwitterCorrelation/target/dist/TextMining-1.0.dev0/dist/TextMining-1.0.dev0.tar.gz', '/NBATwitterCorrelation/target/dist/TextMining-1.0.dev0/dist/TextMining-1.0.dev0-py3-none-any.whl']
[DEBUG] Executing subtask of 'publish' from 'pybuilder.plugins.core_plugin'
------------------------------------------------------------
BUILD SUCCESSFUL
------------------------------------------------------------
Build Summary
             Project: TextMining
             Version: 1.0.dev0
      Base directory: /NBATwitterCorrelation
        Environments:
               Tasks: prepare [6244 ms] compile_sources [0 ms] run_unit_tests [134 ms] package [1 ms] run_integration_tests [0 ms] verify [0 ms] coverage [197 ms] publish [647 ms]
Build finished at 2020-10-14 03:52:53
Build took 10 seconds (10718 ms)


Allow function overloads with a varying parameter to unify, and inductively narrow the parameter when narrowing the return type

I don't really know how to word the title for this one or explain it well...but here's what I'm thinking: it would be nice to allow function overloads to unify, provided only one parameter and possibly the return type are different across each overload. Additionally, when narrowing the returned type, it should be able to inductively narrow the overloaded parameter's type accordingly within the same block. To hopefully explain this a little better, here's what I mean:
enum Types { Foo, Bar }
class Foo { foo: number; }
class Bar { bar: number; }
declare function foo(type: Types.Foo, length: number): Foo;
declare function foo(type: Types.Bar, length: number): Bar;

// This should be okay, with `result` inferred as `Foo | Bar`
const type: Types.Foo | Types.Bar = getType();
const result = foo(type, 1);

if (result instanceof Foo) {
    // str is inferred as Types.Foo here
} else {
    // str is inferred as Types.Bar here
}

In this case, if result is a Foo, str can only possibly be a "foo" through induction, and similarly result being a Bar and str being a "bar".
With #12883 also, this would also permit assertions to do compile-time type narrowing, without adding any new syntax or special casing of any particular identifier, hence fixing #12825 and #8655 simultaneously while remaining much more flexible:
declare function assert(cond: true, message: string): void;
declare function assert(cond: false, message: string): never;

I know this would likely be really hard to implement, but it would pay off. It helps that boolean is equivalent to true | false, "foo" is a subtype of string, E is equivalent to E.A | E.B | E.C where enum E {A, B, C}, etc., so much of the structural narrowing would allow this to apply to several other areas.

Note that this would specifically not allow more than one varying type to be unified, because it would be an M⨯N type implication, which would be unrealistic to infer in practice (you would already need length to be similarly guarded in theory):
declare function foo(type: "foo", length: 1): Foo;
declare function foo(type: "bar", length: 2): Foo;

let type: "foo" | "bar" = someType;
let length: 1 | 2 = someLength;
let result = foo(type, length); // Fail

Sorry if I did a really poor job explaining it (I don't really know the correct technical term for this, hence the detailed examples).

Yeah...I've picked up a few things on how partial types, readonly types, _.pluck, among others, were all fixed with two new primitives: index types and mapped types.
Oh, and this also would fix these two (among likely others):

Uninformative error message in #12313 (it could show all nearby overloads instead)
A missing overload in #5766 redundant with this proposal (similarly, lib.d.ts could really be simplified)

If type unions of functions are similarly unified, this would also fix #10620 (among likely others).
Similar induction with objects would also fix #12448, but that's beyond the scope of this proposal.

Duplicate  #7294 ?

I believe these are two issues. 1. issues like String.split (https://github.com/Microsoft/TypeScript/issues/5766), where multiple overloads only differ in type of one parameter, and thus could not be called with a union type argument. and 2. calling signatures on  a union type as (#7294).
In DefinitelyTyped, we have added a tslint rule to flag these cases as an error (see unifiedSignaturesRule). I would could incorporate this into the compiler, and make it an error to have two signatures vary only by the type of one paramter, but this would be a breaking change.

just to clarify what i meant:
interface AcceptsStringAndNumber {
  push(a: string): void;
  push(a: number): void;
}

interface AcceptsString {
  push(a: string): void;
}

interface AcceptsNumber {
  push(a: number): void;
}

type AcceptsStringOrNumber = AcceptsString | AcceptsNumber;

var value: string | number;

var acceptsStringAndNumber: AcceptsStringAndNumber;
acceptsStringAndNumber.push(value); // Safe, but not allowed

var acceptsStringOrNumber: AcceptsStringOrNumber;
acceptsStringOrNumber.push(value); // Unsafe, and not allowed

Yes, that is the correct understanding of the current state. In particular,
I'm proposing the safe one to be unified, not the unsafe one.
(This is mod the return type half, which is much more complex)
On Wed, Dec 14, 2016, 18:09 Mohamed Hegazy<EMAIL_ADDRESS>wrote:

just to clarify what i meant:
interface AcceptsStringAndNumber {
push(a: string): void;
push(a: number): void;
}
interface AcceptsString {
push(a: string): void;
}
interface AcceptsNumber {
push(a: number): void;
}
type AcceptsStringOrNumber = AcceptsString | AcceptsNumber;
var value: string | number;
var acceptsStringAndNumber: AcceptsStringAndNumber;acceptsStringAndNumber.push(value); // Safe, but not allowed
var acceptsStringOrNumber: AcceptsStringOrNumber;acceptsStringOrNumber.push(value); // Unsafe, and not allowed
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/Microsoft/TypeScript/issues/12885#issuecomment-267185880,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AERrBKiOF8R0PbxFVio-r3Tar-DoP78aks5rIHc5gaJpZM4LL5ym
.

@mhegazy
To clarify the return type half and its related inference, it's this:
declare const stringOrNumber: string | number;

declare function convert(s: string): string;
declare function convert(n: number): number;

const result = convert(stringOrNumber);

if (typeof result === "string") {
    // stringOrNumber is type `string` here
} else {
    // stringOrNumber is type `number` here
}

related: #6160

Closing in favor of #13257, since that is a better thought out, more general superset of this.


error Command failed with exit code 137.

Initial public key import completed.
chainpoint-node_1  | 2017-09-22T06:59:28.737655570Z Node syncing local calendar with Core...
chainpoint-node_1  | 2017-09-22T06:59:28.738900578Z Validating Node Calendar blocks...
chainpoint-node_1  | 2017-09-22T06:59:32.663365968Z Validated Node Calendar blocks 0 to 61299
chainpoint-node_1  | 2017-09-22T06:59:32.671903603Z Retrieving Node Calendar most recent block info
chainpoint-node_1  | 2017-09-22T06:59:32.682581456Z Node Calendar height = 61299
chainpoint-node_1  | 2017-09-22T06:59:32.968609069Z Blockrange 613 not ready yet
chainpoint-node_1  | 2017-09-22T06:59:32.972915118Z Node startup completed successfully!
chainpoint-node_1  | 2017-09-22T06:59:34.498643894Z Killed
chainpoint-node_1  | 2017-09-22T06:59:34.500561974Z error Command failed with exit code 137.
What do I do?

root@ubuntu-512mb-sfo2-01:~/chainpoint-node# make logs
docker-compose logs -f -t | grep chainpoint-node
Attaching to chainpointnode_chainpoint-node_1, chainpointnode_postgres_1, chainp                                                                                ointnode_redis_1
chainpoint-node_1  | 2017-09-22T07:04:37.403494431Z yarn start v0.24.6
chainpoint-node_1  | 2017-09-22T07:04:37.487899468Z $ node server.js
chainpoint-node_1  | 2017-09-22T07:04:38.760796570Z Redis connection established                                                                                .
chainpoint-node_1  | 2017-09-22T07:04:38.768273262Z CoreHost selected from DNS :                                                                                b.chainpoint.org
chainpoint-node_1  | 2017-09-22T07:04:38.899456100Z Postgres connection establis                                                                                hed.
chainpoint-node_1  | 2017-09-22T07:04:38.917287610Z Found existing Node authenti                                                                                cation key for TNT address 0x22f9ed92b2db2165da32d231cbf4a2b82d30af94
chainpoint-node_1  | 2017-09-22T07:04:39.067692838Z Node registration with Core                                                                                confirmed and updated.
chainpoint-node_1  | 2017-09-22T07:04:39.068095822Z ****************************                                                                                **************************************************
chainpoint-node_1  | 2017-09-22T07:04:39.068110755Z Node private authentication                                                                                key (back me up!): 682cd90ee2cc46fa-----------------------------------------------79a85ab4852                                                                                e15
chainpoint-node_1  | 2017-09-22T07:04:39.068116679Z ****************************                                                                                **************************************************
chainpoint-node_1  | 2017-09-22T07:04:39.098623787Z Initial public key import co                                                                                mpleted.
chainpoint-node_1  | 2017-09-22T07:04:39.105047881Z Node syncing local calendar                                                                                with Core...
chainpoint-node_1  | 2017-09-22T07:04:39.105540121Z Validating Node Calendar blo                                                                                cks...
chainpoint-node_1  | 2017-09-22T07:04:41.332766730Z Validated Node Calendar bloc                                                                                ks 0 to 61299
chainpoint-node_1  | 2017-09-22T07:04:41.338561750Z Retrieving Node Calendar mos                                                                                t recent block info
chainpoint-node_1  | 2017-09-22T07:04:41.346630351Z Node Calendar height = 61299
chainpoint-node_1  | 2017-09-22T07:04:42.860194043Z Validated and stored Core bl                                                                                ocks 61300 to 61399
chainpoint-node_1  | 2017-09-22T07:04:42.958286115Z Blockrange 614 not ready yet
chainpoint-node_1  | 2017-09-22T07:04:42.961423482Z Node startup completed succe                                                                                ssfully!
chainpoint-node_1  | 2017-09-22T07:04:51.146980009Z Killed
chainpoint-node_1  | 2017-09-22T07:04:51.151580948Z error Command failed with ex                                                                                it code 137.
chainpointnode_chainpoint-node_1 exited with code 1
In the beginning writes

#46


Devices ID column sort

The Devices table 'Row' and 'ID' columns should do a numerical sort, currently it seems to be alphabetical so the sort by 1, 10, 11.

Yeah, laziness.... I need to modify someone elses sort code....


Persist pdf data in Milvus for later use

Using Langchain, I used Milvus vector db to ingest all my document as per @ https://python.langchain.com/en/latest/modules/indexes/vectorstores/examples/milvus.html. Now later I want to get a handle to vector_db and start to query Milvus. How do I achieve this? In the example in the link, it is querying the vector_db immediately. Imagine, once I call from_documents, I set the vector_db=None and later I need to load the collection back and query. How do I do that for Milvus?

After inserting data into Milvus, you can use this code to connect with Milvus, where "collection_name" is the collection you have already inserted into Milvus, and "index_params" is the field name you want to search:
vector_db = Milvus(
embeddings,
connection_args={"host": "<IP_ADDRESS>", "port": "19530"},
collection_name="sample",
index_params="text"
)

After inserting data into Milvus, you can use this code to connect with Milvus, where "collection_name" is the collection you have already inserted into Milvus, and "index_params" is the field name you want to search:
vector_db = Milvus(
           embeddings,
           connection_args={"host": "<IP_ADDRESS>", "port": "19530"},
           collection_name="sample",
           index_params="text"
       )

This doesn't work because of this in the Langchain Milvus implementation:
    def _init(
        self, embeddings: Optional[list] = None, metadatas: Optional[list[dict]] = None
    ) -> None:
        if embeddings is not None:
            self._create_collection(embeddings, metadatas)
        self._extract_fields()
        self._create_index()
        self._create_search_params()
        self._load()

Yeah... i'm also searching how to make it. All examples in langchain docs show how to perform short term use, but none for long term use cases.

After inserting data into Milvus, you can use this code to connect with Milvus, where "collection_name" is the collection you have already inserted into Milvus, and "index_params" is the field name you want to search:
vector_db = Milvus(
           embeddings,
           connection_args={"host": "<IP_ADDRESS>", "port": "19530"},
           collection_name="sample",
           index_params="text"
       )

This doesn't work because of this in the Langchain Milvus implementation:
    def _init(
        self, embeddings: Optional[list] = None, metadatas: Optional[list[dict]] = None
    ) -> None:
        if embeddings is not None:
            self._create_collection(embeddings, metadatas)
        self._extract_fields()
        self._create_index()
        self._create_search_params()
        self._load()

The Milvus wrapper will try to create a new index and load it while not needed.

Hello Guys,
I went through the code, and I'm pretty sure that you don't have to pass the index_params argument a second time once you already created the collection. It will automatically use the current collection index_params. If you pass the index_params, it will use these index parameters, but you will also have to change search_params to match the index_params.
Here is a short example using hugging face embeddings.
Create a new collection from texts using hugging face embeddings.
from langchain.vectorstores import Milvus
from langchain.embeddings import HuggingFaceEmbeddings

import os

os.environ["HUGGINGFACEHUB_API_TOKEN"] = "your_huggingface_api_key"

HUGGING_FACE_MODEL_ID = "bert-base-uncased"
MILVUS_COLLECTION_NAME = "test_collection"

embeddings = HuggingFaceEmbeddings(model_name=HUGGING_FACE_MODEL_ID)

texts = ["foo", "bar", "baz"]

# Create a new collection from texts
vector_db: Milvus = Milvus.from_texts(
    texts,
    embedding=embeddings,
    collection_name=MILVUS_COLLECTION_NAME,
    connection_args={"host": "<IP_ADDRESS>", "port": "19530"},
)

# Search for similar documents
docs = vector_db.similarity_search(query="foo", k=1)

print("===============================================================")
print("docs: ", docs)
print("===============================================================")

Load existing collection and perform a search
from langchain.vectorstores import Milvus
from langchain.embeddings import HuggingFaceEmbeddings

import os

os.environ["HUGGINGFACEHUB_API_TOKEN"] = "your_huggingface_api_key"

HUGGING_FACE_MODEL_ID = "bert-base-uncased"
MILVUS_COLLECTION_NAME = "test_collection"
embeddings = HuggingFaceEmbeddings(model_name=HUGGING_FACE_MODEL_ID)

# Get existing collection from Milvus
vector_db: Milvus = Milvus(
    embeddings,
    collection_name=MILVUS_COLLECTION_NAME,
    connection_args={"host": "<IP_ADDRESS>", "port": "19530"},
)

# Search for similar documents
docs = vector_db.similarity_search(query="foo", k=1)

print("===============================================================")
print("docs: ", docs)
print("===============================================================")

Here is the code if you wish to update the index_params after the collection is already created, but I wouldn't recommend doing this. A better solution would be to create a new collection with the index parameters that you want and generate new embeddings for all documents.
# Get existing collection from Milvus with changing index parameters
vector_db: Milvus = Milvus(
    embeddings,
    collection_name=MILVUS_COLLECTION_NAME,
    index_params={
        "metric_type": "IP",
        "index_type": "FLAT",
    },
    search_params={"metric_type": "IP"},
    connection_args={"host": "<IP_ADDRESS>", "port": "19530"},
)

I want to connect to a given Milvus DB without having to add 'texts' and 'embedding' again. This makes no sense.
from_texts() missing 2 required positional arguments: 'texts' and 'embedding'
Any news on this?

Hi @fabmeyer,
You can use constructor if you already have collection.
# Get existing collection from Milvus with changing index parameters
vector_db: Milvus = Milvus(
    embedding_function=embeddings,
    collection_name=MILVUS_COLLECTION_NAME,
    index_params={
        "metric_type": "IP",
        "index_type": "FLAT",
    },
    search_params={"metric_type": "IP"},
    connection_args={"host": "<IP_ADDRESS>", "port": "19530"},
)

@martinholecekmax
Thanks for the reply. Isn't it possible to connect to an existing Milvus DB without having to provide an embedding function?

Thank you for your question. In the context of working with Milvus, it's important to note that embeddings play a crucial role. The embeddings are used to convert your data into a format that Milvus can understand and work with, which is crucial for conducting vector similarity searches.
While you can certainly connect to an existing Milvus DB without providing an embedding function, you wouldn't be able to perform any meaningful operations or run queries on your data unless it has been embedded. The vector embeddings are essentially the 'language' that Milvus uses to process and compare data, and without them, the functionality of the database would be significantly limited.
Therefore, the provision of an embedding function is not optional in the code implementation. Without it, the core functionality that Milvus provides, such as similarity search and nearest neighbor search, would not be possible. It's like trying to read a book without knowing the language it's written in; you may have access to the book, but without understanding the language, the content will be incomprehensible. The same goes for Milvus without embeddings.

Continuing from my previous point, @fabmeyer, while you can technically use 'fake' embeddings from this link, they lack the semantic value necessary for effective operations like similarity searches in Milvus. Even though connection to the database is possible, the lack of genuine embeddings reflecting your data will render your query results meaningless. Therefore, the use of authentic embeddings remains indispensable. I hope this explanation makes the concept clearer.


Bug #5527 wizard breadcrumb Concept

This would require some minor adjustments to the wizards xml , for it to make sense everywhere.

Perhaps a good compromise would be to note here what those "minor adjustments" should be. THat would allow others to more easily take on the work?

@sbeaver-netgate found some time: i've adjusted the xml's but they might require some polishing.
the  tags could use some more information, but i'm not all that good with words (&  english isn't my native language)

Thank you!

Thanks again. Though it may not be your first language, your English is better than some people for whom it is their only language :)


adafruit-pi-cam - error in line 567

Turotial for this app is grat! but,....at the beginning an explanation.
I use a 3.2 "LCD (LCD-PI32), because I'm waiting for Adafruit PiTFT LCD when it will be on sale.
The installation went without problems, but when I type the command
sudo python cam.py get an error message.:
"File cam.py, line 567, in module pygame.mouse.set_visible (False)
pygame.error: video system not initialized
is there any solution for this?
and last one - I'm not a I'm not an advanced user
Regards,
Lukasz

I had the same problem with "pygame.error: video system not initialized".
I referred to robertimorrison's solution in the following link:
https://www.raspberrypi.org/forums/viewtopic.php?f=38&t=73304
The problem is solved by changing the touchscreen environment variable.


Need some CNN training examples

Hello
A part pf my job is to  deploy ONNX model . And i find this excellent project which may make my work better,but  i'm not a NLP worker so the examples are hard for me to understand.
Maybe there need some CNN training examples so we can join the project.

Hello @DennisJcy : Have you looked at this examples using a vision transformer? : https://github.com/microsoft/onnxruntime-training-examples/tree/master/aml_vision/image-classification

@DennisJcy we just added some instructions to fine-tune foundational vision models with AzureML and ONNX Runtime Training. Please have a try with the apple/mobilevit-small model. It is the only one of the 5 supported vision architectures that utilizes convolutional layers.
https://github.com/microsoft/onnxruntime-training-examples/tree/master/ImageClassification-finetune

Closing stale issue, @DennisJcy please add more details and re-open if anything else needs follow-up.


colord: add enableSystemd option

Since https://github.com/NixOS/nixpkgs/pull/345979, building colord is necessary to build xdg-desktop-portal-gtk, but it wasn't possible for systems that can't use systemd.
I've called the option "enableSystemd" for consistency with the existing "enableDaemon" option.
As usual in Nixpkgs, the user is responsible for also overriding udev
to a non-systemd implementation if necessary.
Things done

Built on platform(s)

[x] x86_64-linux
[ ] aarch64-linux
[ ] x86_64-darwin
[ ] aarch64-darwin

For non-Linux: Is sandboxing enabled in nix.conf? (See Nix manual)

[ ] sandbox = relaxed
[ ] sandbox = true

[ ] Tested, as applicable:

NixOS test(s) (look inside nixos/tests)
and/or package tests
or, for functions and "core" functionality, tests in lib/tests or pkgs/test
made sure NixOS tests are linked to the relevant packages

[ ] Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
[ ] Tested basic functionality of all binary files (usually in ./result/bin/)
24.11 Release Notes (or backporting 23.11 and 24.05 Release notes)

[ ] (Package updates) Added a release notes entry if the change is major or breaking
[ ] (Module updates) Added a release notes entry if the change is significant
[ ] (Module addition) Added a release notes entry if adding a new NixOS module

[x] Fits CONTRIBUTING.md.

Add a :+1: reaction to pull requests you find important.

@OfBorg build eudev.tests.pkg-config libudev-zero.tests.pkg-config systemd.tests.pkg-config


on_click event

does it possible to make something like go-to-node after click node in navic?

Should be possible 🤔

So can you help me to do that?

I was thinking this could be a setting option in nvim-navic..

So can you help me to do that?

I am also not sure how exactly this should be achieved. It will require adding labels in statusline/winbar of format %@SomeVimScriptFunction@ClickableText%X. So I think one way of doing it is to generate vimscript functions at runtime that jump cursor to required location. Will have to figure out how functions can be built on runtime 🤔 .
And if its possible, is it really a good idea to create functions on every cursor moved events, will the functions accumulate into 100's or 1000's of functions definitions? These are some things that we need to figure out.

this code was in lspsaga to make same functional
 function(line_start, line_end, clicks, button, modifiers)
	if button == "l" then
		if clicks == 2 then
			-- double left click to visual select node
			vim.cmd("execute 'normal vv' | " .. line_start .. "mark < | " .. line_end .. "mark > | normal gvV")
		else
			vim.cmd(":" .. line_start) -- jump to node's starting line
		end
	elseif button == "r" then
		if modifiers == "s" then
			-- shift right click to print "something"
			print "something"
		end
		vim.cmd(":" .. line_end) -- jump to node's ending line
	elseif button == "m" then
			-- middle click to visual select node
			vim.cmd("execute 'normal vv'  | " .. line_start .. "mark < | " .. line_end .. "mark > | normal gvV")
		end
	end
end

does it usefull?

https://github.com/neovim/neovim/pull/18650 and this

Will take a look into it.. looks usefull 🤔

from https://github.com/rebelot/heirline.nvim/blob/master/cookbook.md
-- Awesome plugin

-- The easy way.
local Navic = {
    condition = function() return require("nvim-navic").is_available() end,
    provider = function()
        return require("nvim-navic").get_location({highlight=true})
    end,
    update = 'CursorMoved'
}

-- Full nerd (with icon colors and clickable elements)!
-- works in multi window, but does not support flexible components (yet ...)
local Navic = {
    condition = function() return require("nvim-navic").is_available() end,
    static = {
        -- create a type highlight map
        type_hl = {
            File = "Directory",
            Module = "@include",
            Namespace = "@namespace",
            Package = "@include",
            Class = "@structure",
            Method = "@method",
            Property = "@property",
            Field = "@field",
            Constructor = "@constructor",
            Enum = "@field",
            Interface = "@type",
            Function = "@function",
            Variable = "@variable",
            Constant = "@constant",
            String = "@string",
            Number = "@number",
            Boolean = "@boolean",
            Array = "@field",
            Object = "@type",
            Key = "@keyword",
            Null = "@comment",
            EnumMember = "@field",
            Struct = "@structure",
            Event = "@keyword",
            Operator = "@operator",
            TypeParameter = "@type",
        },
        -- bit operation dark magic, see below...
        enc = function(line, col, winnr)
            return bit.bor(bit.lshift(line, 16), bit.lshift(col, 6), winnr)
        end,
        -- line: 16 bit (65535); col: 10 bit (1023); winnr: 6 bit (63)
        dec = function(c)
            local line = bit.rshift(c, 16)
            local col = bit.band(bit.rshift(c, 6), 1023)
            local winnr = bit.band(c,  63)
            return line, col, winnr
        end
    },
    init = function(self)
        local data = require("nvim-navic").get_data() or {}
        local children = {}
        -- create a child for each level
        for i, d in ipairs(data) do
            -- encode line and column numbers into a single integer
            local pos = self.enc(d.scope.start.line, d.scope.start.character, self.winnr)
            local child = {
                {
                    provider = d.icon,
                    hl = self.type_hl[d.type],
                },
                {
                    -- escape `%`s (elixir) and buggy default separators
                    provider = d.name:gsub("%%", "%%%%"):gsub("%s*->%s*", ''),
                    -- highlight icon only or location name as well
                    -- hl = self.type_hl[d.type],

                    on_click = {
                        -- pass the encoded position through minwid
                        minwid = pos,
                        callback = function(_, minwid)
                            -- decode
                            local line, col, winnr = self.dec(minwid)
                            vim.api.nvim_win_set_cursor(vim.fn.win_getid(winnr), {line, col})
                        end,
                        name = "heirline_navic",
                    },
                },
            }
            -- add a separator only if needed
            if #data > 1 and i < #data then
                table.insert(child, {
                    provider = " > ",
                    hl = { fg = 'bright_fg' },
                })
            end
            table.insert(children, child)
        end
        -- instantiate the new child, overwriting the previous one
        self.child = self:new(children, 1)
    end,
    -- evaluate the children containing navic components
    provider = function(self)
        return self.child:eval()
    end,
    hl = { fg = "gray" },
    update = 'CursorMoved'
}


fix: update to the latest version of the service

Fixes #13.  This fixes the synth file, and makes a few other cleanup changes.

FYI - broken link is to npmjs.org pointing to this module, which has not been published yet.


Pipeline resource limits

This PR:

renames resource_spec to resource_requests in the pipeline spec
adds support for resource_limits in the pipeline spec
uses the limits to specify GPU resources

Please make sure you update the pipeline spec docs as well as open issues for broader documentation that may need to be done.

On Nov 10, 2017, at 2:46 PM, Sean Jezewski<EMAIL_ADDRESS>wrote:
WIP
You can view, comment on, or merge this pull request online at:
https://github.com/pachyderm/pachyderm/pull/2507
Commit Summary
Debug deploying k8s 1.8
Fix compile bug
String resource limits for GPU through
Specify resource requests/limits on a pipeline
Add resource limits to pipelines
Update protos, fix compile errors, update test
File Changes
M etc/kube/internal.sh (15)
M etc/kube/start-kube-docker.sh (4)
M src/client/pps/pps.pb.go (1069)
M src/client/pps/pps.proto (12)
M src/server/pachyderm_test.go (79)
M src/server/pkg/util/util.go (31)
M src/server/pps/pretty/pretty.go (18)
M src/server/pps/server/api_server.go (85)
M src/server/pps/server/master.go (19)
M src/server/pps/server/worker_rc.go (39)
M src/server/worker/master.go (13)
Patch Links:
https://github.com/pachyderm/pachyderm/pull/2507.patch
https://github.com/pachyderm/pachyderm/pull/2507.diff
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or mute the thread.

Actually 1 very minor comment about a missing comma in the docs.

Additionally, I've tested this on k8s 1.8 and it gets us past the GPU error we were seeing.


enhance-profiling-support

Enable more hardware telemetry to be recorded to the trace and final report produced by the geopm profiler.

Duplicate of issue #13


Metadata Ternary Value not set properly when it's FALSE

Seems that Ternary Value is not set properly when it's FALSE.
This input, with slave_renotify to True,
my_zones:
  - name: "catalog.example."
    properties:
      kind: "Consumer"
      masters: "[...]"
    metadata:
      slave_renotify: True

produces this output, SLAVE-RENOTIFY has proper value.
$ pdnsutil show-zone catalog.example
This is a Consumer zone
...
Refresh interval: 60 seconds
Zone is not actively secured
Metadata items:
	SLAVE-RENOTIFY	1
	SOA-EDIT-API	DEFAULT
	SOA-EDIT-DNSUPDATE	DEFAULT
No keys for zone 'catalog.example'.

But, input, when  slave_renotify is forced to be 0, because this zone should not be notified to secondary,
my_zones:
  - name: "catalog.example."
    properties:
      kind: "Consumer"
      masters: "[...]"
    metadata:
      slave_renotify: False

produces this output, when SLAVE-RENOTIFY is unset, that makes zone inherit global settings:
$ pdnsutil show-zone catalog.example
This is a Consumer zone
...
Refresh interval: 60 seconds
Zone is not actively secured
Metadata items:
	SOA-EDIT-API	DEFAULT
	SOA-EDIT-DNSUPDATE	DEFAULT
No keys for zone 'catalog.example'.

Expected result would be this, preventing zone to be notified to secondary servers.
$ pdnsutil show-zone catalog.example
This is a Consumer zone
...
Refresh interval: 60 seconds
Zone is not actively secured
Metadata items:
	SLAVE-RENOTIFY	0
	SOA-EDIT-API	DEFAULT
	SOA-EDIT-DNSUPDATE	DEFAULT
No keys for zone 'catalog.example'.

I'm adding tests for this in #137.

All the tests in https://github.com/kpfleming/ansible-powerdns-auth/blob/issue-136/workflow-support/test-zone-issue-136.yml currently pass (of course those could be false reports...).
Please determine if those tests do not cover your situation and I'll add some more!

Well it turns out that if you actually run the tests you'll learn useful information... at least one of the tests is failing, so I'll find a fix.

Thank you for having a look to the issue. I was running a module with already existent zones, trying to modify them, zones were also created with the module, if that can help.

The tests have confirmed the problem you are having, which is 90% of the battle to fixing it :-)

OK, well, thank you for reporting this! There was indeed a nasty problem deep in the metadata-handling code... I vaguely remember running into a similar situation years ago when I wrote it, found a 'fix', but wasn't happy with the fix. As it turns out, it was only a partial fix.
The simple version is that if you set a metadata value to any 'falsy' value (False, 0, empty string, etc.) the code would set the default value for that type instead... and in the case of a ternary value, that means deleting the metadata item. Since the default values for binary metadata items are typically zero or False anyway, this wasn't easy to notice. List-type values had always been problematic, but the new code takes care of those too.
I'll merge the fix into main now; if you're able to test that easily please let me know and I'll wait to make a release. If not I'll tag-and-release and hope for the best :-)

It works now, great! Thank you for so fast fix!


Suggestion: replace application/problem+json instead of application/json

In exception filter, I think that we should return the "correct" content type for errors:
context.HttpContext.Response.ContentType = "application/problem+json";

Source: https://tools.ietf.org/html/rfc7807

Added to roadmap.


Removed animation

Description
Issue 1: removed animation from shopping
Isuue 2 & 3" removed animation and added a button to select city in hotels and weather

issue 2 & 3

Fixes #403
Type of change
Just put an x in the [] which are valid.

[X] Bug fix (non-breaking change which fixes an issue)
[ ] New feature (non-breaking change which adds functionality)
[ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)

How Has This Been Tested?
Please describe the tests that you ran to verify your changes.

[X] ./gradlew assembleDebug assembleRelease
[X] ./gradlew checkstyle

Checklist:

[X] My code follows the style guidelines of this project
[X] I have performed a self-review of my own code
[X] I have commented my code, particularly in hard-to-understand areas
[X] I have made corresponding changes to the documentation
[X] My changes generate no new warnings

Looks good @Diksha2008 👍


Add jruby files for the current and previous two minor versions.

Adding the latest release of jruby (<IP_ADDRESS>), plus the two previous patch versions for the 1.7.x and 1.6.x versions (21 and 8 respectively).
Referenced the sha1 values listed on the jruby.org site.
Please let me know if there are any changes that should be made in case this isn't formatted exactly right.

Hey there,
looks like tests have passed. Anything else I should do here? Let me know !

Ideally it would have been done in three separate commits, one for each formula, but unless you want to do that in the next couple hours I'll pull this as-is later this evening.

Ah, I see. Should I have done three commits in one PR, or one commit per PR? Just want to be clear for next time (I probably won't get a chance to touch this until a bit later)

All in the same PR is fine, but one commit per formula added with the commit message something like:
jruby168 1.6.8 (new formula)

Ok, I've got a few minutes, so should have this up shortly.

Merged! Thank you for your contribution to Versions, and speedy response to the various feedback on this. Really appreciate that.


refactor(reflection): replace eval call in TypeReflector

Implemented TypeValidator class to remove the use of eval in the TypeReflector::accepts() function. This refactor improves security, adds explicit type validation, and handles built-in, class, and compound types.

I've been waiting for this PR, THANK YOU! I'm a little on the fence about having this be in a separate class though. What are the pros and cons?

At first, I used a private function for type-checking, but ran into trouble when dealing with Union and Intersection types. To avoid repeating code, I reorganised things so that validation is handled separately.
Pros

Makes type validation testable and allows it to be used elsewhere

think adding to collection instead of doing a reflection check every time we basically do a string comparison

avoids making an internal isBuiltIn to handle any definition and public user facing isBuiltIn

Cons

Increased complexity especially because it's only used in one place right now
Adds performance overhead because creating a TypeReflector is basically creating 2 objects

Granted this can be either abstracted to a trait or Union and Intersection types can create a new TypeReflector and validate based on that... Now that I'm typing this out, the latter option sounds a lot cleaner.

Jip, a lot cleaner, and argueably simpler

May I suggest this PR name?
refactor(reflection): replace `eval` call in `TypeReflector`

Thank you, @Phil-Venter!


Perform token introspection on generic token introspection urls

Change the oauth2 block to potentially look something like
{
  "type":"oauth2",
  "provider":"generic",
  "introspectionUrl":"http://tokens.com/debug?token="
}

@taylorking which oauth2 block? In the Swagger? Assuming "yes", this will result in invalid swagger, so it needs to use some sort of x- extension format.


Provide a http.Handler, http.HandlerFunc to alter log level during runtime

The user program can implement such logic independently, but a bundled one could be convenient. And share a common API.
Then the user program can serve this handler like the pprof, promhttp.Handler do.
If so, we could run with info or warning level in production, and turn to debug if something goes wrong. Something like:
curl -XPOST <IP_ADDRESS>:8080/logging -d '{"level":"debug"}'

We can also do some more with Fields, turning log level to debug only if the log entry has specific fields.

If it's a common needs, I'm glad to work on this.


update rand crate to 0.8

Fix: #2888
make test passes on aarch64-apple-darwin rust v1.56.1

hello @g-k nice to see you here ;) & thanks for the patch
Looks like clippy is complaining on it:
https://github.com/uutils/coreutils/pull/2893/files

Hi Sylvestre, good to see you here too!
Updates:

fixed another rng.gen_range call to use a range in  a632f3a
filed https://github.com/rust-random/rand/issues/1212 for the clippy warning, since it's "Deprecated since 0.8.4: removal due to lack of usage"
on i686 and x86_64 still seeing this error:

error[E0599]: the method `gen` exists for mutable reference `&mut G`, but its trait bounds were not satisfied
Error:    --> src/uu/factor/src/factor.rs:281:11
    |
281 |         g.gen()
    |           ^^^ method cannot be called on `&mut G` due to unsatisfied trait bounds
    |
    = note: the following trait bounds were not satisfied:
            `G: rand::RngCore`
            which is required by `G: Rng`
            `&mut G: rand::RngCore`
            which is required by `&mut G: Rng`
    = help: items from traits can only be used if the trait is in scope
help: the following trait is implemented but not in scope; perhaps add a `use` for it:
    |
8   | use rand::Rng;
    |

I'll try to address that on a failing architecture.

I was going through our issues and found some related issues:

https://github.com/uutils/coreutils/issues/2528
https://github.com/rust-random/rand/issues/1152

Aha, thanks Terts! I closed the issue I made in rust-random/rand and I'll copy the relevant code over.
How closely is this project trying to match GNU coreutils? I didn't see that documented anywhere, but https://github.com/uutils/coreutils/issues/2528 makes a good case for switching to --random-seed.

How closely is this project trying to match GNU coreutils?

In general, we try to stay as close as possible, at least for now. In practice, it also depends on how much a feature is used. I like the solution you've come up with!

To me, the priority is to have rust/coreutils as a dropped in replacement but I don't mind adding stuff (or adding aliases) when it makes sense

Cool! That makes sense. I'll keep this PR focused on updating rand.
Rebased on the clap 3 upgrade and:

on aarch64-apple-darwin / rust v1.58.1 (db9d1b20b 2022-01-20) clippy and test pass
on stable-x86_64-unknown-linux-gnu / rustc 1.58.1 (db9d1b20b 2022-01-20) clippy passes and different tests fail (seems weird and unrelated to the rand update so maybe CI will reveal something):

failures:

---- test_du::test_du_h_flag_empty_file stdout ----
current_directory_resolved:
run: /home/gguthe/coreutils/target/debug/coreutils du -h empty.txt
thread 'test_du::test_du_h_flag_empty_file' panicked at 'assertion failed: `(left == right)`

Diff < left / right > :
<"1.0K\tempty.txt\n"
>"0\tempty.txt\n"

', tests/common/util.rs:233:9

---- test_du::test_du_threshold stdout ----
current_directory_resolved:
run: /home/gguthe/coreutils/target/debug/coreutils du --threshold=10K
thread 'test_du::test_du_threshold' panicked at ''11	.
' does not contain 'links'', tests/common/util.rs:386:9

---- test_du::test_du_time stdout ----
current_directory_resolved:
run: /home/gguthe/coreutils/target/debug/coreutils touch -a -t<PHONE_NUMBER>00 date_test
run: /home/gguthe/coreutils/target/debug/coreutils touch -m -t<PHONE_NUMBER>00 date_test
run: /home/gguthe/coreutils/target/debug/coreutils du --time date_test
thread 'test_du::test_du_time' panicked at 'assertion failed: `(left == right)`

Diff < left / right > :
<"1\t2016-06-16 00:00\tdate_test\n"
>"0\t2016-06-16 00:00\tdate_test\n"

', tests/common/util.rs:233:9

---- test_ls::test_ls_long_total_size stdout ----
current_directory_resolved:
touch: /tmp/.tmp9T0aPj/test-long
write(append): /tmp/.tmp9T0aPj/test-long
touch: /tmp/.tmp9T0aPj/test-long2
write(append): /tmp/.tmp9T0aPj/test-long2
run: /home/gguthe/coreutils/target/debug/coreutils ls -l
thread 'test_ls::test_ls_long_total_size' panicked at ''total 2
-rw-rw-r-- 1 gguthe gguthe    1 Jan 20 21:07 test-long
-rw-rw-r-- 1 gguthe gguthe    1 Jan 20 21:07 test-long2
' does not contain 'total 8'', tests/common/util.rs:386:9

failures:
    test_du::test_du_h_flag_empty_file
    test_du::test_du_threshold
    test_du::test_du_time
    test_ls::test_ls_long_total_size

test result: FAILED. 1444 passed; 4 failed; 27 ignored; 0 measured; 0 filtered out; finished in 28.86s

Repro'd the earlier E0599 error on aarch64-apple-darwin and updated factor's quickcheck dep to a compatible rand version to fix it. Top-level cargo test passes now but the following factor tests fail with 'attempt to multiply with overflow' panics now:
failures:
    miller_rabin::tests::composites
    numeric::gcd::tests::linearity
    numeric::gcd::tests::multiplicative
    numeric::gcd::tests::scalar_multiplication
    numeric::modular_inverse::tests::random_values_u32
    numeric::modular_inverse::tests::random_values_u64

test result: FAILED. 33 passed; 6 failed; 0 ignored; 0 measured; 0 filtered out; finished in 1.06s

So, just to check that I got it right. You updated quickcheck, which now generates numbers from the entire range of a numeric type, which overflows the factor tests because it multiplies numbers from that range? Can we (in some cases) fix this more elegantly by telling quickcheck we want u32 and then casting to u64 for the multiplied result?

You updated quickcheck, which now generates numbers from the entire range of a numeric type, which overflows the factor tests because it multiplies numbers from that range?

Yep! On main I haven't seen the Arbitrary impl for Factors generate anything >=100 across a handful of runs (printing from the function even with RUST_LOG=quickcheck cargo test -- --nocapture didn't work, so I printed generated values from the tests that fail after upgrading).
I haven't dug into how https://github.com/BurntSushi/quickcheck/commit/71d743a22946136bb163722918dc45e45885baba might've caused it to use such a small range.

Can we (in some cases) fix this more elegantly by telling quickcheck we want u32 and then casting to u64 for the multiplied result?

Possibly, the Arbitrary impl returns a Factors type which stores a numbers factors as a vec of u64 primes. I was trying to not change the Factors struct and reuse the factor constructor fn which takes a u64. (I also tried factor(u32::arbitrary(g).into()) and Factors(RefCell::new(Decomposition::one())) but I still ended up with wider u64s).
Other options:

keep quickcheck rand on the older version of rand (might need to split the tests into a separate file)
find an cleaner way to handle the new failures

ignore the newly failing tests
look for a config flag to change how arithmetic is handled for the tests
register a panic handler to suppress the quickcheck panics

do smaller clean up things

add a test helper fn for checked arithmetic to DRY up c3450cd
tidy up the numeric::modular_inverse::tests::random_values_u{32,64} tests since those pass with wrapped muls instead of checked muls. I'm not sure that gets closer to the intent of the original test logic.

I'm sure I've missed other options too. Digging into how quickcheck uses the Arbitrary impl might be worthwhile.

Alright, thanks for the explanation! Given these options, I think the current implementation is fine then!

excellent, thanks :)


Text about log in link is not easy to see

We've got a user report that the text that pops up when you get emailed a log in link is not easy to see, and that the greyed out "Continue" button causes extra confusion.
Maybe we could move the text to replace the continue button and hide the button: so it would appear right where the user is looking at after they press the button?

That's a great recommendation! Once the user selects "Continue", some sort of instructional text follow-up would clarify what to do next.

This is the current flow, which is not so clear:
Before clickign continue:

After:

An alternative would be to have the instructional text below the button to begin with. For example:

An alternative would be to have the instructional text below the button to begin with. For example:

We don't know yet at that point if the user will get an email. When you click Continue it goes to the backend and checks if the user has a password or not: if no password it'll email, otherwise it shows up a password box!

I think this was fixed, and we're deprecating passwords anyway


Check the website for updates

This would be a script to request the URL http://www.njsp.org/info/ucr_currentdata1.html?agree=0 every 10 minutes, hash the contents and store it on S3.
If the html has changed since the last stored version, send an email alert.
This crawler would also do the same for any links on the page to files.
Then we can marry this script with the parser to start regularly ingesting data into our to-be-designed models.

Completely accidentally, I discovered they changed the URL for the site this week. It's now here: http://www.njsp.org/ucr/current-crime-data1.shtml?agree=0


Issue while activating Site collection feature

I was trying to activate the site collection feature using site scripts. The verb I used is
{
"verb" : "activateSPFeature",
"featureId":"7094bd89-2cfe-490a-8c7e-fbace37b4a34" //Reporting feature to be activated at site collection level
}
The activation works fine with web features, but failed at site collection level features. Is there a way to activate site collection level features using site scripts?

Document Details
⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

ID: 68267476-ee8d-7b95-446b-711ddb683da2
Version Independent ID: aa099b9d-48db-5513-11c7-32c49a27e5be
Content: Site design JSON schema
Content Source: docs/declarative-customization/site-design-json-schema.md
Product: sharepoint
GitHub Login: @spdevdocs
Microsoft Alias: spdevdocs

Same question here: Is there a way to activate site scoped features? I understand that this are actions that normally are applied to the current web, but as long as we can create Site columns, shouldn't it be logic to be able to activate site scoped features as well?
When will we have a full pallete of actions that will allow us to do most of the needed stuff without extra cost (Flow) something like executing a PS script?
Thank you in advance for your response.

Facing same issue here. Client wants to activate "Open Documents in Client Applications by Default" (8a4b8de2-6fd8-41e9-923c-c7c3c00f8295) tenant-wide, and cannot find a way to do it. Thought this was the answer, but alas, it's half-assed.

Was actually able to resolve this using an undocumented feature I found in the JSON schema. There's a "scope": "site|web" option, which lets you activate either. Confirmed this worked for my use case.


Tracking: VS Tooling support for Client code generation

tooling team has a handle on this already so nothing left here to track.


[Errno 2]

After detecting the emulator and list of ROMS it fails as below.  In my userdata directory there is 0 and two other numbers.  0 doesn't have a config directory and the other two have \config but no shortcuts.vdf.  If I create the \config directory then it runs through just fine.
[03/27/16 09:03:07] ####################################
[03/27/16 09:03:07] An Error has occurred:
[03/27/16 09:03:07] [Errno 2] No such file or directory: u'c:/program files (x86)/steam\userdata\0\config\shortcuts.vdf'
Traceback (most recent call last):
File "", line 45, in
File "", line 35, in main
File "c:\Users\Scott.Scott-PC\Development\Projects\Ice\build\ice\out00-PYZ.pyz\ice.steam_shortcut_manager", line 202, in save
IOError: [Errno 2] No such file or directory: u'c:/program files (x86)/steam\userdata\0\config\shortcuts.vdf'
[03/27/16 09:03:07] ####################################

Same here!
Traceback (most recent call last):
File "", line 7, in
File "c:\program files (x86)\python27\lib\site-packages\PyInstaller-3.1-py2.7.egg\PyInstaller\loader\pyimod03_importers.py", line 389, in load_module
File "ice\runners\command_line_runner.py", line 12, in
File "c:\program files (x86)\python27\lib\site-packages\PyInstaller-3.1-py2.7.egg\PyInstaller\loader\pyimod03_importers.py", line 389, in load_module
File "ice\runners\ice_engine.py", line 14, in
File "c:\program files (x86)\python27\lib\site-packages\PyInstaller-3.1-py2.7.egg\PyInstaller\loader\pyimod03_importers.py", line 389, in load_module
File "ice\backups.py", line 10, in
File "c:\program files (x86)\python27\lib\site-packages\PyInstaller-3.1-py2.7.egg\PyInstaller\loader\pyimod03_importers.py", line 389, in load_module
File "ice\logs.py", line 66, in
File "ice\logs.py", line 53, in create_logger
File "logging\handlers.py", line 117, in init
File "logging\handlers.py", line 64, in init
File "logging_init_.py", line 903, in init
File "logging_init_.py", line 926, in _open
IOError: [Errno 2] No such file or directory: u'C:\Users\antdo\AppData\Local\Scott Rice\Ice\ice.log'


Debugging Issue Surround Args Interpretation (launch.json), Help Rolling Back?

Environment data
Version: 1.45.0
Commit: d69a79b73808559a91206d73d7717ff5f798f23c
Date: 2020-05-07T15:57:33.467Z (6 days ago)
Electron: 7.2.4
Chrome: 78.0.3904.130
Node.js: 12.8.1
V8: 7.8.279.23-electron.0
OS: Darwin x64 19.4.0
Generalized Question / Rough Take On Possible Bug
Hey there! Been really digging the incredible debugging VS Code has to offer and it's one of the main reasons why I use VSCode and not another IDE, y'all are kickin' serious butt on this!
I've recently seen that an update to ms-python.python, ms-python.python-2020.5.78807, seems to now interpret the "launch.json" configurations differently than it did before.
Is there a way in my .devcontainer.json configuration file that I can specify the version of the extension I want?
    "extensions": [
      "ms-python.python"
    ],

I want to downgrade from:
/workspaces/project-proj (branch-name)  env /usr/bin/python3 /root/.vscode-server/extensions/ms-python.python-2020.5.78807/pythonFiles/lib/python/debugpy/wheels/debugpy/launcher 33229

(ms-python.python-2020.5.78807)
Back to:
/workspaces/project-proj (branch-name)  env DEBUGPY_LAUNCHER_PORT=40557 /usr/bin/python3 /root/.vscode-server/extensions/ms-python.python-2020.4.76186/pythonFiles/lib/python/debugpy/wheels/debugpy/launcher

(ms-python.python-2020.4.76186)
Because with the latest release it is breaking our debugging ability that we had in our launch.json... the args are being interpreted differently and not in the way we would expect.
We could try to reformat the args to the new way... / or tinker with them till we get them to work - but as a quick fix because we have a hard deadline coming up I was hoping to find a way just to downgrade the current extension / specify a version in our .devcontainer.json configuration file?
Or are there any possible suggestions on just disabling the extension in the devcontainer.json and building the file from source and adding the path to the PATH variable in a docker container  in such a way that VSCode recognizes it will understand what, in our launch.json -
  "type": "python",

is?
Thanks again so much for any info or help on this!

I've realized how args get interpreted with json strings are better:
before we had a json string argument that had to be wrapped with ' ' single quotes at the end.
and now that's not needed.
so if anyone else stumbles on this - start messing with your stringified JSON args in your launch.json - restringify them without single quotes & maybe pull out other patches you may have previously added.
Closing for now, since figuring out the needed edits, myself and the rest of the team are no longer blocked.