Skip to content
This repository has been archived by the owner on Aug 11, 2023. It is now read-only.

Use RTD v2 #432

Closed
wants to merge 1 commit into from
Closed

Use RTD v2 #432

wants to merge 1 commit into from

Conversation

pllim
Copy link
Member

@pllim pllim commented Sep 16, 2019

Fix #429

Fix #431

Copy link
Member Author

@pllim pllim left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wonder if we should ask RTD for access to their PR builder feature for this repo, but that's a different issue.

Not sure how to test this patch before merge...

python:
version: 3.5
version: 3.7
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No reason to not use Python 3.7?

remove_file('.rtd-environment.yml')
remove_file('readthedocs.yml')
remove_file('rtd-pip-requirements')
remove_file('.readthedocs.yml')
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Here is the typo fix for #429.

fail_on_warning: false

# Set the version of Python and requirements required to build your docs
# NOTE: This does not follow {{ cookiecutter.minimum_python_version }}
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am not sure if one should build doc from minimum Python version, so I just hardcode it to Python 3.7.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

well, this is just a template, maintainers are expected to look under the hood, at least a little bit, and then your comment clears up the situation.

@bsipocz
Copy link
Member

bsipocz commented Sep 17, 2019

This looks good to me. The comments are rhetorical ones really, I suppose I'm happy to merge this as is.

@astrofrog
Copy link
Member

What if we declared an extras requires for docs in setup.cfg and put Sphinx-astropy there, then used that in the RTD config? Would be more consistent with the core package than using a rtd requirements file?

@astrofrog
Copy link
Member

Just to be clear I’m ok with this being merged and happy to do a follow up PR

@pllim
Copy link
Member Author

pllim commented Sep 17, 2019

Would be more consistent with the core package than using a rtd requirements file?

The core still uses a RTD requirements file on top of the setup.cfg to pin matplotlib. 😬

https://github.com/astropy/astropy/blob/4c46eb6b09c65b6e66db7d1a8a4b2a40224482bc/docs/rtd_requirements.txt#L1

I agree that using setup.cfg is a separate PR.

@pllim
Copy link
Member Author

pllim commented Sep 17, 2019

Feel free to merge if you are okay with this. I try not to merge my own PRs. 😉

system_packages: true
install:
- requirements: requirements.txt
- method: setuptools
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why setuptools and not pip?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To run python setup.py install. I think @astrofrog already brought it up above and said the pip thing can be a separate PR.

system_packages: true
install:
- requirements: rtd-pip-requirements
- method: setuptools
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why setuptools and not pip?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same answer as above.

@@ -0,0 +1,5 @@
Cython
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why don't we move this file to docs/requirements.txt or docs/rtd-requirements.txt? I feel like we don't need another file in the root of the repo.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I can move it as long as there is a consensus. I feel people have been flip-flopping where that file should go throughout the years and we move it back and forth.

Copy link
Member

@bsipocz bsipocz Sep 19, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't have a preference, but picking one and sticking with it in all the repos would be nice. So far astropy and photutils have docs/rtd_requirements.txt

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Okay, I moved and renamed it. Also squashed commits.

Move doc requirement files to docs/requirements.txt.
@Cadair
Copy link
Member

Cadair commented Sep 20, 2019

On the [docs] extras require point, we found in SunPy that we needed to be able to specify things specific to RTD before, which made extras require not a perfect solution. I don't know if that's a concern we want to carry into the package template though.

@pllim
Copy link
Member Author

pllim commented Sep 20, 2019

@Cadair , I am not using [docs] thingy here... am I?

@Cadair
Copy link
Member

Cadair commented Sep 20, 2019

No, I was responding to @astrofrog's comments.

@pllim
Copy link
Member Author

pllim commented Jan 31, 2020

Superseded by #438

@pllim pllim closed this Jan 31, 2020
@pllim pllim deleted the rtd-v2 branch January 31, 2020 16:22
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

MNT: Use ReadTheDocs v2 YAML and not conda No such file or directory: readthedocs.yml
4 participants