NREL / floris

A controls-oriented engineering wake model.
http://nrel.github.io/floris
BSD 3-Clause "New" or "Revised" License
217 stars 156 forks source link

Fix docs #1034

Closed paulf81 closed 5 days ago

paulf81 commented 6 days ago

Fix docs

Recently the documentation failed to build:

https://github.com/NREL/floris/actions/runs/11938591041

I believe I've traced the issue to the recent version bump of autoyaml to 1.1.2. Locally at least, pinning to 1.1.1 resolves the issue. I've also posted a question as an issue here:

https://github.com/Jakski/sphinxcontrib-autoyaml/issues/26

I think the PR should fix it in github actions as well. Then also:

misi9170 commented 6 days ago

@rafmudaf in #1019, we moved to building the docs with python 3.13 rather than 3.10---was the purpose of that to keep up to date with the latest python? I believe the failed deploy-pages action, triggered by merging #1026, is the first time the deploy-pages action ran since #1019 was merged, so just wanted to check if that could have been the root issue

rafmudaf commented 6 days ago

The intent was to use a consistent Python version across all CI jobs aside from the automated tests which has a matrix of Python versions. I chose 3.13 only because it's the latest.

As for the failing build, @paulf81 noted it was due to a version incompatibility with sphinxcontrib-autoyaml. Is it also related to the Python version?

paulf81 commented 5 days ago

The intent was to use a consistent Python version across all CI jobs aside from the automated tests which has a matrix of Python versions. I chose 3.13 only because it's the latest.

As for the failing build, @paulf81 noted it was due to a version incompatibility with sphinxcontrib-autoyaml. Is it also related to the Python version?

You're right, the python version ended up being a red herring. I've restored 3.13 and checked locally and docs build. I also have a response on the autoyaml issue that we should stay pinned and they'll let us know when ok to update.

misi9170 commented 5 days ago

Thanks @rafmudaf , @paulf81 ! I'll try building locally this morning and hopefully we can get this merged.

rafmudaf commented 5 days ago

If you want to test it on GitHub, just change the Actions job to build on any event:

on:
  push:
#    branches:
#    - develop
#    paths:
#    - docs/**

and comment out the part where it uploads to GitHub pages:

    # Push the book's HTML to github-pages
#    - name: GitHub Pages action
#      uses: peaceiris/actions-gh-pages@v3.6.1
#      with:
#        github_token: ${{ secrets.GITHUB_TOKEN }}
#        publish_dir: ./docs/_build/html
misi9170 commented 5 days ago

Local build worked for me after the change. Trying a build on github actions according to @rafmudaf 's suggestion now. Here is the action: https://github.com/paulf81/floris/actions/runs/11958839662 (still in progress currently...)

Update: success! Will revert the changes now, and then I think we can merge.