ReviewNB / treon

Easy to use test framework for Jupyter Notebooks
https://reviewnb.com
MIT License
305 stars 29 forks source link

Describe dependency setup in README #8

Closed f4lco closed 5 years ago

f4lco commented 5 years ago

As per #7, a contributor should find some instructions on how to get started with dependencies etc. in the README. Because one can simply use treon to execute treon with the changes in the source tree in place, I assume "treon-runner.py" counts as redundant?

amit1rrr commented 5 years ago

I assume "treon-runner.py" counts as redundant

Yeah, safe to delete it.

The change looks good. I am just wondering if there is a way for users to quickly ascertain whether they are running treon from the source or the package installed via PyPI. In my development, I always make sure by editing the help message and running treon help

amit1rrr commented 5 years ago

I just figured it, running following should show the user their local workspace location.

pip list --local | grep treon

Can we just add a note in the development section saying something along the lines, "If you'd like to verify whether your development environment is setup correctly, run the following and you should be able to see the location of your source code"

$ pip list --local | grep treon
treon                0.1.2                /workspace/treon2
f4lco commented 5 years ago

That's a good idea. I simply use one of the shell builtins:

$ which treon
/path/to/my/venv/bin/treon
$ command -v treon
/path/to/my/venv/bin/treon

Do you prefer one over the other (in comparison to pip list)? I assume the shell builtin will be a bit quicker, and may account for shell trickery, such as messed up $PATH, or aliases. After all, just that pip knows about a package called treon, does not mean it is actually the one to execute.

amit1rrr commented 5 years ago

Actually which treon would return the same path irrespective of whether it's using treon from our source directory or treon installed via pip install

That's why I was trying to find a way to show the actual source code path.

f4lco commented 5 years ago

Yeah I just figured these two commands address very different mistakes. First you have to convince your shell to use the treon executable from the venv (my primary mistake), then the dependency must be installed in editable mode. I think it will not hurt to document both.

amit1rrr commented 5 years ago

Perfect! Thanks @f4lco, I merged it.