Skip to content

Use enry if it's already installed in PATH #3

Open

Description

@bzz

Right now, after clean clone and installing all requirements

virtualenv -p python3 .venv
source .venv/bin/activate
git clone git@github.com:src-d/tmsc.git
cd tmsc
pip install -r requirements.txt

Run command python -m tmsc https://github.com/apache/spark results in

Number of documents: 112273
WARNING:topic_detector:No BOW cache was loaded.
Traceback (most recent call last):
  File "/<>/3.6/lib/python3.6/runpy.py", line 193, in _run_module_as_main
    "__main__", mod_spec)
  File "/<>/3.6/lib/python3.6/runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "/<>/tmsc/tmsc/__main__.py", line 71, in <module>
    sys.exit(main())
  File "/<>/tmsc/tmsc/__main__.py", line 61, in main
    "timeout": args.timeout})
  File "<>/tmsc/tmsc/topic_detector.py", line 77, in __init__
    **(repo2bow_kwargs or {}))
  File "/<>/tmsc/tmsc/topic_detector.py", line 21, in __init__
    super().__init__(**kwargs)
  File "/<>/tmsc/.venv/lib/python3.6/site-packages/ast2vec/repo2/base.py", line 71, in __init__
    self._cloner.find_linguist(linguist)
  File "/<>/tmsc/.venv/lib/python3.6/site-packages/ast2vec/cloning.py", line 167, in find_linguist
    linguist)
FileNotFoundError: ./enry was not found. Install it: python3 -m ast2vec enry

Although latest Enry binary is available in the PATH

$ enry                                                                                                           
14.29%	Dockerfile
14.29%	Text
71.43%	Python
``

Activity

  1. bzz commented on Sep 20, 2017

    @bzz
    Author

    Quick search of ./enry reveals the --linguist flag.

    Will re-try with python -m tmsc --linguist enry https://github.com/apache/spark

  2. bzz commented on Sep 20, 2017

    @bzz
    Author

    --linguist solves the issue.

    Although it would still be nice to auto-detect enry binary in PATH by default

  3. vmarkovtsev commented on Sep 20, 2017

    @vmarkovtsev
    Collaborator

    Thanks for reporting, it should indeed be detected from PATH, looks like a defaults flaw in ast2vec.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions