Skip to content
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

Docs tweaks #1518

Merged
merged 3 commits into from
Oct 31, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions changes/1518.misc.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
The docs linting process no longer verifies hyperlinks the Briefcase GitHub repo and the platform support table is now uniform.
26 changes: 15 additions & 11 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,21 @@
"^/dev[0-9a-f]{9}$"
]

linkcheck_ignore = [
r"^./android/gradle.html$",
r"^./iOS/xcode.html$",
r"^./linux/appimage.html$",
r"^./linux/flatpak.html$",
r"^./linux/system.html$",
r"^./macOS/app.html$",
r"^./macOS/xcode.html$",
r"^./web/static.html$",
r"^./windows/app.html$",
r"^./windows/visualstudio.html$",
r"^https://github.com/beeware/briefcase/issues/\d+$",
r"^https://github.com/beeware/briefcase/pull/\d+$",
Copy link
Member

Choose a reason for hiding this comment

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

Not sure how I feel about this one.

On the one hand - can't argue with the practicality. The link checks on the release notes page are overwhelmingly the most lengthy part of the test (it's even worse on Toga). And, these links are automatically generated

But... I've also caught plenty of bugs with this check, because while the links are automatically generated, they're often edited - and the links are often updated from issues to pull as part of the editing process so that they don't return redirects based on the printed link.

I think it's probably worth it for the developer experience improvement... but I'll flag that I'd love a better option (I just don't know what that is).

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 always forget to note when something is "intentionally provocative" and I fully expect push back...as I did here.

The only alternative I really have in mind is setting linkcheck_workers to something larger than five (5). It may at least run faster then.....as long as GitHub doesn't start returning 429s or something.

Copy link
Member

Choose a reason for hiding this comment

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

Move fast and break things, right? :-)

In this case, I think the risk profile is pretty small. The release notes are updated once per release; it's not like a "normal" documentation page where links could be updated in any pull request (or an external documentation source could change). I think I can live with the ignore, since it will speed things up for most docs builds, and as releases build up, the list of links is going to get absurd - to the point where even N-fold parallelisation won't help (especially when you consider that we get a handful of links added every Monday because of dependabot).

]

# -- Options for copy button ---------------------------------------------------

# virtual env prefix: (venv), (beeware-venv), (testenv)
Expand Down Expand Up @@ -320,17 +335,6 @@
# Location of word list.
spelling_word_list_filename = "spelling_wordlist"

# -- Options for link check -------------------------------------------

linkcheck_ignore = [
r"./android/gradle.html",
r"./iOS/xcode.html",
r"./linux/system.html",
r"./macOS/app.html",
r"./web/static.html",
r"./windows/app.html",
]

# -- Options for Todos -------------------------------------------

# If this is True, todo and todolist produce output, else they produce nothing. The default is False.
Expand Down
76 changes: 44 additions & 32 deletions docs/reference/platforms/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -23,48 +23,60 @@ Platform support
+-----+-------------------------------------+


.. |Gradle| replace:: **Gradle**
Copy link
Member Author

Choose a reason for hiding this comment

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

curious....did you intentionally use non-breaking spaces for these? I feel like you did and hence, I maintained them. Although, without them, the whole table does fit better on the page.

Copy link
Member

Choose a reason for hiding this comment

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

Yes, it was intentional. Without the non-breaking space, you end up with a table where "Native System Packages" is split over 3 lines... and the table still doesn't fit on the page. I opted to have a better looking table titles, and a slightly worse fit on the page.

.. |Gradle| replace:: **Gradle project**
.. _Gradle: ./android/gradle.html

.. |iOS| replace:: **Xcode**
.. |iOS| replace:: **Xcode project**
.. _iOS: ./iOS/xcode.html

.. |System| replace:: **Native System Packages**
.. |AppImage| replace:: AppImage
.. _AppImage: ./linux/appimage.html

.. |Flatpak| replace:: Flatpak
.. _Flatpak: ./linux/flatpak.html
Copy link
Member

Choose a reason for hiding this comment

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

So - the reason these replace calls exist at all is so that we can make the headings bold inside a link. The Bold was intended to indicate the platform default. As long as you don't need the bold, you don't strictly need the replace, either.

I've tweaked to retain the replace, but remove the bolds.

Copy link
Member Author

Choose a reason for hiding this comment

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

Ahhh, I see; the bold represents defaults. That apparently never clicked with me. I thought the differences in appearance in the table were being driving by the differences in how the links were constructed....and I rationalized that the link constructions were different because of some sphinx/rest thing I didn't understand....

Well, I may not have changed anything if I knew that before 😆


.. |System| replace:: **System package**
.. _System: ./linux/system.html

.. |macOSApp| replace:: **.app bundle**
.. _macOSApp: ./macOS/app.html

.. |windowsApp| replace:: **Windows app**
.. _windowsApp: ./windows/app.html
.. |Xcode| replace:: Xcode project
.. _Xcode: ./macOS/xcode.html

