jugmac00 / flask-reuploaded

File uploads for Flask.
https://github.com/jugmac00/flask-reuploaded
MIT License
63 stars 12 forks source link

Fix building documentation #160

Closed jugmac00 closed 1 year ago

jugmac00 commented 1 year ago

see https://readthedocs.org/projects/flask-reuploaded/builds/21957773/

The configuration key "build.os" is required to build your documentation. Read more at https://docs.readthedocs.io/en/stable/config-file/v2.html#build-os
issamansur commented 1 year ago

try add to .readthedocs.yaml:

build:
  os: ubuntu-22.04
  tools:
    python: "3.11"
jugmac00 commented 1 year ago

If you like to, please go ahead. Please also make sure to align the Python version in toy.ini.

issamansur commented 1 year ago

I'm didn't work with this before and don't know what to do. Sorry.

jugmac00 commented 1 year ago

@issamansur I am happy to walk you through - but only if you want to. If not, let's keep that issue open for someone who wants to have their first open source contribution.

When we have a look at the tox.ini, we can see that for the doc environment no Python version was specified. That means that the Python version which was used to install tox will be used. This should usually work, but there could be certainly compatibility issues with a different Python version.

https://github.com/jugmac00/flask-reuploaded/blob/9da86780c8f6ebf899cdcea69b5d1f6cc940b114/tox.ini#L65-L68

As you have suggested in the snippet above to use Python 3.11, which is a very reasonable decision, it would also make sense to use the same version for the doc environment, which is both used for local development, and in CI.

We can do that by adding

basepython = python3.11

as a new line inside the doc environment, for example right after the description statement.

issamansur commented 1 year ago

OK, do I need to add changes and send a pull request?

jugmac00 commented 1 year ago

Exactly!

Two changes are necessary.

The one you suggested to readthedocs.yaml and the corresponding one to tox.ini.

issamansur commented 1 year ago

I tried to do this: Pull request: #161

issamansur commented 1 year ago

Thanks for explanations what to do. It helpful for me)

jugmac00 commented 1 year ago

Thanks for your contribution!

closed by #161