Skip to content

Document ngclient - #1474

Merged
joshuagl merged 1 commit into
theupdateframework:developfrom
jku:document-ngclient
Jul 27, 2021
Merged

Document ngclient#1474
joshuagl merged 1 commit into
theupdateframework:developfrom
jku:document-ngclient

Conversation

@jku

@jkujku commented Jul 1, 2021

Copy link
Copy Markdown
Member
  • Document the ngclient.updater module
  • Include the simplest possible example
  • Try out some sphinx links and layout

I've tested this with sphinx (+ napoleon plugin for google docstrings) and it works.

I did not go all-in with the sphinx links as it looks quite ugly in the source code -- not sure which to optimize here.

@jku
jku requested a review from sechkovaJuly 1, 2021 12:55
@jku
jkuforce-pushed the document-ngclient branch from 6494f27 to adadf18CompareJuly 1, 2021 13:00
@jku

jku commented Jul 1, 2021

Copy link
Copy Markdown
MemberAuthor

I should file issues for the "implement docs build, publish on readthedocs" steps but I'm not entirely sure what that really includes...

My quick-and-dirty test method:

  • install sphinx
  • configure with sphinx-quickstart
  • Add extensions = ['sphinx.ext.napoleon'] to conf.py to get support for google style docstrings
  • run docs build (e.g. make html)

@sechkovasechkova left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I think this is a good starting point for documenting the client. We can most likely find a ways to improve it while we keep tuning the client API and publishing the docs.

Yeah, the links look a bit ugly in the source but are useful in the html.

Comment threadtuf/ngclient/updater.py
Comment threadtuf/ngclient/updater.py
Comment threadtuf/ngclient/updater.py Outdated
@sechkova

sechkova commented Jul 5, 2021

Copy link
Copy Markdown
Contributor

My quick-and-dirty test method:

* install sphinx
* configure with `sphinx-quickstart`
* Add `extensions = ['sphinx.ext.napoleon']` to conf.py to get support for google style docstrings
* run docs build (e.g. `make html`)

I had to add some settings so that autodoc is able to find the module too?
edit: probably I didn't import TUF from the very beginning and the autodocs tweaks were not needed.

@jku
jkuforce-pushed the document-ngclient branch 2 times, most recently from 58221cd to 0c85e43CompareJuly 5, 2021 16:23
@jku
jku marked this pull request as ready for review July 5, 2021 16:57
@joshuagljoshuagl linked an issue Jul 7, 2021 that may be closed by this pull request
Comment threadtuf/ngclient/updater.py
* Added module docs and a simple example
* Experimented with sphinx linking for classes and methods
(it's pretty ugly in source format)
* Small improvements in the methods docs
Fixestheupdateframework#1385
Signed-off-by: Jussi Kukkonen <jkukkonen@vmware.com>
@jku
jkuforce-pushed the document-ngclient branch from 0c85e43 to c37d21dCompareJuly 19, 2021 07:43
@joshuagljoshuagl added the documentation Documentation of the project as well as procedural documentation label Jul 22, 2021

@joshuagljoshuagl left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thanks, this looks like a decent start. Let's merge and iterate.

@joshuagl
joshuagl merged commit ab41675 into theupdateframework:developJul 27, 2021
@jku
jku deleted the document-ngclient branch December 30, 2024 09:10
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentationDocumentation of the project as well as procedural documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

ngclient: Proper public module documentation

4 participants

@jku@sechkova@joshuagl@MVrachev