Skip to content

Builds ignore yaml config settings #4100

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

Closed
cas-- opened this issue May 16, 2018 · 7 comments
Closed

Builds ignore yaml config settings #4100

cas-- opened this issue May 16, 2018 · 7 comments
Assignees
Labels
Support Support question

Comments

@cas--
Copy link

cas-- commented May 16, 2018

Details

Expected Result

Add a .readthedocs.yaml config file and use the settings for the build

formats:
    - pdf

python:
    version: 3
    setup_py_install: true
    pip_install: true
    extra_requirements:
        - docs

requirements_file: .readthedocs.requirements.txt

and .readthedocs.requirements.txt contains:

sphinxcontrib.spelling

Actual Result

The build fails due to missing sphinxcontrib.spelling. It seems to only honor settings from project Advanced Settings page.

If I set the requirements file in the web interface it works

@stsewd
Copy link
Member

stsewd commented May 16, 2018

If you are using readthedocs.com I think you should contact support there, this issue tracker is for the open source project.

@humitos humitos self-assigned this May 16, 2018
@humitos
Copy link
Member

humitos commented May 16, 2018

Hi @cas--! Thanks for your report. I took a look to your project under .com and I think you have found a bug. I still need replication to confirm it, though.

I will explain it here since it should also affect the community site. What I think it's happening is that as you are not setting up a requirements file from the web Admin interface, RTD searches for an existing requirements.txt in the repository root and docs folder and as it found one in your root directory this overrides the option from the YAML file.

I will try to reproduce this by:

  1. creating a sample project
  2. add a requirements.txt file with some packages
  3. add a my-own-reqs.txt file with some different packages
  4. adding a YAML file specifing a my-own-reqs.txt ad requirements file
  5. import the project
  6. trigger a build

If this is a bug, we will be using requirements.txt file to build the docs instead of picking the my-own-reqs.txt as the YAML file says.

@humitos humitos added Needed: tests Tests are required Needed: patch A pull request is required Bug A bug Needed: replication Bug replication is required labels May 16, 2018
@humitos
Copy link
Member

humitos commented May 16, 2018

I'm a little confused here.

I saw that you said in the build linked and I see everything properly configurated in your project. Although, I tried to reproduce it by creating a sample project at https://gitlab.com/humitos/rtd-yaml-requirement with a similar configuration that you mentioned and I'm not able to reproduce it locally nor in readthedocs.com

captura de pantalla_2018-05-16_12-09-51

In fact, I'm being able to install the [docs] extra requirements by using the extra_requirements that in your case is not working.

@humitos
Copy link
Member

humitos commented May 16, 2018

Meh, I found the issue.

The supported name files are readthedocs.yml and .readthedocs.yml (note that .yaml is not a supported extension)

This should probably be changed to support .yaml if it's a valid extension (althouhg, could be a problem in Windows systems): https://stackoverflow.com/questions/21059124/is-it-yaml-or-yml

@cas-- can you test by renaming that file, please and let me know?

@cas--
Copy link
Author

cas-- commented May 16, 2018

Oh how silly of me, I swear I read it as .yaml! I'll test and let you know

@cas--
Copy link
Author

cas-- commented May 16, 2018

Yep that was it after all, sorry for the wild-goose-chase! However it is a pain that projects pick one or the other for YAML extension. e.g. pre-commit uses only .yaml whereas Travis use only .yml.

Perhaps since the 'official' recommended extension is .yaml a warning/error in build log if RTD finds a .yaml file?

As an aside the move by Python to TOML will save us from these config file extension mixups 😛

@stsewd stsewd added Support Support question and removed Bug A bug Needed: patch A pull request is required Needed: replication Bug replication is required Needed: tests Tests are required labels May 16, 2018
@humitos
Copy link
Member

humitos commented May 16, 2018

I opened a new issue at #4102 so support .yaml as extension. I'm closing this one.

Thanks for testing this and let us know about it.

@humitos humitos closed this as completed May 16, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Support Support question
Projects
None yet
Development

No branches or pull requests

3 participants