conan-io / docs

conan.io reStructuredText documentation
http://docs.conan.io
MIT License
104 stars 346 forks source link

Improve tools scm Version with properties description #3746

Closed uilianries closed 1 month ago

uilianries commented 1 month ago

Hello!

I targeting release 2.3 branch because we actually have it available since Conan 1.x

To understand the current commit:

First I tried to add docustrings directly to conans.models.version (Conan Client), then expose them via ::members::. Indeed Sphinx was able to expose, but badly formatted:

Screenshot 2024-05-29 at 12-49-38 Version — conan 2 3 2 documentation

The documentation is not very clear how to fix, only says to use commas and all should be good: https://www.sphinx-doc.org/en/master/usage/extensions/autodoc.html#directive-option-automodule-members

It looks be related to documenting properties, because when using with methods (e.g. MSBuild) it formats correctly.

The second point is adding examples of usage for each property, like we have in Conan 1.x docs. Using docustring, it keeps everything in a single when exposing in Sphinx.

closes #3745

Current view:

Screenshot 2024-05-29 at 13-18-28 Version — conan 2 3 2 documentation