Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make dev install work for everyone. #14

Open
Carreau opened this issue Sep 9, 2021 · 6 comments
Open

Make dev install work for everyone. #14

Carreau opened this issue Sep 9, 2021 · 6 comments
Labels
enhancement New feature or request

Comments

@Carreau
Copy link
Member

Carreau commented Sep 9, 2021

There are many places in the code that assume it's running on my machine, or might make assumptions that folders/files already exist.

It would be nice to have the basic workflow work for everyone.

install papyri

$ pip install flit
$ git clone https://github.com/Carreau/papyri
$ cd papyri
$ flit install --symlink
$ git clone https://github.com/stsewd/tree-sitter-rst   # yes, inside papyri source tree
$ papyri build-parser

Create own docs:

$ papyri gen examples/papyri.toml
$ papyri ingest ~/.papyri/data/papyri_0.0.8/

View own docs

$ papyri serve
Running on http://127.0.0.1:5000 (CTRL + C to quit)
@Carreau
Copy link
Member Author

Carreau commented Sep 9, 2021

@jasongrout I've reworked the readme, and rechecked the it should work from a clean environment.
The above instruction should be the strict minimal to make sure papyri works. Do you want to give it a shot ?

@jasongrout
Copy link
Member

Trying to build the parser, I get:

% papyri build-parser
Traceback (most recent call last):
  File "/[snip]/bin/papyri", line 8, in <module>
    sys.exit(main())
  File "/[snip]/lib/python3.9/site-packages/papyri/__init__.py", line 169, in main
    app()
  File "/[snip]/lib/python3.9/site-packages/typer/main.py", line 214, in __call__
    return get_command(self)(*args, **kwargs)
  File "/[snip]/lib/python3.9/site-packages/click/core.py", line 1137, in __call__
    return self.main(*args, **kwargs)
  File "/[snip]/lib/python3.9/site-packages/click/core.py", line 1062, in main
    rv = self.invoke(ctx)
  File "/[snip]/lib/python3.9/site-packages/click/core.py", line 1668, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/[snip]/lib/python3.9/site-packages/click/core.py", line 1404, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/[snip]/lib/python3.9/site-packages/click/core.py", line 763, in invoke
    return __callback(*args, **kwargs)
  File "/[snip]/lib/python3.9/site-packages/typer/main.py", line 500, in wrapper
    return callback(**use_params)  # type: ignore
  File "/[snip]/lib/python3.9/site-packages/papyri/__init__.py", line 359, in build_parser
    from tree_sitter import Language, Parser
ModuleNotFoundError: No module named 'tree_sitter'

DId you install the tree_sitter package too, not just clone it?

@jasongrout
Copy link
Member

Looks like it works if I do pip install tree_sitter

@Carreau
Copy link
Member Author

Carreau commented Sep 9, 2021

Great ! Added to requirement.txt and pyproject_toml, not sure why it does work in an env for me without installing it. I liekly screwed something up.

@jasongrout
Copy link
Member

$ papyri gen examples/papyri.toml

For this, I also had to install matplotlib

@melissawm melissawm added the enhancement New feature or request label Oct 26, 2023
@melissawm
Copy link
Collaborator

It looks like the instructions now are more general - I was able to set up a dev install following the instructions. Should this be closed?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants