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

custom requirements #16

Open
Borda opened this issue Jun 9, 2020 · 4 comments
Open

custom requirements #16

Borda opened this issue Jun 9, 2020 · 4 comments

Comments

@Borda
Copy link

Borda commented Jun 9, 2020

Hi, may I ask how to define a custom path to extra requirements, e.g in our case it is requirements/docs.txt
for now, the action is failing for missing dependencies
https://github.com/PyTorchLightning/pytorch-lightning/pull/2128/checks?check_run_id=753522640
for example, RTD config has

  install:
    - requirements: requirements/docs.txt
@domdfcoding
Copy link

You can co-opt the pre-build-command option, which seems to be intended for use with apt-get, to install packages via pip.

Here's how I use it to install tox:

  docs:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v1
      - uses: ammaraskar/sphinx-action@master
        with:
          pre-build-command: python -m pip install tox

So you could install from your requirements/docs.txt file like this:

          pre-build-command: python -m pip install -r requirements/docs.txt

@ammaraskar
Copy link
Owner

I think pre-build-command is the best way to deal with this. Auto installing the <docs folder>/requirements.txt is mostly just a general convenience thing that covers like 75% of sphinx usages. While I could add another configurable field for this, I think these fields would quickly grow depending on all the different ways people want to handle their dependencies.

Are you comfortable with continuing to use pre-build-command or do you have any other thoughts @Borda?

@Borda
Copy link
Author

Borda commented Jun 18, 2020

You can co-opt the pre-build-command option, which seems to be intended for use with apt-get, to install packages via pip.

that is what already did as this was pending for a while and we needed to get it done, but I feel it not the proper way and I feel it is kind of hack...

I think pre-build-command is the best way to deal with this. Auto installing the /requirements.txt is mostly just a general convenience thing that covers like 75% of sphinx usages.

True, all small-scale project has it this way and most of the larger-scale project has I our way... and as it is not rare you can see as Read-The-Docs has a special entry for the path to requirements files

Are you comfortable with continuing to use pre-build-command or do you have any other thoughts

we did our hack but I would rather see some clear way like RTD format

@Borda
Copy link
Author

Borda commented Aug 31, 2020

@ammaraskar any update here or shall we close it as won't fix? 🐰

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

No branches or pull requests

3 participants