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

Clarify what a "project" is in documentation #12

Closed
nealmcb opened this issue Aug 27, 2019 · 5 comments
Closed

Clarify what a "project" is in documentation #12

nealmcb opened this issue Aug 27, 2019 · 5 comments
Labels
documentation Improvements or additions to documentation enhancement New feature or request

Comments

@nealmcb
Copy link

nealmcb commented Aug 27, 2019

I get this traceback:

$ portray in_browser
 ....
  File ".../lib/python3.6/site-packages/portray/config.py", line 63, in project
    raise NoProjectFound(directory)
portray.exceptions.NoProjectFound: (NoProjectFound(...), "No Python project found in the given directory: 

Clarification in the error message and in the documentation for what defines a "Python project" would help.

E.g. do you require that Poetry be used and/or that there be a pyproject.toml file?

@zachvalenta
Copy link
Contributor

Be nice if CLI followed pdoc3 on this one:

$ pdoc your_project

https://github.com/pdoc3/pdoc#usage

@drcongo
Copy link

drcongo commented Aug 28, 2019

I'm using poetry on my projects and I'm getting NoProjectFound on every project I try it on. I have no idea why.

Edit: from this comment on HN I'm guessing it's looking for a pyproject.yaml - https://news.ycombinator.com/item?id=20803525 however we have pyproject.toml on all our projects.

@timothycrosley
Copy link
Owner

@drcongo are you running it in the same location as your pyproject.yaml file?

@timothycrosley timothycrosley mentioned this issue Aug 29, 2019
@timothycrosley timothycrosley added enhancement New feature or request documentation Improvements or additions to documentation labels Aug 29, 2019
@timothycrosley
Copy link
Owner

I've done a few things in the just release 1.1.0 release (https://timothycrosley.github.io/portray/CHANGELOG/#110-august-29) to try to address this:

  • Added the ability to specify modules from the command line (per @zachvalenta)
  • Added a troubleshooting guide for the NoProjectFound exception
  • Added links to the trouble shooting guide from the exception
  • Added initial smarts to attempt to pull modules out of simple setup.py files using ast

Let me know if there is more that can be done, thanks for alerting me to this issue!

Thanks!

~Timothy

@nealmcb
Copy link
Author

nealmcb commented Aug 29, 2019

Thanks!

In particular, note the link in the error message now, to https://timothycrosley.github.io/portray/TROUBLESHOOTING/#noprojectfound:

  File "/home/neal/Envs/portray/lib/python3.6/site-packages/portray/config.py", line 66, in project
    raise NoProjectFound(directory)
portray.exceptions.NoProjectFound: (NoProjectFound(...), "No Python project found in the given directory: '/srv/neal/py/projects/audit_cvrs' See: https://timothycrosley.github.io/portray/TROUBLESHOOTING/#noprojectfound")

But I still think the top-level documentation for Portray, including the README.md, should define "project" in the Python context, since the term has a technical meeting of sorts here which is unclear, and can't be found via a straightforward google search. I guess it means something like "something to be packaged which has a pyproject.toml or setup.py file", or "the sort of thing that pypi lets you install".

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

No branches or pull requests

4 participants