-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
PR 1/2: Add versioned docs #509
Conversation
* versioned docs@1.5.1 * Don't trigger publish if target is empty * Set workflow to trigger on release * Fix: versions.json path
@phi-friday I will put your PRs on hold until this is sorted out, because any merge conflict on |
I'm sorry I can't help you with that, I'm not familiar with the documentation. I looked at the link you showed as an example and it seems to be better in accessibility, PR checks are always welcome. |
Technically adding a space before the colon is the correct version, as specififed in the numpydoc style guide. |
I raised an issue about this at jbms/sphinx-immaterial#375 |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #509 +/- ##
==========================================
+ Coverage 94.70% 96.18% +1.47%
==========================================
Files 9 10 +1
Lines 680 864 +184
==========================================
+ Hits 644 831 +187
+ Misses 36 33 -3 ☔ View full report in Codecov by Sentry. |
Added a warning to the |
I backported all configuration changes to the See the demo here. @fmfn @bwheelz36 I would appreciate if you find a chance to review this. Given that the docs are in a sense the face of this project, I want to make sure no one is unhappy with the outcome. |
Fix #504
Demo: https://till-m.github.io/BayesianOptimization/
This adds a version dropdown to our docs page. In the future, any new release will be added to this version dropdown automatically. Similarly, it will keep an updated version of the
master
docs.I had to switch to
sphinx-immaterial
to get this to work. I’ve also cleaned up the docs a bit and made everything look nicer (imo).I've also trimmed the README significantly.
How does it work?
There’s a workflow that runs on push (master), pull request and release. This workflow does a number of things.
1)
build-docs-and-publish
target
variable accordingly.target
to mastertarget
to release versiontarget
to empty stringtarget
is not empty string, it deploys thehtml
folder of the built docs togh-pages/<target>
. It overwrites anything in<target>
but ignores any other content ingh-pages
2)
Update docs versions JSON
Only runs if the
target
is not emptygh-pages
branch and reads out the folders within (ignoring anything starting with.
)gh-pages
(ignoring any other files in the branch).When you open the docs page, the landing page reads out the versions.json and redirects you to
stable
. If there is no version taggedstable
, it will redirect tomaster
.On merging this
Requires a sister PR to be merged first, prepping the
gh-pages
branch: #510I’ve purged the gh-pages branch and added docs for the
v1.5.1
release. This way I could a) test thepublish
workflow, b) ensure that there is a stable version present, c) make persistent docs forv.1.5.1
and d) have a more functional demo.Credit
Based on github.com/brechtm/rinohtype's workflow.