.. |Web| replace:: **Static**
.. _Web: ./web/static.html

+---------+--------------------------------------+--------+-------+---------+--------+---+-----+--------+-----+-------+
| Target App Format | Host System |
+ +--------+-------+---------+--------+---+-----+--------+-----+-------+
| | macOS | Windows | Linux |
+ +--------+-------+-----+--------+-------+-----+--------+-----+-------+
| | x86‑64 | arm64 | x86 | x86‑64 | arm64 | x86 | x86‑64 | arm | arm64 |
+=========+======================================+========+=======+=====+========+=======+=====+========+=====+=======+
| Android | |Gradle|_ | |f| | |y| | | |f| | | |v| | |f| | |v| | |v| |
+---------+--------------------------------------+--------+-------+-----+--------+-------+-----+--------+-----+-------+
| iOS | |iOS|_ | |f| | |y| | | | | | | | |
+---------+--------------------------------------+--------+-------+-----+--------+-------+-----+--------+-----+-------+
| Linux | :doc:`./linux/appimage` | |v| | | | | | |v| | |v| | | |
+ +--------------------------------------+--------+-------+-----+--------+-------+-----+--------+-----+-------+
| | :doc:`./linux/flatpak` | | | | | | |v| | |f| | |v| | |v| |
+ +--------------------------------------+--------+-------+-----+--------+-------+-----+--------+-----+-------+
| | |System|_ | |y| | |y| | | | | |v| | |f| | |v| | |v| |
+---------+--------------------------------------+--------+-------+-----+--------+-------+-----+--------+-----+-------+
| macOS | |macOSApp|_ | |f| | |y| | | | | | | | |
+ +--------------------------------------+--------+-------+-----+--------+-------+-----+--------+-----+-------+
| | :doc:`Xcode project <./macOS/xcode>` | |f| | |y| | | | | | | | |
+---------+--------------------------------------+--------+-------+-----+--------+-------+-----+--------+-----+-------+
| Web | |web|_ | |f| | |y| | |v| | |f| | |v| | |v| | |f| | |v| | |v| |
+---------+--------------------------------------+--------+-------+-----+--------+-------+-----+--------+-----+-------+
| Windows | |windowsApp|_ | | | | |f| | | | | | |
+ +--------------------------------------+--------+-------+-----+--------+-------+-----+--------+-----+-------+
| | :doc:`./windows/visualstudio` | | | | |f| | | | | | |
+---------+--------------------------------------+--------+-------+-----+--------+-------+-----+--------+-----+-------+
.. |WindowsApp| replace:: **Windows app**
.. _WindowsApp: ./windows/app.html

.. |VisualStudio| replace:: Visual Studio project
.. _VisualStudio: ./windows/visualstudio.html

+---------+-----------------+--------+-------+---------+--------+---+-----+--------+-----+-------+
| Target App Format | Host System |
+ +--------+-------+---------+--------+---+-----+--------+-----+-------+
| | macOS | Windows | Linux |
+ +--------+-------+-----+--------+-------+-----+--------+-----+-------+
| | x86‑64 | arm64 | x86 | x86‑64 | arm64 | x86 | x86‑64 | arm | arm64 |
+=========+=================+========+=======+=====+========+=======+=====+========+=====+=======+
| Android | |Gradle|_ | |f| | |y| | | |f| | | |v| | |f| | |v| | |v| |
+---------+-----------------+--------+-------+-----+--------+-------+-----+--------+-----+-------+
| iOS | |iOS|_ | |f| | |y| | | | | | | | |
+---------+-----------------+--------+-------+-----+--------+-------+-----+--------+-----+-------+
| Linux | |AppImage|_ | |v| | | | | | |v| | |v| | | |
+ +-----------------+--------+-------+-----+--------+-------+-----+--------+-----+-------+
| | |Flatpak|_ | | | | | | |v| | |f| | |v| | |v| |
+ +-----------------+--------+-------+-----+--------+-------+-----+--------+-----+-------+
| | |System|_ | |y| | |y| | | | | |v| | |f| | |v| | |v| |
+---------+-----------------+--------+-------+-----+--------+-------+-----+--------+-----+-------+
| macOS | |macOSApp|_ | |f| | |y| | | | | | | | |
+ +-----------------+--------+-------+-----+--------+-------+-----+--------+-----+-------+
| | |Xcode|_ | |f| | |y| | | | | | | | |
+---------+-----------------+--------+-------+-----+--------+-------+-----+--------+-----+-------+
| Web | |Web|_ | |f| | |y| | |v| | |f| | |v| | |v| | |f| | |v| | |v| |
+---------+-----------------+--------+-------+-----+--------+-------+-----+--------+-----+-------+
| Windows | |WindowsApp|_ | | | | |f| | | | | | |
+ +-----------------+--------+-------+-----+--------+-------+-----+--------+-----+-------+
| | |VisualStudio|_ | | | | |f| | | | | | |
+---------+-----------------+--------+-------+-----+--------+-------+-----+--------+-----+-------+