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

usage on readthedocs.org #754

Closed
1 task done
cjw296 opened this issue Dec 19, 2018 · 16 comments
Closed
1 task done

usage on readthedocs.org #754

cjw296 opened this issue Dec 19, 2018 · 16 comments
Labels
area/docs Documentation issues/improvements

Comments

@cjw296
Copy link

cjw296 commented Dec 19, 2018

  • I have searched the issues of this repo and believe that this is not a duplicate.

Issue

How can I have readthedocs.org build a project that I'm developing using poetry?
Hopefully this is just a documentation issue...

@jacebrowning
Copy link
Contributor

@cjw296 Did you run into a specific error when building your site?

My mkdocs site built fine without telling readthedocs.org anything about poetry: https://datafiles.readthedocs.io

@cjw296
Copy link
Author

cjw296 commented Dec 19, 2018 via email

@jacebrowning
Copy link
Contributor

The only setting I changed from the defaults was to select the framework for my docs:

I don't think RTD needs the rest of your dependencies.

@cjw296
Copy link
Author

cjw296 commented Dec 19, 2018

I use Sphinx, and to build correctly, the package needs to be installed.

@cjw296
Copy link
Author

cjw296 commented Jan 10, 2019

RTD issue here: readthedocs/readthedocs.org#4912
May well be fixed by pypa/pip#6106.

@GPMueller
Copy link

Aside from documentation I don't belive this is an issue of poetry, but of readthedocs.
Installing it there should not be a problem, but I was not successful running poetry there, because of missing system packages.

However, documentation on how to use RTD would be great! 👍

@ahal
Copy link

ahal commented May 10, 2019

Not a super elegant solution, but you can use a requirements.txt to manually point to the packages you want autodoc to find. E.g add the following file to your repo root:

requirements.readthedocs.txt

src/my_package
src/my_other_package

Then enable requirements.readthedocs.txt in the readthedocs admin panel. That's enough to allow autodoc to find the package. You may need to add some dependencies there too.

@kasteph kasteph added the area/docs Documentation issues/improvements label Oct 18, 2019
@trim21
Copy link
Contributor

trim21 commented Nov 23, 2019

Is there any way to install dev-dependencies by pip install . instead of put sphinx in extra requirements?

version: 2

python:
  version: 3.6
  install:
    - method: pip
      path: .
      extra_requirements:
        - docs

@cjw296
Copy link
Author

cjw296 commented Nov 23, 2019

I suspect this requires the "editable install support as an extension to PEP 517" mentioned in pypa/pip#6314 (comment).

@cjw296
Copy link
Author

cjw296 commented Mar 6, 2021

@finswimmer - can you explain why you've closed this?

@finswimmer
Copy link
Member

Hello @cjw296,

sorry I could have written some words about it. I've closed this because there were nor more comments for more than a year. Furthermore it doesn't look like a poetry problem. If you disagree please explain it a bit more, why you think that is something poetry should solve. We can discuss about it of course.

fin swimmer

@cjw296
Copy link
Author

cjw296 commented Mar 8, 2021

Poetry's direction and approach seems pretty hostile to my use cases nowadays, and closing issues just because no-one's had time to bottom them out seems counterproductive. This isn't the first time I've disagreed with your approach, and I'm sorry to see @sdispater cede so much direction and control of this project to you; Poetry had plenty of potential, but the direction you're driving it doesn't work for me.

@sdispater
Copy link
Member

@cjw296

Poetry's direction and approach seems pretty hostile to my use cases nowadays

Are you saying that we should accept and abide by your use cases, no questions asked?

The thing is that I agree with @finswimmer here: this is not an issue with Poetry but with RTD and you already pointed to an issue on the RTD repository where the discussion is more suited (readthedocs/readthedocs.org#4912).

That being said, if you feel that Poetry could do something here and you are willing to implement it, I'd happily review a PR but for now I really think this is out of our hands.

jiayuqiujq added a commit to jiayuqiujq/OpenSecrets_Senators_Industries that referenced this issue Dec 15, 2021
@alecandido alecandido mentioned this issue Jan 4, 2022
5 tasks
@AKuederle
Copy link
Contributor

AKuederle commented Apr 28, 2022

RTD does seem to allow custom shell commands with the most recent update: https://docs.readthedocs.io/en/latest/build-customization.html

I havn't tested it yet, but I assume this should allow to install dev dependencies (or in Poetry 1.2 and higher the respective dependency groups for docs)

EDIT: Here is a link to a working solution using this feature: readthedocs/readthedocs.org#4912 (comment)

@rlaphoenix
Copy link

rlaphoenix commented Jul 19, 2022

Is there any way to install dev-dependencies by pip install . instead of put sphinx in extra requirements?

version: 2

python:
  version: 3.6
  install:
    - method: pip
      path: .
      extra_requirements:
        - docs

Do note that this will install all optional dependencies, which is really not ideal. It effectively makes specifying extra_requirements pointless, as it will just install every dependency under [tool.poetry.dependencies] anyway.

I recommend doing the solution linked by @AKuederle but add --no-dev -E docs to the end of the poetry install line under post_install.

Copy link

github-actions bot commented Mar 1, 2024

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 1, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area/docs Documentation issues/improvements
Projects
None yet
Development

No branches or pull requests

10 participants